summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-08 20:01:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-11 18:41:37 +0100
commitc3189b9efeace692965b409d8588cb3833e53f5b (patch)
tree157412f00e129d4d0c0c08ae4e768cb0807e5ed0 /meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
parent6500c74e6276bb7baa4c94057c6e0d1651607e30 (diff)
downloadpoky-c3189b9efeace692965b409d8588cb3833e53f5b.tar.gz
rpm: update 4.16.1.3 -> 4.17.0
The flagship features are migration from bdb to sqlite and zstd support, both are enabled and taken into use. The relationship and upstream preference between sqlite and ndb formats isn't quite clear. Lua is now a hard dependency. Added packageconfig option for r/o support for bdb (that doesn't need bdb itself), but not enabled it as upstream marks it EXPERIMENTAL in capital letters. Drop sed adjustment for a file that is not anymore installed. Adjust oeqa test to check for sqlite database instead of bdb. Drop 0001-Fix-build-with-musl-C-library.patch (nss support removed upstream) 0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch (difficult to undersand and rebase; obsolete with the move to zstd) 0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch (upstream made the same change) Portions of 0001-tools-Add-error.h-for-non-glibc-case.patch dropped (upstream moved the files to a separate component). Added 0001-docs-do-not-build-manpages-requires-pandoc.patch to avoid pandoc dependency. Added 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch to restore reproducibility when compression thread amount varies between hosts. (From OE-Core rev: 6080fcf7e4f64faedd98ed26b65a3bc29ef08238) 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.16.1.3.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.16.1.3.bb203
1 files changed, 0 insertions, 203 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb b/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
deleted file mode 100644
index aa6b5ee8aa..0000000000
--- a/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
+++ /dev/null
@@ -1,203 +0,0 @@
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=c4eec0c20c6034b9407a09945b48a43f"
26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
28 file://environment.d-rpm.sh \
29 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
30 file://0001-Do-not-read-config-files-from-HOME.patch \
31 file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
32 file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
33 file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
34 file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
35 file://0001-Fix-build-with-musl-C-library.patch \
36 file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
37 file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
38 file://0001-perl-disable-auto-reqs.patch \
39 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
40 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
41 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
42 file://0001-tools-Add-error.h-for-non-glibc-case.patch \
43 file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
44 "
45
46PE = "1"
47SRCREV = "3659b8a04f5b8bacf6535e0124e7fe23f15286bd"
48
49S = "${WORKDIR}/git"
50
51DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
52DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
53
54inherit autotools gettext pkgconfig python3native
55export PYTHON_ABI
56
57AUTOTOOLS_AUXDIR = "${S}/build-aux"
58
59# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
60EXTRA_AUTORECONF:append = " --exclude=gnu-configize"
61
62# Vendor is detected differently on x86 and aarch64 hosts and can feed into target packages
63EXTRA_OECONF:append = " --without-lua --enable-python --with-crypto=libgcrypt --with-vendor=pc"
64EXTRA_OECONF:append:libc-musl = " --disable-nls --disable-openmp"
65
66# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
67# --localstatedir prevents rpm from writing its database to native sysroot when building images
68# Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset
69# plugins both behave badly inside builds.
70EXTRA_OECONF:append:class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
71EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins"
72
73BBCLASSEXTEND = "native nativesdk"
74
75PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
76# The inhibit plugin serves no purpose outside of the target
77PACKAGECONFIG:remove:class-native = "inhibit"
78PACKAGECONFIG:remove:class-nativesdk = "inhibit"
79
80PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"
81PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
82PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
83PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
84
85ASNEEDED = ""
86
87# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
88# libmagic also has sysroot path contamination, so override it
89
90WRAPPER_TOOLS = " \
91 ${bindir}/rpm \
92 ${bindir}/rpm2archive \
93 ${bindir}/rpm2cpio \
94 ${bindir}/rpmbuild \
95 ${bindir}/rpmdb \
96 ${bindir}/rpmgraph \
97 ${bindir}/rpmkeys \
98 ${bindir}/rpmsign \
99 ${bindir}/rpmspec \
100 ${libdir}/rpm/rpmdeps \
101"
102
103do_configure:prepend() {
104 mkdir -p ${S}/build-aux
105}
106
107do_install:append:class-native() {
108 for tool in ${WRAPPER_TOOLS}; do
109 test -x ${D}$tool && create_wrapper ${D}$tool \
110 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
111 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
112 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
113 RPM_NO_CHROOT_FOR_SCRIPTS=1
114 done
115}
116
117do_install:append:class-nativesdk() {
118 for tool in ${WRAPPER_TOOLS}; do
119 test -x ${D}$tool && create_wrapper ${D}$tool \
120 RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
121 RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \
122 MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \
123 RPM_NO_CHROOT_FOR_SCRIPTS=1
124 done
125
126 rm -rf ${D}/var
127
128 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
129 install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh
130}
131
132# Rpm's make install creates var/tmp which clashes with base-files packaging
133do_install:append:class-target() {
134 rm -rf ${D}/var
135}
136
137do_install:append () {
138 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
139 ${D}/${libdir}/rpm/macros
140
141 sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
142 ${D}${libdir}/rpm/pythondistdeps.py
143}
144
145FILES:${PN} += "${libdir}/rpm-plugins/*.so \
146 "
147FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh"
148
149FILES:${PN}-dev += "${libdir}/rpm-plugins/*.la \
150 "
151PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive"
152
153RRECOMMENDS:${PN} += "rpm-sign rpm-archive"
154
155FILES:${PN}-build = "\
156 ${bindir}/rpmbuild \
157 ${bindir}/gendiff \
158 ${bindir}/rpmspec \
159 ${libdir}/librpmbuild.so.* \
160 ${libdir}/rpm/brp-* \
161 ${libdir}/rpm/check-* \
162 ${libdir}/rpm/debugedit \
163 ${libdir}/rpm/sepdebugcrcfix \
164 ${libdir}/rpm/find-debuginfo.sh \
165 ${libdir}/rpm/find-lang.sh \
166 ${libdir}/rpm/*provides* \
167 ${libdir}/rpm/*requires* \
168 ${libdir}/rpm/*deps* \
169 ${libdir}/rpm/*.prov \
170 ${libdir}/rpm/*.req \
171 ${libdir}/rpm/config.* \
172 ${libdir}/rpm/mkinstalldirs \
173 ${libdir}/rpm/macros.p* \
174 ${libdir}/rpm/fileattrs/* \
175"
176
177FILES:${PN}-sign = "\
178 ${bindir}/rpmsign \
179 ${libdir}/librpmsign.so.* \
180"
181
182FILES:${PN}-archive = "\
183 ${bindir}/rpm2archive \
184"
185
186PACKAGES += "python3-rpm"
187PROVIDES += "python3-rpm"
188FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
189
190RDEPENDS:${PN}-build = "bash perl python3-core"
191
192PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
193
194# Do not specify a sysroot when compiling on a target.
195rpm_package_preprocess () {
196 sed -i -e 's:--sysroot[^ ]*::g' \
197 ${PKGD}/${libdir}/rpm/macros
198}
199
200SSTATE_HASHEQUIV_FILEMAP = " \
201 populate_sysroot:*/rpm/macros:${TMPDIR} \
202 populate_sysroot:*/rpm/macros:${COREBASE} \
203 "