Skip to contentSkip to conversation

package/systemd: make a couple dependencies optional

PATCH New Norbert Lange 2 participants 12 messages Jul 31, 2020 – Aug 5, 2020

lore
Share & tools
lore
#0 lore raw

cover package/systemd: make a couple dependencies optional

This is the previous single patch split uo into several smaller ones #1-#4, there are no changes in these.
One patch is added to disable the portabled option

Norbert Lange (5):
package/systemd: import does not need bzip2 and lz4 package/systemd: remove libblkid dependency package/systemd: remove util-linux binaries dependency package/systemd: remove util-linux nologin dependency package/systemd: disable portabled

 package/systemd/Config.in  |  5 -----
 package/systemd/systemd.mk | 16 ++++++++++++++--
 2 files changed, 14 insertions(+), 7 deletions(-)

--
2.27.0

#1 lore raw

PATCH 1/5 package/systemd: import does not need bzip2 and lz4

Those are optional dependencies.

---
 package/systemd/Config.in | 2 --
 1 file changed, 2 deletions(-)
package/systemd/Config.in +0 -2
index ccdd5bfa92..8d29b09add 100644
@@ -265,8 +265,6 @@ config BR2_PACKAGE_SYSTEMD_IMPORTD
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_LIBGCRYPT
-	select BR2_PACKAGE_BZIP2
-	select BR2_PACKAGE_LZ4
 	select BR2_PACKAGE_XZ
 	select BR2_PACKAGE_ZLIB
 	help
Signature · 1 line
2.27.0
#2 lore raw

PATCH 1/5 package/systemd: import does not need bzip2 and lz4

Quoted 6 lines · On Fri, 31 Jul 2020 23:53:41 +0200 Norbert Lange <[email protected]> wrote:

Those are optional dependencies.

---
 package/systemd/Config.in | 2 --
 1 file changed, 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/5 package/systemd: remove libblkid dependency

In reply to Norbert Lange

this dependency is optional, it is used to
allow udev to add information to blockdevices. Aslong as MOUNT or FSCK are enabled, it will end up enabled anyway, but this seems more clear and correct.

---
 package/systemd/Config.in  | 1 -
 package/systemd/systemd.mk | 7 ++++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
package/systemd/Config.in +0 -1
index 8d29b09add..56d7eed063 100644
@@ -28,7 +28,6 @@ menuconfig BR2_PACKAGE_SYSTEMD
 	select BR2_PACKAGE_DBUS # runtime dependency only
 	select BR2_PACKAGE_LIBCAP
 	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
 	select BR2_PACKAGE_UTIL_LINUX_BINARIES
 	select BR2_PACKAGE_UTIL_LINUX_AGETTY
package/systemd/systemd.mk +6 -1
index edb2e56a72..00c18be210 100644
@@ -25,7 +25,6 @@ SYSTEMD_CONF_OPTS += \
 	-Dsysvinit-path= \
 	-Dsysvrcnd-path= \
 	-Dutmp=false \
-	-Dblkid=true \
 	-Dman=false \
 	-Dima=false \
 	-Dldconfig=false \
@@ -212,6 +211,12 @@ else
 SYSTEMD_CONF_OPTS += -Dpcre2=false
 endif
 
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
+SYSTEMD_CONF_OPTS += -Dblkid=true
+else
+SYSTEMD_CONF_OPTS += -Dblkid=false
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y)
 SYSTEMD_CONF_OPTS += -Dinitrd=true
 else
Signature · 1 line
2.27.0
#4 lore raw

PATCH 2/5 package/systemd: remove libblkid dependency

Quoted 10 lines · On Fri, 31 Jul 2020 23:53:42 +0200 Norbert Lange <[email protected]> wrote:

this dependency is optional, it is used to
allow udev to add information to blockdevices. Aslong as MOUNT or FSCK are enabled, it will end up enabled anyway, but this seems more clear and correct.

---
 package/systemd/Config.in  | 1 -
 package/systemd/systemd.mk | 7 ++++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 3/5 package/systemd: remove util-linux binaries dependency

In reply to Norbert Lange

None of the tools in this set are necessary.

---
 package/systemd/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/systemd/Config.in +0 -1
index 56d7eed063..bea8aaa019 100644
@@ -29,7 +29,6 @@ menuconfig BR2_PACKAGE_SYSTEMD
 	select BR2_PACKAGE_LIBCAP
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
-	select BR2_PACKAGE_UTIL_LINUX_BINARIES
 	select BR2_PACKAGE_UTIL_LINUX_AGETTY
 	select BR2_PACKAGE_UTIL_LINUX_MOUNT
 	select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
Signature · 1 line
2.27.0
#6 lore raw

PATCH 3/5 package/systemd: remove util-linux binaries dependency

Quoted 6 lines · On Fri, 31 Jul 2020 23:53:43 +0200 Norbert Lange <[email protected]> wrote:

None of the tools in this set are necessary.

---
 package/systemd/Config.in | 1 -
 1 file changed, 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 4/5 package/systemd: remove util-linux nologin dependency

In reply to Norbert Lange

if the tool is not enabled, then configure /bin/false as fallback.

---
 package/systemd/Config.in  | 1 -
 package/systemd/systemd.mk | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)
package/systemd/Config.in +0 -1
index bea8aaa019..1c37a37789 100644
@@ -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
package/systemd/systemd.mk +6 -0
index 00c18be210..ac03e16829 100644
@@ -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
Signature · 1 line
2.27.0
#8 lore raw

PATCH 4/5 package/systemd: remove util-linux nologin dependency

package/systemd/systemd.mk else · line 221

Quoted 2 lines · On Fri, 31 Jul 2020 23:53:44 +0200 Norbert Lange <[email protected]> wrote:
package/systemd/systemd.mk +2 -0
+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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH 4/5 package/systemd: remove util-linux nologin dependency

Am Mi., 5. Aug. 2020 um 15:52 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 12 lines

package/systemd/systemd.mk else · line 221

Quoted 2 lines · On Fri, 31 Jul 2020 23:53:44 +0200 Norbert Lange <[email protected]> wrote:
package/systemd/systemd.mk +2 -0
+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.

Quoted 7 lines

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 at gmail.com/

#10 lore raw

PATCH 5/5 package/systemd: disable portabled

In reply to Norbert Lange

portabled is a container-like service, but so far its still a preview and basically unknown as the portablectl is hidden in /usr/lib/systemd.

Disable it for now.

See https://systemd.io/PORTABLE_SERVICES/

---
 package/systemd/systemd.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/systemd/systemd.mk +2 -1
index ac03e16829..0e95a2d36b 100644
@@ -45,7 +45,8 @@ SYSTEMD_CONF_OPTS += \
 	-Dsetfont-path=/usr/bin/setfont \
 	-Dtelinit-path=/sbin/telinit \
 	-Didn=true \
-	-Dnss-systemd=true
+	-Dnss-systemd=true \
+	-Dportabled=false
 
 ifeq ($(BR2_PACKAGE_ACL),y)
 SYSTEMD_DEPENDENCIES += acl
Signature · 1 line
2.27.0
#11 lore raw

PATCH 5/5 package/systemd: disable portabled

Quoted 4 lines · On Fri, 31 Jul 2020 23:53:45 +0200 Norbert Lange <[email protected]> wrote:

portabled is a container-like service, but so far its still a preview and basically unknown as the portablectl is hidden in /usr/lib/systemd.

Quoted 8 lines

Disable it for now.

See https://systemd.io/PORTABLE_SERVICES/

---
 package/systemd/systemd.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com