Skip to content

Commit

Permalink
Bug 1916517 - add /usr/bin/firefox to the firefox-esr deb package r=g…
Browse files Browse the repository at this point in the history
…landium

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.

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

UltraBlame original commit: 20267c5d61c02127ca8b3982d3c1795111773f86
  • Loading branch information
marco-c committed Sep 20, 2024
1 parent d76446d commit e955f7d
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/installer/linux/app/debian/dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr
/
bin
41 changes: 41 additions & 0 deletions browser/installer/linux/app/debian/firefox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
!
/
bin
/
sh
FIREFOX
=
"
(
command
-
v
firefox
)
"
[
-
x
"
FIREFOX
.
real
"
]
&
&
exec
"
FIREFOX
.
real
"
"
"
exec
firefox
-
esr
"
"
55 changes: 55 additions & 0 deletions browser/installer/linux/app/debian/postrm.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
!
/
bin
/
sh
-
e
if
[
{
DEB_PKG_NAME
}
=
firefox
-
esr
]
;
then
if
[
"
1
"
=
"
remove
"
]
;
then
dpkg
-
divert
-
-
package
firefox
-
esr
-
-
rename
-
-
remove
/
usr
/
bin
/
firefox
fi
fi
74 changes: 74 additions & 0 deletions browser/installer/linux/app/debian/preinst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#
!
/
bin
/
sh
-
e
if
[
{
DEB_PKG_NAME
}
=
firefox
-
esr
]
;
then
if
[
"
1
"
=
"
upgrade
"
]
|
|
[
"
1
"
=
"
install
"
]
;
then
dpkg
-
divert
-
-
package
firefox
-
esr
-
-
divert
/
usr
/
bin
/
firefox
.
real
-
-
rename
/
usr
/
bin
/
firefox
fi
fi
39 changes: 39 additions & 0 deletions browser/installer/linux/app/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,42 @@ override_dh_strip_nondeterminism
dh_strip_nondeterminism
-
Xxpi
override_dh_install
:
dh_install
ifeq
(
(
shell
dpkg
-
parsechangelog
-
S
Source
)
firefox
-
esr
)
install
-
m
0755
debian
/
firefox
.
sh
debian
/
firefox
-
esr
/
usr
/
bin
/
firefox
endif

0 comments on commit e955f7d

Please sign in to comment.