From 4ecb6db04ce862ec1b8a88db5daef0eda7c7a05d Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 14 Sep 2018 11:39:42 -0400 Subject: bring in chinforpms/waterfox --- waterfox/.gitignore | 3 + ...61---fix-mozillaSignalTrampoline-to-work-.patch | 19 + waterfox/bug1375074-save-restore-x28.patch | 74 ++ waterfox/build-cacheFlush-missing.patch | 13 + waterfox/build-icu-big-endian.patch | 12 + waterfox/build-jit-atomic-always-lucky.patch | 30 + waterfox/build-missing-xlocale-h.patch | 12 + waterfox/build-ppc-jit.patch | 51 ++ waterfox/build-ppc64-s390x-curl.patch | 13 + waterfox/build-rust-ppc64le.patch | 25 + waterfox/distribution.ini | 9 + waterfox/fedora-build.patch | 23 + waterfox/firefox-build-prbool.patch | 44 + waterfox/firefox-enable-addons.patch | 13 + waterfox/firefox-fedora-ua.patch | 21 + waterfox/firefox-install-dir.patch | 12 + waterfox/issue2947383002_1.diff | 60 ++ waterfox/mozilla-1005640-accept-lang.patch | 30 + waterfox/mozilla-1170092.patch | 96 ++ waterfox/mozilla-1196777.patch | 28 + waterfox/mozilla-1335250.patch | 30 + waterfox/mozilla-1353817.patch | 27 + waterfox/mozilla-1435695.patch | 28 + waterfox/mozilla-1436242.patch | 56 ++ waterfox/mozilla-256180.patch | 11 + waterfox/mozilla-440908.patch | 111 +++ waterfox/mozilla-build-arm.patch | 14 + waterfox/rhbz-1173156.patch | 12 + waterfox/rhbz-1219542-s390-build.patch | 23 + waterfox/rhbz-1354671.patch | 12 + waterfox/rhbz-1497932.patch | 21 + waterfox/waterfox-FreeBSD-patches-snapshot.sh | 33 + waterfox/waterfox-chinfo-default-prefs.js | 29 + waterfox/waterfox-cubeb-build.patch | 8 + waterfox/waterfox-mozconfig | 43 + waterfox/waterfox-nolangpacks.patch | 112 +++ waterfox/waterfox-waterfoxdir.patch | 12 + waterfox/waterfox.1 | 138 +++ waterfox/waterfox.desktop | 272 ++++++ waterfox/waterfox.sh.in | 248 ++++++ waterfox/waterfox.spec | 982 +++++++++++++++++++++ waterfox/wf-pull-547.patch | 168 ++++ waterfox/xulrunner-24.0-jemalloc-ppc.patch | 12 + 43 files changed, 2990 insertions(+) create mode 100644 waterfox/.gitignore create mode 100644 waterfox/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch create mode 100644 waterfox/bug1375074-save-restore-x28.patch create mode 100644 waterfox/build-cacheFlush-missing.patch create mode 100644 waterfox/build-icu-big-endian.patch create mode 100644 waterfox/build-jit-atomic-always-lucky.patch create mode 100644 waterfox/build-missing-xlocale-h.patch create mode 100644 waterfox/build-ppc-jit.patch create mode 100644 waterfox/build-ppc64-s390x-curl.patch create mode 100644 waterfox/build-rust-ppc64le.patch create mode 100644 waterfox/distribution.ini create mode 100644 waterfox/fedora-build.patch create mode 100644 waterfox/firefox-build-prbool.patch create mode 100644 waterfox/firefox-enable-addons.patch create mode 100644 waterfox/firefox-fedora-ua.patch create mode 100644 waterfox/firefox-install-dir.patch create mode 100644 waterfox/issue2947383002_1.diff create mode 100644 waterfox/mozilla-1005640-accept-lang.patch create mode 100644 waterfox/mozilla-1170092.patch create mode 100644 waterfox/mozilla-1196777.patch create mode 100644 waterfox/mozilla-1335250.patch create mode 100644 waterfox/mozilla-1353817.patch create mode 100644 waterfox/mozilla-1435695.patch create mode 100644 waterfox/mozilla-1436242.patch create mode 100644 waterfox/mozilla-256180.patch create mode 100644 waterfox/mozilla-440908.patch create mode 100644 waterfox/mozilla-build-arm.patch create mode 100644 waterfox/rhbz-1173156.patch create mode 100644 waterfox/rhbz-1219542-s390-build.patch create mode 100644 waterfox/rhbz-1354671.patch create mode 100644 waterfox/rhbz-1497932.patch create mode 100755 waterfox/waterfox-FreeBSD-patches-snapshot.sh create mode 100644 waterfox/waterfox-chinfo-default-prefs.js create mode 100644 waterfox/waterfox-cubeb-build.patch create mode 100644 waterfox/waterfox-mozconfig create mode 100644 waterfox/waterfox-nolangpacks.patch create mode 100644 waterfox/waterfox-waterfoxdir.patch create mode 100644 waterfox/waterfox.1 create mode 100644 waterfox/waterfox.desktop create mode 100644 waterfox/waterfox.sh.in create mode 100644 waterfox/waterfox.spec create mode 100644 waterfox/wf-pull-547.patch create mode 100644 waterfox/xulrunner-24.0-jemalloc-ppc.patch (limited to 'waterfox') diff --git a/waterfox/.gitignore b/waterfox/.gitignore new file mode 100644 index 0000000..44c08e1 --- /dev/null +++ b/waterfox/.gitignore @@ -0,0 +1,3 @@ +/FreeBSD-*.patch +/wf-*.patch +!/wf-pull-547.patch diff --git a/waterfox/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch b/waterfox/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch new file mode 100644 index 0000000..70e45ff --- /dev/null +++ b/waterfox/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch @@ -0,0 +1,19 @@ +diff -up firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 firefox-60.0/mfbt/LinuxSignal.h +--- firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 2018-04-27 08:55:38.848241768 +0200 ++++ firefox-60.0/mfbt/LinuxSignal.h 2018-04-27 09:06:47.946769859 +0200 +@@ -25,10 +25,13 @@ SignalTrampoline(int aSignal, siginfo_t* + "nop; nop; nop; nop" + : : : "memory"); + ++ // Because the assembler may generate additional insturctions below, we ++ // need to ensure NOPs are inserted first by separating them out above. ++ + asm volatile ( +- "b %0" ++ "bx %0" + : +- : "X"(H) ++ : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) + : "memory"); + } + diff --git a/waterfox/bug1375074-save-restore-x28.patch b/waterfox/bug1375074-save-restore-x28.patch new file mode 100644 index 0000000..57a83a2 --- /dev/null +++ b/waterfox/bug1375074-save-restore-x28.patch @@ -0,0 +1,74 @@ +# HG changeset patch +# User Lars T Hansen +# Date 1519822672 -3600 +# Wed Feb 28 13:57:52 2018 +0100 +# Node ID 672f0415217b202ae59a930769dffd9d6ba6b87c +# Parent 825fd04dacc6297d3a980ec4184079405950b35d +Bug 1375074 - Save and restore non-volatile x28 on ARM64 for generated unboxed object constructor. + +diff --git a/js/src/jit-test/tests/bug1375074.js b/js/src/jit-test/tests/bug1375074.js +new file mode 100644 +--- /dev/null ++++ b/js/src/jit-test/tests/bug1375074.js +@@ -0,0 +1,18 @@ ++// This forces the VM to start creating unboxed objects and thus stresses a ++// particular path into generated code for a specialized unboxed object ++// constructor. ++ ++var K = 2000; // 2000 should be plenty ++var s = "["; ++var i; ++for ( i=0; i < K-1; i++ ) ++ s = s + `{"i":${i}},`; ++s += `{"i":${i}}]`; ++var v = JSON.parse(s); ++ ++assertEq(v.length == K, true); ++ ++for ( i=0; i < K; i++) { ++ assertEq(v[i] instanceof Object, true); ++ assertEq(v[i].i, i); ++} +diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp +--- a/js/src/vm/UnboxedObject.cpp ++++ b/js/src/vm/UnboxedObject.cpp +@@ -95,7 +95,15 @@ UnboxedLayout::makeConstructorCode(JSCon + #endif + + #ifdef JS_CODEGEN_ARM64 +- // ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing. ++ // ARM64 communicates stack address via sp, but uses a pseudo-sp (PSP) for ++ // addressing. The register we use for PSP may however also be used by ++ // calling code, and it is nonvolatile, so save it. Do this as a special ++ // case first because the generic save/restore code needs the PSP to be ++ // initialized already. ++ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64())); ++ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex)); ++ ++ // Initialize the PSP from the SP. + masm.initStackPtr(); + #endif + +@@ -233,7 +241,22 @@ UnboxedLayout::makeConstructorCode(JSCon + masm.pop(ScratchDoubleReg); + masm.PopRegsInMask(savedNonVolatileRegisters); + ++#ifdef JS_CODEGEN_ARM64 ++ // Now restore the value that was in the PSP register on entry, and return. ++ ++ // Obtain the correct SP from the PSP. ++ masm.Mov(sp, PseudoStackPointer64); ++ ++ // Restore the saved value of the PSP register, this value is whatever the ++ // caller had saved in it, not any actual SP value, and it must not be ++ // overwritten subsequently. ++ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex)); ++ ++ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong. ++ masm.Ret(vixl::lr); ++#else + masm.abiret(); ++#endif + + masm.bind(&failureStoreOther); + diff --git a/waterfox/build-cacheFlush-missing.patch b/waterfox/build-cacheFlush-missing.patch new file mode 100644 index 0000000..51c368c --- /dev/null +++ b/waterfox/build-cacheFlush-missing.patch @@ -0,0 +1,13 @@ +diff -up firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm firefox-55.0.3/js/src/jit/ExecutableAllocator.h +--- firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm 2017-09-05 11:32:12.235909468 +0200 ++++ firefox-55.0.3/js/src/jit/ExecutableAllocator.h 2017-09-05 11:32:46.157916575 +0200 +@@ -219,7 +219,7 @@ class ExecutableAllocator + + static void poisonCode(JSRuntime* rt, JitPoisonRangeVector& ranges); + +-#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) ++#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) || defined(JS_CODEGEN_NONE) + static void cacheFlush(void*, size_t) + { + } +diff -up firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d diff --git a/waterfox/build-icu-big-endian.patch b/waterfox/build-icu-big-endian.patch new file mode 100644 index 0000000..68fbea1 --- /dev/null +++ b/waterfox/build-icu-big-endian.patch @@ -0,0 +1,12 @@ +diff -up mozilla-aurora/build/autoconf/icu.m4.icu-endian mozilla-aurora/build/autoconf/icu.m4 +--- mozilla-aurora/build/autoconf/icu.m4.icu-endian 2016-12-09 09:11:01.227317790 +0100 ++++ mozilla-aurora/build/autoconf/icu.m4 2016-12-09 09:18:40.608712247 +0100 +@@ -78,7 +78,7 @@ if test -n "$USE_ICU"; then + # TODO: the l is actually endian-dependent + # We could make this set as 'l' or 'b' for little or big, respectively, + # but we'd need to check in a big-endian version of the file. +- ICU_DATA_FILE="icudt${version}l.dat" ++ ICU_DATA_FILE="icudt${version}b.dat" + + dnl We won't build ICU data as a separate file when building + dnl JS standalone so that embedders don't have to deal with it. diff --git a/waterfox/build-jit-atomic-always-lucky.patch b/waterfox/build-jit-atomic-always-lucky.patch new file mode 100644 index 0000000..d6812b6 --- /dev/null +++ b/waterfox/build-jit-atomic-always-lucky.patch @@ -0,0 +1,30 @@ +diff -up firefox-55.0.2/js/src/jit/AtomicOperations.h.jit-atomic-lucky firefox-55.0.2/js/src/jit/AtomicOperations.h +--- firefox-55.0.2/js/src/jit/AtomicOperations.h.jit-atomic-lucky 2017-07-31 18:20:47.000000000 +0200 ++++ firefox-55.0.2/js/src/jit/AtomicOperations.h 2017-08-29 12:59:52.870926044 +0200 +@@ -348,7 +348,7 @@ AtomicOperations::isLockfree(int32_t siz + # elif defined(__sh__) + # include "jit/none/AtomicOperations-feeling-lucky.h" + # else +-# include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always ++# include "jit/none/AtomicOperations-feeling-lucky.h" + # endif + #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) + # include "jit/x86-shared/AtomicOperations-x86-shared.h" +diff -up firefox-55.0.2/js/src/jit/none/AtomicOperations-feeling-lucky.h.jit-atomic-lucky firefox-55.0.2/js/src/jit/none/AtomicOperations-feeling-lucky.h +--- firefox-55.0.2/js/src/jit/none/AtomicOperations-feeling-lucky.h.jit-atomic-lucky 2017-08-29 14:10:52.665031524 +0200 ++++ firefox-55.0.2/js/src/jit/none/AtomicOperations-feeling-lucky.h 2017-08-29 14:09:40.756060235 +0200 +@@ -60,6 +60,14 @@ + # define GNUC_COMPATIBLE + #endif + ++#ifdef __s390__ ++# define GNUC_COMPATIBLE ++#endif ++ ++#ifdef __s390x__ ++# define GNUC_COMPATIBLE ++#endif ++ + // The default implementation tactic for gcc/clang is to use the newer + // __atomic intrinsics added for use in C++11 . Where that + // isn't available, we use GCC's older __sync functions instead. diff --git a/waterfox/build-missing-xlocale-h.patch b/waterfox/build-missing-xlocale-h.patch new file mode 100644 index 0000000..b4a62b2 --- /dev/null +++ b/waterfox/build-missing-xlocale-h.patch @@ -0,0 +1,12 @@ +diff -up thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp.xlocale thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp +--- thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp.xlocale 2017-08-24 14:42:48.634084293 +0200 ++++ thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp 2017-08-24 14:42:50.534084676 +0200 +@@ -64,7 +64,7 @@ + # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN + # include + # else +-# include ++# include + # endif + #endif + diff --git a/waterfox/build-ppc-jit.patch b/waterfox/build-ppc-jit.patch new file mode 100644 index 0000000..a9dc6d1 --- /dev/null +++ b/waterfox/build-ppc-jit.patch @@ -0,0 +1,51 @@ +diff -up firefox-55.0/js/src/jit/MIR.h.old firefox-55.0/js/src/jit/MIR.h +--- firefox-55.0/js/src/jit/MIR.h.old 2017-08-08 14:04:44.528460099 +0200 ++++ firefox-55.0/js/src/jit/MIR.h 2017-08-08 14:05:11.045364831 +0200 +@@ -12434,7 +12434,7 @@ class MNearbyInt + TRIVIAL_NEW_WRAPPERS + + static bool HasAssemblerSupport(RoundingMode mode) { +- return Assembler::HasRoundInstruction(mode); ++ return false; + } + + RoundingMode roundingMode() const { return roundingMode_; } +diff -up firefox-55.0/js/src/jit/ExecutableAllocator.h.old firefox-55.0/js/src/jit/ExecutableAllocator.h +--- firefox-55.0/js/src/jit/ExecutableAllocator.h.old 2017-08-09 09:24:18.784983505 +0200 ++++ firefox-55.0/js/src/jit/ExecutableAllocator.h 2017-08-09 09:28:01.471100075 +0200 +@@ -307,6 +307,10 @@ class ExecutableAllocator + { + sync_instruction_memory((caddr_t)code, size); + } ++#else ++ static void cacheFlush(void*, size_t) ++ { ++ } + #endif + + private: +diff -up firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old firefox-55.0/js/src/wasm/WasmBuiltins.cpp +--- firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old 2017-08-09 12:50:46.877450765 +0200 ++++ firefox-55.0/js/src/wasm/WasmBuiltins.cpp 2017-08-09 12:50:59.725406974 +0200 +@@ -881,7 +881,6 @@ wasm::EnsureBuiltinThunksInitialized() + MOZ_ASSERT(!masm.numSymbolicAccesses()); + #endif + +- ExecutableAllocator::cacheFlush(thunks->codeBase, thunks->codeSize); + if (!ExecutableAllocator::makeExecutable(thunks->codeBase, thunks->codeSize)) + return false; + +diff -up firefox-55.0/js/src/wasm/WasmCode.cpp.old firefox-55.0/js/src/wasm/WasmCode.cpp +--- firefox-55.0/js/src/wasm/WasmCode.cpp.old 2017-08-09 12:50:37.205483731 +0200 ++++ firefox-55.0/js/src/wasm/WasmCode.cpp 2017-08-09 12:51:10.365370708 +0200 +@@ -287,8 +287,6 @@ CodeSegment::initialize(Tier tier, + if (!StaticallyLink(*this, linkData)) + return false; + +- ExecutableAllocator::cacheFlush(bytes_.get(), RoundupCodeLength(codeLength)); +- + // Reprotect the whole region to avoid having separate RW and RX mappings. + if (!ExecutableAllocator::makeExecutable(bytes_.get(), RoundupCodeLength(codeLength))) + return false; +diff -up firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium +diff -up firefox-55.0/media/webrtc/trunk/Makefile.old firefox-55.0/media/webrtc/trunk/Makefile diff --git a/waterfox/build-ppc64-s390x-curl.patch b/waterfox/build-ppc64-s390x-curl.patch new file mode 100644 index 0000000..6c303f3 --- /dev/null +++ b/waterfox/build-ppc64-s390x-curl.patch @@ -0,0 +1,13 @@ +diff -up firefox-54.0/toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h.ppc-curl firefox-54.0/toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h +--- firefox-54.0/toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h.ppc-curl 2017-06-09 23:31:15.186207877 +0200 ++++ firefox-54.0/toolkit/crashreporter/google-breakpad/src/third_party/curl/curlbuild.h 2017-06-10 00:21:26.731117206 +0200 +@@ -155,7 +155,8 @@ + + /* The size of `long', as computed by sizeof. */ + #if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ +- defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) ++ defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) || \ ++ defined(__PPC64__) || defined(__pcc64le__) || defined(__S390X__) || defined(__s390x__) + #define CURL_SIZEOF_LONG 8 + #else + #define CURL_SIZEOF_LONG 4 diff --git a/waterfox/build-rust-ppc64le.patch b/waterfox/build-rust-ppc64le.patch new file mode 100644 index 0000000..2474c35 --- /dev/null +++ b/waterfox/build-rust-ppc64le.patch @@ -0,0 +1,25 @@ +diff -up firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le firefox-55.0/build/moz.configure/rust.configure +--- firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le 2017-07-31 18:20:49.000000000 +0200 ++++ firefox-55.0/build/moz.configure/rust.configure 2017-08-02 10:19:03.254220003 +0200 +@@ -151,6 +151,9 @@ def rust_triple_alias(host_or_target): + ('sparc64', 'Linux'): 'sparc64-unknown-linux-gnu', + ('x86', 'Linux'): 'i686-unknown-linux-gnu', + ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', ++ ('ppc64le', 'Linux'): 'powerpc64le-unknown-linux-gnu', ++ ('ppc64', 'Linux'): 'powerpc64-unknown-linux-gnu', ++ ('s390x', 'Linux'): 's390x-unknown-linux-gnu', + # OS X + ('x86', 'OSX'): 'i686-apple-darwin', + ('x86_64', 'OSX'): 'x86_64-apple-darwin', +@@ -174,8 +177,10 @@ def rust_triple_alias(host_or_target): + ('sparc64', 'SunOS'): 'sparcv9-sun-solaris', + }.get((host_or_target.cpu, os_or_kernel), None) + ++ if (rustc_target == 'powerpc64-unknown-linux-gnu' and host_or_target.endianness == 'little'): ++ rustc_target = 'powerpc64le-unknown-linux-gnu' + if rustc_target is None: +- die("Don't know how to translate {} for rustc".format(host_or_target.alias)) ++ die("Don't know how to translate {} for rustc, cpu: {}, os: {}".format(target.alias, target.cpu, os_or_kernel)) + + # Check to see whether our rustc has a reasonably functional stdlib + # for our chosen target. diff --git a/waterfox/distribution.ini b/waterfox/distribution.ini new file mode 100644 index 0000000..6f41252 --- /dev/null +++ b/waterfox/distribution.ini @@ -0,0 +1,9 @@ +[Global] +id=stackrpms +version=1.0 +about=Waterfox for Fedora + +[Preferences] +app.distributor=stackrpms +app.distributor.channel=stackrpms +app.partner.fedora=stackrpms diff --git a/waterfox/fedora-build.patch b/waterfox/fedora-build.patch new file mode 100644 index 0000000..74127ec --- /dev/null +++ b/waterfox/fedora-build.patch @@ -0,0 +1,23 @@ +diff -up firefox-54.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-54.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium +diff -up firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp.old firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp +--- firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp.old 2017-06-08 14:59:08.786996664 +0200 ++++ firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp 2017-06-08 14:59:22.642946570 +0200 +@@ -211,7 +211,6 @@ + '-Wno-parentheses', + '-Wno-strict-prototypes', + '-Wmissing-prototypes', +- '-Wno-format', + ], + 'defines' : [ + 'LINUX', +diff -up firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp.build firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp +--- firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp.build 2017-06-08 15:08:03.627063097 +0200 ++++ firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp 2017-06-08 15:08:15.657019606 +0200 +@@ -206,7 +206,6 @@ + '-Wno-parentheses', + '-Wno-strict-prototypes', + '-Wmissing-prototypes', +- '-Wno-format', + ], + 'defines' : [ + 'LINUX', diff --git a/waterfox/firefox-build-prbool.patch b/waterfox/firefox-build-prbool.patch new file mode 100644 index 0000000..17725af --- /dev/null +++ b/waterfox/firefox-build-prbool.patch @@ -0,0 +1,44 @@ +diff -up firefox-53.0/dom/u2f/U2F.cpp.prbool firefox-53.0/dom/u2f/U2F.cpp +--- firefox-53.0/dom/u2f/U2F.cpp.prbool 2017-04-11 06:15:14.000000000 +0200 ++++ firefox-53.0/dom/u2f/U2F.cpp 2017-04-18 09:19:20.524285200 +0200 +@@ -4,6 +4,7 @@ + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/dom/CallbackFunction.h" + #include "mozilla/dom/ContentChild.h" +diff -up firefox-53.0/security/certverifier/CTLogVerifier.cpp.prbool firefox-53.0/security/certverifier/CTLogVerifier.cpp +--- firefox-53.0/security/certverifier/CTLogVerifier.cpp.prbool 2017-04-18 09:19:20.524285200 +0200 ++++ firefox-53.0/security/certverifier/CTLogVerifier.cpp 2017-04-18 09:52:34.189402811 +0200 +@@ -9,6 +9,7 @@ + #include + + #include "CTSerialization.h" ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/ArrayUtils.h" + #include "mozilla/Assertions.h" +diff -up firefox-53.0/security/certverifier/CTObjectsExtractor.cpp.prbool firefox-53.0/security/certverifier/CTObjectsExtractor.cpp +--- firefox-53.0/security/certverifier/CTObjectsExtractor.cpp.prbool 2017-01-16 17:16:51.000000000 +0100 ++++ firefox-53.0/security/certverifier/CTObjectsExtractor.cpp 2017-04-18 09:19:20.525285196 +0200 +@@ -6,6 +6,7 @@ + + #include "CTObjectsExtractor.h" + ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/Assertions.h" + #include "mozilla/Casting.h" +diff -up firefox-53.0/security/certverifier/OCSPCache.h.prbool firefox-53.0/security/certverifier/OCSPCache.h +--- firefox-53.0/security/certverifier/OCSPCache.h.prbool 2017-04-11 06:15:19.000000000 +0200 ++++ firefox-53.0/security/certverifier/OCSPCache.h 2017-04-18 09:19:20.525285196 +0200 +@@ -25,6 +25,7 @@ + #ifndef mozilla_psm_OCSPCache_h + #define mozilla_psm_OCSPCache_h + ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/Mutex.h" + #include "mozilla/Vector.h" diff --git a/waterfox/firefox-enable-addons.patch b/waterfox/firefox-enable-addons.patch new file mode 100644 index 0000000..15d0707 --- /dev/null +++ b/waterfox/firefox-enable-addons.patch @@ -0,0 +1,13 @@ +diff -up firefox-55.0/browser/app/profile/firefox.js.addons firefox-55.0/browser/app/profile/firefox.js +--- firefox-55.0/browser/app/profile/firefox.js.addons 2017-08-02 10:58:30.566363833 +0200 ++++ firefox-55.0/browser/app/profile/firefox.js 2017-08-02 10:59:15.377216959 +0200 +@@ -65,7 +65,8 @@ pref("extensions.systemAddon.update.url" + + // Disable add-ons that are not installed by the user in all scopes by default. + // See the SCOPE constants in AddonManager.jsm for values to use here. +-pref("extensions.autoDisableScopes", 15); ++pref("extensions.autoDisableScopes", 0); ++pref("extensions.showMismatchUI", false); + // Scopes to scan for changes at startup. + pref("extensions.startupScanScopes", 0); + diff --git a/waterfox/firefox-fedora-ua.patch b/waterfox/firefox-fedora-ua.patch new file mode 100644 index 0000000..a5b7866 --- /dev/null +++ b/waterfox/firefox-fedora-ua.patch @@ -0,0 +1,21 @@ +diff -up firefox-35.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-35.0.1/mozilla-release/media/webrtc/trunk/Makefile +diff -up firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp.old firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp +--- firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp.old 2015-01-23 07:00:06.000000000 +0100 ++++ firefox-35.0.1/mozilla-release/netwerk/protocol/http/nsHttpHandler.cpp 2015-02-09 16:40:42.983220596 +0100 +@@ -607,7 +607,7 @@ nsHttpHandler::BuildUserAgent() + mUserAgent.SetCapacity(mLegacyAppName.Length() + + mLegacyAppVersion.Length() + + #ifndef UA_SPARE_PLATFORM +- mPlatform.Length() + ++ mPlatform.Length() + 8 + + #endif + mOscpu.Length() + + mMisc.Length() + +@@ -631,6 +631,7 @@ nsHttpHandler::BuildUserAgent() + if (!mPlatform.IsEmpty()) { + mUserAgent += mPlatform; + mUserAgent.AppendLiteral("; "); ++ mUserAgent.AppendLiteral("Fedora; "); + } + #endif + if (!mCompatDevice.IsEmpty()) { diff --git a/waterfox/firefox-install-dir.patch b/waterfox/firefox-install-dir.patch new file mode 100644 index 0000000..646e0c9 --- /dev/null +++ b/waterfox/firefox-install-dir.patch @@ -0,0 +1,12 @@ +diff -up firefox-45.0/firefox-45.0/config/baseconfig.mk.orig firefox-45.0/firefox-45.0/config/baseconfig.mk +--- firefox-45.0/config/baseconfig.mk.orig 2016-03-02 13:26:31.981927073 +0100 ++++ firefox-45.0/config/baseconfig.mk 2016-03-02 13:30:09.044756473 +0100 +@@ -4,7 +4,7 @@ + # whether a normal build is happening or whether the check is running. + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + ifeq (.,$(DEPTH)) + DIST = dist diff --git a/waterfox/issue2947383002_1.diff b/waterfox/issue2947383002_1.diff new file mode 100644 index 0000000..c41a964 --- /dev/null +++ b/waterfox/issue2947383002_1.diff @@ -0,0 +1,60 @@ +Index: webrtc/common_audio/vad/vad_core.c +diff --git a/webrtc/common_audio/vad/vad_core.c b/webrtc/common_audio/vad/vad_core.c +index 0340165eb5050ec9fbc386f6d373d0d90a4868f1..1a3889c36787f7bf993692e8fe7781c2ae35e2c2 100644 +--- a/webrtc/common_audio/vad/vad_core.c ++++ b/webrtc/common_audio/vad/vad_core.c +@@ -115,8 +115,8 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset, + // undefined behavior, so not a good idea; this just makes UBSan ignore the + // violation, so that our old code can continue to do what it's always been + // doing.) +-static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) { + return a * b; + } + +Index: webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c +diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c +index 039bbc8af7ec26e286dfc94b4383428e5e6e863b..dc8bcf3f481012caab8718430aa9242cf91ad480 100644 +--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c ++++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c +@@ -193,16 +193,16 @@ static void CalcCorrelation(int32_t *PSpecQ12, int32_t *CorrQ7) + // undefined behavior, so not a good idea; this just makes UBSan ignore the + // violations, so that our old code can continue to do what it's always been + // doing.) +-static inline int32_t OverflowingMulS16S32ToS32(int16_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingMulS16S32ToS32(int16_t a, int32_t b) { + return a * b; + } +-static inline int32_t OverflowingAddS32S32ToS32(int32_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingAddS32S32ToS32(int32_t a, int32_t b) { + return a + b; + } +-static inline int32_t OverflowingSubS32S32ToS32(int32_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingSubS32S32ToS32(int32_t a, int32_t b) { + return a - b; + } + +Index: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +index 2b92acb64a3d7dd268574abb57a24850b60cb3d1..b69a885f34de9eaa762a69f11d84cc8bec637376 100644 +--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c ++++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +@@ -209,8 +209,8 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef, + // Left shift of an int32_t that's allowed to overflow. (It's still undefined + // behavior, so not a good idea; this just makes UBSan ignore the violation, so + // that our old code can continue to do what it's always been doing.) +-static inline int32_t OverflowingLShiftS32(int32_t x, int shift) +- RTC_NO_SANITIZE("shift") { ++static inline int32_t RTC_NO_SANITIZE("shift") ++ OverflowingLShiftS32(int32_t x, int shift) { + return x << shift; + } + diff --git a/waterfox/mozilla-1005640-accept-lang.patch b/waterfox/mozilla-1005640-accept-lang.patch new file mode 100644 index 0000000..29d3833 --- /dev/null +++ b/waterfox/mozilla-1005640-accept-lang.patch @@ -0,0 +1,30 @@ +diff -up firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm +--- firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm.1005640-accept-lang 2017-01-16 17:16:52.000000000 +0100 ++++ firefox-51.0/toolkit/mozapps/extensions/internal/XPIProvider.jsm 2017-01-18 12:35:29.380394216 +0100 +@@ -2852,6 +2852,11 @@ this.XPIProvider = { + this.addAddonsToCrashReporter(); + } + ++ // Save locale settings to compare it later to check whenever some addon ++ // changed it. ++ var previousLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] ++ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); ++ + try { + AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin"); + +@@ -2880,6 +2885,14 @@ this.XPIProvider = { + AddonManagerPrivate.recordException("XPI-BOOTSTRAP", "startup failed", e); + } + ++ var currentLocale = Cc["@mozilla.org/chrome/chrome-registry;1"] ++ .getService(Ci.nsIXULChromeRegistry).getSelectedLocale("global"); ++ if (currentLocale != previousLocale) { ++ // We have to flush string cache if the locale was changed during loading ++ // of addons ++ Services.obs.notifyObservers(null, "chrome-flush-caches", null); ++ } ++ + // Let these shutdown a little earlier when they still have access to most + // of XPCOM + Services.obs.addObserver({ diff --git a/waterfox/mozilla-1170092.patch b/waterfox/mozilla-1170092.patch new file mode 100644 index 0000000..761fb9e --- /dev/null +++ b/waterfox/mozilla-1170092.patch @@ -0,0 +1,96 @@ +diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp +--- firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2017-09-25 10:28:35.413675532 +0200 ++++ firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2017-09-25 10:31:06.394196960 +0200 +@@ -243,9 +243,20 @@ nsresult nsReadConfig::openAndEvaluateJS + return rv; + + rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); +- if (NS_FAILED(rv)) +- return rv; ++ if (NS_FAILED(rv)) { ++ // Look for cfg file in /etc//pref ++ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, ++ getter_AddRefs(jsFile)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ ++ rv = jsFile->AppendNative(NS_LITERAL_CSTRING("pref")); ++ NS_ENSURE_SUCCESS(rv, rv); ++ rv = jsFile->AppendNative(nsDependentCString(aFileName)); ++ NS_ENSURE_SUCCESS(rv, rv); + ++ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); ++ NS_ENSURE_SUCCESS(rv, rv); ++ } + } else { + nsAutoCString location("resource://gre/defaults/autoconfig/"); + location += aFileName; +diff -up firefox-56.0/modules/libpref/Preferences.cpp.1170092 firefox-56.0/modules/libpref/Preferences.cpp +--- firefox-56.0/modules/libpref/Preferences.cpp.1170092 2017-09-14 22:15:52.000000000 +0200 ++++ firefox-56.0/modules/libpref/Preferences.cpp 2017-09-25 10:28:35.413675532 +0200 +@@ -1514,6 +1514,8 @@ pref_InitInitialObjects() + // - jar:$gre/omni.jar!/defaults/preferences/*.js + // Thus, in omni.jar case, we always load app-specific default preferences + // from omni.jar, whether or not $app == $gre. ++ // At very end load configuration from system config location: ++ // - /etc/firefox/pref/*.js + + nsZipFind *findPtr; + nsAutoPtr find; +diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/toolkit/xre/nsXREDirProvider.cpp +--- firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2017-09-14 22:16:02.000000000 +0200 ++++ firefox-56.0/toolkit/xre/nsXREDirProvider.cpp 2017-09-25 10:28:35.414675529 +0200 +@@ -58,6 +58,7 @@ + #endif + #ifdef XP_UNIX + #include ++#include "nsIXULAppInfo.h" + #endif + #ifdef XP_IOS + #include "UIKitDirProvider.h" +@@ -570,6 +571,20 @@ nsXREDirProvider::GetFile(const char* aP + } + } + } ++#if defined(XP_UNIX) ++ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { ++ nsCString sysConfigDir = NS_LITERAL_CSTRING("/etc/"); ++ nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); ++ if (!appInfo) ++ return NS_ERROR_NOT_AVAILABLE; ++ nsCString appName; ++ appInfo->GetName(appName); ++ ToLowerCase(appName); ++ sysConfigDir.Append(appName); ++ return NS_NewNativeLocalFile(sysConfigDir, false, aFile); ++ } ++#endif ++ + if (NS_FAILED(rv) || !file) + return NS_ERROR_FAILURE; + +@@ -935,6 +950,14 @@ nsXREDirProvider::GetFilesInternal(const + LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); + LoadDirsIntoArray(mAppBundleDirectories, + kAppendPrefDir, directories); ++ // Add /etc//pref/ directory if it exists ++ nsCOMPtr systemPrefDir; ++ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, getter_AddRefs(systemPrefDir)); ++ if (NS_SUCCEEDED(rv)) { ++ rv = systemPrefDir->AppendNative(NS_LITERAL_CSTRING("pref")); ++ if (NS_SUCCEEDED(rv)) ++ directories.AppendObject(systemPrefDir); ++ } + + rv = NS_NewArrayEnumerator(aResult, directories); + } +diff -up firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h +--- firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2017-09-14 22:16:02.000000000 +0200 ++++ firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h 2017-09-25 10:28:35.414675529 +0200 +@@ -62,6 +62,7 @@ + #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" + #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL" + #define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults ++#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration + + #define NS_APP_USER_PROFILE_50_DIR "ProfD" + #define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" diff --git a/waterfox/mozilla-1196777.patch b/waterfox/mozilla-1196777.patch new file mode 100644 index 0000000..ba5e4b7 --- /dev/null +++ b/waterfox/mozilla-1196777.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Martin Stransky +# Parent 4e3ad95d689a5beabf3c1f41d958794fe00e3767 +Bug 1196777 - Ask GDK to receive focus events, r=?karlt + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -142,17 +142,18 @@ const gint kEvents = GDK_EXPOSURE_MASK | + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + #if GTK_CHECK_VERSION(3,4,0) + GDK_SMOOTH_SCROLL_MASK | + GDK_TOUCH_MASK | + #endif + GDK_SCROLL_MASK | + GDK_POINTER_MOTION_MASK | +- GDK_PROPERTY_CHANGE_MASK; ++ GDK_PROPERTY_CHANGE_MASK | ++ GDK_FOCUS_CHANGE_MASK; + + /* utility functions */ + static bool is_mouse_in_window(GdkWindow* aWindow, + gdouble aMouseX, gdouble aMouseY); + static nsWindow *get_window_for_gtk_widget(GtkWidget *widget); + static nsWindow *get_window_for_gdk_window(GdkWindow *window); + static GtkWidget *get_gtk_widget_for_gdk_window(GdkWindow *window); + static GdkCursor *get_gtk_cursor(nsCursor aCursor); diff --git a/waterfox/mozilla-1335250.patch b/waterfox/mozilla-1335250.patch new file mode 100644 index 0000000..8f7436c --- /dev/null +++ b/waterfox/mozilla-1335250.patch @@ -0,0 +1,30 @@ +diff -up firefox-53.0/dom/media/webrtc/MediaEngine.h.1335250 firefox-53.0/dom/media/webrtc/MediaEngine.h +--- firefox-53.0/dom/media/webrtc/MediaEngine.h.1335250 2017-04-11 06:15:22.000000000 +0200 ++++ firefox-53.0/dom/media/webrtc/MediaEngine.h 2017-04-19 20:35:55.264741939 +0200 +@@ -226,7 +226,7 @@ public: + ~AllocationHandle() {} + public: + AllocationHandle(const dom::MediaTrackConstraints& aConstraints, +- const ipc::PrincipalInfo& aPrincipalInfo, ++ const mozilla::ipc::PrincipalInfo& aPrincipalInfo, + const MediaEnginePrefs& aPrefs, + const nsString& aDeviceId) + +@@ -236,7 +236,7 @@ public: + mDeviceId(aDeviceId) {} + public: + NormalizedConstraints mConstraints; +- ipc::PrincipalInfo mPrincipalInfo; ++ mozilla::ipc::PrincipalInfo mPrincipalInfo; + MediaEnginePrefs mPrefs; + nsString mDeviceId; + }; +@@ -327,7 +327,7 @@ public: + virtual nsresult Allocate(const dom::MediaTrackConstraints &aConstraints, + const MediaEnginePrefs &aPrefs, + const nsString& aDeviceId, +- const ipc::PrincipalInfo& aPrincipalInfo, ++ const mozilla::ipc::PrincipalInfo& aPrincipalInfo, + AllocationHandle** aOutHandle, + const char** aOutBadConstraint) + { diff --git a/waterfox/mozilla-1353817.patch b/waterfox/mozilla-1353817.patch new file mode 100644 index 0000000..dc8d8f8 --- /dev/null +++ b/waterfox/mozilla-1353817.patch @@ -0,0 +1,27 @@ +From 1cc652f5525f458b0b4ceb12af24bf5a4367db32 Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Tue, 23 May 2017 13:09:48 -0400 +Subject: [PATCH] Bug 1353817: Include SkNx_neon.h for ARM64 too + +This fixes build errors as arm_neon.h was missing along with some +missing converters. +--- + gfx/skia/skia/src/core/SkNx.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gfx/skia/skia/src/core/SkNx.h b/gfx/skia/skia/src/core/SkNx.h +index 6bca856..b0427aa 100644 +--- a/gfx/skia/skia/src/core/SkNx.h ++++ b/gfx/skia/skia/src/core/SkNx.h +@@ -299,7 +299,7 @@ typedef SkNx<4, uint32_t> Sk4u; + // Include platform specific specializations if available. + #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + #include "../opts/SkNx_sse.h" +-#elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) ++#elif !defined(SKNX_NO_SIMD) && (defined(SK_ARM_HAS_NEON) || defined(SK_CPU_ARM64)) + #include "../opts/SkNx_neon.h" + #else + +-- +2.9.4 + diff --git a/waterfox/mozilla-1435695.patch b/waterfox/mozilla-1435695.patch new file mode 100644 index 0000000..332f3a0 --- /dev/null +++ b/waterfox/mozilla-1435695.patch @@ -0,0 +1,28 @@ +diff -up gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c.attributes_before_declarator gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c +--- gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c.attributes_before_declarator 2018-02-04 11:15:21.000000000 +0100 ++++ gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c 2018-02-04 22:20:44.290360116 +0100 +@@ -115,8 +115,8 @@ static int32_t WeightedAverage(int16_t* + // undefined behavior, so not a good idea; this just makes UBSan ignore the + // violation, so that our old code can continue to do what it's always been + // doing.) +-static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) { + return a * b; + } + +diff -up gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c.attributes_before_declarator gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +--- gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c.attributes_before_declarator 2018-02-04 11:15:21.000000000 +0100 ++++ gecko-dev-0517a94d022c055b2cd0b519233fa8ef8b996d04/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c 2018-02-04 23:03:46.818099286 +0100 +@@ -209,8 +209,8 @@ void WebRtcIsacfix_NormLatticeFilterMa(s + // Left shift of an int32_t that's allowed to overflow. (It's still undefined + // behavior, so not a good idea; this just makes UBSan ignore the violation, so + // that our old code can continue to do what it's always been doing.) +-static inline int32_t OverflowingLShiftS32(int32_t x, int shift) +- RTC_NO_SANITIZE("shift") { ++static inline int32_t RTC_NO_SANITIZE("shift") ++ OverflowingLShiftS32(int32_t x, int shift) { + return x << shift; + } + diff --git a/waterfox/mozilla-1436242.patch b/waterfox/mozilla-1436242.patch new file mode 100644 index 0000000..570b7c5 --- /dev/null +++ b/waterfox/mozilla-1436242.patch @@ -0,0 +1,56 @@ + +# HG changeset patch +# User Jed Davis +# Date 1526943705 21600 +# Node ID 6bb3adfa15c6877f7874429462dad88f8c978c4f +# Parent 4c71c8454879c841871ecf3afb7dbdc96bad97fc +Bug 1436242 - Avoid undefined behavior in IPC fd-passing code. r=froydnj + +MozReview-Commit-ID: 3szIPUssgF5 + +diff --git a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc ++++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +@@ -418,20 +418,37 @@ bool Channel::ChannelImpl::ProcessIncomi + const int* fds; + unsigned num_fds; + unsigned fds_i = 0; // the index of the first unused descriptor + + if (input_overflow_fds_.empty()) { + fds = wire_fds; + num_fds = num_wire_fds; + } else { +- const size_t prev_size = input_overflow_fds_.size(); +- input_overflow_fds_.resize(prev_size + num_wire_fds); +- memcpy(&input_overflow_fds_[prev_size], wire_fds, +- num_wire_fds * sizeof(int)); ++ // This code may look like a no-op in the case where ++ // num_wire_fds == 0, but in fact: ++ // ++ // 1. wire_fds will be nullptr, so passing it to memcpy is ++ // undefined behavior according to the C standard, even though ++ // the memcpy length is 0. ++ // ++ // 2. prev_size will be an out-of-bounds index for ++ // input_overflow_fds_; this is undefined behavior according to ++ // the C++ standard, even though the element only has its ++ // pointer taken and isn't accessed (and the corresponding ++ // operation on a C array would be defined). ++ // ++ // UBSan makes #1 a fatal error, and assertions in libstdc++ do ++ // the same for #2 if enabled. ++ if (num_wire_fds > 0) { ++ const size_t prev_size = input_overflow_fds_.size(); ++ input_overflow_fds_.resize(prev_size + num_wire_fds); ++ memcpy(&input_overflow_fds_[prev_size], wire_fds, ++ num_wire_fds * sizeof(int)); ++ } + fds = &input_overflow_fds_[0]; + num_fds = input_overflow_fds_.size(); + } + + // The data for the message we're currently reading consists of any data + // stored in incoming_message_ followed by data in input_buf_ (followed by + // other messages). + + diff --git a/waterfox/mozilla-256180.patch b/waterfox/mozilla-256180.patch new file mode 100644 index 0000000..13a1c97 --- /dev/null +++ b/waterfox/mozilla-256180.patch @@ -0,0 +1,11 @@ +--- a/layout/generic/nsIFrame.h.old 2016-07-11 13:41:39.688276559 +0200 ++++ b/layout/generic/nsIFrame.h 2016-07-11 13:42:12.791406976 +0200 +@@ -13,7 +13,7 @@ + #error This header/class should only be used within Mozilla code. It should not be used by extensions. + #endif + +-#define MAX_REFLOW_DEPTH 200 ++#define MAX_REFLOW_DEPTH 1000 + + /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is eventually + going to be eliminated, and all callers will use nsFrame instead. At the moment diff --git a/waterfox/mozilla-440908.patch b/waterfox/mozilla-440908.patch new file mode 100644 index 0000000..cce5248 --- /dev/null +++ b/waterfox/mozilla-440908.patch @@ -0,0 +1,111 @@ +diff -up firefox-56.0/modules/libpref/prefapi.cpp.440908 firefox-56.0/modules/libpref/prefapi.cpp +--- firefox-56.0/modules/libpref/prefapi.cpp.440908 2017-09-14 22:15:52.000000000 +0200 ++++ firefox-56.0/modules/libpref/prefapi.cpp 2017-09-25 10:39:39.266572792 +0200 +@@ -1036,8 +1036,8 @@ void PREF_ReaderCallback(void *clo + PrefValue value, + PrefType type, + bool isDefault, +- bool isStickyDefault) +- ++ bool isStickyDefault, ++ bool isLocked) + { + uint32_t flags = 0; + if (isDefault) { +@@ -1049,4 +1049,6 @@ void PREF_ReaderCallback(void *clo + flags |= kPrefForceSet; + } + pref_HashPref(pref, value, type, flags); ++ if (isLocked) ++ PREF_LockPref(pref, true); + } +diff -up firefox-56.0/modules/libpref/prefapi.h.440908 firefox-56.0/modules/libpref/prefapi.h +--- firefox-56.0/modules/libpref/prefapi.h.440908 2017-07-31 18:20:51.000000000 +0200 ++++ firefox-56.0/modules/libpref/prefapi.h 2017-09-25 10:39:39.267572789 +0200 +@@ -246,8 +246,8 @@ void PREF_ReaderCallback( void *closure, + PrefValue value, + PrefType type, + bool isDefault, +- bool isStickyDefault); +- ++ bool isStickyDefault, ++ bool isLocked); + + /* + * Callback whenever we change a preference +diff -up firefox-56.0/modules/libpref/prefread.cpp.440908 firefox-56.0/modules/libpref/prefread.cpp +--- firefox-56.0/modules/libpref/prefread.cpp.440908 2017-09-14 22:15:52.000000000 +0200 ++++ firefox-56.0/modules/libpref/prefread.cpp 2017-09-25 10:39:39.267572789 +0200 +@@ -43,6 +43,7 @@ enum { + #define BITS_PER_HEX_DIGIT 4 + + static const char kUserPref[] = "user_pref"; ++static const char kLockPref[] = "lockPref"; + static const char kPref[] = "pref"; + static const char kPrefSticky[] = "sticky_pref"; + static const char kTrue[] = "true"; +@@ -146,7 +147,7 @@ pref_DoCallback(PrefParseState *ps) + break; + } + (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, +- ps->fstickydefault); ++ ps->fstickydefault, ps->flock); + return true; + } + +@@ -215,6 +216,7 @@ PREF_ParseBuf(PrefParseState *ps, const + ps->vtype = PrefType::Invalid; + ps->fdefault = false; + ps->fstickydefault = false; ++ ps->flock = false; + } + switch (c) { + case '/': /* begin comment block or line? */ +@@ -225,11 +227,14 @@ PREF_ParseBuf(PrefParseState *ps, const + break; + case 'u': /* indicating user_pref */ + case 's': /* indicating sticky_pref */ ++ case 'l': /* indicating lockPref */ + case 'p': /* indicating pref */ + if (c == 'u') { + ps->smatch = kUserPref; + } else if (c == 's') { + ps->smatch = kPrefSticky; ++ } else if (c == 'l') { ++ ps->smatch = kLockPref; + } else { + ps->smatch = kPref; + } +@@ -277,8 +282,10 @@ PREF_ParseBuf(PrefParseState *ps, const + /* name parsing */ + case PREF_PARSE_UNTIL_NAME: + if (c == '\"' || c == '\'') { +- ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky); ++ ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky ++ || ps->smatch == kLockPref); + ps->fstickydefault = (ps->smatch == kPrefSticky); ++ ps->flock = (ps->smatch == kLockPref); + ps->quotechar = c; + ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */ + state = PREF_PARSE_QUOTED_STRING; +diff -up firefox-56.0/modules/libpref/prefread.h.440908 firefox-56.0/modules/libpref/prefread.h +--- firefox-56.0/modules/libpref/prefread.h.440908 2017-09-14 22:15:52.000000000 +0200 ++++ firefox-56.0/modules/libpref/prefread.h 2017-09-25 10:39:39.267572789 +0200 +@@ -34,7 +34,8 @@ typedef void (*PrefReader)(void *c + PrefValue val, + PrefType type, + bool defPref, +- bool stickyPref); ++ bool stickyPref, ++ bool lockPref); + + /** + * Report any errors or warnings we encounter during parsing. +@@ -62,6 +63,7 @@ typedef struct PrefParseState { + PrefType vtype; /* PREF_STRING,INT,BOOL */ + bool fdefault; /* true if (default) pref */ + bool fstickydefault; /* true if (sticky) pref */ ++ bool flock; /* true if pref to be locked */ + } PrefParseState; + + /** diff --git a/waterfox/mozilla-build-arm.patch b/waterfox/mozilla-build-arm.patch new file mode 100644 index 0000000..e390a28 --- /dev/null +++ b/waterfox/mozilla-build-arm.patch @@ -0,0 +1,14 @@ +diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h +--- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 ++++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 +@@ -203,6 +203,10 @@ + #define SK_ARM_HAS_CRC32 + #endif + ++#if defined(__aarch64__) ++ #undef SK_ARM_HAS_NEON ++#endif ++ + ////////////////////////////////////////////////////////////////////// + + #if !defined(SKIA_IMPLEMENTATION) diff --git a/waterfox/rhbz-1173156.patch b/waterfox/rhbz-1173156.patch new file mode 100644 index 0000000..9855710 --- /dev/null +++ b/waterfox/rhbz-1173156.patch @@ -0,0 +1,12 @@ +diff -up firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp +--- firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp.old 2014-11-25 12:23:22.000000000 +0100 ++++ firefox-31.3.0/mozilla-esr31/extensions/auth/nsAuthSambaNTLM.cpp 2014-12-23 15:26:36.606674625 +0100 +@@ -174,7 +174,7 @@ nsAuthSambaNTLM::SpawnNTLMAuthHelper() + return NS_ERROR_FAILURE; + + const char* const args[] = { +- "ntlm_auth", ++ "/usr/bin/ntlm_auth", + "--helper-protocol", "ntlmssp-client-1", + "--use-cached-creds", + "--username", username, diff --git a/waterfox/rhbz-1219542-s390-build.patch b/waterfox/rhbz-1219542-s390-build.patch new file mode 100644 index 0000000..f94e43a --- /dev/null +++ b/waterfox/rhbz-1219542-s390-build.patch @@ -0,0 +1,23 @@ +diff -up firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 firefox-55.0/js/src/old-configure.in +--- firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 2017-07-31 18:20:48.000000000 +0200 ++++ firefox-55.0/js/src/old-configure.in 2017-08-02 14:31:32.190243669 +0200 +@@ -541,7 +541,7 @@ case "$host" in + + *-linux*|*-kfreebsd*-gnu|*-gnu*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" + ;; + + *) +@@ -617,8 +617,8 @@ case "$target" in + + *-*linux*) + if test "$GNU_CC" -o "$GNU_CXX"; then +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" +- MOZ_OPTIMIZE_FLAGS="-O3" ++ MOZ_PGO_OPTIMIZE_FLAGS="-O1" ++ MOZ_OPTIMIZE_FLAGS="-O1" + if test -z "$CLANG_CC"; then + MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" + fi diff --git a/waterfox/rhbz-1354671.patch b/waterfox/rhbz-1354671.patch new file mode 100644 index 0000000..6ee89b7 --- /dev/null +++ b/waterfox/rhbz-1354671.patch @@ -0,0 +1,12 @@ +diff -up firefox-53.0/layout/base/nsIPresShell.h.1354671 firefox-53.0/layout/base/nsIPresShell.h +--- firefox-53.0/layout/base/nsIPresShell.h.1354671 2017-04-27 13:07:43.808653320 +0200 ++++ firefox-53.0/layout/base/nsIPresShell.h 2017-04-27 13:09:40.404427641 +0200 +@@ -212,7 +212,7 @@ public: + * to the same aSize value. AllocateFrame is infallible and will abort + * on out-of-memory. + */ +- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) ++ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) + { + void* result = mFrameArena.AllocateByFrameID(aID, aSize); + RecordAlloc(result); diff --git a/waterfox/rhbz-1497932.patch b/waterfox/rhbz-1497932.patch new file mode 100644 index 0000000..d6e7886 --- /dev/null +++ b/waterfox/rhbz-1497932.patch @@ -0,0 +1,21 @@ +diff -up firefox-56.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-56.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium +diff -up firefox-56.0/media/webrtc/trunk/Makefile.old firefox-56.0/media/webrtc/trunk/Makefile +diff -up firefox-56.0/widget/gtk/mozgtk/mozgtk.c.old firefox-56.0/widget/gtk/mozgtk/mozgtk.c +--- firefox-56.0/widget/gtk/mozgtk/mozgtk.c.old 2017-10-04 09:21:56.155553585 +0200 ++++ firefox-56.0/widget/gtk/mozgtk/mozgtk.c 2017-10-04 09:22:35.562427061 +0200 +@@ -61,7 +61,6 @@ STUB(gdk_screen_get_height_mm) + STUB(gdk_screen_get_n_monitors) + STUB(gdk_screen_get_monitor_at_window) + STUB(gdk_screen_get_monitor_geometry) +-STUB(gdk_screen_get_monitor_workarea) + STUB(gdk_screen_get_monitor_height_mm) + STUB(gdk_screen_get_number) + STUB(gdk_screen_get_resolution) +@@ -550,6 +549,7 @@ STUB(gtk_render_line) + STUB(gtk_render_option) + STUB(gtk_render_slider) + STUB(gtk_scale_new) ++STUB(gdk_screen_get_monitor_workarea) + STUB(gtk_scrollbar_new) + STUB(gtk_style_context_add_class) + STUB(gtk_style_context_add_region) diff --git a/waterfox/waterfox-FreeBSD-patches-snapshot.sh b/waterfox/waterfox-FreeBSD-patches-snapshot.sh new file mode 100755 index 0000000..b94f850 --- /dev/null +++ b/waterfox/waterfox-FreeBSD-patches-snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +module=$(basename "$0" -snapshot.sh) +snaproot="https://svn.freebsd.org/ports/head/www/waterfox/files" + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + ([ -z "${tmp}" ] || [ ! -d "${tmp}" ]) || rm -rf "${tmp}" +} + +unset CDPATH +unset SNAP_COOPTS +pwd=$(pwd) +snap=${snap:-$(date +%Y%m%d)} + +[ "${snap}" = "$(date +%Y%m%d)" ] || SNAP_COOPTS="-r {$snap}" +if [ -n "${rev}" ] ; then + SNAP_COOPTS="-r ${rev}" + snap="${rev}" +fi + +pushd "${tmp}" + svn co ${SNAP_COOPTS} ${snaproot} ${module} + rev=$(svnversion "${module}") + rev="${rev//[!0-9]/}" + mv "${module}" "${module}-r${rev}" + tar -Jcf "${pwd}/${module}-r${rev}.tar.xz" --exclude=.svn "${module}-r${rev}" +popd >/dev/null diff --git a/waterfox/waterfox-chinfo-default-prefs.js b/waterfox/waterfox-chinfo-default-prefs.js new file mode 100644 index 0000000..39acead --- /dev/null +++ b/waterfox/waterfox-chinfo-default-prefs.js @@ -0,0 +1,29 @@ +pref("app.update.auto", false); +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("general.smoothScroll", true); +pref("intl.locale.matchOS", true); +pref("toolkit.storage.synchronous", 0); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("browser.backspace_action", 2); +pref("browser.display.use_system_colors", true); +pref("browser.download.folderList", 1); +pref("browser.link.open_external", 3); +pref("browser.shell.checkDefaultBrowser", false); +pref("network.manage-offline-status", true); +pref("extensions.shownSelectionUI", true); +pref("ui.SpellCheckerUnderlineStyle", 1); +pref("startup.homepage_override_url", ""); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://start.fedoraproject.org/"); +pref("browser.newtabpage.pinned", '[{"url":"http://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); +pref("media.gmp-gmpopenh264.provider.enabled",false); +pref("media.gmp-gmpopenh264.autoupdate",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("plugins.notifyMissingFlash", false); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ +pref("browser.display.use_system_colors", false); +pref("layers.use-image-offscreen-surfaces", false); +/* Allow sending credetials to all https:// sites */ +pref("network.negotiate-auth.trusted-uris", "https://"); diff --git a/waterfox/waterfox-cubeb-build.patch b/waterfox/waterfox-cubeb-build.patch new file mode 100644 index 0000000..39d04f4 --- /dev/null +++ b/waterfox/waterfox-cubeb-build.patch @@ -0,0 +1,8 @@ +--- Waterfox-56.0.2/media/libcubeb/src/moz.build.cubebbuild 2018-01-05 16:39:00.921101411 -0200 ++++ Waterfox-56.0.2/media/libcubeb/src/moz.build 2018-01-05 16:40:44.948718748 -0200 +@@ -89,4 +89,4 @@ CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] + CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] + + # We allow warnings for third-party code that can be updated from upstream. +-AllowCompilerWarnings() ++ALLOW_COMPILER_WARNINGS = True diff --git a/waterfox/waterfox-mozconfig b/waterfox/waterfox-mozconfig new file mode 100644 index 0000000..c400b21 --- /dev/null +++ b/waterfox/waterfox-mozconfig @@ -0,0 +1,43 @@ +. $topsrcdir/browser/config/mozconfig + +ac_add_options --enable-default-toolkit=cairo-gtk3 + +ac_add_options --prefix="$PREFIX" +ac_add_options --libdir="$LIBDIR" +ac_add_options --with-system-zlib +ac_add_options --with-system-bz2 +ac_add_options --with-pthreads +ac_add_options --disable-strip +ac_add_options --disable-tests +#ac_add_options --enable-libnotify +ac_add_options --enable-necko-wifi +ac_add_options --enable-startup-notification +#ac_add_options --disable-cpp-exceptions +ac_add_options --disable-updater +ac_add_options --enable-url-classifier +ac_add_options --enable-chrome-format=omni +ac_add_options --enable-pulseaudio +ac_add_options --with-system-icu +ac_add_options --enable-release +ac_add_options --enable-pie +ac_add_options --enable-gold +ac_add_options --disable-gconf +# Workaround for mozbz#1341234 +ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)" + +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir + +ac_add_options --disable-crashreporter +ac_add_options --disable-js-shell +ac_add_options --disable-maintenance-service +ac_add_options --disable-profiling +ac_add_options --disable-signmar +ac_add_options --disable-verify-mar + +#ac_add_options --enable-rust-simd # on x86 requires SSE2, breaks with system llvm +ac_add_options --enable-stylo=build + +ac_add_options --with-app-name=waterfox +ac_add_options --with-app-basename=Waterfox +ac_add_options --with-branding=browser/branding/unofficial +ac_add_options --with-distribution-id=stackrpms diff --git a/waterfox/waterfox-nolangpacks.patch b/waterfox/waterfox-nolangpacks.patch new file mode 100644 index 0000000..e5fc1c2 --- /dev/null +++ b/waterfox/waterfox-nolangpacks.patch @@ -0,0 +1,112 @@ +diff -up Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/extensions/moz.build.nolangpacks Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/extensions/moz.build +--- Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/extensions/moz.build.nolangpacks 2017-12-13 19:42:11.000000000 -0200 ++++ Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/extensions/moz.build 2017-12-14 00:42:15.104238251 -0200 +@@ -7,97 +7,3 @@ + DIRS += [ + 'pdfjs', + ] +- +-FINAL_TARGET_FILES.features += [ +- 'langpack-ach@waterfox.xpi', +- 'langpack-af@waterfox.xpi', +- 'langpack-an@waterfox.xpi', +- 'langpack-ar@waterfox.xpi', +- 'langpack-as@waterfox.xpi', +- 'langpack-ast@waterfox.xpi', +- 'langpack-az@waterfox.xpi', +- 'langpack-bg@waterfox.xpi', +- 'langpack-bn-BD@waterfox.xpi', +- 'langpack-bn-IN@waterfox.xpi', +- 'langpack-br@waterfox.xpi', +- 'langpack-bs@waterfox.xpi', +- 'langpack-ca@waterfox.xpi', +- 'langpack-cak@waterfox.xpi', +- 'langpack-cs@waterfox.xpi', +- 'langpack-cy@waterfox.xpi', +- 'langpack-da@waterfox.xpi', +- 'langpack-de@waterfox.xpi', +- 'langpack-dsb@waterfox.xpi', +- 'langpack-el@waterfox.xpi', +- 'langpack-en-GB@waterfox.xpi', +- 'langpack-en-ZA@waterfox.xpi', +- 'langpack-eo@waterfox.xpi', +- 'langpack-es-AR@waterfox.xpi', +- 'langpack-es-CL@waterfox.xpi', +- 'langpack-es-ES@waterfox.xpi', +- 'langpack-es-MX@waterfox.xpi', +- 'langpack-et@waterfox.xpi', +- 'langpack-eu@waterfox.xpi', +- 'langpack-fa@waterfox.xpi', +- 'langpack-ff@waterfox.xpi', +- 'langpack-fi@waterfox.xpi', +- 'langpack-fr@waterfox.xpi', +- 'langpack-fy-NL@waterfox.xpi', +- 'langpack-ga-IE@waterfox.xpi', +- 'langpack-gd@waterfox.xpi', +- 'langpack-gl@waterfox.xpi', +- 'langpack-gn@waterfox.xpi', +- 'langpack-gu-IN@waterfox.xpi', +- 'langpack-he@waterfox.xpi', +- 'langpack-hi-IN@waterfox.xpi', +- 'langpack-hr@waterfox.xpi', +- 'langpack-hsb@waterfox.xpi', +- 'langpack-hu@waterfox.xpi', +- 'langpack-hy-AM@waterfox.xpi', +- 'langpack-id@waterfox.xpi', +- 'langpack-is@waterfox.xpi', +- 'langpack-it@waterfox.xpi', +- 'langpack-ja@waterfox.xpi', +- 'langpack-ka@waterfox.xpi', +- 'langpack-kab@waterfox.xpi', +- 'langpack-kk@waterfox.xpi', +- 'langpack-km@waterfox.xpi', +- 'langpack-kn@waterfox.xpi', +- 'langpack-ko@waterfox.xpi', +- 'langpack-lij@waterfox.xpi', +- 'langpack-lt@waterfox.xpi', +- 'langpack-lv@waterfox.xpi', +- 'langpack-mai@waterfox.xpi', +- 'langpack-mk@waterfox.xpi', +- 'langpack-ml@waterfox.xpi', +- 'langpack-mr@waterfox.xpi', +- 'langpack-ms@waterfox.xpi', +- 'langpack-nb-NO@waterfox.xpi', +- 'langpack-nl@waterfox.xpi', +- 'langpack-nn-NO@waterfox.xpi', +- 'langpack-or@waterfox.xpi', +- 'langpack-pa-IN@waterfox.xpi', +- 'langpack-pl@waterfox.xpi', +- 'langpack-pt-BR@waterfox.xpi', +- 'langpack-pt-PT@waterfox.xpi', +- 'langpack-rm@waterfox.xpi', +- 'langpack-ro@waterfox.xpi', +- 'langpack-ru@waterfox.xpi', +- 'langpack-si@waterfox.xpi', +- 'langpack-sk@waterfox.xpi', +- 'langpack-sl@waterfox.xpi', +- 'langpack-son@waterfox.xpi', +- 'langpack-sq@waterfox.xpi', +- 'langpack-sr@waterfox.xpi', +- 'langpack-sv-SE@waterfox.xpi', +- 'langpack-ta@waterfox.xpi', +- 'langpack-te@waterfox.xpi', +- 'langpack-th@waterfox.xpi', +- 'langpack-tr@waterfox.xpi', +- 'langpack-uk@waterfox.xpi', +- 'langpack-uz@waterfox.xpi', +- 'langpack-vi@waterfox.xpi', +- 'langpack-xh@waterfox.xpi', +- 'langpack-zh-CN@waterfox.xpi', +- 'langpack-zh-TW@waterfox.xpi', +-] +diff -up Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/installer/package-manifest.in.nolangpacks Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/installer/package-manifest.in +--- Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/installer/package-manifest.in.nolangpacks 2017-12-13 19:42:11.000000000 -0200 ++++ Waterfox-7b7aa8b4b5d17ce21072054285618fd6434e5482/browser/installer/package-manifest.in 2017-12-14 00:42:50.480760374 -0200 +@@ -625,7 +625,6 @@ + @RESPATH@/browser/chrome/icons/default/default48.png + @RESPATH@/browser/chrome/icons/default/default256.png + #endif +-@RESPATH@/browser/features/* + + ; [Webide Files] + @RESPATH@/browser/chrome/webide@JAREXT@ diff --git a/waterfox/waterfox-waterfoxdir.patch b/waterfox/waterfox-waterfoxdir.patch new file mode 100644 index 0000000..cfcbecc --- /dev/null +++ b/waterfox/waterfox-waterfoxdir.patch @@ -0,0 +1,12 @@ +diff -up Waterfox-388770ff37846abbe9f2eebbd6d71014523bb047/toolkit/xre/nsXREDirProvider.cpp.waterfoxdir Waterfox-388770ff37846abbe9f2eebbd6d71014523bb047/toolkit/xre/nsXREDirProvider.cpp +--- Waterfox-388770ff37846abbe9f2eebbd6d71014523bb047/toolkit/xre/nsXREDirProvider.cpp.waterfoxdir 2017-12-27 16:08:15.089424561 -0200 ++++ Waterfox-388770ff37846abbe9f2eebbd6d71014523bb047/toolkit/xre/nsXREDirProvider.cpp 2017-12-27 16:08:15.119424503 -0200 +@@ -284,7 +284,7 @@ nsXREDirProvider::GetUserProfilesLocalDi + * for extensions and native-messaing manifests. + * + * On OSX this is /Library/Application Support/Mozilla +- * On Linux this is /usr/{lib,lib64}/mozilla ++ * On Linux this is /usr/{lib,lib64}/waterfox + * (for 32- and 64-bit systems respsectively) + */ + static nsresult diff --git a/waterfox/waterfox.1 b/waterfox/waterfox.1 new file mode 100644 index 0000000..79d39e0 --- /dev/null +++ b/waterfox/waterfox.1 @@ -0,0 +1,138 @@ +.TH WATERFOX 1 "August 07, 2001" waterfox "Linux User's Manual" +.SH NAME +waterfox \- a Web browser for X11 derived from the Mozilla browser + +.SH SYNOPSIS +.B waterfox +[\fIOPTIONS\fR] [\fIURL\fR] + +.B waterfox-bin +[\fIOPTIONS\fR] [\fIURL\fR] + +.SH DESCRIPTION +\fBWaterfox\fR is an open-source web browser, specialised modification +of the Mozilla platform, designed for privacy and user choice in mind. + +.SH USAGE +\fBwaterfox\fR is a simple shell script that will set up the +environment for the actual executable, \fBwaterfox-bin\fR. + +.SH OPTIONS +A summary of the options supported by \fBwaterfox\fR is included below. + +.SS "GTK options" +\fB\-\-gdk-debug=\fR\fIFLAGS\fR +Gdk debugging flags to set +.TP +\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR +Gdk debugging flags to unset +.TP +\fB\-\-gtk-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to set +.TP +\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to unset +.TP +\fB\-\-gtk-module=\fR\fIMODULE\fR +Load an additional Gtk module + +.SS "X11 options" +.TP +.BI \-\-display= DISPLAY +X display to use +.TP +.B \--sync +Make X calls synchronous +.TP +.B \-\-no-xshm +Don't use X shared memory extension +.TP +.BI \-\-xim-preedit= STYLE +.TP +.BI \-\-xim-status= STYLE +.TP +.B \-\-g-fatal-warnings +Make all warnings fatal + +.SS "Waterfox options" +.TP +.B \-h, \-help +Show summary of options. +.TP +.B \-v, \-version +Print \fB/usr/bin/waterfox-bin\fR version. +.TP +\fB\-CreateProfile\fR \fIprofile\fR +Create \fIprofile\fR. +.TP +\fB\-P\fR \fIprofile\fR +Start with \fIprofile\fR. +.TP +.B \-ProfileManager +Start with profile manager. +.TP +\fB\-remote\fR \fIcommand\fR +Execute \fIcommand\fR in an already running Waterfox process. For more info, +see: \fIhttp://www.mozilla.org/unix/remote.html\fR +.TP +.B \-jsconsole +Start with Javascript Console +.TP +\fB\-chrome\fR \fIurl\fR +Load the specified chrome. +.TP +\fB\-no\-remote\fR +Don't connect to any other running instances of \fBwaterfox\fR. Use this if you want to run \fBwaterfox\fR +in an entirely new process. By default, \fBwaterfox\fR will delegate a command to an already running instance. +.TP +\fB\-safe\-mode\fR +Start \fBwaterfox\fR in safe-mode. This disables all third-party extensions, and may be necessary if +you are having problems with an extension you installed. +.TP +\fB\-new\-tab\fR \fIurl\fR +Open \fIurl\fR in a new tab. +.TP +\fB\-new\-window\fR \fIurl\fR +Open \fIurl\fR in a new window. +.TP +\fB\-preferences\fR +Open the preferences dialog. +.TP +\fB\-private\fR +Start \fBwaterfox\fR in private browsing mode. +.TP +\fB\-private\-toggle\fR +Toggle private browsing mode. +.TP +\fB\-setDefaultBrowser\fR +Set \fBwaterfox\fR as the default web browser. +.TP +\fB\-search\fR \fIterm\fR +Search for \fIterm\fR with your default search engine. +.TP +\fB\-migration\fR +Start with migration wizard. +.TP +\fB\-new-instance\fR +Open new instance, not a new window in running instance. + +.SH FILES +\fI/usr/bin/waterfox\fR - shell script wrapping +\fBwaterfox\fR +.br +\fI/usr/lib/waterfox/waterfox-bin\fR - \fBwaterfox\fR +executable + +.SH VERSION +1.0 + +.SH BUGS +To report a bug, please visit \fIhttps://github.com/MrAlex94/Waterfox/issues\fR + +.SH AUTHORS +.TP +.B Alex Kontos +.I https://www.waterfoxproject.org/#about +.TP +.B The Mozilla Organization +.I http://www.mozilla.org/about.html diff --git a/waterfox/waterfox.desktop b/waterfox/waterfox.desktop new file mode 100644 index 0000000..49ed09c --- /dev/null +++ b/waterfox/waterfox.desktop @@ -0,0 +1,272 @@ +[Desktop Entry] +Version=1.0 +Name=Waterfox +GenericName=Web Browser +GenericName[ca]=Navegador web +GenericName[cs]=Webový prohlížeč +GenericName[es]=Navegador web +GenericName[fa]=مرورگر اینترنتی +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[hu]=Webböngésző +GenericName[it]=Browser Web +GenericName[ja]=ウェブ・ブラウザ +GenericName[ko]=웹 브라우저 +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[no]=Nettleser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador Web +GenericName[sk]=Internetový prehliadač +GenericName[sv]=Webbläsare +Comment=Browse the Web +Comment[ca]=Navegueu per el web +Comment[cs]=Prohlížení stránek World Wide Webu +Comment[de]=Im Internet surfen +Comment[es]=Navegue por la web +Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید +Comment[fi]=Selaa Internetin WWW-sivuja +Comment[fr]=Navigue sur Internet +Comment[hu]=A világháló böngészése +Comment[it]=Esplora il web +Comment[ja]=ウェブを閲覧します +Comment[ko]=웹을 돌아 다닙니다 +Comment[nb]=Surf på nettet +Comment[nl]=Verken het internet +Comment[nn]=Surf på nettet +Comment[no]=Surf på nettet +Comment[pl]=Przeglądanie stron WWW +Comment[pt]=Navegue na Internet +Comment[pt_BR]=Navegue na Internet +Comment[sk]=Prehliadanie internetu +Comment[sv]=Surfa på webben +Exec=waterfox %u +Icon=waterfox +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn-BD]=নতুন উইন্ডো (N) +Name[bn-IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en-GB]=New Window +Name[en-US]=New Window +Name[en-ZA]=New Window +Name[eo]=Nova fenestro +Name[es-AR]=Nueva ventana +Name[es-CL]=Nueva ventana +Name[es-ES]=Nueva ventana +Name[es-MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید‌ +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy-NL]=Nij finster +Name[ga-IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu-IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi-IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy-AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja-JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួច​​​ថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb-NO]=Nytt vindu +Name[ne-NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn-NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt-BR]=Nova janela +Name[pt-PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv-SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh-CN]=新建窗口 +Name[zh-TW]=開新視窗 + + +Exec=waterfox %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en-GB]=New Private Window +Name[en-US]=New Private Window +Name[en-ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es-AR]=Nueva ventana privada +Name[es-CL]=Nueva ventana privada +Name[es-ES]=Nueva ventana privada +Name[es-MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy-NL]=Nij priveefinster +Name[ga-IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu-IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi-IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy-AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja-JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួច​ឯកជន​ថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb-NO]=Nytt privat vindu +Name[ne-NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn-NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt-BR]=Nova janela privativa +Name[pt-PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv-SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh-CN]=新建隐私浏览窗口 +Name[zh-TW]=新增隱私視窗 +Exec=waterfox --private-window %u + diff --git a/waterfox/waterfox.sh.in b/waterfox/waterfox.sh.in new file mode 100644 index 0000000..70bc25f --- /dev/null +++ b/waterfox/waterfox.sh.in @@ -0,0 +1,248 @@ +#!/bin/bash +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +## +## Usage: +## +## $ waterfox +## +## This script is meant to run a mozilla program from the mozilla +## rpm installation. +## +## The script will setup all the environment voodoo needed to make +## mozilla work. + +cmdname=`basename $0` + +## +## Variables +## +MOZ_ARCH=$(uname -m) +case $MOZ_ARCH in + x86_64 | s390x | sparc64) + MOZ_LIB_DIR="/usr/lib64" + SECONDARY_LIB_DIR="/usr/lib" + ;; + * ) + MOZ_LIB_DIR="/usr/lib" + SECONDARY_LIB_DIR="/usr/lib64" + ;; +esac + +MOZ_WATERFOX_FILE="waterfox" + +if [ ! -r $MOZ_LIB_DIR/waterfox/$MOZ_WATERFOX_FILE ]; then + if [ ! -r $SECONDARY_LIB_DIR/waterfox/$MOZ_WATERFOX_FILE ]; then + echo "Error: $MOZ_LIB_DIR/waterfox/$MOZ_WATERFOX_FILE not found" + if [ -d $SECONDARY_LIB_DIR ]; then + echo " $SECONDARY_LIB_DIR/waterfox/$MOZ_WATERFOX_FILE not found" + fi + exit 1 + fi + MOZ_LIB_DIR="$SECONDARY_LIB_DIR" +fi +MOZ_DIST_BIN="$MOZ_LIB_DIR/waterfox" +MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" +MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.waterfox/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" +MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_WATERFOX_FILE" +MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" + +## +## Set MOZ_GRE_CONF +## +MOZ_GRE_CONF=/etc/gre.d/gre.conf +if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then + MOZ_GRE_CONF=/etc/gre.d/gre64.conf +fi +export MOZ_GRE_CONF + +## +## Set MOZILLA_FIVE_HOME +## +MOZILLA_FIVE_HOME="$MOZ_DIST_BIN" + +export MOZILLA_FIVE_HOME + +## +## Make sure that we set the plugin path +## +MOZ_PLUGIN_DIR="plugins" + +if [ "$MOZ_PLUGIN_PATH" ] +then + MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +else + MOZ_PLUGIN_PATH=$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR +fi +export MOZ_PLUGIN_PATH + +## +## Set MOZ_APP_LAUNCHER for gnome-session +## +export MOZ_APP_LAUNCHER="/usr/bin/waterfox" + +## +## Set FONTCONFIG_PATH for Xft/fontconfig +## +FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft" +export FONTCONFIG_PATH + +## +## In order to better support certain scripts (such as Indic and some CJK +## scripts), this Waterfox is built with the Pango system as as its text +## renderer. This change may negatively impact performance on some pages. +## To disable the use of Pango, set MOZ_DISABLE_PANGO=1 in your environment +## before launching Waterfox. +## +# +# MOZ_DISABLE_PANGO=1 +# export MOZ_DISABLE_PANGO +# + +## +## Disable the GNOME crash dialog, Moz has it's own +## +GNOME_DISABLE_CRASH_DIALOG=1 +export GNOME_DISABLE_CRASH_DIALOG + +## +## Disable the SLICE allocator (rhbz#1014858) +## +export G_SLICE=always-malloc + +## +## Enable Xinput2 (mozbz#1207973) +## +export MOZ_USE_XINPUT2=1 + +# OK, here's where all the real work gets done + + +## +## To disable the use of Waterfox localization, set MOZ_DISABLE_LANGPACKS=1 +## in your environment before launching Waterfox. +## +# +# MOZ_DISABLE_LANGPACKS=1 +# export MOZ_DISABLE_LANGPACKS +# + +## +## Automatically installed langpacks are tracked by .fedora-langpack-install +## config file. +## +FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install" + +# MOZ_DISABLE_LANGPACKS disables language packs completely +MOZILLA_DOWN=0 +if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then + if [ -x $MOZ_DIST_BIN/$MOZ_WATERFOX_FILE ]; then + # Is waterfox running? + /usr/bin/pidof waterfox > /dev/null 2>&1 + MOZILLA_DOWN=$? + fi +fi + +# Modify language pack configuration only when waterfox is not running +# and language packs are not disabled +if [ $MOZILLA_DOWN -ne 0 ]; then + + # Clear already installed langpacks + mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR + if [ -f $FEDORA_LANGPACK_CONFIG ]; then + rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1 + rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1 + # remove all empty langpacks dirs while they block installation of langpacks + rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1 + fi + + # Get locale from system + CURRENT_LOCALE=$LC_ALL + CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES} + CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} + + # Try with a local variant first, then without a local variant + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` + + function create_langpack_link() { + local language=$* + local langpack=langpack-${language}@waterfox.xpi + if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then + rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + # If the target file is a symlink (the fallback langpack), + # install the original file instead of the fallback one + if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then + langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack` + fi + ln -s $MOZ_LANGPACKS_DIR/$langpack \ + $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG + return 0 + fi + return 1 + } + + create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true +fi + +# BEAST fix (rhbz#1005611) +NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1} +export NSS_SSL_CBC_RANDOM_IV + +# Prepare command line arguments +script_args="" +pass_arg_count=0 +while [ $# -gt $pass_arg_count ] +do + case "$1" in + -g | --debug) + script_args="$script_args -g" + debugging=1 + shift + ;; + -d | --debugger) + if [ $# -gt 1 ]; then + script_args="$script_args -d $2" + shift 2 + else + shift + fi + ;; + *) + # Move the unrecognized argument to the end of the list. + arg="$1" + shift + set -- "$@" "$arg" + pass_arg_count=`expr $pass_arg_count + 1` + ;; + esac +done + +# Run the browser +debugging=0 +if [ $debugging = 1 ] +then + echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" +fi + +exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec new file mode 100644 index 0000000..441d647 --- /dev/null +++ b/waterfox/waterfox.spec @@ -0,0 +1,982 @@ +%global commit 2294d4556bf76a6293275a17dbf9ef5fd187459e +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global date 20180908 +%global with_snapshot 1 + +%global freebsd_rev 478244 +%global freebsd_root %{name}-FreeBSD-patches-r%{freebsd_rev} + +%if 0%{?with_snapshot} +%global gver .%{date}git%{shortcommit} +%endif + +# Build with only clang? +%global with_clang 0 + +# Use ALSA backend? +%global alsa_backend 1 + +# Use system nspr/nss? +%global system_nss 1 + +# Use system hunspell? +%global system_hunspell 1 + +# Use system libevent? +%global system_libevent 1 + +# Use system sqlite? +%global system_sqlite 1 + +%global system_ffi 1 + +# Use system cairo? +%global system_cairo 0 + +# Use system graphite2/harfbuzz? +%global system_harfbuzz 1 + +# Use system libvpx? +%global system_libvpx 1 + +# Use system webp? +%global system_webp 1 + +# Use system libvpx? +%global system_vorbis 1 + +# Use system libicu? +%global system_libicu 0 + +# Big endian platforms +%ifarch ppc64 s390x +# Javascript Intl API is not supported on big endian platforms right now: +# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 +%global big_endian 1 +%endif + +# Hardened build? +%global hardened_build 1 + +%global system_jpeg 1 + +%ifarch %{ix86} x86_64 +%global run_tests 0 +%else +%global run_tests 0 +%endif + +# Build as a debug package? +%global debug_build 0 + +%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +%global waterfox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} +# Minimal required versions +%global cairo_version 1.13.1 +%global freetype_version 2.1.9 +%if %{?system_harfbuzz} +%global graphite2_version 1.3.10 +%global harfbuzz_version 1.4.7 +%endif +%if %{?system_libevent} +%global libevent_version 2.1.8 +%endif +%global libnotify_version 0.7.0 +%if %{?system_libvpx} +%global libvpx_version 1.4.0 +%endif +%if %{?system_webp} +%global webp_version 1.0.0 +%endif +%if %{?system_vorbis} +%global ogg_version 1.3.3 +%global vorbis_version 1.3.5 +%endif + +%if %{?system_nss} +%global nspr_version 4.17.0 +# NSS/NSPR quite often ends in build override, so as requirement the version +# we're building against could bring us some broken dependencies from time to time. +%global nspr_build_version %{nspr_version} +%global nss_version 3.34 +%global nss_build_version %{nss_version} +%endif + +%if %{?system_sqlite} +%global sqlite_version 3.8.4.2 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%endif + +%global mozappdir %{_libdir}/%{name} +%global mozappdirdev %{_libdir}/%{name}-devel-%{version} +%global langpackdir %{mozappdir}/langpacks + +%global build_langpacks 1 + +Summary: Waterfox Web browser +Name: waterfox +Version: 56.2.2 +Release: 4%{?gver}%{?dist} +URL: https://www.waterfoxproject.org +License: MPLv1.1 or GPLv2+ or LGPLv2+ +%if 0%{?with_snapshot} +Source0: https://github.com/MrAlex94/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +%else +Source0: https://github.com/MrAlex94/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +%endif + +# FreeBSD patches +# https://www.freshports.org/www/waterfox +# rev=revision ./waterfox-FreeBSD-patches-snapshot.sh +Source600: http://dl.bintray.com/phantomx/tarballs/%{freebsd_root}.tar.xz + +Source10: waterfox-mozconfig +Source12: waterfox-chinfo-default-prefs.js +Source20: waterfox.desktop +Source21: waterfox.sh.in +Source23: waterfox.1 +Source26: distribution.ini + +# Build patches +Patch0: firefox-install-dir.patch +Patch3: mozilla-build-arm.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 +Patch18: xulrunner-24.0-jemalloc-ppc.patch +Patch20: firefox-build-prbool.patch +Patch25: rhbz-1219542-s390-build.patch +Patch26: build-icu-big-endian.patch +Patch27: mozilla-1335250.patch +Patch30: fedora-build.patch +Patch31: build-ppc64-s390x-curl.patch +Patch32: build-rust-ppc64le.patch +Patch35: build-ppc-jit.patch +Patch36: build-missing-xlocale-h.patch +# Always feel lucky for unsupported platforms: +# https://bugzilla.mozilla.org/show_bug.cgi?id=1347128 +Patch37: build-jit-atomic-always-lucky.patch +# Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) +Patch38: build-cacheFlush-missing.patch + +# Fedora specific patches +Patch215: firefox-enable-addons.patch +Patch219: rhbz-1173156.patch +Patch221: firefox-fedora-ua.patch +Patch224: mozilla-1170092.patch +Patch225: mozilla-1005640-accept-lang.patch +#ARM run-time patch +Patch226: rhbz-1354671.patch +Patch230: rhbz-1497932.patch + +# Firefox upstream patches +Patch402: mozilla-1196777.patch +Patch406: mozilla-256180.patch +Patch413: mozilla-1353817.patch +Patch414: mozilla-1435695.patch +Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch +Patch416: bug1375074-save-restore-x28.patch +Patch417: mozilla-1436242.patch + +# Upstream updates + +%global wf_url https://github.com/MrAlex94/Waterfox +#Patch???: %%{wf_url}/commit/commit.patch#/wf-commit.patch +Patch490: %{wf_url}/pull/547.patch#/wf-pull-547.patch + +# Debian patches +Patch500: mozilla-440908.patch + +# Chinforinfula patches +Patch700: %{name}-nolangpacks.patch +Patch701: %{name}-waterfoxdir.patch + +%if %{?system_nss} +BuildRequires: pkgconfig(nspr) >= %{nspr_version} +BuildRequires: pkgconfig(nss) >= %{nss_version} +BuildRequires: nss-static >= %{nss_version} +%endif +%if %{?system_cairo} +BuildRequires: pkgconfig(cairo) >= %{cairo_version} +%endif +BuildRequires: pkgconfig(libpng) +%if %{?system_jpeg} +BuildRequires: libjpeg-devel +%endif +BuildRequires: zip +BuildRequires: bzip2-devel +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libIDL-2.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtk+-2.0) +BuildRequires: pkgconfig(krb5) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(freetype2) >= %{freetype_version} +%if %{?system_harfbuzz} +BuildRequires: pkgconfig(graphite2) >= %{graphite2_version} +BuildRequires: pkgconfig(harfbuzz) >= %{harfbuzz_version} +%endif +BuildRequires: pkgconfig(xt) +BuildRequires: pkgconfig(xrender) +%if %{?system_hunspell} +BuildRequires: pkgconfig(hunspell) +%endif +%if %{?system_libevent} +BuildRequires: pkgconfig(libevent) >= %{libevent_version} +%endif +BuildRequires: pkgconfig(libstartup-notification-1.0) +%if %{?alsa_backend} +BuildRequires: pkgconfig(alsa) +%endif +BuildRequires: pkgconfig(libnotify) >= %{libnotify_version} +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(libcurl) +BuildRequires: dbus-glib-devel +BuildRequires: pkgconfig(libv4l2) +%if %{?system_libvpx} +BuildRequires: pkgconfig(vpx) >= %{libvpx_version} +%endif +%if %{?system_webp} +BuildRequires: pkgconfig(libwebp) >= %{webp_version} +%endif +%if %{?system_vorbis} +BuildRequires: pkgconfig(ogg) >= %{ogg_version} +BuildRequires: pkgconfig(vorbis) >= %{vorbis_version} +%endif +BuildRequires: autoconf213 +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: yasm +BuildRequires: llvm +BuildRequires: llvm-devel +BuildRequires: clang +BuildRequires: clang-libs +%if !0%{?with_clang} +BuildRequires: gcc-c++ +%endif +BuildRequires: patchutils + +Requires: mozilla-filesystem +Requires: waterfox-filesystem +Requires: p11-kit-trust +%if %{?system_nss} +Requires: nspr >= %{nspr_build_version} +Requires: nss >= %{nss_build_version} +%endif +BuildRequires: python2-devel + +BuildRequires: nss-devel >= 3.29.1-2.1 +Requires: nss >= 3.29.1-2.1 + +BuildRequires: desktop-file-utils +BuildRequires: system-bookmarks +%if %{?system_sqlite} +BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} +%endif + +%if %{?system_ffi} +BuildRequires: pkgconfig(libffi) +%endif + +%if %{?run_tests} +BuildRequires: xorg-x11-server-Xvfb +%endif +BuildRequires: rust +BuildRequires: cargo + +Obsoletes: mozilla <= 37:1.7.13 +Provides: webclient + +%description +Waterfox is an open-source web browser, specialised modification of the Mozilla +platform, designed for privacy and user choice in mind. + +%if %{run_tests} +%global testsuite_pkg_name mozilla-%{name}-testresults +%package -n %{testsuite_pkg_name} +Summary: Results of testsuite +%description -n %{testsuite_pkg_name} +This package contains results of tests executed during build. +%files -n %{testsuite_pkg_name} +/test_results +%endif + +#--------------------------------------------------------------------- + +%prep +%if 0%{?with_snapshot} +%setup -q -n Waterfox-%{commit} -a 600 +%else +%setup -q -n Waterfox-%{version} -a 600 +%endif + +%if %{build_langpacks} + mkdir waterfox-langpacks + mv browser/extensions/langpack-*.xpi waterfox-langpacks/ +%else + rm -f browser/extensions/langpack-*.xpi +%endif + +# Build patches, can't change backup suffix from default because during build +# there is a compare of config and js/config directories and .orig suffix is +# ignored during this compare. +%patch0 -p1 + + +%patch18 -p1 -b .jemalloc-ppc +%patch20 -p1 -b .prbool +%ifarch s390 +%patch25 -p1 -b .rhbz-1219542-s390 +%endif +%patch30 -p1 -b .fedora-build +%patch31 -p1 -b .ppc64-s390x-curl +%patch32 -p1 -b .rust-ppc64le +%ifarch ppc ppc64 ppc64le +%patch35 -p1 -b .ppc-jit +%endif +%patch37 -p1 -b .jit-atomic-lucky + +%patch3 -p1 -b .arm + +# For branding specific patches. + +# Fedora patches +%patch215 -p1 -b .addons +%patch219 -p2 -b .rhbz-1173156 +%patch221 -p2 -b .fedora-ua +%patch224 -p1 -b .1170092 +%patch225 -p1 -b .1005640-accept-lang +#ARM run-time patch +%ifarch aarch64 +%patch226 -p1 -b .1354671 +%endif +%patch230 -p1 -b .1497932 + +%patch402 -p1 -b .1196777 +%patch406 -p1 -b .256180 +%patch413 -p1 -b .1353817 +%patch414 -p1 -b .1435695 +%ifarch %{arm} +%patch415 -p1 -b .mozilla-1238661 +%endif +%patch416 -p1 -b .bug1375074-save-restore-x28 +%patch417 -p1 -b .mozilla-1436242 + +%patch490 -p1 + +# Debian extension patch +%patch500 -p1 -b .440908 + +# Prepare FreeBSD patches +mkdir _patches +cp -p %{freebsd_root}/patch-{bug,z-bug,revert-bug}* _patches/ + +filterdiff -x dom/svg/crashtests/crashtests.list %{freebsd_root}/patch-bug1343147 \ + > _patches/patch-bug1343147 +filterdiff -x dom/security/test/csp/mochitest.ini %{freebsd_root}/patch-bug1381761 \ + > _patches/patch-bug1381761 + +for i in 1404057 1404324 1404180 1405878 ;do + filterdiff \ + -x layout/style/crashtests/crashtests.list \ + -x layout/reftests/bugs/reftest.list \ + %{freebsd_root}/patch-bug${i} > _patches/patch-bug${i} +done + +# 1: unneeded +# 2: no apply +# 3: uncertain +for i in \ + 702179 991253 1021761 1144632 1288587 1452576 1425930 1469914 1469309 1470260 1472925 \ + 1388744 1413143 \ + 1447519 +do + rm -f _patches/patch-bug${i} +done + +%if 0%{?fedora} < 28 + rm -f _patches/patch-bug730495 +%endif + +patchcommand='patch -p0 -s -i' + +for i in _patches/patch-{bug{??????,???????},revert-bug*,z-*} ;do + ${patchcommand} ${i} +done + +# Install langpacks other way +%patch700 -p1 -b .nolangpacks +%patch701 -p1 -b .waterfoxdir + +# Patch for big endian platforms only +%if 0%{?big_endian} +%patch26 -p1 -b .icu +%patch36 -p2 -b .xlocale +%endif + +rm -f .mozconfig +cp %{SOURCE10} .mozconfig + +%if 0%{?with_clang} +echo 'export CC=clang' >> .mozconfig +echo 'export CXX=clang++' >> .mozconfig +%endif + +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + +%if %{?system_sqlite} +echo "ac_add_options --enable-system-sqlite" >> .mozconfig +%else +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +%endif + +%if %{?system_cairo} +echo "ac_add_options --enable-system-cairo" >> .mozconfig +%else +echo "ac_add_options --disable-system-cairo" >> .mozconfig +%endif + +%if %{?system_harfbuzz} +echo "ac_add_options --enable-system-graphite2" >> .mozconfig +echo "ac_add_options --enable-system-harfbuzz" >> .mozconfig +%else +echo "ac_add_options --disable-system-graphite2" >> .mozconfig +echo "ac_add_options --disable-system-harfbuzz" >> .mozconfig +%endif + +%if %{?system_ffi} +echo "ac_add_options --enable-system-ffi" >> .mozconfig +%endif + +%ifarch %{arm} +echo "ac_add_options --disable-elf-hack" >> .mozconfig +%endif + +%if %{?alsa_backend} +echo "ac_add_options --enable-alsa" >> .mozconfig +%endif + +%if %{?system_hunspell} +echo "ac_add_options --enable-system-hunspell" >> .mozconfig +%else +echo "ac_add_options --disable-system-hunspell" >> .mozconfig +%endif + +%if %{?system_libevent} +echo "ac_add_options --enable-system-libevent" >> .mozconfig +%else +echo "ac_add_options --disable-system-libevent" >> .mozconfig +%endif + +%if %{?debug_build} +echo "ac_add_options --enable-debug" >> .mozconfig +echo "ac_add_options --disable-optimize" >> .mozconfig +%else +%global optimize_flags "none" +# Fedora 26 (gcc7) needs to disable default build flags (mozbz#1342344) +%ifnarch s390 s390x +%global optimize_flags "-g -O2" +%endif +%ifarch armv7hl +# ARMv7 need that (rhbz#1426850) +%global optimize_flags "-g -O2 -fno-schedule-insns" +%endif +%ifarch ppc64le aarch64 +%global optimize_flags "-g -O2" +%endif +%if %{optimize_flags} != "none" +echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig +%else +echo 'ac_add_options --enable-optimize' >> .mozconfig +%endif +echo "ac_add_options --disable-debug" >> .mozconfig +%endif + +# s390(x) fails to start with jemalloc enabled +%ifarch s390 s390x +echo "ac_add_options --disable-jemalloc" >> .mozconfig +%endif + +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif + +%if %{?run_tests} +echo "ac_add_options --enable-tests" >> .mozconfig +%endif + +%if !%{?system_jpeg} +echo "ac_add_options --without-system-jpeg" >> .mozconfig +%else +echo "ac_add_options --with-system-jpeg" >> .mozconfig +%endif + +%if %{?system_libvpx} +echo "ac_add_options --with-system-libvpx" >> .mozconfig +%else +echo "ac_add_options --without-system-libvpx" >> .mozconfig +%endif + +%if %{?system_webp} +echo "ac_add_options --with-system-webp" >> .mozconfig +%else +echo "ac_add_options --without-system-webp" >> .mozconfig +%endif + +%if %{?system_vorbis} +echo "ac_add_options --with-system-ogg" >> .mozconfig +echo "ac_add_options --with-system-vorbis" >> .mozconfig +%else +echo "ac_add_options --without-system-ogg" >> .mozconfig +echo "ac_add_options --without-system-vorbis" >> .mozconfig +%endif + +%if %{?system_libicu} +echo "ac_add_options --with-system-icu" >> .mozconfig +%else +echo "ac_add_options --without-system-icu" >> .mozconfig +%endif +%ifarch s390 s390x +echo "ac_add_options --disable-ion" >> .mozconfig +%endif + + +#--------------------------------------------------------------------- + +%build +%if %{?system_sqlite} +# Do not proceed with build if the sqlite require would be broken: +# make sure the minimum requirement is non-empty, ... +sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 +# ... and that major number of the computed build-time version matches: +case "%{sqlite_build_version}" in + "$sqlite_version"*) ;; + *) exit 1 ;; +esac +%endif + +echo "Generate big endian version of config/external/icu/data/icud58l.dat" +%if 0%{?big_endian} + ./mach python intl/icu_sources_data.py . + ls -l config/external/icu/data + rm -f config/external/icu/data/icudt*l.dat +%endif + +# Update the various config.guess to upstream release for aarch64 support +find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' + +# -fpermissive is needed to build with gcc 4.6+ which has become stricter +# +# Mozilla builds with -Wall with exception of a few warnings which show up +# everywhere in the code; so, don't override that. +# +# Disable C++ exceptions since Mozilla code is not exception-safe +# +MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') +#rhbz#1037063 +# -Werror=format-security causes build failures when -Wno-format is explicitly given +# for some sources +# Explicitly force the hardening flags for Waterfox so it passes the checksec test; +# See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" +# Use hardened build? +%if %{?hardened_build} +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" +%endif +%if %{?debug_build} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') +%endif +%ifarch s390 +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +# If MOZ_DEBUG_FLAGS is empty, waterfox's build will default it to "-g" which +# overrides the -g1 from line above and breaks building on s390 +# (OOM when linking, rhbz#1238225) +export MOZ_DEBUG_FLAGS=" " +%endif +%ifarch s390 %{arm} ppc aarch64 +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +%endif +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS + +export PREFIX='%{_prefix}' +export LIBDIR='%{_libdir}' + +MOZ_SMP_FLAGS=-j1 +# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, +# however builds tend to fail on other arches when building in parallel. +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 +%endif + +make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" + +%if %{?run_tests} +%if %{?system_nss} +ln -s /usr/bin/certutil objdir/dist/bin/certutil +ln -s /usr/bin/pk12util objdir/dist/bin/pk12util + +%endif +mkdir test_results +./mach --log-no-times check-spidermonkey &> test_results/check-spidermonkey || true +./mach --log-no-times check-spidermonkey &> test_results/check-spidermonkey-2nd-run || true +./mach --log-no-times cppunittest &> test_results/cppunittest || true +xvfb-run ./mach --log-no-times crashtest &> test_results/crashtest || true +./mach --log-no-times gtest &> test_results/gtest || true +xvfb-run ./mach --log-no-times jetpack-test &> test_results/jetpack-test || true +# not working right now ./mach marionette-test &> test_results/marionette-test || true +xvfb-run ./mach --log-no-times mochitest-a11y &> test_results/mochitest-a11y || true +xvfb-run ./mach --log-no-times mochitest-browser &> test_results/mochitest-browser || true +xvfb-run ./mach --log-no-times mochitest-chrome &> test_results/mochitest-chrome || true +xvfb-run ./mach --log-no-times mochitest-devtools &> test_results/mochitest-devtools || true +xvfb-run ./mach --log-no-times mochitest-plain &> test_results/mochitest-plain || true +xvfb-run ./mach --log-no-times reftest &> test_results/reftest || true +xvfb-run ./mach --log-no-times webapprt-test-chrome &> test_results/webapprt-test-chrome || true +xvfb-run ./mach --log-no-times webapprt-test-content &> test_results/webapprt-test-content || true +./mach --log-no-times webidl-parser-test &> test_results/webidl-parser-test || true +xvfb-run ./mach --log-no-times xpcshell-test &> test_results/xpcshell-test || true +%if %{?system_nss} +rm -f objdir/dist/bin/certutil +rm -f objdir/dist/bin/pk12util +%endif + +%endif +#--------------------------------------------------------------------- + +%install + +# set up our default bookmarks +cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html + +# Make sure locale works for langpacks +cat > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); +EOF + +DESTDIR=%{buildroot} make -C objdir install + +mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} + +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} + +# set up the waterfox start script +rm -rf %{buildroot}%{_bindir}/waterfox +cat %{SOURCE21} > %{buildroot}%{_bindir}/waterfox +chmod 755 %{buildroot}%{_bindir}/waterfox + +install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/waterfox.1 + +rm -f %{buildroot}/%{mozappdir}/waterfox-config +rm -f %{buildroot}/%{mozappdir}/update-settings.ini + +for s in 16 22 24 32 48 256; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps + cp -p browser/branding/unofficial/default${s}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/waterfox.png +done + +# Register as an application to be visible in the software center +# +# NOTE: It would be *awesome* if this file was maintained by the upstream +# project, translated and installed into the right place during `make install`. +# +# See http://www.freedesktop.org/software/appstream/docs/ for more details. +# +mkdir -p %{buildroot}%{_metainfodir} +cat > %{buildroot}%{_metainfodir}/%{name}.appdata.xml < + + + waterfox.desktop + CC0-1.0 + +

+ Bringing together all kinds of awesomeness to make browsing better for you. + Get to your favorite sites quickly – even if you don’t remember the URLs. + Type your term into the location bar (aka the Awesome Bar) and the autocomplete + function will include possible matches from your browsing history, bookmarked + sites and open tabs. +

+ +
+ http://www.mozilla.org/ + +
+EOF + +echo > %{name}.lang +%if %{build_langpacks} +# Extract langpacks, make any mods needed, repack the langpack, and install it. +mkdir -p %{buildroot}%{langpackdir} +for langpack in `ls waterfox-langpacks/*.xpi`; do + language=`basename $langpack .xpi | sed -e 's/^langpack-//' -e 's/@waterfox//'` + extensionID=langpack-$language@waterfox + mkdir -p $extensionID + unzip -qq $langpack -d $extensionID + find $extensionID -type f | xargs chmod 644 + + cd $extensionID + zip -qq -r9mX ../${extensionID}.xpi * + cd - + + install -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} + language=`echo $language | sed -e 's/-/_/g'` + echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang +done +rm -rf waterfox-langpacks + +# Install langpack workaround (see #707100, #821169) +function create_default_langpack() { +language_long=$1 +language_short=$2 +cd %{buildroot}%{langpackdir} +ln -s langpack-$language_long@waterfox.xpi langpack-$language_short@waterfox.xpi +cd - +echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@waterfox.xpi" >> %{name}.lang +} + +# Table of fallbacks for each language +create_default_langpack "bn-IN" "bn" +create_default_langpack "es-AR" "es" +create_default_langpack "fy-NL" "fy" +create_default_langpack "ga-IE" "ga" +create_default_langpack "gu-IN" "gu" +create_default_langpack "hi-IN" "hi" +create_default_langpack "hy-AM" "hy" +create_default_langpack "nb-NO" "nb" +create_default_langpack "nn-NO" "nn" +create_default_langpack "pa-IN" "pa" +create_default_langpack "pt-PT" "pt" +create_default_langpack "sv-SE" "sv" +create_default_langpack "zh-TW" "zh" +%endif # build_langpacks + +mkdir -p %{buildroot}/%{mozappdir}/browser/features + +mkdir -p %{buildroot}/%{mozappdir}/browser/defaults/preferences + +# System config dir +mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/pref + +# System extensions +mkdir -p %{buildroot}%{_datadir}/waterfox/extensions/%{waterfox_app_id} +mkdir -p %{buildroot}%{_libdir}/waterfox/extensions/%{waterfox_app_id} + +# Copy over the LICENSE +install -p -c -m 644 LICENSE %{buildroot}/%{mozappdir} + +# Use the system hunspell dictionaries +rm -rf %{buildroot}%{mozappdir}/dictionaries +ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries + +%if %{run_tests} +# Add debuginfo for crash-stats.mozilla.com +mkdir -p %{buildroot}/test_results +cp test_results/* %{buildroot}/test_results +%endif + +# Default +cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences + +# Add distribution.ini +mkdir -p %{buildroot}%{mozappdir}/distribution +cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution + +# Remove copied libraries to speed up build +rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so +rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so +rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libxul.so +#--------------------------------------------------------------------- + +# Moves defaults/preferences to browser/defaults/preferences +%pretrans -p +require 'posix' +require 'os' +if (posix.stat("%{mozappdir}/browser/defaults/preferences", "type") == "link") then + posix.unlink("%{mozappdir}/browser/defaults/preferences") + posix.mkdir("%{mozappdir}/browser/defaults/preferences") + if (posix.stat("%{mozappdir}/defaults/preferences", "type") == "directory") then + for i,filename in pairs(posix.dir("%{mozappdir}/defaults/preferences")) do + os.rename("%{mozappdir}/defaults/preferences/"..filename, "%{mozappdir}/browser/defaults/preferences/"..filename) + end + f = io.open("%{mozappdir}/defaults/preferences/README","w") + if f then + f:write("Content of this directory has been moved to %{mozappdir}/browser/defaults/preferences.") + f:close() + end + end +end + + +%preun +# is it a final removal? +if [ $1 -eq 0 ]; then + rm -rf %{mozappdir}/components + rm -rf %{langpackdir} +fi + +%files -f %{name}.lang +%{_bindir}/waterfox +%{mozappdir}/waterfox +%{mozappdir}/waterfox-bin +%doc %{_mandir}/man1/* +%dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/* +%dir %{_datadir}/waterfox/extensions/* +%dir %{_libdir}/waterfox/extensions/* +%{_metainfodir}/*.appdata.xml +%{_datadir}/applications/*.desktop +%dir %{mozappdir} +%license %{mozappdir}/LICENSE +%{mozappdir}/browser/chrome +%{mozappdir}/browser/chrome.manifest +%{mozappdir}/browser/defaults/preferences/waterfox-chinfo-default-prefs.js +%{mozappdir}/browser/features +%{mozappdir}/distribution/distribution.ini +# That's Windows only +%ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi +%attr(644, root, root) %{mozappdir}/browser/blocklist.xml +%dir %{mozappdir}/browser/extensions +%{mozappdir}/browser/extensions/* +%if %{build_langpacks} +%dir %{langpackdir} +%endif +%{mozappdir}/browser/omni.ja +%{mozappdir}/browser/icons +%{mozappdir}/chrome.manifest +%{mozappdir}/run-mozilla.sh +%{mozappdir}/application.ini +%exclude %{mozappdir}/removed-files +%{_datadir}/icons/hicolor/16x16/apps/waterfox.png +%{_datadir}/icons/hicolor/22x22/apps/waterfox.png +%{_datadir}/icons/hicolor/24x24/apps/waterfox.png +%{_datadir}/icons/hicolor/256x256/apps/waterfox.png +%{_datadir}/icons/hicolor/32x32/apps/waterfox.png +%{_datadir}/icons/hicolor/48x48/apps/waterfox.png +%{mozappdir}/*.so +%{mozappdir}/gtk2/*.so +%{mozappdir}/defaults/pref/channel-prefs.js +%{mozappdir}/dependentlibs.list +%{mozappdir}/dictionaries +%{mozappdir}/omni.ja +%{mozappdir}/platform.ini +%{mozappdir}/plugin-container +%{mozappdir}/gmp-clearkey +%{mozappdir}/fonts/EmojiOneMozilla.ttf +%if !%{?system_libicu} +%{mozappdir}/icudt*.dat +%endif +%if !%{?system_nss} +%{mozappdir}/libfreeblpriv3.chk +%{mozappdir}/libnssdbm3.chk +%{mozappdir}/libsoftokn3.chk +%exclude %{mozappdir}/libnssckbi.so +%endif + +#--------------------------------------------------------------------- + +%changelog +* Sun Sep 09 2018 Phantom X - 56.2.2-4.20180908git2294d45 +- New snapshot +- clang only build switch + +* Sun Jul 15 2018 Phantom X - 56.2.2-3.20180807git9a88873 +- Crash fixes + +* Sun Jul 15 2018 Phantom X - 56.2.2-2.20180713giteb9e7d6 +- New release + +* Thu Jul 05 2018 Phantom X - 56.2.2-1.20180618gitb7b9ee7 +- New release/snapshot + +* Wed Jul 04 2018 Phantom X - 56.2.1-2.20180618git75c40de +- New snapshot + +* Tue Jun 19 2018 Phantom X - 56.2.1-1.20180618gitff88ad0 +- New release/snapshot + +* Sat Jun 09 2018 Phantom X - 56.2.0-3.20180530gitf435a82 +- New release/snapshot + +* Tue May 29 2018 Phantom X - 56.2.0-2.20180527git01e6727 +- New release/snapshot +- Update patchset + +* Tue May 15 2018 Phantom X - 56.2.0-1.20180514git4368983 +- New release/snapshot +- Update patchset + +* Mon May 14 2018 Phantom X - 56.1.0-7.20180514git94abeb3 +- New snapshot +- Update patchset +- Rebrand waterfox.sh.in + +* Sat May 12 2018 Phantom X - 56.1.0-6.20180511git2bb1a86 +- New snapshot +- Update patchset + +* Tue May 01 2018 Phantom X - 56.1.0-5.20180430gitd5c2541 +- New snapshot +- Update patchset +- Enable system webp + +* Tue Apr 24 2018 Phantom X - 56.1.0-4.20180419git8864091 +- Some more FreeBSD backport patches, BR: patchutils +- Enable ogg/vorbis, BR: pkgconfig(vorbis) + +* Thu Apr 19 2018 Phantom X - 56.1.0-3.20180419git8864091 +- Apply most of FreeBSD backport patches +- Enable system libevent and harfbuzz + +* Sat Apr 14 2018 Phantom X - 56.1.0-2.20180412gita52b5ea +- Build latest snapshot for servo fixes +- Drop unneeded patches +- gcc 8 fix + +* Fri Apr 06 2018 Phantom X - 56.1.0-1 +- 56.1.0 + +* Fri Feb 02 2018 Phantom X - 56.0.4-1 +- 56.0.4 + +* Fri Jan 12 2018 Phantom X - 56.0.3-1 +- 56.0.3 + +* Fri Jan 05 2018 Phantom X - 56.0.2-1 +- 56.0.2 +- Fix release tarball support +- Unused patches cleanup +- Fix man + +* Wed Dec 27 2017 Phantom X - 56.0.1-4.20171213git388770f +- New patch to ~/.waterfox/{extensions,plugins} and /usr/share/waterfox +- R: waterfox-filesystem + +* Tue Dec 26 2017 Phantom X - 56.0.1-3.20171213git388770f +- New snapshot +- BR: libevent, disabled, needs new releases +- Patch to use ~/.waterfox/extensions + +* Tue Dec 19 2017 Phantom X - 56.0.1-2.20171213git7b7aa8b +- Fixes borrowed from FreeBSD +- Enable stylo +- Do not use api keys from Fedora Firefox package +- Build with gold + +* Wed Dec 13 2017 Phantom X - 56.0.1-1.20171213git7b7aa8b +- First spec, borrowed from Fedora Firefox diff --git a/waterfox/wf-pull-547.patch b/waterfox/wf-pull-547.patch new file mode 100644 index 0000000..04650df --- /dev/null +++ b/waterfox/wf-pull-547.patch @@ -0,0 +1,168 @@ +From 74d572e611b12650b55d400fe2bbf350d392f26c Mon Sep 17 00:00:00 2001 +From: Toromino +Date: Fri, 11 May 2018 12:58:25 +0200 +Subject: [PATCH 1/3] Update GeckoProfileDirectories.java + +--- + .../src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java +index 2afb54bc4dd2..d7b2aaec7fa2 100644 +--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java ++++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoProfileDirectories.java +@@ -53,7 +53,7 @@ public NoSuchProfileException(String detailMessage) { + public boolean matches(INISection section); + } + +- private static final String MOZILLA_DIR_NAME = "mozilla"; ++ private static final String WATERFOX_DIR_NAME = "waterfox"; + + /** + * Returns true if the supplied profile entry represents the default profile. +@@ -116,14 +116,14 @@ public static String saltProfileName(final String name) { + */ + @RobocopTarget + public static File getMozillaDirectory(Context context) throws NoMozillaDirectoryException { +- final File mozillaDir = new File(context.getFilesDir(), MOZILLA_DIR_NAME); ++ final File mozillaDir = new File(context.getFilesDir(), WATERFOX_DIR_NAME); + if (mozillaDir.mkdirs() || mozillaDir.isDirectory()) { + return mozillaDir; + } + + // Although this leaks a path to the system log, the path is + // predictable (unlike a profile directory), so this is fine. +- throw new NoMozillaDirectoryException("Unable to create mozilla directory at " + mozillaDir.getAbsolutePath()); ++ throw new NoMozillaDirectoryException("Unable to create waterfox directory at " + mozillaDir.getAbsolutePath()); + } + + /** + +From 896a0eab58368c0862ef8c06224a287a8694d77a Mon Sep 17 00:00:00 2001 +From: Toromino +Date: Fri, 11 May 2018 13:31:20 +0200 +Subject: [PATCH 2/3] Update mozcrash.py + +--- + testing/mozbase/mozcrash/mozcrash/mozcrash.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/testing/mozbase/mozcrash/mozcrash/mozcrash.py b/testing/mozbase/mozcrash/mozcrash/mozcrash.py +index 2d778175bc43..8d2a4c4196fb 100644 +--- a/testing/mozbase/mozcrash/mozcrash/mozcrash.py ++++ b/testing/mozbase/mozcrash/mozcrash/mozcrash.py +@@ -521,18 +521,18 @@ def cleanup_pending_crash_reports(): + affecting test results; it is best to ensure that these are removed + before starting any browser tests. + +- Firefox stores pending crash reports in "/Crash Reports". ++ Waterfox stores pending crash reports in "/Crash Reports". + If the browser is not running, it cannot provide , so this + code tries to anticipate its value. + + See dom/system/OSFileConstants.cpp for platform variations of . + """ + if mozinfo.isWin: +- location = os.path.expanduser("~\\AppData\\Roaming\\Mozilla\\Firefox\\Crash Reports") ++ location = os.path.expanduser("~\\AppData\\Roaming\\Waterfox\\Crash Reports") + elif mozinfo.isMac: +- location = os.path.expanduser("~/Library/Application Support/firefox/Crash Reports") ++ location = os.path.expanduser("~/Library/Application Support/waterfox/Crash Reports") + else: +- location = os.path.expanduser("~/.mozilla/firefox/Crash Reports") ++ location = os.path.expanduser("~/.waterfox/Crash Reports") + logger = get_logger() + if os.path.exists(location): + try: + +From 17abfbf2f3fdab752dd0a4da125b227fbea6ed43 Mon Sep 17 00:00:00 2001 +From: Toromino +Date: Fri, 11 May 2018 13:53:08 +0200 +Subject: [PATCH 3/3] Update nsXREDirProvider.cpp + +--- + toolkit/xre/nsXREDirProvider.cpp | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +index d17632c375f0..282ff041b6b7 100644 +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -294,16 +294,16 @@ GetSystemParentDirectory(nsIFile** aFile) + #if defined(XP_MACOSX) + rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType, getter_AddRefs(localDir)); + if (NS_SUCCEEDED(rv)) { +- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Mozilla")); ++ rv = localDir->AppendNative(NS_LITERAL_CSTRING("Waterfox")); + } + #else + NS_NAMED_LITERAL_CSTRING(dirname, + #ifdef HAVE_USR_LIB64_DIR +- "/usr/lib64/mozilla" ++ "/usr/lib64/waterfox" + #elif defined(__OpenBSD__) || defined(__FreeBSD__) +- "/usr/local/lib/mozilla" ++ "/usr/local/lib/waterfox" + #else +- "/usr/lib/mozilla" ++ "/usr/lib/waterfox" + #endif + ); + rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir)); +@@ -415,7 +415,7 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, + rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), false); + if (NS_SUCCEEDED(rv)) { + #if defined(XP_MACOSX) +- rv = localDir->AppendNative(NS_LITERAL_CSTRING("Mozilla")); ++ rv = localDir->AppendNative(NS_LITERAL_CSTRING("Waterfox")); + if (NS_SUCCEEDED(rv)) { + rv = localDir->AppendNative(NS_LITERAL_CSTRING("NativeMessagingHosts")); + } +@@ -479,9 +479,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, + else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) { + #ifdef ENABLE_SYSTEM_EXTENSION_DIRS + #if defined(__OpenBSD__) || defined(__FreeBSD__) +- static const char *const sysLExtDir = "/usr/local/share/mozilla/extensions"; ++ static const char *const sysLExtDir = "/usr/local/share/waterfox/extensions"; + #else +- static const char *const sysLExtDir = "/usr/share/mozilla/extensions"; ++ static const char *const sysLExtDir = "/usr/share/waterfox/extensions"; + #endif + return NS_NewNativeLocalFile(nsDependentCString(sysLExtDir), + false, aFile); +@@ -1289,7 +1289,7 @@ nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult) + gAppData->name)))) { + return NS_ERROR_FAILURE; + } +- } else if (NS_FAILED(localDir->AppendNative(NS_LITERAL_CSTRING("Mozilla")))) { ++ } else if (NS_FAILED(localDir->AppendNative(NS_LITERAL_CSTRING("Waterfox")))) { + return NS_ERROR_FAILURE; + } + +@@ -1314,7 +1314,7 @@ nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult) + // under SOFTWARE\Mozilla. + wchar_t regPath[1024] = { L'\0' }; + swprintf_s(regPath, mozilla::ArrayLength(regPath), L"SOFTWARE\\%S\\%S\\TaskBarIDs", +- (hasVendor ? gAppData->vendor : "Mozilla"), MOZ_APP_BASENAME); ++ (hasVendor ? gAppData->vendor : "Waterfox"), MOZ_APP_BASENAME); + + // If we pre-computed the hash, grab it from the registry. + pathHashResult = GetCachedHash(HKEY_LOCAL_MACHINE, +@@ -1640,7 +1640,7 @@ nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) + + #if defined (XP_MACOSX) || defined(XP_WIN) + +- static const char* const sXR = "Mozilla"; ++ static const char* const sXR = "Waterfox"; + rv = aFile->AppendNative(nsDependentCString(sXR)); + NS_ENSURE_SUCCESS(rv, rv); + +@@ -1729,7 +1729,7 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile, + // XXXsmaug ...and the rest of the profile creation! + MOZ_ASSERT(!aAppName, + "Profile creation for external applications is not implemented!"); +- rv = aFile->AppendNative(nsDependentCString("mozilla")); ++ rv = aFile->AppendNative(nsDependentCString("waterfox")); + NS_ENSURE_SUCCESS(rv, rv); + #elif defined(XP_UNIX) + nsAutoCString folder; diff --git a/waterfox/xulrunner-24.0-jemalloc-ppc.patch b/waterfox/xulrunner-24.0-jemalloc-ppc.patch new file mode 100644 index 0000000..be6f259 --- /dev/null +++ b/waterfox/xulrunner-24.0-jemalloc-ppc.patch @@ -0,0 +1,12 @@ +diff -up firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc firefox-48.0/memory/mozjemalloc/jemalloc.c +--- firefox-48.0/memory/mozjemalloc/mozjemalloc.cpp.jemalloc-ppc 2016-07-26 10:51:46.385434384 +0200 ++++ firefox-48.0/memory/mozjemalloc/mozjemalloc.cpp 2016-07-26 10:53:49.061023106 +0200 +@@ -1090,7 +1090,7 @@ static const bool config_recycle = false + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ +-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) ++#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 + #endif + -- cgit From 3a898b2efff84d117c670a8e82b202d7f107b37a Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 14 Sep 2018 13:28:57 -0400 Subject: import srpm from copr chinforpms/waterfox for some reason I was unable to download the tarball of FreeBSD patches so I extracted it from the copr waterfox build's srpm and added it here. --- waterfox/.gitignore | 3 -- waterfox/issue2947383002_1.diff | 60 ----------------------- waterfox/waterfox-FreeBSD-patches-r478244.tar.xz | Bin 0 -> 359576 bytes 3 files changed, 63 deletions(-) delete mode 100644 waterfox/.gitignore delete mode 100644 waterfox/issue2947383002_1.diff create mode 100644 waterfox/waterfox-FreeBSD-patches-r478244.tar.xz (limited to 'waterfox') diff --git a/waterfox/.gitignore b/waterfox/.gitignore deleted file mode 100644 index 44c08e1..0000000 --- a/waterfox/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/FreeBSD-*.patch -/wf-*.patch -!/wf-pull-547.patch diff --git a/waterfox/issue2947383002_1.diff b/waterfox/issue2947383002_1.diff deleted file mode 100644 index c41a964..0000000 --- a/waterfox/issue2947383002_1.diff +++ /dev/null @@ -1,60 +0,0 @@ -Index: webrtc/common_audio/vad/vad_core.c -diff --git a/webrtc/common_audio/vad/vad_core.c b/webrtc/common_audio/vad/vad_core.c -index 0340165eb5050ec9fbc386f6d373d0d90a4868f1..1a3889c36787f7bf993692e8fe7781c2ae35e2c2 100644 ---- a/webrtc/common_audio/vad/vad_core.c -+++ b/webrtc/common_audio/vad/vad_core.c -@@ -115,8 +115,8 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset, - // undefined behavior, so not a good idea; this just makes UBSan ignore the - // violation, so that our old code can continue to do what it's always been - // doing.) --static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) -- RTC_NO_SANITIZE("signed-integer-overflow") { -+static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") -+ OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) { - return a * b; - } - -Index: webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c -diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c -index 039bbc8af7ec26e286dfc94b4383428e5e6e863b..dc8bcf3f481012caab8718430aa9242cf91ad480 100644 ---- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c -+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c -@@ -193,16 +193,16 @@ static void CalcCorrelation(int32_t *PSpecQ12, int32_t *CorrQ7) - // undefined behavior, so not a good idea; this just makes UBSan ignore the - // violations, so that our old code can continue to do what it's always been - // doing.) --static inline int32_t OverflowingMulS16S32ToS32(int16_t a, int32_t b) -- RTC_NO_SANITIZE("signed-integer-overflow") { -+static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") -+ OverflowingMulS16S32ToS32(int16_t a, int32_t b) { - return a * b; - } --static inline int32_t OverflowingAddS32S32ToS32(int32_t a, int32_t b) -- RTC_NO_SANITIZE("signed-integer-overflow") { -+static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") -+ OverflowingAddS32S32ToS32(int32_t a, int32_t b) { - return a + b; - } --static inline int32_t OverflowingSubS32S32ToS32(int32_t a, int32_t b) -- RTC_NO_SANITIZE("signed-integer-overflow") { -+static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") -+ OverflowingSubS32S32ToS32(int32_t a, int32_t b) { - return a - b; - } - -Index: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c -diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c -index 2b92acb64a3d7dd268574abb57a24850b60cb3d1..b69a885f34de9eaa762a69f11d84cc8bec637376 100644 ---- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c -+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c -@@ -209,8 +209,8 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef, - // Left shift of an int32_t that's allowed to overflow. (It's still undefined - // behavior, so not a good idea; this just makes UBSan ignore the violation, so - // that our old code can continue to do what it's always been doing.) --static inline int32_t OverflowingLShiftS32(int32_t x, int shift) -- RTC_NO_SANITIZE("shift") { -+static inline int32_t RTC_NO_SANITIZE("shift") -+ OverflowingLShiftS32(int32_t x, int shift) { - return x << shift; - } - diff --git a/waterfox/waterfox-FreeBSD-patches-r478244.tar.xz b/waterfox/waterfox-FreeBSD-patches-r478244.tar.xz new file mode 100644 index 0000000..ecccbb6 Binary files /dev/null and b/waterfox/waterfox-FreeBSD-patches-r478244.tar.xz differ -- cgit From 5181b8af073e833b07b4367e08d0192d73803242 Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 14 Sep 2018 15:10:28 -0400 Subject: change required versions for libevent and ogg --- waterfox/waterfox.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'waterfox') diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec index 441d647..1ad1cda 100644 --- a/waterfox/waterfox.spec +++ b/waterfox/waterfox.spec @@ -79,7 +79,8 @@ %global harfbuzz_version 1.4.7 %endif %if %{?system_libevent} -%global libevent_version 2.1.8 +# fc28 provided is 2.1.8, fc27 is 2.0.22 +%global libevent_version 2.0.22 %endif %global libnotify_version 0.7.0 %if %{?system_libvpx} @@ -89,7 +90,8 @@ %global webp_version 1.0.0 %endif %if %{?system_vorbis} -%global ogg_version 1.3.3 +# decrease this to fc28 libogg version and hope it works 2018-09-14 +%global ogg_version 1.3.2 %global vorbis_version 1.3.5 %endif -- cgit