Skip to contentSkip to conversation

package/systemd: update user generation

PATCH New Norbert Lange 2 participants 3 messages Jan 13, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/systemd: update user generation

since V235 the "gateway" and "upload" services use DynamicUsers, requiring no entries in /etc/passwd.
This functionality requires option nss-systemd, which is always enabled in buildroot.

the "bus-proxy" user was removed in V244.

thre "remote" user will now only be generated if the feature is enabled.

Description is matched to the ones in the upstream sysusers.d files. home is set to /run/systemd.

---
 package/systemd/systemd.mk | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
package/systemd/systemd.mk +6 -8
index 442803baa8..a3073f10a9 100644
@@ -181,6 +181,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
 SYSTEMD_CONF_OPTS += -Dremote=true
+SYSTEMD_REMOTE_USER = systemd-journal-remote -1 systemd-journal-remote -1 * /run/systemd - - systemd Journal Remote
 else
 SYSTEMD_CONF_OPTS += -Dremote=false
 endif
@@ -304,7 +305,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
 SYSTEMD_CONF_OPTS += -Dcoredump=true
-SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
+SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /run/systemd - - systemd core dump processing
 else
 SYSTEMD_CONF_OPTS += -Dcoredump=false
 endif
@@ -324,7 +325,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
 SYSTEMD_CONF_OPTS += -Dnetworkd=true
-SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
+SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * /run/systemd - - systemd Network Management
 SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
 ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
 define SYSTEMD_INSTALL_NETWORK_CONFS
@@ -343,14 +344,14 @@ define SYSTEMD_INSTALL_RESOLVCONF_HOOK
 		$(TARGET_DIR)/etc/resolv.conf
 endef
 SYSTEMD_CONF_OPTS += -Dresolve=true
-SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
+SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * /run/systemd - - systemd Resolver
 else
 SYSTEMD_CONF_OPTS += -Dresolve=false
 endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
 SYSTEMD_CONF_OPTS += -Dtimesyncd=true
-SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
+SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * /run/systemd - - systemd Time Synchronization
 else
 SYSTEMD_CONF_OPTS += -Dtimesyncd=false
 endif
@@ -423,10 +424,7 @@ define SYSTEMD_USERS
 	- - systemd-journal -1 * - - - Journal
 	- - render -1 * - - - DRI rendering nodes
 	- - kvm -1 * - - - kvm nodes
-	systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
-	systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
-	systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
-	systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload
+	$(SYSTEMD_REMOTE_USER)
 	$(SYSTEMD_COREDUMP_USER)
 	$(SYSTEMD_NETWORKD_USER)
 	$(SYSTEMD_RESOLVED_USER)
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 package/systemd: update user generation

Hello Norbert,

Quoted 7 lines · On Mon, 13 Jan 2020 16:34:15 +0100 Norbert Lange <[email protected]> wrote:

since V235 the "gateway" and "upload" services use DynamicUsers, requiring no entries in /etc/passwd.
This functionality requires option nss-systemd, which is always enabled in buildroot.

the "bus-proxy" user was removed in V244.

Quoted 7 lines

thre "remote" user will now only be generated if the feature is enabled.

Description is matched to the ones in the upstream sysusers.d files. home is set to /run/systemd.

Thanks for your patch. However, it fixes numerous different problems, and as such, should be split into several patches, one fixing each issue.

Could you send an updated version, split into multiple patches ?

Thanks!

Thomas

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

PATCH 1/1 package/systemd: update user generation

Am Mo., 13. Jan. 2020 um 17:01 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 19 lines

Hello Norbert,

Quoted 13 lines · On Mon, 13 Jan 2020 16:34:15 +0100 Norbert Lange <[email protected]> wrote:

since V235 the "gateway" and "upload" services use DynamicUsers, requiring no entries in /etc/passwd.
This functionality requires option nss-systemd, which is always enabled in buildroot.

the "bus-proxy" user was removed in V244.

thre "remote" user will now only be generated if the feature is enabled.

Description is matched to the ones in the upstream sysusers.d files. home is set to /run/systemd.

Quoted 7 lines
Quoted 1 line

Thanks for your patch. However, it fixes numerous different problems, and as such, should be split into several patches, one fixing each issue.

Could you send an updated version, split into multiple patches ?

There are alot ways to split them?
Is this enough, or do you need more splits:

first 3 points
description
home

the home part is actually a bit of a nuisance, as mkusers then creates the folder /run/systemd and it ends up in the image.
I would have another patch to clean out /run before running the image creation command.

Norbert

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com