Gentoo Archives: gentoo-commits

From: Tony Vroon <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/rpm/files/, app-arch/rpm/
Date: Thu, 01 Oct 2020 11:18:09
Message-Id: 1601551072.3bfda681c33a63ebe64a04f5ef0084c3d07990aa.chainsaw@gentoo
1 commit: 3bfda681c33a63ebe64a04f5ef0084c3d07990aa
2 Author: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 1 11:15:19 2020 +0000
4 Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 11:17:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bfda681
7
8 app-arch/rpm: Version bump to 4.16.0
9
10 This has USE="zstd" defaulted to on to ensure Fedora 31 packages are
11 recognised without issue.
12
13 Closes: https://bugs.gentoo.org/520312
14 Closes: https://bugs.gentoo.org/730354
15 Closes: https://bugs.gentoo.org/740078
16 Signed-Off-By: Tony Vroon <chainsaw <AT> gentoo.org>
17
18 app-arch/rpm/Manifest | 1 +
19 app-arch/rpm/files/rpm-4.16.0-autotools.patch | 13 +++
20 app-arch/rpm/files/rpm-4.16.0-libdir.patch | 34 +++++++
21 app-arch/rpm/rpm-4.16.0.ebuild | 139 ++++++++++++++++++++++++++
22 4 files changed, 187 insertions(+)
23
24 diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest
25 index 7529e899a90..08fa264efdf 100644
26 --- a/app-arch/rpm/Manifest
27 +++ b/app-arch/rpm/Manifest
28 @@ -1 +1,2 @@
29 DIST rpm-4.14.2.1.tar.bz2 4156574 BLAKE2B 2eb0cf621eecef7d8977d28d52be922156ceb64b14d2aefda0f5a927b90cf3d3e9c055d773e05ed52422254397153b79557dc94bdb43ca28a2ea126153a43c1f SHA512 0aad457f91918904c15649a1764ce7cbfaf38e083678031286e866f7997be0435a6b7b73596706d97e9263cff7b4df4a3150b142d81e6e3fddbfcf67bd83f990
30 +DIST rpm-4.16.0.tar.bz2 4341683 BLAKE2B 5161e5dcc6d9a1f1d4b8e44740fb368050b808fd9e8b8276fb17b530a4642e1b9ad104b5a30c0071215aef7f823eeab10988dd41f73af1c52d575529c374b5eb SHA512 177119c3ac3d48980db55bb4ba0fdbb2a911968e5efc690bfa8cc343f850fc90531cc0dee6dd8e45d2b14f0d951ced35bd8893d24011b7f270745d281ddf4e3d
31
32 diff --git a/app-arch/rpm/files/rpm-4.16.0-autotools.patch b/app-arch/rpm/files/rpm-4.16.0-autotools.patch
33 new file mode 100644
34 index 00000000000..9b1f71ad86e
35 --- /dev/null
36 +++ b/app-arch/rpm/files/rpm-4.16.0-autotools.patch
37 @@ -0,0 +1,13 @@
38 +diff -uNr rpm-4.16.0.ORIG/configure.ac rpm-4.16.0/configure.ac
39 +--- rpm-4.16.0.ORIG/configure.ac 2020-10-01 11:02:21.605485875 +0100
40 ++++ rpm-4.16.0/configure.ac 2020-10-01 11:05:34.077157904 +0100
41 +@@ -552,9 +552,6 @@
42 +
43 + AM_CONDITIONAL([BDB], [test "x$have_bdb" != "xno"])
44 + AM_CONDITIONAL([WITH_INTERNAL_DB],[test "x$have_bdb" = "xinternal"])
45 +-if test "x$have_bdb" = "xinternal"; then
46 +- AC_CONFIG_SUBDIRS(db3)
47 +-fi
48 +
49 +
50 + #=================
51
52 diff --git a/app-arch/rpm/files/rpm-4.16.0-libdir.patch b/app-arch/rpm/files/rpm-4.16.0-libdir.patch
53 new file mode 100644
54 index 00000000000..c9f5f297233
55 --- /dev/null
56 +++ b/app-arch/rpm/files/rpm-4.16.0-libdir.patch
57 @@ -0,0 +1,34 @@
58 +diff -uNr rpm-4.16.0.ORIG/configure.ac rpm-4.16.0/configure.ac
59 +--- rpm-4.16.0.ORIG/configure.ac 2020-10-01 11:08:43.780842602 +0100
60 ++++ rpm-4.16.0/configure.ac 2020-10-01 11:09:03.533705353 +0100
61 +@@ -935,13 +935,7 @@
62 + AC_DEFINE_UNQUOTED([RUNDIR],["${RUNDIR}"],[run-time variable directory])
63 + AC_SUBST(RUNDIR)
64 +
65 +-if test X"$prefix" = XNONE ; then
66 +- usrprefix="$ac_default_prefix"
67 +-else
68 +- usrprefix=$prefix
69 +-fi
70 +-
71 +-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
72 ++RPMCONFIGDIR="`echo ${libexecdir}/rpm/`"
73 + AC_SUBST(RPMCONFIGDIR)
74 +
75 + AC_SUBST(OBJDUMP)
76 +diff -uNr rpm-4.16.0.ORIG/rpm.am rpm-4.16.0/rpm.am
77 +--- rpm-4.16.0.ORIG/rpm.am 2020-10-01 11:08:43.743842859 +0100
78 ++++ rpm-4.16.0/rpm.am 2020-10-01 11:09:03.533705353 +0100
79 +@@ -1,10 +1,8 @@
80 + # Internal binaries
81 +-## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
82 +-rpmlibexecdir = $(prefix)/lib/rpm
83 ++rpmlibexecdir = $(pkglibexecdir)
84 +
85 + # Host independent config files
86 +-## HACK: it probably should be $(datadir)/rpm
87 +-rpmconfigdir = $(prefix)/lib/rpm
88 ++rpmconfigdir = $(pkglibexecdir)
89 +
90 + # Libtool version (current-revision-age) for all our libraries
91 + rpm_version_info = 10:0:1
92
93 diff --git a/app-arch/rpm/rpm-4.16.0.ebuild b/app-arch/rpm/rpm-4.16.0.ebuild
94 new file mode 100644
95 index 00000000000..67132e47a62
96 --- /dev/null
97 +++ b/app-arch/rpm/rpm-4.16.0.ebuild
98 @@ -0,0 +1,139 @@
99 +# Copyright 1999-2020 Gentoo Authors
100 +# Distributed under the terms of the GNU General Public License v2
101 +
102 +EAPI=7
103 +
104 +PYTHON_COMPAT=( python3_{6,7,8,9} )
105 +
106 +inherit autotools flag-o-matic perl-module python-single-r1
107 +
108 +DESCRIPTION="Red Hat Package Management Utils"
109 +HOMEPAGE="https://rpm.org
110 + https://github.com/rpm-software-management/rpm"
111 +SRC_URI="http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2"
112 +
113 +LICENSE="GPL-2 LGPL-2"
114 +SLOT="0"
115 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
116 +
117 +# Tests are broken. See bug 657500
118 +RESTRICT="test"
119 +
120 +IUSE="acl caps doc dbus lua nls python selinux test +zstd"
121 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
122 +
123 +CDEPEND="!app-arch/rpm5
124 + app-arch/libarchive
125 + >=sys-libs/db-4.5:*
126 + >=sys-libs/zlib-1.2.3-r1
127 + >=app-arch/bzip2-1.0.1
128 + >=dev-libs/popt-1.7
129 + >=app-crypt/gnupg-1.2
130 + dbus? ( sys-apps/dbus )
131 + dev-libs/elfutils
132 + virtual/libintl
133 + >=dev-lang/perl-5.8.8
134 + dev-libs/nss
135 + python? ( ${PYTHON_DEPS} )
136 + nls? ( virtual/libintl )
137 + lua? ( dev-lang/lua:5.2 )
138 + acl? ( virtual/acl )
139 + caps? ( >=sys-libs/libcap-2.0 )
140 + zstd? ( app-arch/zstd )
141 +"
142 +DEPEND="${CDEPEND}
143 + nls? ( sys-devel/gettext )
144 + doc? ( app-doc/doxygen )
145 + virtual/pkgconfig
146 + test? ( sys-apps/fakechroot )
147 +"
148 +RDEPEND="${CDEPEND}
149 + selinux? ( sec-policy/selinux-rpm )
150 +"
151 +
152 +pkg_setup() {
153 + use python && python-single-r1_pkg_setup
154 +}
155 +
156 +src_prepare() {
157 + eapply "${FILESDIR}"/${P}-autotools.patch
158 + eapply "${FILESDIR}"/${PN}-4.8.1-db-path.patch
159 + eapply "${FILESDIR}"/${P}-libdir.patch
160 +
161 + # fix #356769
162 + sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
163 + # fix #492642
164 + sed -i "s:@__PYTHON@:${PYTHON}:" macros.in || die "Fixing %__python failed"
165 +
166 + eapply_user
167 +
168 + eautoreconf
169 +
170 + # Prevent automake maintainer mode from kicking in (#450448).
171 + touch -r Makefile.am preinstall.am
172 +}
173 +
174 +src_configure() {
175 + append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
176 + econf \
177 + --without-selinux \
178 + --with-crypto=nss \
179 + $(use_enable python) \
180 + $(use_enable nls) \
181 + $(use_enable dbus inhibit-plugin) \
182 + $(use_with lua) \
183 + $(use_with caps cap) \
184 + $(use_with acl) \
185 + $(use_enable zstd zstd $(usex zstd yes no))
186 +}
187 +
188 +src_install() {
189 + default
190 +
191 + # remove la files
192 + find "${ED}" -name '*.la' -delete || die
193 +
194 + # fix symlinks to /bin/rpm (#349840)
195 + for binary in rpmquery rpmverify;do
196 + ln -sf rpm "${ED}"/usr/bin/${binary} || die
197 + done
198 +
199 + if ! use nls; then
200 + rm -rf "${ED}"/usr/share/man/?? || die
201 + fi
202 +
203 + keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
204 +
205 + dodoc CREDITS README*
206 + if use doc; then
207 + for docname in librpm; do
208 + docinto "html/${docname}"
209 + dodoc -r "doc/${docname}/html/."
210 + done
211 + fi
212 +
213 + # Fix perllocal.pod file collision
214 + perl_delete_localpod
215 +
216 + use python && python_optimize
217 +}
218 +
219 +src_test() {
220 + # Known to fail with FEATURES=usersandbox (bug #657500):
221 + if has usersandbox $FEATURES ; then
222 + ewarn "You are emerging ${P} with 'usersandbox' enabled." \
223 + "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
224 + fi
225 +
226 + emake check
227 +}
228 +
229 +pkg_postinst() {
230 + if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
231 + einfo "RPM database found... Rebuilding database (may take a while)..."
232 + "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}/" || die
233 + else
234 + einfo "No RPM database found... Creating database..."
235 + "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}/" || die
236 + fi
237 +}