From 4e48c0d096d820b8e1af8de32228e4ff2e4ddd5f Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sat, 25 Oct 2025 15:50:05 -0500 Subject: [PATCH] builds workflow: make .orig.tar.gz unique per build This way we can actually post the result to ppa for various releases. The package version previously was something like 6.0.0-0+daily~noble~202510260402 and now becomes 6.0.0~daily~noble~202510260402 So we s/-0+/~/ . This way, we can use an orig tarball named lxc_6.0.0~daily~jammy~202510260402.orig.tar.gz. With the -0 after the version, debuild would only look for lxc_6.0.0.orig.tar.gz. 6.0.0~daily will still be older than any 6.0.0-0 or 6.0.0-1 that might legitimately get pushed into the release. Signed-off-by: Serge Hallyn --- .github/workflows/builds.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 62a165995..41bd71a1f 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -47,7 +47,16 @@ jobs: run: | make dist TARBALL=$(ls -1 *.tar.gz) - mv ${TARBALL} ../$(echo ${TARBALL} | sed -e "s/.tar.gz$/.orig.tar.gz/g" -e "s/lxc-/lxc_/g") + # if TARBALL is something like "lxc-6.0.0.tar.gz" + # then we want: lxc_6.0.0+daily~noble~202510252032.orig.tar.gz + newname=${TARBALL%.tar.gz} + newname="${newname/-/_}" + RELEASE=${{ matrix.os }} + D="$(date -u +%Y%m%d%H%M)" + echo "DPKG_DATE=$D" >> $GITHUB_ENV + newname="${newname}~daily~${RELEASE}~${D}.orig.tar.gz" + echo "renaming ${TARBALL} to ../${newname}" + mv ${TARBALL} "../${newname}" - name: Assemble the package env: @@ -62,8 +71,9 @@ jobs: cd lxc-*/ cp -R ../packaging/debian . rm -f debian/changelog + D="${DPKG_DATE}" # saved from previous step dch --create --package lxc \ - -v 2:${VERSION}-0+daily~${{ matrix.os }}~$(date -u +%Y%m%d%H%M) \ + -v 2:${VERSION}~daily~${{ matrix.os }}~${D} \ --distribution ${{ matrix.os }} \ "Automated snapshot build." -- 2.47.3