--- rpm-4.16.1.3/installplatform.orig 2021-03-28 17:56:17.725422731 +0200
+++ rpm-4.16.1.3/installplatform 2021-03-28 17:57:04.278251530 +0200
-@@ -111,12 +111,14 @@
+@@ -111,12 +111,16 @@
ISABITS=32
CANONARCH=arm
CANONCOLOR=0
+ APPEND_TARGET_ABI=1
++ RPMRC_GNU=-gnueabi
;;
arm*)
ISANAME=`echo ${ARCH} | sed "s/^\([^-]*\)-.*/\1/"`
CANONARCH=arm
CANONCOLOR=0
+ APPEND_TARGET_ABI=1
++ RPMRC_GNU=-gnueabi
;;
alpha*)
ISANAME=alpha
RPM_PACKAGE_VERSION=\"%{VERSION}\"\
RPM_PACKAGE_RELEASE=\"%{RELEASE}\"\
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
-+ LC_ALL=C\
++ LC_ALL=@C_LOCALE@\
+ export LC_ALL\
- LANG=C\
+ LANG=@C_LOCALE@\
export LANG\
- unset CDPATH DISPLAY ||:\
+ unset CDPATH DISPLAY LANGUAGE LINGUAS PERL_MM_OPT ||:\
unset DEBUGINFOD_URLS ||:\
- %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
- export RPM_BUILD_ROOT}\
+ unset RPM_CONFIG_DIR ||:\
+ RPM_BUILD_ROOT=\"%{buildroot}\"\
--- /dev/null
+--- rpm-4.20.0/build/parsePreamble.c~ 2024-10-07 11:35:46.000000000 +0200
++++ rpm-4.20.0/build/parsePreamble.c 2025-02-12 23:12:25.436660137 +0100
+@@ -1330,6 +1330,10 @@
+ rpmPushMacroFlags(spec->macros, "_buildrootdir", NULL,
+ "%{dirname:%{buildroot}}", RMIL_GLOBAL, 0);
+ }
++ /* XXX Skip valid arch check if not building binary package */
++ if (!(spec->flags & RPMSPEC_ANYARCH) && checkForValidArchitectures(spec)) {
++ goto exit;
++ }
+
+ /* if we get down here nextPart has been set to non-error */
+ res = nextPart;
#include <rpm/rpmtypes.h>
@@ -9,6 +11,9 @@
- #include <rpm/rpmstring.h>
#include <rpm/rpmlog.h>
#include <rpm/rpmstrpool.h>
+ #include <rpm/rpmbase64.h>
+#include <rpm/rpmmacro.h>
+
-+#include "rpmio/rpmio_internal.h" /* XXX for rpmioSlurp */
++#include "rpmio_internal.h" /* XXX for rpmioSlurp */
- #include "lib/rpmds_internal.h"
+ #include "rpmds_internal.h"
@@ -1655,3 +1670,203 @@
{
+
typedef enum rpmrichOp_e {
- RPMRICHOP_SINGLE = 1,
+ RPMRICHOP_NONE = 0,
diff -ur rpm-4.16.0/lib/rpmts_internal.h rpm-4.16.0-cpuinfo/lib/rpmts_internal.h
--- rpm-4.16.0/lib/rpmts_internal.h 2020-11-08 20:19:15.625093667 +0100
+++ rpm-4.16.0-cpuinfo/lib/rpmts_internal.h 2020-11-08 20:22:24.382319931 +0100
--- /dev/null
+--- rpm-4.20.1/macros.in.orig 2025-03-08 01:04:55.096404276 +0100
++++ rpm-4.20.1/macros.in 2025-03-08 01:10:03.450556930 +0100
+@@ -146,7 +146,7 @@
+
+ # sysusers helper binary (or a replacement script), comment out to disable
+ #%__systemd_sysusers @__SYSTEMD_SYSUSERS@
+-%__systemd_sysusers %{_rpmconfigdir}/sysusers.sh
++#%__systemd_sysusers %{_rpmconfigdir}/sysusers.sh
+
+ #
+ # Path to script that creates debug symbols in a /usr/lib/debug
--- /dev/null
+--- rpm-4.20.1/lib/rpmug.c.orig 2025-02-19 16:29:33.000000000 +0100
++++ rpm-4.20.1/lib/rpmug.c 2025-02-26 20:58:54.695393189 +0100
+@@ -1,6 +1,7 @@
+ #include "system.h"
+
+ #include <errno.h>
++#include <rpm/argv.h>
+ #include <rpm/rpmlog.h>
+ #include <rpm/rpmstring.h>
+ #include <rpm/rpmmacro.h>
+@@ -51,7 +52,8 @@
+ char **ret)
+ {
+ int rc = -1; /* assume not found */
+- char *str, buf[BUFSIZ];
++ int nf = vcol > rcol ? vcol : rcol;
++ char *str, buf[BUFSIZ], *lastret = NULL;
+ FILE *f = fopen(path, "r");
+ if (f == NULL) {
+ rpmlog(RPMLOG_ERR, _("failed to open %s for id/name lookup: %s\n"),
+@@ -60,28 +62,27 @@
+ }
+
+ while ((str = fgets(buf, sizeof(buf), f)) != NULL) {
+- int nf = vcol > rcol ? vcol : rcol;
+- const char *fields[nf + 1];
+- char *tok, *save = NULL;
+- int col = -1;
+-
+- while ((tok = strtok_r(str, ":", &save)) != NULL) {
+- fields[++col] = tok;
+- str = NULL;
+- if (col >= nf)
+- break;
+- }
++ ARGV_t fields;
++
++ fields = argvSplitString(str, ":", ARGV_NONE);
+
+- if (col >= nf) {
++ if (argvCount(fields) > nf) {
+ if (rstreq(val, fields[vcol])) {
+- *ret = xstrdup(fields[rcol]);
++ if (lastret != NULL)
++ free(lastret);
++ lastret = xstrdup(fields[rcol]);
+ rc = 0;
+ }
+ }
++
++ argvFree(fields);
+ }
+
+ fclose(f);
+
++ if (!rc)
++ *ret = lastret;
++
+ return rc;
+ }
+
+ CANONARCH=${ARCH}
CANONCOLOR=0
;;
- x86_64|amd64|ia32e)
+ x86_64*|amd64|ia32e)
--- rpm-4.16.0/rpmrc.in~ 2020-10-27 22:14:37.000000000 +0100
+++ rpm-4.16.0/rpmrc.in 2020-10-27 22:37:49.273277848 +0100
@@ -302,13 +302,13 @@
--- rpm-4.16.0/build/files.c.orig 2020-12-18 19:36:49.000000000 +0100
+++ rpm-4.16.0/build/files.c 2020-12-18 19:48:35.711529643 +0100
-@@ -2394,14 +2394,16 @@
- appendStringBuf(docScript, efn);
- appendStringBuf(docScript, " $");
- appendStringBuf(docScript, sdenv);
-- appendLineStringBuf(docScript, " ||:");
- free(efn);
+@@ -2394,17 +2394,19 @@
+ appendStringBuf(docScript, argv[j]);
+ appendStringBuf(docScript, "' $");
+ appendStringBuf(docScript, sdenv);
+- appendLineStringBuf(docScript, " ||:");
+ }
+ }
+ free(origfile);
+ files[i] = argv;
}
-
+ free(basepath);
if (install) {
+ int _missing_doc_files_terminate_build =
+ rpmExpandNumeric("%{?_missing_doc_files_terminate_build}");
---- rpm-4.16.0/configure.ac~ 2020-11-22 19:47:14.000000000 +0100
-+++ rpm-4.16.0/configure.ac 2020-11-22 19:49:03.093877834 +0100
-@@ -76,6 +76,7 @@
- dnl Find some common programs
- dnl
- AC_PATH_PROGS(__7ZIP, [7zip 7za 7z], /usr/bin/7za, $MYPATH)
-+AC_PATH_PROG(__BASH, bash, /bin/bash, $MYPATH)
- AC_PATH_PROG(__BZIP2, bzip2, /usr/bin/bzip2, $MYPATH)
- AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
- AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH)
-@@ -91,6 +92,7 @@
- AC_PATH_PROG(__UNZIP, unzip, /usr/bin/unzip, $MYPATH)
- AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
- AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
-+AC_PATH_PROG(__LN, ln, /bin/ln, $MYPATH)
- AC_PATH_PROG(__LRZIP, lrzip, /usr/bin/lrzip, $MYPATH)
- AC_PATH_PROG(__LZIP, lzip, /usr/bin/lzip, $MYPATH)
- AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH)
-@@ -104,6 +106,7 @@
- AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
- AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
- AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
-+AC_PATH_PROG(__SH, sh, /bin/sh, $MYPATH)
- AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
- AC_PATH_PROG(__ZSTD, zstd, /usr/bin/zstd, $MYPATH)
+--- rpm-4.20.0/CMakeLists.txt~ 2024-10-07 11:35:46.000000000 +0200
++++ rpm-4.20.0/CMakeLists.txt 2024-11-24 23:27:34.151396858 +0100
+@@ -109,6 +109,7 @@
+ endif()
+ findutil(__7ZIP "7za;7z")
++ findutil(__BASH bash)
+ findutil(__BZIP2 bzip2)
+ findutil(__CAT cat)
+ findutil(__CHMOD chmod)
+@@ -132,6 +133,7 @@
+ findutil(__PATCH patch)
+ findutil(__RM rm)
+ findutil(__SED sed)
++ findutil(__SH sh)
+ findutil(__TAR tar)
+ findutil(__UNZIP unzip)
+ findutil(__ZSTD zstd)
--- rpm-4.16.0/macros.in~ 2020-11-21 19:41:19.000000000 +0100
+++ rpm-4.16.0/macros.in 2020-11-22 19:45:24.182620411 +0100
@@ -6,6 +6,7 @@
# should be added to /etc/rpm/macros, while per-user configuration should
# be added to ~/.rpmmacros.
#
-+%_rpmversion @VERSION@
++%_rpmversion @CMAKE_PROJECT_VERSION@
#==============================================================================
# ---- A macro that expands to nothing.
@@ -25,6 +25,7 @@
#
%__7zip @__7ZIP@
- %__awk @AWK@
+ %__awk @__AWK@
+%__bash @__BASH@
%__bzip2 @__BZIP2@
%__cat @__CAT@
%__chmod @__CHMOD@
-@@ -39,6 +40,7 @@
- %__id @__ID@
- %__id_u %{__id} -u
- %__install @__INSTALL@
-+%__ln @__LN@
- %__ln_s @LN_S@
- %__lrzip @__LRZIP@
- %__lzip @__LZIP@
@@ -54,6 +57,7 @@
%__patch @__PATCH@
%__rm @__RM@
--- rpm-4.16.0/build/rpmbuild_internal.h 2020-12-18 20:09:28.354868788 +0100
+++ rpm-4.16.0-noexpand/build/rpmbuild_internal.h 2020-12-18 20:09:09.054827168 +0100
@@ -246,6 +246,7 @@
+ #define STRIP_NOTHING 0
#define STRIP_TRAILINGSPACE (1 << 0)
#define STRIP_COMMENTS (1 << 1)
- #define STRIP_PARSED (1 << 2) /* Avoid adding to spec->parsed (hack) */
-+#define STRIP_NOEXPAND (1 << 3)
++#define STRIP_NOEXPAND (1 << 2)
#define ALLOW_EMPTY (1 << 16)
+++ /dev/null
-From 73419594af15e94e77bae413d9754d3775cf0280 Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus@fastmail.com>
-Date: Tue, 12 Dec 2023 19:45:54 +0100
-Subject: [PATCH] perl.req: make heredoc block matching more generic
-
-match any <<MARKER providing:
-
-- it is not in comment (not preceded by #)
-- it can't be string literal (not preceded by ' or ")
-- as a sanity check it must be preceded by either whitespace, comma or
- equals sign
-
-adds support for
-
- return <<"EOS";
-
- fun(arg, <<"EOS");
----
- scripts/perl.req | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/scripts/perl.req b/scripts/perl.req
-index 1b50c50847..8bfa38771e 100755
---- a/scripts/perl.req
-+++ b/scripts/perl.req
-@@ -102,10 +102,10 @@ sub process_file {
-
- while (<FILE>) {
-
-- # skip the "= <<" block
-+ # skip the heredoc block
-
-- if (m/^\s*(?:my\s*)?\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
-- m/^\s*(?:my\s*)?\$(.*)\s*=\s*<<(\w+)\s*;/) {
-+ if (m/^[^'"#]+[\s,=(]<<\s*(["'`])(.+?)\1/ ||
-+ m/^[^'"#]+[\s,=(](<<)(\w+)\s*;/) {
- $tag = $2;
- while (<FILE>) {
- chomp;
+++ /dev/null
-#!/usr/bin/perl
-use strict;
-
-# perl.prov - find information about perl modules for RPM
-# $Id$
-
-# It's questionable if we should provide perl(Foo::Bar) for modules
-# from outside @INC (possibly shipped with some applications).
-# I think we should not, and provide them only for the perl.req script,
-# while it scans files in that particular application.
-
-
-# check if we are called directly
-if ($0 =~ m#(?:^|/)perl.prov$#) {
- my $prov = new RPM::PerlReq;
- # process @ARGV or STDIN
- foreach ( @ARGV ? @ARGV : <> ) {
- chomp;
- next if -l || !-f _; # skip non-files and symlinks
- next if m#/usr/(?:share/doc|src)/#; # lot of false alarms; warning: we omit ^ here
- next if !m#\.p[ml]$#; # we only care about *.pm and *.pl files
- $prov->process_file($_);
- }
- $prov->print_result;
-}
-
-
-package RPM::PerlReq;
-use Safe;
-
-sub new {
- my $class = shift;
- my $self = {
- inc => [
- sort { length $b cmp length $a } grep m#^/#,
- map { y#/#/#s; s#/$##; $_ } @INC
- ],
- provide => {},
- safe => Safe->new,
- @_,
- };
- bless $self, $class;
-}
-
-# print out what we found
-sub print_result {
- my $self = shift;
- for (sort keys %{ $self->{provide} }) {
- print "perl($_)"
- . (length $self->{provide}->{$_} ? " = $self->{provide}->{$_}" : '')
- . "\n";
- }
-}
-
-sub process_file {
- my $self = shift;
- my $file = shift;
- my ( $package, $version );
-
- # if the file lives under @INC, we can
- # obtain the package name from it's path
- for (@{ $self->{inc} }) {
- if ($file =~ m#\Q$_\E/(.+)$#) { # we can't use ^ here
- $package = $1;
-
- if ($package !~ s/\.pm$//) { # it's a *.pl
- # $package =~ m#([^/]+)$#;
- # $provide{$1} = '';
- return 1;
- }
-
- $package =~ s#/#::#g;
- last;
- }
- }
-
- # it can be a *.pl oustide @INC
- return if /\.pl$/;
-
- local *FILE;
- open FILE, $file or die "$0: cannot open file `$file': $!";
-
- while (<FILE>) {
-
- # skip the documentation
- next
- if m/^=(?:head1|head2|pod|item|begin|for|over)\b/
- ... ( m/^=(?:cut|end)\b/ || $. == 1 );
-
- # skip the data section
- last if m/^__(?:DATA|END)__$/;
-
- # search for the package name
- if (
- (!defined $package || !defined $version)
- && ( my ($pack, $ver) = m/^\s*(?:\{\s*)?package\s+([_:a-zA-Z0-9]+?)\s*(?:v?([0-9_.]+)\s*)?[;{]/)
- && $1 ne 'main'
- && match_the_path( $file, $1 )
- )
- {
- $package = $pack;
- $version = $ver;
- }
-
- if ( !defined $version && /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ ) {
- ( $version = $self->{safe}->reval($_) ) =~ s/^\s+|alpha|beta|\s+$//g;
- if ( defined $version
- && length $version
- && ($version =~ /[^\d\._abcdefgh]/
- || $version =~ /^[^\d]*$/ ))
- {
- warn "$0: weird version number in $file: [$version]\n";
- $version = '';
- }
- }
- }
-
- unless ( defined $package ) {
- warn "$0: weird, cannot determine the package name for `$file'\n";
- return 0;
- }
-
- $self->{provide}->{$package} = $version;
-
- close FILE or die "$0: cannot close file `$file': $!";
-
- 1;
-}
-
-
-# Returns C<true> if the package name matches the path,
-# so you can use() it. C<false> otherwise.
-sub match_the_path {
- my ( $file, $pack ) = @_;
- $pack =~ s#::#/#g;
- $file =~ /\Q$pack\E(?:\.pm)?$/;
-}
-
-
-1;
-
-# vim: ts=4 sw=4 noet noai nosi cin
Requires: popt
Requires.private: @ZSTD_REQUIRES@
# Conflicts:
--Cflags: -I${includedir}
+-Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64
-Libs: -L${libdir} -lrpm -lrpmio
-+Cflags: -I${includedir}/rpm
++Cflags: -I${includedir}/rpm -D_FILE_OFFSET_BITS=64
+Libs: -L${libdir} -lrpm -lrpmio -lrpmbuild
Libs.private: -lpopt -lrt -lpthread @WITH_LZMA_LIB@ @WITH_BZ2_LIB@ @WITH_ZLIB_LIB@ @LUA_LIBS@
+++ /dev/null
---- rpm-4.16.1.2/po/pl.po~ 2021-02-19 09:16:53.000000000 +0100
-+++ rpm-4.16.1.2/po/pl.po 2021-02-23 10:46:24.003601872 +0100
-@@ -37,7 +37,7 @@
- #: cliutils.c:27 lib/poptALL.c:61
- #, c-format
- msgid "RPM version %s\n"
--msgstr "RPM %s\n"
-+msgstr "RPM wersja %s\n"
-
- #: cliutils.c:32
- #, c-format
+++ /dev/null
---- rpm-4.18.2/python/header-py.c.orig 2023-11-13 13:18:27.000000000 +0100
-+++ rpm-4.18.2/python/header-py.c 2024-11-23 10:43:56.360696347 +0100
-@@ -316,10 +316,17 @@
- "(Oi)", s, RPMTAG_NEVR);
- }
-
-+#if __BITS_PER_LONG == 64
- static long hdr_hash(PyObject * h)
- {
- return (long) h;
- }
-+#else
-+static int hdr_hash(PyObject * h)
-+{
-+ return (int) h;
-+}
-+#endif
-
- static PyObject * hdr_reduce(hdrObject *s)
- {
+++ /dev/null
---- rpm-4.15.1/python/setup.py.in.orig 2019-06-26 23:17:31.000000000 +0900
-+++ rpm-4.15.1/python/setup.py.in 2020-01-01 01:58:28.121517896 +0900
-@@ -12,17 +12,8 @@
- out.append(token[2:])
- return out
-
--cflags = ['-std=c99', '-Wno-strict-aliasing']
--additional_link_args = []
--
--# See if we're building in-tree
--if os.access('Makefile.am', os.F_OK):
-- cflags.append('-I../include')
-- additional_link_args.extend(['-Wl,-L../rpmio/.libs',
-- '-Wl,-L../lib/.libs',
-- '-Wl,-L../build/.libs',
-- '-Wl,-L../sign/.libs'])
-- os.environ['PKG_CONFIG_PATH'] = '..'
-+cflags = ['-std=c99', '-Wno-strict-aliasing', '-I../include']
-+os.environ['PKG_CONFIG_PATH'] = '..'
-
- rpmmod = Extension('rpm._rpm',
- sources = ['header-py.c', 'rpmds-py.c', 'rpmfd-py.c',
-@@ -33,11 +24,9 @@
- 'rpmte-py.c', 'rpmts-py.c', 'rpmver-py.c',
- 'spec-py.c',
- 'rpmmodule.c'],
-- include_dirs = pkgconfig('--cflags'),
-- library_dirs = pkgconfig('--libs-only-L'),
-+ library_dirs = ['../rpmio/.libs', '../lib/.libs', '../build/.libs', '../sign/.libs'],
- libraries = pkgconfig('--libs-only-l') + ['rpmbuild', 'rpmsign'],
- extra_compile_args = cflags,
-- extra_link_args = additional_link_args
- )
-
- setup(name='@PACKAGE_NAME@',
--- rpm-5.4.10/build/files.c~ 2013-01-24 14:24:39.161982722 +0100
+++ rpm-5.4.10/build/files.c 2013-01-24 14:27:50.620325354 +0100
@@ -2363,6 +2363,11 @@
- appendLineStringBuf(docScript, "export LC_ALL=C");
+ appendLineStringBuf(docScript, "export LC_ALL=" C_LOCALE);
appendStringBuf(docScript, "export ");
appendLineStringBuf(docScript, sdenv);
+ appendStringBuf(docScript, "if test -d \"$");
+ appendStringBuf(docScript, sdenv);
+ appendLineStringBuf(docScript, "\" ; fi");
appendLineStringBuf(docScript, mkdocdir);
-
- for (ARGV_const_t fn = sd->files; fn && *fn; fn++) {
+ for (i = 0; i < count; i++) {
+ char *origfile = rpmCleanPath(rstrscat(NULL, basepath, "/",
+%_sysconfdir /etc
+%_sharedstatedir /var/lib
+%_localstatedir /var
- %_lib @LIB@
--%_libdir @exec_prefix@/@LIB@
+ %_lib =LIB=
+-%_libdir @exec_prefix@/=LIB=
-%_includedir @includedir@
-%_oldincludedir @oldincludedir@
-%_infodir @infodir@
-%_mandir @mandir@
-%_initddir %{_sysconfdir}/rc.d/init.d
-+%_libdir %{_exec_prefix}/@LIB@
++%_libdir %{_exec_prefix}/=LIB=
+%_includedir %{_prefix}/include
+%_oldincludedir %{_prefix}/include
+%_infodir %{_datarootdir}/info
+%_initddir /etc/rc.d/init.d
# Deprecated misspelling, present for backwards compatibility.
%_initrddir %{_initddir}
- %_rundir @RUNDIR@
+ %_rundir @rundir@
--- rpm-5.4.15/rpmio/macro.c~ 2014-12-07 20:24:53.000000000 +0100
+++ rpm-5.4.15/rpmio/macro.c 2014-12-07 20:44:45.739944044 +0100
@@ -1795,6 +1795,7 @@
- for (path = files; *path; path++) {
+ size_t len = strlen(*path);
if (rpmFileHasSuffix(*path, ".rpmnew") ||
rpmFileHasSuffix(*path, ".rpmsave") ||
+ rpmFileHasSuffix(*path, "~") ||
- rpmFileHasSuffix(*path, ".rpmorig")) {
+ rpmFileHasSuffix(*path, ".rpmorig") ||
+ (len > 0 && !risalnum((*path)[len - 1]))) {
continue;
- }
+++ /dev/null
---- rpm-5.3.1/configure.ac.wiget 2010-05-22 17:15:11.000000000 +0200
-+++ rpm-5.3.1/configure.ac 2010-05-30 16:37:59.526924459 +0200
-@@ -1100,7 +1100,7 @@ AC_CONFIG_FILES([ po/Makefile.in
-
- AC_CONFIG_FILES([Makefile
- rpmio/Makefile lib/Makefile build/Makefile sign/Makefile
-- po/Makefile.in scripts/Makefile fileattrs/Makefile
-+ po/Makefile.in scripts/Makefile scripts/perl.req scripts/perl.prov fileattrs/Makefile
- misc/Makefile
- docs/Makefile
- docs/man/Makefile
---- rpm-5.3.1/scripts/perl.req.wiget 2008-10-26 10:50:53.000000000 +0100
-+++ rpm-5.3.1/scripts/perl.req 2010-05-30 16:35:36.999438206 +0200
-@@ -45,7 +45,11 @@
-
- if ("@ARGV") {
- foreach (@ARGV) {
-- process_file($_);
-+ if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
-+ if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
-+ process_file($_);
-+ }
-+ }
- }
- } else {
-
-@@ -53,7 +57,11 @@
- # contents of the file.
-
- foreach (<>) {
-- process_file($_);
-+ if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
-+ if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
-+ process_file($_);
-+ }
-+ }
- }
- }
-
-@@ -261,19 +269,41 @@
-
- $module =~ s/\(\s*\)$//;
-
-- if ( $module =~ m/^v?([0-9._]+)$/ ) {
-+ if ( $module =~ m/^(v?)([0-9._]+)$/ ) {
- # if module is a number then both require and use interpret that
- # to mean that a particular version of perl is specified
-
-- my $ver = $1;
-- if ($ver =~ /5.00/) {
-- $perlreq{"0:$ver"} = 1;
-- next;
-- }
-- else {
-- $perlreq{"1:$ver"} = 1;
-- next;
-- }
-+ my $ver=$2;
-+ if (($1 eq 'v') or ($ver =~ /[0-9]+\.[0-9]+\.[0-9]+/)) {
-+ # $V-style
-+ if ($ver =~ m/5\.([0-5])(\.([0-9]+))?$/) {
-+ if (defined $3) {
-+ print "perl-base >= 0:5.00$1_$3\n";
-+ } else {
-+ print "perl-base >= 0:5.00$1\n";
-+ }
-+ } else {
-+ print "perl-base >= 1:$ver\n";
-+ }
-+ } else {
-+ # $]-style
-+ if ($ver =~ m/5\.(00[0-5])_?([0-9]+)?$/) {
-+ if (defined $2) {
-+ print "perl-base >= 0:5.$1_$2\n";
-+ } else {
-+ print "perl-base >= 0:5.$1\n";
-+ }
-+ } else {
-+ # expand to M.NNN_nnn form
-+ $ver =~ s/^([0-9])$/$1./;
-+ $ver =~ s/^([0-9]\.[0-9]{0,5}|[0-9]\.[0-9]{3}_[0-9]{0,2})$/${1}000000/;
-+ $ver =~ s/^([0-9]\.[0-9]{3})_?([0-9]{3})0*$/$1_$2/;
-+ # match trimming leading 0s
-+ $ver =~ m/^([0-9])\.0*([1-9][0-9]*|0)_0*([1-9][0-9]*|0)$/;
-+ print "perl-base >= 1:$1.$2.$3\n";
-+ }
-+ }
-+ next;
-
- };
-
-@@ -290,7 +320,31 @@
- # will be included with the name sys/systeminfo.ph so only use the
- # basename of *.ph files
-
-- ($module =~ m/\.ph$/) && next;
-+ # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g );
-+
-+ # there is no need to generate dependencies for ph, pl or test files
-+ # so let's just skip them.
-+
-+ ($module =~ m/\.(ph|pl|t)$/) && next;
-+
-+ # skip all modules for platforms other than linux.
-+
-+ ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
-+
-+ # if the module name starts in a dot it is not a module name.
-+
-+ ($module =~ m/^\./) && next;
-+
-+ # if the module ends with .pm strip it to leave only basename.
-+
-+ $module =~ s/\.pm$//;
-+
-+ $module =~ s/\//::/;
-+
-+ # trim off trailing parenthesis if any. Sometimes people pass
-+ # the module an empty list.
-+
-+ $module =~ s/\(\s*\)$//;
-
- # use base|parent qw(Foo) dependencies
- if ($statement eq "use" && ($module eq "base" || $module eq "parent")) {
+++ /dev/null
---- rpm-4.2/scripts/perl.req.wigperl Tue Apr 1 13:33:52 2003
-+++ rpm-4.2/scripts/perl.req Tue Apr 1 13:39:47 2003
-@@ -39,28 +39,19 @@
- eval { require version; $HAVE_VERSION = 1; };
-
-
--if ("@ARGV") {
-- foreach (@ARGV) {
-+foreach ( @ARGV ? @ARGV : <> ) {
-+ chomp;
- if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
- if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
-- process_file($_);
-+ process_file($_) if -f;
- }
- }
-- }
--} else {
--
-- # notice we are passed a list of filenames NOT as common in unix the
-- # contents of the file.
--
-- foreach (<>) {
-- if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
-- if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
-- process_file($_);
-- }
-- }
-- }
- }
-
-+foreach (sort keys %provide) {
-+ delete $require{$_};
-+}
-+delete $require{the}; # don't count "use the sth" as perl module
-
- foreach $perlver (sort keys %perlreq) {
- print "perl >= $perlver\n";
-@@ -82,6 +74,53 @@
- }
- }
-
-+sub is_perlfile {
-+ my $file = shift;
-+ my $fh = shift;
-+
-+ my $fl = <$fh>;
-+
-+ my $is_perl = 0;
-+
-+ my $nw = 0;
-+
-+ if ($file =~ /\.(so|ph|h|html|pod|gz|bz2|png|gif|jpg|xpm|a|patch|o|mo)$/) {
-+ $is_perl = 0;
-+
-+ # .al, .pl, .pm and .plx (perl-Font-TTF contains *.plx files)
-+ } elsif ($file =~ /\.p[lm]x?$/ || $file =~ /\.al$/) {
-+ $is_perl = 1;
-+ #print STDERR "$file PERL by ext\n";
-+ } elsif ($fl =~ m|bin/perl| or $fl =~ m|env\s+perl| or $fl =~ m|exec\s+perl|) {
-+ $is_perl = 1;
-+ #print STDERR "$file PERL by perl\n";
-+ } elsif ($fl =~ m|bin/sh|) {
-+ while (<$fh>) {
-+ if (/eval/ && /perl/) {
-+ $is_perl = 1;
-+ last;
-+ }
-+ $nw++ if (/^\s*BEGIN/);
-+ $nw++ if (/^\s*sub\s+/);
-+ $nw++ if (/^\s*package\s+/);
-+ $nw++ if (/^\s*use\s+strict\s+;/);
-+ $nw++ if (/^\s*use\s+vars\s*qw/);
-+ last if ($. > 30);
-+ }
-+ }
-+
-+ seek($fh, 0, 0);
-+
-+ $is_perl = 1 if ($nw > 1); # propably perl file
-+
-+ #if (!$is_perl) {
-+ # print STDERR "NOPERL $file\n";
-+ # return 0;
-+ #}
-+ #print STDERR "PERL $file\n" if ($is_perl);
-+ return $is_perl;
-+}
-+
- sub process_file {
-
- my ($file) = @_;
-@@ -90,6 +129,8 @@
- return;
- }
-
-+ return if (!is_perlfile($file, \*FILE));
-+
- while (<FILE>) {
-
- # skip the "= <<" block
-@@ -111,6 +152,10 @@
- last;
- }
-
-+ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
-+ $provide{$1} = 1;
-+ }
-+
- # Each keyword can appear multiple times. Don't
- # bother with datastructures to store these strings,
- # if we need to print it print it now.
-@@ -236,6 +281,10 @@
-
- ($module =~ m/^\./) && next;
-
-+ # name starts in a non alphanumeric character it is not a module
-+ # name.
-+ ($module =~ m/^\W/) && next;
-+
- # if the module ends with .pm strip it to leave only basename.
-
- $module =~ s/\.pm$//;
+++ /dev/null
---- scripts/perl.req~ 2004-04-16 13:27:10.000000000 +0200
-+++ scripts/perl.req 2004-04-26 23:54:42.128568344 +0200
-@@ -39,9 +39,18 @@
- eval { require version; $HAVE_VERSION = 1; };
-
-
-+# *inc variables are used to track dependencies on directories for modules.
-+# These directories (especially arch-dependent) are likely to change some day.
-+my @inc = sort { length $b cmp length $a }
-+ map { s#/*$##; $_ }
-+ grep m#^/.#, @INC;
-+my %inc = map { $_ => 0 } @inc;
-+my $inc = join '|', map "\Q$_\E", @inc;
-+
- foreach ( @ARGV ? @ARGV : <> ) {
-- chomp;
-- if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
-+ chomp;
-+ $inc{$1}++ if m#($inc)/#; # can't anchor on ^
-+ if (m=/usr/(sbin|bin|lib|lib64|libx32|share|X11R6/(lib|lib64|libx32|bin))/=) {
- if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
- process_file($_) if -f;
- }
-@@ -53,7 +64,9 @@
- foreach $perlver (sort keys %perlreq) {
- print "perl >= $perlver\n";
- }
-+print "$_\n" for sort grep $inc{$_}, keys %inc;
-+
--foreach $module (sort keys %require) {
-+foreach my $module (sort grep length, keys %require) {
- if (length($require{$module}) == 0) {
- print "perl($module)\n";
- } else {
# Conditional build:
%bcond_without apidocs # Doxygen based API documentation
%bcond_without python3 # Python (3) bindings
-%bcond_without plugins # plugins (all, including: audit, imaevm, selinux, systemd)
+%bcond_without plugins # plugins (all, including: audit, imaevm, selinux, dbus)
%bcond_without recommends_tags # use of Recommends tag (disable for bootstrapping)
-%bcond_with imaevm # IMA/EVM signing support (requires libimaevm from ima-evm-utils)
+%bcond_without imaevm # IMA/EVM signing support (requires libimaevm from ima-evm-utils)
%bcond_without audit # audit plugin
%bcond_without selinux # SELinux plugin
-%bcond_without systemd # systemd inhibit plugin
+%bcond_without dbus # dbus announce and systemd inhibit plugins
%bcond_without fsverity # fsverity plugin
+%bcond_without sequoia # Sequoia OpenPGP (replaces rpmpgp_legacy)
%define popt_ver 1.15
%if %{without plugins}
%undefine with_audit
%undefine with_selinux
-%undefine with_systemd
+%undefine with_dbus
%endif
Summary: RPM Package Manager
Summary(de.UTF-8): RPM Packet-Manager
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 4.18.2
-Release: 2
+Version: 4.20.1
+Release: 6
Epoch: 1
License: GPL v2 / LGPL v2.1
Group: Base
-Source0: http://ftp.rpm.org/releases/rpm-4.18.x/%{name}-%{version}.tar.bz2
-# Source0-md5: 471f5ef532e7f41ff109994cfa959b9e
-Source1: https://ftp.tld-linux.org/TLD/TLD-Linux.asc
+Source0: http://ftp.rpm.org/releases/rpm-4.20.x/%{name}-%{version}.tar.bz2
+# Source0-md5: f99ec35de1c178fa16ff7398ddf13b94
+Source1: https://dist.tld-linux.org/TLD/TLD-Linux.asc
# Source1-md5: 5b5caff8c570489ad5bf950734546c24
+Source100: https://github.com/rpm-software-management/rpmpgp_legacy/archive/1.1/rpmpgp_legacy-1.1.tar.gz
+# Source100-md5: cd07ad8a90c963998491ca02d9f50a3d
Source2: macros.local
Source3: macros.lang
Source4: %{name}.sysconfig
Source12: %{name}.noautoprovfiles
Source13: %{name}.noautoreq
Source14: %{name}.noautoreqfiles
-Source15: perl.prov
Source16: libtooldeps.sh
Source17: libtool.attr
-Patch1: %{name}-popt-aliases.patch
-Patch2: %{name}-perl-macros.patch
-Patch3: %{name}-perl-req-perlfile.patch
-Patch4: %{name}-scripts-closefds.patch
-Patch5: %{name}-dir-macros-relative.patch
-Patch6: %{name}-perl_req-INC_dirs.patch
-Patch7: %{name}-debuginfo.patch
-Patch10: %{name}-changelog_order_check_nonfatal.patch
-Patch11: %{name}-postun-nofail.patch
-Patch12: %{name}-clean-docdir.patch
-Patch13: %{name}-perl-magic.patch
-Patch14: %{name}-ignore-missing-macro-files.patch
-Patch15: x32.patch
-Patch16: rpm5-db-compat.patch
-Patch17: python-internal-build.patch
-Patch18: missing-macros.patch
-Patch19: pkgconfig.patch
-Patch20: uname-deps.patch
-Patch21: arm_abi.patch
-Patch22: ix86-platforms.patch
-Patch23: shortcircuited-deps.patch
-Patch24: cpuinfo-deps.patch
-Patch25: rpmio-read-proc-files.patch
-Patch26: allow-at-in-ver-rel.patch
-Patch28: default-patch-flags.patch
-Patch30: missing-ghost-terminate-build.patch
-Patch31: missing-doc-terminate-build.patch
-Patch32: noexpand.patch
-Patch34: skip-symlinks.patch
-Patch36: build-locale.patch
-Patch37: no-exe-for-elf-req.patch
-Patch40: perl-heredoc-matching.patch
-Patch41: python-hash-type.patch
+Patch0: %{name}-popt-aliases.patch
+Patch3: %{name}-scripts-closefds.patch
+Patch4: %{name}-dir-macros-relative.patch
+Patch6: %{name}-debuginfo.patch
+Patch7: %{name}-changelog_order_check_nonfatal.patch
+Patch8: %{name}-postun-nofail.patch
+Patch9: %{name}-clean-docdir.patch
+Patch10: %{name}-perl-magic.patch
+Patch11: %{name}-ignore-missing-macro-files.patch
+Patch12: x32.patch
+Patch13: rpm5-db-compat.patch
+Patch15: missing-macros.patch
+Patch16: pkgconfig.patch
+Patch17: uname-deps.patch
+Patch18: arm_abi.patch
+Patch19: ix86-platforms.patch
+Patch20: shortcircuited-deps.patch
+Patch21: cpuinfo-deps.patch
+Patch22: rpmio-read-proc-files.patch
+Patch23: allow-at-in-ver-rel.patch
+Patch24: default-patch-flags.patch
+Patch25: missing-ghost-terminate-build.patch
+Patch26: missing-doc-terminate-build.patch
+Patch27: noexpand.patch
+Patch28: skip-symlinks.patch
+Patch29: build-locale.patch
+Patch30: no-exe-for-elf-req.patch
+Patch31: check-valid-arch-early.patch
+Patch32: group-lookup.patch
+Patch33: disable-sysusers.patch
URL: https://rpm.org/
BuildRequires: acl-devel
%{?with_audit:BuildRequires: audit-libs-devel}
-BuildRequires: autoconf >= 2.63
-BuildRequires: automake >= 1:1.10
BuildRequires: bzip2-devel >= 1.0.2-17
+BuildRequires: bubblewrap
+BuildRequires: cmake >= 3.18
%{?with_plugins:BuildRequires: dbus-devel >= 1.3}
BuildRequires: elfutils-devel >= 0.159
BuildRequires: gettext-tools >= 0.19.2
%{?with_imaevm:BuildRequires: ima-evm-utils-devel >= 1.0}
BuildRequires: libarchive-devel
BuildRequires: libcap-devel
+%{?with_fsverity:BuildRequires: libfsverity-devel}
BuildRequires: libgcrypt-devel
BuildRequires: libgomp-devel >= 6:4.5
BuildRequires: libmagic-devel
%{?with_selinux:BuildRequires: libselinux-devel >= 2.1.0}
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
BuildRequires: libstdc++-devel
-BuildRequires: libtool >= 1:1.4.2-9
-BuildRequires: lua-devel >= 5.3
+BuildRequires: lua-devel >= 5.2
BuildRequires: patch >= 2.2
BuildRequires: pkgconfig
BuildRequires: popt-devel >= %{popt_ver}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.750
%endif
+BuildRequires: readline-devel
+%{?with_sequoia:BuildRequires: rpm-sequoia-devel >= 1.4.0}
BuildRequires: rpm-build >= 4.6
BuildRequires: sqlite3-devel >= 3.22.0
BuildRequires: tcl
Requires: libsemanage-devel
Requires: libsepol-devel
%endif
-Requires: lua-devel >= 5.3
+Requires: lua-devel >= 5.2
Requires: popt-devel >= %{popt_ver}
Requires: sqlite3-devel >= 3.22.0
Requires: xz-devel
Requires: fileutils
Requires: findutils
Requires: rpm-tld-macros-build >= 1.744
-%ifarch athlon
-Requires: gcc >= 3.0.3
-%else
Requires: gcc
-%endif
Requires: glibc-devel
Requires: grep
Requires: gzip
Різноманітні допоміжні скрипти та утиліти, які використовуються для
побудови RPM'ів.
-%package perlprov
-Summary: Additional utilities for checking Perl provides/requires in RPM packages
-Summary(de.UTF-8): Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
-Summary(pl.UTF-8): Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w pakietach RPM
-Group: Applications/File
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: perl-Encode
-Requires: perl-devel
-Requires: perl-modules
-
-%description perlprov
-Additional utilities for checking Perl provides/requires in RPM
-packages.
-
-%description perlprov -l de.UTF-8
-Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen.
-
-%description perlprov -l pl.UTF-8
-Dodatkowe narzędzia do sprawdzenia zależności skryptów Perla w
-pakietach RPM.
-
%package -n python3-rpm
Summary: Python 3 interface to RPM library
Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki RPM-a
usuwane. Inne programy mogą zasubskrybować sygnały powiadamiające o
zmianach w pakietach systemowych.
+%package plugin-unshare
+Summary: Plugin for scriptlet isolation with Linux namespaces
+Group: Base
+Requires: %{name}-lib = %{epoch}:%{version}-%{release}
+
+%description plugin-unshare
+This plugin allows using various Linux-specific namespace-related
+technologies inside transactions, such as to harden and limit
+scriptlet access to resources.
+
%package sign
Summary: Package signing support
Summary(pl.UTF-8): Obsługa podpisywania pakietów
źrodeł RPM-a przez doxygen.
%prep
-%setup -q -n %{name}-%{version}%{?subver}
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p0
-%patch7 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch28 -p1
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch34 -p1
-%patch36 -p1
-%patch37 -p1
-%patch40 -p1
-%patch41 -p1
-
-%{__rm} po/*.gmo
-
-install %{SOURCE15} scripts/perl.prov.in
-
-%{__mv} scripts/perl.req{,.in}
+%setup -q -a100 -n %{name}-%{version}%{?subver}
+%patch -P 0 -p1
+%patch -P 3 -p1
+%patch -P 4 -p1
+%patch -P 6 -p1
+%patch -P 7 -p1
+%patch -P 8 -p1
+%patch -P 9 -p1
+%patch -P 10 -p1
+%patch -P 11 -p1
+%patch -P 12 -p1
+%patch -P 13 -p1
+%patch -P 15 -p1
+%patch -P 16 -p1
+%patch -P 17 -p1
+%patch -P 18 -p1
+%patch -P 19 -p1
+%patch -P 20 -p1
+%patch -P 21 -p1
+%patch -P 22 -p1
+%patch -P 23 -p1
+%patch -P 24 -p1
+%patch -P 25 -p1
+%patch -P 26 -p1
+%patch -P 27 -p1
+%patch -P 28 -p1
+%patch -P 29 -p1
+%patch -P 30 -p1
+%patch -P 31 -p1
+%patch -P 32 -p1
+%patch -P 33 -p1
# generate Group translations to *.po
awk -f %{SOURCE6} %{SOURCE5}
-%build
-%{__libtoolize}
-%{__aclocal}
-%{__autoheader}
-%{__autoconf}
-%{__automake}
+ln -s ../rpmpgp_legacy-1.1 rpmio/rpmpgp_legacy
# rpm checks for CPU type at runtime, but it looks better
%{__sed} -i \
-e 's|@host_os@|%{_target_os}|' \
macros.in
-%configure \
- PYTHON=python3 \
- WITH_PERL_VERSION=no \
- __GST_INSPECT=%{_bindir}/gst-inspect-1.0 \
- __GPG=%{_bindir}/gpg \
- --enable-bdb-ro \
- --enable-ndb \
- %{!?with_plugins:--disable-plugins} \
- %{!?with_systemd:--disable-inhibit-plugin} \
- --disable-silent-rules \
- --enable-sqlite \
- --enable-zstd \
- --with-acl \
- --with-archive \
- --with-audit%{!?with_audit:=no} \
- --with-cap \
- --with-fapolicyd \
- %{?with_imaevm:--with-imaevm} \
- %{?with_python3:--enable-python} \
- --with-selinux%{!?with_selinux:=no} \
- --with-vendor=tld
-
-%{__make}
+# Use fully qualified names for CC and CXX
+__CC=$(which $(cc -dumpmachine)-gcc 2>/dev/null)
+__CXX=$(which $(c++ -dumpmachine)-g++ 2>/dev/null)
+%{__sed} -i -e "s|@__CC@|$__CC|" -e "s|@__CXX@|$__CXX|" macros.in
-%{__make} -C po update-gmo
+%build
+mkdir -p build-cmake
+cd build-cmake
+%cmake ../ \
+ -DCMAKE_INSTALL_DOCDIR=%{_docdir} \
+ %{cmake_on_off python3 ENABLE_PYTHON} \
+ %{cmake_on_off plugins ENABLE_PLUGINS} \
+ %{cmake_on_off audit WITH_AUDIT} \
+ %{cmake_on_off imaevm WITH_IMAEVM} \
+ %{cmake_on_off selinux WITH_SELINUX} \
+ %{cmake_on_off dbus WITH_DBUS} \
+ %{cmake_on_off fsverity WITH_FSVERITY} \
+ %{cmake_on_off apidocs WITH_DOXYGEN} \
+ %{cmake_on_off sequoia WITH_SEQUOIA} \
+ %{!?with_sequoia:-DWITH_LEGACY_OPENPGP=ON} \
+ -DMKTREE_BACKEND=rootfs \
+ -DENABLE_SQLITE=ON \
+ -DENABLE_NDB=ON \
+ -DENABLE_BDB_RO=ON \
+ -DWITH_CAP=ON \
+ -DWITH_FAPOLICYD=ON \
+ -DWITH_ACL=ON \
+ -DWITH_ZSTD=ON \
+ -DRPM_VENDOR=tld
-%if %{with python3}
-cd python
-%py3_build
-%endif
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/TLD-Linux.asc
-%{__make} install \
+%{__make} -C build-cmake install \
pkgconfigdir=%{_pkgconfigdir} \
DESTDIR=$RPM_BUILD_ROOT
+# these will be packaged separately
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
+
# cleanup
%ifnarch %{ix86} %{x8664} x32
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/ia32e-linux/macros
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x32-linux/macros
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64-linux/macros
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64_v2-linux/macros
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64_v3-linux/macros
+%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/x86_64_v4-linux/macros
%endif
%ifnarch %{ppc}
# init an empty database for %ghost'ing for all supported backends
for be in sqlite bdb ndb; do
- ./rpmdb \
+ build-cmake/tools/rpmdb \
--macros=$RPM_BUILD_ROOT%{_rpmlibdir}/macros \
--rcfile=$RPM_BUILD_ROOT%{_rpmlibdir}/rpmrc \
--dbpath=${PWD}/${be} \
done
%if %{with python3}
-# Remove anything that rpm make install might put there;
-# we already have .egg-info as directory, so there is no reason for transition to file for a while
-cd python
-%{__rm} -rf rpm.egg-info
-%{__rm} -rf $RPM_BUILD_ROOT%{py3_sitedir}
-%py3_install
-cd ..
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
%endif
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
-
# wrong location, not used anyway
%{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log}
+# unsupported locale
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ie
+
%find_lang %{name}
%clean
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc ChangeLog CREDITS README
+%doc ChangeLog CREDITS README docs/manual
%dir /etc/pki/rpm-gpg
/etc/pki/rpm-gpg/TLD-Linux.asc
%attr(755,root,root) %{_bindir}/rpmdb
%attr(755,root,root) %{_bindir}/rpmkeys
%attr(755,root,root) %{_bindir}/rpmquery
+%attr(755,root,root) %{_bindir}/rpmsort
%attr(755,root,root) %{_bindir}/rpmverify
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
%{_mandir}/man8/rpm.8*
%{_mandir}/man8/rpmdb.8*
%{_mandir}/man8/rpmkeys.8*
+%{_mandir}/man8/rpmsort.8*
%{_mandir}/man8/rpm-misc.8*
%{?with_plugins:%{_mandir}/man8/rpm-plugins.8*}
-%lang(fr) %{_mandir}/fr/man8/rpm.8*
-%lang(ja) %{_mandir}/ja/man8/rpm.8*
-%lang(ko) %{_mandir}/ko/man8/rpm.8*
-%lang(pl) %{_mandir}/pl/man8/rpm.8*
-%lang(ru) %{_mandir}/ru/man8/rpm.8*
-%lang(sk) %{_mandir}/sk/man8/rpm.8*
%dir /var/lib/rpm
%ghost %config(missingok,noreplace) /var/lib/rpm/*
%{_rpmlibdir}/rpmpopt*
%{_rpmlibdir}/rpmrc
%{_rpmlibdir}/macros
+%attr(755,root,root) %{_rpmlibdir}/sysusers.sh
%dir %{_rpmlibdir}/macros.d
%dir %{_rpmlibdir}/platform
%{_rpmlibdir}/platform/noarch-*
%attr(755,root,root) %{_rpmlibdir}/rpmdb_dump
%attr(755,root,root) %{_rpmlibdir}/rpmdb_load
+%attr(755,root,root) %{_rpmlibdir}/rpmdump
# valgrind suppression file for rpm
%{_rpmlibdir}/rpm.supp
%files lib
%defattr(644,root,root,755)
-%attr(755,root,root) %ghost /%{_lib}/librpm.so.9
+%attr(755,root,root) %ghost /%{_lib}/librpm.so.10
%attr(755,root,root) /%{_lib}/librpm.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/librpmbuild.so.9
+%attr(755,root,root) %ghost /%{_lib}/librpmbuild.so.10
%attr(755,root,root) /%{_lib}/librpmbuild.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/librpmio.so.9
+%attr(755,root,root) %ghost /%{_lib}/librpmio.so.10
%attr(755,root,root) /%{_lib}/librpmio.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/librpmsign.so.9
+%attr(755,root,root) %ghost /%{_lib}/librpmsign.so.10
%attr(755,root,root) /%{_lib}/librpmsign.so.*.*.*
%{?with_plugins:%dir %{_libdir}/rpm-plugins}
%attr(755,root,root) %{_libdir}/librpmbuild.so
%attr(755,root,root) %{_libdir}/librpmio.so
%attr(755,root,root) %{_libdir}/librpmsign.so
-%{_libdir}/librpm.la
-%{_libdir}/librpmbuild.la
-%{_libdir}/librpmio.la
-%{_libdir}/librpmsign.la
%{_includedir}/rpm
%{_pkgconfigdir}/rpm.pc
+%{_libdir}/cmake/rpm
%files utils
%defattr(644,root,root,755)
%{_mandir}/man8/rpm2cpio.8*
%{_mandir}/man8/rpmdeps.8*
%{_mandir}/man8/rpmgraph.8*
-%lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
-%lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
-%lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
-%lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
-%lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
-%lang(ja) %{_mandir}/ja/man8/rpmgraph.8*
-%lang(pl) %{_mandir}/pl/man8/rpmgraph.8*
%files build
%defattr(644,root,root,755)
%attr(755,root,root) %{_rpmlibdir}/install-build-tree
%attr(755,root,root) %{_rpmlibdir}/elfdeps
%attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
-# needs hacked pkg-config to return anything
%attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
-%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
%attr(755,root,root) %{_rpmlibdir}/fontconfig.prov
%attr(755,root,root) %{_rpmlibdir}/check-buildroot
%attr(755,root,root) %{_rpmlibdir}/check-prereqs
%{_rpmlibdir}/fileattrs/metainfo.attr
%{_rpmlibdir}/fileattrs/ocaml.attr
%{_rpmlibdir}/fileattrs/pkgconfig.attr
+%{_rpmlibdir}/fileattrs/rpm_lua.attr
%{_rpmlibdir}/fileattrs/rpm_macro.attr
%{_rpmlibdir}/fileattrs/script.attr
+%{_rpmlibdir}/fileattrs/sysusers.attr
+%{_rpmlibdir}/fileattrs/usergroup.attr
%attr(755,root,root) %{_bindir}/gendiff
%attr(755,root,root) %{_bindir}/rpmbuild
%attr(755,root,root) %{_bindir}/rpmspec
%{_mandir}/man1/gendiff.1*
-%lang(pl) %{_mandir}/pl/man1/gendiff.1*
%{_mandir}/man8/rpmbuild.8*
-%lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
-%lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
%{_mandir}/man8/rpmlua.8*
%{_mandir}/man8/rpmspec.8*
-%files perlprov
-%defattr(644,root,root,755)
-%{_rpmlibdir}/fileattrs/perl.attr
-%{_rpmlibdir}/fileattrs/perllib.attr
-%attr(755,root,root) %{_rpmlibdir}/perl.*
-
%if %{with python3}
%files -n python3-rpm
%defattr(644,root,root,755)
%if %{with plugins}
%files plugin-audit
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_audit
%attr(755,root,root) %{_libdir}/rpm-plugins/audit.so
%{_mandir}/man8/rpm-plugin-audit.8*
%files plugin-syslog
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_syslog
%attr(755,root,root) %{_libdir}/rpm-plugins/syslog.so
%{_mandir}/man8/rpm-plugin-syslog.8*
-%if %{with systemd}
+%if %{with dbus}
%files plugin-systemd-inhibit
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_systemd_inhibit
%attr(755,root,root) %{_libdir}/rpm-plugins/systemd_inhibit.so
%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
%endif
+%if %{with imaevm}
%files plugin-ima
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_ima
%attr(755,root,root) %{_libdir}/rpm-plugins/ima.so
%{_mandir}/man8/rpm-plugin-ima.8*
+%endif
%files plugin-prioreset
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_prioreset
%attr(755,root,root) %{_libdir}/rpm-plugins/prioreset.so
%{_mandir}/man8/rpm-plugin-prioreset.8*
%files plugin-selinux
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_selinux
%attr(755,root,root) %{_libdir}/rpm-plugins/selinux.so
%{_mandir}/man8/rpm-plugin-selinux.8*
%if %{with fsverity}
%files plugin-fsverity
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_fsverity
%attr(755,root,root) %{_libdir}/rpm-plugins/fsverity.so
%endif
%files plugin-fapolicyd
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_fapolicyd
%attr(755,root,root) %{_libdir}/rpm-plugins/fapolicyd.so
%{_mandir}/man8/rpm-plugin-fapolicyd.8*
-%if %{with systemd}
+%if %{with dbus}
%files plugin-dbus-announce
%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_dbus_announce
%attr(755,root,root) %{_libdir}/rpm-plugins/dbus_announce.so
%{_mandir}/man8/rpm-plugin-dbus-announce.8*
-%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
+%{_datadir}/dbus-1/system.d/org.rpm.conf
%endif
%endif
+%files plugin-unshare
+%defattr(644,root,root,755)
+%{_rpmlibdir}/macros.d/macros.transaction_unshare
+%attr(755,root,root) %{_libdir}/rpm-plugins/unshare.so
+%{_mandir}/man8/rpm-plugin-unshare.8*
+
+
%files sign
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rpmsign
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/librpm/html/*
+%doc docs/html/*
%endif
+
typedef enum rpmrichOp_e {
- RPMRICHOP_SINGLE = 1,
+ RPMRICHOP_NONE = 0,
diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h
index e69ef2584..ecdb12f0c 100644
--- a/lib/rpmts_internal.h
+ color = RPMFC_ELF32;
break;
}
- }
+
diff -ur rpm-4.16.1.2/include/rpm/rpmfc.h rpm-4.16.1.2.x32/include/rpm/rpmfc.h
--- rpm-4.16.1.2/include/rpm/rpmfc.h 2020-05-28 12:04:25.011136544 +0200
+++ rpm-4.16.1.2.x32/include/rpm/rpmfc.h 2021-03-21 21:50:04.127398387 +0100
RPMFC_ELFMIPSN32 = (1 << 2),
-#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
+#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFX32|RPMFC_ELFMIPSN32)
- /* (1 << 3) leaks into package headers, reserved */
+ /*!< (1 << 3) leaks into package headers, reserved */
RPMFC_WHITE = (1 << 29),
-diff -ur rpm-4.16.1.2/configure.ac rpm-4.16.1.2.x32/configure.ac
---- rpm-4.16.1.2/configure.ac 2021-03-21 21:51:28.221530479 +0100
-+++ rpm-4.16.1.2.x32/configure.ac 2021-03-21 21:50:04.127398387 +0100
-@@ -930,6 +930,10 @@
- if echo "$host_os" | grep '.*-gnu$' > /dev/null ; then
- host_os=`echo "${host_os}" | sed 's/-gnu$//'`
- fi
-+if echo "$host_os" | grep '.*-gnux32' > /dev/null ; then
-+ host_os=`echo "${host_os}" | sed 's/-gnux32$//'`
-+ host_os_gnu=-gnux32
-+fi
- if echo "$host_os" | grep '.*-gnu[[^-]]*$' > /dev/null ; then
- AC_MSG_ERROR([unrecognized GNU build triplet $host_os])
- fi
diff -ur rpm-4.16.1.2/installplatform rpm-4.16.1.2.x32/installplatform
--- rpm-4.16.1.2/installplatform 2020-05-28 12:04:25.027136631 +0200
+++ rpm-4.16.1.2.x32/installplatform 2021-03-21 21:51:47.671145954 +0100
-@@ -21,6 +21,9 @@
+@@ -9,7 +9,6 @@
+ MACROS="${3:-macros}"
+ VENDOR="${4}"
+ OS="${5}"
+-RPMRC_GNU="${6}"
+
+ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2` ${RPM_CUSTOM_ARCH:+custom}; do
+ RPMRC_OPTFLAGS="`sed -n 's/^optflags: '$ARCH' //p' $RPMRC`"
+@@ -21,6 +21,10 @@
ARCH_INSTALL_POST='%{nil}'
LIB=lib
+ TARGETCPU="%{_target_cpu}"
+ APPEND_TARGET_ABI=
+ PREFERCOLOR=
++ RPMRC_GNU="${6}"
# XXX FIXME: incomplete and quite likely wrong too in places,
# consult various arch folks for correct names etc.
-@@ -82,7 +84,16 @@
+@@ -82,7 +84,17 @@
ISANAME=x86
ISABITS=64
CANONARCH=x86_64
+ APPEND_TARGET_ABI=1
+ TARGETCPU="x86_64"
+ PREFERCOLOR=4
++ RPMRC_GNU="-gnux32"
;;
ia64)
ISANAME=ia
+ LIB=${LIB}x32
+ fi
+
- PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
- [ -d $PPD ] || mkdir -p $PPD
-
-@@ -202,7 +216,10 @@
- | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
- -e "s,@RPMCANONARCH@,$CANONARCH,g" \
- -e "s,@RPMCANONCOLOR@,$CANONCOLOR," \
-+ -e "s,@RPMPREFERCOLOR@,${PREFERCOLOR:+%_prefer_color\\t$PREFERCOLOR}," \
- -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
-+ -e "s,@TARGET_ABI@,${APPEND_TARGET_ABI:+%{?_gnu\}}," \
-+ -e "s,@TARGETCPU@,$TARGETCPU," \
- -e "s,@LIB@,$LIB," \
- -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
+ if [ "$OS" = "linux" ] && [ "$CANONARCH" != "noarch" ]; then
+ DEBUGINFO=1
+ fi
+@@ -202,8 +216,11 @@
+ | sed -e "s,=RPMRC_OPTFLAGS=,$RPMRC_OPTFLAGS," \
+ -e "s,=RPMCANONARCH=,$CANONARCH,g" \
+ -e "s,=RPMCANONCOLOR=,$CANONCOLOR," \
++ -e "s,=RPMPREFERCOLOR=,${PREFERCOLOR:+%_prefer_color\\t$PREFERCOLOR}," \
+ -e "s,=RPMRC_GNU=,$RPMRC_GNU," \
+ -e "s,=RPMDEBUGINFO=,$DEBUGINFO," \
++ -e "s,=TARGET_ABI=,${APPEND_TARGET_ABI:+%{?_gnu\}}," \
++ -e "s,=TARGETCPU=,$TARGETCPU," \
+ -e "s,=LIB=,$LIB," \
+ -e "s,=ARCH_INSTALL_POST=,$ARCH_INSTALL_POST," \
-e '/\${\w*:-/!s,\${,%{_,' \
diff -ur rpm-4.16.1.2/platform.in rpm-4.16.1.2.x32/platform.in
--- rpm-4.16.1.2/platform.in 2020-05-28 12:04:25.047136741 +0200
@@ -8,7 +8,7 @@
%_vendor @RPMCANONVENDOR@
%_os @RPMCANONOS@
- %_gnu @RPMRC_GNU@
+ %_gnu =RPMRC_GNU=
-%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
-+%_target_platform @TARGETCPU@-%{_vendor}-%{_target_os}@TARGET_ABI@
- %optflags @RPMRC_OPTFLAGS@
++%_target_platform =TARGETCPU=-%{_vendor}-%{_target_os}=TARGET_ABI=
+ %optflags =RPMRC_OPTFLAGS=
- %__isa_name @ISANAME@
+ %__isa_name =ISANAME=
@@ -21,6 +21,7 @@
# 1 Elf32 permitted
# 2 Elf64 permitted
- %_transaction_color @RPMCANONCOLOR@
-+@RPMPREFERCOLOR@
+ %_transaction_color =RPMCANONCOLOR=
++=RPMPREFERCOLOR=
#==============================================================================
# ---- configure macros.
--- rpm-4.16.1.2/rpmrc.in 2020-05-28 12:04:25.075136894 +0200
+++ rpm-4.16.1.2.x32/rpmrc.in 2021-03-21 21:50:04.127398387 +0100
@@ -24,6 +24,7 @@
- optflags: x86_64 -O2 -g
+ optflags: x86_64_v4 -O2 -g -march=x86-64-v4
optflags: amd64 -O2 -g
optflags: ia32e -O2 -g
+optflags: x32 -O2 -g -mtune=generic -march=x86-64
buildarchtranslate: sh3: sh3
buildarchtranslate: sh4: sh4
buildarchtranslate: sh4a: sh4
-@@ -486,10 +492,12 @@
+@@ -486,13 +492,15 @@
arch_compat: ia64: noarch
-arch_compat: x86_64: amd64 em64t athlon noarch
+-arch_compat: amd64: x86_64 em64t athlon noarch
+-arch_compat: ia32e: x86_64 em64t athlon noarch
+-arch_compat: x86_64_v2: x86_64 amd64 em64t athlon noarch
+-arch_compat: x86_64_v3: x86_64_v2 x86_64 amd64 em64t athlon noarch
+-arch_compat: x86_64_v4: x86_64_v3 x86_64_v2 x86_64 amd64 em64t athlon noarch
+arch_compat: x86_64: amd64 em64t athlon x32 noarch
- arch_compat: amd64: x86_64 em64t athlon noarch
- arch_compat: ia32e: x86_64 em64t athlon noarch
++arch_compat: amd64: x86_64 em64t athlon x32 noarch
++arch_compat: ia32e: x86_64 em64t athlon x32 noarch
++arch_compat: x86_64_v2: x86_64 amd64 em64t athlon x32 noarch
++arch_compat: x86_64_v3: x86_64_v2 x86_64 amd64 em64t athlon x32 noarch
++arch_compat: x86_64_v4: x86_64_v3 x86_64_v2 x86_64 amd64 em64t athlon x32 noarch
-+arch_compat: x32: x32 x86_64 noarch
++arch_compat: x32: x32 x86_64 athlon noarch
+
arch_compat: sh3: noarch
arch_compat: sh4: noarch