diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-09-08 20:01:04 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-11 18:41:37 +0100 |
commit | c3189b9efeace692965b409d8588cb3833e53f5b (patch) | |
tree | 157412f00e129d4d0c0c08ae4e768cb0807e5ed0 /meta/recipes-devtools/rpm/rpm_4.17.0.bb | |
parent | 6500c74e6276bb7baa4c94057c6e0d1651607e30 (diff) | |
download | poky-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.17.0.bb')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.17.0.bb | 202 |
1 files changed, 202 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.17.0.bb b/meta/recipes-devtools/rpm/rpm_4.17.0.bb new file mode 100644 index 0000000000..00e480b170 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.17.0.bb | |||
@@ -0,0 +1,202 @@ | |||
1 | SUMMARY = "The RPM package management system" | ||
2 | DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ | ||
3 | package management system capable of installing, uninstalling, \ | ||
4 | verifying, querying, and updating software packages. Each software \ | ||
5 | package consists of an archive of files along with information about \ | ||
6 | the package like its version, a description, etc." | ||
7 | |||
8 | SUMMARY:${PN}-dev = "Development files for manipulating RPM packages" | ||
9 | DESCRIPTION:${PN}-dev = "This package contains the RPM C library and header files. These \ | ||
10 | development files will simplify the process of writing programs that \ | ||
11 | manipulate RPM packages and databases. These files are intended to \ | ||
12 | simplify the process of creating graphical package managers or any \ | ||
13 | other tools that need an intimate knowledge of RPM packages in order \ | ||
14 | to function." | ||
15 | |||
16 | SUMMARY:python3-rpm = "Python bindings for apps which will manupulate RPM packages" | ||
17 | DESCRIPTION:python3-rpm = "The python3-rpm package contains a module that permits applications \ | ||
18 | written in the Python programming language to use the interface \ | ||
19 | supplied by the RPM Package Manager libraries." | ||
20 | |||
21 | HOMEPAGE = "http://www.rpm.org" | ||
22 | |||
23 | # libraries are also LGPL - how to express this? | ||
24 | LICENSE = "GPL-2.0" | ||
25 | LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f" | ||
26 | |||
27 | SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.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-Add-a-color-setting-for-mips64_n32-binaries.patch \ | ||
36 | file://0001-perl-disable-auto-reqs.patch \ | ||
37 | file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ | ||
38 | file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \ | ||
39 | file://0001-tools-Add-error.h-for-non-glibc-case.patch \ | ||
40 | file://0001-docs-do-not-build-manpages-requires-pandoc.patch \ | ||
41 | file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ | ||
42 | " | ||
43 | |||
44 | PE = "1" | ||
45 | SRCREV = "3e74e8ba2dd5e76a5353d238dc7fc38651ce27b3" | ||
46 | |||
47 | S = "${WORKDIR}/git" | ||
48 | |||
49 | DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3" | ||
50 | DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native" | ||
51 | |||
52 | inherit autotools gettext pkgconfig python3native | ||
53 | export PYTHON_ABI | ||
54 | |||
55 | AUTOTOOLS_AUXDIR = "${S}/build-aux" | ||
56 | |||
57 | # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe | ||
58 | EXTRA_AUTORECONF:append = " --exclude=gnu-configize" | ||
59 | |||
60 | # Vendor is detected differently on x86 and aarch64 hosts and can feed into target packages | ||
61 | EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt --with-vendor=pc" | ||
62 | EXTRA_OECONF:append:libc-musl = " --disable-nls --disable-openmp" | ||
63 | |||
64 | # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs | ||
65 | # --localstatedir prevents rpm from writing its database to native sysroot when building images | ||
66 | # Forcibly disable plugins for native/nativesdk, as the inhibit and prioreset | ||
67 | # plugins both behave badly inside builds. | ||
68 | EXTRA_OECONF:append:class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" | ||
69 | EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins" | ||
70 | |||
71 | BBCLASSEXTEND = "native nativesdk" | ||
72 | |||
73 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd" | ||
74 | # The inhibit plugin serves no purpose outside of the target | ||
75 | PACKAGECONFIG:remove:class-native = "inhibit" | ||
76 | PACKAGECONFIG:remove:class-nativesdk = "inhibit" | ||
77 | |||
78 | PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" | ||
79 | PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus" | ||
80 | PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive" | ||
81 | PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3" | ||
82 | PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb" | ||
83 | PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro" | ||
84 | PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd" | ||
85 | |||
86 | ASNEEDED = "" | ||
87 | |||
88 | # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in | ||
89 | # libmagic also has sysroot path contamination, so override it | ||
90 | |||
91 | WRAPPER_TOOLS = " \ | ||
92 | ${bindir}/rpm \ | ||
93 | ${bindir}/rpm2archive \ | ||
94 | ${bindir}/rpm2cpio \ | ||
95 | ${bindir}/rpmbuild \ | ||
96 | ${bindir}/rpmdb \ | ||
97 | ${bindir}/rpmgraph \ | ||
98 | ${bindir}/rpmkeys \ | ||
99 | ${bindir}/rpmsign \ | ||
100 | ${bindir}/rpmspec \ | ||
101 | ${libdir}/rpm/rpmdeps \ | ||
102 | " | ||
103 | |||
104 | do_configure:prepend() { | ||
105 | mkdir -p ${S}/build-aux | ||
106 | } | ||
107 | |||
108 | do_install:append:class-native() { | ||
109 | for tool in ${WRAPPER_TOOLS}; do | ||
110 | test -x ${D}$tool && create_wrapper ${D}$tool \ | ||
111 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
112 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
113 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
114 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
115 | done | ||
116 | } | ||
117 | |||
118 | do_install:append:class-nativesdk() { | ||
119 | for tool in ${WRAPPER_TOOLS}; do | ||
120 | test -x ${D}$tool && create_wrapper ${D}$tool \ | ||
121 | RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
122 | RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ | ||
123 | MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ | ||
124 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
125 | done | ||
126 | |||
127 | rm -rf ${D}/var | ||
128 | |||
129 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
130 | install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh | ||
131 | } | ||
132 | |||
133 | # Rpm's make install creates var/tmp which clashes with base-files packaging | ||
134 | do_install:append:class-target() { | ||
135 | rm -rf ${D}/var | ||
136 | } | ||
137 | |||
138 | do_install:append () { | ||
139 | sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
140 | ${D}/${libdir}/rpm/macros | ||
141 | |||
142 | } | ||
143 | |||
144 | FILES:${PN} += "${libdir}/rpm-plugins/*.so \ | ||
145 | " | ||
146 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh" | ||
147 | |||
148 | FILES:${PN}-dev += "${libdir}/rpm-plugins/*.la \ | ||
149 | " | ||
150 | PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" | ||
151 | |||
152 | RRECOMMENDS:${PN} += "rpm-sign rpm-archive" | ||
153 | |||
154 | FILES:${PN}-build = "\ | ||
155 | ${bindir}/rpmbuild \ | ||
156 | ${bindir}/gendiff \ | ||
157 | ${bindir}/rpmspec \ | ||
158 | ${libdir}/librpmbuild.so.* \ | ||
159 | ${libdir}/rpm/brp-* \ | ||
160 | ${libdir}/rpm/check-* \ | ||
161 | ${libdir}/rpm/debugedit \ | ||
162 | ${libdir}/rpm/sepdebugcrcfix \ | ||
163 | ${libdir}/rpm/find-debuginfo.sh \ | ||
164 | ${libdir}/rpm/find-lang.sh \ | ||
165 | ${libdir}/rpm/*provides* \ | ||
166 | ${libdir}/rpm/*requires* \ | ||
167 | ${libdir}/rpm/*deps* \ | ||
168 | ${libdir}/rpm/*.prov \ | ||
169 | ${libdir}/rpm/*.req \ | ||
170 | ${libdir}/rpm/config.* \ | ||
171 | ${libdir}/rpm/mkinstalldirs \ | ||
172 | ${libdir}/rpm/macros.p* \ | ||
173 | ${libdir}/rpm/fileattrs/* \ | ||
174 | " | ||
175 | |||
176 | FILES:${PN}-sign = "\ | ||
177 | ${bindir}/rpmsign \ | ||
178 | ${libdir}/librpmsign.so.* \ | ||
179 | " | ||
180 | |||
181 | FILES:${PN}-archive = "\ | ||
182 | ${bindir}/rpm2archive \ | ||
183 | " | ||
184 | |||
185 | PACKAGES += "python3-rpm" | ||
186 | PROVIDES += "python3-rpm" | ||
187 | FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" | ||
188 | |||
189 | RDEPENDS:${PN}-build = "bash perl python3-core" | ||
190 | |||
191 | PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" | ||
192 | |||
193 | # Do not specify a sysroot when compiling on a target. | ||
194 | rpm_package_preprocess () { | ||
195 | sed -i -e 's:--sysroot[^ ]*::g' \ | ||
196 | ${PKGD}/${libdir}/rpm/macros | ||
197 | } | ||
198 | |||
199 | SSTATE_HASHEQUIV_FILEMAP = " \ | ||
200 | populate_sysroot:*/rpm/macros:${TMPDIR} \ | ||
201 | populate_sysroot:*/rpm/macros:${COREBASE} \ | ||
202 | " | ||