summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_4.15.1.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-04-25 19:28:00 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-02 09:08:52 +0100
commit365f24bee16ba4e9386f89158df29d577f192668 (patch)
tree38b812cec83aad0c39272a8a1f174b0bb66df2cf /meta/recipes-devtools/rpm/rpm_4.15.1.bb
parentb55f765ae46eb08d9c92a862c6bc4b9044c0b42d (diff)
downloadpoky-365f24bee16ba4e9386f89158df29d577f192668.tar.gz
rpm: upgrade to 4.15.1
Drop patches that were merged upstream. 0001-mono-find-provides-requires-do-not-use-monodis-from-.patch modifies a file that was removed upstream. Add a 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch as unfortunately the new parallel file classification feature from upstream trips over somewhere in libmagic when inspected files are compressed: https://github.com/rpm-software-management/rpm/issues/756 (From OE-Core rev: 67257ca87c6fa8e6050a20ecea50daf834c7e869) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_4.15.1.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.15.1.bb149
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
new file mode 100644
index 0000000000..5c1190a3df
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -0,0 +1,149 @@
1SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
9DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
10development files will simplify the process of writing programs that \
11manipulate RPM packages and databases. These files are intended to \
12simplify the process of creating graphical package managers or any \
13other tools that need an intimate knowledge of RPM packages in order \
14to function."
15
16SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages"
17DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \
18written in the Python programming language to use the interface \
19supplied by the RPM Package Manager libraries."
20
21HOMEPAGE = "http://www.rpm.org"
22
23# libraries are also LGPL - how to express this?
24LICENSE = "GPL-2.0"
25LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
28 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
29 file://0001-Do-not-read-config-files-from-HOME.patch \
30 file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
31 file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
32 file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
33 file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
34 file://0001-Fix-build-with-musl-C-library.patch \
35 file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
36 file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
37 file://0001-perl-disable-auto-reqs.patch \
38 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
39 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
40 file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
41 file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
42 "
43
44PE = "1"
45SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
46
47S = "${WORKDIR}/git"
48
49DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3"
50DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
51
52inherit autotools gettext pkgconfig python3native
53export PYTHON_ABI
54
55# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
56EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
57
58EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl"
59EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp"
60
61# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
62#
63# --localstatedir prevents rpm from writing its database to native sysroot when building images
64#
65# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
66# Also disable plugins by default for native.
67EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
68EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
69
70BBCLASSEXTEND = "native nativesdk"
71
72PACKAGECONFIG ??= ""
73PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
74
75ASNEEDED = ""
76
77# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
78# libmagic also has sysroot path contamination, so override it
79
80WRAPPER_TOOLS = " \
81 ${bindir}/rpm \
82 ${bindir}/rpm2archive \
83 ${bindir}/rpm2cpio \
84 ${bindir}/rpmbuild \
85 ${bindir}/rpmdb \
86 ${bindir}/rpmgraph \
87 ${bindir}/rpmkeys \
88 ${bindir}/rpmsign \
89 ${bindir}/rpmspec \
90 ${libdir}/rpm/rpmdeps \
91"
92
93do_install_append_class-native() {
94 for tool in ${WRAPPER_TOOLS}; do
95 create_wrapper ${D}$tool \
96 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
97 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
98 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
99 RPM_NO_CHROOT_FOR_SCRIPTS=1
100 done
101}
102
103do_install_append_class-nativesdk() {
104 for tool in ${WRAPPER_TOOLS}; do
105 create_wrapper ${D}$tool \
106 RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
107 RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \
108 MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \
109 RPM_NO_CHROOT_FOR_SCRIPTS=1
110 done
111
112 rm -rf ${D}/var
113}
114
115# Rpm's make install creates var/tmp which clashes with base-files packaging
116do_install_append_class-target() {
117 rm -rf ${D}/var
118}
119
120do_install_append () {
121 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
122 ${D}/${libdir}/rpm/macros
123
124 sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
125 ${D}${libdir}/rpm/pythondistdeps.py
126}
127
128FILES_${PN} += "${libdir}/rpm-plugins/*.so \
129 "
130
131FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
132 "
133
134PACKAGES += "python3-rpm"
135PROVIDES += "python3-rpm"
136FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
137
138# rpm 5.x was packaging the rpm build tools separately
139RPROVIDES_${PN} += "rpm-build"
140
141RDEPENDS_${PN} = "bash perl python3-core"
142
143PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
144
145# Do not specify a sysroot when compiling on a target.
146rpm_package_preprocess () {
147 sed -i -e 's:--sysroot[^ ]*::g' \
148 ${PKGD}/${libdir}/rpm/macros
149}