Bug 8212 - no startup background if python six isn't installed
Summary: no startup background if python six isn't installed
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-25 18:34 CEST by Pierre Ossman
Modified: 2024-09-19 12:52 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments
Screenshot showing the broken background in RHEL 7 (94.38 KB, image/png)
2023-08-29 14:21 CEST, Samuel Mannehed
Details

Description Pierre Ossman cendio 2023-08-25 18:34:03 CEST
It seems there is a dependency for tl-startup-bg that isn't verified by tl-setup, namely six. I get this on a RHEL 7 system that was upgraded:

> Traceback (most recent call last):
>   File "/opt/thinlinc/libexec/tl-startup-bg", line 24, in <module>
>     from thinlinc . Xlib import display , X
>   File "/opt/thinlinc/modules/thinlinc/Xlib/display.py", line 26, in <module>
>     from six import create_unbound_method
> ModuleNotFoundError: No module named 'six'
Comment 1 Samuel Mannehed cendio 2023-08-29 14:19:01 CEST
Installing the package "python36-six" from EPEL 7 helps. I added a Platform Specific Note for this:

https://www.cendio.com/thinlinc/docs/platforms/redhat/
Comment 2 Samuel Mannehed cendio 2023-08-29 14:21:09 CEST
Created attachment 1157 [details]
Screenshot showing the broken background in RHEL 7
Comment 3 Samuel Mannehed cendio 2023-08-29 14:40:37 CEST
This bug is a regression from commit r40374 for bug 7949 where it was missed that python-xlib has python-six as a requirement. Unfortunately, the project doesn't list the package as a requirement here:

https://pypi.org/project/python-xlib/

You have to look in the source tree:

https://github.com/python-xlib/python-xlib/blob/master/requirements.txt
Comment 5 Samuel Mannehed cendio 2023-08-29 14:46:07 CEST
It is unclear presently if this package causes a problem on other platforms. The platforms we tested as part of the 4.15.0 release were Fedora 38, RHEL 9, SLES 15, and Ubuntu 22.04. Since the issue wasn't discovered on any of those platforms, it is likely they have python3-six installed by default.

Notes:

* RHEL 7 has python-six installed, the same package but for Python 2, it seems (?).
* The package in EPEL 7 is called "python36-six", similar to the naming for python36-gobject for example.
* The package on Fedora 38 is called "python3-six"
Comment 6 Samuel Mannehed cendio 2023-08-29 14:49:30 CEST
The package in question is described like this:

> Six provides simple utilities for wrapping over differences between Python 2
> and Python 3. It is intended to support codebases that work on both Python 2
> and 3 without modification. six consists of only one Python file, so it is
> painless to copy into a project.

From this description, I see two likely paths forward:

A. Modify the python-xlib we include, to no longer require python3-six. ThinLinc is only for Python 3.

B. Include python3-six in ThinLinc. If it is only one file, it doesn't seem like a big deal.
Comment 7 Linn cendio 2023-09-15 16:22:04 CEST
Found that SLES 12 doesn't have python3-six installed by default either, I see the same traceback as for RHEL 7 in comment 0 in xinit.log:
> Traceback (most recent call last):
>   File "/opt/thinlinc/libexec/tl-startup-bg", line 24, in <module>
>     from thinlinc . Xlib import display , X
>   File "/opt/thinlinc/modules/thinlinc/Xlib/display.py", line 26, in <module>
>     from six import create_unbound_method
> ImportError: No module named 'six'
It is possible to install python3-six without adding any additional repo.
Comment 8 Samuel Mannehed cendio 2023-09-15 17:00:58 CEST
(In reply to Samuel Mannehed from comment #1)
> Installing the package "python36-six" from EPEL 7 helps. I added a Platform
> Specific Note for this:
> 
> https://www.cendio.com/thinlinc/docs/platforms/redhat/

I added a Platform Specific Note for SLES 12 as well:

https://www.cendio.com/thinlinc/docs/platforms/suse/

Note You need to log in before you can comment on or make changes to this bug.