* [Pull v3 0/4] Add User Fixes
@ 2011-11-02 0:21 Saul Wold
2011-11-02 0:21 ` [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon Saul Wold
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Saul Wold @ 2011-11-02 0:21 UTC (permalink / raw)
To: openembedded-core
Richard,
Hope that third times the charm!
Fixes 1699, additional commit comments, fixed whitespace.
Sau!
The following changes since commit d0a2c87d068f2d769d47c8455bb1434b90a7a844:
Fix HOMEPAGE values in libzypp and sat-solver .bb files (2011-11-01 18:28:06 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib sgw/fix
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/fix
Saul Wold (4):
avahi: use useradd to create avahi user for avahi-daemon
xserver-nodm-init: Use useradd to add the xuser for rootless X
connman: Use useradd to add the xuser for DBus
dbus: ensure that the useradd shell is set to /bin/false
meta/recipes-connectivity/avahi/avahi.inc | 16 ++++++-----
meta/recipes-connectivity/connman/connman.inc | 7 ++++-
meta/recipes-connectivity/connman/connman_0.75.bb | 2 +-
meta/recipes-core/dbus/dbus.inc | 3 +-
.../x11-common/xserver-nodm-init.bb | 28 +++++++------------
5 files changed, 28 insertions(+), 28 deletions(-)
--
1.7.6.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
@ 2011-11-02 0:21 ` Saul Wold
2011-11-03 12:23 ` Koen Kooi
2011-11-02 0:21 ` [Pull v3 2/4] xserver-nodm-init: Use useradd to add the xuser for rootless X Saul Wold
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Saul Wold @ 2011-11-02 0:21 UTC (permalink / raw)
To: openembedded-core
DBus was failing to start correct since the avahi user was
not setup.
Keep the dbus reload since this could still be installed
as a package an would require a dbus restart.
Fixes: [YOCTO #1699]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/recipes-connectivity/avahi/avahi.inc | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 5ad9db0..79cfd73 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 = "r8"
+INC_PR = "r9"
DEPENDS = "expat libcap libdaemon dbus glib-2.0"
@@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
file://99avahi-autoipd \
file://initscript.patch"
-inherit autotools pkgconfig update-rc.d gettext
+USERADD_PACKAGES = "${PN}-daemon"
+USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
+ --no-create-home --shell /bin/false \
+ --user-group avahi"
+
+inherit autotools pkgconfig update-rc.d gettext useradd
EXTRA_OECONF = "--with-distro=debian \
--disable-introspection \
@@ -116,15 +121,12 @@ do_install_avahi-autoipd() {
install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
}
-# At the time the postinst runs, dbus might not be setup so only restart if running
+# At the time the postinst runs, dbus might not be setup so only restart if running
pkg_postinst_avahi-daemon () {
- # can't do this offline
if [ "x$D" != "x" ]; then
- exit 1
+ exit 0
fi
- grep "^avahi:" /etc/group > /dev/null || addgroup avahi
- grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
DBUSPID=`pidof dbus-daemon`
--
1.7.6.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Pull v3 2/4] xserver-nodm-init: Use useradd to add the xuser for rootless X
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
2011-11-02 0:21 ` [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon Saul Wold
@ 2011-11-02 0:21 ` Saul Wold
2011-11-02 0:21 ` [Pull v3 3/4] connman: Use useradd to add the xuser for DBus Saul Wold
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Saul Wold @ 2011-11-02 0:21 UTC (permalink / raw)
To: openembedded-core
This also address an issue with dbus and connman, since connmand
needs to start as the xuser in the rootless X situation.
Fixes: [YOCTO #1699]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
.../x11-common/xserver-nodm-init.bb | 28 +++++++------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
index ea4222d..dbc1c42 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SECTION = "x11"
-PR = "r26"
+PR = "r28"
RDEPENDS_${PN} = "sudo"
SRC_URI = "file://xserver-nodm \
@@ -23,23 +23,15 @@ do_install() {
fi
}
-pkg_postinst_${PN} () {
- if [ "x$D" != "x" ] ; then
- exit 1
- fi
-
- if [ -f /etc/X11/Xusername ]; then
- # create the rootless X user, and add user to group tty, video, audio
- username=`cat /etc/X11/Xusername`
- adduser --disabled-password $username
- # FIXME: use addgroup if busybox addgroup is ready
- sed -i -e "s/^video:.*/&${username}/g" /etc/group
- sed -i -e "s/^tty:.*/&${username}/g" /etc/group
- sed -i -e "s/^audio:.*/&${username}/g" /etc/group
- fi
-}
-
-inherit update-rc.d
+inherit update-rc.d useradd
INITSCRIPT_NAME = "xserver-nodm"
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+
+# Use fixed Xusername of xuser for now, this will need to be
+# fixed if the Xusername changes from xuser
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home \
+ --shell /bin/false --groups video,tty,audio \
+ --user-group xuser"
+
--
1.7.6.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Pull v3 3/4] connman: Use useradd to add the xuser for DBus
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
2011-11-02 0:21 ` [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon Saul Wold
2011-11-02 0:21 ` [Pull v3 2/4] xserver-nodm-init: Use useradd to add the xuser for rootless X Saul Wold
@ 2011-11-02 0:21 ` Saul Wold
2011-11-02 0:21 ` [Pull v3 4/4] dbus: ensure that the useradd shell is set to /bin/false Saul Wold
2011-11-02 8:21 ` [Pull v3 0/4] Add User Fixes Richard Purdie
4 siblings, 0 replies; 11+ messages in thread
From: Saul Wold @ 2011-11-02 0:21 UTC (permalink / raw)
To: openembedded-core
Connmand needs to start as the xuser as defined in the dbus
configuration and needs to share this with rootless X. Since
it's possible for connmand to run on a sytem without rootless
X we still need to create the user here.
Useradd will fail gracefully if the user already exists.
Fixes: [YOCTO #1699]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/recipes-connectivity/connman/connman.inc | 7 ++++++-
meta/recipes-connectivity/connman/connman_0.75.bb | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index ae1b725..480b59c 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -18,7 +18,12 @@ DEPENDS = "libgdbus dbus glib-2.0 iptables"
INITSCRIPT_NAME = "connman"
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
-inherit autotools pkgconfig update-rc.d
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home \
+ --shell /bin/false --groups video,tty,audio \
+ --user-group xuser"
+
+inherit autotools pkgconfig update-rc.d useradd
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
diff --git a/meta/recipes-connectivity/connman/connman_0.75.bb b/meta/recipes-connectivity/connman/connman_0.75.bb
index 8a02753..78f2199 100644
--- a/meta/recipes-connectivity/connman/connman_0.75.bb
+++ b/meta/recipes-connectivity/connman/connman_0.75.bb
@@ -1,5 +1,5 @@
require connman.inc
-PR = "r2"
+PR = "r3"
EXTRA_OECONF += "\
ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
--
1.7.6.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Pull v3 4/4] dbus: ensure that the useradd shell is set to /bin/false
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
` (2 preceding siblings ...)
2011-11-02 0:21 ` [Pull v3 3/4] connman: Use useradd to add the xuser for DBus Saul Wold
@ 2011-11-02 0:21 ` Saul Wold
2011-11-02 8:21 ` [Pull v3 0/4] Add User Fixes Richard Purdie
4 siblings, 0 replies; 11+ messages in thread
From: Saul Wold @ 2011-11-02 0:21 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/recipes-core/dbus/dbus.inc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 5028310..caa781c 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -22,7 +22,8 @@ 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"
+ --no-create-home --shell /bin/false \
+ --user-group messagebus"
CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Pull v3 0/4] Add User Fixes
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
` (3 preceding siblings ...)
2011-11-02 0:21 ` [Pull v3 4/4] dbus: ensure that the useradd shell is set to /bin/false Saul Wold
@ 2011-11-02 8:21 ` Richard Purdie
4 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2011-11-02 8:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-11-01 at 17:21 -0700, Saul Wold wrote:
> Richard,
>
> Hope that third times the charm!
>
> Fixes 1699, additional commit comments, fixed whitespace.
>
> Sau!
>
>
> The following changes since commit d0a2c87d068f2d769d47c8455bb1434b90a7a844:
>
> Fix HOMEPAGE values in libzypp and sat-solver .bb files (2011-11-01 18:28:06 +0000)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib sgw/fix
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/fix
>
> Saul Wold (4):
> avahi: use useradd to create avahi user for avahi-daemon
> xserver-nodm-init: Use useradd to add the xuser for rootless X
> connman: Use useradd to add the xuser for DBus
> dbus: ensure that the useradd shell is set to /bin/false
Thanks for the tweaks, merged to master.
Cheers,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-02 0:21 ` [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon Saul Wold
@ 2011-11-03 12:23 ` Koen Kooi
2011-11-03 12:38 ` Koen Kooi
2011-11-03 12:39 ` Richard Purdie
0 siblings, 2 replies; 11+ messages in thread
From: Koen Kooi @ 2011-11-03 12:23 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]
Op 2 nov. 2011, om 01:21 heeft Saul Wold het volgende geschreven:
> DBus was failing to start correct since the avahi user was
> not setup.
>
> Keep the dbus reload since this could still be installed
> as a package an would require a dbus restart.
This doesn't seem to work for me, I keep getting "Unknown username 'avahi' in message bus configuration file"
>
> Fixes: [YOCTO #1699]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta/recipes-connectivity/avahi/avahi.inc | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
> index 5ad9db0..79cfd73 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 = "r8"
> +INC_PR = "r9"
>
> DEPENDS = "expat libcap libdaemon dbus glib-2.0"
>
> @@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
> file://99avahi-autoipd \
> file://initscript.patch"
>
> -inherit autotools pkgconfig update-rc.d gettext
> +USERADD_PACKAGES = "${PN}-daemon"
> +USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
> + --no-create-home --shell /bin/false \
> + --user-group avahi"
> +
> +inherit autotools pkgconfig update-rc.d gettext useradd
>
> EXTRA_OECONF = "--with-distro=debian \
> --disable-introspection \
> @@ -116,15 +121,12 @@ do_install_avahi-autoipd() {
> install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
> }
>
> -# At the time the postinst runs, dbus might not be setup so only restart if running
> +# At the time the postinst runs, dbus might not be setup so only restart if running
>
> pkg_postinst_avahi-daemon () {
> - # can't do this offline
> if [ "x$D" != "x" ]; then
> - exit 1
> + exit 0
> fi
Removing that check completely would be a better idea :)
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-03 12:23 ` Koen Kooi
@ 2011-11-03 12:38 ` Koen Kooi
2011-11-03 12:40 ` Koen Kooi
2011-11-03 12:39 ` Richard Purdie
1 sibling, 1 reply; 11+ messages in thread
From: Koen Kooi @ 2011-11-03 12:38 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]
Op 3 nov. 2011, om 13:23 heeft Koen Kooi het volgende geschreven:
>
> Op 2 nov. 2011, om 01:21 heeft Saul Wold het volgende geschreven:
>
>> DBus was failing to start correct since the avahi user was
>> not setup.
>>
>> Keep the dbus reload since this could still be installed
>> as a package an would require a dbus restart.
>
> This doesn't seem to work for me, I keep getting "Unknown username 'avahi' in message bus configuration file"
Manually running the preinst on the target *does* work, so something isn't right during do_rootfs.
regards,
Koen
>
>
>>
>> Fixes: [YOCTO #1699]
>>
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>> meta/recipes-connectivity/avahi/avahi.inc | 16 +++++++++-------
>> 1 files changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
>> index 5ad9db0..79cfd73 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 = "r8"
>> +INC_PR = "r9"
>>
>> DEPENDS = "expat libcap libdaemon dbus glib-2.0"
>>
>> @@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
>> file://99avahi-autoipd \
>> file://initscript.patch"
>>
>> -inherit autotools pkgconfig update-rc.d gettext
>> +USERADD_PACKAGES = "${PN}-daemon"
>> +USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
>> + --no-create-home --shell /bin/false \
>> + --user-group avahi"
>> +
>> +inherit autotools pkgconfig update-rc.d gettext useradd
>>
>> EXTRA_OECONF = "--with-distro=debian \
>> --disable-introspection \
>> @@ -116,15 +121,12 @@ do_install_avahi-autoipd() {
>> install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
>> }
>>
>> -# At the time the postinst runs, dbus might not be setup so only restart if running
>> +# At the time the postinst runs, dbus might not be setup so only restart if running
>>
>> pkg_postinst_avahi-daemon () {
>> - # can't do this offline
>> if [ "x$D" != "x" ]; then
>> - exit 1
>> + exit 0
>> fi
>
> Removing that check completely would be a better idea :)
>
> regards,
>
> Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-03 12:23 ` Koen Kooi
2011-11-03 12:38 ` Koen Kooi
@ 2011-11-03 12:39 ` Richard Purdie
2011-11-03 12:49 ` Koen Kooi
1 sibling, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2011-11-03 12:39 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, 2011-11-03 at 13:23 +0100, Koen Kooi wrote:
> Op 2 nov. 2011, om 01:21 heeft Saul Wold het volgende geschreven:
>
> > DBus was failing to start correct since the avahi user was
> > not setup.
> >
> > Keep the dbus reload since this could still be installed
> > as a package an would require a dbus restart.
>
> This doesn't seem to work for me, I keep getting "Unknown username
> 'avahi' in message bus configuration file"
From where? On target device upgrade? do_rootfs? populate_sysroot? More
info would be useful here.
> > Fixes: [YOCTO #1699]
> >
> > Signed-off-by: Saul Wold <sgw@linux.intel.com>
> > ---
> > meta/recipes-connectivity/avahi/avahi.inc | 16 +++++++++-------
> > 1 files changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
> > index 5ad9db0..79cfd73 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 = "r8"
> > +INC_PR = "r9"
> >
> > DEPENDS = "expat libcap libdaemon dbus glib-2.0"
> >
> > @@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
> > file://99avahi-autoipd \
> > file://initscript.patch"
> >
> > -inherit autotools pkgconfig update-rc.d gettext
> > +USERADD_PACKAGES = "${PN}-daemon"
> > +USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
> > + --no-create-home --shell /bin/false \
> > + --user-group avahi"
> > +
> > +inherit autotools pkgconfig update-rc.d gettext useradd
> >
> > EXTRA_OECONF = "--with-distro=debian \
> > --disable-introspection \
> > @@ -116,15 +121,12 @@ do_install_avahi-autoipd() {
> > install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
> > }
> >
> > -# At the time the postinst runs, dbus might not be setup so only restart if running
> > +# At the time the postinst runs, dbus might not be setup so only restart if running
> >
> > pkg_postinst_avahi-daemon () {
> > - # can't do this offline
> > if [ "x$D" != "x" ]; then
> > - exit 1
> > + exit 0
> > fi
>
> Removing that check completely would be a better idea :)
No it wouldn't, if we're installing this at do_rootfs time, we can just
mark the postinstall as done.
Cheers,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-03 12:38 ` Koen Kooi
@ 2011-11-03 12:40 ` Koen Kooi
0 siblings, 0 replies; 11+ messages in thread
From: Koen Kooi @ 2011-11-03 12:40 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
Op 3 nov. 2011, om 13:38 heeft Koen Kooi het volgende geschreven:
>
> Op 3 nov. 2011, om 13:23 heeft Koen Kooi het volgende geschreven:
>
>>
>> Op 2 nov. 2011, om 01:21 heeft Saul Wold het volgende geschreven:
>>
>>> DBus was failing to start correct since the avahi user was
>>> not setup.
>>>
>>> Keep the dbus reload since this could still be installed
>>> as a package an would require a dbus restart.
>>
>> This doesn't seem to work for me, I keep getting "Unknown username 'avahi' in message bus configuration file"
>
> Manually running the preinst on the target *does* work, so something isn't right during do_rootfs.
+ sh /OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/systemd-image-1.0-r0/rootfs/var/lib/opkg/info/avahi-daemon.preinst
Running useradd commands...
grep: /OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/systemd-image-1.0-r0/rootfs/etc/passwd: No such file or directory
useradd: group '1000' does not exist
useradd: the GROUP= configuration in /etc/default/useradd will be ignored
useradd: user 'avahi' already exists
I think I know what's going wrong, patch coming soon!
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon
2011-11-03 12:39 ` Richard Purdie
@ 2011-11-03 12:49 ` Koen Kooi
0 siblings, 0 replies; 11+ messages in thread
From: Koen Kooi @ 2011-11-03 12:49 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 3274 bytes --]
Op 3 nov. 2011, om 13:39 heeft Richard Purdie het volgende geschreven:
> On Thu, 2011-11-03 at 13:23 +0100, Koen Kooi wrote:
>> Op 2 nov. 2011, om 01:21 heeft Saul Wold het volgende geschreven:
>>
>>> DBus was failing to start correct since the avahi user was
>>> not setup.
>>>
>>> Keep the dbus reload since this could still be installed
>>> as a package an would require a dbus restart.
>>
>> This doesn't seem to work for me, I keep getting "Unknown username
>> 'avahi' in message bus configuration file"
>
> From where? On target device upgrade? do_rootfs? populate_sysroot? More
> info would be useful here.
On target device boot. I've narrowed it down to an RDEPENDS problem, I'm working out the correct cycle of _append and += now
The basic problem:
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)
No 'base-passwd' in there.
>
>>> Fixes: [YOCTO #1699]
>>>
>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>> ---
>>> meta/recipes-connectivity/avahi/avahi.inc | 16 +++++++++-------
>>> 1 files changed, 9 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
>>> index 5ad9db0..79cfd73 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 = "r8"
>>> +INC_PR = "r9"
>>>
>>> DEPENDS = "expat libcap libdaemon dbus glib-2.0"
>>>
>>> @@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
>>> file://99avahi-autoipd \
>>> file://initscript.patch"
>>>
>>> -inherit autotools pkgconfig update-rc.d gettext
>>> +USERADD_PACKAGES = "${PN}-daemon"
>>> +USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \
>>> + --no-create-home --shell /bin/false \
>>> + --user-group avahi"
>>> +
>>> +inherit autotools pkgconfig update-rc.d gettext useradd
>>>
>>> EXTRA_OECONF = "--with-distro=debian \
>>> --disable-introspection \
>>> @@ -116,15 +121,12 @@ do_install_avahi-autoipd() {
>>> install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
>>> }
>>>
>>> -# At the time the postinst runs, dbus might not be setup so only restart if running
>>> +# At the time the postinst runs, dbus might not be setup so only restart if running
>>>
>>> pkg_postinst_avahi-daemon () {
>>> - # can't do this offline
>>> if [ "x$D" != "x" ]; then
>>> - exit 1
>>> + exit 0
>>> fi
>>
>> Removing that check completely would be a better idea :)
>
> No it wouldn't, if we're installing this at do_rootfs time, we can just
> mark the postinstall as done.
>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-11-03 12:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-02 0:21 [Pull v3 0/4] Add User Fixes Saul Wold
2011-11-02 0:21 ` [Pull v3 1/4] avahi: use useradd to create avahi user for avahi-daemon Saul Wold
2011-11-03 12:23 ` Koen Kooi
2011-11-03 12:38 ` Koen Kooi
2011-11-03 12:40 ` Koen Kooi
2011-11-03 12:39 ` Richard Purdie
2011-11-03 12:49 ` Koen Kooi
2011-11-02 0:21 ` [Pull v3 2/4] xserver-nodm-init: Use useradd to add the xuser for rootless X Saul Wold
2011-11-02 0:21 ` [Pull v3 3/4] connman: Use useradd to add the xuser for DBus Saul Wold
2011-11-02 0:21 ` [Pull v3 4/4] dbus: ensure that the useradd shell is set to /bin/false Saul Wold
2011-11-02 8:21 ` [Pull v3 0/4] Add User Fixes Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox