From 441ee7a696558e450c31718c81f3a49163b59fb8 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Oct 17 2024 21:25:55 +0000 Subject: [PATCH 1/2] undefine fedora in rpmdefines section resolves centpkg issue #111 Signed-off-by: Troy Dawson --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index 3d09d1c..e52a0c9 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -217,6 +217,7 @@ class Commands(Commands): self._distvar = self.distgitdir.centosversion self._distval = self._distvar.replace(".", "_") + self._distunset = 'fedora' self._disttag = "el%s" % self._distval self._rpmdefines = [ "--define", @@ -237,6 +238,9 @@ class Commands(Commands): # This is so the rhel macro is set for spec files "--define", "rhel %s" % self._distval.split("_")[0], + # This is so the fedora macro is unset for spec files + "--eval", + "%%undefine %s" % self._distunset, ] self.log.debug("RPMDefines: %s" % self._rpmdefines) From 7f839512a73f687c14f989c2504d4583f42c41f0 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Oct 17 2024 21:33:58 +0000 Subject: [PATCH 2/2] define centos in rpmdefines section resolves centpkg issue #112 Signed-off-by: Troy Dawson --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index e52a0c9..661a62b 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -238,6 +238,9 @@ class Commands(Commands): # This is so the rhel macro is set for spec files "--define", "rhel %s" % self._distval.split("_")[0], + # This is so the centos macro is set for spec files + "--define", + "centos %s" % self._distval.split("_")[0], # This is so the fedora macro is unset for spec files "--eval", "%%undefine %s" % self._distunset,