diff options
author | Mark Hatle <mhatle@windriver.com> | 2010-08-20 08:32:08 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 23:39:31 +0100 |
commit | 5d2e88c3c233352d5724aa87b1fb6e08ac4693b4 (patch) | |
tree | 7b7fb5a7e60f02672c18b361afd0c66b7698f049 /meta | |
parent | 6c12afd57d2d25f532285cad6ab09a37eb3f548c (diff) | |
download | openembedded-core-5d2e88c3c233352d5724aa87b1fb6e08ac4693b4.tar.gz openembedded-core-5d2e88c3c233352d5724aa87b1fb6e08ac4693b4.tar.bz2 openembedded-core-5d2e88c3c233352d5724aa87b1fb6e08ac4693b4.zip |
rpm: Update the rpm integration to support per-file dependencies
Update the RPM package integration to support per-file dependencies
This adds additional configuration options to RPM, as well as provides
a helper script "perfile_rpmdeps.sh" that the build system can use to
gather the dependency information.
Signed-off-by: Mark Hatle <mhatle@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/rpm/rpm/no_parentdir_ordering.patch | 11 | ||||
-rwxr-xr-x | meta/packages/rpm/rpm/perfile_rpmdeps.sh | 50 | ||||
-rw-r--r-- | meta/packages/rpm/rpm_5.1.9.bb | 47 |
3 files changed, 103 insertions, 5 deletions
diff --git a/meta/packages/rpm/rpm/no_parentdir_ordering.patch b/meta/packages/rpm/rpm/no_parentdir_ordering.patch new file mode 100644 index 0000000000..2ceb020a4e --- /dev/null +++ b/meta/packages/rpm/rpm/no_parentdir_ordering.patch @@ -0,0 +1,11 @@ +--- rpm-5.1.9/lib/depends.c.orig 2009-04-12 12:46:17.000000000 -0700 ++++ rpm-5.1.9/lib/depends.c 2010-08-14 11:28:11.000000000 -0700 +@@ -2257,7 +2257,7 @@ + #define isAuto(_x) ((_x) & _autobits) + + /*@unchecked@*/ +-static int slashDepth = 100; /* #slashes pemitted in parentdir deps. */ ++static int slashDepth = 0; /* #slashes pemitted in parentdir deps. */ + + static int countSlashes(const char * dn) + /*@*/ diff --git a/meta/packages/rpm/rpm/perfile_rpmdeps.sh b/meta/packages/rpm/rpm/perfile_rpmdeps.sh new file mode 100755 index 0000000000..b72c9f0265 --- /dev/null +++ b/meta/packages/rpm/rpm/perfile_rpmdeps.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +: ${RPMDEPS:=rpmdeps} + +process() { + while read file_name ; do + printf "%s\t" ${file_name} + if [ ! -d $file_name ]; then + printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') + fi + printf "\n" + done +} + +usage() { + echo "$0 {-P|--provides} {-R|--requires} FILE ..." +} + +while [ $# -gt 0 ]; do + case "$1" in + --rpmdeps) + RPMDEPS=$2 + shift + shift + ;; + -R|--requires) + process_type=--requires + shift + ;; + -P|--provides) + process_type=--provides + shift + ;; + *) + break; + ;; + esac +done + +if [ -z "$process_type" ]; then + usage + exit 1 +fi + +if [ $# -gt 0 ]; then + find "$@" | process $process_type + exit $? +fi + +process $process_type diff --git a/meta/packages/rpm/rpm_5.1.9.bb b/meta/packages/rpm/rpm_5.1.9.bb index 9ba1126533..bf8ceb6d90 100644 --- a/meta/packages/rpm/rpm_5.1.9.bb +++ b/meta/packages/rpm/rpm_5.1.9.bb @@ -1,11 +1,14 @@ DESCRIPTION = "The RPM Package Manager - relaunched" +DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." HOMEPAGE = "http://rpm5.org/" LICENSE = "LGPL 2.1" -DEPENDS = "zlib perl popt beecrypt python libpcre" -PR = "r0" +DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" +PR = "r2" SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \ file://remove-compiled-tests.patch;apply=no \ + file://perfile_rpmdeps.sh \ + file://no_parentdir_ordering.patch \ " inherit autotools gettext @@ -19,6 +22,8 @@ EXTRA_OECONF = "--with-python=$PYTHONVER \ --with-python-lib-dir=${libdir}/python$PYTHONVER \ --with-db=internal \ --with-db-tools-integrated \ + --with-libelf \ + --with-file=internal \ --without-apidocs \ --without-selinux \ --without-lua \ @@ -26,12 +31,32 @@ EXTRA_OECONF = "--with-python=$PYTHONVER \ --without-efence \ --without-neon \ --with-pcre=${libdir} \ - --with-path-macros=${rpm_macros}" + --with-path-macros=${rpm_macros} \ + --with-bugreport=http://bugzilla.pokylinux.org" CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" -PACKAGES += "python-rpm" -FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*" +PACKAGES =+ "rpm-build python-rpm python-rpm-dbg" + +SOLIBS = "5.0.so" + +FILES_rpm-build = "${bindir}/*-rpmbuild \ + ${bindir}/*-gendiff \ + ${bindir}/*-rpmspecdump \ + ${libdir}/rpm/helpers/* \ + ${libdir}/rpm/*brp* \ + ${libdir}/rpm/*check-files \ + ${libdir}/rpm/*cross-build \ + ${libdir}/rpm/*debugedit \ + ${libdir}/rpm/*dep* \ + ${libdir}/rpm/*prov* \ + ${libdir}/rpm/*req* \ + ${libdir}/rpm/*find* \ + ${libdir}/rpm/qf/* \ + " + +FILES_python-rpm = "${libdir}/python*/rpm/_*" +FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" # The mutex needs to be POSIX/pthreads/library or we can't # share a database between host and target environments @@ -78,6 +103,18 @@ INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libd do_install_append() { ${INSTALL_ACTIONS} sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros + sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros + sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros + + install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh + + mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \ + ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py + } def rpm_python_version(d): |