[packages/rpm/rpm.org] - add /etc/rpm/platform to prevent rpm picking arch from uname (fixes x32) - TODO: x32 builds create

baggins baggins at pld-linux.org
Tue Oct 27 18:09:23 CET 2020


commit 0727c61e2b8a824ae0211c4eb027ba6ec79df108
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Oct 27 18:08:03 2020 +0100

    - add /etc/rpm/platform to prevent rpm picking arch from uname (fixes x32)
    - TODO: x32 builds create ix86 colored packages

 rpm.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/rpm.spec b/rpm.spec
index c41eff4..0105e48 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -685,6 +685,14 @@ rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/s390*-linux/macros
 rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sh*-linux/macros
 rm $RPM_BUILD_ROOT%{_rpmlibdir}/platform/sparc*-linux/macros
 
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
+%ifarch x32
+%{_target_cpu}-%{_target_vendor}-linux-gnux32
+%else
+%{_target_cpu}-%{_target_vendor}-linux
+%endif
+EOF
+
 %{__rm} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
 
 install -d $RPM_BUILD_ROOT%{_rpmlibdir}/pld
@@ -781,6 +789,8 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
+# this is ok to be replaced
+%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
 
 %{_mandir}/man8/rpm.8*
 %{_mandir}/man8/rpmdb.8*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/0727c61e2b8a824ae0211c4eb027ba6ec79df108



More information about the pld-cvs-commit mailing list