aboutsummaryrefslogtreecommitdiff
path: root/package/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'package/rpm')
-rw-r--r--package/rpm/0001-configure-ac-prefer-pkg-config-to-find-libgcrypt.patch52
-rw-r--r--package/rpm/0001-lib-rpmdb-c-include-fcntl-h-for-O_.patch29
-rw-r--r--package/rpm/0002-lib-rpmrc.c-include-fcntl.h-for-O_.patch31
-rw-r--r--package/rpm/0003-Check-for-OpenMP-version-at-configure-time.patch78
-rw-r--r--package/rpm/0004-configure-ac-fix-cross-compilation.patch33
-rw-r--r--package/rpm/0005-Really-disable-OpenMP-if-too-old.patch26
-rw-r--r--package/rpm/Config.in1
-rw-r--r--package/rpm/rpm.hash6
-rw-r--r--package/rpm/rpm.mk29
9 files changed, 220 insertions, 65 deletions
diff --git a/package/rpm/0001-configure-ac-prefer-pkg-config-to-find-libgcrypt.patch b/package/rpm/0001-configure-ac-prefer-pkg-config-to-find-libgcrypt.patch
deleted file mode 100644
index 035fe154db..0000000000
--- a/package/rpm/0001-configure-ac-prefer-pkg-config-to-find-libgcrypt.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 22ed98efe3d5198e4141948af7569cfa10d9d25f Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 20 Nov 2019 13:06:51 +0000
-Subject: [PATCH] configure.ac: prefer pkg-config to find libgcrypt
-
-libgcrypt from 1.8.5 provides a pkg-config file as well as the traditional
-libgcrypt-config script. As pkg-config is more resiliant in the face of
-complicated build environments (for example cross-compilation and sysroots)
-prefer the pkg-config file, falling back to libgcrypt-config if that doesn't
-exist.
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Retrieved from:
-https://github.com/rpm-software-management/rpm/commit/22ed98efe3d5198e4141948af7569cfa10d9d25f]
----
- configure.ac | 23 +++++++++++++++--------
- 1 file changed, 15 insertions(+), 8 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0a3a9bbf4..6a3ea3615 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -395,14 +395,21 @@ AC_SUBST(WITH_OPENSSL_LIB)
- WITH_LIBGCRYPT_INCLUDE=
- WITH_LIBGCRYPT_LIB=
- if test "$with_crypto" = libgcrypt ; then
--AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, notfound)
--if test notfound != "$LIBGCRYPT_CONFIG" ; then
--WITH_LIBGCRYPT_INCLUDE=`$LIBGCRYPT_CONFIG --cflags`
--WITH_LIBGCRYPT_LIB=`$LIBGCRYPT_CONFIG --libs`
--fi
--if test -z "$WITH_LIBGCRYPT_LIB" ; then
--AC_MSG_ERROR([libgcrypt not found])
--fi
-+ # libgcrypt 1.8.5 onwards ships a pkg-config file so prefer that
-+ PKG_CHECK_MODULES([LIBGCRYPT], [libgcrypt], [have_libgcrypt=yes], [have_libgcrypt=no])
-+ if test "$have_libgcrypt" = "yes"; then
-+ WITH_LIBGCRYPT_INCLUDE="$LIBGCRYPT_CFLAGS"
-+ WITH_LIBGCRYPT_LIB="$LIBGCRYPT_LIBS"
-+ else
-+ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, notfound)
-+ if test notfound != "$LIBGCRYPT_CONFIG" ; then
-+ WITH_LIBGCRYPT_INCLUDE=`$LIBGCRYPT_CONFIG --cflags`
-+ WITH_LIBGCRYPT_LIB=`$LIBGCRYPT_CONFIG --libs`
-+ fi
-+ if test -z "$WITH_LIBGCRYPT_LIB" ; then
-+ AC_MSG_ERROR([libgcrypt not found])
-+ fi
-+ fi
- fi
-
- AM_CONDITIONAL([WITH_LIBGCRYPT],[test "$with_crypto" = libgcrypt])
diff --git a/package/rpm/0001-lib-rpmdb-c-include-fcntl-h-for-O_.patch b/package/rpm/0001-lib-rpmdb-c-include-fcntl-h-for-O_.patch
new file mode 100644
index 0000000000..1c0aa51bac
--- /dev/null
+++ b/package/rpm/0001-lib-rpmdb-c-include-fcntl-h-for-O_.patch
@@ -0,0 +1,29 @@
+From 9395bdc64459357631111842e7a28304b4d76301 Mon Sep 17 00:00:00 2001
+From: Leo <thinkabit.ukim@gmail.com>
+Date: Wed, 30 Sep 2020 08:36:03 -0300
+Subject: [PATCH] lib/rpmdb.c: include fcntl.h for O_*
+
+Fixes compilation on musl, otherwise it fails with undefined references
+to various O_* symbols as mentioned here:
+
+https://www.man7.org/linux/man-pages/man0/fcntl.h.0p.html
+
+[Retrieved from:
+https://github.com/rpm-software-management/rpm/commit/9395bdc64459357631111842e7a28304b4d76301]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ lib/rpmdb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/rpmdb.c b/lib/rpmdb.c
+index 4c101569f..73187630b 100644
+--- a/lib/rpmdb.c
++++ b/lib/rpmdb.c
+@@ -8,6 +8,7 @@
+ #include <utime.h>
+ #include <errno.h>
+ #include <dirent.h>
++#include <fcntl.h>
+
+ #ifndef DYING /* XXX already in "system.h" */
+ #include <fnmatch.h>
diff --git a/package/rpm/0002-lib-rpmrc.c-include-fcntl.h-for-O_.patch b/package/rpm/0002-lib-rpmrc.c-include-fcntl.h-for-O_.patch
new file mode 100644
index 0000000000..c5db7f0a69
--- /dev/null
+++ b/package/rpm/0002-lib-rpmrc.c-include-fcntl.h-for-O_.patch
@@ -0,0 +1,31 @@
+From 8d446d33a705cb37420e1fda18379d7439ee841f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 25 Oct 2020 15:04:56 +0100
+Subject: [PATCH 2/2] lib/rpmrc.c: include fcntl.h for O_*
+
+Fixes compilation on musl, otherwise it fails with undefined references
+to various O_* symbols as mentioned here:
+
+https://www.man7.org/linux/man-pages/man0/fcntl.h.0p.html
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status:
+https://github.com/rpm-software-management/rpm/pull/1413]
+---
+ lib/rpmrc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 78c4a6d42..8bfe7a0ab 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -1,5 +1,6 @@
+ #include "system.h"
+
++#include <fcntl.h>
+ #include <stdarg.h>
+ #include <pthread.h>
+
+--
+2.28.0
+
diff --git a/package/rpm/0003-Check-for-OpenMP-version-at-configure-time.patch b/package/rpm/0003-Check-for-OpenMP-version-at-configure-time.patch
new file mode 100644
index 0000000000..2292702e53
--- /dev/null
+++ b/package/rpm/0003-Check-for-OpenMP-version-at-configure-time.patch
@@ -0,0 +1,78 @@
+From 6a780f10c2b600cfc38f8b8f20cb7e40b979f541 Mon Sep 17 00:00:00 2001
+From: Michal Domonkos <mdomonko@redhat.com>
+Date: Tue, 4 Aug 2020 16:50:21 +0200
+Subject: [PATCH] Check for OpenMP version at configure time
+
+Only accept OpenMP >= 4.5, due to the "priority" clause that we use
+since commit 6f6f5e7, and also document that in the INSTALL file.
+
+If explicitly required with --enable-openmp, fail configuration if the
+version is not available.
+
+https://www.openmp.org/wp-content/uploads/openmp-4.5.pdf
+
+Resolves: #1315
+[Retrieved from:
+https://github.com/rpm-software-management/rpm/commit/6a780f10c2b600cfc38f8b8f20cb7e40b979f541]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ INSTALL | 6 ++++++
+ configure.ac | 25 +++++++++++++++++++++++--
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/INSTALL b/INSTALL
+index cfbe54a3e..7622b2efe 100644
+--- a/INSTALL
++++ b/INSTALL
+@@ -142,6 +142,12 @@ If you plan on using cryptographic signatures you will need a version
+ of GPG, available from
+ http://www.gnupg.org/
+
++OpenMP multithreading support is automatically enabled if your C compiler has
++support for OpenMP version 4.5 or higher (to disable, pass the --disable-openmp
++option to configure). For GCC, OpenMP 4.5 is fully supported since GCC 6.1,
++which is available from
++ http://www.gnu.org/
++
+ To compile RPM:
+ --------------
+
+diff --git a/configure.ac b/configure.ac
+index 1346ee704..35003619d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -167,11 +167,32 @@ AC_SUBST(WITH_LZMA_LIB)
+
+ # AC_OPENMP supports --enable/disable-openmp out of the box, but it doesn't
+ # actually give us a way to conditionalize the build based on that. Argh.
++# Version 4.5 (201511) introduced "priority" clause for tasks.
+ OPENMP_CFLAGS=
+ AC_OPENMP
+ AS_IF([test "x$ac_cv_prog_c_openmp" != x &&
+- test "x$ac_cv_prog_c_openmp" != unsupported],[
+- AC_DEFINE(ENABLE_OPENMP, 1, [Enable multithreading support?])
++ test "x$ac_cv_prog_c_openmp" != xunsupported],[
++ old_CFLAGS=$CFLAGS
++ CFLAGS="$CFLAGS $OPENMP_CFLAGS"
++ AC_MSG_CHECKING([OpenMP is at least version 4.5])
++ AC_RUN_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <omp.h>],
++ [#if _OPENMP < 201511
++ exit(1);
++ #endif
++ ]
++ )],
++ [AC_MSG_RESULT([yes])
++ AC_DEFINE(ENABLE_OPENMP, 1, [Enable multithreading support?])
++ ],
++ [AC_MSG_RESULT([no])
++ if test "$enable_openmp" = "yes"; then
++ AC_MSG_ERROR([OpenMP too old])
++ fi
++ ]
++ )
++ CFLAGS=$old_CFLAGS
+ ])
+ AC_SUBST(OPENMP_CFLAGS)
+
diff --git a/package/rpm/0004-configure-ac-fix-cross-compilation.patch b/package/rpm/0004-configure-ac-fix-cross-compilation.patch
new file mode 100644
index 0000000000..6a958b3aaf
--- /dev/null
+++ b/package/rpm/0004-configure-ac-fix-cross-compilation.patch
@@ -0,0 +1,33 @@
+From 13585fbbe83eb177b13d86c2d6f11ff41a68d07e Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 10 Nov 2020 18:20:24 +0100
+Subject: [PATCH] configure.ac: fix cross-compilation
+
+Use AC_COMPILE_IFELSE as AC_RUN_IFELSE raises a build failure when
+cross-compiling
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/rpm-software-management/rpm/commit/13585fbbe83eb177b13d86c2d6f11ff41a68d07e]
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 38d3c286a..a83016449 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -175,11 +175,11 @@ AS_IF([test "x$ac_cv_prog_c_openmp" != x &&
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $OPENMP_CFLAGS"
+ AC_MSG_CHECKING([OpenMP is at least version 4.5])
+- AC_RUN_IFELSE(
++ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <omp.h>],
+ [#if _OPENMP < 201511
+- exit(1);
++ #error
+ #endif
+ ]
+ )],
diff --git a/package/rpm/0005-Really-disable-OpenMP-if-too-old.patch b/package/rpm/0005-Really-disable-OpenMP-if-too-old.patch
new file mode 100644
index 0000000000..2628ccc538
--- /dev/null
+++ b/package/rpm/0005-Really-disable-OpenMP-if-too-old.patch
@@ -0,0 +1,26 @@
+From 662a367f427d653c6b8fbc7fbd1ace5ba120a25f Mon Sep 17 00:00:00 2001
+From: Michal Domonkos <mdomonko@redhat.com>
+Date: Thu, 3 Dec 2020 15:11:57 +0100
+Subject: [PATCH] Really disable OpenMP if too old
+
+Fix up for commit 6a780f1.
+
+[Retrieved from:
+https://github.com/rpm-software-management/rpm/pull/1455]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index c853cd9af..beb65ff8a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -187,6 +187,7 @@ AS_IF([test "x$ac_cv_prog_c_openmp" != x &&
+ AC_DEFINE(ENABLE_OPENMP, 1, [Enable multithreading support?])
+ ],
+ [AC_MSG_RESULT([no])
++ OPENMP_CFLAGS=
+ if test "$enable_openmp" = "yes"; then
+ AC_MSG_ERROR([OpenMP too old])
+ fi
diff --git a/package/rpm/Config.in b/package/rpm/Config.in
index fc702c3097..ac979fdbad 100644
--- a/package/rpm/Config.in
+++ b/package/rpm/Config.in
@@ -10,7 +10,6 @@ config BR2_PACKAGE_RPM
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBGCRYPT && !BR2_PACKAGE_LIBNSS && !BR2_PACKAGE_OPENSSL
- select BR2_PACKAGE_BERKELEYDB
select BR2_PACKAGE_FILE
select BR2_PACKAGE_POPT
select BR2_PACKAGE_ZLIB
diff --git a/package/rpm/rpm.hash b/package/rpm/rpm.hash
index cdb20e3b8f..7b2bd56d0a 100644
--- a/package/rpm/rpm.hash
+++ b/package/rpm/rpm.hash
@@ -1,5 +1,5 @@
-# From https://rpm.org/wiki/Releases/4.15.1.html
-sha256 ddef45f9601cd12042edfc9b6e37efcca32814e1e0f4bb8682d08144a3e2d230 rpm-4.15.1.tar.bz2
+# From https://rpm.org/wiki/Releases/4.16.0.html
+sha256 ca5974e9da2939afb422598818ef187385061889ba766166c4a3829c5ef8d411 rpm-4.16.0.tar.bz2
# Hash for license file
-sha256 d56f4f1f290f6920cb053aef0dbcd0b853cda289e2568b364ddbfce220a6f3e0 COPYING
+sha256 171d94d9f1641316bff7f157a903237dc69cdb5fca405fed8c832c76ed8370f9 COPYING
diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk
index d29c3febaa..350a38264b 100644
--- a/package/rpm/rpm.mk
+++ b/package/rpm/rpm.mk
@@ -4,13 +4,12 @@
#
################################################################################
-RPM_VERSION_MAJOR = 4.15
-RPM_VERSION = $(RPM_VERSION_MAJOR).1
+RPM_VERSION_MAJOR = 4.16
+RPM_VERSION = $(RPM_VERSION_MAJOR).0
RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
RPM_DEPENDENCIES = \
host-pkgconf \
- berkeleydb \
$(if $(BR2_PACKAGE_BZIP2),bzip2) \
$(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
file \
@@ -20,9 +19,13 @@ RPM_DEPENDENCIES = \
$(TARGET_NLS_DEPENDENCIES)
RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
RPM_LICENSE_FILES = COPYING
+RPM_CPE_ID_VENDOR = rpm
# We're patching configure.ac
RPM_AUTORECONF = YES
+# Don't set --{dis,en}-openmp as upstream wants to abort the build if
+# --enable-openmp is provided and OpenMP is < 4.5:
+# https://github.com/rpm-software-management/rpm/pull/1433
RPM_CONF_OPTS = \
--disable-python \
--disable-rpath \
@@ -38,6 +41,13 @@ else
RPM_CONF_OPTS += --without-acl
endif
+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+RPM_DEPENDENCIES += berkeleydb
+RPM_CONF_OPTS += --enable-bdb
+else
+RPM_CONF_OPTS += --disable-bdb
+endif
+
ifeq ($(BR2_PACKAGE_DBUS),y)
RPM_DEPENDENCIES += dbus
RPM_CONF_OPTS += --enable-plugins
@@ -88,6 +98,13 @@ else
RPM_CONF_OPTS += --without-selinux
endif
+ifeq ($(BR2_PACKAGE_SQLITE),y)
+RPM_DEPENDENCIES += sqlite
+RPM_CONF_OPTS += --enable-sqlite
+else
+RPM_CONF_OPTS += --disable-sqlite
+endif
+
ifeq ($(BR2_PACKAGE_ZSTD),y)
RPM_DEPENDENCIES += zstd
RPM_CONF_OPTS += --enable-zstd
@@ -95,12 +112,6 @@ else
RPM_CONF_OPTS += --disable-zstd
endif
-ifeq ($(BR2_TOOLCHAIN_HAS_OPENMP),y)
-RPM_CONF_OPTS += --enable-openmp
-else
-RPM_CONF_OPTS += --disable-openmp
-endif
-
# ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
RPM_CONF_ENV = \
ac_cv_prog_cc_c99='-std=gnu99' \