1 |
commit: 188ca6ba0a28ffdcbb063d0bf126a2ed8769448b |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 5 01:13:04 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 5 01:13:25 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=188ca6ba |
7 |
|
8 |
app-arch/rpm: add 4.17.1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/830380 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
app-arch/rpm/Manifest | 1 + |
14 |
app-arch/rpm/rpm-4.17.1.ebuild | 161 +++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 162 insertions(+) |
16 |
|
17 |
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest |
18 |
index 949c468c6cc6..620e4e3efa8b 100644 |
19 |
--- a/app-arch/rpm/Manifest |
20 |
+++ b/app-arch/rpm/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST rpm-4.17.0.tar.bz2 4514138 BLAKE2B e2618f7ac59189fb880d6be853aae99080b5008865298d095a123a010ab70f9e2e3ad9402124afbf8291a3863e9e805c9c65ab47cc435df82a729e81984394bf SHA512 d32af8649c6d47796a645b6ecbe580df97f5423bfb17414d5ed0016373f5cfab86ebcfad6c480fb8bfafaf3a960f9bc095ef6faad7b40bdb208cc60e4080b0c8 |
23 |
+DIST rpm-4.17.1.tar.bz2 4642016 BLAKE2B d82926845e523c82fcf6a985d8de00f7a5bcc981e15d3115c310260713c482dc43e23b43f887644415b5a51ee382297d6d3569b6914595c91b9b89cc813af8e8 SHA512 d0429510140f25a25b6c9441abe2027d27c485bbd4969752f69e1c843435c9508b9f85e5bb68085dd64b7da533801aa5c04d8c9d962e08d2ddd3199d0265cc85 |
24 |
|
25 |
diff --git a/app-arch/rpm/rpm-4.17.1.ebuild b/app-arch/rpm/rpm-4.17.1.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..ac7a9dc24a1f |
28 |
--- /dev/null |
29 |
+++ b/app-arch/rpm/rpm-4.17.1.ebuild |
30 |
@@ -0,0 +1,161 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+LUA_COMPAT=( lua5-{3,4} ) |
37 |
+PYTHON_COMPAT=( python3_{8..10} ) |
38 |
+ |
39 |
+inherit autotools lua-single perl-module python-single-r1 toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="Red Hat Package Management Utils" |
42 |
+HOMEPAGE="https://rpm.org |
43 |
+ https://github.com/rpm-software-management/rpm" |
44 |
+SRC_URI="https://ftp.osuosl.org/pub/rpm/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2 |
45 |
+ http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2" |
46 |
+ |
47 |
+LICENSE="GPL-2 LGPL-2" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
50 |
+ |
51 |
+# Tests are broken. See bug 657500 |
52 |
+RESTRICT="test" |
53 |
+ |
54 |
+IUSE="acl audit caps +berkdb doc dbus nls openmp python selinux +sqlite test +zstd" |
55 |
+REQUIRED_USE="${LUA_REQUIRED_USE} |
56 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
57 |
+ |
58 |
+DEPEND="!app-arch/rpm5 |
59 |
+ app-arch/libarchive:= |
60 |
+ >=app-arch/bzip2-1.0.1 |
61 |
+ app-arch/xz-utils |
62 |
+ >=app-crypt/gnupg-1.2 |
63 |
+ >=dev-lang/perl-5.8.8 |
64 |
+ dev-libs/elfutils |
65 |
+ dev-libs/libgcrypt:= |
66 |
+ >=dev-libs/popt-1.7 |
67 |
+ sys-apps/file |
68 |
+ >=sys-libs/zlib-1.2.3-r1 |
69 |
+ virtual/libintl |
70 |
+ ${LUA_DEPS} |
71 |
+ acl? ( virtual/acl ) |
72 |
+ audit? ( sys-process/audit ) |
73 |
+ caps? ( >=sys-libs/libcap-2.0 ) |
74 |
+ dbus? ( sys-apps/dbus ) |
75 |
+ sqlite? ( dev-db/sqlite:3 ) |
76 |
+ python? ( ${PYTHON_DEPS} ) |
77 |
+ nls? ( virtual/libintl ) |
78 |
+ zstd? ( app-arch/zstd:= ) |
79 |
+" |
80 |
+BDEPEND=" |
81 |
+ virtual/pkgconfig |
82 |
+ doc? ( app-doc/doxygen ) |
83 |
+ nls? ( sys-devel/gettext ) |
84 |
+ test? ( sys-apps/fakechroot ) |
85 |
+" |
86 |
+RDEPEND="${DEPEND} |
87 |
+ selinux? ( sec-policy/selinux-rpm ) |
88 |
+" |
89 |
+ |
90 |
+PATCHES=( |
91 |
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch |
92 |
+ "${FILESDIR}"/${PN}-4.17.0-libdir.patch |
93 |
+) |
94 |
+ |
95 |
+pkg_pretend() { |
96 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
97 |
+} |
98 |
+ |
99 |
+pkg_setup() { |
100 |
+ lua-single_pkg_setup |
101 |
+ |
102 |
+ use python && python-single-r1_pkg_setup |
103 |
+ |
104 |
+ # Added USE=openmp and this check for bug #779769 |
105 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
106 |
+} |
107 |
+ |
108 |
+src_prepare() { |
109 |
+ default |
110 |
+ |
111 |
+ # bug #356769 |
112 |
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed" |
113 |
+ # bug #492642 |
114 |
+ sed -i "s:@__PYTHON@:${PYTHON}:" macros.in || die "Fixing %__python failed" |
115 |
+ |
116 |
+ # Prevent automake maintainer mode from kicking in (bug #450448). |
117 |
+ #touch -r Makefile.am preinstall.am || die |
118 |
+ |
119 |
+ eautoreconf |
120 |
+} |
121 |
+ |
122 |
+src_configure() { |
123 |
+ # rpm no longer supports berkdb, but has readonly support. |
124 |
+ # https://github.com/rpm-software-management/rpm/commit/4290300e24c5ab17c615b6108f38438e31eeb1d0 |
125 |
+ econf \ |
126 |
+ --without-selinux \ |
127 |
+ --disable-inhibit-plugin \ |
128 |
+ --with-crypto=libgcrypt \ |
129 |
+ $(use_enable berkdb bdb-ro) \ |
130 |
+ $(use_enable python) \ |
131 |
+ $(use_enable nls) \ |
132 |
+ $(use_enable openmp) \ |
133 |
+ $(use_enable dbus inhibit-plugin) \ |
134 |
+ $(use_enable sqlite) \ |
135 |
+ $(use_with caps cap) \ |
136 |
+ $(use_with acl) \ |
137 |
+ $(use_with audit) \ |
138 |
+ $(use_enable zstd zstd $(usex zstd yes no)) |
139 |
+} |
140 |
+ |
141 |
+src_test() { |
142 |
+ # Known to fail with FEATURES=usersandbox (bug #657500) |
143 |
+ if has usersandbox ${FEATURES} ; then |
144 |
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \ |
145 |
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!" |
146 |
+ fi |
147 |
+ |
148 |
+ emake check |
149 |
+} |
150 |
+ |
151 |
+src_install() { |
152 |
+ default |
153 |
+ |
154 |
+ # Remove la files |
155 |
+ find "${ED}" -name '*.la' -delete || die |
156 |
+ |
157 |
+ # Fix symlinks to /bin/rpm (bug #349840) |
158 |
+ for binary in rpmquery rpmverify; do |
159 |
+ ln -sf rpm "${ED}"/usr/bin/${binary} || die |
160 |
+ done |
161 |
+ |
162 |
+ if ! use nls; then |
163 |
+ rm -rf "${ED}"/usr/share/man/?? || die |
164 |
+ fi |
165 |
+ |
166 |
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD} |
167 |
+ |
168 |
+ dodoc CREDITS README* |
169 |
+ if use doc; then |
170 |
+ local docname |
171 |
+ for docname in librpm; do |
172 |
+ docinto "html/${docname}" |
173 |
+ dodoc -r "docs/${docname}/html/." |
174 |
+ done |
175 |
+ fi |
176 |
+ |
177 |
+ # Fix perllocal.pod file collision |
178 |
+ perl_delete_localpod |
179 |
+ |
180 |
+ use python && python_optimize |
181 |
+} |
182 |
+ |
183 |
+pkg_postinst() { |
184 |
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then |
185 |
+ einfo "RPM database found... Rebuilding database (may take a while)..." |
186 |
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}/" || die |
187 |
+ else |
188 |
+ einfo "No RPM database found... Creating database..." |
189 |
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}/" || die |
190 |
+ fi |
191 |
+} |