[packages/rpm] - started update to 4.20.0, x32 needs update for cmake

baggins baggins at pld-linux.org
Mon Nov 25 04:04:52 CET 2024


commit 56f242e3a926c2e4d64b7a83a5adf3d277d814b7
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Nov 25 02:19:43 2024 +0100

    - started update to 4.20.0, x32 needs update for cmake

 cpuinfo-deps.patch            |   8 +-
 ix86-platforms.patch          |   2 +-
 missing-macros.patch          |  52 +++------
 pkgconfig.patch               |   4 +-
 rpm-clean-docdir.patch        |   6 +-
 rpm-dir-macros-relative.patch |   8 +-
 rpm.spec                      | 258 ++++++++++++++++++------------------------
 uname-deps.patch              |   2 +-
 x32.patch                     |  80 +++++++------
 9 files changed, 187 insertions(+), 233 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 43efbf9..18515bc 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -5,12 +5,12 @@
 # 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	audit		# audit plugin
 %bcond_without	selinux		# SELinux plugin
-%bcond_without	systemd		# systemd inhibit plugin
+%bcond_without	dbus		# sbus announce and systemd inhibit plugins
 %bcond_without	fsverity	# fsverity plugin
 
 %define		popt_ver	1.15
@@ -22,7 +22,7 @@
 %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
@@ -32,13 +32,13 @@ Summary(pt_BR.UTF-8):	Gerenciador de pacotes RPM
 Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
-Version:	4.18.2
+Version:	4.20.0
 Release:	1
 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
+Source0:	http://ftp.rpm.org/releases/rpm-4.20.x/%{name}-%{version}.tar.bz2
+# Source0-md5:	6aee0b0b66b40e1eb04b6c3b7d87cf9f
 Source1:	ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
 # Source1-md5:	23914bb49fafe7153cee87126d966461
 Source2:	macros.local
@@ -54,15 +54,11 @@ Source11:	%{name}.noautoprov
 Source12:	%{name}.noautoprovfiles
 Source13:	%{name}.noautoreq
 Source14:	%{name}.noautoreqfiles
-Source15:	perl.prov
 Source16:	libtooldeps.sh
 Source17:	libtool.attr
 Patch0:		%{name}-popt-aliases.patch
-Patch1:		%{name}-perl-macros.patch
-Patch2:		%{name}-perl-req-perlfile.patch
 Patch3:		%{name}-scripts-closefds.patch
 Patch4:		%{name}-dir-macros-relative.patch
-Patch5:		%{name}-perl_req-INC_dirs.patch
 Patch6:		%{name}-debuginfo.patch
 Patch7:		%{name}-changelog_order_check_nonfatal.patch
 Patch8:		%{name}-postun-nofail.patch
@@ -71,7 +67,6 @@ Patch10:	%{name}-perl-magic.patch
 Patch11:	%{name}-ignore-missing-macro-files.patch
 Patch12:	x32.patch
 Patch13:	rpm5-db-compat.patch
-Patch14:	python-internal-build.patch
 Patch15:	missing-macros.patch
 Patch16:	pkgconfig.patch
 Patch17:	uname-deps.patch
@@ -88,7 +83,6 @@ Patch27:	noexpand.patch
 Patch28:	skip-symlinks.patch
 Patch29:	build-locale.patch
 Patch30:	no-exe-for-elf-req.patch
-Patch31:	perl-heredoc-matching.patch
 Patch32:	python-hash-type.patch
 Patch33:	dist-man.patch
 URL:		https://rpm.org/
@@ -103,6 +97,7 @@ 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
@@ -113,6 +108,7 @@ BuildRequires:	libtool >= 1:1.4.2-9
 BuildRequires:	lua-devel >= 5.2
 BuildRequires:	patch >= 2.2
 BuildRequires:	pkgconfig
+BuildRequires:	podman
 BuildRequires:	popt-devel >= %{popt_ver}
 BuildRequires:	python3-modules >= 1:3.2
 %if %{with python3}
@@ -121,6 +117,7 @@ BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.750
 %endif
 BuildRequires:	readline-devel
+BuildRequires:	rpm-sequoia-devel >= 1.4.0
 BuildRequires:	rpm-build >= 4.6
 BuildRequires:	sqlite3-devel >= 3.22.0
 BuildRequires:	tcl
@@ -420,27 +417,6 @@ construir pacotes usando o RPM.
 Різноманітні допоміжні скрипти та утиліти, які використовуються для
 побудови 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
@@ -635,11 +611,8 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %prep
 %setup -q -n %{name}-%{version}%{?subver}
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p0
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
@@ -648,7 +621,6 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
-%patch14 -p1
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
@@ -660,68 +632,64 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch23 -p1
 %patch24 -p1
 %patch25 -p1
-%patch26 -p1
-%patch27 -p1
+#%patch26 -p1
+#%patch27 -p1
 %patch28 -p1
-%patch29 -p1
+#%patch29 -p1
 %patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-
-%{__rm} po/*.gmo
-
-install %{SOURCE15} scripts/perl.prov.in
+#%patch32 -p1
+#%patch33 -p1
 
-%{__mv} scripts/perl.req{,.in}
+#%{__rm} po/*.gmo
 
 # generate Group translations to *.po
 awk -f %{SOURCE6} %{SOURCE5}
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-
-# rpm checks for CPU type at runtime, but it looks better
-%{__sed} -i \
-	-e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
-	-e 's|@host_cpu@|%{_target_cpu}|' \
-	-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=pld
+mkdir -p build
+cd build
+%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} \
+	-DENABLE_SQLITE=ON \
+	-DENABLE_NDB=ON \
+	-DENABLE_BDB_RO=ON \
+	-DWITH_CAP=ON \
+	-DWITH_FAPOLICYD=ON \
+	-DWITH_ACL=ON \
+	-DWITH_ARCHIVE=ON \
+	-DWITH_ZSTD=ON \
+	-DRPM_VENDOR=pld
+
+## rpm checks for CPU type at runtime, but it looks better
+#%{__sed} -i \
+#	-e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
+#	-e 's|@host_cpu@|%{_target_cpu}|' \
+#	-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 \
+
 
 %{__make}
 
-%{__make} -C po update-gmo
+#{__make} -C po update-gmo
 
-%if %{with python3}
-cd python
-%py3_build
-%endif
+#if %{with python3}
+#cd python
+#py3_build
+#%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -730,10 +698,13 @@ install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/{rpm,pki/
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/PLD-3.0-Th-GPG-key.asc
 
-%{__make} install \
+%{__make} -C build install \
 	pkgconfigdir=%{_pkgconfigdir} \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# these will be packaged separatel
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
+
 # cleanup
 %ifnarch %{ix86} %{x8664} x32
 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/platform/athlon-linux/macros
@@ -819,28 +790,26 @@ for a in librpm.so librpmbuild.so librpmio.so librpmsign.so; do
 	ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${a}.*.*.*) $RPM_BUILD_ROOT%{_libdir}/${a}
 done
 
-# init an empty database for %ghost'ing for all supported backends
-for be in sqlite bdb ndb; do
-	./rpmdb \
-		--macros=$RPM_BUILD_ROOT%{_rpmlibdir}/macros \
-		--rcfile=$RPM_BUILD_ROOT%{_rpmlibdir}/rpmrc \
-		--dbpath=${PWD}/${be} \
-		--define "_db_backend ${be}" \
-		--initdb
-	cp -va ${be}/. $RPM_BUILD_ROOT/var/lib/rpm/
-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 ..
-%endif
-
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
+## init an empty database for %ghost'ing for all supported backends
+#for be in sqlite bdb ndb; do
+#	./rpmdb \
+#		--macros=$RPM_BUILD_ROOT%{_rpmlibdir}/macros \
+#		--rcfile=$RPM_BUILD_ROOT%{_rpmlibdir}/rpmrc \
+#		--dbpath=${PWD}/${be} \
+#		--define "_db_backend ${be}" \
+#		--initdb
+#	cp -va ${be}/. $RPM_BUILD_ROOT/var/lib/rpm/
+#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 ..
+#%endif
 
 # wrong location, not used anyway
 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/rpm.{daily,log}
@@ -890,7 +859,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %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/PLD-3.0-Th-GPG-key.asc
@@ -911,16 +880,16 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_mandir}/man8/rpmkeys.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*
+#%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/*
-%ghost /var/lib/rpm/.*.lock
+#%ghost %config(missingok,noreplace) /var/lib/rpm/*
+#%ghost /var/lib/rpm/.*.lock
 
 %{_rpmlibdir}/rpmpopt*
 %{_rpmlibdir}/rpmrc
@@ -938,7 +907,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_rpmlibdir}/platform/amd64*
 %{_rpmlibdir}/platform/ia32e*
 %{_rpmlibdir}/platform/x86_64*
-%{_rpmlibdir}/platform/x32*
+#%{_rpmlibdir}/platform/x32*
 %endif
 %ifarch alpha
 %{_rpmlibdir}/platform/alpha*
@@ -981,13 +950,13 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %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}
 
@@ -997,12 +966,9 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %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)
@@ -1016,13 +982,13 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_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*
+#%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)
@@ -1034,7 +1000,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %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}/mkinstalldirs
 %attr(755,root,root) %{_rpmlibdir}/fontconfig.prov
 %attr(755,root,root) %{_rpmlibdir}/check-buildroot
 %attr(755,root,root) %{_rpmlibdir}/check-prereqs
@@ -1065,19 +1031,13 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %attr(755,root,root) %{_bindir}/rpmspec
 
 %{_mandir}/man1/gendiff.1*
-%lang(pl) %{_mandir}/pl/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*
+#%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)
@@ -1085,7 +1045,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %attr(755,root,root) %{py3_sitedir}/rpm/*.so
 %{py3_sitedir}/rpm/*.py
 %{py3_sitedir}/rpm-%{version}-py*.egg-info
-%{py3_sitedir}/rpm/__pycache__
+#%{py3_sitedir}/rpm/__pycache__
 %endif
 
 %if %{with plugins}
@@ -1106,10 +1066,12 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
 %endif
 
+%if %{with imaevm}
 %files plugin-ima
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/rpm-plugins/ima.so
 %{_mandir}/man8/rpm-plugin-ima.8*
+%endif
 
 %files plugin-prioreset
 %defattr(644,root,root,755)
@@ -1137,7 +1099,7 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %defattr(644,root,root,755)
 %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
+#%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
 %endif
 %endif
 
@@ -1149,5 +1111,5 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
-%doc docs/librpm/html/*
+%doc docs/html/*
 %endif
diff --git a/cpuinfo-deps.patch b/cpuinfo-deps.patch
index e239c8b..8252f06 100644
--- a/cpuinfo-deps.patch
+++ b/cpuinfo-deps.patch
@@ -31,14 +31,14 @@ diff -ur rpm-4.16.0/lib/rpmds.c rpm-4.16.0-cpuinfo/lib/rpmds.c
  
  #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 @@
  {
@@ -275,7 +275,7 @@ diff -ur rpm-4.16.0/include/rpm/rpmds.h rpm-4.16.0-cpuinfo/include/rpm/rpmds.h
 +
  
  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
diff --git a/ix86-platforms.patch b/ix86-platforms.patch
index 9f862e6..9e4d58a 100644
--- a/ix86-platforms.patch
+++ b/ix86-platforms.patch
@@ -8,7 +8,7 @@
 +	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 @@
diff --git a/missing-macros.patch b/missing-macros.patch
index 055f9a0..7a844ad 100644
--- a/missing-macros.patch
+++ b/missing-macros.patch
@@ -1,29 +1,21 @@
---- 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 @@
@@ -37,19 +29,11 @@
 @@ -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@
diff --git a/pkgconfig.patch b/pkgconfig.patch
index 25be042..d170c51 100644
--- a/pkgconfig.patch
+++ b/pkgconfig.patch
@@ -4,8 +4,8 @@
  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@
diff --git a/rpm-clean-docdir.patch b/rpm-clean-docdir.patch
index 800e2c0..b5cb86e 100644
--- a/rpm-clean-docdir.patch
+++ b/rpm-clean-docdir.patch
@@ -1,7 +1,7 @@
 --- 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 \"$");
@@ -10,5 +10,5 @@
 +    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, "/",
diff --git a/rpm-dir-macros-relative.patch b/rpm-dir-macros-relative.patch
index 7478bb2..877fda7 100644
--- a/rpm-dir-macros-relative.patch
+++ b/rpm-dir-macros-relative.patch
@@ -27,14 +27,14 @@ Now redefining _prefix affects _{bin,sbin,lib,libexec,include,data,dataroot,info
 +%_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
@@ -42,4 +42,4 @@ Now redefining _prefix affects _{bin,sbin,lib,libexec,include,data,dataroot,info
 +%_initddir		/etc/rc.d/init.d
  # Deprecated misspelling, present for backwards compatibility.
  %_initrddir		%{_initddir}
- %_rundir		@RUNDIR@
+ %_rundir		@rundir@
diff --git a/uname-deps.patch b/uname-deps.patch
index d2f6a29..a1a814c 100644
--- a/uname-deps.patch
+++ b/uname-deps.patch
@@ -125,7 +125,7 @@ index 90d54aa27..558252c04 100644
 +
  
  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
diff --git a/x32.patch b/x32.patch
index 8f9c068..9aad864 100644
--- a/x32.patch
+++ b/x32.patch
@@ -32,7 +32,7 @@
 +		    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
@@ -44,23 +44,23 @@ diff -ur rpm-4.16.1.2/include/rpm/rpmfc.h rpm-4.16.1.2.x32/include/rpm/rpmfc.h
      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/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
@@ -105,19 +105,20 @@ diff -ur rpm-4.16.1.2/installplatform rpm-4.16.1.2.x32/installplatform
 +      LIB=${LIB}x32
 +  fi
 +
-   PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
-   [ -d $PPD ] || mkdir -p $PPD
- 
-@@ -202,7 +216,10 @@
-   | sed -e "s, at RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
- 	-e "s, at RPMCANONARCH@,$CANONARCH,g" \
- 	-e "s, at RPMCANONCOLOR@,$CANONCOLOR," \
-+	-e "s, at RPMPREFERCOLOR@,${PREFERCOLOR:+%_prefer_color\\t$PREFERCOLOR}," \
- 	-e "s, at RPMRC_GNU@,$RPMRC_GNU," \
-+	-e "s, at TARGET_ABI@,${APPEND_TARGET_ABI:+%{?_gnu\}}," \
-+	-e "s, at TARGETCPU@,$TARGETCPU," \
- 	-e "s, at LIB@,$LIB," \
- 	-e "s, at 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
@@ -125,16 +126,16 @@ diff -ur rpm-4.16.1.2/platform.in rpm-4.16.1.2.x32/platform.in
 @@ -8,7 +8,7 @@
  %_vendor		@RPMCANONVENDOR@
  %_os			@RPMCANONOS@
- %_gnu			@RPMRC_GNU@
+ %_gnu			=RPMRC_GNU=
 -%_target_platform	%{_target_cpu}-%{_vendor}-%{_target_os}
 +%_target_platform	@TARGETCPU at -%{_vendor}-%{_target_os}@TARGET_ABI@
- %optflags		@RPMRC_OPTFLAGS@
+ %optflags		=RPMRC_OPTFLAGS=
  
- %__isa_name		@ISANAME@
+ %__isa_name		=ISANAME=
 @@ -21,6 +21,7 @@
  #	1	Elf32 permitted
  #	2	Elf64 permitted
- %_transaction_color	@RPMCANONCOLOR@
+ %_transaction_color	=RPMCANONCOLOR=
 + at RPMPREFERCOLOR@
  
  #==============================================================================
@@ -143,7 +144,7 @@ diff -ur rpm-4.16.1.2/rpmrc.in rpm-4.16.1.2.x32/rpmrc.in
 --- 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
@@ -176,14 +177,21 @@ diff -ur rpm-4.16.1.2/rpmrc.in rpm-4.16.1.2.x32/rpmrc.in
  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: x86_64: amd64 em64t athlon x32 noarch
- arch_compat: amd64: x86_64 em64t athlon noarch
++arch_compat: amd64: x86_64 em64t athlon x32 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_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
 +
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/56f242e3a926c2e4d64b7a83a5adf3d277d814b7



More information about the pld-cvs-commit mailing list