Skip to contentSkip to conversation

Fixes and improvements from O.S. Systems

PATCH In review Otavio Salvador 5 participants 14 messages Oct 21, 2011

lore
Share & tools
lore
#0 lore raw

cover Fixes and improvements from O.S. Systems

The following changes since commit 99da9a4e65f9dffb04efc3ad60125194c476d6b3:

distro-tracking-fields: update fields for tzdata and gst-plugins-good (2011-10-20 13:07:16 +0100)

are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (4):
bootimg.bbclass: add support to disable HDD image building useradd.bbclass: check if a group already exists manually
base-passwd: move initial criation of group and passwd to preinst
dbus: use useradd class to allow use in read-only filesystems

 meta/classes/bootimg.bbclass                       |   44 +++++++++---------
 meta/classes/useradd.bbclass                       |    8 +++-
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |    4 +-
 meta/recipes-core/dbus/dbus.inc                    |   48 +++++++++-----------
 4 files changed, 53 insertions(+), 51 deletions(-)
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/4 bootimg.bbclass: add support to disable HDD image building

---
 meta/classes/bootimg.bbclass |   44 +++++++++++++++++++++--------------------
 1 files changed, 23 insertions(+), 21 deletions(-)
meta/classes/bootimg.bbclass +23 -21
index a5ba3cf..eecc2bf 100644
@@ -48,34 +48,36 @@ SYSLINUXMENU = "${HDDDIR}/menu"
 inherit syslinux
 		
 build_boot_bin() {
-	install -d ${HDDDIR}
-	install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
-	${HDDDIR}/vmlinuz
+	# Create an HDD image
+	if [ "${NOHDD}" != "1" ] ; then
+		install -d ${HDDDIR}
+		install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
+		${HDDDIR}/vmlinuz
 
-	if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 
-    		install -m 0644 ${INITRD} ${HDDDIR}/initrd
-	fi
+		if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
+				install -m 0644 ${INITRD} ${HDDDIR}/initrd
+		fi
 
-	if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then 
-    		install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img
-	fi
+		if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
+				install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img
+		fi
 
-	install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+		install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
 
-	# Do a little math, bash style
-	#BLOCKS=`du -s ${HDDDIR} | cut -f 1`
-	BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
-	SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`	
+		# Do a little math, bash style
+		BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
+		SIZE=`expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}`
 
-	mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
-	-C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE 
+		mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
+		-C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE
 
-	syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-	chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+		syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+		chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
 
-	cd ${DEPLOY_DIR_IMAGE}
-	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
-	ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+		cd ${DEPLOY_DIR_IMAGE}
+		rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+		ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+	fi
 	
 	#Create an ISO if we have an INITRD
 	if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then
Signature · 1 line
1.7.2.5
#2 lore raw

Re: [PATCH 1/4] bootimg.bbclass: add support to disable HDD image building

Quoted 12 lines · Otavio Salvador

---
 meta/classes/bootimg.bbclass |   44 +++++++++++++++++++++--------------------

 1 files changed, 23 insertions(+), 21 deletions(-)
meta/classes/bootimg.bbclass +0 -0
index a5ba3cf..eecc2bf 100644
@@ -48,34 +48,36 @@ SYSLINUXMENU = "${HDDDIR}/menu"

 inherit syslinux

Quoted 6 lines

 build_boot_bin() {
-       install -d ${HDDDIR}
-       install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
-       ${HDDDIR}/vmlinuz
+       # Create an HDD image
+       if [ "${NOHDD}" != "1" ] ; then

please document this new variable NOHDD somewhere so people know how and when to use it

Quoted 58 lines

+               install -d ${HDDDIR}
+               install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
+               ${HDDDIR}/vmlinuz

-       if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
-               install -m 0644 ${INITRD} ${HDDDIR}/initrd
-       fi
+               if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
+                               install -m 0644 ${INITRD} ${HDDDIR}/initrd
+               fi

-       if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
-               install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img
-       fi
+               if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
+                               install -m 0644 ${ROOTFS} ${HDDDIR}/rootfs.img
+               fi

-       install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+               install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys

-       # Do a little math, bash style
-       #BLOCKS=du -s ${HDDDIR} | cut -f 1
-       BLOCKS=du -bks ${HDDDIR} | cut -f 1
-       SIZE=expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}
+               # Do a little math, bash style
+               BLOCKS=du -bks ${HDDDIR} | cut -f 1
+               SIZE=expr $BLOCKS + ${BOOTIMG_EXTRA_SPACE}

-       mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
-       -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE
+               mkdosfs -n ${BOOTIMG_VOLUME_ID} -d ${HDDDIR} \
+               -C ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg $SIZE

-       syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-       chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+               syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+               chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg

-       cd ${DEPLOY_DIR_IMAGE}
-       rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
-       ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+               cd ${DEPLOY_DIR_IMAGE}
+               rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+               ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
+       fi

       #Create an ISO if we have an INITRD
       if [ -n "${INITRD}" ] && [ -s "${INITRD}" ] && [ "${NOISO}" != "1" ] ; then --
1.7.2.5

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#3 lore raw

Re: [PATCH 1/4] bootimg.bbclass: add support to disable HDD image building

Quoted 14 lines · Khem Raj
Quoted 12 lines · Otavio Salvador

---
 meta/classes/bootimg.bbclass |   44 +++++++++++++++++++++--------------------

 1 files changed, 23 insertions(+), 21 deletions(-)
meta/classes/bootimg.bbclass +0 -0
index a5ba3cf..eecc2bf 100644
@@ -48,34 +48,36 @@ SYSLINUXMENU = "${HDDDIR}/menu"

 inherit syslinux

Quoted 9 lines
Quoted 6 lines

 build_boot_bin() {
-       install -d ${HDDDIR}
-       install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
-       ${HDDDIR}/vmlinuz
+       # Create an HDD image
+       if [ "${NOHDD}" != "1" ] ; then

please document this new variable NOHDD somewhere so people know how and when to use it

What do you suggests.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#4 lore raw

Re: [PATCH 1/4] bootimg.bbclass: add support to disable HDD image building

Quoted 25 lines · Otavio Salvador
Quoted 14 lines · Khem Raj
Quoted 12 lines · Otavio Salvador

---
 meta/classes/bootimg.bbclass |   44 +++++++++++++++++++++--------------------

 1 files changed, 23 insertions(+), 21 deletions(-)
meta/classes/bootimg.bbclass +0 -0
index a5ba3cf..eecc2bf 100644
@@ -48,34 +48,36 @@ SYSLINUXMENU = "${HDDDIR}/menu"

 inherit syslinux

Quoted 9 lines
Quoted 6 lines

 build_boot_bin() {
-       install -d ${HDDDIR}
-       install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage \
-       ${HDDDIR}/vmlinuz
+       # Create an HDD image
+       if [ "${NOHDD}" != "1" ] ; then

please document this new variable NOHDD somewhere so people know how and when to use it

Quoted 1 line

What do you suggests.

Either OE manual or local.conf.sample.extended may be

Quoted 11 lines

--
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#5 lore raw

PATCH 2/4 useradd.bbclass: check if a group already exists manually

In reply to Otavio Salvador

The use of groupadd -f makes much more difficult to figure when a group is not add. This was the case of the class not working for our usage and this being caused by the lack of '/etc/group' file but unnoticed as groupadd wasn't failing according.

---
 meta/classes/useradd.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
meta/classes/useradd.bbclass +7 -1
index 1e03a04..fb70b3e 100644
@@ -37,7 +37,13 @@ if test "x$GROUPADD_PARAM" != "x"; then
 	opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1`
 	remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
 	while test "x$opts" != "x"; do
-		eval $PSEUDO groupadd -f $OPT $opts
+		groupname=`echo "$opts" | awk '{ print $NF }'`
+		group_exists=`grep "^$groupname:" $SYSROOT/etc/group || true`
+		if test "x$group_exists" = "x"; then
+			eval $PSEUDO groupadd  $OPT $opts
+		else
+			echo "Note: group $groupname already exists, not re-creating it"
+		fi
 
 		if test "x$opts" = "x$remaining"; then
 			break
Signature · 1 line
1.7.2.5
Acked-by on v1 2/4
#6 lore raw

Re: [PATCH 2/4] useradd.bbclass: check if a group already exists manually

Quoted 6 lines · Otavio Salvador

The use of groupadd -f makes much more difficult to figure when a group is not add. This was the case of the class not working for our usage and this being caused by the lack of '/etc/group' file but unnoticed as groupadd wasn't failing according.

Thanks for getting to the bottom of this!

Quoted 23 lines
---
  meta/classes/useradd.bbclass |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)
meta/classes/useradd.bbclass +7 -1
index 1e03a04..fb70b3e 100644
@@ -37,7 +37,13 @@ if test "x$GROUPADD_PARAM" != "x"; then
  	opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1`
  	remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
  	while test "x$opts" != "x"; do
-		eval $PSEUDO groupadd -f $OPT $opts
+		groupname=`echo "$opts" | awk '{ print $NF }'`
+		group_exists=`grep "^$groupname:" $SYSROOT/etc/group || true`
+		if test "x$group_exists" = "x"; then
+			eval $PSEUDO groupadd  $OPT $opts
+		else
+			echo "Note: group $groupname already exists, not re-creating it"
+		fi
 
  		if test "x$opts" = "x$remaining"; then
  			break
Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#7 lore raw

PATCH 3/4 base-passwd: move initial criation of group and passwd to preinst

In reply to Otavio Salvador

To allow use and manipulation of users and groups at rootfs building time, the '/etc/passwd' and '/etc/group' needs to be available as soon as possible.

---
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +2 -2
index 137512d..9f81ba3 100644
@@ -1,7 +1,7 @@
 SUMMARY = "Base system master password/group files."
 DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group).  The update-passwd tool is also provided to keep the system databases synchronized with these master files."
 SECTION = "base"
-PR = "r3"
+PR = "r4"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
 
@@ -37,7 +37,7 @@ do_install () {
 	install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/
 }
 
-pkg_postinst_${PN} () {
+pkg_preinst_${PN} () {
 	set -e
 
 	if [ ! -e $D${sysconfdir}/passwd ] ; then
Signature · 1 line
1.7.2.5
Acked-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] base-passwd: move initial criation of group and passwd to preinst

Quoted 5 lines · Otavio Salvador

To allow use and manipulation of users and groups at rootfs building time, the '/etc/passwd' and '/etc/group' needs to be available as soon as possible.

Quoted 26 lines
---
  .../recipes-core/base-passwd/base-passwd_3.5.22.bb |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +2 -2
index 137512d..9f81ba3 100644
@@ -1,7 +1,7 @@
  SUMMARY = "Base system master password/group files."
  DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group).  The update-passwd tool is also provided to keep the system databases synchronized with these master files."
  SECTION = "base"
-PR = "r3"
+PR = "r4"
  LICENSE = "GPLv2+"
  LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
 
@@ -37,7 +37,7 @@ do_install () {
  	install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/
  }
 
-pkg_postinst_${PN} () {
+pkg_preinst_${PN} () {
  	set -e
 
  	if [ ! -e $D${sysconfdir}/passwd ] ; then
Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#9 lore raw

Re: [PATCH 3/4] base-passwd: move initial criation of group and passwd to preinst

In reply to Otavio Salvador

meta/recipes-core/base-passwd/base-passwd_3.5.22.bb do_install () { · line 43

Quoted 9 lines · Otavio Salvador
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +1 -1
@@ -37,7 +37,7 @@ do_install () {
 	install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/
 }
 
-pkg_postinst_${PN} () {
+pkg_preinst_${PN} () {
 	set -e
 
 	if [ ! -e $D${sysconfdir}/passwd ] ; then

Doesn't this break on-target installs (or, more generally, installs where preinst runs before unpacking)?

p.

#10 lore raw

Re: [PATCH 3/4] base-passwd: move initial criation of group and passwd to preinst

Quoted 5 lines · Phil Blundell
Quoted 4 lines · Otavio Salvador
(quoted diff) +0 -0
@@ -37,7 +37,7 @@ do_install () {

      install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/ }

Quoted 8 lines
Quoted 5 lines
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +1 -1
-pkg_postinst_${PN} () {
+pkg_preinst_${PN} () {

      set -e

      if [ ! -e $D${sysconfdir}/passwd ] ; then

Doesn't this break on-target installs (or, more generally, installs where preinst runs before unpacking)?

It does indeed. I will fix it and send a new patch for it.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#11 lore raw

PATCH 4/4 dbus: use useradd class to allow use in read-only filesystems

In reply to Otavio Salvador

Move creation of required user/groups to useradd class thus allowing use with read-only filesystems and booting the initial boot.

---
 meta/recipes-core/dbus/dbus.inc |   48 +++++++++++++++++----------------------
 1 files changed, 21 insertions(+), 27 deletions(-)
meta/recipes-core/dbus/dbus.inc +21 -27
index a8ecda8..2a97c02 100644
@@ -10,15 +10,22 @@ DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X
 DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
 DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11"
 
+PR = "r1"
+
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch; \
            file://dbus-1.init"
 
-inherit autotools pkgconfig gettext update-rc.d
+inherit useradd autotools pkgconfig gettext update-rc.d
 
 INITSCRIPT_NAME = "dbus-1"
 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
 
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+                       --no-create-home --user-group messagebus"
+
 CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
 
 DEBIANNAME_${PN} = "dbus-1"
@@ -44,32 +51,7 @@ RRECOMMENDS_${PN}-lib = "${PN}"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
 
 pkg_postinst_dbus() {
-	# can't do adduser stuff offline
-	if [ "x$D" != "x" ]; then
-		exit 1
-	fi
-
-	MESSAGEUSER=messagebus
-	MESSAGEHOME=/var/run/dbus
-	UUIDDIR=/var/lib/dbus
-
-	mkdir -p $MESSAGEHOME
-	mkdir -p $UUIDDIR
-	chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
-	chown "$MESSAGEUSER":"$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
-		adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
-			--ingroup "$MESSAGEUSER" "$MESSAGEUSER"
-
-	chown "$MESSAGEUSER":"$MESSAGEUSER" "$UUIDDIR"
-
-	grep -q netdev: /etc/group || addgroup netdev
-
-	chown root:"$MESSAGEUSER" /usr/libexec/dbus-daemon-launch-helper
-	chmod 4754 /usr/libexec/dbus-daemon-launch-helper
-
-	# add volatile after new user/grp are created
-	echo "d messagebus messagebus 0755 /var/run/dbus none" > /etc/default/volatiles/99_dbus
-	if [ -e /etc/init.d/populate-volatile.sh ] ; then
+	if [ -z "${D}" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
 		/etc/init.d/populate-volatile.sh update
 	fi
 }
@@ -92,6 +74,18 @@ do_install() {
 	install -d ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
 
+	install -d ${D}${sysconfdir}/default/volatiles
+	echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+	     > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+	mkdir -p ${D}${localstatedir}/run/dbus ${D}${localstatedir}/lib/dbus
+
+	chown messagebus:messagebus ${D}${localstatedir}/run/dbus ${D}${localstatedir}/lib/dbus
+
+	chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+	chmod 4754 ${D}${libexecdir}/dbus-daemon-launch-helper
+
 	# disable dbus-1 sysv script on systemd installs
 	# nearly all distros call the initscript plain 'dbus', but OE-core is different
 	ln -sf /dev/null ${D}/${base_libdir}/systemd/system/dbus-1.service
Signature · 1 line
1.7.2.5
#12 lore raw

Re: [PATCH 4/4] dbus: use useradd class to allow use in read-only filesystems

meta/recipes-core/dbus/dbus.inc DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X · line 27

Quoted 4 lines · Otavio Salvador
meta/recipes-core/dbus/dbus.inc +4 -0
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+                       --no-create-home --user-group messagebus"

Why does dbus need "netdev"?

p.

#13 lore raw

Re: [PATCH 4/4] dbus: use useradd class to allow use in read-only filesystems

Op 21 okt. 2011, om 08:54 heeft Phil Blundell het volgende geschreven:

Quoted 7 lines · Otavio Salvador

meta/recipes-core/dbus/dbus.inc DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X · line 27

Quoted 4 lines
meta/recipes-core/dbus/dbus.inc +4 -0
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+                       --no-create-home --user-group messagebus"

Why does dbus need "netdev"?

A little digging on the internet shows that some applications using dbus use netdev and as a result dbus will complain about a missing netdev group. Dbus itself doesn't seem to need it. A handfull of searchresults imply that not dbus but e.g. networkmanager and wpa-supplicant should create the group, but:

root@beagleboard:/etc/dbus-1/system.d# ls
ConsoleKit.conf           org.freedesktop.PolicyKit1.conf
NetworkManager.conf       org.freedesktop.UDisks.conf
avahi-dbus.conf           org.freedesktop.UPower.conf
bluetooth.conf            org.freedesktop.hostname1.conf
dbus-wpa_supplicant.conf  org.freedesktop.locale1.conf
gdm.conf                  org.freedesktop.login1.conf
nm-avahi-autoipd.conf     org.freedesktop.systemd1.conf
nm-dhcp-client.conf       org.freedesktop.timedate1.conf
nm-dispatcher.conf        org.gnome.GConf.Defaults.conf
root@beagleboard:/etc/dbus-1/system.d# grep netdev *
root@beagleboard:/etc/dbus-1/system.d# 

So it seems (but I am not certain!) that netdev is a relic of the past and can go away. What I would propose:

1) convert the existing *inst to useradd.bbclass
2) bump PR, remove netdev

That should give us a nice bisectable stack of commits.

regards,

Koen