diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-12-30 18:38:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-14 14:42:16 +0000 |
commit | 27d56eeebd8197e359aae0a7ccac74cb55ff794d (patch) | |
tree | b3cade20da193ee39424a6e410ddfcdd62bc38c8 /meta/recipes-devtools/rpm/rpm_git.bb | |
parent | 381c8e634c22321f9c27fae5b6f35e4204840719 (diff) | |
download | poky-27d56eeebd8197e359aae0a7ccac74cb55ff794d.tar.gz |
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.
(From OE-Core rev: 2358e786ec8d1199d90e181eb5d8d00816f669b4)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_git.bb')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_git.bb | 108 |
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 @@ | |||
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_python-rpm = "Python bindings for apps which will manupulate RPM packages" | ||
17 | DESCRIPTION_python-rpm = "The rpm-python 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=f5259151d26ff18e78023450a5ac8d96" | ||
26 | |||
27 | SRC_URI = "git://github.com/rpm-software-management/rpm \ | ||
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-When-nice-value-cannot-be-reset-issue-a-notice-inste.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 | " | ||
38 | |||
39 | PV = "4.13.90+git${SRCPV}" | ||
40 | PE = "1" | ||
41 | SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be" | ||
42 | |||
43 | S = "${WORKDIR}/git" | ||
44 | |||
45 | DEPENDS = "nss libarchive db file popt xz dbus elfutils python" | ||
46 | DEPENDS_append_class-native = " file-replacement-native" | ||
47 | |||
48 | inherit autotools gettext pkgconfig pythonnative | ||
49 | |||
50 | # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe | ||
51 | EXTRA_AUTORECONF_append = " --exclude=gnu-configize" | ||
52 | |||
53 | EXTRA_OECONF_append = " --without-lua --enable-python" | ||
54 | EXTRA_OECONF_append_libc-musl = " --disable-nls" | ||
55 | |||
56 | # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs | ||
57 | # | ||
58 | # --localstatedir prevents rpm from writing its database to native sysroot when building images | ||
59 | # | ||
60 | # Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus | ||
61 | EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" | ||
62 | |||
63 | BBCLASSEXTEND = "native" | ||
64 | |||
65 | # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in | ||
66 | # libmagic also has sysroot path contamination, so override it | ||
67 | do_install_append_class-native() { | ||
68 | create_wrapper ${D}/${bindir}/rpmbuild \ | ||
69 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
70 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
71 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
72 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
73 | |||
74 | create_wrapper ${D}/${bindir}/rpmsign \ | ||
75 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
76 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
77 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
78 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
79 | |||
80 | create_wrapper ${D}/${bindir}/rpmkeys \ | ||
81 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
82 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
83 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
84 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
85 | |||
86 | create_wrapper ${D}/${bindir}/rpm \ | ||
87 | RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ | ||
88 | RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ | ||
89 | MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ | ||
90 | RPM_NO_CHROOT_FOR_SCRIPTS=1 | ||
91 | } | ||
92 | |||
93 | |||
94 | # Rpm's make install creates var/tmp which clashes with base-files packaging | ||
95 | do_install_append_class-target() { | ||
96 | rm -rf ${D}/var | ||
97 | } | ||
98 | |||
99 | FILES_${PN} += "${libdir}/rpm-plugins/*.so \ | ||
100 | " | ||
101 | |||
102 | FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ | ||
103 | " | ||
104 | |||
105 | PACKAGES += "python-rpm" | ||
106 | PROVIDES += "python-rpm" | ||
107 | FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" | ||
108 | |||