* [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation @ 2011-09-07 20:28 Phil Blundell 2011-09-08 3:58 ` Saul Wold 0 siblings, 1 reply; 6+ messages in thread From: Phil Blundell @ 2011-09-07 20:28 UTC (permalink / raw) To: openembedded-core Replace various hard-coded references to /usr, /var and /etc with symbolic equivalents. Also replace adhoc usage of adduser/addgroup with useradd.bbclass functionality. This should, in theory, remove the need for a postinst to be run at boot time. Signed-off-by: Phil Blundell <philb@gnu.org> --- meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init | 14 +++--- meta/recipes-core/dbus/dbus.inc | 58 ++++++++++++------------ meta/recipes-core/dbus/dbus_1.4.12.bb | 1 + 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init b/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init index 4abc4cb..1917ad3 100644 --- a/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init +++ b/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init @@ -16,22 +16,22 @@ set -e -DAEMON=/usr/bin/dbus-daemon +DAEMON=@BINDIR@/dbus-daemon NAME=dbus DAEMONUSER=messagebus -PIDDIR=/var/run/dbus +PIDDIR=@LOCALSTATEDIR@/run/dbus PIDFILE=$PIDDIR/pid -UUIDDIR=/var/lib/dbus +UUIDDIR=@LOCALSTATEDIR@/lib/dbus DESC="system message bus" -EVENTDIR=/etc/dbus-1/event.d +EVENTDIR=@SYSCONFDIR@/dbus-1/event.d test -x $DAEMON || exit 0 # Source defaults file; edit that file to configure this script. ENABLED=1 PARAMS="" -if [ -e /etc/default/dbus ]; then - . /etc/default/dbus +if [ -e @SYSCONFDIR@/default/dbus ]; then + . @SYSCONFDIR@/default/dbus fi test "$ENABLED" != "0" || exit 0 @@ -113,7 +113,7 @@ case "$1" in start_it_up ;; *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: @SYSCONFDIR@/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc index a8ecda8..34dbe4a 100644 --- a/meta/recipes-core/dbus/dbus.inc +++ b/meta/recipes-core/dbus/dbus.inc @@ -14,11 +14,19 @@ 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 autotools pkgconfig gettext update-rc.d useradd + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "-d ${MESSAGEHOME} -g ${MESSAGEUSER} -r ${MESSAGEUSER}" +GROUPADD_PARAM_${PN} = "${MESSAGEUSER}; netdev" INITSCRIPT_NAME = "dbus-1" INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." +MESSAGEUSER=messagebus +MESSAGEHOME="${localstatedir}/run/dbus" +UUIDDIR="${localstatedir}/lib/dbus" + CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" DEBIANNAME_${PN} = "dbus-1" @@ -34,42 +42,27 @@ FILES_${PN} = "${bindir}/dbus-daemon* \ ${bindir}/dbus-uuidgen \ ${bindir}/dbus-cleanup-sockets \ ${bindir}/dbus-send \ - ${bindir}/dbus-monitor \ + ${bindir}/dbus-monitor \ + ${bindir}/dbus-launch \ ${libexecdir}/dbus* \ ${sysconfdir} \ ${datadir}/dbus-1/services \ - ${datadir}/dbus-1/system-services" + ${datadir}/dbus-1/system-services \ + ${MESSAGEHOME} \ + ${UUIDDIR}" FILES_${PN}-lib = "${libdir}/lib*.so.*" 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" +pkg_postinst_${PN}() { + chgrp "${MESSAGEUSER}" "${MESSAGEHOME}" + chown "${MESSAGEUSER}":"${MESSAGEUSER}" "${MESSAGEHOME}" + chown "${MESSAGEUSER}":"${MESSAGEUSER}" "${UUIDDIR}" - chown "$MESSAGEUSER":"$MESSAGEUSER" "$UUIDDIR" + chown root:"${MESSAGEUSER}" $D${libexecdir}/dbus-daemon-launch-helper + chmod 4754 $D${libexecdir}/dbus-daemon-launch-helper - 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 } @@ -90,11 +83,18 @@ do_install() { autotools_do_install install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1 + sed 's:@SYSCONFDIR@:${sysconfdir}:;s:@BINDIR@:${bindir}:;s:@LOCALSTATEDIR@:${localstatedir}:' < ${WORKDIR}/dbus-1.init > ${D}${sysconfdir}/init.d/dbus-1 + chmod 755 ${D}${sysconfdir}/init.d/dbus-1 # 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 + + install -d ${D}${UUIDDIR} + install -d ${D}${MESSAGEHOME} + + install -d ${D}${sysconfdir}/default/volatiles + echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" > ${D}${sysconfdir}/default/volatiles/99_dbus } do_install_virtclass-native() { diff --git a/meta/recipes-core/dbus/dbus_1.4.12.bb b/meta/recipes-core/dbus/dbus_1.4.12.bb index ada53c9..51604aa 100644 --- a/meta/recipes-core/dbus/dbus_1.4.12.bb +++ b/meta/recipes-core/dbus/dbus_1.4.12.bb @@ -2,3 +2,4 @@ include dbus.inc SRC_URI[md5sum] = "104f2ea94c10a896dfb1edecb5714cb1" SRC_URI[sha256sum] = "da3c97fd546610558d588799e27c4fa81101e754acbcd34747a42c131f30dbe7" +PR = "r6" -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation 2011-09-07 20:28 [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation Phil Blundell @ 2011-09-08 3:58 ` Saul Wold 2011-09-08 6:54 ` Phil Blundell 0 siblings, 1 reply; 6+ messages in thread From: Saul Wold @ 2011-09-08 3:58 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Phil Blundell On 09/07/2011 01:28 PM, Phil Blundell wrote: > Replace various hard-coded references to /usr, /var and /etc with symbolic equivalents. > > Also replace adhoc usage of adduser/addgroup with useradd.bbclass > functionality. This should, in theory, remove the need for a postinst > to be run at boot time. > > Signed-off-by: Phil Blundell<philb@gnu.org> This one seems to have some problems: ERROR: Function 'useradd_sysroot' failed (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 for further information) ERROR: Logfile of failure stored in: /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 Log data follows: | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common'] | ERROR: Function 'useradd_sysroot' failed (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 for further information) | Running groupadd commands... | sent invalidate(passwd) request, exiting | sent invalidate(group) request, exiting | sent invalidate(group) request, exiting | sent invalidate(passwd) request, exiting | sent invalidate(group) request, exiting | sent invalidate(group) request, exiting | Running useradd commands... | useradd: group messagebus exists - if you want to add this user to that group, use -g. NOTE: package dbus-1.4.12-r6: task do_install: Failed ERROR: Task 1684 (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/meta/recipes-core/dbus/dbus_1.4.12.bb, do_install) failed with exit code '1' Please rework and let me know how it was tested, this might not make 1.1 at this point as we are starting to tighten requirements as we go into the RC phase. Thanks Sau! > --- > meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init | 14 +++--- > meta/recipes-core/dbus/dbus.inc | 58 ++++++++++++------------ > meta/recipes-core/dbus/dbus_1.4.12.bb | 1 + > 3 files changed, 37 insertions(+), 36 deletions(-) > > diff --git a/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init b/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init > index 4abc4cb..1917ad3 100644 > --- a/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init > +++ b/meta/recipes-core/dbus/dbus-1.4.12/dbus-1.init > @@ -16,22 +16,22 @@ > > set -e > > -DAEMON=/usr/bin/dbus-daemon > +DAEMON=@BINDIR@/dbus-daemon > NAME=dbus > DAEMONUSER=messagebus > -PIDDIR=/var/run/dbus > +PIDDIR=@LOCALSTATEDIR@/run/dbus > PIDFILE=$PIDDIR/pid > -UUIDDIR=/var/lib/dbus > +UUIDDIR=@LOCALSTATEDIR@/lib/dbus > DESC="system message bus" > -EVENTDIR=/etc/dbus-1/event.d > +EVENTDIR=@SYSCONFDIR@/dbus-1/event.d > > test -x $DAEMON || exit 0 > > # Source defaults file; edit that file to configure this script. > ENABLED=1 > PARAMS="" > -if [ -e /etc/default/dbus ]; then > - . /etc/default/dbus > +if [ -e @SYSCONFDIR@/default/dbus ]; then > + . @SYSCONFDIR@/default/dbus > fi > > test "$ENABLED" != "0" || exit 0 > @@ -113,7 +113,7 @@ case "$1" in > start_it_up > ;; > *) > - echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}">&2 > + echo "Usage: @SYSCONFDIR@/init.d/$NAME {start|stop|restart|reload|force-reload}">&2 > exit 1 > ;; > esac > diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc > index a8ecda8..34dbe4a 100644 > --- a/meta/recipes-core/dbus/dbus.inc > +++ b/meta/recipes-core/dbus/dbus.inc > @@ -14,11 +14,19 @@ 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 autotools pkgconfig gettext update-rc.d useradd > + > +USERADD_PACKAGES = "${PN}" > +USERADD_PARAM_${PN} = "-d ${MESSAGEHOME} -g ${MESSAGEUSER} -r ${MESSAGEUSER}" > +GROUPADD_PARAM_${PN} = "${MESSAGEUSER}; netdev" > > INITSCRIPT_NAME = "dbus-1" > INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." > > +MESSAGEUSER=messagebus > +MESSAGEHOME="${localstatedir}/run/dbus" > +UUIDDIR="${localstatedir}/lib/dbus" > + > CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" > > DEBIANNAME_${PN} = "dbus-1" > @@ -34,42 +42,27 @@ FILES_${PN} = "${bindir}/dbus-daemon* \ > ${bindir}/dbus-uuidgen \ > ${bindir}/dbus-cleanup-sockets \ > ${bindir}/dbus-send \ > - ${bindir}/dbus-monitor \ > + ${bindir}/dbus-monitor \ > + ${bindir}/dbus-launch \ > ${libexecdir}/dbus* \ > ${sysconfdir} \ > ${datadir}/dbus-1/services \ > - ${datadir}/dbus-1/system-services" > + ${datadir}/dbus-1/system-services \ > + ${MESSAGEHOME} \ > + ${UUIDDIR}" > FILES_${PN}-lib = "${libdir}/lib*.so.*" > 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" > +pkg_postinst_${PN}() { > + chgrp "${MESSAGEUSER}" "${MESSAGEHOME}" > + chown "${MESSAGEUSER}":"${MESSAGEUSER}" "${MESSAGEHOME}" > + chown "${MESSAGEUSER}":"${MESSAGEUSER}" "${UUIDDIR}" > > - chown "$MESSAGEUSER":"$MESSAGEUSER" "$UUIDDIR" > + chown root:"${MESSAGEUSER}" $D${libexecdir}/dbus-daemon-launch-helper > + chmod 4754 $D${libexecdir}/dbus-daemon-launch-helper > > - 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 > } > @@ -90,11 +83,18 @@ do_install() { > autotools_do_install > > install -d ${D}${sysconfdir}/init.d > - install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1 > + sed 's:@SYSCONFDIR@:${sysconfdir}:;s:@BINDIR@:${bindir}:;s:@LOCALSTATEDIR@:${localstatedir}:'< ${WORKDIR}/dbus-1.init> ${D}${sysconfdir}/init.d/dbus-1 > + chmod 755 ${D}${sysconfdir}/init.d/dbus-1 > > # 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 > + > + install -d ${D}${UUIDDIR} > + install -d ${D}${MESSAGEHOME} > + > + install -d ${D}${sysconfdir}/default/volatiles > + echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none"> ${D}${sysconfdir}/default/volatiles/99_dbus > } > > do_install_virtclass-native() { > diff --git a/meta/recipes-core/dbus/dbus_1.4.12.bb b/meta/recipes-core/dbus/dbus_1.4.12.bb > index ada53c9..51604aa 100644 > --- a/meta/recipes-core/dbus/dbus_1.4.12.bb > +++ b/meta/recipes-core/dbus/dbus_1.4.12.bb > @@ -2,3 +2,4 @@ include dbus.inc > SRC_URI[md5sum] = "104f2ea94c10a896dfb1edecb5714cb1" > SRC_URI[sha256sum] = "da3c97fd546610558d588799e27c4fa81101e754acbcd34747a42c131f30dbe7" > > +PR = "r6" ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation 2011-09-08 3:58 ` Saul Wold @ 2011-09-08 6:54 ` Phil Blundell 2011-09-08 15:44 ` Scott Garman 0 siblings, 1 reply; 6+ messages in thread From: Phil Blundell @ 2011-09-08 6:54 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 2011-09-07 at 20:58 -0700, Saul Wold wrote: > On 09/07/2011 01:28 PM, Phil Blundell wrote: > > Replace various hard-coded references to /usr, /var and /etc with symbolic equivalents. > > > > Also replace adhoc usage of adduser/addgroup with useradd.bbclass > > functionality. This should, in theory, remove the need for a postinst > > to be run at boot time. > > > > Signed-off-by: Phil Blundell<philb@gnu.org> > > This one seems to have some problems: > > ERROR: Function 'useradd_sysroot' failed (see > /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 > for further information) > ERROR: Logfile of failure stored in: > /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 > Log data follows: > | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', > 'bit-64', 'x86_64-linux', 'common'] > | ERROR: Function 'useradd_sysroot' failed (see > /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 > for further information) > | Running groupadd commands... > | sent invalidate(passwd) request, exiting > | sent invalidate(group) request, exiting > | sent invalidate(group) request, exiting > | sent invalidate(passwd) request, exiting > | sent invalidate(group) request, exiting > | sent invalidate(group) request, exiting > | Running useradd commands... > | useradd: group messagebus exists - if you want to add this user to > that group, use -g. > NOTE: package dbus-1.4.12-r6: task do_install: Failed That sounds a bit like the useradd option parsing bug (in shadow-native) that I mentioned the other day. I had meant to send a patch for that but I forgot. Do any other recipes which use useradd.bbclass work for you? p. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation 2011-09-08 6:54 ` Phil Blundell @ 2011-09-08 15:44 ` Scott Garman 2011-09-09 8:46 ` Phil Blundell 0 siblings, 1 reply; 6+ messages in thread From: Scott Garman @ 2011-09-08 15:44 UTC (permalink / raw) To: openembedded-core; +Cc: Wold, Saul On 09/07/2011 11:54 PM, Phil Blundell wrote: > On Wed, 2011-09-07 at 20:58 -0700, Saul Wold wrote: >> On 09/07/2011 01:28 PM, Phil Blundell wrote: >>> Replace various hard-coded references to /usr, /var and /etc with symbolic equivalents. >>> >>> Also replace adhoc usage of adduser/addgroup with useradd.bbclass >>> functionality. This should, in theory, remove the need for a postinst >>> to be run at boot time. >>> >>> Signed-off-by: Phil Blundell<philb@gnu.org> >> >> This one seems to have some problems: >> >> ERROR: Function 'useradd_sysroot' failed (see >> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 >> for further information) >> ERROR: Logfile of failure stored in: >> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 >> Log data follows: >> | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', >> 'bit-64', 'x86_64-linux', 'common'] >> | ERROR: Function 'useradd_sysroot' failed (see >> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64/build/build/tmp/work/x86_64-poky-linux/dbus-1.4.12-r6/temp/log.do_install.19825 >> for further information) >> | Running groupadd commands... >> | sent invalidate(passwd) request, exiting >> | sent invalidate(group) request, exiting >> | sent invalidate(group) request, exiting >> | sent invalidate(passwd) request, exiting >> | sent invalidate(group) request, exiting >> | sent invalidate(group) request, exiting >> | Running useradd commands... >> | useradd: group messagebus exists - if you want to add this user to >> that group, use -g. >> NOTE: package dbus-1.4.12-r6: task do_install: Failed > > That sounds a bit like the useradd option parsing bug (in shadow-native) > that I mentioned the other day. I had meant to send a patch for that > but I forgot. > > Do any other recipes which use useradd.bbclass work for you? Hi Phil, So sorry for not jumping into these threads for so long. I've been way behind in my email and working on some non-development projects. It appears you have found a bug in the way the shadow utils were patched to support a custom sysroot option. I have been testing the useradd class using the useradd_example recipe in Poky's meta-skeleton: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb This example does provide several command line options to the useradd binary, so I'm not sure how I missed this. In any case, please submit your patch and I will advocate for its inclusion in our 1.1 release. I hate to jump in and then out like this, but I am slammed preparing for a conference next week, and the week after that I will be on vacation. Mark Hatle should be familiar enough with the code to answer questions and do code review. Scott -- Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation 2011-09-08 15:44 ` Scott Garman @ 2011-09-09 8:46 ` Phil Blundell 2011-09-09 17:43 ` Richard Purdie 0 siblings, 1 reply; 6+ messages in thread From: Phil Blundell @ 2011-09-09 8:46 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Wold, Saul [-- Attachment #1: Type: text/plain, Size: 184 bytes --] On Thu, 2011-09-08 at 08:44 -0700, Scott Garman wrote: > In any case, please submit your patch and I will advocate for its > inclusion in our 1.1 release. As requested. p. [-- Attachment #2: 0001-shadow-add-patch-for-useradd-lossage.patch --] [-- Type: text/x-patch, Size: 2531 bytes --] From 6ac00e3ced33a4b8eb43fd83d786a192e6f4f5c1 Mon Sep 17 00:00:00 2001 From: Phil Blundell <philb@gnu.org> Date: Wed, 7 Sep 2011 13:02:10 +0100 Subject: [PATCH] shadow: add patch for useradd lossage This fixes (or, at least, papers over) a failure in do_install for recipes which inherit useradd.bbclass. Rewinding optind in this way is not entirely portable but in practice it seems to work on GNU-ish build hosts at least. Signed-off-by: Phil Blundell <philb@gnu.org> --- meta/recipes-extended/shadow/files/useradd.patch | 17 +++++++++++++++++ .../shadow/shadow-native_4.1.4.3.bb | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/shadow/files/useradd.patch diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch new file mode 100644 index 0000000..ff5016c --- /dev/null +++ b/meta/recipes-extended/shadow/files/useradd.patch @@ -0,0 +1,17 @@ +Work around a bug introduced with the --root option which was causing +all other arguments to be ignored. + +Upstream-Status: inappropriate +Signed-off-by: Phil Blundell <philb@gnu.org> + +--- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100 ++++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100 +@@ -1957,6 +1957,8 @@ + + get_defaults (); + ++ optind = 1; ++ + process_flags (argc, argv); + + #ifdef ACCT_TOOLS_SETUID diff --git a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb index 485495e..c29e4c1 100644 --- a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb +++ b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb @@ -7,13 +7,14 @@ LICENSE = "BSD | Artistic" LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe" -PR = "r0" +PR = "r1" SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ file://shadow.automake-1.11.patch \ file://shadow-4.1.3-dots-in-usernames.patch \ file://shadow-4.1.4.2-env-reset-keep-locale.patch \ - file://add_root_cmd_options.patch" + file://add_root_cmd_options.patch \ + file://useradd.patch" SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation 2011-09-09 8:46 ` Phil Blundell @ 2011-09-09 17:43 ` Richard Purdie 0 siblings, 0 replies; 6+ messages in thread From: Richard Purdie @ 2011-09-09 17:43 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Wold, Saul On Fri, 2011-09-09 at 09:46 +0100, Phil Blundell wrote: > On Thu, 2011-09-08 at 08:44 -0700, Scott Garman wrote: > > In any case, please submit your patch and I will advocate for its > > inclusion in our 1.1 release. > > As requested. [The shadow patch] merged to master, thanks. Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-09 17:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-09-07 20:28 [PATCH] dbus: fix paths in startup script, use useradd.bbclass for user creation Phil Blundell 2011-09-08 3:58 ` Saul Wold 2011-09-08 6:54 ` Phil Blundell 2011-09-08 15:44 ` Scott Garman 2011-09-09 8:46 ` Phil Blundell 2011-09-09 17:43 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox