From 02769019bc38c99bb77fb1a6efb21dfb55f179a5 Mon Sep 17 00:00:00 2001 From: Przemo Firszt Date: Fri, 27 Aug 2021 16:11:56 +0100 Subject: [PATCH] [COPR] Restore dist in Release This is to fix: WARNING: No disttag found in prebuilt packages INFO: Use --define DISTTAG to set proper dist. e. g. --define DISTTAG fc21. ERROR: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' (logs in /var/lib/copr-rpmbuild/workspace/workdir-wgba9jrq/.cache/fedora-review.log) Also adding option to git_commint_no suppressing new line prevents breaking line in Release tag. Signed-off-by: Przemo Firszt --- package/fedora/freecad.spec | 2 +- package/fedora/rpkg.macros | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/fedora/freecad.spec b/package/fedora/freecad.spec index e81cebd301..7ab057b3ce 100644 --- a/package/fedora/freecad.spec +++ b/package/fedora/freecad.spec @@ -32,7 +32,7 @@ Name: %{name} Epoch: 1 Version: 0.19 -Release: pre_{{{ git_commit_no }}} +Release: pre_{{{git_commit_no}}}%{?dist} Summary: A general purpose 3D CAD modeler Group: Applications/Engineering diff --git a/package/fedora/rpkg.macros b/package/fedora/rpkg.macros index ef3a1252ef..b064d67006 100644 --- a/package/fedora/rpkg.macros +++ b/package/fedora/rpkg.macros @@ -1,4 +1,4 @@ function git_commit_no { commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "ahead_by" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//') - echo $((commits + 1)) + echo -n $((commits + 1)) }