summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_4.19.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_4.19.1.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.19.1.bb197
1 files changed, 197 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
new file mode 100644
index 0000000000..af11dec5ef
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
@@ -0,0 +1,197 @@
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-only"
25LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
26
27SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;protocol=https \
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-Add-a-color-setting-for-mips64_n32-binaries.patch \
35 file://0001-perl-disable-auto-reqs.patch \
36 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
37 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
38 file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
39 file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \
40 file://0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch \
41 file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \
42 file://0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch \
43 file://0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch \
44 "
45
46PE = "1"
47SRCREV = "98b301ebb44fb5cabb56fc24bc3aaa437c47c038"
48
49S = "${WORKDIR}/git"
50
51DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd"
52DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
53
54EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF"
55
56# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
57# --localstatedir prevents rpm from writing its database to native sysroot when building images
58EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var"
59EXTRA_OECMAKE:append:class-nativesdk = " -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc"
60
61inherit cmake gettext pkgconfig python3targetconfig
62OECMAKE_GENERATOR = "Unix Makefiles"
63
64BBCLASSEXTEND = "native nativesdk"
65
66PACKAGECONFIG ??= "internal-openpgp"
67
68PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
69PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF"
70
71# Deprecated! https://fedoraproject.org/wiki/Changes/RpmSequoia
72PACKAGECONFIG[internal-openpgp] = "-DWITH_INTERNAL_OPENPGP=ON,-DWITH_INTERNAL_OPENPGP=OFF"
73
74PACKAGECONFIG[cap] = "-DWITH_CAP=ON,-DWITH_CAP=OFF"
75PACKAGECONFIG[acl] = "-DWITH_ACL=ON,-DWITH_ACL=OFF"
76PACKAGECONFIG[archive] = "-DWITH_ARCHIVE=ON,-DWITH_ARCHIVE=OFF,libarchive"
77PACKAGECONFIG[selinux] = "-DWITH_SELINUX=ON,-DWITH_SELINUX=OFF"
78PACKAGECONFIG[dbus] = "-DWITH_DBUS=ON,-DWITH_DBUS=OFF"
79PACKAGECONFIG[audit] = "-DWITH_AUDIT=ON,-DWITH_AUDIT=OFF"
80PACKAGECONFIG[fsverity] = "-DWITH_FSVERITY=ON,-DWITH_FSVERITY=OFF"
81PACKAGECONFIG[imaevm] = "-DWITH_IMAEVM=ON,-DWITH_IMAEVM=OFF"
82PACKAGECONFIG[fapolicyd] = "-DWITH_FAPOLICYD=ON,-DWITH_FAPOLICYD=OFF"
83PACKAGECONFIG[readline] = "-DWITH_READLINE=ON,-DWITH_READLINE=OFF,readline"
84
85# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
86# libmagic also has sysroot path contamination, so override it
87
88WRAPPER_TOOLS = " \
89 ${bindir}/rpm \
90 ${bindir}/rpm2archive \
91 ${bindir}/rpm2cpio \
92 ${bindir}/rpmbuild \
93 ${bindir}/rpmdb \
94 ${bindir}/rpmgraph \
95 ${bindir}/rpmkeys \
96 ${bindir}/rpmsign \
97 ${bindir}/rpmspec \
98 ${libdir}/rpm/rpmdeps \
99"
100
101do_install:append:class-native() {
102 for tool in ${WRAPPER_TOOLS}; do
103 test -x ${D}$tool && create_wrapper ${D}$tool \
104 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
105 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
106 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
107 RPM_NO_CHROOT_FOR_SCRIPTS=1
108 done
109}
110
111do_install:append:class-nativesdk() {
112 rm -rf ${D}/var
113
114 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
115 cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh
116 export RPM_CONFIGDIR="${libdir}/rpm"
117 export RPM_ETCCONFIGDIR="${SDKPATHNATIVE}"
118 export RPM_NO_CHROOT_FOR_SCRIPTS=1
119 EOF
120}
121
122# Rpm's make install creates var/tmp which clashes with base-files packaging
123do_install:append:class-target() {
124 rm -rf ${D}/var
125}
126do_install:append:class-nativesdk() {
127 rm -rf ${D}${SDKPATHNATIVE}/var
128 # Ensure find-debuginfo is located correctly inside SDK
129 mkdir -p ${D}${libdir}/rpm
130 echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${libdir}/rpm/macros
131}
132
133do_install:append () {
134 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
135 -e 's:${STAGING_DIR_NATIVE}/::g' \
136 ${D}/${libdir}/rpm/macros
137
138}
139
140FILES:${PN} += "${libdir}/rpm-plugins/*.so \
141 "
142FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh"
143
144FILES:${PN}-dev += "${libdir}/rpm-plugins/*.la \
145 "
146PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive"
147
148RRECOMMENDS:${PN} += "rpm-sign rpm-archive"
149
150FILES:${PN}-build = "\
151 ${bindir}/rpmbuild \
152 ${bindir}/gendiff \
153 ${bindir}/rpmspec \
154 ${libdir}/librpmbuild.so.* \
155 ${libdir}/rpm/brp-* \
156 ${libdir}/rpm/check-* \
157 ${libdir}/rpm/sepdebugcrcfix \
158 ${libdir}/rpm/find-lang.sh \
159 ${libdir}/rpm/sysusers.sh \
160 ${libdir}/rpm/*provides* \
161 ${libdir}/rpm/*requires* \
162 ${libdir}/rpm/*deps* \
163 ${libdir}/rpm/*.prov \
164 ${libdir}/rpm/*.req \
165 ${libdir}/rpm/config.* \
166 ${libdir}/rpm/mkinstalldirs \
167 ${libdir}/rpm/macros.p* \
168 ${libdir}/rpm/fileattrs/* \
169"
170
171FILES:${PN}-sign = "\
172 ${bindir}/rpmsign \
173 ${libdir}/librpmsign.so.* \
174"
175
176FILES:${PN}-archive = "\
177 ${bindir}/rpm2archive \
178"
179
180PACKAGES += "python3-rpm"
181PROVIDES += "python3-rpm"
182FILES:python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/* ${PYTHON_SITEPACKAGES_DIR}/rpm-*.egg-info"
183
184RDEPENDS:${PN}-build = "bash perl python3-core debugedit"
185
186PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
187
188# Do not specify a sysroot when compiling on a target.
189rpm_package_preprocess () {
190 sed -i -e 's:--sysroot[^ ]*::g' \
191 ${PKGD}/${libdir}/rpm/macros
192}
193
194SSTATE_HASHEQUIV_FILEMAP = " \
195 populate_sysroot:*/rpm/macros:${TMPDIR} \
196 populate_sysroot:*/rpm/macros:${COREBASE} \
197 "