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/packages | |
parent | 6c12afd57d2d25f532285cad6ab09a37eb3f548c (diff) | |
download | poky-5d2e88c3c233352d5724aa87b1fb6e08ac4693b4.tar.gz |
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/packages')
-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 @@ | |||
1 | --- rpm-5.1.9/lib/depends.c.orig 2009-04-12 12:46:17.000000000 -0700 | ||
2 | +++ rpm-5.1.9/lib/depends.c 2010-08-14 11:28:11.000000000 -0700 | ||
3 | @@ -2257,7 +2257,7 @@ | ||
4 | #define isAuto(_x) ((_x) & _autobits) | ||
5 | |||
6 | /*@unchecked@*/ | ||
7 | -static int slashDepth = 100; /* #slashes pemitted in parentdir deps. */ | ||
8 | +static int slashDepth = 0; /* #slashes pemitted in parentdir deps. */ | ||
9 | |||
10 | static int countSlashes(const char * dn) | ||
11 | /*@*/ | ||
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 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | : ${RPMDEPS:=rpmdeps} | ||
4 | |||
5 | process() { | ||
6 | while read file_name ; do | ||
7 | printf "%s\t" ${file_name} | ||
8 | if [ ! -d $file_name ]; then | ||
9 | printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g') | ||
10 | fi | ||
11 | printf "\n" | ||
12 | done | ||
13 | } | ||
14 | |||
15 | usage() { | ||
16 | echo "$0 {-P|--provides} {-R|--requires} FILE ..." | ||
17 | } | ||
18 | |||
19 | while [ $# -gt 0 ]; do | ||
20 | case "$1" in | ||
21 | --rpmdeps) | ||
22 | RPMDEPS=$2 | ||
23 | shift | ||
24 | shift | ||
25 | ;; | ||
26 | -R|--requires) | ||
27 | process_type=--requires | ||
28 | shift | ||
29 | ;; | ||
30 | -P|--provides) | ||
31 | process_type=--provides | ||
32 | shift | ||
33 | ;; | ||
34 | *) | ||
35 | break; | ||
36 | ;; | ||
37 | esac | ||
38 | done | ||
39 | |||
40 | if [ -z "$process_type" ]; then | ||
41 | usage | ||
42 | exit 1 | ||
43 | fi | ||
44 | |||
45 | if [ $# -gt 0 ]; then | ||
46 | find "$@" | process $process_type | ||
47 | exit $? | ||
48 | fi | ||
49 | |||
50 | 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 @@ | |||
1 | DESCRIPTION = "The RPM Package Manager - relaunched" | 1 | DESCRIPTION = "The RPM Package Manager - relaunched" |
2 | DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands." | ||
2 | HOMEPAGE = "http://rpm5.org/" | 3 | HOMEPAGE = "http://rpm5.org/" |
3 | LICENSE = "LGPL 2.1" | 4 | LICENSE = "LGPL 2.1" |
4 | DEPENDS = "zlib perl popt beecrypt python libpcre" | 5 | DEPENDS = "zlib perl popt beecrypt python libpcre elfutils" |
5 | PR = "r0" | 6 | PR = "r2" |
6 | 7 | ||
7 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \ | 8 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \ |
8 | file://remove-compiled-tests.patch;apply=no \ | 9 | file://remove-compiled-tests.patch;apply=no \ |
10 | file://perfile_rpmdeps.sh \ | ||
11 | file://no_parentdir_ordering.patch \ | ||
9 | " | 12 | " |
10 | inherit autotools gettext | 13 | inherit autotools gettext |
11 | 14 | ||
@@ -19,6 +22,8 @@ EXTRA_OECONF = "--with-python=$PYTHONVER \ | |||
19 | --with-python-lib-dir=${libdir}/python$PYTHONVER \ | 22 | --with-python-lib-dir=${libdir}/python$PYTHONVER \ |
20 | --with-db=internal \ | 23 | --with-db=internal \ |
21 | --with-db-tools-integrated \ | 24 | --with-db-tools-integrated \ |
25 | --with-libelf \ | ||
26 | --with-file=internal \ | ||
22 | --without-apidocs \ | 27 | --without-apidocs \ |
23 | --without-selinux \ | 28 | --without-selinux \ |
24 | --without-lua \ | 29 | --without-lua \ |
@@ -26,12 +31,32 @@ EXTRA_OECONF = "--with-python=$PYTHONVER \ | |||
26 | --without-efence \ | 31 | --without-efence \ |
27 | --without-neon \ | 32 | --without-neon \ |
28 | --with-pcre=${libdir} \ | 33 | --with-pcre=${libdir} \ |
29 | --with-path-macros=${rpm_macros}" | 34 | --with-path-macros=${rpm_macros} \ |
35 | --with-bugreport=http://bugzilla.pokylinux.org" | ||
30 | 36 | ||
31 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" | 37 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" |
32 | 38 | ||
33 | PACKAGES += "python-rpm" | 39 | PACKAGES =+ "rpm-build python-rpm python-rpm-dbg" |
34 | FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*" | 40 | |
41 | SOLIBS = "5.0.so" | ||
42 | |||
43 | FILES_rpm-build = "${bindir}/*-rpmbuild \ | ||
44 | ${bindir}/*-gendiff \ | ||
45 | ${bindir}/*-rpmspecdump \ | ||
46 | ${libdir}/rpm/helpers/* \ | ||
47 | ${libdir}/rpm/*brp* \ | ||
48 | ${libdir}/rpm/*check-files \ | ||
49 | ${libdir}/rpm/*cross-build \ | ||
50 | ${libdir}/rpm/*debugedit \ | ||
51 | ${libdir}/rpm/*dep* \ | ||
52 | ${libdir}/rpm/*prov* \ | ||
53 | ${libdir}/rpm/*req* \ | ||
54 | ${libdir}/rpm/*find* \ | ||
55 | ${libdir}/rpm/qf/* \ | ||
56 | " | ||
57 | |||
58 | FILES_python-rpm = "${libdir}/python*/rpm/_*" | ||
59 | FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" | ||
35 | 60 | ||
36 | # The mutex needs to be POSIX/pthreads/library or we can't | 61 | # The mutex needs to be POSIX/pthreads/library or we can't |
37 | # share a database between host and target environments | 62 | # 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 | |||
78 | do_install_append() { | 103 | do_install_append() { |
79 | ${INSTALL_ACTIONS} | 104 | ${INSTALL_ACTIONS} |
80 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | 105 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros |
106 | sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros | ||
107 | sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros | ||
108 | sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros | ||
109 | sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros | ||
110 | sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros | ||
111 | sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros | ||
112 | |||
113 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh | ||
114 | |||
115 | mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \ | ||
116 | ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py | ||
117 | |||
81 | } | 118 | } |
82 | 119 | ||
83 | def rpm_python_version(d): | 120 | def rpm_python_version(d): |