diff options
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-py-init.patch | 27 | ||||
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.9.bb | 16 |
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 @@ | |||
| 1 | python/rpmmodules.c: Change the way the python module loads the RPM config | ||
| 2 | |||
| 3 | In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic | ||
| 4 | runtime relocation paths, we need to call rpmcliInit instead of | ||
| 5 | rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles | ||
| 6 | after the necessary relocation processing (if enabled). | ||
| 7 | |||
| 8 | Code derived from changes suggested by Paul Eggleton. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 13 | |||
| 14 | diff --git a/python/rpmmodule.c b/python/rpmmodule.c | ||
| 15 | index 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" | |||
| 43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" | 43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" |
| 44 | 44 | ||
| 45 | DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" | 45 | DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" |
| 46 | PR = "r52" | 46 | PR = "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 | ||
| 85 | SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" | 86 | SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" |
| @@ -107,7 +108,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," | |||
| 107 | 108 | ||
| 108 | WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ | 109 | WITH_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" |
| 112 | PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," | 113 | PACKAGECONFIG[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 | ||
| 190 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" | 191 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" |
| 191 | 192 | ||
| 192 | PACKAGES = "${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" | 193 | PACKAGES = "${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 | ||
| 194 | SOLIBS = "5.4.so" | 195 | SOLIBS = "5.4.so" |
| 195 | 196 | ||
| @@ -302,9 +303,12 @@ RDEPENDS_${PN} = "base-files" | |||
| 302 | RDEPENDS_${PN}_class-native = "" | 303 | RDEPENDS_${PN}_class-native = "" |
| 303 | RDEPENDS_${PN}-build = "file" | 304 | RDEPENDS_${PN}-build = "file" |
| 304 | 305 | ||
| 305 | FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*" | 306 | RDEPENDS_python-rpm = "${PN}" |
| 306 | FILES_python-rpm-staticdev = "${libdir}/python*/rpm/*.a" | 307 | |
| 307 | FILES_python-rpm = "${libdir}/python*/rpm" | 308 | FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*" |
| 309 | FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la" | ||
| 310 | FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a" | ||
| 311 | FILES_python-rpm = "${libdir}/python*/site-packages/rpm" | ||
| 308 | 312 | ||
| 309 | FILES_perl-module-rpm = "${libdir}/perl/*/* \ | 313 | FILES_perl-module-rpm = "${libdir}/perl/*/* \ |
| 310 | " | 314 | " |
