Merge lp:~agateau/lightdm/move-to-sbin into lp:lightdm

Proposed by Aurélien Gâteau
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp:~agateau/lightdm/move-to-sbin
Merge into: lp:lightdm
Diff against target: 61 lines (+5/-5)
5 files modified
data/Makefile.am (+1/-1)
data/guest-session.apparmor (+1/-1)
src/Makefile.am (+1/-1)
src/display.c (+1/-1)
utils/Makefile.am (+1/-1)
To merge this branch: bzr merge lp:~agateau/lightdm/move-to-sbin
Reviewer Review Type Date Requested Status
Robert Ancell Needs Fixing
Review via email: mp+89146@code.launchpad.net

Description of the change

Install lightdm-set-defaults and lightdm-guest-session-wrapper in $prefix/sbin

This makes it easier to call lightdm-set-defaults from admin scripts because one does not have to worry about its installation path, which is not always the same when multiarch packaging is involved (it will be in /usr/lib/x86_64-linux-gnu/lightdm on amd64 systems), making it difficult to call it from postinsts of other packages.

Moving lightdm-guest-session-wrapper to $prefix/sbin is also useful to avoid putting it in $PATH for all users. It was in $PATH previously because it is in the same dir as gdmflexiserver.

The alternative would be to force libexecdir to /usr/lib on the packaging side, I can provide a MR for the packaging branch if you prefer to keep lightdm code as is.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

The lightdm-set-defaults change is fine, not sure what packages need updating to use the new location though. Perhaps a symlink is needed in the packaging for migration?

I'm unsure about the other changes as I'm not 100% what they do and haven't have the time to review.

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Indeed, either a symlink or a shell script (which could print out a deprecation warning) would be needed.

Regarding the lightdm-guest-session-wrapper move: this is not related. Right now lightdm-guest-session-wrapper and gdmflexiserver are both installed in /usr/lib/lightdm/lightdm/. /usr/lib/lightdm/lightdm is prepended to $PATH so that user programs can find LightDM implementation of gdmflexiserver. This means lightdm-guest-session-wrapper is added to $PATH as well. Installing it in /usr/sbin prevents that.

I can rework the MR to only change the installation dir of lightdm-set-defaults if you prefer.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Yes, two MPs would be good, thanks.

Ah I understand now. lightdm-guest-session-wrapper should not be user accessible, so it is in the correct place. The bug here is that /usr/lib/lightdm/lightdm/ is in the path. gdmflexiserver is a sticking plaster until apps stop using this program. So I think the correct solution here is to move it from $(pkglibexecdir) to $(pkglibexecdir)/gdmflexiserver or $(pkglibexecdir)/legacy or similar.

Revision history for this message
Robert Ancell (robert-ancell) :
review: Needs Fixing
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Closing due to inactivity. Please reopen if still applicable!

Unmerged revisions

1363. By Aurélien Gâteau

Install lightdm-set-defaults and lightdm-guest-session-wrapper in $prefix/sbin

This makes it easier to call lightdm-set-defaults from admin scripts because
one does not have to worry about its path. It is especially important when
multiarch packaging is involved because in this case $(libexecdir) or
$(pkglibexecdir) are architecture-dependents, making it difficult to call any
binary there from another package.

Moving lightdm-guest-session-wrapper to $prefix/sbin is also useful to avoid
putting it in $PATH for all users. It was in $PATH previously because it is in
the same dir as gdmflexiserver.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/Makefile.am'
2--- data/Makefile.am 2011-09-30 12:19:30 +0000
3+++ data/Makefile.am 2012-01-18 21:22:24 +0000
4@@ -12,7 +12,7 @@
5
6 install-data-hook:
7 install -d $(DESTDIR)$(apparmor_profiledir)
8- sed 's!LIBEXECDIR!$(libexecdir)!g' < $(srcdir)/guest-session.apparmor \
9+ sed 's!SBINDIR!$(sbindir)!g' < $(srcdir)/guest-session.apparmor \
10 > $(DESTDIR)$(apparmor_profiledir)/lightdm-guest-session
11
12 dist_man1_MANS = lightdm.1
13
14=== modified file 'data/guest-session.apparmor'
15--- data/guest-session.apparmor 2011-11-01 18:59:19 +0000
16+++ data/guest-session.apparmor 2012-01-18 21:22:24 +0000
17@@ -4,7 +4,7 @@
18
19 #include <tunables/global>
20
21-LIBEXECDIR/lightdm-guest-session-wrapper {
22+SBINDIR/lightdm-guest-session-wrapper {
23 #include <abstractions/authentication>
24 #include <abstractions/nameservice>
25 #include <abstractions/wutmp>
26
27=== modified file 'src/Makefile.am'
28--- src/Makefile.am 2012-01-17 05:34:22 +0000
29+++ src/Makefile.am 2012-01-18 21:22:24 +0000
30@@ -92,7 +92,7 @@
31 $(LIGHTDM_LIBS) \
32 -lpam
33
34-pkglibexec_PROGRAMS = lightdm-guest-session-wrapper
35+sbin_PROGRAMS += lightdm-guest-session-wrapper
36
37 lightdm_guest_session_wrapper_SOURCES = lightdm-guest-session-wrapper.c
38
39
40=== modified file 'src/display.c'
41--- src/display.c 2012-01-17 05:34:22 +0000
42+++ src/display.c 2012-01-18 21:22:24 +0000
43@@ -467,7 +467,7 @@
44 if (display->priv->autologin_guest)
45 {
46 gchar *t = command;
47- command = g_strdup_printf (PKGLIBEXEC_DIR "/lightdm-guest-session-wrapper %s", command);
48+ command = g_strdup_printf (SBIN_DIR "/lightdm-guest-session-wrapper %s", command);
49 g_debug("Guest session, running session command through wrapper: %s", command);
50 g_free (t);
51 }
52
53=== modified file 'utils/Makefile.am'
54--- utils/Makefile.am 2012-01-12 10:20:17 +0000
55+++ utils/Makefile.am 2012-01-18 21:22:24 +0000
56@@ -1,5 +1,5 @@
57 bin_PROGRAMS = dm-tool
58-pkglibexec_PROGRAMS = lightdm-set-defaults
59+sbin_PROGRAMS = lightdm-set-defaults
60 legacydir = $(libexecdir)/lightdm
61 dist_legacy_SCRIPTS = gdmflexiserver
62

Subscribers

People subscribed via source and target branches