Bug 837450

Summary: yast triggers on xorg-x11
Product: [openSUSE] openSUSE Tumbleweed Reporter: Ludwig Nussel <lnussel>
Component: YaST2Assignee: Josef Reidinger <jreidinger>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: coolo, eich, fcrozat, jreidinger, jsuchome, sndirsch, snwint
Version: 13.1 Milestone 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ludwig Nussel 2013-08-29 07:32:17 UTC
yast decides whether or not the installation has X based on the presence of the xorg-x11 package. This pakages nowadays is only a placeholder that recommends all kinds of optional packages. It's not meant to be installed by default anymore. So yast needs to trigger on another core X package instead.
Comment 1 Stefan Dirsch 2013-08-29 08:13:44 UTC
Assuming X based means a Xserver running on the same (virtual) machine for installation, i.e. a graphical installation, the package "xorg-x11-server" would be a good choice.
Comment 2 Egbert Eich 2013-08-29 08:42:22 UTC
(In reply to comment #1)
> Assuming X based means a Xserver running on the same (virtual) machine for
> installation, i.e. a graphical installation, the package "xorg-x11-server"
> would be a good choice.

If this is the right choice depends on what YaST does when it believes an installation should be in gfx mode: if it launches and Xserver it needs to check for the presence of one. But as far as I know it can also launch Xvnc which is in a different package IHMO.
Generally is would be a good idea to check if the binary it is trying to launch is available before executing it instead of making things depend on a package. Also fallbacks if this binary fails would be good to have.
Comment 3 Stephan Kulow 2013-08-29 09:43:03 UTC
It has several places to check for xorg-x11, but the most prominent failure without this package is that runlevel 3 is picked. Runlevel 5 should indeed be bound to xorg-x11-server, Xvnc makes sense in runlevel 3 too
Comment 4 Stefan Dirsch 2013-08-29 09:50:31 UTC
Xvnc is in xorg-x11-Xvnc, yes.

Question remains, for what reasons YaST still looks for such a package. Maybe just check for an existing /usr/bin/Xorg binary instead of a package, which might be renamed at any time again?
Comment 5 Jiří Suchomel 2013-09-02 13:06:59 UTC
1. There's X11Version.have_x11 function that should check "if X11 is installed
". It returns true if "xorg-x11", "yast2-x11", "sax2" packages are installed... hm, looking at that sax2 check it appears the functions is never actually used.



2. There's requirement of xorg-x11 package in control.xml in the case of "minimal X11" installation. This should be replaced by xorg-x11-server, as it is probably the case when xorg-x11 is selected for installation.



3. Than there's a check if xorg-x11 is selected for installation in x11_finish.rb Here it tries to detect XFree86 version 3 and copy the files to current system during the update:

This must be years old: Stefan, I assume that these parts can be completely removed, right?

It's block starting at https://github.com/yast/yast-installation/blob/master/src/clients/x11_finish.rb#L87
Comment 6 Stefan Dirsch 2013-09-02 13:19:48 UTC
(In reply to comment #5)
> 1. There's X11Version.have_x11 function that should check "if X11 is installed
> ". It returns true if "xorg-x11", "yast2-x11", "sax2" packages are installed...
> hm, looking at that sax2 check it appears the functions is never actually used.

sax2 no longer exists. Was already dropped with openSUSE 12.3. There was only sax2-tools still, but the necessary tools have been moved to yast2-tools for openSUSE factory. Dead code can and should be removed.

> 2. There's requirement of xorg-x11 package in control.xml in the case of
> "minimal X11" installation. This should be replaced by xorg-x11-server, as it
> is probably the case when xorg-x11 is selected for installation.

Ok.

> 3. Than there's a check if xorg-x11 is selected for installation in
> x11_finish.rb Here it tries to detect XFree86 version 3 and copy the files to
> current system during the update:

Which files are copied?

> This must be years old: Stefan, I assume that these parts can be completely
> removed, right?
> 
> It's block starting at
> https://github.com/yast/yast-installation/blob/master/src/clients/x11_finish.rb#L87

The XFree86 3.x code can be removed, yes.
Comment 7 Jiří Suchomel 2013-09-02 13:28:20 UTC
4. Than we have xorg-x11 in runlevel proposal, which is probably the bug mentioned in comment 3...

5. and list of x11 related packages in Packages.rb
Comment 8 Stephan Kulow 2013-09-02 14:03:54 UTC
https://github.com/yast/yast-x11/pull/4 is to fix yast2-x11, which is yet another case
Comment 9 Jiří Suchomel 2013-09-03 08:33:31 UTC
I submitted changes for skelcd-control-openSUSE, but I'm not sure where to fix  skelcd-control-SLED. I assume  SUSE:SLE-11-SP3:GA is not relevant...
Comment 10 Stefan Dirsch 2013-09-03 08:39:34 UTC
Thanks. There is no need to change anything for sle11. Also we still use sax2 on sle11-sp3 (unfortunately).
Comment 11 Jiří Suchomel 2013-09-03 09:43:03 UTC
On related note: there's currently piece of code that backs up 
/etc/X11/xorg.conf from inst-sys to installed system.(at the end of first stage)

Steffen, do you think this is still useful, or could I drop that part as well?
Comment 12 Stefan Dirsch 2013-09-03 09:48:36 UTC
(In reply to comment #11)
> On related note: there's currently piece of code that backs up 
> /etc/X11/xorg.conf from inst-sys to installed system.(at the end of first
> stage)
> 
> Steffen, do you think this is still useful, or could I drop that part as well?

We still want to use this special config during second stage of installation (so we're using the same Xorg configuration as with the first stage). After a successful installation it should be moved to /etc/X11/xorg.conf.install on the installed system. So this did not change.
Comment 13 Jiří Suchomel 2013-09-03 13:53:14 UTC
I've adapted yast2-installation, packager, autoinstallation and the control file.

For runlevel, there's a new bug 838197
Comment 14 Frederic Crozat 2013-09-25 12:50:17 UTC
(In reply to comment #9)
> I submitted changes for skelcd-control-openSUSE, but I'm not sure where to fix 
> skelcd-control-SLED. I assume  SUSE:SLE-11-SP3:GA is not relevant...

I wouldn't change the SLED file for SLE-11 (since X11 stack won't change there). I'll take care of the SLED 12 file.
Comment 15 Ludwig Nussel 2013-10-01 14:44:25 UTC
I'm reopening as yast2-runlevel is still used and looks like it causes runlevel 3 after installation of the minimalx pattern. It's too late now to replace yast modules in the 13.1 installation so please fix yast2-runlevel.
Comment 16 Ludwig Nussel 2013-10-01 14:47:36 UTC
 5979 2013-10-01 10:20:41 <1> linux(2620) [Pkg] Package.cc(IsSelected):491 Tag xorg-x11 is not selected to install
 5980 2013-10-01 10:20:41 <1> linux(2620) [Ruby] clients/runlevel_proposal.rb:61 x11_setup_needed: true, x11_selected: false, vnc: fals      e, ssh false, serial: false, forced: , live_medium: false
 5981 2013-10-01 10:20:41 <1> linux(2620) [Ruby] clients/runlevel_proposal.rb:112 Default runlevel: 3
...
22209 2013-10-01 10:22:33 <1> linux(2620) [Ruby] clients/runlevel_finish.rb:40 starting runlevel_finish
22210 2013-10-01 10:22:33 <1> linux(2620) [Ruby] clients/runlevel_finish.rb:77 setting default runlevel to 3
22211 2013-10-01 10:22:33 <1> linux(2620) [Ruby] modules/Systemd.rb:73 Setting systemd default runlevel: 3
22212 2013-10-01 10:22:33 <1> linux(2620) [Ruby] modules/Systemd.rb:85 Executing: /bin/ln -s -f /usr/lib/systemd/system/runlevel3.targe      t /etc/systemd/system/default.target
22213 2013-10-01 10:22:33 <1> linux(2620) [Ruby] modules/Systemd.rb:91 Default runlevel set: true 
22214 2013-10-01 10:22:33 <1> linux(2620) [Ruby] clients/runlevel_finish.rb:72 runlevel_finish finished
Comment 17 Jiří Suchomel 2013-10-01 18:13:10 UTC
AFAIK the plan still is to replace yast2-runlevel by yast2-services-manager for 13.1
Comment 18 Ludwig Nussel 2013-10-02 07:18:55 UTC
-ETIMEOUT. RC1 is next week. Wrong time for experiments with the installer.
Comment 19 Josef Reidinger 2013-10-04 13:41:57 UTC
I take it and fix old runlevel module.
Comment 20 Josef Reidinger 2013-10-04 13:48:53 UTC
Proposed fix is in review: https://github.com/yast/yast-runlevel/pull/12/files
Comment 21 Josef Reidinger 2013-10-04 14:14:46 UTC
Fix send to factory and should be merged also to 13.1 - https://build.opensuse.org/request/show/202159