From 7cf402eda6d7ed472547fd71c3fe19fb8a93536a30bfd3eb347d862a7c276665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 6 Apr 2021 11:22:58 +0000 Subject: [PATCH] Accepting request 883259 from home:Andreas_Schwab:Factory - auto-config-update-aarch64-ppc64le.diff: Use timestamp in file instead of searching for arch name, which cannot handle all cases OBS-URL: https://build.opensuse.org/request/show/883259 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=580 --- auto-config-update-aarch64-ppc64le.diff | 20 +++++++++++++++----- rpm.changes | 6 ++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/auto-config-update-aarch64-ppc64le.diff b/auto-config-update-aarch64-ppc64le.diff index 9020e38..daa3779 100644 --- a/auto-config-update-aarch64-ppc64le.diff +++ b/auto-config-update-aarch64-ppc64le.diff @@ -1,6 +1,8 @@ ---- ./build/parseSpec.c.orig 2019-10-02 12:38:51.836127743 +0000 -+++ ./build/parseSpec.c 2019-10-02 12:52:33.818447657 +0000 -@@ -926,7 +926,22 @@ static rpmSpec parseSpec(const char *spe +Index: build/parseSpec.c +=================================================================== +--- build/parseSpec.c.orig ++++ build/parseSpec.c +@@ -942,7 +942,30 @@ static rpmSpec parseSpec(const char *spe &(spec->buildrequires)); break; case PART_BUILD: @@ -12,11 +14,19 @@ + } + spec->build = newStringBuf(); + appendLineStringBuf(spec->build, -+ "ref=/usr/lib/rpm; testarch=$(uname -m)\n" ++ "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" -+ " grep -q \"$testarch[-: ]\" $c || install -m 755 $ref/config.$s $c\n" ++ " timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c)\n" ++ " test -n \"$timestamp\" || continue\n" ++ " test $timestamp -ge $mints || install -m 755 $ref/config.$s $c\n" + " done\n" + "done\n" + ); diff --git a/rpm.changes b/rpm.changes index 99c224e..fa03ebf 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 6 08:42:29 UTC 2021 - Andreas Schwab + +- auto-config-update-aarch64-ppc64le.diff: Use timestamp in file instead + of searching for arch name, which cannot handle all cases + ------------------------------------------------------------------- Tue Mar 30 11:15:44 CEST 2021 - mls@suse.de