Message ID | 20200731215345.19212-5-nolange79@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | package/systemd: make a couple dependencies optional | expand |
On Fri, 31 Jul 2020 23:53:44 +0200 Norbert Lange <nolange79@gmail.com> wrote: > +ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y) > +SYSTEMD_CONF_OPTS += -Dnologin-path=/usr/sbin/nologin nologin is in fact installed in /sbin in a non-merged /usr configuration. I know in the case of systemd, merged /usr is always enabled so that is not a big deal, but I nevertheless changed to /sbin/nologin since it seems to be the canonical location for nologin. Applied with this change. Thanks! Thomas
Am Mi., 5. Aug. 2020 um 15:52 Uhr schrieb Thomas Petazzoni <thomas.petazzoni@bootlin.com>: > > On Fri, 31 Jul 2020 23:53:44 +0200 > Norbert Lange <nolange79@gmail.com> wrote: > > > +ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y) > > +SYSTEMD_CONF_OPTS += -Dnologin-path=/usr/sbin/nologin > > nologin is in fact installed in /sbin in a non-merged /usr > configuration. I know in the case of systemd, merged /usr is always > enabled so that is not a big deal, but I nevertheless changed to > /sbin/nologin since it seems to be the canonical location for nologin. > > Applied with this change. Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Hello, I am not terribly concerned with the change, but what happened until now, is that meson picked either the host binary or the "default" one from systemd (see [1], where this is addressed). I'd prefer to pick the default settings from systemd (favoring /usr being self-contained), following: ----------------- # if -Dxxx-path option is found, use that. Otherwise, check in $PATH, # /usr/sbin, /sbin, and fall back to the default from middle column. progs = [['quotaon', '/usr/sbin/quotaon' ], ['quotacheck', '/usr/sbin/quotacheck' ], ['kmod', '/usr/bin/kmod' ], ['kexec', '/usr/sbin/kexec' ], ['sulogin', '/usr/sbin/sulogin' ], ['mount', '/usr/bin/mount', 'MOUNT_PATH'], ['umount', '/usr/bin/umount', 'UMOUNT_PATH'], ['loadkeys', '/usr/bin/loadkeys', 'KBD_LOADKEYS'], ['setfont', '/usr/bin/setfont', 'KBD_SETFONT'], ['nologin', '/usr/sbin/nologin', ], ----------------- Regards, Norbert [1] - https://patchwork.ozlabs.org/project/buildroot/patch/20200710234150.185609-2-nolange79@gmail.com/
diff --git a/package/systemd/Config.in b/package/systemd/Config.in index bea8aaa019..1c37a37789 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -31,7 +31,6 @@ menuconfig BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT select BR2_PACKAGE_UTIL_LINUX_AGETTY select BR2_PACKAGE_UTIL_LINUX_MOUNT - select BR2_PACKAGE_UTIL_LINUX_NOLOGIN select BR2_PACKAGE_UTIL_LINUX_FSCK select BR2_PACKAGE_KMOD select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 00c18be210..ac03e16829 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -217,6 +217,12 @@ else SYSTEMD_CONF_OPTS += -Dblkid=false endif +ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y) +SYSTEMD_CONF_OPTS += -Dnologin-path=/usr/sbin/nologin +else +SYSTEMD_CONF_OPTS += -Dnologin-path=/bin/false +endif + ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y) SYSTEMD_CONF_OPTS += -Dinitrd=true else
if the tool is not enabled, then configure /bin/false as fallback. Signed-off-by: Norbert Lange <nolange79@gmail.com> --- package/systemd/Config.in | 1 - package/systemd/systemd.mk | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-)