]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/build-with-container: add a common packages target
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 14 Feb 2025 19:50:42 +0000 (14:50 -0500)
committerDavid Galloway <david.galloway@ibm.com>
Thu, 31 Jul 2025 21:15:22 +0000 (17:15 -0400)
Add a `packages` target to build-with-container.py that requests a build
of packages, whatever package type is native to the distro selected.
For example `./src/script/build-with-container.py -d ubuntu22.04 -e
packages` will automatically select a deb packages build where
`./src/script/build-with-container.py -d centos9 -e packages` will
trigger rpm packages to be built. The underlying package-type specific
targets remain unchanged.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 37b7d509c59348ae11badd6673cb49ce9ce303fa)

src/script/build-with-container.py

index 1fe156e1ac04d64f437410c39d4db751ab58e702..a186644b0877575e3eb204818a10e110f1bdb761 100755 (executable)
@@ -177,6 +177,12 @@ class DistroKind(StrEnum):
     def from_alias(cls, value):
         return cls.aliases()[value]
 
+    @classmethod
+    def uses_rpmbuild(cls):
+        # right now this is the same as uses_dnf, but perhaps not always
+        # let's be specific in our interface
+        return cls.uses_dnf()  # but lazy in the implementation
+
     @classmethod
     def aliases(cls):
         return {