Accept apt release-info changes so upgrades cannot fail silently - #852
Merged
antobinary merged 2 commits intoSep 14, 2026
Merged
antobinary merged 2 commits into
antobinary merged 2 commits into
Conversation
apt refuses to use a repository whose Release Origin or Label changed until the change is accepted once, and a rejected fetch leaves the previously cached package lists in place. bbb-install.sh called bare `apt-get update` in five places and has no `set -e`, so the rejection was ignored: the dist-upgrade that follows found nothing new, need_pkg saw everything already installed, and the script restarted the server and reported success while leaving it on its old version. This is not hypothetical. noble-400 gained Origin: and Label: on 2026-09-04 (they had been empty, inherited from a verbatim Release copy). Every 4.0 server whose apt cache predates that is blocked, and re-running this script cannot clear it - which is how a server asked for 4.0.0-rc.3 and stayed on rc.2 with a clean-looking run. Route the five call sites through a helper that passes --allow-releaseinfo-change. Because the installer is fetched fresh from GitHub on every run, this also unsticks servers that are already blocked: the next normal upgrade accepts the pending change and proceeds, with no per-server intervention. Verified against apt 2.8.3 with a local HTTP repo. Starting from a cache holding the old empty-Origin Release and a server at rc.2, publishing rc.4 with Origin/Label set gives two blocking errors and the cache stays at rc.2 under the current code; the helper takes the same cache to rc.4. The helper warns rather than aborting. `apt-get update` returns non-zero for any configured repository, so making it fatal would turn a transient Ubuntu mirror hiccup into a failed install - a worse regression than the one being fixed. The silent-success path is closed either way, since the known cause is now handled and anything else is reported. Fixes bigbluebutton#851
Differential ShellCheck failed on bigbluebutton#852 with six new findings: SC2120 on the function itself (references arguments, but none are ever passed) and SC2119 at each of the five call sites, suggesting the callers forward the script's own arguments. The "$@" was speculative. No caller passes anything to apt_update, so it expanded to nothing everywhere and removing it changes no behaviour. Baseline on v4.0.x-release is a single pre-existing SC2086; with this the branch reports that same single finding and introduces none.
GhaziTriki
approved these changes
Sep 14, 2026
GhaziTriki
left a comment
Member
There was a problem hiding this comment.
It looks good to me, it worked upgrading to 4.0-rc3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #851
The bug
apt refuses to use a repository whose Release
OriginorLabelchanged untilthe change is accepted once, and a rejected fetch leaves the previously cached
package lists in place.
bbb-install.shcalls bareapt-get updatein five places and has noset -e,so that rejection is ignored. The
dist-upgradethat follows finds nothing new,need_pkgsees everything already installed, and the script restarts the serverand reports success — while leaving it on its old version.
This is not hypothetical.
noble-400gainedOrigin:andLabel:on2026-09-04 (they had been empty, inherited from a verbatim Release copy). Every
4.0 server whose apt cache predates that is blocked, and re-running the
installer cannot clear it. That is how a server asked for 4.0.0-rc.3 and stayed
on rc.2 with a clean-looking run.
The change
Route the five
apt-get updatecall sites through a helper that passes--allow-releaseinfo-change:Call sites:
main(324),need_pkg(673),install_docker(1513),install_ssl(1544),install_coturn(1875). All five are inside functions andmain "$@"runs at the bottom of the file, so the helper is defined before anycall executes.
Because the installer is fetched fresh from GitHub on every run, this also
unsticks servers that are already blocked: their next normal upgrade accepts the
pending change and proceeds, with no per-server intervention and no release-note
instructions.
Verification
Against apt 2.8.3 with a local HTTP repo. Starting from a cache holding the old
empty-
OriginRelease with the server at rc.2, then publishing rc.4 withOrigin/Labelset:Per-field behaviour, tested one field at a time:
OriginandLabelchangesblock (exit 100); a
Suitechange is accepted silently. Acceptance isone-time — plain
apt-get updateis clean afterwards, including across a laterSuitechange.bash -nclean.Note on the warning vs aborting
The helper warns rather than aborting.
apt-get updatereturns non-zero for anyconfigured repository, so making it fatal would turn a transient Ubuntu mirror
hiccup into a failed install — a worse regression than the one being fixed. The
silent-success path is closed either way: the known cause is now handled, and
anything else is reported.
Other branches
If adopted, should be ported to branch
v4.1.x-releasetoo. v3.0.x-release and prior don't need this change as I only set the Origin and Label on 4.0.