Re: [OE-core] [PATCH 1/1] udev: add runtime dependency on blkid
On 07/08/2013 12:35 PM, Saul Wold wrote: > On 07/08/2013 12:10 AM, jackie.hu...@windriver.com wrote: >> From: Jackie Huang >> >> udev requires blkid, but this wasn't explicit. Note that the >> dependency is on util-linux specifically, the one from e2fsprogs >> won't work. >> > Doesn't udev use an internal builtin-blkid? Or is the configure finding > that we have util-linux and using it instead of the built-in? I think (I'm really stale here) I wrote that patch against a udev version prior to the addition of the builtin. And in any case didn't I see that blkid got yanked from the e2fsprogs package at some point anyway? Pretty sure this is not needed in upstream oe-core. Not sure if it ever was. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 12/05/2012 09:52 PM, Andy Ross wrote: On 12/05/2012 09:00 PM, Saul Wold wrote: This patch is still having problems, see the Autobuilder recently build (link below). This is on MUT with the updated binutils, I am not sure if that is part of the problem or not, but binutils was working before. Ah, fun fun. It's not binutils. Something (I'm not sure what -- is "yocto-autobuild" a recipe?) is pulling in the cross-canadian toolchain, and I had missed the appended architecture in the license.bbclass test. I'll get you a fixed and tested patch tomorrow morning. Take 3: From 2eda90739df7b2b474ef79e00563e190272051a3 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 29 Nov 2012 11:08:47 -0800 Subject: [PATCH] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of incompatible license strings and/or glob patterns. Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3 and LGPLv3), but this was broken because of a bug in return_spdx() which would die with a runtime error when there was no SPDXLICENSEMAP entry for the string. Signed-off-by: Andy Ross Signed-off-by: Elizabeth Flanagan --- meta/classes/base.bbclass| 69 ++-- meta/classes/license.bbclass | 68 --- 2 files changed, 60 insertions(+), 77 deletions(-) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 0ee9d2e..43794af 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -524,43 +524,44 @@ python () { raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) -dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) - -if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-cross-canadian-%s" % d.getVar('TRANSLATED_TARGET_ARCH', True)) and not pn.startswith("nativesdk-"): -# Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and -# INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0 -spdx_license = return_spdx(d, dont_want_license) -hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: -this_license = d.getVar('LICENSE', True) -# At this point we know the recipe contains an INCOMPATIBLE_LICENSE, however it may contain packages that do not. -packages = d.getVar('PACKAGES', True).split() -dont_skip_recipe = False -skipped_packages = {} -unskipped_packages = [] -for pkg in packages: -if incompatible_license(d, dont_want_license, pkg): -skipped_packages[pkg] = this_license -dont_skip_recipe = True +bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split() + +check_license = False if pn.startswith("nativesdk-") else True +for t in ["-native", "-cross", "-cross-initial", "-cross-intermediate", + "-crosssdk-intermediate", "-crosssdk", "-crosssdk-initial", + "-cross-canadian-" + d.getVar('TRANSLATED_TARGET_ARCH', True)]: +if pn.endswith(t): +check_license = False + +if check_license and bad_licenses: +whitelist = [] +for lic in bad_licenses: +for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: +whitelist.extend((d.getVar(w + lic, True) or "").split()) +spdx_license = r
Re: [OE-core] [PATCH 1/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 12/05/2012 09:00 PM, Saul Wold wrote: This patch is still having problems, see the Autobuilder recently build (link below). This is on MUT with the updated binutils, I am not sure if that is part of the problem or not, but binutils was working before. Ah, fun fun. It's not binutils. Something (I'm not sure what -- is "yocto-autobuild" a recipe?) is pulling in the cross-canadian toolchain, and I had missed the appended architecture in the license.bbclass test. I'll get you a fixed and tested patch tomorrow morning. But there's a serious question here: *should* this have worked? The toolchain is GPLv3, and a canadian cross toolchain is presumably intended to be distributed (because by defintion, it doesn't run on the local machine), no? Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 12/03/2012 10:47 AM, Saul Wold wrote: I think this needs to be rebased since some other patches have been applied, please verify and rebase against master. It applies cleanly for me on top of what seems to be the current oe-core HEAD: commit 24b954253dd1aa626835352c4dc8d085a19aae35 Author: Ross Burton Date: Wed Nov 28 15:28:48 2012 + xserver-xorg: restore packaging for the DRI/DRI2/DBE extensions ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 11/29/2012 08:31 PM, Saul Wold wrote: There still seems to be a problem with this patch, try building core-image-minimal and core-image-basic, checkout the failure from the autobuilder: http://autobuilder.yoctoproject.org:8010/builders/nightly-non-gpl3/builds/372/steps/shell_28/logs/stdio Oops, that was my goof. The nativesdk packages were being tested vs. INCOMPATIBLE_LICENSE because I incorrectly folded them in with the other types when refactoring; endswith/startswith, what's the difference? And of course I don't build nativesdk stuff routinely. Fixed: From 9796edb4e5a7a9a7c2d6d51fc68ea1ffa2b4d9ea Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 29 Nov 2012 11:08:47 -0800 Subject: [PATCH] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of incompatible license strings and/or glob patterns. Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3 and LGPLv3), but this was broken because of a bug in return_spdx() which would die with a runtime error when there was no SPDXLICENSEMAP entry for the string. Signed-off-by: Andy Ross Signed-off-by: Elizabeth Flanagan --- meta/classes/base.bbclass| 67 +-- meta/classes/license.bbclass | 68 2 files changed, 58 insertions(+), 77 deletions(-) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 0ee9d2e..d01edb6 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -524,43 +524,42 @@ python () { raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) -dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) - -if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-cross-canadian-%s" % d.getVar('TRANSLATED_TARGET_ARCH', True)) and not pn.startswith("nativesdk-"): -# Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and -# INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0 -spdx_license = return_spdx(d, dont_want_license) -hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: -this_license = d.getVar('LICENSE', True) -# At this point we know the recipe contains an INCOMPATIBLE_LICENSE, however it may contain packages that do not. -packages = d.getVar('PACKAGES', True).split() -dont_skip_recipe = False -skipped_packages = {} -unskipped_packages = [] -for pkg in packages: -if incompatible_license(d, dont_want_license, pkg): -skipped_packages[pkg] = this_license -dont_skip_recipe = True +bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split() + +check_license = False if pn.startswith("nativesdk-") else True +for t in ["-native", "-cross", "-cross-initial", "-cross-intermediate", "-crosssdk-intermediate", "-crosssdk", "-crosssdk-initial"]: +if pn.endswith(t): +check_license = False + +if check_license and bad_licenses: +whitelist = [] +for lic in bad_licenses: +for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: +whitelist.extend((d.getVar(w + lic, True) or "").split()) +spdx_license = return_spdx(d, lic) +if spdx_license: +whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, Tr
Re: [OE-core] [PATCH 0/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 11/28/2012 03:14 PM, Flanagan, Elizabeth wrote: This patch needs a rebase and a minor bit of whitespace work. I've done some work to make it apply to the current master head and tested it out and it does improve the utility of INCOMPATIBLE_LICENSE quite a bit. Hm... AFAICT the content of the patch still seems to apply cleanly with git am on a just-pulled poky (don't have an oe-core tree on this machine) master HEAD. Am I looking at a wrong branch? If it's ok with you, Andy, I'll just submit my modifications to your patch. Fine with me. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 0/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
On 11/01/2012 11:02 AM, Andy Ross wrote: We hit a problem trying to exclude L/GPLv3 recipes where INCOMPATIBLE_LICENSE could only match exactly one license. The older wildcard syntax had been broken by a more recent SPDX change (specifying a string without a SPDXLICENSEMAP entry could crash), so "*GPLv3" wouldn't work. Ping ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of incompatible license strings and/or glob patterns. Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3 and LGPLv3), but this was broken because of a bug in return_spdx() which would die with a runtime error when there was no SPDXLICENSEMAP entry for the string. Signed-off-by: Andy Ross --- meta/classes/base.bbclass| 67 ++ meta/classes/license.bbclass | 69 +--- 2 files changed, 61 insertions(+), 75 deletions(-) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 783b64d..f53b59c 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -524,41 +524,44 @@ python () { raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) -dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) - -if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-cross-canadian-%s" % d.getVar('TRANSLATED_TARGET_ARCH', True)) and not pn.startswith("nativesdk-"): -# Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and -# INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0 -spdx_license = return_spdx(d, dont_want_license) -hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split() -if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: -this_license = d.getVar('LICENSE', True) -# At this point we know the recipe contains an INCOMPATIBLE_LICENSE, however it may contain packages that do not. -packages = d.getVar('PACKAGES', True).split() -dont_skip_recipe = False -skipped_packages = {} -unskipped_packages = [] -for pkg in packages: -if incompatible_license(d, dont_want_license, pkg): -skipped_packages[pkg] = this_license -dont_skip_recipe = True +bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split() + +check_license = True +for t in ["-native", "-cross", "-cross-initial", "-cross-intermediate", "-crosssdk-intermediate", "-crosssdk", "-crosssdk-initial", "-nativesdk"]: +if pn.endswith(t): +check_license = False + +if check_license and bad_licenses: +whitelist = [] +for lic in bad_licenses: +for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: +whitelist.extend((d.getVar(w + lic, True) or "").split()) +spdx_license = return_spdx(d, lic) +if spdx_license: +whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()) +if not pn in whitelist: +recipe_license = d.getVar('LICENSE', True) +pkgs = d.getVar('PACKAGES', True).split() +skipped_pkgs = [] +unskipped_pkgs = [] +for pkg in pkgs: +if incompatible_license(d, bad_licenses, pkg): +skipped_pkgs.append(pkg) else: -unskipped_packages.append(pkg) -if not unskipped_packages: -# if we hit here and have excluded all packages, then we can just exclude the recipe -dont_skip_recipe = False -elif skipped_packages and unskipped_packages: -for pkg, license in skipped_packages.iteritems(): -
[OE-core] [PATCH 0/1] base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
We hit a problem trying to exclude L/GPLv3 recipes where INCOMPATIBLE_LICENSE could only match exactly one license. The older wildcard syntax had been broken by a more recent SPDX change (specifying a string without a SPDXLICENSEMAP entry could crash), so "*GPLv3" wouldn't work. This fixes that, and extends INCOMPATIBLE_LICENSE to handle a whitespace-separated list of license strings to exclude (e.g "GPLv3 LGPLv3"). This is compatible with existing usage because the LICENSE parsing is already done on whitespace: a pre-existing INCOMPATIBLE_LICENSE value with whitespace could not have matched anything in practice. All other behavior should be unaffected. Note specifically that the LGPLv2_WHITELIST_${license} variables are used as whitelists for all licenses (i.e. identically to WHITELIST_... and HOSTTOOLS_WHITELIST_...). That sounds wrong, but seems to have been the preexisting behavior. Ideas? Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] sysklogd: fix update-rc.d handling
The sysklogd recipe had a cut-n-paste version of the update-rc.d.bbclass code which didn't work, but this was hidden because all images contain the busybox version which does. Building a busybox-free image unmasked the issue and syslogd wouldn't start on first boot. The comments seem to be wrong/stale. AFAICT update-rc.d and update-alternatives work fine with each other, though there is an ordering constraint (alternatives must be specified last, so it "wraps" update-rc.d). This version builds and works both with and without busybox. Signed-off-by: Andy Ross --- meta/recipes-extended/sysklogd/sysklogd.inc | 43 + 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index 151babb..1167328 100644 --- a/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/meta/recipes-extended/sysklogd/sysklogd.inc @@ -11,10 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ " -# syslog initscript is handled explicitly because order of -# update-rc.d and update-alternatives is important (see below) -DEPENDS_append = " update-rc.d update-rc.d-native" -RDEPENDS_${PN}_append = " update-rc.d" +inherit update-rc.d update-alternatives SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ file://no-strip-install.patch \ @@ -41,22 +38,6 @@ do_install () { install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog } -pkg_preinst_${PN} () { - # all this is needed to avoid sysmlink errors, - # because update-rc.d runs before pkg_postinst - ETC=$D${sysconfdir} - - if [ -e $ETC/init.d/syslog -a ! -L $ETC/init.d/syslog ]; then - echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old" - mv $ETC/init.d/syslog $ETC/init.d/syslog.old - fi - if [ ! -e $ETC/init.d/syslog ]; then - ln -s dummy $ETC/init.d/syslog - fi -} - -inherit update-alternatives - ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" @@ -66,15 +47,6 @@ ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" -pkg_postinst_${PN} () { - if test "x$D" != "x"; then - OPT="-r $D" - else - OPT="-s" - fi - update-rc.d $OPT syslog defaults -} - pkg_prerm_${PN} () { if test "x$D" = "x"; then if test "$1" = "upgrade" -o "$1" = "remove"; then @@ -82,16 +54,3 @@ pkg_prerm_${PN} () { fi fi } - -pkg_postrm_${PN} () { - if test "x$D" != "x"; then - OPT="-r $D" - else - OPT="" - fi - if test "$1" = "remove" -o "$1" = "purge"; then - if ! test -e "/etc/init.d/syslog"; then - update-rc.d $OPT syslog remove - fi - fi -} -- 1.7.11.4 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] busybox: Factor out defconfig and binary name
Allow recipes that require busybox.inc to specificy custom defconfig files and binary names such that multiple busybox configurations may coexist. Signed-off-by: Andy Ross --- meta/recipes-core/busybox/busybox.inc | 92 +++-- meta/recipes-core/busybox/busybox_1.20.2.bb | 8 ++- 2 files changed, 55 insertions(+), 45 deletions(-) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 972e7d0..1aa54b3 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -13,7 +13,7 @@ SECTION = "base" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" +PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-mdev ${PN}-hwclock" FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*" @@ -33,8 +33,6 @@ INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" -RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" - inherit cml1 update-rc.d # internal helper @@ -95,7 +93,7 @@ python () { do_prepare_config () { sed -e 's#@DATADIR@#${datadir}#g' \ - < ${WORKDIR}/defconfig > ${S}/.config + < ${WORKDIR}/${DEFCONFIG} > ${S}/.config sed -i -e '/CONFIG_STATIC/d' .config echo "# CONFIG_STATIC is not set" >> .config for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ @@ -120,7 +118,7 @@ do_configure () { do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS oe_runmake busybox_unstripped - cp busybox_unstripped busybox + cp busybox_unstripped ${BPN} } do_install () { @@ -136,17 +134,21 @@ do_install () { install -d ${D}${sysconfdir}/init.d - if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/defconfig; then + if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/${DEFCONFIG}; then # Install /bin/busybox, and the /bin/sh link so the postinst script # can run. Let update-alternatives handle the rest. install -d ${D}${base_bindir} - if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then - install -m 4755 ${S}/busybox ${D}${base_bindir} + if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/${DEFCONFIG}; then + install -m 4755 ${S}/${BPN} ${D}${base_bindir} else - install -m 0755 ${S}/busybox ${D}${base_bindir} + install -m 0755 ${S}/${BPN} ${D}${base_bindir} + fi + if grep -q "${base_bindir}/sh" ${WORKDIR}/${DEFCONFIG}; then + ln -sf ${BPN} ${D}${base_bindir}/sh fi - ln -sf busybox ${D}${base_bindir}/sh else + # FEATURE_INDIVIDUAL=y means every tool is a separate binary, no links + # ... Is this code used/tested in any known configuration? install -d ${D}${base_bindir} ${D}${base_sbindir} install -d ${D}${libdir} ${D}${bindir} ${D}${sbindir} cat busybox.links | while read FILE; do @@ -166,40 +168,40 @@ do_install () { fi fi - if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/${DEFCONFIG}; then install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} fi - if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_CROND=y" ${WORKDIR}/${DEFCONFIG}; then install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HTTPD=y" ${WORKDIR}/${DEFCONFIG}; then install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPD=y" ${WORKDIR}/${DEFCONFIG}; then install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/${DEFCONFIG}; then
[OE-core] [PATCH 2/2] busybox-oe-min: add package for minimal non-busybox systems
A handful of busybox utilities (run-parts, start-stop-daemon, ifupdown) are "core" features required by the distribution without packaged compatible replacements. Build these into a tiny busybox-oe-min that can be included in bash/coreutile-based images without pulling in all of the needless busybox applets. Signed-off-by: Andy Ross --- .../busybox/busybox-oe-min-1.20.2/defconfig-oe-min | 992 + meta/recipes-core/busybox/busybox-oe-min_1.20.2.bb | 35 + 2 files changed, 1027 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox-oe-min-1.20.2/defconfig-oe-min create mode 100644 meta/recipes-core/busybox/busybox-oe-min_1.20.2.bb diff --git a/meta/recipes-core/busybox/busybox-oe-min-1.20.2/defconfig-oe-min b/meta/recipes-core/busybox/busybox-oe-min-1.20.2/defconfig-oe-min new file mode 100644 index 000..4b2e134 --- /dev/null +++ b/meta/recipes-core/busybox/busybox-oe-min-1.20.2/defconfig-oe-min @@ -0,0 +1,992 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.20.2 +# Mon Oct 8 11:14:04 2012 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_INCLUDE_SUSv2 is not set +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +# CONFIG_FEATURE_VERBOSE_USAGE is not set +CONFIG_FEATURE_COMPRESS_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_UTMP=y +# CONFIG_FEATURE_WTMP is not set +CONFIG_FEATURE_PIDFILE=y +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +# CONFIG_FEATURE_SYSLOG is not set +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="i586-poky-linux-" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_FEATURE_SYSTEMD=y +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_FEATURE_FAST_TOP=y +# CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_USE_TERMIOS is not set +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=15 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +# CONFIG_FEATURE_REVERSE_SEARCH is not set +CONFIG_FEATURE_TAB_COMPLETION=y +CONFIG_FEATURE_USERNAME_COMPLETION=y +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_BZIP2 is not set +# CONFIG_CPIO is not set +#
[OE-core] [PATCH RFC 0/2] eliminate (almost all of) busybox for GNUish images
We've been attempting to build an image that is busybox-free. Unfortunately there are a handful of busybox applets which are used in existing functionality (mostly various initscripts) and for which oe-core has no packaged replacements: + /usr/bin/run-parts - part of upstream debianutils, unpackaged. + /sbin/start-stop-daemon - part of upstream dpkg, built by oe-core recipe but unpackaged. + /sbin/if{up,down} - upstream ifupdown, but busybox version is AFAICT quite divergent. These are all tiny, and probably not worth having in distinct binaries. The attached patch breaks out a separate "busybox-oe-min" package that can be installed in images that don't need or want the full busybox binary. It comes to 41kb on my x86 build. Note that busybox is still pulled in by packagegroup-core-boot, so none of the existing images will use this package without modification. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 2/2] udev-extraconf: Don't mount root filesystem under /media
On 09/18/2012 03:25 PM, Saul Wold wrote: How much bigger does this make the busybox image? These binaries are manually stripped and not prelinked, but probably close enough: -rwxr-xr-x. 1 andy andy 557312 Sep 18 15:30 busybox-r0 -rwxr-xr-x. 1 andy andy 561696 Sep 18 15:30 busybox-r1 So 4k or 0.8%, basically. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] udev-extraconf: Don't mount root filesystem under /media
The mount.sh handler attempts to prevent already-mounted filesystems from being mounted as dynamic/removable "/media". But it misses the case where the kernel has mounted the root filesystem (e.g. with "root=/dev/sda1"). In that situation, /proc/mounts has a device name of "/dev/root" instead of the proper $DEVNAME string exposed by udev. So we must also test the root filesystem device number vs. the $MAJOR/$MINOR udev tells us. Signed-off-by: Andy Ross --- meta/recipes-core/udev/udev-extraconf/mount.sh | 8 ++-- meta/recipes-core/udev/udev-extraconf_1.0.bb | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 2eb9aff..99c76b2 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -49,8 +49,12 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then $MOUNT $DEVNAME 2> /dev/null fi - # If the device isn't mounted at this point, it isn't configured in fstab - grep -q "^$DEVNAME " /proc/mounts || automount + # If the device isn't mounted at this point, it isn't + # configured in fstab (note the root filesystem can show up as + # /dev/root in /proc/mounts, so check the device number too) + if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then + grep -q "^$DEVNAME " /proc/mounts || automount + fi fi diff --git a/meta/recipes-core/udev/udev-extraconf_1.0.bb b/meta/recipes-core/udev/udev-extraconf_1.0.bb index 9995899..2c4a4f1 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.0.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 inherit allarch -PR = "r6" +PR = "r7" SRC_URI = " \ file://automount.rules \ -- 1.7.11.4 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/2] udev-extraconf: Don't mount root filesystem under /media
When you boot an image with a kernel-mounted root filesystem (e.g. "root=/dev/sda1" or the like), the root filesystem also appears as a read-write filesystem under /media. The fix has two parts: 2. Modify the mount.sh hook to test the root filesystem device number instead of the name (which won't match "/dev/root"). 1. ...but that breaks on images which use busybox and lack coreutils, because there is no stat binary. Add this to the busybox defconfig, and patch it to live in /usr/bin instead of /bin to match the coreutils path. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] busybox: add /usr/bin/stat applet
The busybox defconfig lacks a stat tool, the functionality of which cannot be reproduced in a way accessible to a shell script running in a minimal configuration. Enable, and modify the installation path to /usr/bin/stat to match the coreutils tool for proper alternatives handling. Signed-off-by: Andy Ross --- meta/recipes-core/busybox/busybox-1.20.2/defconfig | 4 ++-- .../busybox/busybox-1.20.2/stat-usr-bin.patch | 21 + meta/recipes-core/busybox/busybox_1.20.2.bb | 5 +++-- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox-1.20.2/stat-usr-bin.patch diff --git a/meta/recipes-core/busybox/busybox-1.20.2/defconfig b/meta/recipes-core/busybox/busybox-1.20.2/defconfig index dff07f1..b39234f 100644 --- a/meta/recipes-core/busybox/busybox-1.20.2/defconfig +++ b/meta/recipes-core/busybox/busybox-1.20.2/defconfig @@ -270,8 +270,8 @@ CONFIG_SORT=y CONFIG_FEATURE_SORT_BIG=y # CONFIG_SPLIT is not set # CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y CONFIG_STTY=y # CONFIG_SUM is not set CONFIG_SYNC=y diff --git a/meta/recipes-core/busybox/busybox-1.20.2/stat-usr-bin.patch b/meta/recipes-core/busybox/busybox-1.20.2/stat-usr-bin.patch new file mode 100644 index 000..4049324 --- /dev/null +++ b/meta/recipes-core/busybox/busybox-1.20.2/stat-usr-bin.patch @@ -0,0 +1,21 @@ +busybox: move /bin/stat to /usr/bin/stat to match coreutils + +The coreutils stat binary lives in /usr/bin, fix busybox to use the same path so +they can be properly tracked by alternatives. + +Upstream-Status: Inappropriate [embedded] +Signed-off-by: Andy Ross + +diff --git a/include/applets.src.h b/include/applets.src.h +index 0d33bfc..30ae3ad 100644 +--- a/include/applets.src.h b/include/applets.src.h +@@ -340,7 +340,7 @@ IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, soft + IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) + IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) + IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon)) +-IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) ++IF_STAT(APPLET(stat, BB_DIR_USR_BIN, BB_SUID_DROP)) + IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) + IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) + /* Needs to be run by root or be suid root - needs to change uid and gid: */ diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb index ced04d2..2251383 100644 --- a/meta/recipes-core/busybox/busybox_1.20.2.bb +++ b/meta/recipes-core/busybox/busybox_1.20.2.bb @@ -1,5 +1,5 @@ require busybox.inc -PR = "r0" +PR = "r1" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://B921600.patch \ @@ -26,7 +26,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://defconfig \ file://busybox-mkfs-minix-tests_bigendian.patch \ file://fix-for-spurious-testsuite-failure.patch \ - file://busybox-1.20.2-kernel_ver.patch" + file://busybox-1.20.2-kernel_ver.patch \ + file://stat-usr-bin.patch" SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882" -- 1.7.11.4 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] gcc-4.7: Add fix for libtool rpath problems
On 08/24/2012 09:19 AM, Richard Purdie wrote: I'd love to have a better fix for this. I suspect its taking the path from some "gcc -print-" call which returns/usr/lib/../lib on x86_64 so we could try and normalise it at source... Yeah, but that sounds like whack-a-mole to me. It's just too tempting for upstream software to glue up a path name with .., it's very sane for a human being. One of the (comparatively few) spots where I actually isolated the source of one of these is in gettext, where the configure script needs a --with-ncurses-prefix to be "/usr". So the bitbake recipe sets it to ${STAGING_LIBDIR}/.., which seems clearly correct to me. And then somewhere in the configure script that turns into a libtool library path of /lib (again completely correct), thus "/usr/lib/../lib". And even then it's correct and if used for a -L argument would never cause a problem. It's libtool which has special requirements here, becuase it's trying to set rpaths based on those funny strings and has to have them normalized. So I'd argue that it's in libtool where this magic has to happen. Before I realized you already fixed the gcc-runtime issue, I was looking at finding a place farther up the stack where this could be done. That is, sanitize all inbound paths at the spot where they're parsed at the command line. The current cases we know we need to hit are -lib and -rpath, though I'm no libtool expert and am surely missing some... Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] gcc-4.7: Add fix for libtool rpath problems
On 08/24/2012 07:12 AM, Richard Purdie wrote: This avoids problems with libstdc++ having bad rpaths (/usr/lib/../.lib) in its .la file. See the patch for more information. Heh, I was just sitting down having discovered the same thing. Isn't the root cause at least partially that gcc is using a different libtool implementation than the rest of the build? I note it's also missing the normalization patches that went into the standard libtool (though that's benign here as -rpath isn't used). Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] ld: -rpath must search under sysroot
The -rpath argument would search the host filesystem for libraries, even when a sysroot was defined. For cross toolchains with targets compatible with the host architecture this can find incorrect libraries. Leave -rpath-link unmodified, as build systems in the wild are already using this to point to host directories. [YOCTO #2965] Signed-off-by: Andy Ross --- meta/recipes-devtools/binutils/binutils-2.22.inc | 3 +- .../binutils/binutils/rpath-sysroot.patch | 38 ++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.22.inc b/meta/recipes-devtools/binutils/binutils-2.22.inc index 17950a2..821cc55 100644 --- a/meta/recipes-devtools/binutils/binutils-2.22.inc +++ b/meta/recipes-devtools/binutils/binutils-2.22.inc @@ -1,4 +1,4 @@ -PR = "r14" +PR = "r15" LIC_FILES_CHKSUM="\ file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ @@ -31,6 +31,7 @@ SRC_URI = "\ file://binutils-armv5e.patch \ file://mips64-default-ld-emulation.patch \ file://0001-PR-ld-13470.patch \ + file://rpath-sysroot.patch \ " SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" diff --git a/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch b/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch new file mode 100644 index 000..955699e --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch @@ -0,0 +1,38 @@ +ld: -rpath must search under sysroot + +The -rpath argument would search the host filesystem for libraries, +even when a sysroot was defined. For cross toolchains with targets +compatible with the host architecture this can find incorrect +libraries. Leave -rpath-link unmodified, as build systems in the wild +are already using this to point to host directories. + +Signed-off-by: Andy Ross +Upstream-Status: submitted (binut...@sourceware.org 2012-08-22) +--- + ld/emultempl/elf32.em | 10 +++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +index de51050..35e0e7e 100644 +--- a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +@@ -1263,9 +1263,13 @@ fragment <http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/2] RPATH fixes: libtool & binutils
Current RPATH work: Patch 1 just updates the libtool work to use the built-in normalization function instead of sed, as requested. Patch 2 is to binutils ld, to fix the underlying host pollution issue: the -rpath argument was not sysroot aware, so setting "/usr/lib/../lib" as an RPATH would add the host /usr/lib to the link time search path instead of the sysroot directory. Note that the previous warning fix to insane.bbclass is still producing unmasked warnings in a few cases (the rpm utilities are one that I know), mostly in programs instead of libraries. These will need to be audited independently. It's possible that they are liking with -rpath directly and not using libtool, or that a needed normalization in libtool is still missing. But with the current patches these warnings are benign now, they can't break the build. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] libtool: update rpath normalization to use builtin
Use the built-in normalization function instead of the sed hack. Signed-off-by: Andy Ross --- meta/recipes-devtools/libtool/libtool-2.4.2.inc| 2 +- .../libtool/libtool/norm-rpath.patch | 22 -- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.2.inc index 691427e..95e12a2 100644 --- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc +++ b/meta/recipes-devtools/libtool/libtool-2.4.2.inc @@ -8,7 +8,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" -INC_PR = "r4" +INC_PR = "r5" SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ file://trailingslash.patch \ diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch index 03a7667..dce1576 100644 --- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch +++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch @@ -7,33 +7,27 @@ RPATH in the generated binary. Normalize before comparision. Signed-off-by: Andy Ross Upstream-Status: Pending -diff -ru a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh +diff -ur a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh --- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700 -+++ b/libltdl/config/ltmain.m4sh 2012-08-16 16:34:54.616627821 -0700 -@@ -7288,8 +7288,13 @@ b/libltdl/config/ltmain.m4sh 2012-08-22 11:01:34.191345989 -0700 +@@ -7288,8 +7288,10 @@ else # We only want to hardcode in an rpath if it isn't in the # default dlsearch path. -+libdir_norm=`echo $libdir \ -+ | sed 's/\/\+\.\(\/\+\|$\)/\//g' \ -+ | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \ -+ | sed 's/\/\+/\//g' \ -+ | sed 's/\(.\)\/$/\1/g'` ++func_normal_abspath "$libdir" ++libdir_norm=$func_normal_abspath_result case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; + *" $libdir_norm "*) ;; *) eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" ;; -@@ -8027,8 +8032,13 @@ +@@ -8027,8 +8029,10 @@ else # We only want to hardcode in an rpath if it isn't in the # default dlsearch path. -+libdir_norm=`echo $libdir \ -+ | sed 's/\/\+\.\(\/\+\|$\)/\//g' \ -+ | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \ -+ | sed 's/\/\+/\//g' \ -+ | sed 's/\(.\)\/$/\1/g'` ++func_normal_abspath "$libdir" ++libdir_norm=$func_normal_abspath_result case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; + *" $libdir_norm "*) ;; -- 1.7.11.4 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. Signed-off-by: Andy Ross --- meta/classes/insane.bbclass | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 556a176..9d085a4 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -166,6 +166,9 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): """ Check for RPATHs that are useless but not dangerous """ +def rpath_eq(a, b): +return os.path.normpath(a) == os.path.normpath(b) + if not elf: return @@ -181,7 +184,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): m = rpath_re.match(line) if m: rpath = m.group(1) - if rpath == libdir or rpath == base_libdir: + if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): # The dynamic linker searches both these places anyway. There is no point in # looking there again. messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 2/2] libtool: normalize link paths before considering for RPATH
On 08/19/2012 03:06 AM, Richard Purdie wrote: On Fri, 2012-08-17 at 08:53 -0700, Andy Ross wrote: ++libdir_norm=`echo $libdir \ ++ | sed 's/\/\+\.\(\/\+\|$\)/\//g' \ ++ | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \ ++ | sed 's/\/\+/\//g' \ ++ | sed 's/\(.\)\/$/\1/g'` Can't we use func_norm_abspath here? I have to admit I got a little confused reading that code (not that my sed mess is significantly better, but at least I trust it because I wrote it); but it looks to me like it's an abspath implementation on the host filesystem (not the use of `pwd` in a few places). That will work for pruning in this case, since the problem case is already an absolute path to a host directory. But I don't see how it won't in principle break things by expanding host paths. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] libtool: normalize link paths before considering for RPATH
Libtool may be passed link paths of the form "/usr/lib/../lib", which fool its detection code into thinking it should be included as an RPATH in the generated binary. Normalize before comparision. Signed-off-by: Andy Ross --- meta/recipes-devtools/libtool/libtool-2.4.2.inc| 1 + .../libtool/libtool/norm-rpath.patch | 42 ++ 2 files changed, 43 insertions(+) create mode 100644 meta/recipes-devtools/libtool/libtool/norm-rpath.patch diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.2.inc index 5b9557e..691427e 100644 --- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc +++ b/meta/recipes-devtools/libtool/libtool-2.4.2.inc @@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ file://avoid_absolute_paths_for_general_utils.patch \ file://fix-rpath.patch \ file://respect-fstack-protector.patch \ + file://norm-rpath.patch \ " SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50" diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch new file mode 100644 index 000..03a7667 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch @@ -0,0 +1,42 @@ +libtool: normalize link paths before considering for RPATH + +Libtool may be passed link paths of the form "/usr/lib/../lib", which +fool its detection code into thinking it should be included as an +RPATH in the generated binary. Normalize before comparision. + +Signed-off-by: Andy Ross +Upstream-Status: Pending + +diff -ru a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh +--- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700 b/libltdl/config/ltmain.m4sh 2012-08-16 16:34:54.616627821 -0700 +@@ -7288,8 +7288,13 @@ + else + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++libdir_norm=`echo $libdir \ ++ | sed 's/\/\+\.\(\/\+\|$\)/\//g' \ ++ | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \ ++ | sed 's/\/\+/\//g' \ ++ | sed 's/\(.\)\/$/\1/g'` + case " $sys_lib_dlsearch_path " in +- *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" +func_append dep_rpath " $flag" +;; +@@ -8027,8 +8032,13 @@ + else + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++libdir_norm=`echo $libdir \ ++ | sed 's/\/\+\.\(\/\+\|$\)/\//g' \ ++ | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \ ++ | sed 's/\/\+/\//g' \ ++ | sed 's/\(.\)\/$/\1/g'` + case " $sys_lib_dlsearch_path " in +- *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" +rpath+=" $flag" +;; -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. Signed-off-by: Andy Ross --- meta/classes/insane.bbclass | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 556a176..b84a89f 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -161,6 +161,10 @@ def package_qa_check_rpath(file,name, d, elf, messages): if dir in line: messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file)) +def rpath_eq(a, b): +import os.path +return os.path.normpath(a) == os.path.normpath(b) + QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths" def package_qa_check_useless_rpaths(file, name, d, elf, messages): """ @@ -181,7 +185,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): m = rpath_re.match(line) if m: rpath = m.group(1) - if rpath == libdir or rpath == base_libdir: + if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): # The dynamic linker searches both these places anyway. There is no point in # looking there again. messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/2] RPATH host pollution fixes
Results from chasing the RPATH pollution I was seeing: I don't have a fix for the underlying linker issue, but that is captured here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2965 Patch 1 is the warning fix from earlier, which is still a fix to the existing logic and should be applied. I've removed the "host-polluted" text though, as AFAICT the actual RPATH is not a problem, only the use of -rpath with the linker that produced it. Patch 2 is a fix to libtool on top of the existing fix-rpath.patch to normalize the strings. With this applied, all the link failures we have reproduced (including the one reported vs. owl_video last week) work correctly. No libraries in the resulting sysroot have a RPATH set to a default link directory. A few runnable binaries still trigger the warning though (but otherwise build successfully), I'm looking at that now -- I suspect these simply aren't using libtool, or else we've missed a spot where normalization and/or default directory pruning needs to happen. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
On 08/17/2012 03:28 AM, Richard Purdie wrote: I suspect you need to look somewhere around: http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-devtools/libtool/libtool/fix-rpath.patch Indeed. Found that yesterday and am currently testing a fix. Should be inbound within the hour. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
On 08/16/2012 01:39 AM, Phil Blundell wrote: If these RPATHs are causing host pollution then that sounds like there is another bug elsewhere. They ought to be resolved relative to the sysroot during link edit. Indeed, this is turning out to be a deeper issue than I wanted it to be. What seems to be is happening is this: an RPATH in the ELF header is interpreted relative to sysroot normally. But when linking, a -rpath argument to the ld is interpreted relative to the *host* filesystem even when there is a --sysroot argument. See the quick test script below. As it happens, both of those are ultimately produced by libtool, and it's only the second one that is fatal. The RPATH itself is probably still a warning condition, but it's not a build breaker. But neither is needed, they are happening in the case I'm looking at only because libtool (I think) is confused by the "/../" syntax in the link path into trying to add an RPATH where one isn't needed. The specific case I'm looking at (with our internal tree, I'm working on reproducing vs. poky right now) is with a pulseaudio build, where an x86-64 build on an x86_64 host hits a RPATH in libgdk-x11-2.0 that pulls in the host libXranr and fails due to version skew. I was just pointed at a discussion from last week on owl_video which looks all but identical. At least for the moment I'm going to try to track down the libtool issue (maybe sanify the path before it sees if if possible) instead of trying to fix a linker bug. Andy Reproducer for the underlying linker issue: #!/bin/sh set -ex SYSROOT=/home/andy/oe/poky/build/tmp/sysroots/qemux86-64 CC=/home/andy/oe/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc # A library: echo 'int foo(){return 0;}' > foo.c $CC -shared -fPIC -o libfoo.so foo.c # Another library that references the first via RPATH=`pwd` echo 'int foo(); int bar(){return foo();}' > bar.c $CC -shared -fPIC -o libbar.so bar.c -L. -lfoo -Wl,-rpath -Wl,`pwd` # A program that uses the second library: echo 'int bar(); int main(){return bar();}' > main.c # Works (incorrectly!) because the "-rpath `pwd" argument here is # *not* interpreted relative to sysroot, so the linker sees # ./libfoo.so as a potential library. $CC --sysroot=$SYSROOT -L$SYSROOT/usr/lib64 -Wl,-rpath -Wl,`pwd` -o main2 main.c libbar.so echo THAT LINK SHOULD HAVE FAILED # Fails (correctly) because nothing on the link line tells libbar.so # how to find libfoo.so, nor does libfoo.so exist in the # sysroot-relative RPATH. $CC --sysroot=$SYSROOT -o main main.c libbar.so ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. Also clarify the warning text to indicate potential link-time pollution from the host libraries. Signed-off-by: Andy Ross --- meta/classes/insane.bbclass | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 556a176..dfaa9dc 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -161,6 +161,10 @@ def package_qa_check_rpath(file,name, d, elf, messages): if dir in line: messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file)) +def rpath_eq(a, b): +import os.path +return os.path.normpath(a) == os.path.normpath(b) + QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths" def package_qa_check_useless_rpaths(file, name, d, elf, messages): """ @@ -181,10 +185,13 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): m = rpath_re.match(line) if m: rpath = m.group(1) - if rpath == libdir or rpath == base_libdir: - # The dynamic linker searches both these places anyway. There is no point in - # looking there again. - messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) + if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): + # The dynamic linker searches both these places anyway. + # There is no point in looking there again. And it may + # be harmful: the RPATH may point to host directories + # (e.g. /usr/lib) which will be searched at link time, + # creating build issues. + messages.append("%s: %s contains probably-redundant, possibly host-polluted RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) QAPATHTEST[dev-so] = "package_qa_check_dev" def package_qa_check_dev(path, name, d, elf, messages): -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
Chris Larson wrote: > Please just use os.path.normpath() rather than reinventing the wheel here. Learn something new every day. Fixed. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] Fix RPATH warning vs. weird paths
We hit some oddball cases where libraries were being built with RPATHs referencing host directores and causing version skew in builds. There is a warning case to detect that already, but it was being fooled by ".." terms in the path strings. This just adds a normalize step to the path comparison and unmasks the missing warnings. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] insane.bbclass: Fix RPATH warning in the face of funny path strings
In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. Also clarify the warning text to indicate potential link-time pollution from the host libraries. Signed-off-by: Andy Ross --- meta/classes/insane.bbclass | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 556a176..ade0616 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -161,6 +161,17 @@ def package_qa_check_rpath(file,name, d, elf, messages): if dir in line: messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file)) +def rpath_norm(s): +import re +s = re.sub('[^/]+/\.\.(/|$)', '/', s) # snip ".." components +s = re.sub('/\.(/|$)', '/', s)# snip "." components +s = re.sub('/+', '/', s) # snip repeated slashes +s = re.sub('/$', '', s) # snip trailing slash +return s + +def rpath_eq(a, b): +return rpath_norm(a) == rpath_norm(b) + QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths" def package_qa_check_useless_rpaths(file, name, d, elf, messages): """ @@ -181,10 +192,13 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): m = rpath_re.match(line) if m: rpath = m.group(1) - if rpath == libdir or rpath == base_libdir: - # The dynamic linker searches both these places anyway. There is no point in - # looking there again. - messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) + if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): + # The dynamic linker searches both these places anyway. + # There is no point in looking there again. And it may + # be harmful: the RPATH may point to host directories + # (e.g. /usr/lib) which will be searched at link time, + # creating build issues. + messages.append("%s: %s contains probably-redundant, possibly host-polluted RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) QAPATHTEST[dev-so] = "package_qa_check_dev" def package_qa_check_dev(path, name, d, elf, messages): -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] task-core-lsb: Don't pull in eglibc-pic via RDEPENDS
On 08/15/2012 12:38 AM, Koen Kooi wrote: > MIssing PR bump Oops, fixed. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] task-core-lsb: Don't pull in eglibc-pic via RDEPENDS
The task-core-lsb-runtime-add subpackage includes eglibc-pic as an RDEPEND. That's incorrect, eglibc-pic is nothing but 22MB of static libraries and should never appear as a runtime dependency. Signed-off-by: Andy Ross --- meta/recipes-extended/tasks/task-core-lsb.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta/recipes-extended/tasks/task-core-lsb.bb b/meta/recipes-extended/tasks/task-core-lsb.bb index 553b89e..19e2129 100644 --- a/meta/recipes-extended/tasks/task-core-lsb.bb +++ b/meta/recipes-extended/tasks/task-core-lsb.bb @@ -3,7 +3,7 @@ # DESCRIPTION = "Create Small Image Tasks" -PR = "r9" +PR = "r10" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -194,7 +194,6 @@ RDEPENDS_task-core-lsb-runtime-add = "\ eglibc-localedata-posix \ eglibc-extra-nss \ eglibc-pcprofile \ -eglibc-pic \ eglibc-utils \ " -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] task-core-lsb: Don't pull in eglibc-pic via RDEPENDS
On 08/15/2012 06:51 AM, Richard Purdie wrote: Are files in that package required in order to pass LSB tests? I'm fine with removing it if it isn't required but I would like that confirmation before we merge this. I can't speak to the test suites, but these files are eglibc-specific, so it's hard to imagine them being required by the LSB. Doing some checking, it arrived in commit 472f89de ("task-poky-lsb: Add packges needed by LSB Test Suite") along with a bunch of other eglibc subpackages. My guess, noting that the development packages were *not* added, is it got added by mistake. I'll dig around. Andy ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] task-core-lsb: Don't pull in eglibc-pic via RDEPENDS
The task-core-lsb-runtime-add subpackage includes eglibc-pic as an RDEPEND. That's incorrect, eglibc-pic is nothing but 22MB of static libraries and should never appear as a runtime dependency. Signed-off-by: Andy Ross --- meta/recipes-extended/tasks/task-core-lsb.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta/recipes-extended/tasks/task-core-lsb.bb b/meta/recipes-extended/tasks/task-core-lsb.bb index 553b89e..be9eac2 100644 --- a/meta/recipes-extended/tasks/task-core-lsb.bb +++ b/meta/recipes-extended/tasks/task-core-lsb.bb @@ -194,7 +194,6 @@ RDEPENDS_task-core-lsb-runtime-add = "\ eglibc-localedata-posix \ eglibc-extra-nss \ eglibc-pcprofile \ -eglibc-pic \ eglibc-utils \ " -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] udev: Don't remount root filesystem under /media
The existing logic to avoid mounting already-mounted filesystems breaks for a kernel-mounted root, which appears as /dev/root in /proc/mounts. The effect is that an image booted with e.g. "root=/dev/mmcblk0p1" will find its root filesystem remount rw under /media/mmcblk0p1 at boot. Signed-off-by: Andy Ross --- meta/recipes-core/udev/udev/mount.sh | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/udev/udev/mount.sh b/meta/recipes-core/udev/udev/mount.sh index c13b8bb..61d14a3 100644 --- a/meta/recipes-core/udev/udev/mount.sh +++ b/meta/recipes-core/udev/udev/mount.sh @@ -49,9 +49,15 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then elif [ -x $MOUNT ]; then $MOUNT $DEVNAME 2> /dev/null fi - - # If the device isn't mounted at this point, it isn't configured in fstab - grep -q "^$DEVNAME " /proc/mounts || automount + + # If the device isn't mounted at this point, it isn't + # configured in fstab (note the root filesystem shows up as + # /dev/root in /proc/mounts, so parse the command line for + # that case) + root=`sed 's/\(^\|.* \)root=\([^ ]*\).*/\2/' /proc/cmdline` + if [ "$root" != "$DEVNAME" ]; then + grep -q "^$DEVNAME " /proc/mounts || automount + fi fi -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] dbus: Fix pid file in dbus init script
The PIDFILE (/var/run/dbus/pid) referenced by /etc/init.d/dbus-1 did not match the path (/var/run/messagebus.pid) configured in /etc/dbus-1/system.conf, so the initscript could start the daemon, but not stop it. Also remove needless directory ownership logic (dbus-daemon drops its pid file as root before calling setuid). Signed-off-by: Andy Ross --- meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init | 11 +++ meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init | 11 +++ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init b/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init index 4abc4cb..17b58ed 100644 --- a/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init +++ b/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init @@ -18,9 +18,8 @@ set -e DAEMON=/usr/bin/dbus-daemon NAME=dbus -DAEMONUSER=messagebus -PIDDIR=/var/run/dbus -PIDFILE=$PIDDIR/pid +DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf +PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf UUIDDIR=/var/lib/dbus DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d @@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0 start_it_up() { - if [ ! -d $PIDDIR ]; then -mkdir -p $PIDDIR -chown $DAEMONUSER $PIDDIR -chgrp $DAEMONUSER $PIDDIR - fi + mkdir -p "`dirname $PIDFILE`" if [ -e $PIDFILE ]; then PIDDIR=/proc/$(cat $PIDFILE) if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then diff --git a/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init b/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init index 4abc4cb..17b58ed 100644 --- a/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init +++ b/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init @@ -18,9 +18,8 @@ set -e DAEMON=/usr/bin/dbus-daemon NAME=dbus -DAEMONUSER=messagebus -PIDDIR=/var/run/dbus -PIDFILE=$PIDDIR/pid +DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf +PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf UUIDDIR=/var/lib/dbus DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d @@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0 start_it_up() { - if [ ! -d $PIDDIR ]; then -mkdir -p $PIDDIR -chown $DAEMONUSER $PIDDIR -chgrp $DAEMONUSER $PIDDIR - fi + mkdir -p "`dirname $PIDFILE`" if [ -e $PIDFILE ]; then PIDDIR=/proc/$(cat $PIDFILE) if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then -- 1.7.11.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] [PATCH] iputils: Break libsysfs dependency
iputils drops a /bin/arping with a runtime linkage against libsysfs in /usr. Port Fedora 17 iputils-20071127-infiniband.patch, which inlines access previously done by libsysfs. Signed-off-by: Andy Ross --- .../files/arping-break-libsysfs-dependency.patch | 296 + meta/recipes-extended/iputils/iputils_s20101006.bb | 5 +- 2 files changed, 299 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/iputils/files/arping-break-libsysfs-dependency.patch diff --git a/meta/recipes-extended/iputils/files/arping-break-libsysfs-dependency.patch b/meta/recipes-extended/iputils/files/arping-break-libsysfs-dependency.patch new file mode 100644 index 000..37325ee --- /dev/null +++ b/meta/recipes-extended/iputils/files/arping-break-libsysfs-dependency.patch @@ -0,0 +1,296 @@ +arping: Break libsysfs dependency + +Port Fedora 17's iputils-20071127-infiniband.patch, which inlines sysfs +access previously done by libsysfs (which is in /usr, and thus not +usable by /bin/arping). + +Upstream-Status: Inappropriate [not author] +Signed-off-by: Andy Ross +--- + Makefile |2 +- + arping.c | 152 -- + 2 files changed, 109 insertions(+), 45 deletions(-) + +diff --git a/Makefile b/Makefile +index d9a5ca5..943f048 100644 +--- a/Makefile b/Makefile +@@ -27,7 +27,7 @@ all: $(TARGETS) + + + tftpd: tftpd.o tftpsubs.o +-arping: arping.o -lsysfs ++arping: arping.o + ping: ping.o ping_common.o + ping6: ping6.o ping_common.o -lresolv -lcrypto + ping.o ping6.o ping_common.o: ping_common.h +diff --git a/arping.c b/arping.c +index 13484de..6379354 100644 +--- a/arping.c b/arping.c +@@ -32,8 +32,6 @@ + #include + #include + +-#include +- + #include "SNAPSHOT.h" + + static void usage(void) __attribute__((noreturn)); +@@ -52,14 +50,22 @@ int unicasting; + int s; + int broadcast_only; + +-struct sockaddr_storage me; +-struct sockaddr_storage he; ++struct sockaddr_ll *me=NULL; ++struct sockaddr_ll *he=NULL; + + struct timeval start, last; + + int sent, brd_sent; + int received, brd_recv, req_recv; + ++#define SYSFS_MNT_PATH "/sys" ++#define SYSFS_CLASS "class" ++#define SYSFS_NET "net" ++#define SYSFS_BROADCAST "broadcast" ++#define SYSFS_PATH_ENV "SYSFS_PATH" ++#define SYSFS_PATH_LEN 256 ++#define SOCKADDR_LEN (2 * sizeof(struct sockaddr_ll)) ++ + #define MS_TDIFF(tv1,tv2) ( ((tv1).tv_sec-(tv2).tv_sec)*1000 + \ + ((tv1).tv_usec-(tv2).tv_usec)/1000 ) + +@@ -166,6 +172,10 @@ void finish(void) + printf("\n"); + fflush(stdout); + } ++ ++ free(me); ++ free(he); ++ + if (dad) + exit(!!received); + if (unsolicited) +@@ -189,8 +199,7 @@ void catcher(void) + finish(); + + if ( count!=0 && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) { +- send_pack(s, src, dst, +-(struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he); ++ send_pack(s, src, dst, me, he); + if (count >= 0) + count--; + if (count == 0 && unsolicited) +@@ -239,7 +248,7 @@ int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) + return 0; + if (ah->ar_pln != 4) + return 0; +- if (ah->ar_hln != ((struct sockaddr_ll *)&me)->sll_halen) ++ if (ah->ar_hln != me->sll_halen) + return 0; + if (len < sizeof(*ah) + 2*(4 + ah->ar_hln)) + return 0; +@@ -250,7 +259,7 @@ int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) + return 0; + if (src.s_addr != dst_ip.s_addr) + return 0; +- if (memcmp(p+ah->ar_hln+4, ((struct sockaddr_ll *)&me)->sll_addr, ah->ar_hln)) ++ if (memcmp(p+ah->ar_hln+4, me->sll_addr, ah->ar_hln)) + return 0; + } else { + /* DAD packet was: +@@ -268,7 +277,7 @@ int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) +*/ + if (src_ip.s_addr != dst.s_addr) + return 0; +- if (memcmp(p, ((struct sockaddr_ll *)&me)->sll_addr, ((struct sockaddr_ll *)&me)->sll_halen) == 0) ++ if (memcmp(p, me->sll_addr, me->sll_halen) == 0) + return 0; + if (src.s_addr && src.s_addr != dst_ip.s_addr) + return 0; +@@ -284,7 +293,7 @@ int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) + printf("for %s ", inet_ntoa(dst_ip)); + s_printed = 1; + } +-