Gentoo Archives: gentoo-commits

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