Skip to content

fix(build): version final-release debs above their release candidates - #26049

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-releasefrom
antobinary:fix-ga-deb-version-40
Oct 14, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-releasefrom
antobinary:fix-ga-deb-version-40

Conversation

@antobinary

Copy link
Copy Markdown
Member

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.sh takes the part after the - in bigbluebutton-release as the pre-release suffix and builds <number>~<suffix>+<date>-git.<rev>. 4.0.0 has no -, and cut -d "-" -f2 then returns the whole string, so the suffix became 4.0.0. Versions built from the same commit, before and after this change:

BIGBLUEBUTTON_RELEASE=4.0.0-rc.5
  old code: bbb-html5 2:4.0.0~rc.5+20261014T141241-git.local-build-9dfa6c07a4
  new code: bbb-html5 2:4.0.0~rc.5+20261014T141241-git.local-build-9dfa6c07a4

BIGBLUEBUTTON_RELEASE=4.0.0
  old code: bbb-html5 2:4.0.0~4.0.0+20261014T141241-git.local-build-9dfa6c07a4
  new code: bbb-html5 2:4.0.0+20261014T141241-git.local-build-9dfa6c07a4

dpkg compares what follows the ~, and a part that starts with a digit sorts before one that starts with a letter. So 2:4.0.0~4.0.0+... is older than every 2:4.0.0~rc.N+... build. On a server running rc.5, apt upgrade and bbb-install.sh -v noble-40-prerelease find nothing to upgrade, and bbb-conf --version still reports 4.0.0-rc.5. apt-cache policy lists 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 as 2:4.0.0+<date>-git.<rev>. That sorts above the rc builds and also above the 2:4.0.0~4.0.0+... builds already in noble-40-prerelease, so servers that installed those upgrade too. Pre-release strings such as 4.0.0-rc.5 and 4.1.0-alpha.2 produce the same versions as before.

The packages already published from 9dfa6c0 have to be rebuilt once this is merged. v4.0.x-develop has 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 several BIGBLUEBUTTON_RELEASE values, and compared the results with dpkg --compare-versions:

Check Result
4.0.0 build is newer than the rc.5 build 2:4.0.0~rc.5+20261013T153027-... PASS
4.0.0 build is newer than the 2:4.0.0~4.0.0+... build already published PASS
4.0.1 build is newer than the 4.0.0 build PASS
4.1.0-alpha.2 is newer than 4.0.0, and 4.1.0 is newer than 4.1.0-alpha.2 PASS
4.0.0-rc.5 and 4.1.0-alpha.2 versions are unchanged PASS

The 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-prerelease left 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.

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.
@antobinary antobinary added this to the Release 4.0 milestone Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 86c9b448-2064-4d74-877c-781381ef5232
📥 Commits

Reviewing files that changed from the base of the PR and between 9dfa6c0 and 71d4b47.

📒 Files selected for processing: 1
  • build/setup-inside-docker.sh

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The setup script now returns an empty VERSION_ADDON when the release string has no second hyphen-delimited field. Development versions include ~${VERSION_ADDON} only when the addon is nonempty. Otherwise, the version proceeds from VERSION_NUMBER to +${COMMIT_DATE}.

Priority: ⬆️ High

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 71d4b

Final-release Debian packages now omit the erroneous tilde addon, allowing upgrades from the cited release candidates and prior malformed builds. No merge-blocking issue is established by the reviewed change.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly describes the primary change: correcting final-release Debian package versions so they sort above release candidates.
Description check Passed The description directly explains the versioning defect, the fix, the expected package ordering, and the reported testing results.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚨 Automated tests failed

@antobinary
antobinary merged commit f8c47a1 into bigbluebutton:v4.0.x-release Oct 14, 2026
33 of 34 checks passed
@antobinary
antobinary deleted the fix-ga-deb-version-40 branch October 14, 2026 19:43
antobinary added a commit that referenced this pull request Oct 15, 2026
…0-develop

[Port to v4.0.x-develop] fix(build): version final-release debs above their release candidates #26049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant