Skip to contentSkip to conversation

rpm: switch to version 4.13.0

PATCH New James Knight 2 participants 5 messages Nov 18, 2016 – Dec 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 rpm: switch to version 4.13.0

Switch from RPM5's implementation to rpm.org's more active stream [1].

The history of RPM and the common RPM5-fork is covered in an LWN article "Who maintains RPM?" [2]. Since rpm.org's implementation is used/ maintained on most RPM-based distributions as well as a series of other minor details (see [3]), the switch is being made.

[1]: http://lists.buildroot.org/pipermail/buildroot/2015-August/137580.html
[2]: https://lwn.net/Articles/196523/
[3]: https://patchwork.ozlabs.org/patch/668151/

---
Changes v6 -> v7:
- Dropping the following patch for the (same) upstream patch:

     0001-configure.ac-correct-stack-protector-check.patch
      (to)
     c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch

Changes v5 -> v6:
- Bumping RPM version from 4.12.0.1 to 4.13.0. This includes the following key changes for this patch:
- No longer required to add __fxstat64 quirk (patch) for uclibc.
- musl can now be supported since __fxstat64 and _D_EXACT_NAMELEN are no longer used.
- Dropping the following patch for the (same) upstream patch:

     0001-configure.ac-use-link-instead-of-compile-for-gcc-fla.patch
      (to)
     b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch

- Adding the (pending) upstream patch to support building musl:
0001-configure.ac-correct-stack-protector-check.patch
- Added comment for -std=gnu99 option (pointed out by Arnout Vandecappelle).
- Removed explicit disablement of large files since Buildroot always enables large files (pointed out by Arnout Vandecappelle).
- Cleanup Python disablement flag from --enable-python=no to --disable-python (suggested by Arnout Vandecappelle).
- Cleanup beecrypt/libnss order in Makefile to match Config.in file (suggested by Arnout Vandecappelle).
- Cleanup commit message (suggested by Thomas Petazzoni).

Changes v4 -> v5:
- Adjusting RPM_CONFIGURATION variable to RPM_CFLAGS for consistency (suggested by Thomas Petazzoni).
- Adding support for uClibc and explicitly disabling musl support (based on Thomas Petazzoni's comments and other tests).
- Adding -std=gnu99 flag.
- Dropped Lua support as Buildroot's version of Lua is too new for it to work.
- Note: Dropped host-support patches from this change set (just a single patch request now; will come back to this later).

Changes v3 -> v4:
- Adjusting package's hash to use hash value provided from official sources.
- Always build package without libcap. The initial patch (noticed by Peter Korsgaard) did not correctly configure the rpm package to use libcap. Adjusting the Makefile to correctly configure to use libcap results in some build issues. I'm hoping to include libcap support when rpm 4.13.0.1 is released; in the meantime, disabling libcap support.

Changes v2 -> v3:
- Cleanup configuration dependency to beecrypt/libnss; following convention (suggested by Baruch Siach).

Changes v1 -> v2:
- Package change introduced in change set 2.

---
 package/rpm/0002-depends-fix.patch           |  19 ---
 package/rpm/0003-exclude-some-tools.patch    |  30 ----
 package/rpm/0004-ignore-shared-mutexes.patch |  12 --
 package/rpm/0005-no-parentdirs.patch         |  14 --
 package/rpm/0006-ordering-fix.patch          |  45 -----
 package/rpm/0007-parentdir-vs-requires.patch |  37 -----
 package/rpm/0008-short-circuit-c99.patch     | 235 ---------------------------
 package/rpm/Config.in                        |  22 +--
 package/rpm/rpm.hash                         |   7 +-
 package/rpm/rpm.mk                           |  89 +++++-----
 10 files changed, 64 insertions(+), 446 deletions(-)
 delete mode 100644 package/rpm/0002-depends-fix.patch
 delete mode 100644 package/rpm/0003-exclude-some-tools.patch
 delete mode 100644 package/rpm/0004-ignore-shared-mutexes.patch
 delete mode 100644 package/rpm/0005-no-parentdirs.patch
 delete mode 100644 package/rpm/0006-ordering-fix.patch
 delete mode 100644 package/rpm/0007-parentdir-vs-requires.patch
 delete mode 100644 package/rpm/0008-short-circuit-c99.patch
package/rpm/0002-depends-fix.patch deleted +0 -19
deleted file mode 100644
index 4a92775..0000000
@@ -1,19 +0,0 @@
-Bugfix included upstream
-
-diff -u --new-file --recursive rpm-5.2.0_vanilla/lib/depends.c rpm-5.2.0_depends-fix/lib/depends.c
---- rpm-5.2.0_vanilla/lib/depends.c	2009-05-23 01:23:46.000000000 +0000
-+++ rpm-5.2.0_depends-fix/lib/depends.c	2009-09-22 06:33:37.950783501 +0000
-@@ -2371,11 +2371,11 @@
- 
- 	memset(selected, 0, sizeof(*selected) * ts->orderCount);
- 
--      if ((requires = rpmteDS(p, RPMTAG_REQUIRENAME)) != NULL) {
--
- 	/* Avoid narcisstic relations. */
- 	selected[rpmtsiOc(pi)] = 1;
- 
-+      if ((requires = rpmteDS(p, RPMTAG_REQUIRENAME)) != NULL) {
-+
- 	/* T2. Next "q <- p" relation. */
- 
- 	/* First, do pre-requisites. */
package/rpm/0003-exclude-some-tools.patch deleted +0 -30
deleted file mode 100644
index 2cbc7cb..0000000
@@ -1,30 +0,0 @@
-diff -ru rpm-5.2.0_vanilla/tools/Makefile.am rpm-5.2.0_exclude-some-tools/tools/Makefile.am
---- rpm-5.2.0_vanilla/tools/Makefile.am	2009-06-03 01:24:42.000000000 +0000
-+++ rpm-5.2.0_exclude-some-tools/tools/Makefile.am	2009-12-20 07:47:13.000000000 +0000
-@@ -45,9 +45,7 @@
- bin_PROGRAMS =		rpm2cpio
- 
- pkgbindir =		@USRLIBRPM@/bin
--pkgbin_PROGRAMS =	\
--	rpmcache rpmdigest grep mtree rpmrepo rpmspecdump wget \
--	rpmcmp rpmdeps @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
-+pkgbin_PROGRAMS =	
- dist_man_MANS =		rpmgrep.1
- 
- debugedit_SOURCES =	debugedit.c hashtab.c
-diff -ru rpm-5.2.0_vanilla/tools/Makefile.in rpm-5.2.0_exclude-some-tools/tools/Makefile.in
---- rpm-5.2.0_vanilla/tools/Makefile.in	2009-07-07 21:14:06.000000000 +0000
-+++ rpm-5.2.0_exclude-some-tools/tools/Makefile.in	2009-12-20 07:47:37.000000000 +0000
-@@ -39,11 +39,7 @@
- target_triplet = @target@
- EXTRA_PROGRAMS = rpmkey$(EXEEXT) debugedit$(EXEEXT)
- bin_PROGRAMS = rpm2cpio$(EXEEXT)
--pkgbin_PROGRAMS = rpmcache$(EXEEXT) rpmdigest$(EXEEXT) grep$(EXEEXT) \
--	mtree$(EXEEXT) rpmrepo$(EXEEXT) rpmspecdump$(EXEEXT) \
--	wget$(EXEEXT) rpmcmp$(EXEEXT) rpmdeps$(EXEEXT) \
--	@WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ $(am__EXEEXT_1) \
--	$(am__EXEEXT_2)
-+pkgbin_PROGRAMS = 
- @WITH_XAR_TRUE at am__append_1 = txar
- @WITH_DB_INTERNAL_TRUE@@WITH_DB_TOOLS_INTEGRATED_TRUE at am__append_2 = db_tool
- @WITH_DB_INTERNAL_TRUE@@WITH_DB_RPC_TRUE@@WITH_DB_TOOLS_INTEGRATED_TRUE@am__append_3 = \
package/rpm/0004-ignore-shared-mutexes.patch deleted +0 -12
deleted file mode 100644
index f19d6b6..0000000
@@ -1,12 +0,0 @@
-diff -ru rpm-5.2.0_vanilla/db/env/env_open.c rpm-5.2.0_test/db/env/env_open.c
---- rpm-5.2.0_vanilla/db/env/env_open.c	2008-05-28 01:23:27.000000000 +0000
-+++ rpm-5.2.0_test/db/env/env_open.c	2009-12-24 14:54:55.000000000 +0000
-@@ -124,7 +124,7 @@
- 		}
- 	}
- 
--#ifdef HAVE_MUTEX_THREAD_ONLY
-+#ifdef NK_HAVE_MUTEX_THREAD_ONLY
- 	/*
- 	 * Currently we support one kind of mutex that is intra-process only,
- 	 * POSIX 1003.1 pthreads, because a variety of systems don't support
package/rpm/0005-no-parentdirs.patch deleted +0 -14
deleted file mode 100644
index d05c99a..0000000
@@ -1,14 +0,0 @@
-Reduce parentdirs we use, parentdirs are used for ordering
-Included upstream
-diff -u --new-file --recursive rpm-5.1.9_vanilla/lib/depends.c rpm-5.1.9_no-parentdirs/lib/depends.c
---- rpm-5.1.9_vanilla/lib/depends.c	2009-04-12 19:46:17.000000000 +0000
-+++ rpm-5.1.9_no-parentdirs/lib/depends.c	2009-06-13 15:21:43.504999639 +0000
-@@ -2257,7 +2257,7 @@
- #define isAuto(_x)	((_x) & _autobits)
- 
- /*@unchecked@*/
--static int slashDepth = 100;	/* #slashes pemitted in parentdir deps. */
-+static int slashDepth = 2;	/* #slashes pemitted in parentdir deps. */
- 
- static int countSlashes(const char * dn)
- 	/*@*/
package/rpm/0006-ordering-fix.patch deleted +0 -45

45 lines not on this page · raw message

package/rpm/0007-parentdir-vs-requires.patch deleted +0 -37
deleted file mode 100644
index 309ab25..0000000
@@ -1,37 +0,0 @@
-Avoid looking up files or directories that this package provides
-Included upstream
-diff -u --new-file --recursive rpm-5.2.0_vanilla/lib/depends.c rpm-5.2.0_parentdir-vs-requires/lib/depends.c
---- rpm-5.2.0_vanilla/lib/depends.c	2009-05-23 01:23:46.000000000 +0000
-+++ rpm-5.2.0_parentdir-vs-requires/lib/depends.c	2009-09-22 17:00:24.880956271 +0000
-@@ -2095,6 +2095,7 @@
-     rpmtsi qi; rpmte q;
-     tsortInfo tsi;
-     nsType NSType = rpmdsNSType(requires);
-+    const char * N = rpmdsN(requires);
-     fnpyKey key;
-     int teType = rpmteType(p);
-     alKey pkgKey;
-@@ -2128,6 +2129,23 @@
- 	break;
-     }
- 
-+    /* Avoid looking up files/directories that are "owned" by _THIS_ package. */
-+    if (*N == '/') {
-+    rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES);
-+    int bingo = 0;
-+
-+    fi = rpmfiInit(fi, 0);
-+    while (rpmfiNext(fi) >= 0) {
-+        const char * fn = rpmfiFN(fi);
-+        if (strcmp(N, fn))
-+        continue;
-+        bingo = 1;
-+        break;
-+    }
-+    if (bingo)
-+        return 0;
-+    }
-+
-     pkgKey = RPMAL_NOMATCH;
-     key = rpmalSatisfiesDepend(al, requires, &pkgKey);
- 
package/rpm/0008-short-circuit-c99.patch deleted +0 -235

235 lines not on this page · raw message

package/rpm/Config.in +7 -15
index 2be646a..8b7705d 100644
@@ -1,28 +1,20 @@
 comment "rpm needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-
-comment "rpm needs a toolchain w/ gcc >= 5"
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5 && BR2_sh
+	depends on BR2_USE_MMU
 
 config BR2_PACKAGE_RPM
 	bool "rpm"
-	# triggers internal compiler error
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_sh
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-	select BR2_PACKAGE_BEECRYPT
+	select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBNSS
+	select BR2_PACKAGE_BERKELEYDB
+	select BR2_PACKAGE_FILE
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
-	select BR2_PACKAGE_NEON
-	select BR2_PACKAGE_NEON_SSL
-	select BR2_PACKAGE_NEON_XML
-	select BR2_PACKAGE_NEON_ZLIB
-	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_ZLIB
 	help
-	  The RPM package management system.
+	  The RPM Package Manager (RPM).
 
-	  http://rpm5.org
+	  http://www.rpm.org/
package/rpm/rpm.hash +5 -2
index 0665746..c9c4d65 100644
@@ -1,2 +1,5 @@
-# Locally calculated
-sha256	34a959c0ed670cadcdc52c6025e822fac6f5d1015e3b75123f53ebe53b923e98	rpm-5.2.0.tar.gz
+# From http://rpm.org/wiki/Releases/4.13.0
+sha1	c6ce4f879ca6a75340921093105e5ef9d33381d3	rpm-4.13.0.tar.bz2
+# Locally computed
+sha256	a3e5568d721737a24141737e6036bb39ba9dfbeaa03fa4a51cc7881a243e0c5d b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch
+sha256	7ab0e08e143bb2d43d5b0553ee22ea34da15a611c597860a6110745467d20fa8 c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
package/rpm/rpm.mk +52 -37

113 lines not on this page · raw message

Signature · 1 line
2.8.4.windows.1
#1 lore raw

PATCH v7 1/1 rpm: switch to version 4.13.0

Hello,

package/rpm/rpm.mk line 11

Quoted 11 lines · James Knight
package/rpm/rpm.mk +5 -6
-RPM_VERSION_MAJOR = 5.2
-RPM_VERSION = $(RPM_VERSION_MAJOR).0
-RPM_SITE = http://rpm5.org/files/rpm/rpm-$(RPM_VERSION_MAJOR)
-RPM_DEPENDENCIES = host-pkgconf zlib beecrypt neon popt openssl
-RPM_LICENSE = LGPLv2.1
-RPM_LICENSE_FILES = COPYING.LIB
+RPM_VERSION = 4.13.0
+RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
+RPM_SITE = https://github.com/rpm-software-management/rpm/releases/download/rpm-$(RPM_VERSION)-release
+RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
+RPM_LICENSE = GPLv2

If you read the COPYING file, it's in fact GPLv2, or LGPLv2 but for the library only. So I've adjusted the license information here.

I've applied to next, the rest of the patch seemed reasonable.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v7 1/1 rpm: switch to version 4.13.0

Hello,

Quoted 24 lines · Thomas Petazzoni

Hello,

package/rpm/rpm.mk line 11

Quoted 11 lines · James Knight
package/rpm/rpm.mk +5 -6
-RPM_VERSION_MAJOR = 5.2
-RPM_VERSION = $(RPM_VERSION_MAJOR).0
-RPM_SITE = http://rpm5.org/files/rpm/rpm-$(RPM_VERSION_MAJOR)
-RPM_DEPENDENCIES = host-pkgconf zlib beecrypt neon popt openssl
-RPM_LICENSE = LGPLv2.1
-RPM_LICENSE_FILES = COPYING.LIB
+RPM_VERSION = 4.13.0
+RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
+RPM_SITE = https://github.com/rpm-software-management/rpm/releases/download/rpm-$(RPM_VERSION)-release
+RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
+RPM_LICENSE = GPLv2  

If you read the COPYING file, it's in fact GPLv2, or LGPLv2 but for the library only. So I've adjusted the license information here.

I've applied to next, the rest of the patch seemed reasonable.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH v7 1/1 rpm: switch to version 4.13.0

Hello,

(Sorry for the previous empty e-mail)

Quoted 4 lines · Thomas Petazzoni
Quoted 4 lines

If you read the COPYING file, it's in fact GPLv2, or LGPLv2 but for the library only. So I've adjusted the license information here.

I've applied to next, the rest of the patch seemed reasonable.

This new rpm package causes lots of build failures:

http://autobuild.buildroot.net/?reason=rpm-4.13.0

Could you have a look and provide patches to fix those issues?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH v7 1/1 rpm: switch to version 4.13.0

Thomas,

Quoted 6 lines · Thomas Petazzoni

This new rpm package causes lots of build failures:

http://autobuild.buildroot.net/?reason=rpm-4.13.0

Could you have a look and provide patches to fix those issues?

Will do; literally running br-reproduce-build now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20161207/415bffed/attachment.html>