sbd/0001-Build-Fix-correctly-derive-package-version-from-git.patch
Klaus Wenninger cdf7377066 Tue Jul 6 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.0-1
- sync with fedora sbd-1.5.0-1
  Resolves: rhbz#1979961
  Resolves: rhbz#1979573
2021-07-09 13:44:45 +02:00

42 lines
1.3 KiB
Diff

From 956f3558d4b619fb19eaa040614dfaf9a226d514 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Mon, 28 Jun 2021 17:37:44 +0200
Subject: [PATCH] Build: Fix: correctly derive package version from git
---
Makefile.am | 4 ++--
sbd.spec | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e614754..5d53c4c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,8 +73,8 @@ spec:
sed -i 's/global\ build_counter.*/global\ build_counter\ $(COUNT)/' $(distdir)/$(PACKAGE).spec; \
echo $(COUNT) > $(BUILD_COUNTER); \
fi
- if [ -n $(COMMIT_COUNTER) ]; then \
- sed -i 's/global\ commit_counter.*/global\ commit_counter\ $(COMMIT_COUNTER)-1/' $(distdir)/$(PACKAGE).spec; \
+ if [ -n "$(COMMIT_COUNTER)" ]; then \
+ sed -i 's/global\ commit_counter.*/global\ commit_counter\ $(COMMIT_COUNTER)/' $(distdir)/$(PACKAGE).spec; \
fi
srpm: export spec
diff --git a/sbd.spec b/sbd.spec
index 776e48b..0498db1 100644
--- a/sbd.spec
+++ b/sbd.spec
@@ -20,7 +20,7 @@
%global modified %(echo %{longcommit}-|cut -f2 -d-)
%global github_owner Clusterlabs
%global commit_counter 0
-%global build_counter 1
+%global build_counter 0
%global buildnum %(expr %{commit_counter} + %{build_counter})
%ifarch s390x s390
--
1.8.3.1