Repository navigation
fix(build): version final-release debs above their release candidates - #26049
Conversation
With BIGBLUEBUTTON_RELEASE=4.0.0 (no "-" suffix), `cut -d "-" -f2` prints the whole line, so VERSION_ADDON became "4.0.0" and the devel build version became 2:4.0.0~4.0.0+<date>-git.<rev>. dpkg compares the part after "~" with digits sorting before letters, so that version is lower than every 2:4.0.0~rc.N build. apt keeps rc.5 servers on rc.5 and reports nothing to upgrade: bbb-install.sh -v noble-40-prerelease on an rc.5 server stayed on rc.5 after the 9dfa6c0 build was published. Use `cut -s` so a release string without "-" yields an empty addon, and emit "~<addon>" only when there is one. A final release now builds as 2:4.0.0+<date>-git.<rev>, which sorts above the rc builds and above the 2:4.0.0~4.0.0 builds already published. Pre-release strings such as 4.0.0-rc.5 and 4.1.0-alpha.2 produce the same versions as before.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe setup script now returns an empty Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
🚨 Automated tests failed |
f8c47a1
into
bigbluebutton:v4.0.x-release
…0-develop [Port to v4.0.x-develop] fix(build): version final-release debs above their release candidates #26049
What does this PR do?
Gives the packages built for a final release (
BIGBLUEBUTTON_RELEASE=4.0.0) a version that sorts above the release-candidate packages, so servers on 4.0.0-rc.5 upgrade to 4.0.0.build/setup-inside-docker.shtakes the part after the-inbigbluebutton-releaseas the pre-release suffix and builds<number>~<suffix>+<date>-git.<rev>.4.0.0has no-, andcut -d "-" -f2then returns the whole string, so the suffix became4.0.0. Versions built from the same commit, before and after this change:dpkg compares what follows the
~, and a part that starts with a digit sorts before one that starts with a letter. So2:4.0.0~4.0.0+...is older than every2:4.0.0~rc.N+...build. On a server running rc.5,apt upgradeandbbb-install.sh -v noble-40-prereleasefind nothing to upgrade, andbbb-conf --versionstill reports 4.0.0-rc.5.apt-cache policylists the 4.0.0 build from the repository, but the candidate stays the installed rc.5.The fix uses
cut -s, which prints nothing when the line has no-, and adds~<suffix>only when there is a suffix. A final release now builds as2:4.0.0+<date>-git.<rev>. That sorts above the rc builds and also above the2:4.0.0~4.0.0+...builds already innoble-40-prerelease, so servers that installed those upgrade too. Pre-release strings such as4.0.0-rc.5and4.1.0-alpha.2produce the same versions as before.The packages already published from 9dfa6c0 have to be rebuilt once this is merged.
v4.0.x-develophas the same script, and this commit applies to it cleanly.How was this tested?
I ran the version lines of
build/setup-inside-docker.sh, before and after the change, with severalBIGBLUEBUTTON_RELEASEvalues, and compared the results withdpkg --compare-versions:2:4.0.0~rc.5+20261013T153027-...2:4.0.0~4.0.0+...build already publishedThe problem itself was seen on a 4.0 test server running rc.5 packages: after the 9dfa6c0 packages were published,
bbb-install.sh -v noble-40-prereleaseleft every BigBlueButton package on rc.5.Not tested: a full CI package build with this change, and an upgrade from rc.5 to the rebuilt packages.