Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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=c0bf017c0fd1920e6158a333acabfd4a" |
| 26 | |
| 27 | SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.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-Split-binary-package-building-into-a-separate-functi.patch \ |
| 38 | file://0002-Run-binary-package-creation-via-thread-pools.patch \ |
| 39 | file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ |
| 40 | file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ |
| 41 | file://0001-perl-disable-auto-reqs.patch \ |
| 42 | file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ |
| 43 | file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 44 | file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 45 | file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \ |
| 46 | file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 47 | " |
| 48 | |
| 49 | PE = "1" |
| 50 | SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa" |
| 51 | |
| 52 | S = "${WORKDIR}/git" |
| 53 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 54 | DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 55 | DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native" |
| 56 | |
| 57 | inherit autotools gettext pkgconfig python3native |
| 58 | export PYTHON_ABI |
| 59 | |
| 60 | # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe |
| 61 | EXTRA_AUTORECONF_append = " --exclude=gnu-configize" |
| 62 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 63 | EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 64 | EXTRA_OECONF_append_libc-musl = " --disable-nls" |
| 65 | |
| 66 | # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs |
| 67 | # |
| 68 | # --localstatedir prevents rpm from writing its database to native sysroot when building images |
| 69 | # |
| 70 | # Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. |
| 71 | # Also disable plugins by default for native. |
| 72 | EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" |
| 73 | EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" |
| 74 | |
| 75 | BBCLASSEXTEND = "native nativesdk" |
| 76 | |
| 77 | PACKAGECONFIG ??= "" |
| 78 | PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils" |
| 79 | |
| 80 | ASNEEDED = "" |
| 81 | |
| 82 | # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in |
| 83 | # libmagic also has sysroot path contamination, so override it |
| 84 | |
| 85 | WRAPPER_TOOLS = " \ |
| 86 | ${bindir}/rpm \ |
| 87 | ${bindir}/rpm2archive \ |
| 88 | ${bindir}/rpm2cpio \ |
| 89 | ${bindir}/rpmbuild \ |
| 90 | ${bindir}/rpmdb \ |
| 91 | ${bindir}/rpmgraph \ |
| 92 | ${bindir}/rpmkeys \ |
| 93 | ${bindir}/rpmsign \ |
| 94 | ${bindir}/rpmspec \ |
| 95 | ${libdir}/rpm/rpmdeps \ |
| 96 | " |
| 97 | |
| 98 | do_install_append_class-native() { |
| 99 | for tool in ${WRAPPER_TOOLS}; do |
| 100 | create_wrapper ${D}$tool \ |
| 101 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ |
| 102 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ |
| 103 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ |
| 104 | RPM_NO_CHROOT_FOR_SCRIPTS=1 |
| 105 | done |
| 106 | } |
| 107 | |
| 108 | do_install_append_class-nativesdk() { |
| 109 | for tool in ${WRAPPER_TOOLS}; do |
| 110 | create_wrapper ${D}$tool \ |
| 111 | RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ |
| 112 | RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ |
| 113 | MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ |
| 114 | RPM_NO_CHROOT_FOR_SCRIPTS=1 |
| 115 | done |
| 116 | |
| 117 | rm -rf ${D}/var |
| 118 | } |
| 119 | |
| 120 | # Rpm's make install creates var/tmp which clashes with base-files packaging |
| 121 | do_install_append_class-target() { |
| 122 | rm -rf ${D}/var |
| 123 | } |
| 124 | |
| 125 | do_install_append () { |
| 126 | sed -i -e 's:${HOSTTOOLS_DIR}/::g' \ |
| 127 | ${D}/${libdir}/rpm/macros |
| 128 | |
| 129 | sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \ |
| 130 | ${D}${libdir}/rpm/pythondistdeps.py \ |
| 131 | ${D}${libdir}/rpm/python-macro-helper |
| 132 | } |
| 133 | |
| 134 | FILES_${PN} += "${libdir}/rpm-plugins/*.so \ |
| 135 | " |
| 136 | |
| 137 | FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ |
| 138 | " |
| 139 | |
| 140 | PACKAGES += "python3-rpm" |
| 141 | PROVIDES += "python3-rpm" |
| 142 | FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" |
| 143 | |
| 144 | # rpm 5.x was packaging the rpm build tools separately |
| 145 | RPROVIDES_${PN} += "rpm-build" |
| 146 | |
| 147 | RDEPENDS_${PN} = "bash perl python3-core" |
| 148 | |
| 149 | PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess" |
| 150 | |
| 151 | # Do not specify a sysroot when compiling on a target. |
| 152 | rpm_package_preprocess () { |
| 153 | sed -i -e 's:--sysroot[^ ]*::g' \ |
| 154 | ${PKGD}/${libdir}/rpm/macros |
| 155 | } |