]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
make-debs.sh: Optionally take debian version
authorZack Cerza <zack@cerza.org>
Fri, 7 Mar 2025 20:53:23 +0000 (13:53 -0700)
committerZack Cerza <zack@cerza.org>
Thu, 10 Apr 2025 19:08:57 +0000 (13:08 -0600)
Our existing CI builds have names like:
  ceph-base_20.0.0-194-g6efaea33-1jammy_amd64.deb
Before this change, they are like:
  ceph-base_20.0.0-158-gb0de3a42-1_amd64.deb
This way we can pass e.g. "jammy" to end up with names compatible with our CI
builds.

Signed-off-by: Zack Cerza <zack@cerza.org>
make-debs.sh

index 046cc5ec29d6591f14292890639ca71304512940..48ce555c1a539b5cb442f6b0b61d8dfc06f5c0de 100755 (executable)
@@ -32,7 +32,18 @@ rm -fr $(dirname $releasedir)
 # c) compares higher than any previous commit
 # d) contains the short hash of the commit
 #
-vers=${2:-$(git describe --match "v*" | sed s/^v//)}
+# CI builds compute the version at an earlier stage, via the same method. Since
+# git metadata is not part of the source distribution, we take the version as
+# an argument to this script.
+#
+if [ -z "${2}" ]; then
+    vers=$(git describe --match "v*" | sed s/^v//)
+    dvers=${vers}-1
+else
+    vers=${2}
+    dvers=${vers}-1${VERSION_CODENAME}
+fi
+
 test -f "ceph-$vers.tar.bz2" || ./make-dist $vers
 #
 # rename the tarbal to match debian conventions and extract it
@@ -48,12 +59,7 @@ cp -a debian $releasedir/ceph-$vers/debian
 cd $releasedir
 perl -ni -e 'print if(!(/^Package: .*-dbg$/../^$/))' ceph-$vers/debian/control
 perl -pi -e 's/--dbg-package.*//' ceph-$vers/debian/rules
-#
-# always set the debian version to 1 which is ok because the debian
-# directory is included in the sources and the upstream version will
-# change each time it is modified.
-#
-dvers="$vers-1"
+
 #
 # update the changelog to match the desired version
 #