wr-misc patches
cover wr-misc patches
WindRiver patches was sent for YP compliance.
There are total 22 patches, and separate them into 4 parts, each part is individual which means there is no dependence between them.
//Hongxu
The following changes since commit 8c3eb5ee4582b6f6d489549290937657f37fc19e:
packagegroup-toolset-native: Update after ocf-linux -> cryptodev-linux change (2014-03-27 19:53:30 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/wr-misc-patches-2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/wr-misc-patches-2
Amy Fong (1):
native-python: bad interpreter error message
Hongxu Jia (1):
lttng-ust: add python to lttng-ust's RDEPENDS
Hu Yadi (1):
libpcap: add PACKAGECONFIG for libnl1
Ming Liu (1):
libpam: fix multilib packaging issue for pam-plugins
Yue Tao (3):
tzcode-native: Replace fixed version with PV
guile: add texinfo-native to DEPENDS
e2fsprogs: Add e2fsprogs-mke2fs and e2fsprogs-e2fsck as recommend
packages
meta/classes/distutils.bbclass | 14 ++++++++++- meta/recipes-connectivity/libpcap/libpcap.inc | 1 + .../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 1 + meta/recipes-devtools/guile/guile_2.0.9.bb | 2 +- meta/recipes-extended/pam/libpam_1.1.6.bb | 29 +++++++++++++++++++--- .../recipes-extended/tzcode/tzcode-native_2013i.bb | 3 ++- meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb | 1 + 7 files changed, 44 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/7 tzcode-native: Replace fixed version with PV
From: Yue Tao <[email protected]>
--- meta/recipes-extended/tzcode/tzcode-native_2013i.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/tzcode/tzcode-native_2013i.bb +2 -1
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=0b7570113550eb5d30aa4bd220964b8 # note that we allow for us to use data later than our code version # SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ - ftp://ftp.iana.org/tz/releases/tzdata2013i.tar.gz;name=tzdata" + ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata \ +" SRC_URI[tzcode.md5sum] = "86154c8b0cfb47f4e2027ecaa2ec547a" SRC_URI[tzcode.sha256sum] = "63bba6790afc1cb2ea0af2b998a35fc237e247608140dbe4e08b4216a8c31358"
Signature · 1 line
1.8.1.2
PATCH 2/7 libpcap: add PACKAGECONFIG for libnl1
In reply to Hongxu JiaFrom: Hu Yadi <[email protected]>
Add --with-libnl autoconfig parameter and dependency between libpcap and libnl1.
Disable libnl1 by default to avoid libpcap build error when libnl1 is involved.
--- meta/recipes-connectivity/libpcap/libpcap.inc | 1 + 1 file changed, 1 insertion(+)
meta/recipes-connectivity/libpcap/libpcap.inc +1 -0
@@ -13,6 +13,7 @@ DEPENDS = "flex-native bison-native libnl" PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluetooth', '', d)}" PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4" PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb" +PACKAGECONFIG[libnl1] = "--with-libnl,--without-libnl,libnl1,libnl1" INC_PR = "r5"
Signature · 1 line
1.8.1.2
PATCH 3/7 guile: add texinfo-native to DEPENDS
In reply to Hongxu JiaFrom: Yue Tao <[email protected]>
Use texinfo-native instead of host command
--- meta/recipes-devtools/guile/guile_2.0.9.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/guile/guile_2.0.9.bb +1 -1
@@ -32,7 +32,7 @@ SRC_URI[sha256sum] = "f70a38c8d9751f442679bfe61852bba8545af4d4355d037630997c2f37 inherit autotools gettext BBCLASSEXTEND = "native" -DEPENDS = "libunistring bdwgc gmp libtool libffi" +DEPENDS = "libunistring bdwgc gmp libtool libffi texinfo-native" # add guile-native only to the target recipe's DEPENDS DEPENDS_append_class-target = " guile-native libatomics-ops"
Signature · 1 line
1.8.1.2
PATCH 4/7 native-python: bad interpreter error message
In reply to Hongxu JiaFrom: Amy Fong <[email protected]>
On some builds with really long paths, we can end up exceeding the maximum length line for an interpreter (man execve: A maximum line length of 127 characters is allowed for the first line in a #! executable shell script.)
To avoid this limit, we use env to execute python, with this, we will be using python that's first found in our PATH.
The former ${bindir}/env is not a good idea for apps requiring native-python since coreutil*-native may not have been built (${bindir}/env may not exist) and with long paths, we can end up running into the same issue, hence we use /usr/bin/env from the host.
--- meta/classes/distutils.bbclass | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
meta/classes/distutils.bbclass +13 -1
@@ -50,7 +50,13 @@ distutils_do_install() { for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i - fi + else + # The former ${bindir}/env is not a good idea for apps requiring native-python + # since coreutil*-native may not have been built (${bindir}/env may not exist) + # and with long paths, we can end up running into an issue where the + # interpreter line is too long, hence we use /usr/bin/env from the host. + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:/usr/bin/env\ python:g $i + fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi
@@ -59,6 +65,12 @@ distutils_do_install() { for i in ${D}${sbindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + else + # The former ${bindir}/env is not a good idea for apps requiring native-python + # since coreutil*-native may not have been built (${bindir}/env may not exist) + # and with long paths, we can end up running into an issue where the + # interpreter line is too long, hence we use /usr/bin/env from the host. + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:/usr/bin/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done
Signature · 1 line
1.8.1.2
PATCH 5/7 lttng-ust: add python to lttng-ust's RDEPENDS
In reply to Hongxu Jia| Note: adding Smart RPM DB channel | | Note: to be installed: run-postinsts@x86_64 kernel-modules@qemux86_64 packagegroup-core-boot@qemux86_64 lttng-ust@x86_64 | Loading cache... | Updating cache... ######################################## [100%] | | Computing transaction...error: Can't install lttng-ust-2:2.3.0-r0.0@x86_64: no package provides /usr/bin/python | | Saving cache... | | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_rootfs (log file is located at tmp/work/qemux86_64-wrs-linux/wrlinux-image-glibc-small/1.0-r1/temp/do_rootfs/log.do_rootfs.13619)
--- meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb +1 -0
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ inherit autotools lib_package DEPENDS = "liburcu util-linux" +RDEPENDS_${PN} = "python" # For backwards compatibility after rename RPROVIDES_${PN} = "lttng2-ust"
Signature · 1 line
1.8.1.2
PATCH 6/7 libpam: fix multilib packaging issue for pam-plugins
In reply to Hongxu JiaFrom: Ming Liu <[email protected]>
libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build.
pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag.
I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes.
In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique.
In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam.
One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed.
So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins.
Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want.
If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.)
--- meta/recipes-extended/pam/libpam_1.1.6.bb | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)
meta/recipes-extended/pam/libpam_1.1.6.bb +25 -4
@@ -62,9 +62,12 @@ FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" PACKAGES_DYNAMIC += "^pam-plugin-.*" -RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix" -RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils" -RRECOMMENDS_${PN} = "libpam-runtime" +RPROVIDES_${PN} += "libpam-${baselib}" +RPROVIDES_${PN}-runtime += "libpam-runtime-${baselib}" + +RDEPENDS_${PN}-runtime = "libpam-${baselib} pam-plugin-deny-${baselib} pam-plugin-permit-${baselib} pam-plugin-warn-${baselib} pam-plugin-unix-${baselib}" +RDEPENDS_${PN}-xtests = "libpam-${baselib} pam-plugin-access-${baselib} pam-plugin-debug-${baselib} pam-plugin-cracklib-${baselib} pam-plugin-pwhistory-${baselib} pam-plugin-succeed-if-${baselib} pam-plugin-time-${baselib} coreutils" +RRECOMMENDS_${PN} = "libpam-runtime-${baselib}" python populate_packages_prepend () { def pam_plugin_append_file(pn, dir, file):
@@ -74,12 +77,30 @@ python populate_packages_prepend () { nf = of + " " + nf d.setVar('FILES_' + pn, nf) + def pam_plugin_hook(file, pkg, pattern, format, basename): + baselib = d.getVar('baselib', True) + mlprefix = d.getVar('MLPREFIX', True) or '' + + rdeps = d.getVar('RDEPENDS_' + pkg, True) + if rdeps: + rdeps = rdeps + " " + mlprefix + "libpam-" + baselib + else: + rdeps = mlprefix + "libpam-" + baselib + d.setVar('RDEPENDS_' + pkg, rdeps) + + provides = d.getVar('RPROVIDES_' + pkg, True) + if provides: + provides = provides + " " + pkg + "-" + baselib + else: + provides = pkg + "-" + baselib + d.setVar('RPROVIDES_' + pkg, provides) + dvar = bb.data.expand('${WORKDIR}/package', d, True) pam_libdir = d.expand('${base_libdir}/security') pam_sbindir = d.expand('${sbindir}') pam_filterdir = d.expand('${base_libdir}/security/pam_filter') - do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='') + do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') mlprefix = d.getVar('MLPREFIX', True) or '' pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
Signature · 1 line
1.8.1.2
PATCH 7/7 e2fsprogs: Add e2fsprogs-mke2fs and e2fsprogs-e2fsck as recommend packages
In reply to Hongxu JiaFrom: Yue Tao <[email protected]>
The mke2fs and e2fsck commands are regular tools of e2fsprogs, so they should be installed.
--- meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +1 -0
@@ -55,6 +55,7 @@ do_install () { } RDEPENDS_e2fsprogs = "e2fsprogs-badblocks" +RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks" PACKAGES =+ "libcomerr libss libe2p libext2fs"
Signature · 1 line
1.8.1.2