From: Zack Cerza Date: Fri, 7 Mar 2025 20:53:23 +0000 (-0700) Subject: make-debs.sh: Optionally take debian version X-Git-Tag: testing/wip-vshankar-testing-20250411.090237-debug~7^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0db48b230391b68878481ac0464de998a4e38800;p=ceph-ci.git make-debs.sh: Optionally take debian version 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 --- diff --git a/make-debs.sh b/make-debs.sh index 046cc5ec29d..48ce555c1a5 100755 --- a/make-debs.sh +++ b/make-debs.sh @@ -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 #