They haven’t modified apt; they abuse an extra version number that supercedes the major version number of a package. I think it’s meant to be used for new packages that reuse the name of an abandoned project. Canonical publish packages for software like Firefox that depend on snapd and just run snap install firefox instead of actually installing anything. Since they bumped that extra version number, their packages always have a higher precedence than even the officially packaged debs from Mozilla.
What’s even even more fucked up is that the package still installs an executable to /usr/bin/firefox, but it’s just a wrapper script that launches the Snap application… and also replaces your desktop shortcuts, application launcher shortcuts, and favourites with its own Reforged Edition file if you’re running GNOME, Unity, MATE, or KDE Plasma.
Excerpt from /usr/bin/firefox Canonical Edition(TM)
# [...]# GNOME Shell
OLD="firefox.desktop"
NEW="firefox_firefox.desktop"
FAVS=$(gsettings get org.gnome.shell favorite-apps 2> /dev/null)
ifecho"$FAVS" | grep -q "'$OLD'"; then
NEWFAVS=$(echo$FAVS | sed -e "s#'$OLD'#'$NEW'#")
gsettings set org.gnome.shell favorite-apps "$NEWFAVS"fi# MATE
OLD="/usr/share/applications/firefox.desktop"
NEW="/var/lib/snapd/desktop/applications/firefox_firefox.desktop"
OBJECTS=$(gsettings get org.mate.panel object-id-list 2> /dev/null)
for object in$OBJECTS; do
object=$(echo$object | cut -d\' -f2)
launcher=$(gsettings get org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location)
if [ "$launcher" = "'$OLD'" ]; then
gsettings set org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location "'$NEW'"fidone# [...]# TODO: handle other desktop environmentsexec /snap/bin/firefox "$@"
They haven’t modified
apt
; they abuse an extra version number that supercedes the major version number of a package. I think it’s meant to be used for new packages that reuse the name of an abandoned project. Canonical publish packages for software like Firefox that depend on snapd and just runsnap install firefox
instead of actually installing anything. Since they bumped that extra version number, their packages always have a higher precedence than even the officially packaged debs from Mozilla.Thanks, that’s even more fucked up.
What’s even even more fucked up is that the package still installs an executable to
/usr/bin/firefox
, but it’s just a wrapper script that launches the Snap application… and also replaces your desktop shortcuts, application launcher shortcuts, and favourites with its own Reforged Edition file if you’re running GNOME, Unity, MATE, or KDE Plasma.Excerpt from /usr/bin/firefox Canonical Edition(TM)
# [...] # GNOME Shell OLD="firefox.desktop" NEW="firefox_firefox.desktop" FAVS=$(gsettings get org.gnome.shell favorite-apps 2> /dev/null) if echo "$FAVS" | grep -q "'$OLD'"; then NEWFAVS=$(echo $FAVS | sed -e "s#'$OLD'#'$NEW'#") gsettings set org.gnome.shell favorite-apps "$NEWFAVS" fi # MATE OLD="/usr/share/applications/firefox.desktop" NEW="/var/lib/snapd/desktop/applications/firefox_firefox.desktop" OBJECTS=$(gsettings get org.mate.panel object-id-list 2> /dev/null) for object in $OBJECTS; do object=$(echo $object | cut -d\' -f2) launcher=$(gsettings get org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location) if [ "$launcher" = "'$OLD'" ]; then gsettings set org.mate.panel.object:/org/mate/panel/objects/$object/ launcher-location "'$NEW'" fi done # [...] # TODO: handle other desktop environments exec /snap/bin/firefox "$@"
I’d classify that as malware.