diff options
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.bb | 195 |
1 files changed, 195 insertions, 0 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 new file mode 100644 index 0000000000..7c03b41fc8 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb | |||
| @@ -0,0 +1,195 @@ | |||
| 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.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 | " | ||
| 44 | |||
| 45 | PE = "1" | ||
| 46 | SRCREV = "3659b8a04f5b8bacf6535e0124e7fe23f15286bd" | ||
| 47 | |||
| 48 | S = "${WORKDIR}/git" | ||
| 49 | |||
| 50 | DEPENDS = "libgcrypt db file popt xz bzip2 elfutils python3" | ||
| 51 | DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" | ||
| 52 | |||
| 53 | inherit autotools gettext pkgconfig python3native | ||
| 54 | export PYTHON_ABI | ||
| 55 | |||
| 56 | AUTOTOOLS_AUXDIR = "${S}/build-aux" | ||
| 57 | |||
| 58 | # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe | ||
| 59 | EXTRA_AUTORECONF_append = " --exclude=gnu-configize" | ||
| 60 | |||
| 61 | EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=libgcrypt" | ||
| 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)}" | ||
| 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 | |||
| 82 | ASNEEDED = "" | ||
| 83 | |||
| 84 | # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in | ||
| 85 | # libmagic also has sysroot path contamination, so override it | ||
| 86 | |||
| 87 | WRAPPER_TOOLS = " \ | ||
| 88 | ${bindir}/rpm \ | ||
| 89 | ${bindir}/rpm2archive \ | ||
| 90 | ${bindir}/rpm2cpio \ | ||
| 91 | ${bindir}/rpmbuild \ | ||
| 92 | ${bindir}/rpmdb \ | ||
| 93 | ${bindir}/rpmgraph \ | ||
| 94 | ${bindir}/rpmkeys \ | ||
| 95 | ${bindir}/rpmsign \ | ||
| 96 | ${bindir}/rpmspec \ | ||
| 97 | ${libdir}/rpm/rpmdeps \ | ||
| 98 | " | ||
| 99 | |||
| 100 | do_configure_prepend() { | ||
| 101 | mkdir -p ${S}/build-aux | ||
| 102 | } | ||
| 103 | |||
| 104 | do_install_append_class-native() { | ||
| 105 | for tool in ${WRAPPER_TOOLS}; do | ||
| 106 | test -x ${D}$tool && create_wrapper ${D}$tool \ | ||
| 107 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
| 108 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
| 109 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
| 110 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
| 111 | done | ||
| 112 | } | ||
| 113 | |||
| 114 | do_install_append_class-nativesdk() { | ||
| 115 | for tool in ${WRAPPER_TOOLS}; do | ||
| 116 | test -x ${D}$tool && create_wrapper ${D}$tool \ | ||
| 117 | RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ | ||
| 118 | RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ | ||
| 119 | MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ | ||
| 120 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
| 121 | done | ||
| 122 | |||
| 123 | rm -rf ${D}/var | ||
| 124 | |||
| 125 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
| 126 | install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh | ||
| 127 | } | ||
| 128 | |||
| 129 | # Rpm's make install creates var/tmp which clashes with base-files packaging | ||
| 130 | do_install_append_class-target() { | ||
| 131 | rm -rf ${D}/var | ||
| 132 | } | ||
| 133 | |||
| 134 | do_install_append () { | ||
| 135 | sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 136 | ${D}/${libdir}/rpm/macros | ||
| 137 | |||
| 138 | sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ | ||
| 139 | ${D}${libdir}/rpm/pythondistdeps.py | ||
| 140 | } | ||
| 141 | |||
| 142 | FILES_${PN} += "${libdir}/rpm-plugins/*.so \ | ||
| 143 | " | ||
| 144 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh" | ||
| 145 | |||
| 146 | FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ | ||
| 147 | " | ||
| 148 | PACKAGE_BEFORE_PN += "${PN}-build ${PN}-sign ${PN}-archive" | ||
| 149 | |||
| 150 | RRECOMMENDS_${PN} += "rpm-build rpm-sign rpm-archive" | ||
| 151 | |||
| 152 | FILES_${PN}-build = "\ | ||
| 153 | ${bindir}/rpmbuild \ | ||
| 154 | ${bindir}/gendiff \ | ||
| 155 | ${bindir}/rpmspec \ | ||
| 156 | ${libdir}/librpmbuild.so.* \ | ||
| 157 | ${libdir}/rpm/brp-* \ | ||
| 158 | ${libdir}/rpm/check-* \ | ||
| 159 | ${libdir}/rpm/debugedit \ | ||
| 160 | ${libdir}/rpm/sepdebugcrcfix \ | ||
| 161 | ${libdir}/rpm/find-debuginfo.sh \ | ||
| 162 | ${libdir}/rpm/find-lang.sh \ | ||
| 163 | ${libdir}/rpm/*provides* \ | ||
| 164 | ${libdir}/rpm/*requires* \ | ||
| 165 | ${libdir}/rpm/*deps* \ | ||
| 166 | ${libdir}/rpm/*.prov \ | ||
| 167 | ${libdir}/rpm/*.req \ | ||
| 168 | ${libdir}/rpm/config.* \ | ||
| 169 | ${libdir}/rpm/mkinstalldirs \ | ||
| 170 | ${libdir}/rpm/macros.p* \ | ||
| 171 | ${libdir}/rpm/fileattrs/* \ | ||
| 172 | " | ||
| 173 | |||
| 174 | FILES_${PN}-sign = "\ | ||
| 175 | ${bindir}/rpmsign \ | ||
| 176 | ${libdir}/librpmsign.so.* \ | ||
| 177 | " | ||
| 178 | |||
| 179 | FILES_${PN}-archive = "\ | ||
| 180 | ${bindir}/rpm2archive \ | ||
| 181 | " | ||
| 182 | |||
| 183 | PACKAGES += "python3-rpm" | ||
| 184 | PROVIDES += "python3-rpm" | ||
| 185 | FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" | ||
| 186 | |||
| 187 | RDEPENDS_${PN}-build = "bash perl python3-core" | ||
| 188 | |||
| 189 | PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" | ||
| 190 | |||
| 191 | # Do not specify a sysroot when compiling on a target. | ||
| 192 | rpm_package_preprocess () { | ||
| 193 | sed -i -e 's:--sysroot[^ ]*::g' \ | ||
| 194 | ${PKGD}/${libdir}/rpm/macros | ||
| 195 | } | ||
