aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_git.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2016-12-30 18:38:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-13 09:43:21 +0000
commit2358e786ec8d1199d90e181eb5d8d00816f669b4 (patch)
tree98ef5b7f4b70024d61f3c6f1bcb01858eace612c /meta/recipes-devtools/rpm/rpm_git.bb
parentb842c9bf5cabb1af538720269f13946a87822f98 (diff)
downloadopenembedded-core-contrib-2358e786ec8d1199d90e181eb5d8d00816f669b4.tar.gz
openembedded-core-contrib-2358e786ec8d1199d90e181eb5d8d00816f669b4.tar.bz2
openembedded-core-contrib-2358e786ec8d1199d90e181eb5d8d00816f669b4.zip
rpm: add a 4.x recipe
The dnf stack is written and tested against rpm 4.x. So if we want to use dnf for packaging, we should also use rpm 4 - there's simply too much work involved in making rpm 5 work with it due to significant API differences, and supporting that going forward. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_git.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_git.bb108
1 files changed, 108 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb
new file mode 100644
index 0000000000..22a4e71a80
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -0,0 +1,108 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://www.rpm.org"
+
+# libraries are also LGPL - how to express this?
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f5259151d26ff18e78023450a5ac8d96"
+
+SRC_URI = "git://github.com/rpm-software-management/rpm \
+ file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
+ file://0001-Do-not-read-config-files-from-HOME.patch \
+ file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
+ file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
+ file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
+ file://0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch \
+ file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
+ file://0001-Fix-build-with-musl-C-library.patch \
+ file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
+ "
+
+PV = "4.13.90+git${SRCPV}"
+PE = "1"
+SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "nss libarchive db file popt xz dbus elfutils python"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit autotools gettext pkgconfig pythonnative
+
+# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
+EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
+
+EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append_libc-musl = " --disable-nls"
+
+# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
+#
+# --localstatedir prevents rpm from writing its database to native sysroot when building images
+#
+# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+
+BBCLASSEXTEND = "native"
+
+# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
+# libmagic also has sysroot path contamination, so override it
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/rpmbuild \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+ create_wrapper ${D}/${bindir}/rpmsign \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+ create_wrapper ${D}/${bindir}/rpmkeys \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+
+ create_wrapper ${D}/${bindir}/rpm \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+}
+
+
+# Rpm's make install creates var/tmp which clashes with base-files packaging
+do_install_append_class-target() {
+ rm -rf ${D}/var
+}
+
+FILES_${PN} += "${libdir}/rpm-plugins/*.so \
+ "
+
+FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
+ "
+
+PACKAGES += "python-rpm"
+PROVIDES += "python-rpm"
+FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
+