summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuya Wakazono <pastalian46@gmail.com>2024-02-08 21:33:02 +0900
committerJoonas Niilola <juippis@gentoo.org>2024-03-04 09:53:47 +0200
commitcbddeb9984d61e08cff7c7b5f2e416251d84a5a7 (patch)
tree63ef91f2adc591ae5f5100cd176f8dc273ec1f28
parentnet-misc/openvswitch: migrate 2.17.8 to linux-mod-r1.eclass (diff)
downloadgentoo-cbddeb9984d61e08cff7c7b5f2e416251d84a5a7.tar.gz
gentoo-cbddeb9984d61e08cff7c7b5f2e416251d84a5a7.tar.bz2
gentoo-cbddeb9984d61e08cff7c7b5f2e416251d84a5a7.zip
app-arch/rpm: add 4.19.1.1
bump + fix DEPEND ordering Closes: https://github.com/gentoo/gentoo/pull/35227 Signed-off-by: Takuya Wakazono <pastalian46@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--app-arch/rpm/Manifest1
-rw-r--r--app-arch/rpm/files/rpm-4.19.1.1-musl-compat.patch17
-rw-r--r--app-arch/rpm/rpm-4.19.1.1.ebuild134
3 files changed, 152 insertions, 0 deletions
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest
index 9a58e89006b0..21df9682d6aa 100644
--- a/app-arch/rpm/Manifest
+++ b/app-arch/rpm/Manifest
@@ -1,2 +1,3 @@
DIST rpm-4.18.1.tar.bz2 6396363 BLAKE2B 4bc582bdc34a89d83346a8e18133c4f1846f2e8741c85ae2d0fd3398166e5a5d81ed86869e34700d3ea414fbf8ccf6c918692e865b956b1e6b70830b64cd323e SHA512 0ede2138b9b4c3b50d7e914cf82655507fcc207ba67804c749ea17560002976cb26b95801e9138a51589b60459494a991213a1131dbef5af2eca9b5050a4f29c
+DIST rpm-4.19.1.1.tar.bz2 5849649 BLAKE2B 66ed845007f3767fd92e2384962927b93cef7b825b8ea60f81f0a4b51b9d6a09d1cbec1668226fa85de675347d52635cb25c4d11204ada0eed6c898425b21536 SHA512 3364c453c29903c144a3680ceca7a17426eb085c288b6313fb7e857a42a5e0a965f623882e0f58e633f8b8770e839d9df9f7653d99c73759af5c89d0a981908d
DIST rpm-4.19.1.tar.bz2 5940447 BLAKE2B b40de875d79a48d0c54aef86bb8b3cb0312cbb4eb5b1382fcc147669c5d559c9a91fcfb3b4160fe1ad34595bc553132d1af34fe70a45f868b7f06a1635c3fe1e SHA512 12e6c7294a98032418ec9a0510a8183658483fe713d67e6890a9c0da44748371df45a26af6055d08470b85b5dec0cf94795d17c5b3e11db08b20ef07e8e06642
diff --git a/app-arch/rpm/files/rpm-4.19.1.1-musl-compat.patch b/app-arch/rpm/files/rpm-4.19.1.1-musl-compat.patch
new file mode 100644
index 000000000000..441689febd5d
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.19.1.1-musl-compat.patch
@@ -0,0 +1,17 @@
+musl doesn't implement GLOB_BRACE, simply disable it.
+
+https://bugs.gentoo.org/922286
+https://github.com/rpm-software-management/rpm/issues/2844
+--- a/rpmio/rpmglob.c
++++ b/rpmio/rpmglob.c
+@@ -33,6 +33,10 @@
+
+ #include "debug.h"
+
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ /* Return 1 if pattern contains a magic char, see glob(7) for a list */
+ static int ismagic(const char *pattern)
+ {
diff --git a/app-arch/rpm/rpm-4.19.1.1.ebuild b/app-arch/rpm/rpm-4.19.1.1.ebuild
new file mode 100644
index 000000000000..d57cff0ff5c7
--- /dev/null
+++ b/app-arch/rpm/rpm-4.19.1.1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR=emake
+LUA_COMPAT=( lua5-{3,4} )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake lua-single python-single-r1 toolchain-funcs
+
+DESCRIPTION="The RPM Package Manager"
+HOMEPAGE="https://rpm.org/ https://github.com/rpm-software-management/rpm"
+SRC_URI="
+ https://ftp.osuosl.org/pub/rpm/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2
+ http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2
+"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~loong ~riscv ~x86"
+IUSE="acl audit caps +berkdb doc dbus nls openmp python readline selinux +sequoia +sqlite"
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+# Tests run against a Fedora container image, which needs to be pulled.
+RESTRICT="test"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=app-arch/bzip2-1.0.1
+ app-arch/libarchive:=
+ app-arch/xz-utils
+ app-arch/zstd:=
+ >=app-crypt/gnupg-1.2
+ >=dev-lang/perl-5.8.8
+ dev-libs/elfutils
+ >=dev-libs/popt-1.7
+ sys-apps/file
+ sys-libs/readline:=
+ >=sys-libs/zlib-1.2.3-r1
+ acl? ( virtual/acl )
+ audit? ( sys-process/audit )
+ caps? ( >=sys-libs/libcap-2.0 )
+ dbus? ( sys-apps/dbus )
+ nls? ( virtual/libintl )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:= )
+ sequoia? ( app-crypt/rpm-sequoia )
+ !sequoia? ( dev-libs/libgcrypt:= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-text/doxygen )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-rpm )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.19.0-libdir.patch
+ "${FILESDIR}"/${P}-musl-compat.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ lua-single_pkg_setup
+
+ use python && python-single-r1_pkg_setup
+
+ # bug #779769
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+ # rpm no longer supports berkdb, but has readonly support.
+ # https://github.com/rpm-software-management/rpm/commit/4290300e24c5ab17c615b6108f38438e31eeb1d0
+ local mycmakeargs=(
+ -DENABLE_TESTSUITE=OFF
+ -DWITH_FAPOLICYD=OFF
+ -DWITH_SELINUX=OFF
+ -DENABLE_BDB_RO=$(usex berkdb)
+ -DENABLE_NLS=$(usex nls)
+ -DENABLE_OPENMP=$(usex openmp)
+ -DENABLE_PYTHON=$(usex python)
+ -DENABLE_SQLITE=$(usex sqlite)
+ -DWITH_ACL=$(usex acl)
+ -DWITH_AUDIT=$(usex audit)
+ -DWITH_CAP=$(usex caps)
+ -DWITH_DBUS=$(usex dbus)
+ -DWITH_INTERNAL_OPENPGP=$(usex sequoia OFF ON)
+ -DWITH_READLINE=$(usex readline)
+ $(cmake_use_find_package doc Doxygen)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ emake -C "${BUILD_DIR}" check
+}
+
+src_install() {
+ cmake_src_install
+
+ # Remove pre-built API docs.
+ use doc || rm -rf "${ED}/usr/share/doc/${PF}" || die
+
+ dodoc CREDITS README
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ use python && python_optimize
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/rpmdb.sqlite ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}/" || die
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}/" || die
+ fi
+}