Bug 16000

Summary: missed binary /usr/bin/xsm
Product: Mageia Reporter: Giuseppe Ghibò <ghibomgx>
Component: RPM PackagesAssignee: Giuseppe Ghibò <ghibomgx>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: luigiwalser, mageia, olav, thierry.vignaud
Version: 5   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: xinitrc-2.4.21-12.mga5 CVE:
Status comment:

Description Giuseppe Ghibò 2015-05-21 15:40:12 CEST
Description of problem:

There is a script called /etc/X11/Xsession which at line 185 calls:

exec $CK_XINIT_SESSION /usr/bin/xsm

but the binary /usr/bin/xsm is not contained in any available package in the distribution. Indeed it should be added. Other distro, (e.g fedora) put it in a package named "xorg-x11-xsm", anda  previous version of the distro (e.g. mandriva) had it in a package named "xsm".

The solution is to provide both the xsm package and also to fix the script /etc/X11/Xsession, checking the existance of /usr/bin/xsm before calling it, more or less like this:

--- Xsession.orig       2015-05-21 15:36:51.562021073 +0200
+++ Xsession    2015-05-21 15:37:51.114113947 +0200
@@ -182,6 +182,8 @@
        elif [ -x /usr/bin/twm ];then
            exec $CK_XINIT_SESSION /usr/bin/twm
        else
-           exec $CK_XINIT_SESSION /usr/bin/xsm
+           if [ -x /usr/bin/xsm ];then
+               exec $CK_XINIT_SESSION /usr/bin/xsm
+           fi
        fi
 fi


Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2015-05-23 13:27:11 CEST
CC'ing tv who maintains most Xorg packages.

CC: (none) => luigiwalser, thierry.vignaud

Samuel Verschelde 2015-06-06 16:49:06 CEST

Whiteboard: (none) => MGA5TOO

Comment 2 Rémi Verschelde 2016-08-30 06:45:21 CEST
Fixed in cauldron.

Assignee: bugsquad => ghibomgx

Comment 3 Rémi Verschelde 2016-08-30 06:47:39 CEST
@Giuseppe: If you want to provide an update for Mageia 5, you can have a look at https://wiki.mageia.org/en/Updates_policy#Maintainer_.28or_any_interested_packager.29

CC'ing your maintainer as preparing an update candidate and knowing the corresponding QA workflow is usually one of the tasks of the mentoring.

CC: (none) => mageia
Version: Cauldron => 5
Whiteboard: MGA5TOO => (none)

Comment 4 Rémi Verschelde 2016-08-30 06:47:50 CEST
s/maintainer/mentor/ :)
Comment 5 Olav Vitters 2016-08-30 10:25:41 CEST
That fix can be thought out more.

http://svnweb.mageia.org/packages/cauldron/xinitrc/current/SOURCES/Xsession?r1=1044232&r2=1049442

Instead of:
>  else
>    if [

use:
> elif

exactly like the previous rows.

Further, this code is the fallback. In case nothing is installed, it'll now silently do nothing! Ideally reuse some of the logic that the gdm Xsession script used to have. It relied on zenity to inform the user. Much better for debugging!

CC: (none) => olav

Comment 6 Thierry Vignaud 2016-08-30 11:57:08 CEST
Package xsm was just imported
Comment 7 Thierry Vignaud 2016-08-30 11:57:18 CEST
into cauldron
Comment 8 Giuseppe Ghibò 2016-08-30 12:04:52 CEST
For Olaf, yep, usage of elif is better :-) I added this in 2.4.21-20.
Comment 9 Giuseppe Ghibò 2016-11-11 15:52:12 CET
Fixed in 2.4.21-20. I close.

Status: NEW => RESOLVED
Resolution: (none) => FIXED