From 9fb9aa563ce9cb5eb75b2ec0d2fb933c24ff3de2 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Aug 23 2022 23:15:05 +0000 Subject: rpmdefines changes depending on rpkg Recent changes on rpkg side require modification in centpkg too. rpmdefines in rpkg had to be changed because of a safer way of executing the 'rpm' command in the 'subprocess' python library (without shell=True argument). A related change in rpkg: https://pagure.io/rpkg/pull-request/620 Other tools depending on rpkg (rhpkg, fedpkg, centpkg, rfpkg) are affected. Example for fedpkg: https://pagure.io/fedpkg/pull-request/486 Signed-off-by: Ondrej Nosek --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index 8e7ba4e..1956a2b 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -189,14 +189,14 @@ class Commands(Commands): self._distval = self._distvar.replace('.', '_') self._disttag = 'el%s' % self._distval - self._rpmdefines = ["--define '_sourcedir %s'" % self.layout.sourcedir, - "--define '_specdir %s'" % self.layout.specdir, - "--define '_builddir %s'" % self.layout.builddir, - "--define '_srcrpmdir %s'" % self.layout.srcrpmdir, - "--define '_rpmdir %s'" % self.layout.rpmdir, - "--define 'dist .%s'" % self._disttag, + self._rpmdefines = ['--define', '_sourcedir %s' % self.layout.sourcedir, + '--define', '_specdir %s' % self.layout.specdir, + '--define', '_builddir %s' % self.layout.builddir, + '--define', '_srcrpmdir %s' % self.layout.srcrpmdir, + '--define', '_rpmdir %s' % self.layout.rpmdir, + '--define', 'dist .%s' % self._disttag, # int and float this to remove the decimal - "--define '%s 1'" % self._disttag] + '--define', '%s 1' % self._disttag] self.log.debug("RPMDefines: %s" % self._rpmdefines) def construct_build_url(self, *args, **kwargs):