firefox-esr-78: drop

Firefox ESR 78.15 was the last release of this series and is now EOL.
This commit is contained in:
Martin Weinelt 2021-11-02 10:39:56 +01:00
parent b67e752c29
commit d69e703b71
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
7 changed files with 14 additions and 158 deletions

View File

@ -128,7 +128,6 @@ in
ferm = handleTest ./ferm.nix {};
firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
firefox-esr = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr; }; # used in `tested` job
firefox-esr-78 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr-78; };
firefox-esr-91 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr-91; };
firejail = handleTest ./firejail.nix {};
firewall = handleTest ./firewall.nix {};

View File

@ -5,15 +5,15 @@
{ lib, stdenv, pkg-config, pango, perl, python3, zip
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
, freetype, fontconfig, file, nspr, nss, nss_3_53
, freetype, fontconfig, file, nspr, nss
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
, hunspell, libevent, libstartup_notification
, libvpx_1_8
, icu69, libpng, glib, pciutils
, autoconf213, which, gnused, rustPackages, rustPackages_1_45
, autoconf213, which, gnused, rustPackages
, rust-cbindgen, nodejs, nasm, fetchpatch
, gnum4
, gtk2, gtk3, wrapGAppsHook
, gtk3, wrapGAppsHook
, debugBuild ? false
### optionals
@ -91,20 +91,16 @@ let
then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS"
else "/bin";
# 78 ESR won't build with rustc 1.47
inherit (if lib.versionAtLeast version "82" then rustPackages else rustPackages_1_45)
rustc cargo;
inherit (rustPackages) rustc cargo;
# Darwin's stdenv provides the default llvmPackages version, match that since
# clang LTO on Darwin is broken so the stdenv is not being changed.
# Target the LLVM version that rustc -Vv reports it is built with for LTO.
# rustPackages_1_45 -> LLVM 10, rustPackages -> LLVM 11
llvmPackages0 =
/**/ if stdenv.isDarwin
if stdenv.isDarwin
then buildPackages.llvmPackages
else if lib.versionAtLeast rustc.llvm.version "11"
then buildPackages.llvmPackages_11
else buildPackages.llvmPackages_10;
else buildPackages.llvmPackages_12;
# Force the use of lld and other llvm tools for LTO
llvmPackages = llvmPackages0.override {
bootBintoolsNoLibc = null;
@ -117,8 +113,6 @@ let
then overrideCC stdenv llvmPackages.clangUseLLVM
else stdenv;
nss_pkg = if lib.versionOlder version "83" then nss_3_53 else nss;
# --enable-release adds -ffunction-sections & LTO that require a big amount of
# RAM and the 32-bit memory space cannot handle that linking
# We also disable adding "-g" for easier linking
@ -135,27 +129,9 @@ buildStdenv.mkDerivation ({
patches = [
] ++
lib.optional (lib.versionOlder version "86") ./env_var_for_system_dir-ff85.patch ++
lib.optional (lib.versionAtLeast version "86") ./env_var_for_system_dir-ff86.patch ++
lib.optional (lib.versionOlder version "83") ./no-buildconfig-ffx76.patch ++
lib.optional (lib.versionAtLeast version "90") ./no-buildconfig-ffx90.patch ++
lib.optional (ltoSupport && lib.versionOlder version "84") ./lto-dependentlibs-generation-ffx83.patch ++
lib.optional (ltoSupport && lib.versionAtLeast version "84" && lib.versionOlder version "86")
(fetchpatch {
url = "https://hg.mozilla.org/mozilla-central/raw-rev/fdff20c37be3";
sha256 = "135n9brliqy42lj3nqgb9d9if7x6x9nvvn0z4anbyf89bikixw48";
})
# This patch adds pipewire support for the ESR release
++ lib.optional (pipewireSupport && lib.versionOlder version "83")
(fetchpatch {
# https://src.fedoraproject.org/rpms/firefox/blob/master/f/firefox-pipewire-0-3.patch
url = "https://src.fedoraproject.org/rpms/firefox/raw/e99b683a352cf5b2c9ff198756859bae408b5d9d/f/firefox-pipewire-0-3.patch";
sha256 = "0qc62di5823r7ly2lxkclzj9rhg2z7ms81igz44nv0fzv3dszdab";
})
++ patches;
patches;
# Ignore trivial whitespace changes in patches, this fixes compatibility of
# ./env_var_for_system_dir.patch with Firefox >=65 without having to track
@ -163,7 +139,7 @@ buildStdenv.mkDerivation ({
patchFlags = [ "-p1" "-l" ];
buildInputs = [
gtk3 perl zip libjpeg zlib bzip2
gnum4 gtk3 perl zip libjpeg zlib bzip2
dbus dbus-glib pango freetype fontconfig xorg.libXi xorg.libXcursor
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
xorg.pixman yasm libGLU libGL
@ -177,7 +153,7 @@ buildStdenv.mkDerivation ({
# yasm can potentially be removed in future versions
# https://bugzilla.mozilla.org/show_bug.cgi?id=1501796
# https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ
nspr nss_pkg
nspr nss
]
++ lib.optional alsaSupport alsa-lib
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
@ -185,11 +161,9 @@ buildStdenv.mkDerivation ({
++ lib.optionals waylandSupport [ libxkbcommon libdrm ]
++ lib.optional pipewireSupport pipewire
++ lib.optional jemallocSupport jemalloc
++ lib.optional (lib.versionAtLeast version "82") gnum4
++ lib.optionals buildStdenv.isDarwin [ CoreMedia ExceptionHandling Kerberos
AVFoundation MediaToolbox CoreLocation
Foundation libobjc AddressBook cups ]
++ lib.optional (lib.versionOlder version "90") gtk2;
Foundation libobjc AddressBook cups ];
NIX_LDFLAGS = lib.optionalString ltoSupport ''
-rpath ${llvmPackages.libunwind.out}/lib
@ -201,22 +175,7 @@ buildStdenv.mkDerivation ({
rm -rf obj-x86_64-pc-linux-gnu
substituteInPlace toolkit/xre/glxtest.cpp \
--replace 'dlopen("libpci.so' 'dlopen("${pciutils}/lib/libpci.so'
'' + lib.optionalString (pipewireSupport && lib.versionOlder version "83") ''
# substitute the /usr/include/ lines for the libraries that pipewire provides.
# The patch we pick from fedora only contains the generated moz.build files
# which hardcode the dependency paths instead of running pkg_config.
substituteInPlace \
media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build \
--replace /usr/include ${pipewire.dev}/include
'' + lib.optionalString (lib.versionAtLeast version "80" && lib.versionOlder version "81") ''
substituteInPlace dom/system/IOUtils.h \
--replace '#include "nspr/prio.h"' '#include "prio.h"'
substituteInPlace dom/system/IOUtils.cpp \
--replace '#include "nspr/prio.h"' '#include "prio.h"' \
--replace '#include "nspr/private/pprio.h"' '#include "private/pprio.h"' \
--replace '#include "nspr/prtypes.h"' '#include "prtypes.h"'
'';
'';
nativeBuildInputs =
[

View File

@ -1,6 +0,0 @@
--- a/toolkit/xre/nsXREDirProvider.cpp 2019-02-28 21:00:14.157543388 +0100
+++ b/toolkit/xre/nsXREDirProvider.cpp 2019-02-28 21:01:28.731128320 +0100
@@ -302 +302,2 @@
- rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
+ const char* pathVar = PR_GetEnv("MOZ_SYSTEM_DIR");
+ rv = NS_NewNativeLocalFile((pathVar && *pathVar) ? nsDependentCString(pathVar) : reinterpret_cast<const nsCString&>(dirname), false, getter_AddRefs(localDir));

View File

@ -1,45 +0,0 @@
--- a/toolkit/library/build/dependentlibs.py
+++ b/toolkit/library/build/dependentlibs.py
@@ -36,26 +36,17 @@ def dependentlibs_win32_objdump(lib):
proc.wait()
return deps
-def dependentlibs_readelf(lib):
+def dependentlibs_elf_objdump(lib):
'''Returns the list of dependencies declared in the given ELF .so'''
- proc = subprocess.Popen([substs.get('TOOLCHAIN_PREFIX', '') + 'readelf', '-d', lib], stdout = subprocess.PIPE,
+ proc = subprocess.Popen([substs['LLVM_OBJDUMP'], '--private-headers', lib], stdout = subprocess.PIPE,
universal_newlines=True)
deps = []
for line in proc.stdout:
- # Each line has the following format:
- # tag (TYPE) value
- # or with BSD readelf:
- # tag TYPE value
- # Looking for NEEDED type entries
- tmp = line.split(' ', 3)
- if len(tmp) > 3 and 'NEEDED' in tmp[2]:
- # NEEDED lines look like:
- # 0x00000001 (NEEDED) Shared library: [libname]
- # or with BSD readelf:
- # 0x00000001 NEEDED Shared library: [libname]
- match = re.search('\[(.*)\]', tmp[3])
- if match:
- deps.append(match.group(1))
+ # We are looking for lines with the format:
+ # NEEDED libname
+ tmp = line.split()
+ if len(tmp) == 2 and tmp[0] == 'NEEDED':
+ deps.append(tmp[1])
proc.wait()
return deps
@@ -110,7 +101,7 @@ def gen_list(output, lib):
libpaths = [os.path.join(substs['DIST'], 'bin')]
binary_type = get_type(lib)
if binary_type == ELF:
- func = dependentlibs_readelf
+ func = dependentlibs_elf_objdump
elif binary_type == MACHO:
func = dependentlibs_mac_objdump
else:

View File

@ -1,24 +0,0 @@
Remove about:buildconfig. If used as-is, it would add unnecessary runtime dependencies.
diff -ur firefox-65.0-orig/docshell/base/nsAboutRedirector.cpp firefox-65.0/docshell/base/nsAboutRedirector.cpp
--- firefox-76.0.orig/docshell/base/nsAboutRedirector.cpp 2020-05-03 19:01:29.926544735 +0200
+++ firefox-76.0/docshell/base/nsAboutRedirector.cpp 2020-05-03 19:12:00.845035570 +0200
@@ -62,8 +62,6 @@
{"about", "chrome://global/content/aboutAbout.html", 0},
{"addons", "chrome://mozapps/content/extensions/extensions.xhtml",
nsIAboutModule::ALLOW_SCRIPT},
- {"buildconfig", "chrome://global/content/buildconfig.html",
- nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
{"checkerboard", "chrome://global/content/aboutCheckerboard.html",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT},
diff -ur firefox-65.0-orig/toolkit/content/jar.mn firefox-65.0/toolkit/content/jar.mn
--- firefox-65.0-orig/toolkit/content/jar.mn 2019-01-23 00:48:35.033372506 +0100
+++ firefox-65.0/toolkit/content/jar.mn 2019-01-23 00:50:45.126565924 +0100
@@ -36,7 +36,6 @@
content/global/plugins.css
content/global/browser-child.js
content/global/browser-content.js
-* content/global/buildconfig.html
content/global/buildconfig.css
content/global/contentAreaUtils.js
content/global/datepicker.xhtml

View File

@ -54,29 +54,4 @@ rec {
versionSuffix = "esr";
};
};
firefox-esr-78 = common rec {
pname = "firefox-esr";
version = "78.15.0esr";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "ac3de735b246ce4f0e1619cd2664321ffa374240ce6843e785d79a350dc30c967996bbcc5e3b301cb3d822ca981cbea116758fc4122f1738d75ddfd1165b6378";
};
meta = {
description = "A web browser built from Firefox Extended Support Release source tree";
homepage = "http://www.mozilla.com/en-US/firefox/";
maintainers = with lib.maintainers; [ eelco hexa ];
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.darwin;
broken = stdenv.buildPlatform.is32bit; # since Firefox 60, build on 32-bit platforms fails with "out of memory".
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
license = lib.licenses.mpl20;
};
tests = [ nixosTests.firefox-esr-78 ];
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-78-unwrapped";
versionSuffix = "esr";
};
};
}

View File

@ -25011,15 +25011,13 @@ with pkgs;
});
firefox-unwrapped = firefoxPackages.firefox;
firefox-esr-78-unwrapped = firefoxPackages.firefox-esr-78;
firefox-esr-91-unwrapped = firefoxPackages.firefox-esr-91;
firefox = wrapFirefox firefox-unwrapped { };
firefox-wayland = wrapFirefox firefox-unwrapped { forceWayland = true; };
firefox-esr-78 = wrapFirefox firefox-esr-78-unwrapped { };
firefox-esr-91 = wrapFirefox firefox-esr-91-unwrapped { };
firefox-esr = firefox-esr-78;
firefox-esr-unwrapped = firefoxPackages.firefox-esr-78;
firefox-esr = firefox-esr-91;
firefox-esr-unwrapped = firefoxPackages.firefox-esr-91;
firefox-esr-wayland = wrapFirefox firefox-esr-91-unwrapped { forceWayland = true; };
firefox-bin-unwrapped = callPackage ../applications/networking/browsers/firefox-bin {