[OE-core] [PATCH] avahi: fix useradd race condition

Koen Kooi koen at dominion.thruhere.net
Thu Nov 3 13:04:48 UTC 2011


Op 3 nov. 2011, om 13:57 heeft Koen Kooi het volgende geschreven:

> Avahi doesn't work at boot because of:
> 
> + sh /OE/../rootfs/var/lib/opkg/info/avahi-daemon.preinst
> Running useradd commands...
> grep: /OE/../rootfs/etc/passwd: No such file or directory
> 
> That is due to:
> 
> Package: avahi-daemon
> Version: 0.6.30-r9.0
> [..]
> Depends: libavahi-core7 (>= 0.6.30), libdaemon0 (>= 0.14), libcap2 (>= 2.22), libavahi-common3 (>= 0.6.30), libdbus-1-3 (>= 1.4.12), sysvinit-pidof, libc6 (>= 2.12), libexpat1 (>= 2.0.1)
> 
> After this patch:
> 
> Package: avahi-daemon
> Version: 0.6.30-r10.0
> [..]
> Depends: libavahi-core7 (>= 0.6.30), libdaemon0 (>= 0.14), libcap2 (>= 2.22), libavahi-common3 (>= 0.6.30), libdbus-1-3 (>= 1.4.12), sysvinit-pidof, libc6 (>= 2.12), shadow, libexpat1 (>= 2.0.1), base-passwd
> 
> This also changes ${PN}-daemon to avahi-daemon to be consistent with the PACKAGES/FILES lines below
> 
> Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
> ---
> meta/recipes-connectivity/avahi/avahi.inc |    7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
> index 79cfd73..728c38f 100644
> --- a/meta/recipes-connectivity/avahi/avahi.inc
> +++ b/meta/recipes-connectivity/avahi/avahi.inc
> @@ -14,7 +14,7 @@ SECTION = "network"
> # python scripts are under GPLv2+
> LICENSE = "GPLv2+ & LGPLv2.1+"
> 
> -INC_PR = "r9"
> +INC_PR = "r10"
> 
> DEPENDS = "expat libcap libdaemon dbus glib-2.0"
> 
> @@ -23,8 +23,9 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
>           file://99avahi-autoipd \
>           file://initscript.patch"
> 
> -USERADD_PACKAGES = "${PN}-daemon"
> -USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
> +USERADDPN = "avahi-daemon"

My gut feeling is that useradd.bbclass should add the RDEPENDS in its pythoncode instead of relying on people to set both USERADD_PACKAGES and USERADDPN to the same value.

regards,

Koen.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111103/594dc76b/attachment-0002.sig>


More information about the Openembedded-core mailing list