diff options
author | Takuya Wakazono <pastalian46@gmail.com> | 2024-10-12 17:17:25 +0900 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-23 16:08:47 +0000 |
commit | cd45c5f29df67b88a04516c50486fe4d3c11aa98 (patch) | |
tree | 5c4612c9f3e2064133e8dc980a5af882fc340561 /app-arch | |
parent | dev-db/spatialite: Stabilize 5.1.0-r1 arm64, #944735 (diff) | |
download | gentoo-cd45c5f29df67b88a04516c50486fe4d3c11aa98.tar.gz gentoo-cd45c5f29df67b88a04516c50486fe4d3c11aa98.tar.bz2 gentoo-cd45c5f29df67b88a04516c50486fe4d3c11aa98.zip |
app-arch/rpm: add 4.20.0
- Disable berkdb by default since it shouldn't be used anymore
- Stop creating unnecessary /usr/src/rpm/ directory
- Add USE flags for bzip2, iconv, lzma, sanitize, and zstd. zstd is
enabled by default because recent rpm files built by other
distributions are compressed with zstd.
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/rpm/Manifest | 1 | ||||
-rw-r--r-- | app-arch/rpm/files/rpm-4.20.0-libdir.patch | 11 | ||||
-rw-r--r-- | app-arch/rpm/metadata.xml | 1 | ||||
-rw-r--r-- | app-arch/rpm/rpm-4.20.0.ebuild | 145 |
4 files changed, 158 insertions, 0 deletions
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest index 1598162f1521..48bbf8c2c64e 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.20.0.tar.bz2 5984513 BLAKE2B c809e933cf7eb9ab63fa7693e634f7fcf744f94130199f674c5e76e77ead4de25b583daefdf651bbf0475012d262d1bdca605f19a520e160e90e3deb68c74f18 SHA512 b340c66cfda3abed38e81f91c4a789f2c6c0d3ce408de71d861fef27e180b607ae698e046b6925c7781a7177cde9df4075943714ed2aad7c62645eca348f5544 diff --git a/app-arch/rpm/files/rpm-4.20.0-libdir.patch b/app-arch/rpm/files/rpm-4.20.0-libdir.patch new file mode 100644 index 000000000000..cc482015f5a4 --- /dev/null +++ b/app-arch/rpm/files/rpm-4.20.0-libdir.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ + option(WITH_LIBLZMA "Build with liblzma support" ON) + option(WITH_DOXYGEN "Build API docs with doxygen" OFF) + +-set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home") ++set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/libexec/rpm" CACHE PATH "rpm home") + set(RPM_MACROSDIR "${RPM_CONFIGDIR}/macros.d") + set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string") + diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml index 8e808eda79fe..fa4733ffc342 100644 --- a/app-arch/rpm/metadata.xml +++ b/app-arch/rpm/metadata.xml @@ -13,6 +13,7 @@ <remote-id type="github">rpm-software-management/rpm</remote-id> </upstream> <use> + <flag name="sanitize">Enable ASAN and UBSAN</flag> <flag name="sequoia">Use <pkg>app-crypt/rpm-sequoia</pkg> instead of the deprecated internal parser</flag> </use> </pkgmetadata> diff --git a/app-arch/rpm/rpm-4.20.0.ebuild b/app-arch/rpm/rpm-4.20.0.ebuild new file mode 100644 index 000000000000..a076561bbe6f --- /dev/null +++ b/app-arch/rpm/rpm-4.20.0.ebuild @@ -0,0 +1,145 @@ +# 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..13} ) + +inherit cmake flag-o-matic 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" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl audit bzip2 caps berkdb doc dbus iconv lzma nls openmp python + readline selinux +sequoia +sqlite +zstd" +REQUIRED_USE=" + ${LUA_REQUIRED_USE} + python? ( ${PYTHON_REQUIRED_USE} ) +" +# Tests run against a Fedora container. +RESTRICT="test" + +DEPEND=" + ${LUA_DEPS} + app-arch/libarchive:= + >=app-crypt/gnupg-1.2 + >=dev-lang/perl-5.8.8 + dev-libs/elfutils + >=dev-libs/popt-1.7 + sys-apps/file + >=sys-libs/zlib-1.2.3-r1 + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + bzip2? ( >=app-arch/bzip2-1.0.1 ) + caps? ( >=sys-libs/libcap-2.0 ) + dbus? ( sys-apps/dbus ) + iconv? ( virtual/libiconv ) + lzma? ( app-arch/xz-utils ) + nls? ( virtual/libintl ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) + selinux? ( sys-libs/libselinux ) + sequoia? ( app-crypt/rpm-sequoia ) + !sequoia? ( dev-libs/libgcrypt:= ) + sqlite? ( dev-db/sqlite:3 ) + zstd? ( app-arch/zstd:= ) +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) + nls? ( sys-devel/gettext ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-rpm ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.19.1.1-musl-compat.patch + "${FILESDIR}"/${P}-libdir.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_configure() { + local mycmakeargs=( + -DENABLE_NDB=ON + -DENABLE_TESTSUITE=OFF + -DWITH_ARCHIVE=ON + -DWITH_FSVERITY=OFF + -DWITH_IMAEVM=OFF + -DWITH_FAPOLICYD=OFF + -DWITH_OPENSSL=OFF + -DWITH_LIBDW=ON + -DWITH_LIBELF=ON + -DENABLE_BDB_RO=$(usex berkdb) + -DENABLE_NLS=$(usex nls) + -DENABLE_OPENMP=$(usex openmp) + -DENABLE_PYTHON=$(usex python) + -DENABLE_SQLITE=$(usex sqlite) + -DWITH_CAP=$(usex caps) + -DWITH_ACL=$(usex acl) + -DWITH_SELINUX=$(usex selinux) + -DWITH_DBUS=$(usex dbus) + -DWITH_AUDIT=$(usex audit) + -DWITH_SEQUOIA=$(usex sequoia) + -DWITH_READLINE=$(usex readline) + -DWITH_BZIP2=$(usex bzip2) + -DWITH_ICONV=$(usex iconv) + -DWITH_ZSTD=$(usex zstd) + -DWITH_LIBLZMA=$(usex lzma) + -DWITH_DOXYGEN=$(usex doc) + ) + + # special handling for ASAN + # https://github.com/rpm-software-management/rpm/commit/ca8d1cf3f401d89ad3507aed8d7a70ad37026ca7 + if is-flagq -fsanitize=address; then + mycmakeargs+=( -DENABLE_ASAN=ON ) + fi + + cmake_src_configure +} + +src_test() { + emake -C "${BUILD_DIR}" check +} + +src_install() { + cmake_src_install + + if ! use doc; then + # Remove pre-built API docs. + rm -r "${ED}/usr/share/doc/${PF}" || die + fi + + dodoc CREDITS README + + 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 +} |