From de6423ac7185ca1e5b9bd3e8a5682bc523afc197 Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 24 Oct 2020 19:25:51 +0000 Subject: user/rpm: Add --- user/rpm/APKBUILD | 57 ++++++++++++++++++++++++++++++++++++++++++++ user/rpm/include-fcntl.patch | 15 ++++++++++++ user/rpm/musl.patch | 33 +++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 user/rpm/APKBUILD create mode 100644 user/rpm/include-fcntl.patch create mode 100644 user/rpm/musl.patch (limited to 'user') diff --git a/user/rpm/APKBUILD b/user/rpm/APKBUILD new file mode 100644 index 000000000..950f60478 --- /dev/null +++ b/user/rpm/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Nathan +# Maintainer: Nathan +pkgname=rpm +pkgver=4.16.0 +pkgrel=0 +pkgdesc="Redhat Package Manager" +url="https://www.rpm.org" +arch="all" +license="GPL-2.0+ AND LGPL-2.0+" +depends="" +makedepends="acl-dev autoconf automake binutils-dev bzip2-dev file-dev + graphviz libarchive-dev libcap-dev libgcrypt-dev + libtool popt-dev sqlite-dev xz-dev zlib-dev zstd-dev" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" +source="http://ftp.rpm.org/releases/$pkgname-${pkgver%.*}.x/$pkgname-$pkgver.tar.bz2 + musl.patch + include-fcntl.patch" + +prepare() { + # Use sqlite db + sed -ie "/_db_backend/ s/ bdb/ sqlite/g" macros.in + default_prepare + autoreconf -fi +} + +# Py dependencies isn't currently in repo, so disable for now +build() { + LIBS="$LIBS -lintl" \ + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-cap \ + --with-acl \ + --without-lua \ + --disable-python \ + --enable-zstd \ + --enable-sqlite=yes \ + --enable-bdb_ro=yes \ + --enable-bdb=no \ + --with-crypto=libgcrypt + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="177119c3ac3d48980db55bb4ba0fdbb2a911968e5efc690bfa8cc343f850fc90531cc0dee6dd8e45d2b14f0d951ced35bd8893d24011b7f270745d281ddf4e3d rpm-4.16.0.tar.bz2 +212a4265abc8d002e16bed106b8b773cf65564f95e6074bc1378c4745420202a476373b49b660bdfe82cc2470c35fff4f184168a698abfa2a4bf30c8f91e64ad musl.patch +6424005c78aaebcd3565debbdc1ca14fb16ef8f4aa79748eca3403115a31c77afbb8929add1a8450afbd0496e303c915c6ad6d60cde41a89caf553a10256ace5 include-fcntl.patch" diff --git a/user/rpm/include-fcntl.patch b/user/rpm/include-fcntl.patch new file mode 100644 index 000000000..611b92935 --- /dev/null +++ b/user/rpm/include-fcntl.patch @@ -0,0 +1,15 @@ +Upstream: Yes, https://github.com/rpm-software-management/rpm/pull/1379 +Reason: Fixes compilation with musl + +diff --git a/lib/rpmdb.c b/lib/rpmdb.c +index 4c10156..7318763 100644 +--- a/lib/rpmdb.c ++++ b/lib/rpmdb.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #ifndef DYING /* XXX already in "system.h" */ + #include diff --git a/user/rpm/musl.patch b/user/rpm/musl.patch new file mode 100644 index 000000000..65f3a10aa --- /dev/null +++ b/user/rpm/musl.patch @@ -0,0 +1,33 @@ +Upstream: No +Reason: Fixes compilation with musl + +--- a/configure.ac ++++ b/configure.ac +@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl]) + # Check for libelf library. Prefer external, otherwise none. + WITH_LIBELF_LIB= + AC_CHECK_HEADER([libelf.h]) ++AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes]) + AC_CHECK_HEADERS([gelf.h], [ + AC_CHECK_LIB(elf, gelf_getvernaux, [ + AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) +@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [ + ]) + ]) + AC_SUBST(WITH_LIBELF_LIB) +-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes]) ++AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes]) + + AC_CHECK_HEADERS([dwarf.h], [ + WITH_LIBDWARF=yes +--- a/rpmio/digest_nss.c ++++ b/rpmio/digest_nss.c +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include + #include "rpmio/digest.h" + -- cgit v1.2.3-60-g2f50