summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-10-04 13:54:13 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-18 16:42:02 +0000
commit4dd9d39dca1221792f963f7fa74da0d0221f12ef (patch)
treea447bfb51becc4c41c51535be7999cfe58eb97e6
parent9e0d3c0faa9cc80ce8f2ce0eb31dcd20ef875955 (diff)
downloadpoky-4dd9d39dca1221792f963f7fa74da0d0221f12ef.tar.gz
rpm: Slightly change the way python-rpm is constructed
If python support is enabled we want to make sure that the RPM python support is packaged properly. Move the components into the site-packages directory, move the .la files to a new -dev package. Add "rpm" as a dependency of python-rpm, otherwise rpm and the associated libraries won't be available. Fixup python wrapper to handle automatic relocation, as supported by the vendor WINDRIVER configuration. (Based on a patch from Paul Eggleton) (From OE-Core rev: cd0473a145cec51be736b6141b0b18a82b64d483) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-py-init.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb16
2 files changed, 37 insertions, 6 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
new file mode 100644
index 0000000000..b65abc24a0
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
@@ -0,0 +1,27 @@
1python/rpmmodules.c: Change the way the python module loads the RPM config
2
3In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic
4runtime relocation paths, we need to call rpmcliInit instead of
5rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles
6after the necessary relocation processing (if enabled).
7
8Code derived from changes suggested by Paul Eggleton.
9
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13
14diff --git a/python/rpmmodule.c b/python/rpmmodule.c
15index f7282bc..dde68ca 100644
16--- a/python/rpmmodule.c
17+++ b/python/rpmmodule.c
18@@ -392,7 +392,8 @@ void init_rpm(void)
19 if (Py_AtExit(rpm_exithook) == -1)
20 return;
21
22- rpmReadConfigFiles(NULL, NULL);
23+ const char *argv[1] = {"rpmmodule", 0};
24+ rpmcliInit(1, argv, NULL);
25
26 d = PyModule_GetDict(m);
27
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 072128403a..44f1ca1aeb 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" 45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
46PR = "r52" 46PR = "r53"
47 47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract... 49# in order to extract the distribution SRPM into a format we can extract...
@@ -80,6 +80,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
80 file://makefile-am-exec-hook.patch \ 80 file://makefile-am-exec-hook.patch \
81 file://rpm-stub-out-git_strerror.patch \ 81 file://rpm-stub-out-git_strerror.patch \
82 file://rpm-db_buffer_small.patch \ 82 file://rpm-db_buffer_small.patch \
83 file://rpm-py-init.patch \
83 " 84 "
84 85
85SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" 86SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
@@ -107,7 +108,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
107 108
108WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ 109WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
109 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ 110 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
110 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \ 111 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
111 --without-pythonembed" 112 --without-pythonembed"
112PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," 113PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
113 114
@@ -189,7 +190,7 @@ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
189 190
190LDFLAGS_append_libc-uclibc = "-lrt -lpthread" 191LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
191 192
192PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" 193PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
193 194
194SOLIBS = "5.4.so" 195SOLIBS = "5.4.so"
195 196
@@ -302,9 +303,12 @@ RDEPENDS_${PN} = "base-files"
302RDEPENDS_${PN}_class-native = "" 303RDEPENDS_${PN}_class-native = ""
303RDEPENDS_${PN}-build = "file" 304RDEPENDS_${PN}-build = "file"
304 305
305FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" 306RDEPENDS_python-rpm = "${PN}"
306FILES_python-rpm-staticdev = "${libdir}/python*/rpm/*.a" 307
307FILES_python-rpm = "${libdir}/python*/rpm" 308FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*"
309FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
310FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
311FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
308 312
309FILES_perl-module-rpm = "${libdir}/perl/*/* \ 313FILES_perl-module-rpm = "${libdir}/perl/*/* \
310 " 314 "