Closed Bug 1916517 Opened 2 years ago Closed 1 year ago

Installing/Updating via apt broke on Debian stable (bookworm)

Categories

(Release Engineering :: Release Automation, defect, P2)

x86_64
Linux

Tracking

(firefox-esr115 unaffected, firefox-esr128 fixed, firefox130 wontfix, firefox131 wontfix, firefox132 fixed)

RESOLVED FIXED
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 --- fixed

People

(Reporter: Auravendill, Assigned: jcristau)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0

Steps to reproduce:

When I ran sudo apt upgrade to install the newest versions of all packages, I noticed that the package firefox did not update successfully and firefox-l10n-de therefore failed as well.
I tried to reinstall it, which failed as well.
Then I completely uninstalled everything from firefox (sudo apt remove firefox*) and tried to just install firefox. This failed as well.
I also cannot update on my laptop either.

Actual results:

Updating did not work
Reinstalling did not work either
The current version (130.0~build2) seems not installable on Debian 12

Error during updating (in German):

firefox (130.0~build2) wird eingerichtet ...
update-alternatives: Fehler: Alternativen-Pfad /usr/bin/firefox existiert nicht
dpkg: Fehler beim Bearbeiten des Paketes firefox (--configure):
 »installiertes post-installation-Skript des Paketes firefox«-Unterprozess gab den Fehlerwert 2 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von firefox-l10n-de:
 firefox-l10n-de hängt ab von firefox (= 130.0~build2); aber:
  Paket firefox ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes firefox-l10n-de (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
 firefox
 firefox-l10n-de
E: Sub-process /usr/bin/dpkg returned an error code (1)

Expected results:

Update should have just worked
(Re)installing should just work

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → Installer
OS: Unspecified → Linux
Product: Core → Firefox
Hardware: Unspecified → x86_64
Component: Installer → Release Automation: Packaging
Product: Firefox → Release Engineering
Version: Firefox 130 → unspecified

This is likely a result of bug 1863757.

Keywords: regression
Regressed by: 1863757

This is odd, I wonder if maybe you have something diverting /usr/bin/firefox.
Does dpkg-divert --list show anything like that?

Flags: needinfo?(Auravendill)

This is the result of "LANG=C dpkg-divert --list":

diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common
diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash
diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr
diversion of /bin/sh to /bin/sh.distrib by dash

Debian comes per default with firefox-esr from their on repo installed. But firefox from the Mozilla repo worked prior to the latest update.

Flags: needinfo?(Auravendill)

OK yes that makes sense, thanks.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1

/usr/bin/firefox can be diverted away by other packages, causing our
update-alternatives call to break.

Assignee: nobody → jcristau
Status: NEW → ASSIGNED

[Tracking Requested - why for this release]: our firefox debian package fails to install on debian systems with the firefox-esr package installed, regression in 130.0

This wasn't caught in nightly/beta because only /usr/bin/firefox gets diverted.

So I've tried to reproduce this, but can't. The firefox-esr package diverts /usr/bin/firefox, but it installs its own script there, so when I install mozilla's firefox package on top, /usr/bin/firefox exists, and update-alternatives doesn't complain.

# apt-get install firefox-esr
[...]
Setting up firefox-esr (115.15.0esr-1~deb12u1) ...
update-alternatives: using /usr/bin/firefox-esr to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/firefox-esr to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
Processing triggers for libc-bin (2.36-9+deb12u7) ...
Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.10+dfsg-1+deb12u1) ...
root@b25d68350710:/# ls -l /usr/bin/firefox
-rwxr-xr-x 1 root root 118 Sep  3 20:28 /usr/bin/firefox
root@b25d68350710:/# wget https://packages.mozilla.org/apt/pool/mozilla/firefox_130.0~build2_amd64_8d8f41f5c3533f995baf2451c872b933.deb
--2024-09-06 07:34:23--  https://packages.mozilla.org/apt/pool/mozilla/firefox_130.0~build2_amd64_8d8f41f5c3533f995baf2451c872b933.deb
Resolving packages.mozilla.org (packages.mozilla.org)... 34.160.78.70
Connecting to packages.mozilla.org (packages.mozilla.org)|34.160.78.70|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70592184 (67M) [application/vnd.debian.binary-package]
Saving to: 'firefox_130.0~build2_amd64_8d8f41f5c3533f995baf2451c872b933.deb'

firefox_130.0~build2_amd64_8d8f41f5c3533f99 100%[========================================================================================>]  67.32M  20.0MB/s    in 4.1s    

2024-09-06 07:34:28 (16.5 MB/s) - 'firefox_130.0~build2_amd64_8d8f41f5c3533f995baf2451c872b933.deb' saved [70592184/70592184]

root@b25d68350710:/# apt install ./firefox_130.0~build2_amd64_8d8f41f5c3533f995baf2451c872b933.deb 
[...]
Unpacking firefox (130.0~build2) ...
Setting up libgdk-pixbuf-xlib-2.0-0:amd64 (2.40.2-2) ...
Setting up libgdk-pixbuf2.0-0:amd64 (2.40.2-2) ...
Setting up firefox (130.0~build2) ...
update-alternatives: using /usr/bin/firefox to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/firefox to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...

Is there anything particuliar about your setup that might be different?

Flags: needinfo?(Auravendill)

There are two difference, I can see rn. The first - which I assume shouldn't matter - is that I'm not logged in as root, but use sudo.

The second is, that I never manually installed the package firefox-esr. Firefox-esr gets installed by default during the installation of Debian, when you use the (graphic) installer and install a DE during it (in my case Cinnamon). I guess this happens as some sort of dependency wizardry, which ends up installing firefox-esr - possibly via the firefox package, which is just virtual in the normal Debian sources? Then I installed firefox via this guide: https://support.mozilla.org/de/kb/firefox-unter-linux-installieren?utm_source=www.mozilla.org&utm_medium=referral&utm_campaign=firefox-download-thanks#w_installation-von-firefox-uber-das-deb-paket-fur-debian-basierte-distributionen-empfohlen

Due to having reinstalled the OS on my laptop (one of three machines I have this issue on) only recently, I can still see everything, I did on it since the installation, so I can see that apart from installing firefox-l10n-de after that, I did nothing to firefox. I basically just finished the graphic install, installed zsh with my favourite theme, copy pasted the commands from the guide above into the terminal and used and updated Firefox without issues for a while until the last update changed something.

But I also have slightly modified my source.list to include non-free packages

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

and I added backports:

deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware

Another potential difference could also be hidden within your "[...]": If you still had the mozilla.list in your /etc/apt/source.list.d firefox-esr isn't the same package as the one from Debian. That one would of course get replaced after adding mozilla.list according to the guide, but idk what the other version might have done differently during its installation.

On the laptop according to synaptic there is currently both firefox and firefox-esr installed. esr is what I am currently using to type this comment, since firefox isn't working. On the desktop there is no firefox-esr, just the non-working firefox and chromium, but the diversion made by firefox-esr somehow remained.

Flags: needinfo?(Auravendill)

The error message from comment 0 suggests /usr/bin/firefox doesn't exist on your system. Is that right?

Flags: needinfo?(Auravendill)

Yes, on both my laptop and my desktop /usr/bin/firefox does not currently exist. If my understanding is correct, this is where apt would have installed firefox, if it had succeeded, right?

Flags: needinfo?(Auravendill)

Debian's firefox-esr installs a script as /usr/bin/firefox, so that should exist even before installing mozilla's firefox package.

So that should have existed at the moment, when firefox was being installed via apt. Then the next update should have replaced firefox-esr with the one from the Mozilla.list, since that has the newer versions and higher priority. This worked for a while (the laptop had firefox installed this way 27.07.2024 according to my .zsh_history) until the update failed. Now the script/symlink/etc there is missing entirely.

Seems like either the upgrade of firefox-esr or the upgrade of firefox, which failed, removed it. Maybe in anticipation to replace it with another version?

untracking for uplift since the issue is a more specific and not as common as we originally thought

Severity: S2 → S3
Priority: P1 → P2

I was able to reproduce the issue:

  • install Debian's firefox-esr package; that adds a diversion for /usr/bin/firefox (in preinst "install"/"upgrade")
  • upgrade firefox-esr to mozilla's; the diversion remains in place (it only gets removed in postrm "remove"), but now /usr/bin/firefox is missing
  • install mozilla's firefox package; that fails.

We should fix this in our firefox-esr package, in addition or instead of the patch already attached here.

Debian's firefox-esr package adds its own /usr/bin/firefox and diverts
it away, so we either need to do the same or clean up the diversion in
our postinst, otherwise /usr/bin/firefox goes permanently missing when
upgrading from Debian to Mozilla's firefox-esr package.

Pushed by jcristau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ced734cf7907 add /usr/bin/firefox to the firefox-esr deb package r=glandium

Backed out for breaking esr releases.

Flags: needinfo?(jcristau)
Attachment #9425783 - Flags: approval-mozilla-esr128+

Debian's firefox-esr package adds its own /usr/bin/firefox and diverts
it away, so we either need to do the same or clean up the diversion in
our postinst, otherwise /usr/bin/firefox goes permanently missing when
upgrading from Debian to Mozilla's firefox-esr package.

Original Revision: https://phabricator.services.mozilla.com/D222752

Attachment #9426082 - Flags: approval-mozilla-esr128?
Pushed by jcristau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20267c5d61c0 add /usr/bin/firefox to the firefox-esr deb package r=glandium

esr128 Uplift Approval Request

  • User impact if declined: /usr/bin/firefox can go missing
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: install debian's firefox-esr package; install ours; install our firefox package.
  • Risk associated with taking this patch: low
  • Explanation of risk level: tested on try; we're copying code that has been in Debian's firefox-esr package for years
  • String changes made/needed: n/a
  • Is Android affected?: no
Flags: needinfo?(jcristau)
Attachment #9425783 - Flags: approval-mozilla-esr128+
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Blocks: 1863757
No longer regressed by: 1863757
Keywords: regression
Attachment #9426082 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Duplicate of this bug: 1920362
Component: Release Automation: Packaging → Release Automation
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: