Small fixes for sysstat, shadow, coreutils, gconf
cover Small fixes for sysstat, shadow, coreutils, gconf
sysstat and gconf are fixed version of previous patches (which were also sent to ML, resending now just to be clear that they are also in branch and pull-request).
The following changes since commit 6ef79ede361c42e11e78d4afcff11295a3144055:
pulseaudio 1.1: add filter-apply and filter-heuristics to pulseaudio-server RDEPENDS, it won't start without (2011-12-01 10:53:27 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib jansa/pull
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/pull
Martin Jansa (4):
sysstat: don't run populate-volatile.sh update in do_rootfs or
without populate-volatile.sh
gconf: add polkit to DEPENDS only for target recipe and disable
default-service for native
shadow: use u-a for /usr/bin/groups
coreutils: fix u-a for base64, mktemp and df
meta/recipes-core/coreutils/coreutils_8.14.bb | 20 ++++++++++++++------ meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 5 +++-- meta/recipes-extended/sysstat/sysstat.inc | 7 ++++++- meta/recipes-extended/sysstat/sysstat_10.0.2.bb | 2 +- meta/recipes-gnome/gnome/gconf_3.2.3.bb | 10 +++++++--- 5 files changed, 31 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.8.rc4
PATCH 1/4 sysstat: don't run populate-volatile.sh update in do_rootfs or without populate-volatile.sh
--- meta/recipes-extended/sysstat/sysstat.inc | 7 ++++++- meta/recipes-extended/sysstat/sysstat_10.0.2.bb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)
meta/recipes-extended/sysstat/sysstat.inc +6 -1
@@ -22,7 +22,12 @@ do_install() { } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -n "$D" ]; then + exit 1 + fi + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi }
meta/recipes-extended/sysstat/sysstat_10.0.2.bb +1 -1
@@ -2,7 +2,7 @@ require sysstat.inc LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" -PR = "r0" +PR = "r1"
Signature · 1 line
1.7.8.rc4
PATCH 2/4 gconf: add polkit to DEPENDS only for target recipe and disable default-service for native
* gnome-common-native is needed because gnomebase.bbclass does only DEPENDS += "gnome-common"
--- meta/recipes-gnome/gnome/gconf_3.2.3.bb | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
meta/recipes-gnome/gnome/gconf_3.2.3.bb +7 -3
@@ -3,9 +3,10 @@ SECTION = "x11/gnome" LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" -DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native" +DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native polkit" +DEPENDS_virtclass-native = "glib-2.0-native dbus-native dbus-glib-native libxml2-native intltool-native gnome-common-native" -PR = "r1" +PR = "r2" inherit gnomebase
@@ -18,7 +19,10 @@ SRC_URI[archive.sha256sum] = "52008a82a847527877d9e1e549a351c86cc53cada4733b8a70 S = "${WORKDIR}/GConf-${PV}" -EXTRA_OECONF = "--disable-gtk-doc --disable-gtk --enable-shared --disable-static --enable-debug=yes --disable-introspection --disable-orbit --with-openldap=no" +POLKIT_OECONF = "--enable-defaults-service" +POLKIT_OECONF_virtclass-native = "--disable-defaults-service" +EXTRA_OECONF = "--disable-gtk-doc --disable-gtk --enable-shared --disable-static --enable-debug=yes \ + --disable-introspection --disable-orbit --with-openldap=no ${POLKIT_OECONF}" do_configure_prepend () { touch gtk-doc.make
Signature · 1 line
1.7.8.rc4
PATCH 3/4 shadow: use u-a for /usr/bin/groups
In reply to Martin Jansa* otherwise coreutils upgrade fails with
update-alternatives: Error: not linking //usr/bin/groups to groups.coreutils since //usr/bin/groups exists and is not a link
--- meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/shadow/shadow_4.1.4.3.bb +3 -2
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" -PR = "r5" +PR = "r6" SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ file://login_defs_pam.sed \
@@ -88,7 +88,7 @@ do_install_append() { sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} - for i in passwd chfn newgrp chsh ; do + for i in passwd chfn newgrp chsh groups ; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN} done
@@ -123,6 +123,7 @@ pkg_postinst_${PN} () { update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200 update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200 update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200 + update-alternatives --install ${bindir}/groups groups groups.${PN} 200 update-alternatives --install ${base_bindir}/login login login.${PN} 200 update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 200 update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 200
Signature · 1 line
1.7.8.rc4
PATCH 4/4 coreutils: fix u-a for base64, mktemp and df
In reply to Martin Jansa* busybox installs mktemp and df to base_bindir not bindir SHR root@gjama ~ $ ll /bin/df /bin/mktemp /bin/base64 lrwxrwxrwx 1 root root 7 Nov 10 15:44 /bin/df -> busybox lrwxrwxrwx 1 root root 7 Nov 10 15:44 /bin/mktemp -> busybox lrwxrwxrwx 1 root root 7 Nov 28 15:48 /bin/base64 -> busybox
* so u-a for coreutils fails:
update-alternatives: Error: cannot register alternative base64 to /usr/bin/base64 since it is already registered to /bin/base64
update-alternatives: Error: cannot register alternative mktemp to /usr/bin/mktemp since it is already registered to /bin/mktemp
update-alternatives: Error: cannot register alternative df to /usr/bin/df since it is already registered to /bin/df
--- meta/recipes-core/coreutils/coreutils_8.14.bb | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-)
meta/recipes-core/coreutils/coreutils_8.14.bb +14 -6
@@ -7,7 +7,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad" -PR = "r1" +PR = "r2" DEPENDS = "gmp" DEPENDS_virtclass-native = ""
@@ -21,13 +21,13 @@ SRC_URI[sha256sum] = "0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d EXTRA_OECONF_virtclass-native = "--without-gmp" -# [ gets a special treatment and is not included in this -bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirname du \ +# [ df mktemp base64 gets a special treatment and is not included in this +bindir_progs = "basename chcon cksum comm csplit cut dir dircolors dirname du \ env expand expr factor fmt fold groups head hostid id install \ - join link logname md5sum mkfifo mktemp nice nl nohup nproc od paste pathchk \ + join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \ pinky pr printenv printf ptx readlink runcon seq sha1sum sha224sum sha256sum \ sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\ - tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df" + tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" # hostname gets a special treatment and is not included in this base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
@@ -36,7 +36,7 @@ base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdi sbindir_progs= "chroot" do_install_append() { - for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done + for i in ${bindir_progs} df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done install -d ${D}${base_bindir} for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
@@ -61,6 +61,11 @@ pkg_postinst_${PN} () { # Special cases. [ needs to be treated separately. update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100 + + # Special cases. base64, mktemp and df need to be treated separately, because busybox have them in base_binding not bindir + update-alternatives --install ${base_bindir}/base64 base64 ${bindir}/base64.${PN} 100; + update-alternatives --install ${base_bindir}/mktemp mktemp ${bindir}/mktemp.${PN} 100; + update-alternatives --install ${base_bindir}/df df ${bindir}/df.${PN} 100; } pkg_prerm_${PN} () {
@@ -74,6 +79,9 @@ pkg_prerm_${PN} () { update-alternatives --remove hostname hostname.${PN} update-alternatives --remove uptime uptime.${PN} update-alternatives --remove '[' 'lbracket.${PN}' + update-alternatives --remove base64 ${bindir}/base64.${PN} + update-alternatives --remove mktemp ${bindir}/mktemp.${PN} + update-alternatives --remove df ${bindir}.df.${PN} } BBCLASSEXTEND = "native"
Signature · 1 line
1.7.8.rc4
Re: [PATCH][oe-core 1/4] sysstat: don't run populate-volatile.sh update in do_rootfs or without populate-volatile.sh
In reply to Martin JansaQuoted 11 lines · Martin Jansa
Signed-off-by Martin Jansa <[email protected]>--- meta/recipes-extended/sysstat/sysstat.inc | 7 ++++++- meta/recipes-extended/sysstat/sysstat_10.0.2.bb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)meta/recipes-extended/sysstat/sysstat.inc +0
-0
meta/recipes-extended/sysstat/sysstat.inc do_install() { · line 27
Quoted 7 lines
meta/recipes-extended/sysstat/sysstat.inc +3
-1@@ -22,7 +22,12 @@ do_install() { } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -n "$D" ]; then + exit 1 + fi
I'm confused. Can't we exit 0 here since the system will have run populate-volatile.sh update at rootfs time or first boot as needed so we don't need to run it again?
See recipes-core/dbus/dbus.inc or pulseaudio for similar examples.
Cheers,
Richard
Re: [PATCH][oe-core 1/4] sysstat: don't run populate-volatile.sh update in do_rootfs or without populate-volatile.sh
Quoted 24 lines · Richard Purdie
Quoted 11 lines · Martin Jansa
Signed-off-by Martin Jansa <[email protected]>--- meta/recipes-extended/sysstat/sysstat.inc | 7 ++++++- meta/recipes-extended/sysstat/sysstat_10.0.2.bb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)meta/recipes-extended/sysstat/sysstat.inc +0
-0meta/recipes-extended/sysstat/sysstat.inc do_install() { · line 27
Quoted 7 lines
meta/recipes-extended/sysstat/sysstat.inc +3
-1@@ -22,7 +22,12 @@ do_install() { } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -n "$D" ]; then + exit 1 + fiI'm confused. Can't we exit 0 here since the system will have run
populate-volatile.shupdate at rootfs time or first boot as needed so we don't need to run it again?
Quoted 1 line
See recipes-core/dbus/dbus.inc or pulseaudio for similar examples.
Ah I didn't know about importance of return value in this case and I was looking at
meta/classes/module.bbclass meta/recipes-connectivity/avahi/avahi.inc
for similar examples.
I'll learn how it's changing behavior and why avahi has exit 1 in 2/3 and exit 0 in 1/3 postinst and then I'll send updated patch if needed, but now I'm 5 hours late to daywork.. :).
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH][oe-core 1/4] sysstat: don't run populate-volatile.sh update in do_rootfs or without populate-volatile.sh
Quoted 33 lines · Martin Jansa
Quoted 24 lines · Richard Purdie
Quoted 11 lines · Martin Jansa
Signed-off-by Martin Jansa <[email protected]>--- meta/recipes-extended/sysstat/sysstat.inc | 7 ++++++- meta/recipes-extended/sysstat/sysstat_10.0.2.bb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)meta/recipes-extended/sysstat/sysstat.inc +0
-0meta/recipes-extended/sysstat/sysstat.inc do_install() { · line 27
Quoted 7 lines
meta/recipes-extended/sysstat/sysstat.inc +3
-1@@ -22,7 +22,12 @@ do_install() { } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -n "$D" ]; then + exit 1 + fiI'm confused. Can't we exit 0 here since the system will have run
populate-volatile.shupdate at rootfs time or first boot as needed so we don't need to run it again?Quoted 1 line
See recipes-core/dbus/dbus.inc or pulseaudio for similar examples.
Ah I didn't know about importance of return value in this case and I was looking at
meta/classes/module.bbclass meta/recipes-connectivity/avahi/avahi.inc
for similar examples.
Quoted 3 lines
I'll learn how it's changing behavior and why avahi has exit 1 in 2/3 and exit 0 in 1/3 postinst and then I'll send updated patch if needed, but now I'm 5 hours late to daywork.. :).
Now after reading
3.1.6. Post Install Scripts
in manual
http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-addpkg-postinstalls
I'm confused too and wondering if dbus and pulseaudio are best examples.. dbus:
pkg_postinst_dbus() {
if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
/etc/init.d/populate-volatile.sh update
fi
}so it this will succeed every time in do_rootfs (even with test expression false), so it will be marked as installed and postinst won't be called on first boot, but will be called after every upgrade. Is that what we really want?
pulseaudio:
pkg_postinst_${PN}-server() {
# can't do this offline
if [ "x$D" != "x" ]; then
exit 1
fi
if [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
}this looks the same as my postinst in sysstat (only difference is '"x$D" != "x"' instead of shorter '-n "$D"') and if I understand it right now, then this is better then what's in dbus.inc, because during rootfs we maybe have /etc/init.d/populate-volatile.sh in $D but do we want to call /etc/init.d/populate-volatile.sh on host? Or does it automagically prepend $D to every path when it's executing postinst scripts in do_rootfs or does it some sort of chroot to $D?
Even if we prefix the path with $D in postinst like:$D${sysconfdir}/init.d/populate-volatile.sh update
the populate-volatile.sh script has hardcoded paths like '/etc/volatile.cache' and '/etc/ld.so.cache' inside, so it won't work very well when executed on host (without chrooting) and we should postpone it to be executed really on target and that's why we need 'exit 1'.
If I'm wrong please correct me and update "3.1.6. Post Install Scripts" to be more clear about this issues.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 11 lines · Martin Jansa
sysstat and gconf are fixed version of previous patches (which were also sent to ML, resending now just to be clear that they are also in branch and pull-request).
The following changes since commit
6ef79ede361c42e11e78d4afcff11295a3144055:pulseaudio 1.1: add filter-apply and filter-heuristics to pulseaudio-server RDEPENDS, it won't start without (2011-12-01 10:53:27 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribjansa/pull
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/pull
Quoted 7 lines
Martin Jansa (4):
sysstat: don't runpopulate-volatile.shupdate indo_rootfsor
withoutpopulate-volatile.sh
gconf: add polkit to DEPENDS only for target recipe and disable
default-service for native
shadow: use u-a for/usr/bin/groups
coreutils: fix u-a for base64, mktemp and df
I have a question on the sysstat change, I merged the others, thanks.
Richard