From 894a0cb4562c358725b063db1a6ab37e7dcc694d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Tue, 12 Apr 2022 13:11:44 +0200 Subject: Update autotools files on riscv64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch borrowed from OpenSUSE rpm. Change-Id: Idf138d3b8c4f66c5c470f3d28c9f6ac238fdb545 Origin: https://build.opensuse.org/package/view_file/Base:System/rpm/auto-config-update-aarch64-ppc64le.diff Fixes: 5bc7b1f94 ("Update autotools files on aarch64") Signed-off-by: Ɓukasz Stelmach --- build/parseBuildInstallClean.c | 29 +++++++++++++++++------------ packaging/rpm.spec | 4 ++-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index f7b4bb715..199571720 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -48,18 +48,23 @@ int parseBuildInstallClean(rpmSpec spec, int parsePart) } if (parsePart == PART_BUILD) { - char* buf = strdup( - "if [[ `uname -m` == \"aarch64\" ]]; then\n" - "ref=/usr/lib/rpm\n" - "for s in guess sub; do\n" - " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n" - " grep -q config-patches@ $c || continue\n" - " grep -q aarch64 $c || install -m 755 $ref/config.$s $c\n" - " grep -q ppc64le $c || install -m 755 $ref/config.$s $c\n" - " done\n" - "done\n" - "fi\n" - ); + char* buf = strdup( + "ref=/usr/lib/rpm\n" + "mints=0\n" + "case $(uname -m) in\n" + " aarch64) mints=20120610;;\n" + " ppc64le) mints=20130610;;\n" + " riscv64) mints=20160911;;\n" + "esac\n" + "for s in guess sub; do\n" + " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n" + " grep -q config-patches@ $c || continue\n" + " timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c)\n" + " test -n \"$timestamp\" || timestamp=0\n" + " test $timestamp -ge $mints || install -m 755 $ref/config.$s $c\n" + " done\n" + "done\n" + ); appendLineStringBuf(*sbp, buf); free(buf); } diff --git a/packaging/rpm.spec b/packaging/rpm.spec index 8a4b3c71d..f50652efe 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -229,7 +229,7 @@ for i in %{_datadir}/automake-*/*; do rm -f %{buildroot}%{rpmhome}/"${i##*/}" fi done -%ifarch aarch64 ppc64le +%ifarch aarch64 ppc64le riscv64 install -m 755 config.guess %{buildroot}%{rpmhome} install -m 755 config.sub %{buildroot}%{rpmhome} %endif @@ -328,7 +328,7 @@ rm -f %{_dbpath}/Filemd5s \ %{rpmhome}/macros.* %{rpmhome}/fileattrs %{rpmhome}/debug.manifest -%ifarch aarch64 ppc64le +%ifarch aarch64 ppc64le riscv64 %{rpmhome}/config.* %endif -- cgit v1.2.3