Blame SOURCES/0054-build-Fix-make-rpm-with-VERSION_DM-without-dash.patch

4d51e5
From e60d7ce8e748cb6d51552879c162d01aafa17160 Mon Sep 17 00:00:00 2001
4d51e5
From: Marian Csontos <mcsontos@redhat.com>
4d51e5
Date: Wed, 15 Jun 2022 11:53:51 +0200
4d51e5
Subject: [PATCH 54/54] build: Fix make rpm with VERSION_DM without dash
4d51e5
4d51e5
When building RPM from a branch based on a release tag the expected -git
4d51e5
suffix is missing breaking the script producing error like following one:
4d51e5
4d51e5
    error: line 215: Unterminated rich dependency: (2021-53.ge36b180a6.el9: Requires: device-mapper-devel >= 1.02.181 (2021-53.ge36b180a6.el9
4d51e5
---
4d51e5
 Makefile.in | 2 +-
4d51e5
 1 file changed, 1 insertion(+), 1 deletion(-)
4d51e5
4d51e5
diff --git a/Makefile.in b/Makefile.in
4d51e5
index 3b7e0ecaa..f7a46269a 100644
4d51e5
--- a/Makefile.in
4d51e5
+++ b/Makefile.in
4d51e5
@@ -110,7 +110,7 @@ rpm: dist
4d51e5
 	$(LN_S) -f $(abs_top_srcdir)/spec/build.inc $(rpmbuilddir)/SOURCES
4d51e5
 	$(LN_S) -f $(abs_top_srcdir)/spec/macros.inc $(rpmbuilddir)/SOURCES
4d51e5
 	$(LN_S) -f $(abs_top_srcdir)/spec/packages.inc $(rpmbuilddir)/SOURCES
4d51e5
-	DM_VER=$$(cut -d- -f1 $(top_srcdir)/VERSION_DM);\
4d51e5
+	DM_VER=$$(cut -d' ' -f1 $(top_srcdir)/VERSION_DM | cut -d- -f1);\
4d51e5
 	GIT_VER=$$(cd $(top_srcdir); git describe | cut -d- --output-delimiter=. -f2,3 || echo 0);\
4d51e5
 	$(SED) -e "s,\(device_mapper_version\) [0-9.]*$$,\1 $$DM_VER," \
4d51e5
 	    -e "s,^\(Version:[^0-9%]*\)[0-9.]*$$,\1 $(LVM_VER)," \
4d51e5
-- 
4d51e5
2.34.3
4d51e5