summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm')
-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 "