summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mhatle@windriver.com>2010-08-20 08:32:08 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-20 23:39:31 +0100
commit5d2e88c3c233352d5724aa87b1fb6e08ac4693b4 (patch)
tree7b7fb5a7e60f02672c18b361afd0c66b7698f049 /meta
parent6c12afd57d2d25f532285cad6ab09a37eb3f548c (diff)
downloadpoky-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')
-rw-r--r--meta/packages/rpm/rpm/no_parentdir_ordering.patch11
-rwxr-xr-xmeta/packages/rpm/rpm/perfile_rpmdeps.sh50
-rw-r--r--meta/packages/rpm/rpm_5.1.9.bb47
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
5process() {
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
15usage() {
16 echo "$0 {-P|--provides} {-R|--requires} FILE ..."
17}
18
19while [ $# -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
38done
39
40if [ -z "$process_type" ]; then
41 usage
42 exit 1
43fi
44
45if [ $# -gt 0 ]; then
46 find "$@" | process $process_type
47 exit $?
48fi
49
50process $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 @@
1DESCRIPTION = "The RPM Package Manager - relaunched" 1DESCRIPTION = "The RPM Package Manager - relaunched"
2DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
2HOMEPAGE = "http://rpm5.org/" 3HOMEPAGE = "http://rpm5.org/"
3LICENSE = "LGPL 2.1" 4LICENSE = "LGPL 2.1"
4DEPENDS = "zlib perl popt beecrypt python libpcre" 5DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
5PR = "r0" 6PR = "r2"
6 7
7SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/${BPN}-${PV}.tar.gz \ 8SRC_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 "
10inherit autotools gettext 13inherit 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
31CFLAGS_append = " -DRPM_VENDOR_WINDRIVER" 37CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
32 38
33PACKAGES += "python-rpm" 39PACKAGES =+ "rpm-build python-rpm python-rpm-dbg"
34FILES_python-rpm = "${libdir}/python*/site-packages/rpm/_*" 40
41SOLIBS = "5.0.so"
42
43FILES_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
58FILES_python-rpm = "${libdir}/python*/rpm/_*"
59FILES_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
78do_install_append() { 103do_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
83def rpm_python_version(d): 120def rpm_python_version(d):