Bug 7702 - installer requires Python 2
Summary: installer requires Python 2
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server Installer (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: Bugzilla mail exporter
URL:
Keywords: frifl_tester, prosaic
Depends on: 7508
Blocks: 4586
  Show dependency treegraph
 
Reported: 2021-05-06 10:56 CEST by William Sjöblom
Modified: 2021-06-29 08:16 CEST (History)
4 users (show)

See Also:
Acceptance Criteria:


Attachments

Description William Sjöblom cendio 2021-05-06 10:56:24 CEST
The installer needs to be converted to run under Python 3.
Comment 49 Pierre Ossman cendio 2021-06-11 16:17:11 CEST
Tested installation on a minimal install of Ubuntu 20.04 with Python 3 removed[1]:

 * syscheck:
   ✓ Installed Python 3
   ✓ Installed python3-gi
   ✓ Installed GTK+ 3 and introspection data
 ✓ GUI mode
 ✓ Fresh installation of x86_64 deb packages
 ✓ Started tl-setup

[1] This removed a lot of system tools, so unlikely in the real world
Comment 50 Pierre Ossman cendio 2021-06-11 16:44:17 CEST
Tested upgrade from 4.12.1 on a minimal installation of Ubuntu 20.04:
 
 * syscheck:
   ✓ Found Python 3
   ✓ Installed python3-gi
   ✓ Installed GTK+ 3 and introspection data
 ✓ GUI mode
 ✓ Upgrade of x86_64 deb packages
 ✓ Started tl-setup
Comment 51 Frida Flodin cendio 2021-06-14 10:07:36 CEST
Tested on minimal SLES 12:

 ✓ syscheck
   ✓ Installed Python 3 (These are installed automatically: python3-gobject python3-gobject-cairo python3-gobject-Gdk)
   ✓ Found PyGobject (it was installed with Python 3)

 ✓ Fresh installation of x86_64 rpm packages
   ✓ GUI mode
   ✓ Started tl-setup
 
 ✓ Upgrade from tl-4.12.0
   ✓ GUI mode
   ✓ Started tl-setup
 
 ✓ Upgrade from tl-4.9.0
   ✓ GUI mode
   ✓ Text mode
   ✓ thinlinc-rdesktop removed
   ✓ Started tl-setup

 ✓ Rerunning installer (Nothing to install)
   ✓ Python 3 and PyGobject found by syscheck 
   ✓ Text mode 
   ✓ GUI mode
Comment 52 Pierre Ossman cendio 2021-06-14 10:17:27 CEST
Tested text mode installation, and upgrade from 4.12.1 on Ubuntu 20.04.

 * syscheck:
   ✓ Everything found, so nothing installed
 ✓ Text mode
 ✓ Installation/Upgrade of x86_64 deb packages
 ✓ Started tl-setup
Comment 54 Frida Flodin cendio 2021-06-14 11:17:49 CEST
Tested on minimal SLES 15:

   ✓ syscheck
     ✓ Python 3 found
     ✓ python3-gobject-Gdk was installed
   ✓ Fresh installation (Text mode)
   ✓ Fresh installation (GUI mode)
   ✓ Upgrade from 4.12.1 (Text mode)
   ✓ Started tl-setup in all cases
Comment 55 Frida Flodin cendio 2021-06-14 13:54:35 CEST
Tested on minimal Fedora 34:

   ✓ Text mode fresh installation
     ✓ python3 found
     ✓ python3-gobject found
   ✓ Upgrade from tl-4.12.1 (GUI mode)
   ✓ Nothing to install (GUI mode)
   ✓ Started tl-setup
Comment 56 William Sjöblom cendio 2021-06-14 14:52:51 CEST
Tested on Ubuntu Server 16.04 32 bit:

  ✓ Fresh install.
    ✓ python3 found
  ✓ Upgrade from 4.12.1
  ✓ Nothing to install
  ✓ Starts tl-setup

Only tested text-mode since the available GTK version too old.
Comment 57 Linn cendio 2021-06-14 16:21:43 CEST
Tested on minimal RHEL 7:

   ✓ syscheck
     ✓ python3 installed
     ✓ python3-gobject installed
     ✓ gtk3 installed
   ✓ Fresh installation (GUI mode)
   ✓ Upgrade from tl-4.12.1 (Text mode)
   ✓ Upgrade from tl-4.12.1 (GUI mode)
   ✓ Nothing to install (GUI mode)
   ✓ Started tl-setup for all cases
Comment 58 William Sjöblom cendio 2021-06-14 16:46:08 CEST
Tested on RHEL 8:

  ✓ syscheck
    ✓ installs python3
    ✓ installs PyGObject and GTK+ dependencies
  ✓ fresh install (graphical mode)
  ✓ upgrade from 4.12.1 (text mode)
  ✓ nothing to install (text/graphical mode)
  ✓ starts tl-setup (text/graphical mode)
Comment 59 Niko Lehto cendio 2021-06-14 16:59:11 CEST
Tested on Ubuntu Server 18.04 with build 2142:

 ✓ Fresh install.
 ✓ Upgrade from 4.12.1
 ✓  Nothing to install
 ✓  Starts tl-setup
Tested in both text and GUI mode.

Also tested syscheck:
 ✓ python3 found
 ✓ python3-gobject found
Comment 60 Frida Flodin cendio 2021-06-15 10:32:45 CEST
Tested graphical system check by clicking 'Click to install' in the server bundle on a system that needed GTK+ to be installed. This will open a suitable terminal and run the required installations there and then exit. 

* Tested on SLES 12, 'python3-gobject' was installed. 
* Also tested on Ubuntu 20.04, 'python3-gi' was installed. 

Works fine!
Comment 61 William Sjöblom cendio 2021-06-15 14:17:35 CEST
Tested on openSUSE Tumbleweed, 32-bit server install:

  ✗ syscheck
    ✓ python3 available
    ✗ installs GTK+ dependencies
  ✓ fresh install (graphical mode)
  ✓ upgrade from 4.12.1 (text mode)
  ✓ starts tl-setup

Everything works as expected except for an issue where we rely on the GTK3 typelib to be installed as a dependency. The problem here is that the we only depend on the GTK typelib capability without depending on a specific version of said typelib. Thus, for sufficiently new SUSE releases, we get the GTK4 typelib instead of the GTK3 typelib. We should therefore explicitly install `typelib-1_0-Gtk-3_0` on SUSE distros (along with our other GTK dependencies).
Comment 62 William Sjöblom cendio 2021-06-15 14:19:42 CEST
(In reply to William Sjöblom from comment #61)
> Tested on openSUSE Tumbleweed, 32-bit server install:

To clarify:
The graphical installer was tested after manually installing `typelib-1_0-Gtk-3_0` to circumvent the described issue.
Comment 63 Pierre Ossman cendio 2021-06-16 10:01:19 CEST
The GTK+ issue will be handled on bug 7508.
Comment 64 Pierre Ossman cendio 2021-06-16 10:02:50 CEST
Everything should now be converted and tested.
Comment 67 Pierre Ossman cendio 2021-06-18 13:46:48 CEST
I'm getting a ResourceWarning if sudorelaunch fails to start the program:

> /home/cendio/tl-4.12.1post-server/libs/modules/thinlinc/sudorelaunch.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=10 encoding='UTF-8'>
>   relaunch_via_sudo ( title )
> Object allocated at (most recent call last):
>   File "/usr/lib/python3.8/subprocess.py", lineno 846
>     self.stdout = io.TextIOWrapper(self.stdout,
Comment 69 Pierre Ossman cendio 2021-06-22 11:23:11 CEST
Should be fixed now. Most easily tested by simply aborting the sudo password prompt.
Comment 70 Frida Flodin cendio 2021-06-29 08:16:28 CEST
Tested on Fedora 34. I could reproduce the resource warning with build 2166. When canceling the password prompt with nightly build 2176 the warning is gone. 

Also made sure that the normal sudo relaunch works fine after the changes.

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