Bug 16000 - missed binary /usr/bin/xsm
Summary: missed binary /usr/bin/xsm
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Giuseppe Ghibò
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 15:40 CEST by Giuseppe Ghibò
Modified: 2016-11-11 15:52 CET (History)
4 users (show)

See Also:
Source RPM: xinitrc-2.4.21-12.mga5
CVE:
Status comment:


Attachments

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


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