diff --git a/.gitignore b/.gitignore index 7b987f4..241f013 100644 --- a/.gitignore +++ b/.gitignore @@ -166,3 +166,133 @@ /icecat-78.14.0-rh1.tar.bz2 /icecat-78.15.0-langpacks.tar.gz /icecat-78.15.0-rh1.tar.bz2 +/icecat-91.2.0-langpacks.tar.gz +/icecat-91.2.0-rh1.tar.bz2 +/icecat-91.3.0-langpacks.tar.gz +/icecat-91.3.0-rh1.tar.bz2 +/icecat-91.4.0-langpacks.tar.gz +/icecat-91.4.0-rh1.tar.bz2 +/icecat-91.4.1-langpacks.tar.gz +/icecat-91.4.1-rh1.tar.bz2 +/icecat-91.5.0-langpacks.tar.gz +/icecat-91.5.0-rh1.tar.bz2 +/icecat-91.6.0-langpacks.tar.gz +/icecat-91.6.0-rh1.tar.bz2 +/icecat-91.6.1-langpacks.tar.gz +/icecat-91.6.1-rh1.tar.bz2 +/icecat-91.7.0-langpacks.tar.gz +/icecat-91.7.0-rh1.tar.bz2 +/icecat-91.7.1-langpacks.tar.gz +/icecat-91.7.1-rh1.tar.bz2 +/icecat-91.8.0-langpacks.tar.gz +/icecat-91.8.0-rh1.tar.bz2 +/icecat-91.9.0-langpacks.tar.gz +/icecat-91.9.0-rh1.tar.bz2 +/icecat-91.9.1-langpacks.tar.gz +/icecat-91.9.1-rh1.tar.bz2 +/icecat-91.10.0-langpacks.tar.gz +/icecat-91.10.0-rh1.tar.bz2 +/icecat-91.10.0-rh2.tar.bz2 +/icecat-91.10.0-rh3.tar.bz2 +/icecat-91.11.0-langpacks.tar.gz +/icecat-91.11.0-rh1.tar.bz2 +/icecat-91.12.0-langpacks.tar.gz +/icecat-91.12.0-rh1.tar.bz2 +/icecat-91.13.0-langpacks.tar.gz +/icecat-91.13.0-rh1.tar.bz2 +/icecat-102.2.0-langpacks.tar.gz +/icecat-102.2.0-rh1.tar.bz2 +/icecat-102.3.0-langpacks.tar.gz +/icecat-102.3.0-rh1.tar.bz2 +/icecat-102.4.0-langpacks.tar.gz +/icecat-102.4.0-rh1.tar.bz2 +/icecat-102.5.0-langpacks.tar.gz +/icecat-102.5.0-rh1.tar.bz2 +/icecat-102.6.0-langpacks.tar.gz +/icecat-102.6.0-rh1.tar.bz2 +/icecat-102.7.0-langpacks.tar.gz +/icecat-102.7.0-rh1.tar.bz2 +/icecat-102.8.0-langpacks.tar.gz +/icecat-102.8.0-rh1.tar.bz2 +/icecat-102.9.0-langpacks.tar.gz +/icecat-102.9.0-rh1.tar.bz2 +/icecat-102.10.0-langpacks.tar.gz +/icecat-102.10.0-rh1.tar.bz2 +/icecat-102.11.0-langpacks.tar.gz +/icecat-102.11.0-rh1.tar.bz2 +/icecat-102.11.0-rh2.tar.bz2 +/icecat-102.12.0-langpacks.tar.gz +/icecat-102.12.0-rh1.tar.bz2 +/icecat-102.13.0-langpacks.tar.gz +/icecat-102.13.0-rh1.tar.bz2 +/icecat-102.14.0-langpacks.tar.gz +/icecat-102.14.0-rh1.tar.bz2 +/icecat-102.15.0-langpacks.tar.gz +/icecat-102.15.0-rh1.tar.bz2 +/icecat-115.3.1-langpacks.tar.gz +/icecat-115.3.1-rh1.tar.bz2 +/icecat-115.3.1-rh2.tar.bz2 +/icecat-115.4.0-langpacks.tar.gz +/icecat-115.4.0-rh1.tar.bz2 +/icecat-115.4.0-rh2.tar.bz2 +/icecat-115.5.0-langpacks.tar.gz +/icecat-115.5.0-rh1.tar.bz2 +/icecat-115.6.0-langpacks.tar.gz +/icecat-115.6.0-rh1.tar.bz2 +/icecat-115.7.0-langpacks.tar.gz +/icecat-115.7.0-rh1.tar.bz2 +/icecat-115.8.0-langpacks.tar.gz +/icecat-115.8.0-rh1.tar.bz2 +/icecat-115.9.0-langpacks.tar.gz +/icecat-115.9.0-rh1.tar.bz2 +/icecat-115.10.0-langpacks.tar.gz +/icecat-115.10.0-rh1.tar.bz2 +/icecat-115.11.0-langpacks.tar.gz +/icecat-115.11.0-rh1.tar.bz2 +/icecat-115.12.0-langpacks.tar.gz +/icecat-115.12.0-rh1.tar.bz2 +/icecat-115.13.0-langpacks.tar.gz +/icecat-115.13.0-rh1.tar.bz2 +/icecat-115.14.0-langpacks.tar.gz +/icecat-115.14.0-rh1.tar.bz2 +/icecat-115.15.0-langpacks.tar.gz +/icecat-115.15.0-rh1.tar.bz2 +/icecat-115.16.0-langpacks.tar.gz +/icecat-115.16.0-rh1.tar.bz2 +/icecat-115.16.1-langpacks.tar.gz +/icecat-115.16.1-rh1.tar.bz2 +/icecat-115.17.0-langpacks.tar.gz +/icecat-115.17.0-rh1.tar.bz2 +/icecat-115.18.0-langpacks.tar.gz +/icecat-115.18.0-rh1.tar.bz2 +/icecat-115.18.0-rh2.tar.bz2 +/icecat-115.19.0-langpacks.tar.gz +/icecat-115.19.0-rh1.tar.bz2 +/icecat-115.20.0-langpacks.tar.gz +/icecat-115.20.0-rh1.tar.bz2 +/icecat-115.21.0-langpacks.tar.gz +/icecat-115.21.0-rh1.tar.bz2 +/icecat-115.22.0-langpacks.tar.gz +/icecat-115.22.0-rh1.tar.bz2 +/icecat-115.23.0-langpacks.tar.gz +/icecat-115.23.0-rh1.tar.bz2 +/icecat-115.23.1-langpacks.tar.gz +/icecat-115.23.1-rh1.tar.bz2 +/icecat-115.24.0-langpacks.tar.gz +/icecat-115.24.0-rh1.tar.bz2 +/icecat-128.12.0-langpacks.tar.gz +/icecat-128.12.0-rh1.tar.bz2 +/icecat-128.13.0-langpacks.tar.gz +/icecat-128.13.0-rh1.tar.bz2 +/icecat-128.14.0-langpacks.tar.gz +/icecat-128.14.0-rh1.tar.bz2 +/icecat-140.3.0-langpacks.tar.gz +/icecat-140.3.0-rh1.tar.bz2 +/icecat-140.4.0-langpacks.tar.gz +/icecat-140.4.0-rh1.tar.bz2 +/icecat-140.5.0-langpacks.tar.gz +/icecat-140.5.0-rh1.tar.bz2 +/icecat-140.6.0-langpacks.tar.gz +/icecat-140.6.0-rh1.tar.bz2 +/icecat-140.7.0-langpacks.tar.gz +/icecat-140.7.0-rh1.tar.bz2 diff --git a/Bug-1238661_fix-mozillaSignalTrampoline-to-work-.patch b/Bug-1238661_fix-mozillaSignalTrampoline-to-work-.patch deleted file mode 100644 index 1e358a8..0000000 --- a/Bug-1238661_fix-mozillaSignalTrampoline-to-work-.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 -@@ -22,7 +22,7 @@ - void* aContext) { - asm volatile("nop; nop; nop; nop" : : : "memory"); - -- asm volatile("b %0" : : "X"(H) : "memory"); -+ asm volatile("bx %0" : : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) : "memory"); - } - - # define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline) diff --git a/README.md b/README.md index 4b63398..f490435 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,29 @@ Extensions included to this version of IceCat: GNU LibreJS aims to address the JavaScript problem described in the article "[The JavaScript Trap](https://www.gnu.org/philosophy/javascript-trap.html)" of Richard Stallman. - * HTTPS Everywhere - HTTPS Everywhere is an extension that encrypts your communications with - many major websites, making your browsing more secure. + * JShelter - * ViewTube + Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. - Watch videos from video sharing websites with extra options. * A set of companion extensions for LibreJS by Nathan Nichols are pre-installed, and provide workarounds to use some services at USPS, RSF.org, SumOfUs.org, pay.gov, McDonalds, goteo.org and Google Docs without using nonfree JavaScript. + * A series of configuration changes and tweaks were applied to ensure that IceCat does not initiate network connections that the user has not explicitly requested. This implies not downloading feeds, updates, blacklists or any other similar data needed during startup. + Origin of the name The name “IceCat” was coined to show our relationship to the Mozilla Firefox browser. Ice isn't Fire and a Cat isn't a Fox, so it is clearly a different package (we don't want Mozilla blamed for our mistakes, nor cause confusion with their trademarks), but is equally clearly intimately related (of course nearly all of the work comes from the Mozilla foundation effort, so we want to give credit). diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch deleted file mode 100644 index a63e3e8..0000000 --- a/build-aarch64-skia.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia firefox-72.0/gfx/skia/skia/include/private/SkHalf.h ---- firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia 2020-01-02 22:33:02.000000000 +0100 -+++ firefox-72.0/gfx/skia/skia/include/private/SkHalf.h 2020-01-03 09:00:37.537296105 +0100 -@@ -40,7 +40,7 @@ static inline Sk4h SkFloatToHalf_finite_ - - static inline Sk4f SkHalfToFloat_finite_ftz(uint64_t rgba) { - Sk4h hs = Sk4h::Load(&rgba); --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t fs; - asm ("fcvtl %[fs].4s, %[hs].4h \n" // vcvt_f32_f16(...) - : [fs] "=w" (fs) // =w: write-only NEON register -@@ -62,7 +62,7 @@ static inline Sk4f SkHalfToFloat_finite_ - } - - static inline Sk4h SkFloatToHalf_finite_ftz(const Sk4f& fs) { --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t vec = fs.fVec; - asm ("fcvtn %[vec].4h, %[vec].4s \n" // vcvt_f16_f32(vec) - : [vec] "+w" (vec)); // +w: read-write NEON register -diff -up firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h ---- firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2020-01-03 10:11:41.259219508 +0100 -@@ -1087,7 +1087,7 @@ SI F from_half(U16 h) { - } - - SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -+#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ - && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. - return vcvt_f16_f32(f); - -diff -up firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h ---- firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2020-01-03 10:11:53.513250979 +0100 -@@ -183,8 +183,6 @@ SI F F_from_Half(U16 half) { - SI U16 Half_from_F(F f) { - #if defined(USING_NEON_FP16) - return bit_pun(f); --#elif defined(USING_NEON_F16C) -- return (U16)vcvt_f16_f32(f); - #elif defined(USING_AVX512F) - return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); - #elif defined(USING_AVX_F16C) diff --git a/build-arm-libopus.patch b/build-arm-libopus.patch deleted file mode 100644 index 1b3f31b..0000000 --- a/build-arm-libopus.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old firefox-66.0/media/libopus/silk/arm/arm_silk_map.c ---- firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old 2019-03-12 21:07:35.356677522 +0100 -+++ firefox-66.0/media/libopus/silk/arm/arm_silk_map.c 2019-03-12 21:07:42.937693394 +0100 -@@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. - # include "config.h" - #endif - --#include "main_FIX.h" -+#include "fixed/main_FIX.h" - #include "NSQ.h" - #include "SigProc_FIX.h" - diff --git a/build-disable-elfhack.patch b/build-disable-elfhack.patch deleted file mode 100644 index a80c551..0000000 --- a/build-disable-elfhack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-65.0/toolkit/moz.configure.disable-elfhack firefox-65.0/toolkit/moz.configure ---- firefox-65.0/toolkit/moz.configure.disable-elfhack 2019-01-28 14:16:48.530345132 +0100 -+++ firefox-65.0/toolkit/moz.configure 2019-01-28 14:18:03.231029682 +0100 -@@ -1036,7 +1036,7 @@ with only_when('--enable-compile-environ - help='{Enable|Disable} elf hacks') - - set_config('USE_ELF_HACK', -- depends_if('--enable-elf-hack')(lambda _: True)) -+ depends_if('--enable-elf-hack')(lambda _: False)) - - - @depends(check_build_environment) diff --git a/firefox-disable-ffvpx-with-vapi.patch b/firefox-disable-ffvpx-with-vapi.patch deleted file mode 100644 index df179b0..0000000 --- a/firefox-disable-ffvpx-with-vapi.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/dom/media/platforms/PDMFactory.cpp b/dom/media/platforms/PDMFactory.cpp ---- a/dom/media/platforms/PDMFactory.cpp -+++ b/dom/media/platforms/PDMFactory.cpp -@@ -21,16 +21,17 @@ - #include "mozilla/GpuDecoderModule.h" - #include "mozilla/RemoteDecoderModule.h" - #include "mozilla/SharedThreadPool.h" - #include "mozilla/StaticPrefs_media.h" - #include "mozilla/StaticPtr.h" - #include "mozilla/SyncRunnable.h" - #include "mozilla/TaskQueue.h" - #include "mozilla/gfx/gfxVars.h" -+#include "gfxPlatformGtk.h" - - #ifdef XP_WIN - # include "WMFDecoderModule.h" - # include "mozilla/WindowsVersion.h" - #endif - #ifdef MOZ_FFVPX - # include "FFVPXRuntimeLinker.h" - #endif -@@ -362,17 +363,18 @@ void PDMFactory::CreatePDMs() { - #endif - #ifdef MOZ_OMX - if (StaticPrefs::media_omx_enabled()) { - m = OmxDecoderModule::Create(); - StartupPDM(m); - } - #endif - #ifdef MOZ_FFVPX -- if (StaticPrefs::media_ffvpx_enabled()) { -+ if (StaticPrefs::media_ffvpx_enabled() && -+ !gfxPlatformGtk::GetPlatform()->UseWaylandHardwareVideoDecoding()) { - m = FFVPXRuntimeLinker::CreateDecoderModule(); - StartupPDM(m); - } - #endif - #ifdef MOZ_FFMPEG - if (StaticPrefs::media_ffmpeg_enabled()) { - m = FFmpegRuntimeLinker::CreateDecoderModule(); - mFFmpegFailedToLoad = !StartupPDM(m); diff --git a/firefox-nss-version.patch b/firefox-nss-version.patch deleted file mode 100644 index fee93bb..0000000 --- a/firefox-nss-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-78.0/toolkit/moz.configure.nss-version firefox-78.0/toolkit/moz.configure ---- firefox-78.0/toolkit/moz.configure.nss-version 2020-06-30 08:47:09.657501414 +0200 -+++ firefox-78.0/toolkit/moz.configure 2020-06-30 08:47:12.652510169 +0200 -@@ -2089,7 +2089,7 @@ option('--with-system-nss', help='Use sy - - imply_option('--with-system-nspr', True, when='--with-system-nss') - --nss_pkg = pkg_check_modules('NSS', 'nss >= 3.53.1', when='--with-system-nss', config=False) -+nss_pkg = pkg_check_modules('NSS', 'nss >= 3.53.0', when='--with-system-nss', config=False) - - set_config('MOZ_SYSTEM_NSS', True, when='--with-system-nss') - diff --git a/firefox-pipewire.patch b/firefox-pipewire.patch deleted file mode 100644 index 0844209..0000000 --- a/firefox-pipewire.patch +++ /dev/null @@ -1,846 +0,0 @@ -diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index 2081d0c683a4..641133bf1ea4 100644 ---- a/config/system-headers.mozbuild -+++ b/config/system-headers.mozbuild -@@ -314,6 +314,7 @@ system_headers = [ - 'Gestalt.h', - 'getopt.h', - 'gio/gio.h', -+ 'gio/gunixfdlist.h', - 'glibconfig.h', - 'glib.h', - 'glib-object.h', -@@ -607,6 +608,7 @@ system_headers = [ - 'Pgenerr.h', - 'PGenErr.h', - 'Ph.h', -+ 'pipewire/pipewire.h', - 'pixman.h', - 'pk11func.h', - 'pk11pqg.h', -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn -index ba885217b3ba..201d3b755221 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn -@@ -158,7 +158,7 @@ if (rtc_include_tests) { - if (is_linux) { - if (rtc_use_pipewire) { - pkg_config("pipewire") { -- packages = [ "libpipewire-0.2" ] -+ packages = [ "libpipewire-0.3" ] - - defines = [ "WEBRTC_USE_PIPEWIRE" ] - } -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -index 90b40431c7e4..d844aa79d591 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -@@ -194,6 +194,30 @@ if CONFIG["OS_TARGET"] == "Linux": - "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc" - ] - -+# PipeWire specific files -+if CONFIG["OS_TARGET"] == "Linux": -+ -+ DEFINES["WEBRTC_USE_PIPEWIRE"] = "1" -+ -+ OS_LIBS += [ -+ "rt", -+ "pipewire-0.3", -+ "glib-2.0", -+ "gio-2.0", -+ "gobject-2.0" -+ ] -+ -+ CXXFLAGS += CONFIG['TK_CFLAGS'] -+ CXXFLAGS += [ "-I/usr/include/pipewire-0.3" ] -+ CXXFLAGS += [ "-I/usr/include/spa-0.2" ] -+ -+ UNIFIED_SOURCES += [ -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc" -+ ] -+ -+ - if CONFIG["OS_TARGET"] == "NetBSD": - - DEFINES["USE_X11"] = "1" -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h -index 1eb8ead26efa..316468eed1fc 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h -@@ -141,7 +141,7 @@ class DesktopCaptureOptions { - bool disable_effects_ = true; - bool detect_updated_region_ = false; - #if defined(WEBRTC_USE_PIPEWIRE) -- bool allow_pipewire_ = false; -+ bool allow_pipewire_ = true; - #endif - }; - -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc -index 379341c833de..76349f1fbd4d 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc -@@ -15,8 +15,11 @@ - - #include - #include --#include --#include -+ -+#include -+#include -+#include -+#include - - #include - #include -@@ -36,31 +39,36 @@ const char kSessionInterfaceName[] = "org.freedesktop.portal.Session"; - const char kRequestInterfaceName[] = "org.freedesktop.portal.Request"; - const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast"; - --// static --void BaseCapturerPipeWire::OnStateChanged(void* data, -- pw_remote_state old_state, -- pw_remote_state state, -- const char* error_message) { -- BaseCapturerPipeWire* that = static_cast(data); -- RTC_DCHECK(that); - -- switch (state) { -- case PW_REMOTE_STATE_ERROR: -- RTC_LOG(LS_ERROR) << "PipeWire remote state error: " << error_message; -- break; -- case PW_REMOTE_STATE_CONNECTED: -- RTC_LOG(LS_INFO) << "PipeWire remote state: connected."; -- that->CreateReceivingStream(); -- break; -- case PW_REMOTE_STATE_CONNECTING: -- RTC_LOG(LS_INFO) << "PipeWire remote state: connecting."; -+// static -+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) { -+ struct dma_buf_sync sync = { 0 }; -+ -+ sync.flags = start_or_end | DMA_BUF_SYNC_READ; -+ -+ while(true) { -+ int ret; -+ ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync); -+ if (ret == -1 && errno == EINTR) { -+ continue; -+ } else if (ret == -1) { -+ RTC_LOG(LS_ERROR) << "Failed to synchronize DMA buffer: " << g_strerror(errno); - break; -- case PW_REMOTE_STATE_UNCONNECTED: -- RTC_LOG(LS_INFO) << "PipeWire remote state: unconnected."; -+ } else { - break; -+ } - } - } - -+// static -+void BaseCapturerPipeWire::OnCoreError(void *data, -+ uint32_t id, -+ int seq, -+ int res, -+ const char *message) { -+ RTC_LOG(LS_ERROR) << "core error: " << message; -+} -+ - // static - void BaseCapturerPipeWire::OnStreamStateChanged(void* data, - pw_stream_state old_state, -@@ -73,76 +81,54 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data, - case PW_STREAM_STATE_ERROR: - RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message; - break; -- case PW_STREAM_STATE_CONFIGURE: -- pw_stream_set_active(that->pw_stream_, true); -- break; -- case PW_STREAM_STATE_UNCONNECTED: -- case PW_STREAM_STATE_CONNECTING: -- case PW_STREAM_STATE_READY: - case PW_STREAM_STATE_PAUSED: - case PW_STREAM_STATE_STREAMING: -+ case PW_STREAM_STATE_UNCONNECTED: -+ case PW_STREAM_STATE_CONNECTING: - break; - } - } - - // static --void BaseCapturerPipeWire::OnStreamFormatChanged(void* data, -- const struct spa_pod* format) { -+void BaseCapturerPipeWire::OnStreamParamChanged(void *data, uint32_t id, -+ const struct spa_pod *format) { - BaseCapturerPipeWire* that = static_cast(data); - RTC_DCHECK(that); - -- RTC_LOG(LS_INFO) << "PipeWire stream format changed."; -+ RTC_LOG(LS_INFO) << "PipeWire stream param changed."; - -- if (!format) { -- pw_stream_finish_format(that->pw_stream_, /*res=*/0, /*params=*/nullptr, -- /*n_params=*/0); -+ if (!format || id != SPA_PARAM_Format) { - return; - } - -- that->spa_video_format_ = new spa_video_info_raw(); -- spa_format_video_raw_parse(format, that->spa_video_format_, -- &that->pw_type_->format_video); -+ spa_format_video_raw_parse(format, &that->spa_video_format_); - -- auto width = that->spa_video_format_->size.width; -- auto height = that->spa_video_format_->size.height; -+ auto width = that->spa_video_format_.size.width; -+ auto height = that->spa_video_format_.size.height; - auto stride = SPA_ROUND_UP_N(width * kBytesPerPixel, 4); - auto size = height * stride; - -+ that->desktop_size_ = DesktopSize(width, height); -+ - uint8_t buffer[1024] = {}; - auto builder = spa_pod_builder{buffer, sizeof(buffer)}; - - // Setup buffers and meta header for new format. -- const struct spa_pod* params[2]; -- params[0] = reinterpret_cast(spa_pod_builder_object( -- &builder, -- // id to enumerate buffer requirements -- that->pw_core_type_->param.idBuffers, -- that->pw_core_type_->param_buffers.Buffers, -- // Size: specified as integer (i) and set to specified size -- ":", that->pw_core_type_->param_buffers.size, "i", size, -- // Stride: specified as integer (i) and set to specified stride -- ":", that->pw_core_type_->param_buffers.stride, "i", stride, -- // Buffers: specifies how many buffers we want to deal with, set as -- // integer (i) where preferred number is 8, then allowed number is defined -- // as range (r) from min and max values and it is undecided (u) to allow -- // negotiation -- ":", that->pw_core_type_->param_buffers.buffers, "iru", 8, -- SPA_POD_PROP_MIN_MAX(1, 32), -- // Align: memory alignment of the buffer, set as integer (i) to specified -- // value -- ":", that->pw_core_type_->param_buffers.align, "i", 16)); -- params[1] = reinterpret_cast(spa_pod_builder_object( -- &builder, -- // id to enumerate supported metadata -- that->pw_core_type_->param.idMeta, that->pw_core_type_->param_meta.Meta, -- // Type: specified as id or enum (I) -- ":", that->pw_core_type_->param_meta.type, "I", -- that->pw_core_type_->meta.Header, -- // Size: size of the metadata, specified as integer (i) -- ":", that->pw_core_type_->param_meta.size, "i", -- sizeof(struct spa_meta_header))); -- -- pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2); -+ const struct spa_pod* params[3]; -+ params[0] = reinterpret_cast(spa_pod_builder_add_object(&builder, -+ SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, -+ SPA_PARAM_BUFFERS_size, SPA_POD_Int(size), -+ SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride), -+ SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(8, 1, 32))); -+ params[1] = reinterpret_cast(spa_pod_builder_add_object(&builder, -+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta, -+ SPA_PARAM_META_type, SPA_POD_Id(SPA_META_Header), -+ SPA_PARAM_META_size, SPA_POD_Int(sizeof(struct spa_meta_header)))); -+ params[2] = reinterpret_cast(spa_pod_builder_add_object(&builder, -+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta, -+ SPA_PARAM_META_type, SPA_POD_Id (SPA_META_VideoCrop), -+ SPA_PARAM_META_size, SPA_POD_Int (sizeof(struct spa_meta_region)))); -+ pw_stream_update_params(that->pw_stream_, params, 3); - } - - // static -@@ -150,15 +136,25 @@ void BaseCapturerPipeWire::OnStreamProcess(void* data) { - BaseCapturerPipeWire* that = static_cast(data); - RTC_DCHECK(that); - -- pw_buffer* buf = nullptr; -+ struct pw_buffer *next_buffer; -+ struct pw_buffer *buffer = nullptr; -+ -+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); -+ while (next_buffer) { -+ buffer = next_buffer; -+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); - -- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { -+ if (next_buffer) -+ pw_stream_queue_buffer (that->pw_stream_, buffer); -+ } -+ -+ if (!buffer) { - return; - } - -- that->HandleBuffer(buf); -+ that->HandleBuffer(buffer); - -- pw_stream_queue_buffer(that->pw_stream_, buf); -+ pw_stream_queue_buffer(that->pw_stream_, buffer); - } - - BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type) -@@ -169,38 +165,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { - pw_thread_loop_stop(pw_main_loop_); - } - -- if (pw_type_) { -- delete pw_type_; -- } -- -- if (spa_video_format_) { -- delete spa_video_format_; -- } -- - if (pw_stream_) { - pw_stream_destroy(pw_stream_); - } - -- if (pw_remote_) { -- pw_remote_destroy(pw_remote_); -+ if (pw_core_) { -+ pw_core_disconnect(pw_core_); - } - -- if (pw_core_) { -- pw_core_destroy(pw_core_); -+ if (pw_context_) { -+ pw_context_destroy(pw_context_); - } - - if (pw_main_loop_) { - pw_thread_loop_destroy(pw_main_loop_); - } - -- if (pw_loop_) { -- pw_loop_destroy(pw_loop_); -- } -- -- if (current_frame_) { -- free(current_frame_); -- } -- - if (start_request_signal_id_) { - g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_); - } -@@ -250,27 +230,35 @@ void BaseCapturerPipeWire::InitPortal() { - void BaseCapturerPipeWire::InitPipeWire() { - pw_init(/*argc=*/nullptr, /*argc=*/nullptr); - -- pw_loop_ = pw_loop_new(/*properties=*/nullptr); -- pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop"); -- -- pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr); -- pw_core_type_ = pw_core_get_type(pw_core_); -- pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0); -+ pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); -+ pw_context_ = pw_context_new(pw_thread_loop_get_loop(pw_main_loop_), nullptr, 0); -+ if (!pw_context_) { -+ RTC_LOG(LS_ERROR) << "Failed to create PipeWire context"; -+ return; -+ } - -- InitPipeWireTypes(); -+ pw_core_ = pw_context_connect(pw_context_, nullptr, 0); -+ if (!pw_core_) { -+ RTC_LOG(LS_ERROR) << "Failed to connect PipeWire context"; -+ return; -+ } - - // Initialize event handlers, remote end and stream-related. -- pw_remote_events_.version = PW_VERSION_REMOTE_EVENTS; -- pw_remote_events_.state_changed = &OnStateChanged; -+ pw_core_events_.version = PW_VERSION_CORE_EVENTS; -+ pw_core_events_.error = &OnCoreError; - - pw_stream_events_.version = PW_VERSION_STREAM_EVENTS; - pw_stream_events_.state_changed = &OnStreamStateChanged; -- pw_stream_events_.format_changed = &OnStreamFormatChanged; -+ pw_stream_events_.param_changed = &OnStreamParamChanged; - pw_stream_events_.process = &OnStreamProcess; - -- pw_remote_add_listener(pw_remote_, &spa_remote_listener_, &pw_remote_events_, -- this); -- pw_remote_connect_fd(pw_remote_, pw_fd_); -+ pw_core_add_listener(pw_core_, &spa_core_listener_, &pw_core_events_, this); -+ -+ pw_stream_ = CreateReceivingStream(); -+ if (!pw_stream_) { -+ RTC_LOG(LS_ERROR) << "Failed to create PipeWire stream"; -+ return; -+ } - - if (pw_thread_loop_start(pw_main_loop_) < 0) { - RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop"; -@@ -278,81 +266,132 @@ void BaseCapturerPipeWire::InitPipeWire() { - } - } - --void BaseCapturerPipeWire::InitPipeWireTypes() { -- spa_type_map* map = pw_core_type_->map; -- pw_type_ = new PipeWireType(); -- -- spa_type_media_type_map(map, &pw_type_->media_type); -- spa_type_media_subtype_map(map, &pw_type_->media_subtype); -- spa_type_format_video_map(map, &pw_type_->format_video); -- spa_type_video_format_map(map, &pw_type_->video_format); --} -- --void BaseCapturerPipeWire::CreateReceivingStream() { -+pw_stream* BaseCapturerPipeWire::CreateReceivingStream() { - spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; -- spa_rectangle pwScreenBounds = -- spa_rectangle{static_cast(desktop_size_.width()), -- static_cast(desktop_size_.height())}; -+ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX}; - -- spa_fraction pwFrameRateMin = spa_fraction{0, 1}; -- spa_fraction pwFrameRateMax = spa_fraction{60, 1}; -+ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr); - -- pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1", -- /*end of varargs*/ nullptr); -- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps); -+ if (!stream) { -+ RTC_LOG(LS_ERROR) << "Could not create receiving stream."; -+ return nullptr; -+ } - - uint8_t buffer[1024] = {}; -- const spa_pod* params[1]; -- spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)}; -- params[0] = reinterpret_cast(spa_pod_builder_object( -- &builder, -- // id to enumerate formats -- pw_core_type_->param.idEnumFormat, pw_core_type_->spa_format, "I", -- pw_type_->media_type.video, "I", pw_type_->media_subtype.raw, -- // Video format: specified as id or enum (I), preferred format is BGRx, -- // then allowed formats are enumerated (e) and the format is undecided (u) -- // to allow negotiation -- ":", pw_type_->format_video.format, "Ieu", pw_type_->video_format.BGRx, -- SPA_POD_PROP_ENUM(2, pw_type_->video_format.RGBx, -- pw_type_->video_format.BGRx), -- // Video size: specified as rectangle (R), preferred size is specified as -- // first parameter, then allowed size is defined as range (r) from min and -- // max values and the format is undecided (u) to allow negotiation -- ":", pw_type_->format_video.size, "Rru", &pwScreenBounds, 2, -- &pwMinScreenBounds, &pwScreenBounds, -- // Frame rate: specified as fraction (F) and set to minimum frame rate -- // value -- ":", pw_type_->format_video.framerate, "F", &pwFrameRateMin, -- // Max frame rate: specified as fraction (F), preferred frame rate is set -- // to maximum value, then allowed frame rate is defined as range (r) from -- // min and max values and it is undecided (u) to allow negotiation -- ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2, -- &pwFrameRateMin, &pwFrameRateMax)); -- -- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, -- this); -+ const spa_pod* params[2]; -+ spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer, sizeof (buffer)); -+ -+ params[0] = reinterpret_cast(spa_pod_builder_add_object(&builder, -+ SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat, -+ SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video), -+ SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw), -+ SPA_FORMAT_VIDEO_format, SPA_POD_CHOICE_ENUM_Id(5, SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_RGBx, SPA_VIDEO_FORMAT_RGBA, -+ SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_BGRA), -+ SPA_FORMAT_VIDEO_size, SPA_POD_CHOICE_RANGE_Rectangle(&pwMinScreenBounds, -+ &pwMinScreenBounds, -+ &pwMaxScreenBounds), -+ 0)); -+ pw_stream_add_listener(stream, &spa_stream_listener_, &pw_stream_events_, this); -+ - pw_stream_flags flags = static_cast( -- PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | -- PW_STREAM_FLAG_MAP_BUFFERS); -- if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr, -- flags, params, -- /*n_params=*/1) != 0) { -+ PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE); -+ -+ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, pw_stream_node_id_, PW_STREAM_FLAG_AUTOCONNECT, params, 1) != 0) { - RTC_LOG(LS_ERROR) << "Could not connect receiving stream."; - portal_init_failed_ = true; -- return; - } -+ -+ return stream; - } - - void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { -+ struct spa_meta_region* video_crop; - spa_buffer* spaBuffer = buffer->buffer; -- void* src = nullptr; -+ uint8_t *map = nullptr; -+ uint8_t* src = nullptr; -+ uint8_t* dst = nullptr; -+ -+ if (spaBuffer->datas[0].chunk->size == 0) { -+ map = nullptr; -+ src = nullptr; -+ } else if (spaBuffer->datas[0].type == SPA_DATA_MemFd) { -+ map = static_cast(mmap( -+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, -+ PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0)); -+ -+ if (map == MAP_FAILED) { -+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno); -+ return; -+ } -+ -+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t); -+ } else if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) { -+ int fd; -+ fd = spaBuffer->datas[0].fd; - -- if (!(src = spaBuffer->datas[0].data)) { -+ map = static_cast(mmap( -+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, -+ PROT_READ, MAP_PRIVATE, fd, 0)); -+ -+ if (map == MAP_FAILED) { -+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno); -+ return; -+ } -+ -+ SyncDmaBuf(fd, DMA_BUF_SYNC_START); -+ -+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t); -+ } else if (spaBuffer->datas[0].type == SPA_DATA_MemPtr) { -+ map = nullptr; -+ src = static_cast(spaBuffer->datas[0].data); -+ } else { - return; - } - -- uint32_t maxSize = spaBuffer->datas[0].maxsize; -- int32_t srcStride = spaBuffer->datas[0].chunk->stride; -+ if (!src) { -+ return; -+ } -+ -+ DesktopSize prev_crop_size = DesktopSize(0, 0); -+ if (video_crop_size_initialized_) { -+ prev_crop_size = video_crop_size_; -+ } -+ -+ if ((video_crop = static_cast( -+ spa_buffer_find_meta_data(spaBuffer, SPA_META_VideoCrop, sizeof(*video_crop))))) { -+ RTC_DCHECK(video_crop->region.size.width <= desktop_size_.width() && -+ video_crop->region.size.height <= desktop_size_.height()); -+ if ((video_crop->region.size.width != desktop_size_.width() || -+ video_crop->region.size.height != desktop_size_.height()) && video_crop->region.size.width && video_crop->region.size.height) { -+ video_crop_size_ = DesktopSize(video_crop->region.size.width, video_crop->region.size.height); -+ video_crop_size_initialized_ = true; -+ } else { -+ video_crop_size_initialized_ = false; -+ } -+ } else { -+ video_crop_size_initialized_ = false; -+ } -+ -+ size_t frame_size; -+ if (video_crop_size_initialized_) { -+ frame_size = -+ video_crop_size_.width() * video_crop_size_.height() * kBytesPerPixel; -+ } else { -+ frame_size = -+ desktop_size_.width() * desktop_size_.height() * kBytesPerPixel; -+ } -+ -+ if (!current_frame_ || -+ (video_crop_size_initialized_ && !video_crop_size_.equals(prev_crop_size))) { -+ current_frame_ = std::make_unique(frame_size); -+ } -+ RTC_DCHECK(current_frame_ != nullptr); -+ -+ const int32_t dstStride = video_crop_size_initialized_ -+ ? video_crop_size_.width() * kBytesPerPixel -+ : desktop_size_.width() * kBytesPerPixel; -+ const int32_t srcStride = spaBuffer->datas[0].chunk->stride; -+ - if (srcStride != (desktop_size_.width() * kBytesPerPixel)) { - RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: " - << srcStride -@@ -361,21 +400,40 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { - return; - } - -- if (!current_frame_) { -- current_frame_ = static_cast(malloc(maxSize)); -+ dst = current_frame_.get(); -+ -+ // Adjust source content based on crop video position -+ if (video_crop_size_initialized_ && -+ (video_crop->region.position.y + video_crop_size_.height() <= desktop_size_.height())) { -+ for (int i = 0; i < video_crop->region.position.y; ++i) { -+ src += srcStride; -+ } -+ } -+ const int xOffset = -+ video_crop_size_initialized_ && (video_crop->region.position.x + video_crop_size_.width() <= -+ desktop_size_.width()) -+ ? video_crop->region.position.x * kBytesPerPixel -+ : 0; -+ const int height = video_crop_size_initialized_ ? video_crop_size_.height() : desktop_size_.height(); -+ for (int i = 0; i < height; ++i) { -+ // Adjust source content based on crop video position if needed -+ src += xOffset; -+ std::memcpy(dst, src, dstStride); -+ // If both sides decided to go with the RGBx format we need to convert it to -+ // BGRx to match color format expected by WebRTC. -+ if (spa_video_format_.format == SPA_VIDEO_FORMAT_RGBx || -+ spa_video_format_.format == SPA_VIDEO_FORMAT_RGBA) { -+ ConvertRGBxToBGRx(dst, dstStride); -+ } -+ src += srcStride - xOffset; -+ dst += dstStride; - } -- RTC_DCHECK(current_frame_ != nullptr); - -- // If both sides decided to go with the RGBx format we need to convert it to -- // BGRx to match color format expected by WebRTC. -- if (spa_video_format_->format == pw_type_->video_format.RGBx) { -- uint8_t* tempFrame = static_cast(malloc(maxSize)); -- std::memcpy(tempFrame, src, maxSize); -- ConvertRGBxToBGRx(tempFrame, maxSize); -- std::memcpy(current_frame_, tempFrame, maxSize); -- free(tempFrame); -- } else { -- std::memcpy(current_frame_, src, maxSize); -+ if (map) { -+ if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) { -+ SyncDmaBuf(spaBuffer->datas[0].fd, DMA_BUF_SYNC_END); -+ } -+ munmap(map, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset); - } - } - -@@ -725,10 +783,7 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal( - g_variant_get(variant, "(u@a{sv})", &stream_id, &options); - RTC_DCHECK(options != nullptr); - -- g_variant_lookup(options, "size", "(ii)", &width, &height); -- -- that->desktop_size_.set(width, height); -- -+ that->pw_stream_node_id_ = stream_id; - g_variant_unref(options); - g_variant_unref(variant); - } -@@ -813,10 +868,15 @@ void BaseCapturerPipeWire::CaptureFrame() { - return; - } - -- std::unique_ptr result(new BasicDesktopFrame(desktop_size_)); -+ DesktopSize frame_size = desktop_size_; -+ if (video_crop_size_initialized_) { -+ frame_size = video_crop_size_; -+ } -+ -+ std::unique_ptr result(new BasicDesktopFrame(frame_size)); - result->CopyPixelsFrom( -- current_frame_, (desktop_size_.width() * kBytesPerPixel), -- DesktopRect::MakeWH(desktop_size_.width(), desktop_size_.height())); -+ current_frame_.get(), (frame_size.width() * kBytesPerPixel), -+ DesktopRect::MakeWH(frame_size.width(), frame_size.height())); - if (!result) { - callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); - return; -@@ -837,4 +897,22 @@ bool BaseCapturerPipeWire::SelectSource(SourceId id) { - return true; - } - -+// static -+std::unique_ptr -+BaseCapturerPipeWire::CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options) { -+ std::unique_ptr capturer = -+ std::make_unique(BaseCapturerPipeWire::CaptureSourceType::kAny); -+ return std::move(capturer);} -+ -+// static -+std::unique_ptr -+BaseCapturerPipeWire::CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options) { -+ -+ std::unique_ptr capturer = -+ std::make_unique(BaseCapturerPipeWire::CaptureSourceType::kAny); -+ return std::move(capturer); -+} -+ - } // namespace webrtc -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h -index 56b101acbaa6..de54157d1a2a 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h -@@ -22,17 +22,13 @@ - - namespace webrtc { - --class PipeWireType { -- public: -- spa_type_media_type media_type; -- spa_type_media_subtype media_subtype; -- spa_type_format_video format_video; -- spa_type_video_format video_format; --}; -- - class BaseCapturerPipeWire : public DesktopCapturer { - public: -- enum CaptureSourceType { Screen = 1, Window }; -+ enum CaptureSourceType : uint32_t { -+ kScreen = 0b01, -+ kWindow = 0b10, -+ kAny = 0b11 -+ }; - - explicit BaseCapturerPipeWire(CaptureSourceType source_type); - ~BaseCapturerPipeWire() override; -@@ -43,28 +39,32 @@ class BaseCapturerPipeWire : public DesktopCapturer { - bool GetSourceList(SourceList* sources) override; - bool SelectSource(SourceId id) override; - -+ static std::unique_ptr CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options); -+ -+ static std::unique_ptr CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options); -+ - private: - // PipeWire types --> -+ pw_context* pw_context_ = nullptr; - pw_core* pw_core_ = nullptr; -- pw_type* pw_core_type_ = nullptr; - pw_stream* pw_stream_ = nullptr; -- pw_remote* pw_remote_ = nullptr; -- pw_loop* pw_loop_ = nullptr; - pw_thread_loop* pw_main_loop_ = nullptr; -- PipeWireType* pw_type_ = nullptr; - -+ spa_hook spa_core_listener_ = {}; - spa_hook spa_stream_listener_ = {}; -- spa_hook spa_remote_listener_ = {}; - -+ pw_core_events pw_core_events_ = {}; - pw_stream_events pw_stream_events_ = {}; -- pw_remote_events pw_remote_events_ = {}; - -- spa_video_info_raw* spa_video_format_ = nullptr; -+ struct spa_video_info_raw spa_video_format_; - -+ guint32 pw_stream_node_id_ = 0; - gint32 pw_fd_ = -1; - - CaptureSourceType capture_source_type_ = -- BaseCapturerPipeWire::CaptureSourceType::Screen; -+ BaseCapturerPipeWire::CaptureSourceType::kAny; - - // <-- end of PipeWire types - -@@ -78,33 +78,37 @@ class BaseCapturerPipeWire : public DesktopCapturer { - guint sources_request_signal_id_ = 0; - guint start_request_signal_id_ = 0; - -+ bool video_crop_size_initialized_ = false; -+ DesktopSize video_crop_size_;; - DesktopSize desktop_size_ = {}; - DesktopCaptureOptions options_ = {}; - -- uint8_t* current_frame_ = nullptr; -+ std::unique_ptr current_frame_; - Callback* callback_ = nullptr; - - bool portal_init_failed_ = false; - - void InitPortal(); - void InitPipeWire(); -- void InitPipeWireTypes(); - -- void CreateReceivingStream(); -+ pw_stream* CreateReceivingStream(); - void HandleBuffer(pw_buffer* buffer); - - void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); - -- static void OnStateChanged(void* data, -- pw_remote_state old_state, -- pw_remote_state state, -- const char* error); -+ static void SyncDmaBuf(int fd, uint64_t start_or_end); -+ static void OnCoreError(void *data, -+ uint32_t id, -+ int seq, -+ int res, -+ const char *message); -+ static void OnStreamParamChanged(void *data, -+ uint32_t id, -+ const struct spa_pod *format); - static void OnStreamStateChanged(void* data, - pw_stream_state old_state, - pw_stream_state state, - const char* error_message); -- -- static void OnStreamFormatChanged(void* data, const struct spa_pod* format); - static void OnStreamProcess(void* data); - static void OnNewBuffer(void* data, uint32_t id); - -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc -index 26956fc67dc8..3813d697bb38 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc -@@ -15,7 +15,7 @@ - namespace webrtc { - - ScreenCapturerPipeWire::ScreenCapturerPipeWire() -- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {} -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kScreen) {} - ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} - - // static -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc -index 35436475cb4d..c43a1f1a0c4e 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc -@@ -15,7 +15,7 @@ - namespace webrtc { - - WindowCapturerPipeWire::WindowCapturerPipeWire() -- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {} -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kWindow) {} - WindowCapturerPipeWire::~WindowCapturerPipeWire() {} - - // static -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc -index cf8a9dd0e0db..d27fab8d28d9 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc -@@ -26,7 +26,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -- return ScreenCapturerPipeWire::CreateRawScreenCapturer(options); -+ return BaseCapturerPipeWire::CreateRawScreenCapturer(options); - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc -index 82359e50c2db..bb9724cf7cc2 100644 ---- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc -+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc -@@ -26,7 +26,7 @@ std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -- return WindowCapturerPipeWire::CreateRawWindowCapturer(options); -+ return BaseCapturerPipeWire::CreateRawWindowCapturer(options); - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - diff --git a/firefox-vaapi-extra-frames.patch b/firefox-vaapi-extra-frames.patch deleted file mode 100644 index c2ed7a2..0000000 --- a/firefox-vaapi-extra-frames.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.old firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ---- firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.old 2020-05-13 14:28:26.556800474 +0200 -+++ firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp 2020-05-13 14:28:31.562768959 +0200 -@@ -43,7 +43,7 @@ typedef int VAStatus; - #endif - - // Use some extra HW frames for potential rendering lags. --#define EXTRA_HW_FRAMES 6 -+#define EXTRA_HW_FRAMES 20 - - typedef mozilla::layers::Image Image; - typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage; -diff -up firefox-76.0.1/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-76.0.1/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-76.0.1/media/webrtc/trunk/Makefile.old firefox-76.0.1/media/webrtc/trunk/Makefile diff --git a/icecat-GLIBCXX-fix-for-GCC-12.patch b/icecat-GLIBCXX-fix-for-GCC-12.patch new file mode 100644 index 0000000..8fdc264 --- /dev/null +++ b/icecat-GLIBCXX-fix-for-GCC-12.patch @@ -0,0 +1,45 @@ +From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= +Date: Fri, 4 Mar 2022 12:00:26 +0100 +Subject: [PATCH] GLIBCXX fix for GCC 12? + +--- + build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp +index 0180f6bcfa998..8d7a542ff11f0 100644 +--- a/build/unix/stdc++compat/stdc++compat.cpp ++++ b/build/unix/stdc++compat/stdc++compat.cpp +@@ -24,6 +24,7 @@ + GLIBCXX_3.4.27 is from gcc 10 + GLIBCXX_3.4.28 is from gcc 10 + GLIBCXX_3.4.29 is from gcc 11 ++ GLIBCXX_3.4.30 is from gcc 12 + + This file adds the necessary compatibility tricks to avoid symbols with + version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with +@@ -69,6 +70,19 @@ void __attribute__((weak)) __throw_bad_array_new_length() { MOZ_CRASH(); } + } // namespace std + #endif + ++#if _GLIBCXX_RELEASE >= 12 ++namespace std { ++ ++/* This avoids the GLIBCXX_3.4.30 symbol version. */ ++void __attribute__((weak)) ++__glibcxx_assert_fail(const char* __file, int __line, const char* __function, ++ const char* __condition) { ++ MOZ_CRASH(); ++} ++ ++} // namespace std ++#endif ++ + /* While we generally don't build with exceptions, we have some host tools + * that do use them. libstdc++ from GCC 5.0 added exception constructors with + * char const* argument. Older versions only have a constructor with +-- +2.35.1 + + diff --git a/icecat-build-arm-libaom.patch b/icecat-build-arm-libaom.patch deleted file mode 100644 index 985f01d..0000000 --- a/icecat-build-arm-libaom.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-73.0/media/libaom/moz.build.old firefox-73.0/media/libaom/moz.build ---- firefox-73.0/media/libaom/moz.build.old 2020-02-07 23:13:28.000000000 +0200 -+++ firefox-73.0/media/libaom/moz.build 2020-02-17 10:30:08.509805092 +0200 -@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm': - - for f in SOURCES: - if f.endswith('neon.c'): -- SOURCES[f].flags += CONFIG['VPX_ASFLAGS'] -+ SOURCES[f].flags += CONFIG['NEON_FLAGS'] - - if CONFIG['OS_TARGET'] == 'Android': - # For cpu-features.h diff --git a/icecat-fix_addon_installation.patch b/icecat-fix_addon_installation.patch deleted file mode 100644 index 5cc140d..0000000 --- a/icecat-fix_addon_installation.patch +++ /dev/null @@ -1,36 +0,0 @@ -# Fixes installation of those addons which don't have ID on IceCat ("Cannot find id for addon" error). ---- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm -+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm -@@ -627,8 +627,30 @@ - throw new Error(`Extension is signed with an invalid id (${addon.id})`); - } - } -- if (!addon.id && aLocation.isTemporary) { -- addon.id = generateTemporaryInstallID(aPackage.file); -+ if (!addon.id) { -+ if (aInstallLocation.name == KEY_APP_TEMPORARY) { -+ addon.id = generateTemporaryInstallID(aZipReader.file); -+ } else { -+ try { -+ let sigInput = aZipReader.getInputStream("META-INF/cose.sig"); -+ let sigBinary = Cc['@mozilla.org/binaryinputstream;1'] -+ .createInstance(Ci.nsIBinaryInputStream); -+ sigBinary.setInputStream(sigInput); -+ var sig = '' -+ var sigCount; -+ while ((sigCount = sigBinary.available()) > 0) { -+ sig += sigBinary.readBytes(sigCount); -+ } -+ let sigMatch = sig.match(/\{\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\}/g) -+ if (sigMatch && sigMatch.length == 1) { -+ addon.id = sigMatch[0] -+ } else { -+ logger.warn("Failed to find addon id"); -+ } -+ } catch (e) { -+ logger.warn("Failed to process META-INF/cose.sig"); -+ } -+ } - } - } - diff --git a/icecat-fix_installer.patch b/icecat-fix_installer.patch deleted file mode 100644 index cefa8e5..0000000 --- a/icecat-fix_installer.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- browser/installer/package-manifest.orig.in 2017-03-24 21:09:39.027022000 +0100 -+++ browser/installer/package-manifest.in 2017-03-24 23:07:21.881504771 +0100 -@@ -74,9 +74,9 @@ - #endif - #ifndef MOZ_SYSTEM_NSPR - #ifndef MOZ_FOLD_LIBS --@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ --@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@ -+#@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@ - #endif - #endif - #ifdef XP_MACOSX -@@ -610,11 +610,11 @@ - @RESPATH@/chrome/recording.manifest - @RESPATH@/chrome/recording/* - #ifdef MOZ_GTK --@RESPATH@/browser/chrome/icons/default/default16.png --@RESPATH@/browser/chrome/icons/default/default32.png --@RESPATH@/browser/chrome/icons/default/default48.png --@RESPATH@/browser/chrome/icons/default/default64.png --@RESPATH@/browser/chrome/icons/default/default128.png -+#@RESPATH@/browser/chrome/icons/default/default16.png -+#@RESPATH@/browser/chrome/icons/default/default32.png -+#@RESPATH@/browser/chrome/icons/default/default48.png -+@RESPATH@/browser/chrome/icons/default/default64.png -+@RESPATH@/browser/chrome/icons/default/default128.png - #endif - @RESPATH@/browser/features/* - diff --git a/icecat-fix_jar.patch b/icecat-fix_jar.patch deleted file mode 100644 index 9a64fab..0000000 --- a/icecat-fix_jar.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- browser/locales/jar.orig.mn 2017-03-19 19:59:09.000000000 +0100 -+++ browser/locales/jar.mn 2017-03-22 19:49:57.602190867 +0100 -@@ -14,7 +14,7 @@ - @AB_CD@.jar: - % locale browser @AB_CD@ %locale/browser/ - # bookmarks.html is produced by LOCALIZED_GENERATED_FILES. -- locale/browser/bookmarks.html (bookmarks.html) -+ locale/browser/bookmarks.html (generic/profile/bookmarks.html.in) - - locale/browser/accounts.properties (%chrome/browser/accounts.properties) - locale/browser/app-extension-fields.properties (%chrome/browser/app-extension-fields.properties) diff --git a/icecat-gcc-always-inline.patch b/icecat-gcc-always-inline.patch new file mode 100644 index 0000000..d7af60f --- /dev/null +++ b/icecat-gcc-always-inline.patch @@ -0,0 +1,14 @@ +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/icecat-glibc-dynstack.patch b/icecat-glibc-dynstack.patch deleted file mode 100644 index 74878b5..0000000 --- a/icecat-glibc-dynstack.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -ur a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp ---- a/js/xpconnect/src/XPCJSContext.cpp 2021-07-05 21:16:02.000000000 +0200 -+++ b/js/xpconnect/src/XPCJSContext.cpp 2021-07-19 15:01:24.083460460 +0200 -@@ -81,14 +81,6 @@ - using namespace JS; - using mozilla::dom::AutoEntryScript; - --// The watchdog thread loop is pretty trivial, and should not require much stack --// space to do its job. So only give it 32KiB or the platform minimum. --#if !defined(PTHREAD_STACK_MIN) --# define PTHREAD_STACK_MIN 0 --#endif --static constexpr size_t kWatchdogStackSize = -- PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN; -- - static void WatchdogMain(void* arg); - class Watchdog; - class WatchdogManager; -@@ -161,7 +153,7 @@ - // watchdog, we need to join it on shutdown. - mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this, - PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, -- PR_JOINABLE_THREAD, kWatchdogStackSize); -+ PR_JOINABLE_THREAD, 0); - if (!mThread) { - MOZ_CRASH("PR_CreateThread failed!"); - } -diff -ur a/security/sandbox/linux/launch/SandboxLaunch.cpp b/security/sandbox/linux/launch/SandboxLaunch.cpp ---- a/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-05 18:20:36.000000000 +0200 -+++ b/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-20 08:39:17.272136982 +0200 -@@ -489,7 +489,8 @@ static int CloneCallee(void* aPtr) { - // we don't currently support sandboxing under valgrind. - MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags, - jmp_buf* aCtx) { -- uint8_t miniStack[PTHREAD_STACK_MIN]; -+ static constexpr size_t kStackAlignment = 16; -+ uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment))); - #ifdef __hppa__ - void* stackPtr = miniStack; - #else -@@ -510,13 +511,19 @@ static pid_t ForkWithFlags(int aFlags) { - CLONE_CHILD_CLEARTID; - MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0); - -+ // Block signals due to small stack in DoClone. -+ sigset_t oldSigs; -+ BlockAllSignals(&oldSigs); -+ -+ int ret = 0; - jmp_buf ctx; - if (setjmp(ctx) == 0) { - // In the parent and just called setjmp: -- return DoClone(aFlags | SIGCHLD, &ctx); -+ ret = DoClone(aFlags | SIGCHLD, &ctx); - } -+ RestoreSignals(&oldSigs); - // In the child and have longjmp'ed: -- return 0; -+ return ret; - } - - static bool WriteStringToFile(const char* aPath, const char* aStr, diff --git a/icecat-lang_download.sh b/icecat-lang_download.sh index dfb1c71..3c0c445 100755 --- a/icecat-lang_download.sh +++ b/icecat-lang_download.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=78.15.0 +VERSION=140.7.0 URL=https://ftp.mozilla.org/pub/firefox/releases/${VERSION}esr/linux-x86_64/xpi/ for u in $URL; do @@ -17,6 +17,7 @@ done # mv "${FILE}" "${newfile}" ; #done #popd +rm -f icecat-*-langpacks.tar.gz tar -zcvf icecat-${VERSION}-langpacks.tar.gz langpacks rm -rf langpacks exit 0 diff --git a/icecat-libevent_linkflag.patch b/icecat-libevent_linkflag.patch deleted file mode 100644 index 918c7e4..0000000 --- a/icecat-libevent_linkflag.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- old-configure.orig.in 2019-03-02 21:49:16.000000000 +0100 -+++ old-configure.in 2019-03-04 12:14:23.842685662 +0100 -@@ -1715,7 +1715,7 @@ - MOZ_SYSTEM_LIBEVENT= - elif test -z "$MOZ_SYSTEM_LIBEVENT"; then - CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" -- LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" -+ LDFLAGS="-L${LIBDIR} $LDFLAGS" - MOZ_CHECK_HEADER(event.h, - [if test ! -f "${LIBEVENT_DIR}/include/event.h"; then - AC_MSG_ERROR([event.h found, but is not in ${LIBEVENT_DIR}/include]) -@@ -1724,7 +1724,7 @@ - AC_CHECK_LIB(event, event_init, - [MOZ_SYSTEM_LIBEVENT=1 - MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" -- MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], -+ MOZ_LIBEVENT_LIBS="-L${LIBDIR} -levent"], - [MOZ_SYSTEM_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) - fi - CFLAGS=$_SAVE_CFLAGS diff --git a/icecat-mozconfig-common b/icecat-mozconfig-common index bc960b7..bb3300d 100644 --- a/icecat-mozconfig-common +++ b/icecat-mozconfig-common @@ -6,6 +6,7 @@ export MOZ_TELEMETRY_REPORTING= mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir +ac_add_options --without-wasm-sandboxed-libraries ac_add_options --prefix="$PREFIX" ac_add_options --libdir="$LIBDIR" diff --git a/icecat-mozilla-1613672.patch b/icecat-mozilla-1613672.patch deleted file mode 100644 index b9f11cb..0000000 --- a/icecat-mozilla-1613672.patch +++ /dev/null @@ -1,84 +0,0 @@ - -# HG changeset patch -# User alwu -# Date 1608617164 0 -# Node ID 1c00de8c800ee726863fab0a9245e2c9a8e58136 -# Parent ab7649dc7fddc8fd9a81a54d61b1e7221fc298ca -Bug 1613672 - return `NS_ERROR_DOM_MEDIA_CANCELED` to indicate that track buffer manager has been detached from the demuxer. r=jya - -When we shutdown `MediaSourceDecoder`, it would trigger a shutdown for `MDSM` and a detaching for media source. - -In the previous one, that would eventually shutdown `MediaFormatReader` via tasks going through different threads (main->MDSM->MFR's supervisor). - -In the latter one, it would eventually detach the `TrackBufferManager` from the `MediaSourceTrackDemuxer`. (main->Demuxer's supervisor) - -As these two tasks running in different threads, and the latter usually get finished before the former one, which would result in `MediaSourceTrackDemuxer` no longer being able to get a sample. - -When that happens, the reader hasn't been shutdown yet, so it's still holding track demuxers and keeps requesting data from them. Then demuxers would return error because their corresponding track managers have been detached. - -The reader would report the demuxing error to the console, but that's acutally not a fatal error, because in this situation the reader is going to be shutdown soon. Therefore, return `NS_ERROR_DOM_MEDIA_CANCELED` to allow MFR to treat this error differently. - -Differential Revision: https://phabricator.services.mozilla.com/D100153 - -diff --git a/dom/media/mediasource/MediaSourceDemuxer.cpp b/dom/media/mediasource/MediaSourceDemuxer.cpp ---- a/dom/media/mediasource/MediaSourceDemuxer.cpp -+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp -@@ -338,17 +338,17 @@ void MediaSourceTrackDemuxer::BreakCycle - MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv)); - Unused << rv; - } - - RefPtr MediaSourceTrackDemuxer::DoSeek( - const TimeUnit& aTime) { - if (!mManager) { - return SeekPromise::CreateAndReject( -- MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, -+ MediaResult(NS_ERROR_DOM_MEDIA_CANCELED, - RESULT_DETAIL("manager is detached.")), - __func__); - } - - MOZ_ASSERT(OnTaskQueue()); - TimeIntervals buffered = mManager->Buffered(mType); - // Fuzz factor represents a +/- threshold. So when seeking it allows the gap - // to be twice as big as the fuzz value. We only want to allow EOS_FUZZ gap. -@@ -390,17 +390,17 @@ RefPtr - MediaSourceTrackDemuxer::DoGetSamples(int32_t aNumSamples) { - if (!mManager) { - return SamplesPromise::CreateAndReject( -- MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, -+ MediaResult(NS_ERROR_DOM_MEDIA_CANCELED, - RESULT_DETAIL("manager is detached.")), - __func__); - } - - MOZ_ASSERT(OnTaskQueue()); - if (mReset) { - // If a seek (or reset) was recently performed, we ensure that the data - // we are about to retrieve is still available. -@@ -446,17 +446,17 @@ MediaSourceTrackDemuxer::DoGetSamples(in - return SamplesPromise::CreateAndResolve(samples, __func__); - } - - RefPtr - MediaSourceTrackDemuxer::DoSkipToNextRandomAccessPoint( - const TimeUnit& aTimeThreadshold) { - if (!mManager) { - return SkipAccessPointPromise::CreateAndReject( -- SkipFailureHolder(MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, -+ SkipFailureHolder(MediaResult(NS_ERROR_DOM_MEDIA_CANCELED, - RESULT_DETAIL("manager is detached.")), - 0), - __func__); - } - - MOZ_ASSERT(OnTaskQueue()); - uint32_t parsed = 0; - // Ensure that the data we are about to skip to is still available. - - diff --git a/icecat-mozilla-1669471.patch b/icecat-mozilla-1669471.patch deleted file mode 100644 index c3818e0..0000000 --- a/icecat-mozilla-1669471.patch +++ /dev/null @@ -1,27 +0,0 @@ -# Bug 1669471 - Get rid of `DeprecationWarning` in `file_generate.py` r=firefox-build-system-reviewers,mhentges -# `imp` is deprecated since Python 3.4 and later Python versions are very noisy about printing `DeprecationWarning`s; instead, use its replacement, `importlib`. - ---- a/python/mozbuild/mozbuild/action/file_generate.py -+++ b/python/mozbuild/mozbuild/action/file_generate.py -@@ -9,7 +9,7 @@ - from __future__ import absolute_import, print_function - - import argparse --import imp -+import importlib.util - import os - import six - import sys -@@ -56,9 +56,9 @@ - # Since we're invoking the script in a roundabout way, we provide this - # bit of convenience. - sys.path.append(os.path.dirname(script)) -- with open(script, 'r') as fh: -- module = imp.load_module('script', fh, script, -- ('.py', 'r', imp.PY_SOURCE)) -+ spec = importlib.util.spec_from_file_location('script', script) -+ module = importlib.util.module_from_spec(spec) -+ spec.loader.exec_module(module) - method = args.method_name - if not hasattr(module, method): - print('Error: script "{0}" is missing a {1} method'.format(script, method), diff --git a/icecat-pgo.patch b/icecat-pgo.patch deleted file mode 100644 index 66a5e2a..0000000 --- a/icecat-pgo.patch +++ /dev/null @@ -1,143 +0,0 @@ -diff -up a/build/moz.configure/lto-pgo.configure.pgo b/build/moz.configure/lto-pgo.configure ---- a/build/moz.configure/lto-pgo.configure.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ b/build/moz.configure/lto-pgo.configure 2020-10-01 14:48:15.459225300 +0200 -@@ -69,12 +69,14 @@ set_config('PGO_PROFILE_PATH', pgo_profi - @imports(_from='__builtin__', _import='min') - def pgo_flags(compiler, profdata, target_is_windows): - if compiler.type == 'gcc': -+ #profile_use = '-fprofile-use=$(topobjdir)' -+ profile_use = '-fprofile-use' - return namespace( - gen_cflags=['-fprofile-generate'], - gen_ldflags=['-fprofile-generate'], -- use_cflags=['-fprofile-use', '-fprofile-correction', -+ use_cflags=[profile_use, '-fprofile-correction', - '-Wcoverage-mismatch'], -- use_ldflags=['-fprofile-use'], -+ use_ldflags=[profile_use], - ) - - if compiler.type in ('clang-cl', 'clang'): -@@ -192,13 +194,13 @@ def lto(value, c_compiler, ld64_known_go - cflags.append("-flto") - ldflags.append("-flto") - else: -- cflags.append("-flto=thin") -- ldflags.append("-flto=thin") -+ cflags.append("-flto") -+ ldflags.append("-flto") - elif c_compiler.type == 'clang-cl': - if len(value) and value[0].lower() == 'full': - cflags.append("-flto") - else: -- cflags.append("-flto=thin") -+ cflags.append("-flto") - # With clang-cl, -flto can only be used with -c or -fuse-ld=lld. - # AC_TRY_LINKs during configure don't have -c, so pass -fuse-ld=lld. - cflags.append("-fuse-ld=lld"); -diff -up a/build/pgo/profileserver.py.pgo b/build/pgo/profileserver.py ---- a/build/pgo/profileserver.py.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ b/build/pgo/profileserver.py 2020-10-01 13:54:58.535312905 +0200 -@@ -11,7 +11,7 @@ - import subprocess - - import mozcrash --from mozbuild.base import MozbuildObject, BinaryNotFoundException -+from mozbuild.base import MozbuildObject, BinaryNotFoundException, BuildEnvironmentNotFoundException - from mozfile import TemporaryDirectory - from mozhttpd import MozHttpd - from mozprofile import IceCatProfile, Preferences -@@ -84,9 +84,22 @@ if __name__ == '__main__': - port=PORT, - options='primary,privileged') - -- old_profraw_files = glob.glob('*.profraw') -- for f in old_profraw_files: -- os.remove(f) -+ using_gcc = False -+ try: -+ if build.config_environment.substs.get('CC_TYPE') == 'gcc': -+ using_gcc = True -+ except BuildEnvironmentNotFoundException: -+ pass -+ -+ if using_gcc: -+ for dirpath, _, filenames in os.walk('.'): -+ for f in filenames: -+ if f.endswith('.gcda'): -+ os.remove(os.path.join(dirpath, f)) -+ else: -+ old_profraw_files = glob.glob('*.profraw') -+ for f in old_profraw_files: -+ os.remove(f) - - with TemporaryDirectory() as profilePath: - # TODO: refactor this into mozprofile -@@ -191,6 +204,11 @@ - print("IceCat exited successfully, but produced a crashreport") - sys.exit(1) - -+ -+ print('Copying profile data....') -+ os.system('pwd'); -+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd ..; tar xf instrumented/profdata.tar.gz;'); -+ - llvm_profdata = env.get('LLVM_PROFDATA') - if llvm_profdata: - profraw_files = glob.glob('*.profraw') -diff -up a/build/unix/mozconfig.unix.pgo b/build/unix/mozconfig.unix ---- a/build/unix/mozconfig.unix.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ b/build/unix/mozconfig.unix 2020-10-01 13:54:58.535312905 +0200 -@@ -6,6 +6,15 @@ if [ -n "$FORCE_GCC" ]; then - CC="$MOZ_FETCHES_DIR/gcc/bin/gcc" - CXX="$MOZ_FETCHES_DIR/gcc/bin/g++" - -+ if [ -n "$MOZ_PGO" ]; then -+ if [ -z "$USE_ARTIFACT" ]; then -+ ac_add_options --enable-lto -+ fi -+ export AR="$topsrcdir/gcc/bin/gcc-ar" -+ export NM="$topsrcdir/gcc/bin/gcc-nm" -+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib" -+ fi -+ - # We want to make sure we use binutils and other binaries in the tooltool - # package. - mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH" -diff -up a/extensions/spellcheck/src/moz.build.pgo b/extensions/spellcheck/src/moz.build ---- a/extensions/spellcheck/src/moz.build.pgo 2020-09-30 19:41:17.000000000 +0200 -+++ b/extensions/spellcheck/src/moz.build 2020-10-01 13:54:58.535312905 +0200 -@@ -31,3 +31,5 @@ EXPORTS.mozilla += [ - - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): - CXXFLAGS += ['-Wno-error=shadow'] -+ -+CXXFLAGS += ['-fno-devirtualize'] -\ No newline at end of file -diff -up a/python/mozbuild/mozbuild/build_commands.py.pgo b/python/mozbuild/mozbuild/build_commands.py ---- a/python/mozbuild/mozbuild/build_commands.py.pgo 2020-09-30 19:41:46.000000000 +0200 -+++ b/python/mozbuild/mozbuild/build_commands.py 2020-10-01 13:54:58.535312905 +0200 -@@ -108,7 +108,8 @@ class Build(MachCommandBase): - return status - - pgo_env = os.environ.copy() -- pgo_env['LLVM_PROFDATA'] = instr.config_environment.substs.get('LLVM_PROFDATA') -+ if instr.config_environment.substs.get('CC_TYPE') != 'gcc': -+ pgo_env['LLVM_PROFDATA'] = instr.config_environment.substs.get('LLVM_PROFDATA') - pgo_env['JARLOG_FILE'] = mozpath.join(orig_topobjdir, 'jarlog/en-US.log') - pgo_cmd = [ - instr.virtualenv_manager.python_path, ---- a/toolkit/components/terminator/nsTerminator.cpp.pgo 2020-10-07 09:22:26.698243673 +0200 -+++ b/toolkit/components/terminator/nsTerminator.cpp 2020-10-07 09:22:43.026312999 +0200 -@@ -418,6 +418,11 @@ void nsTerminator::StartWatchdog() { - } - #endif - -+ // Disable watchdog for PGO train builds - writting profile information at -+ // exit may take time and it is better to make build hang rather than -+ // silently produce poorly performing binary. -+ crashAfterMS = INT32_MAX; -+ - UniquePtr options(new Options()); - const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000); - options->crashAfterTicks = crashAfterMS / ticksDuration; diff --git a/icecat-porting_to_python310.patch b/icecat-porting_to_python310.patch deleted file mode 100644 index 920ca96..0000000 --- a/icecat-porting_to_python310.patch +++ /dev/null @@ -1,928 +0,0 @@ -# HG changeset patch -# User Emilio Cobos Álvarez -# Date 1625585189 0 -# Node ID 2418633d529c6df00a83e973295eed0e891990a6 -# Parent 0b5bfe85b344b34894f72176099da78c3849b5cc -Bug 1719144 - Fix various imports for Python 3.10. r=firefox-build-system-reviewers,mhentges - -These are enough for me to run bootstrap+configure+build. - -Some touch third-party code (gyp), but per discussion in the earlier -versions of this revision that seems fine. - -Differential Revision: https://phabricator.services.mozilla.com/D119080 - -diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py ---- a/python/mach/mach/config.py -+++ b/python/mach/mach/config.py -@@ -17,6 +17,7 @@ - from __future__ import absolute_import, unicode_literals - - import collections -+import collections.abc - import os - import sys - import six -@@ -144,7 +145,7 @@ - return _ - - --class ConfigSettings(collections.Mapping): -+class ConfigSettings(collections.abc.Mapping): - """Interface for configuration settings. - - This is the main interface to the configuration. -@@ -190,7 +191,7 @@ - will result in exceptions being raised. - """ - -- class ConfigSection(collections.MutableMapping, object): -+ class ConfigSection(collections.abc.MutableMapping, object): - """Represents an individual config section.""" - def __init__(self, config, name, settings): - object.__setattr__(self, '_config', config) -@@ -312,8 +313,8 @@ - self._config.write(fh) - - @classmethod -- def _format_metadata(cls, provider, section, option, type_cls, description, -- default=DefaultValue, extra=None): -+ def _format_metadata(cls, provider, section, option, type_cls, description, -+ default=DefaultValue, extra=None): - """Formats and returns the metadata for a setting. - - Each setting must have: -@@ -340,10 +340,7 @@ - if isinstance(type_cls, string_types): - type_cls = TYPE_CLASSES[type_cls] - -- meta = { -- 'description': description, -- 'type_cls': type_cls, -- } -+ meta = {'description': description, 'type_cls': type_cls} - - if default != DefaultValue: - meta['default'] = default -diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py ---- a/python/mach/mach/decorators.py -+++ b/python/mach/mach/decorators.py -@@ -1,16 +1,17 @@ - # This Source Code Form is subject to the terms of the Mozilla Public - # 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/. - - from __future__ import absolute_import, unicode_literals - - import argparse - import collections -+import collections.abc - - from .base import MachError - from .registrar import Registrar - from mozbuild.base import MachCommandBase - - - class _MachCommand(object): - """Container for mach command metadata.""" -@@ -140,7 +141,7 @@ - 'Conditions argument must take a list ' + \ - 'of functions. Found %s instead.' - -- if not isinstance(command.conditions, collections.Iterable): -+ if not isinstance(command.conditions, collections.abc.Iterable): - msg = msg % (command.name, type(command.conditions)) - raise MachError(msg) - -diff --git a/python/mach/mach/main.py b/python/mach/mach/main.py ---- a/python/mach/mach/main.py -+++ b/python/mach/mach/main.py -@@ -11,17 +11,17 @@ import argparse - import codecs - import errno - import imp - import logging - import os - import sys - import traceback - import uuid --from collections import Iterable -+from collections.abc import Iterable - - from six import string_types - - from .base import ( - CommandContext, - MachError, - MissingFileError, - NoCommandError, -diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py ---- a/python/mozbuild/mozbuild/backend/configenvironment.py -+++ b/python/mozbuild/mozbuild/backend/configenvironment.py -@@ -4,17 +4,18 @@ - - from __future__ import absolute_import, print_function - - import os - import six - import sys - import json - --from collections import Iterable, OrderedDict -+from collections.abc import Iterable -+from collections import OrderedDict - from types import ModuleType - - import mozpack.path as mozpath - - from mozbuild.util import ( - FileAvoidWrite, - memoized_property, - ReadOnlyDict, -@@ -63,10 +64,7 @@ - compile(source, path, 'exec', dont_inherit=1) - ) - -- g = { -- '__builtins__': __builtins__, -- '__file__': path, -- } -+ g = {"__builtins__": __builtins__, "__file__": path} - l = {} - try: - exec(code_cache[path][1], g, l) -diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py ---- a/python/mozbuild/mozbuild/makeutil.py -+++ b/python/mozbuild/mozbuild/makeutil.py -@@ -7,7 +7,7 @@ - import os - import re - import six --from collections import Iterable -+from collections.abc import Iterable - - - class Makefile(object): -diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py ---- a/python/mozbuild/mozbuild/util.py -+++ b/python/mozbuild/mozbuild/util.py -@@ -4,16 +4,17 @@ - - # This file contains miscellaneous utility functions that don't belong anywhere - # in particular. - - from __future__ import absolute_import, print_function, unicode_literals - - import argparse - import collections -+import collections.abc - import ctypes - import difflib - import errno - import functools - import hashlib - import io - import itertools - import os -@@ -782,7 +783,7 @@ - self._strings = StrictOrderingOnAppendList() - self._children = {} - -- class StringListAdaptor(collections.Sequence): -+ class StringListAdaptor(collections.abc.Sequence): - def __init__(self, hsl): - self._hsl = hsl - -diff --git a/taskcluster/taskgraph/util/schema.py b/taskcluster/taskgraph/util/schema.py ---- a/taskcluster/taskgraph/util/schema.py -+++ b/taskcluster/taskgraph/util/schema.py -@@ -6,7 +6,7 @@ - - import re - import pprint --import collections -+import collections.abc - import voluptuous - - from six import text_type, iteritems -@@ -160,7 +160,7 @@ - 'Unexpected type in YAML schema: {} @ {}'.format( - type(k).__name__, path)) - -- if isinstance(sch, collections.Mapping): -+ if isinstance(sch, collections.abc.Mapping): - for k, v in iteritems(sch): - child = "{}[{!r}]".format(path, k) - check_identifier(child, k) -diff --git a/third_party/python/gyp/pylib/gyp/common.py b/third_party/python/gyp/pylib/gyp/common.py ---- a/third_party/python/gyp/pylib/gyp/common.py -+++ b/third_party/python/gyp/pylib/gyp/common.py -@@ -1,15 +1,16 @@ - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - - from __future__ import with_statement - - import collections -+import collections.abc - import errno - import filecmp - import os.path - import re - import tempfile - import sys - - -@@ -489,17 +490,17 @@ def uniquer(seq, idfun=None): - marker = idfun(item) - if marker in seen: continue - seen[marker] = 1 - result.append(item) - return result - - - # Based on http://code.activestate.com/recipes/576694/. --class OrderedSet(collections.MutableSet): -+class OrderedSet(collections.abc.MutableSet): - def __init__(self, iterable=None): - self.end = end = [] - end += [None, end, end] # sentinel node for doubly linked list - self.map = {} # key --> [key, prev, next] - if iterable is not None: - self |= iterable - - def __len__(self): - - -# HG changeset patch -# User Emilio Cobos Álvarez -# Date 1625657350 -7200 -# Node ID 6b2a1a09cd4735386414483dd4050c25f9e58e86 -# Parent d2ab10b1b1619f8e2473837ed9043ad28c842aa5 -Bug 1719144 - Keep some code python2 compatible since we still run it in some windows talos jobs. - -MANUAL PUSH: Orange fix CLOSED TREE - - -diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py ---- a/testing/mozbase/manifestparser/manifestparser/filters.py -+++ b/testing/mozbase/manifestparser/manifestparser/filters.py -@@ -12,7 +12,7 @@ - - import itertools - import os --from collections import defaultdict, MutableSequence -+from collections.abc import MutableSequence - - import six - from six import string_types ---- a/third_party/python/pyyaml/lib3/yaml/constructor.orig.py 2021-07-13 12:14:20.000000000 +0200 -+++ b/third_party/python/pyyaml/lib3/yaml/constructor.py 2021-07-14 14:36:31.579176122 +0200 -@@ -5,7 +5,7 @@ - from .error import * - from .nodes import * - --import collections, datetime, base64, binascii, re, sys, types -+import collections.abc, datetime, base64, binascii, re, sys, types - - class ConstructorError(MarkedYAMLError): - pass -@@ -123,7 +123,7 @@ - mapping = {} - for key_node, value_node in node.value: - key = self.construct_object(key_node, deep=deep) -- if not isinstance(key, collections.Hashable): -+ if not isinstance(key, collections.abc.Hashable): - raise ConstructorError("while constructing a mapping", node.start_mark, - "found unhashable key", key_node.start_mark) - value = self.construct_object(value_node, deep=deep) ---- a/third_party/python/requests/requests/cookies.orig.py 2021-08-02 21:40:27.000000000 +0200 -+++ b/third_party/python/requests/requests/cookies.py 2021-08-03 21:46:38.917998970 +0200 -@@ -10,6 +10,7 @@ - import time - import calendar - import collections -+import collections.abc - from .compat import cookielib, urlparse, urlunparse, Morsel - - try: -@@ -161,7 +162,7 @@ - Use .get and .set and include domain and path args in order to be more specific.""" - - --class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): -+class RequestsCookieJar(cookielib.CookieJar, collections.abc.MutableMapping): - """Compatibility class; is a cookielib.CookieJar, but exposes a dict - interface. - ---- a/third_party/python/requests/requests/utils.orig.py 2021-08-02 21:40:27.000000000 +0200 -+++ b/third_party/python/requests/requests/utils.py 2021-08-03 21:47:12.396466647 +0200 -@@ -12,6 +12,7 @@ - import cgi - import codecs - import collections -+import collections.abc - import io - import os - import platform ---- a/third_party/python/requests/requests/structures.orig.py 2021-08-02 21:40:27.000000000 +0200 -+++ b/third_party/python/requests/requests/structures.py 2021-08-04 08:03:34.858332348 +0200 -@@ -9,9 +9,10 @@ - """ - - import collections -+import collections.abc - - --class CaseInsensitiveDict(collections.MutableMapping): -+class CaseInsensitiveDict(collections.abc.MutableMapping): - """ - A case-insensitive ``dict``-like object. - -diff -up a/third_party/python/voluptuous/voluptuous-0.11.5.dist-info/RECORD.build-python-2 b/third_party/python/voluptuous/voluptuous-0.11.5.dist-info/RECORD -diff -up a/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/COPYING.build-python-2 b/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/COPYING ---- a/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/COPYING.build-python-2 2021-07-21 09:42:47.774128166 +0200 -+++ b/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/COPYING 2021-07-21 09:42:47.774128166 +0200 -@@ -0,0 +1,25 @@ -+Copyright (c) 2010, Alec Thomas -+All rights reserved. -+ -+Redistribution and use in source and binary forms, with or without -+modification, are permitted provided that the following conditions are met: -+ -+ - Redistributions of source code must retain the above copyright notice, this -+ list of conditions and the following disclaimer. -+ - Redistributions in binary form must reproduce the above copyright notice, -+ this list of conditions and the following disclaimer in the documentation -+ and/or other materials provided with the distribution. -+ - Neither the name of SwapOff.org nor the names of its contributors may -+ be used to endorse or promote products derived from this software without -+ specific prior written permission. -+ -+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -diff -up a/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/RECORD.build-python-2 b/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/RECORD ---- a/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/RECORD.build-python-2 2021-07-21 09:42:47.774128166 +0200 -+++ b/third_party/python/voluptuous/voluptuous-0.12.1.dist-info/RECORD 2021-07-21 09:42:47.774128166 +0200 -@@ -0,0 +1,11 @@ -+voluptuous/__init__.py,sha256=tSYWPAIWee6YwcMK8hxmaiagG_swokUMeH8MluJLWZM,203 -+voluptuous/error.py,sha256=fLRmJwKp0bqRGgBM34ztg9MTxhEOf465sbQcvJlEtAk,4026 -+voluptuous/humanize.py,sha256=hZlhdN4aVeGDIXdtSTeyEbmku65SDPRuut3mOfuRQP0,1606 -+voluptuous/schema_builder.py,sha256=xVJpf3uJMyS1CKwzDw3rEK39ebqDiF_A2Kbq4VnZ3Aw,43677 -+voluptuous/util.py,sha256=RXLZ2b5y-A4az3teG6UpCx2UZcXpS11sIVCdORyKar8,3150 -+voluptuous/validators.py,sha256=xZgyKH-EVqUHCHral5gzViXq4HfEjJEsGdQy7z6llc0,32798 -+voluptuous-0.12.1.dist-info/COPYING,sha256=JHtJdren-k2J2Vh8qlCVVh60bcVFfyJ59ipitUUq3qk,1486 -+voluptuous-0.12.1.dist-info/METADATA,sha256=OdEydy5NydPFFzAhP8qj_YqJsQPQvoIt5ZT1t8B14Ok,20120 -+voluptuous-0.12.1.dist-info/WHEEL,sha256=S6zePDbUAjzMmpYOg2cHDxuYFWw7WiOXt6ogM6hIB5Q,92 -+voluptuous-0.12.1.dist-info/top_level.txt,sha256=TTdVb7M-vndb67UqTmAxuVjpAUakrlAWJYqvo3w4Iqc,11 -+voluptuous-0.12.1.dist-info/RECORD,, -diff -up a/third_party/python/voluptuous/voluptuous/error.py.build-python-2 b/third_party/python/voluptuous/voluptuous/error.py ---- a/third_party/python/voluptuous/voluptuous/error.py.build-python-2 2021-07-05 21:16:03.000000000 +0200 -+++ b/third_party/python/voluptuous/voluptuous/error.py 2021-07-21 09:42:47.775128197 +0200 -@@ -142,11 +142,11 @@ class BooleanInvalid(Invalid): - - - class UrlInvalid(Invalid): -- """The value is not a url.""" -+ """The value is not a URL.""" - - - class EmailInvalid(Invalid): -- """The value is not a email.""" -+ """The value is not an email address.""" - - - class FileInvalid(Invalid): -diff -up a/third_party/python/voluptuous/voluptuous/__init__.py.build-python-2 b/third_party/python/voluptuous/voluptuous/__init__.py ---- a/third_party/python/voluptuous/voluptuous/__init__.py.build-python-2 2021-07-05 21:16:03.000000000 +0200 -+++ b/third_party/python/voluptuous/voluptuous/__init__.py 2021-07-21 09:42:47.775128197 +0200 -@@ -5,5 +5,5 @@ from voluptuous.validators import * - from voluptuous.util import * - from voluptuous.error import * - --__version__ = '0.11.5' -+__version__ = '0.12.1' - __author__ = 'alecthomas' -diff -up a/third_party/python/voluptuous/voluptuous/schema_builder.py.build-python-2 b/third_party/python/voluptuous/voluptuous/schema_builder.py ---- a/third_party/python/voluptuous/voluptuous/schema_builder.py.build-python-2 2021-07-05 21:16:03.000000000 +0200 -+++ b/third_party/python/voluptuous/voluptuous/schema_builder.py 2021-07-21 09:42:47.775128197 +0200 -@@ -22,6 +22,11 @@ else: - def iteritems(d): - return d.iteritems() - -+if sys.version_info >= (3, 3): -+ _Mapping = collections.abc.Mapping -+else: -+ _Mapping = collections.Mapping -+ - """Schema validation for Python data structures. - - Given eg. a nested data structure like this: -@@ -280,7 +285,7 @@ class Schema(object): - return schema.__voluptuous_compile__(self) - if isinstance(schema, Object): - return self._compile_object(schema) -- if isinstance(schema, collections.Mapping): -+ if isinstance(schema, _Mapping): - return self._compile_dict(schema) - elif isinstance(schema, list): - return self._compile_list(schema) -@@ -610,11 +615,11 @@ class Schema(object): - if not isinstance(data, seq_type): - raise er.SequenceTypeInvalid('expected a %s' % seq_type_name, path) - -- # Empty seq schema, allow any data. -+ # Empty seq schema, reject any data. - if not schema: - if data: - raise er.MultipleInvalid([ -- er.ValueInvalid('not a valid value', [value]) for value in data -+ er.ValueInvalid('not a valid value', path if path else data) - ]) - return data - -@@ -735,7 +740,7 @@ class Schema(object): - - result = self.schema.copy() - -- # returns the key that may have been passed as arugment to Marker constructor -+ # returns the key that may have been passed as an argument to Marker constructor - def key_literal(key): - return (key.schema if isinstance(key, Marker) else key) - -@@ -771,9 +776,10 @@ class Schema(object): - result[key] = value - - # recompile and send old object -+ result_cls = type(self) - result_required = (required if required is not None else self.required) - result_extra = (extra if extra is not None else self.extra) -- return Schema(result, required=result_required, extra=result_extra) -+ return result_cls(result, required=result_required, extra=result_extra) - - - def _compile_scalar(schema): -@@ -809,7 +815,7 @@ def _compile_scalar(schema): - def validate_callable(path, data): - try: - return schema(data) -- except ValueError as e: -+ except ValueError: - raise er.ValueInvalid('not a valid value', path) - except er.Invalid as e: - e.prepend(path) -@@ -1121,8 +1127,11 @@ class Inclusive(Optional): - True - """ - -- def __init__(self, schema, group_of_inclusion, msg=None): -- super(Inclusive, self).__init__(schema, msg=msg) -+ def __init__(self, schema, group_of_inclusion, -+ msg=None, description=None, default=UNDEFINED): -+ super(Inclusive, self).__init__(schema, msg=msg, -+ default=default, -+ description=description) - self.group_of_inclusion = group_of_inclusion - - -diff -up a/third_party/python/voluptuous/voluptuous/util.py.build-python-2 b/third_party/python/voluptuous/voluptuous/util.py ---- a/third_party/python/voluptuous/voluptuous/util.py.build-python-2 2021-07-05 21:16:03.000000000 +0200 -+++ b/third_party/python/voluptuous/voluptuous/util.py 2021-07-21 09:42:47.776128229 +0200 -@@ -7,6 +7,14 @@ from voluptuous import validators - __author__ = 'tusharmakkar08' - - -+def _fix_str(v): -+ if sys.version_info[0] == 2 and isinstance(v, unicode): -+ s = v -+ else: -+ s = str(v) -+ return s -+ -+ - def Lower(v): - """Transform a string to lower case. - -@@ -14,7 +22,7 @@ def Lower(v): - >>> s('HI') - 'hi' - """ -- return str(v).lower() -+ return _fix_str(v).lower() - - - def Upper(v): -@@ -24,7 +32,7 @@ def Upper(v): - >>> s('hi') - 'HI' - """ -- return str(v).upper() -+ return _fix_str(v).upper() - - - def Capitalize(v): -@@ -34,7 +42,7 @@ def Capitalize(v): - >>> s('hello world') - 'Hello world' - """ -- return str(v).capitalize() -+ return _fix_str(v).capitalize() - - - def Title(v): -@@ -44,7 +52,7 @@ def Title(v): - >>> s('hello world') - 'Hello World' - """ -- return str(v).title() -+ return _fix_str(v).title() - - - def Strip(v): -@@ -54,7 +62,7 @@ def Strip(v): - >>> s(' hello world ') - 'hello world' - """ -- return str(v).strip() -+ return _fix_str(v).strip() - - - class DefaultTo(object): -diff -up a/third_party/python/voluptuous/voluptuous/validators.py.build-python-2 b/third_party/python/voluptuous/voluptuous/validators.py ---- a/third_party/python/voluptuous/voluptuous/validators.py.build-python-2 2021-07-05 21:16:03.000000000 +0200 -+++ b/third_party/python/voluptuous/voluptuous/validators.py 2021-07-21 09:42:47.776128229 +0200 -@@ -192,15 +192,26 @@ class _WithSubValidators(object): - def __init__(self, *validators, **kwargs): - self.validators = validators - self.msg = kwargs.pop('msg', None) -+ self.required = kwargs.pop('required', False) -+ self.discriminant = kwargs.pop('discriminant', None) - - def __voluptuous_compile__(self, schema): -- self._compiled = [ -- schema._compile(v) -- for v in self.validators -- ] -+ self._compiled = [] -+ old_required = schema.required -+ self.schema = schema -+ for v in self.validators: -+ schema.required = self.required -+ self._compiled.append(schema._compile(v)) -+ schema.required = old_required - return self._run - - def _run(self, path, value): -+ if self.discriminant is not None: -+ self._compiled = [ -+ self.schema._compile(v) -+ for v in self.discriminant(value, self.validators) -+ ] -+ - return self._exec(self._compiled, value, path) - - def __call__(self, v): -@@ -218,7 +229,7 @@ class Any(_WithSubValidators): - """Use the first validated value. - - :param msg: Message to deliver to user if validation fails. -- :param kwargs: All other keyword arguments are passed to the sub-Schema constructors. -+ :param kwargs: All other keyword arguments are passed to the sub-schema constructors. - :returns: Return value of the first validator that passes. - - >>> validate = Schema(Any('true', 'false', -@@ -262,13 +273,57 @@ class Any(_WithSubValidators): - Or = Any - - -+class Union(_WithSubValidators): -+ """Use the first validated value among those selected by discriminant. -+ -+ :param msg: Message to deliver to user if validation fails. -+ :param discriminant(value, validators): Returns the filtered list of validators based on the value. -+ :param kwargs: All other keyword arguments are passed to the sub-schema constructors. -+ :returns: Return value of the first validator that passes. -+ -+ >>> validate = Schema(Union({'type':'a', 'a_val':'1'},{'type':'b', 'b_val':'2'}, -+ ... discriminant=lambda val, alt: filter( -+ ... lambda v : v['type'] == val['type'] , alt))) -+ >>> validate({'type':'a', 'a_val':'1'}) == {'type':'a', 'a_val':'1'} -+ True -+ >>> with raises(MultipleInvalid, "not a valid value for dictionary value @ data['b_val']"): -+ ... validate({'type':'b', 'b_val':'5'}) -+ -+ ```discriminant({'type':'b', 'a_val':'5'}, [{'type':'a', 'a_val':'1'},{'type':'b', 'b_val':'2'}])``` is invoked -+ -+ Without the discriminant, the exception would be "extra keys not allowed @ data['b_val']" -+ """ -+ -+ def _exec(self, funcs, v, path=None): -+ error = None -+ for func in funcs: -+ try: -+ if path is None: -+ return func(v) -+ else: -+ return func(path, v) -+ except Invalid as e: -+ if error is None or len(e.path) > len(error.path): -+ error = e -+ else: -+ if error: -+ raise error if self.msg is None else AnyInvalid( -+ self.msg, path=path) -+ raise AnyInvalid(self.msg or 'no valid value found', -+ path=path) -+ -+ -+# Convenience alias -+Switch = Union -+ -+ - class All(_WithSubValidators): - """Value must pass all validators. - - The output of each validator is passed as input to the next. - - :param msg: Message to deliver to user if validation fails. -- :param kwargs: All other keyword arguments are passed to the sub-Schema constructors. -+ :param kwargs: All other keyword arguments are passed to the sub-schema constructors. - - >>> validate = Schema(All('10', Coerce(int))) - >>> validate('10') -@@ -303,7 +358,7 @@ class Match(object): - >>> with raises(MultipleInvalid, 'expected string or buffer'): - ... validate(123) - -- Pattern may also be a _compiled regular expression: -+ Pattern may also be a compiled regular expression: - - >>> validate = Schema(Match(re.compile(r'0x[A-F0-9]+', re.I))) - >>> validate('0x123ef4') -@@ -361,38 +416,38 @@ def _url_validation(v): - return parsed - - --@message('expected an Email', cls=EmailInvalid) -+@message('expected an email address', cls=EmailInvalid) - def Email(v): -- """Verify that the value is an Email or not. -+ """Verify that the value is an email address or not. - - >>> s = Schema(Email()) -- >>> with raises(MultipleInvalid, 'expected an Email'): -+ >>> with raises(MultipleInvalid, 'expected an email address'): - ... s("a.com") -- >>> with raises(MultipleInvalid, 'expected an Email'): -+ >>> with raises(MultipleInvalid, 'expected an email address'): - ... s("a@.com") -- >>> with raises(MultipleInvalid, 'expected an Email'): -+ >>> with raises(MultipleInvalid, 'expected an email address'): - ... s("a@.com") - >>> s('t@x.com') - 't@x.com' - """ - try: - if not v or "@" not in v: -- raise EmailInvalid("Invalid Email") -+ raise EmailInvalid("Invalid email address") - user_part, domain_part = v.rsplit('@', 1) - - if not (USER_REGEX.match(user_part) and DOMAIN_REGEX.match(domain_part)): -- raise EmailInvalid("Invalid Email") -+ raise EmailInvalid("Invalid email address") - return v - except: - raise ValueError - - --@message('expected a Fully qualified domain name URL', cls=UrlInvalid) -+@message('expected a fully qualified domain name URL', cls=UrlInvalid) - def FqdnUrl(v): -- """Verify that the value is a Fully qualified domain name URL. -+ """Verify that the value is a fully qualified domain name URL. - - >>> s = Schema(FqdnUrl()) -- >>> with raises(MultipleInvalid, 'expected a Fully qualified domain name URL'): -+ >>> with raises(MultipleInvalid, 'expected a fully qualified domain name URL'): - ... s("http://localhost/") - >>> s('http://w3.org') - 'http://w3.org' -@@ -423,14 +478,14 @@ def Url(v): - raise ValueError - - --@message('not a file', cls=FileInvalid) -+@message('Not a file', cls=FileInvalid) - @truth - def IsFile(v): - """Verify the file exists. - - >>> os.path.basename(IsFile()(__file__)).startswith('validators.py') - True -- >>> with raises(FileInvalid, 'not a file'): -+ >>> with raises(FileInvalid, 'Not a file'): - ... IsFile()("random_filename_goes_here.py") - >>> with raises(FileInvalid, 'Not a file'): - ... IsFile()(None) -@@ -445,7 +500,7 @@ def IsFile(v): - raise FileInvalid('Not a file') - - --@message('not a directory', cls=DirInvalid) -+@message('Not a directory', cls=DirInvalid) - @truth - def IsDir(v): - """Verify the directory exists. -@@ -487,11 +542,11 @@ def PathExists(v): - raise PathInvalid("Not a Path") - - --def Maybe(validator): -+def Maybe(validator, msg=None): - """Validate that the object matches given validator or is None. - -- :raises Invalid: if the value does not match the given validator and is not -- None -+ :raises Invalid: If the value does not match the given validator and is not -+ None. - - >>> s = Schema(Maybe(int)) - >>> s(10) -@@ -500,7 +555,7 @@ def Maybe(validator): - ... s("string") - - """ -- return Any(None, validator) -+ return Any(validator, None, msg=msg) - - - class Range(object): -@@ -533,23 +588,30 @@ class Range(object): - self.msg = msg - - def __call__(self, v): -- if self.min_included: -- if self.min is not None and not v >= self.min: -- raise RangeInvalid( -- self.msg or 'value must be at least %s' % self.min) -- else: -- if self.min is not None and not v > self.min: -- raise RangeInvalid( -- self.msg or 'value must be higher than %s' % self.min) -- if self.max_included: -- if self.max is not None and not v <= self.max: -- raise RangeInvalid( -- self.msg or 'value must be at most %s' % self.max) -- else: -- if self.max is not None and not v < self.max: -- raise RangeInvalid( -- self.msg or 'value must be lower than %s' % self.max) -- return v -+ try: -+ if self.min_included: -+ if self.min is not None and not v >= self.min: -+ raise RangeInvalid( -+ self.msg or 'value must be at least %s' % self.min) -+ else: -+ if self.min is not None and not v > self.min: -+ raise RangeInvalid( -+ self.msg or 'value must be higher than %s' % self.min) -+ if self.max_included: -+ if self.max is not None and not v <= self.max: -+ raise RangeInvalid( -+ self.msg or 'value must be at most %s' % self.max) -+ else: -+ if self.max is not None and not v < self.max: -+ raise RangeInvalid( -+ self.msg or 'value must be lower than %s' % self.max) -+ -+ return v -+ -+ # Objects that lack a partial ordering, e.g. None or strings will raise TypeError -+ except TypeError: -+ raise RangeInvalid( -+ self.msg or 'invalid value or type (must have a partial ordering)') - - def __repr__(self): - return ('Range(min=%r, max=%r, min_included=%r,' -@@ -579,11 +641,17 @@ class Clamp(object): - self.msg = msg - - def __call__(self, v): -- if self.min is not None and v < self.min: -- v = self.min -- if self.max is not None and v > self.max: -- v = self.max -- return v -+ try: -+ if self.min is not None and v < self.min: -+ v = self.min -+ if self.max is not None and v > self.max: -+ v = self.max -+ return v -+ -+ # Objects that lack a partial ordering, e.g. None or strings will raise TypeError -+ except TypeError: -+ raise RangeInvalid( -+ self.msg or 'invalid value or type (must have a partial ordering)') - - def __repr__(self): - return 'Clamp(min=%s, max=%s)' % (self.min, self.max) -@@ -598,13 +666,19 @@ class Length(object): - self.msg = msg - - def __call__(self, v): -- if self.min is not None and len(v) < self.min: -- raise LengthInvalid( -- self.msg or 'length of value must be at least %s' % self.min) -- if self.max is not None and len(v) > self.max: -- raise LengthInvalid( -- self.msg or 'length of value must be at most %s' % self.max) -- return v -+ try: -+ if self.min is not None and len(v) < self.min: -+ raise LengthInvalid( -+ self.msg or 'length of value must be at least %s' % self.min) -+ if self.max is not None and len(v) > self.max: -+ raise LengthInvalid( -+ self.msg or 'length of value must be at most %s' % self.max) -+ return v -+ -+ # Objects that havbe no length e.g. None or strings will raise TypeError -+ except TypeError: -+ raise RangeInvalid( -+ self.msg or 'invalid value or type') - - def __repr__(self): - return 'Length(min=%s, max=%s)' % (self.min, self.max) -@@ -663,7 +737,8 @@ class In(object): - except TypeError: - check = True - if check: -- raise InInvalid(self.msg or 'value is not allowed') -+ raise InInvalid(self.msg or -+ 'value must be one of {}'.format(sorted(self.container))) - return v - - def __repr__(self): -@@ -683,7 +758,8 @@ class NotIn(object): - except TypeError: - check = True - if check: -- raise NotInInvalid(self.msg or 'value is not allowed') -+ raise NotInInvalid(self.msg or -+ 'value must not be one of {}'.format(sorted(self.container))) - return v - - def __repr__(self): -@@ -722,7 +798,7 @@ class ExactSequence(object): - the validators. - - :param msg: Message to deliver to user if validation fails. -- :param kwargs: All other keyword arguments are passed to the sub-Schema -+ :param kwargs: All other keyword arguments are passed to the sub-schema - constructors. - - >>> from voluptuous import Schema, ExactSequence -@@ -887,7 +963,7 @@ class Unordered(object): - class Number(object): - """ - Verify the number of digits that are present in the number(Precision), -- and the decimal places(Scale) -+ and the decimal places(Scale). - - :raises Invalid: If the value does not match the provided Precision and Scale. - -@@ -951,13 +1027,13 @@ class SomeOf(_WithSubValidators): - The output of each validator is passed as input to the next. - - :param min_valid: Minimum number of valid schemas. -- :param validators: a list of schemas or validators to match input against -+ :param validators: List of schemas or validators to match input against. - :param max_valid: Maximum number of valid schemas. - :param msg: Message to deliver to user if validation fails. -- :param kwargs: All other keyword arguments are passed to the sub-Schema constructors. -+ :param kwargs: All other keyword arguments are passed to the sub-schema constructors. - -- :raises NotEnoughValid: if the minimum number of validations isn't met -- :raises TooManyValid: if the more validations than the given amount is met -+ :raises NotEnoughValid: If the minimum number of validations isn't met. -+ :raises TooManyValid: If the maximum number of validations is exceeded. - - >>> validate = Schema(SomeOf(min_valid=2, validators=[Range(1, 5), Any(float, int), 6.6])) - >>> validate(6.6) - - Add to Phrasebook - No word lists for English (USA) → Italian... - Create a new word list... - Copy diff --git a/icecat-wayland.desktop b/icecat-wayland.desktop deleted file mode 100644 index 44e6c47..0000000 --- a/icecat-wayland.desktop +++ /dev/null @@ -1,23 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=GNU IceCat on Wayland -Comment=Browse the World Wide Web -GenericName=Web Browser -Keywords=Internet;WWW;Browser;Web;Explorer; -Exec=icecat-wayland --name icecat-wayland %u -Icon=icecat -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; -Categories=Network;WebBrowser; -StartupNotify=true -Name[en_US]=GNU IceCat on Wayland -Actions=new-window;new-private-window; - -[Desktop Action new-window] -Name=Open a New Window -Exec=icecat-wayland --name icecat-wayland --new-window %u - -[Desktop Action new-private-window] -Name=Open a New Private Window -Exec=icecat-wayland --private-window --name icecat-wayland %u diff --git a/icecat-wayland.sh.in b/icecat-wayland.sh.in deleted file mode 100644 index d04465c..0000000 --- a/icecat-wayland.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Run GNU IceCat under Wayland -# - -export MOZ_ENABLE_WAYLAND=1 -exec /__PREFIX__/bin/icecat "$@" diff --git a/icecat-x11.desktop b/icecat-x11.desktop deleted file mode 100644 index 6e7eea8..0000000 --- a/icecat-x11.desktop +++ /dev/null @@ -1,338 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=GNU IceCat on X11 -Comment=Browse the World Wide Web -Comment[ar]=تصفح الشبكة العنكبوتية العالمية -Comment[ast]=Restola pela Rede -Comment[bn]=ইন্টারনেট ব্রাউজ করুন -Comment[ca]=Navegueu per la web -Comment[cs]=Prohlížení stránek World Wide Webu -Comment[da]=Surf på internettet -Comment[de]=Im Internet surfen -Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) -Comment[es]=Navegue por la web -Comment[et]=Lehitse veebi -Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید -Comment[fi]=Selaa Internetin WWW-sivuja -Comment[fr]=Naviguer sur le Web -Comment[gl]=Navegar pola rede -Comment[he]=גלישה ברחבי האינטרנט -Comment[hr]=Pretražite web -Comment[hu]=A világháló böngészése -Comment[it]=Esplora il web -Comment[ja]=ウェブを閲覧します -Comment[ko]=웹을 돌아 다닙니다 -Comment[ku]=Li torê bigere -Comment[lt]=Naršykite internete -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[ro]=Navigați pe Internet -Comment[ru]=Доступ в Интернет -Comment[sk]=Prehliadanie internetu -Comment[sl]=Brskajte po spletu -Comment[sv]=Surfa på webben -Comment[tr]=İnternet'te Gezinin -Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ -Comment[uk]=Перегляд сторінок Інтернету -Comment[vi]=Để duyệt các trang web -Comment[zh_CN]=浏览互联网 -Comment[zh_TW]=瀏覽網際網路 -GenericName=Web Browser -GenericName[ar]=متصفح ويب -GenericName[ast]=Restolador Web -GenericName[bn]=ওয়েব ব্রাউজার -GenericName[ca]=Navegador web -GenericName[cs]=Webový prohlížeč -GenericName[da]=Webbrowser -GenericName[el]=Περιηγητής διαδικτύου -GenericName[es]=Navegador web -GenericName[et]=Veebibrauser -GenericName[fa]=مرورگر اینترنتی -GenericName[fi]=WWW-selain -GenericName[fr]=Navigateur Web -GenericName[gl]=Navegador Web -GenericName[he]=דפדפן אינטרנט -GenericName[hr]=Web preglednik -GenericName[hu]=Webböngésző -GenericName[it]=Browser web -GenericName[ja]=ウェブ・ブラウザ -GenericName[ko]=웹 브라우저 -GenericName[ku]=Geroka torê -GenericName[lt]=Interneto naršyklė -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[ro]=Navigator Internet -GenericName[ru]=Веб-браузер -GenericName[sk]=Internetový prehliadač -GenericName[sl]=Spletni brskalnik -GenericName[sv]=Webbläsare -GenericName[tr]=Web Tarayıcı -GenericName[ug]=توركۆرگۈ -GenericName[uk]=Веб-браузер -GenericName[vi]=Trình duyệt Web -GenericName[zh_CN]=网络浏览器 -GenericName[zh_TW]=網路瀏覽器 -Keywords=Internet;WWW;Browser;Web;Explorer; -Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب; -Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador; -Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer; -Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer; -Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet; -Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen; -Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;IceCat;Φιρεφοχ;Ιντερνετ; -Keywords[es]=Explorador;Internet;WWW; -Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa; -Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur; -Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; -Keywords[hr]=Internet;WWW;preglednik;Web; -Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer; -Keywords[it]=Internet;WWW;Browser;Web;Navigatore; -Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk; -Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ; -Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside; -Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online; -Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador; -Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador; -Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис; -Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer; -Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet; -Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara; -Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд; -Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web; -Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;IceCat;ff;互联网;网站; -Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐; -Exec=icecat-x11 --name icecat-x11 %u -Icon=icecat -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; -Categories=Network;WebBrowser; -StartupNotify=true -Name[en_US]=GNU IceCat on X11 -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=icecat-x11 --name icecat-x11 --new-window %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=icecat-x11 --name icecat-x11 --private-window %u diff --git a/icecat-x11.sh.in b/icecat-x11.sh.in deleted file mode 100644 index e80fad2..0000000 --- a/icecat-x11.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Run GNU IceCat on X11 backend -# - -export MOZ_DISABLE_WAYLAND=1 -exec /__PREFIX__/bin/icecat "$@" diff --git a/icecat.appdata.xml b/icecat.appdata.xml index 6e1f7ab..ad0171c 100644 --- a/icecat.appdata.xml +++ b/icecat.appdata.xml @@ -33,10 +33,6 @@ HTTPS Everywhere is an extension that encrypts your communications with many major websites, making your browsing more secure
  • - ViewTube - Watch videos from video sharing websites with extra options -
  • -
  • A set of companion extensions for LibreJS by Nathan Nichols (https://addons.mozilla.org/en-US/firefox/user/NateN1222/) are pre-installed, and provide workarounds to use some services at USPS, RSF.org, SumOfUs.org, pay.gov, McDonald's, goteo.org and Google Docs without using nonfree JavaScript. @@ -51,16 +47,16 @@ http://www.gnu.org/software/gnuzilla/ - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat681.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1021.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat682.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1022.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat683.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1023.png - https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat684.png + https://sagitter.fedorapeople.org/icecat/icecat-screenshots/icecat1024.png sagitter_at_fedoraproject.org diff --git a/icecat.metainfo.xml b/icecat.metainfo.xml deleted file mode 100644 index 691082e..0000000 --- a/icecat.metainfo.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - mozilla-requestpolicy - icecat.desktop - mozilla-requestpolicy - Extension that gives you control over cross-site requests - https://requestpolicycontinued.github.io/ - https://github.com/requestpolicycontinued/requestpolicy/issues - CC0-1.0 - GPL-3.0+ and LGPL-3.0+ - diff --git a/icecat.sh.in b/icecat.sh.in index d21c731..a269749 100644 --- a/icecat.sh.in +++ b/icecat.sh.in @@ -39,12 +39,12 @@ cmdname=`basename $0` 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="/__PREFIX__/lib64" + SECONDARY_LIB_DIR="/__PREFIX__/lib" ;; * ) - MOZ_LIB_DIR="/usr/lib" - SECONDARY_LIB_DIR="/usr/lib64" + MOZ_LIB_DIR="/__PREFIX__/lib" + SECONDARY_LIB_DIR="/__PREFIX__/lib64" ;; esac @@ -64,15 +64,21 @@ MOZ_DIST_BIN="$MOZ_LIB_DIR/icecat" MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" -MOZ_LAUNCHER="$MOZ_DIST_BIN/run-icecat.sh" +MOZ_LAUNCHER="$MOZ_DIST_BIN/icecat" +GETENFORCE_FILE="/usr/sbin/getenforce" ## -## Enable Wayland backend by default? +## Enable Wayland backend? ## -if __DEFAULT_WAYLAND__ && ! [ $MOZ_DISABLE_WAYLAND ]; then +if ! [ $MOZ_DISABLE_WAYLAND ] && [ "$WAYLAND_DISPLAY" ]; then if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then export MOZ_ENABLE_WAYLAND=1 fi +## Enable Wayland on KDE/Sway +## + if [ "$XDG_SESSION_TYPE" == "wayland" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi fi ## @@ -86,7 +92,7 @@ fi ## Set MOZ_GRE_CONF ## MOZ_GRE_CONF=/etc/gre.d/gre.conf -if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then +if [ "$MOZ_LIB_DIR" == "/__PREFIX__/lib64" ]; then MOZ_GRE_CONF=/etc/gre.d/gre64.conf fi export MOZ_GRE_CONF @@ -175,7 +181,7 @@ MOZILLA_DOWN=0 if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then # Is icecat running? - /usr/bin/pidof icecat > /dev/null 2>&1 + /__PREFIX__/pidof icecat > /dev/null 2>&1 MOZILLA_DOWN=$? fi fi @@ -207,8 +213,8 @@ if [ $MOZILLA_DOWN -ne 0 ]; then 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"` + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g" | sed "s|\..*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g" | sed "s|\..*||g"` function create_langpack_link() { local language=$* @@ -263,13 +269,11 @@ do ;; esac done - -# Run the browser -debugging=0 -if [ $debugging = 1 ] -then - echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" -fi + +## Allow downgrade because during distro upgrade the build time can be +## older in newer version than the previous one. +## +export MOZ_ALLOW_DOWNGRADE=1 -exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" +exec $MOZ_PROGRAM "$@" diff --git a/icecat.spec b/icecat.spec index 5e6baec..6e50c61 100644 --- a/icecat.spec +++ b/icecat.spec @@ -2,12 +2,14 @@ # Set to true if it's going to be submitted as update %global release_build 1 -# Set new source-code build version -# This tag indicates a new rebuild for Fedora +# Set new source-code build version for Fedora and, not necessarily, for upstream too %global redhat_ver rh1 -#%%global pre_tag .test -%global pre_tag %{nil} +ExcludeArch: %{ix86} %{arm} + +# Bundled cbindgen makes build slow. +# Enable only if system cbindgen is not available. +%global use_bundled_cbindgen 0 #################### @@ -18,61 +20,59 @@ # Downgrade optimization %global less_optbuild 0 -# Use mozilla hardening option? -%global hardened_build 1 -#################### - -# Build PGO+LTO on x86_64 and aarch64 only due to build issues -# on other arches. -%ifarch x86_64 +# Build PGO+LTO on x86_64 and aarch64 only +%ifarch x86_64 %{arm64} %if 0%{?release_build} -%global build_with_pgo 0 -%global pgo_wayland 0 +%global build_with_pgo 1 +%global pgo_wayland 1 +%global launch_wayland_compositor 1 %else %global build_with_pgo 0 +%global pgo_wayland 0 +%global launch_wayland_compositor 0 %endif %endif -# Disable LTO to work around rhbz#1883904 -%define _lto_cflags %{nil} #################### # Active/Deactive language files handling -%global build_langpacks 1 +%bcond_without langpacks -%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +%if %{with langpacks} +%bcond_without langpacks_subpkg +%endif # Define installation directories %global icecatappdir %{_libdir}/%{name} -%global icecat_ver %{name}-%{version} -%global icecat_devel %{name}-devel-%{version} - # Define language files directory %global langpackdir %{icecatappdir}/langpacks +%global icecat_ver %{name}-%{version} +%global icecat_devel %{name}-devel-%{version} + %global toolkit_gtk3 1 # Big endian platforms -%ifarch ppc64 s390x +%ifarch s390x %{power64} # 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 -# Use system libicu? -%global system_libicu 1 - +%if 0%{?fedora} %global system_nss 1 +%else +%global system_nss 0 +%endif %if %{?system_nss} -%global nspr_version 4.26 +%global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.69 +%global nss_version 3.100 %global nss_build_version %{nss_version} %endif # Audio backends %bcond_without pulseaudio -%bcond_without jack %bcond_with alsa %global with_vpx 1 @@ -80,29 +80,30 @@ %global libvpx_version 1.8.2 %endif -%global disable_elfhack 1 - -# cbingen -%global use_bundled_cbindgen 1 - # Use clang? -%global build_with_clang 0 +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif # https://bugzilla.redhat.com/show_bug.cgi?id=1908792 +# https://bugzilla.redhat.com/show_bug.cgi?id=2255254 %global __provides_exclude_from ^%{icecatappdir} -%global __requires_exclude_from ^%{icecatappdir} +%global __requires_exclude ^(%%(find %{buildroot}%{icecatappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -)) -Name: icecat -Version: 78.15.0 -Release: 1.%{redhat_ver}%{?pre_tag}%{?dist} +Name: icecat +Epoch: 4 +Version: 140.7.0 +Release: %autorelease -e %{redhat_ver} Summary: GNU version of Firefox browser # Tri-licensing scheme for Gnuzilla/IceCat in parentheses, and licenses for the extensions included -License: (MPLv1.1 or GPLv2+ or LGPLv2+) and GPLv3+ and MIT and BSD and ISC and ASL 2.0 and MPLv2.0 -URL: http://www.gnu.org/software/gnuzilla/ +License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND GPL-3.0-or-later AND MIT AND BSD-4-Clause-UC AND ISC AND Apache-2.0 AND MPL-2.0 +URL: http://www.gnu.org/software/gnuzilla/ ## Source archive created by scripts based on Gnuzilla files. -## Modified files are hosted in a dedicated fork repository: +## All modified files are hosted in a dedicated fork repository: ## https://gitlab.com/anto.trande/icecat Source0: %{name}-%{version}-%{redhat_ver}.tar.bz2 @@ -110,7 +111,7 @@ Source2: %{name}.png Source3: %{name}-mozconfig-common # Language files downloaded by source7 script -%if 0%{?build_langpacks} +%if %{with langpacks} Source4: %{name}-%{version}-langpacks.tar.gz %endif @@ -123,78 +124,27 @@ Source5: %{name}-COPYING-licensefiles.tar.gz Source7: %{name}-lang_download.sh # Desktop files -Source9: %{name}-wayland.desktop Source10: %{name}.appdata.xml -Source11: %{name}.metainfo.xml -Source12: %{name}-wayland.sh.in Source13: %{name}.sh.in Source14: %{name}.desktop -Source15: %{name}-x11.sh.in -Source16: %{name}-x11.desktop # cbingen Source17: cbindgen-vendor.tar.xz - Source18: node-stdout-nonblocking-wrapper - -# Build patches -# Fixes installation of those addons which don't have ID on IceCat ("Cannot find id for addon" error). -Patch1: %{name}-fix_addon_installation.patch -Patch2: %{name}-libevent_linkflag.patch -Patch3: mozilla-build-arm.patch -Patch4: %{name}-build-arm-libaom.patch -Patch5: rhbz-1219542-s390-build.patch - -# Unrecognized file? -Patch7: %{name}-fix_jar.patch - -# Fix files list for installer -Patch8: %{name}-fix_installer.patch - -Patch40: build-aarch64-skia.patch -Patch41: build-disable-elfhack.patch -Patch44: build-arm-libopus.patch - -Patch54: mozilla-1669639.patch -Patch55: mozilla-1669442.patch +Source19: run-wayland-compositor # Fedora specific patches -Patch219: rhbz-1173156.patch -Patch220: firefox-nss-version.patch Patch221: firefox-nss-addon-hack.patch -Patch222: %{name}-porting_to_python310.patch -Patch223: %{name}-glibc-dynstack.patch +Patch224: %{name}-GLIBCXX-fix-for-GCC-12.patch # ARM run-time patch Patch226: rhbz-1354671.patch -# Upstream patches -Patch401: mozilla-1526653.patch -Patch402: mozilla-1196777.patch -Patch403: mozilla-1640567.patch -Patch404: mozilla-1715254_glibc_2.34.patch -Patch412: mozilla-1337988.patch -Patch414: Bug-1238661_fix-mozillaSignalTrampoline-to-work-.patch -Patch422: mozilla-1580174-webrtc-popup.patch - # Fix crash on ppc64le (mozilla#1512162) Patch423: mozilla-1512162.patch -Patch424: %{name}-mozilla-1669471.patch -Patch425: mozilla-1692706.patch -Patch426: %{name}-mozilla-1613672.patch # PGO/LTO patches -Patch600: %{name}-pgo.patch -Patch602: mozilla-1516803.patch - -# Wayland specific upstream patches -Patch565: firefox-pipewire.patch -# - -#VA-API patches -Patch584: firefox-disable-ffvpx-with-vapi.patch -Patch585: firefox-vaapi-extra-frames.patch -Patch589: mozilla-1634213.patch +Patch603: %{name}-gcc-always-inline.patch BuildRequires: alsa-lib-devel BuildRequires: autoconf213 @@ -207,12 +157,12 @@ BuildRequires: cbindgen BuildRequires: ccache BuildRequires: dbus-devel BuildRequires: dbus-glib-devel +BuildRequires: dbus-x11 BuildRequires: dconf BuildRequires: desktop-file-utils BuildRequires: dos2unix BuildRequires: gcc, gcc-c++ BuildRequires: make -BuildRequires: fedora-bookmarks BuildRequires: freetype-devel BuildRequires: gdk-pixbuf2 BuildRequires: glib2-devel @@ -224,13 +174,10 @@ BuildRequires: gstreamer1-devel BuildRequires: gstreamer1-plugins-base-devel BuildRequires: hunspell-devel BuildRequires: ImageMagick, autotrace -BuildRequires: java-1.8.0-openjdk-headless BuildRequires: intltool BuildRequires: libappstream-glib +BuildRequires: libavcodec-free-devel BuildRequires: libevent-devel -%if 0%{?system_libicu} -BuildRequires: libicu-devel -%endif BuildRequires: libjpeg-turbo-devel BuildRequires: libjpeg-devel BuildRequires: libX11-devel @@ -256,11 +203,13 @@ BuildRequires: pkgconfig(nss) >= %{nss_version} BuildRequires: nss-static >= %{nss_version} %endif -BuildRequires: openjpeg-devel BuildRequires: pango-devel +BuildRequires: pciutils-libs BuildRequires: pipewire-devel BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3.11-devel +BuildRequires: python3-orjson BuildRequires: perl-interpreter BuildRequires: pkgconfig(xrender) BuildRequires: pkgconfig(libstartup-notification-1.0) @@ -269,27 +218,36 @@ BuildRequires: pkgconfig(libcurl) %if %{with pulseaudio} BuildRequires: pulseaudio-libs-devel %endif -%if %{with jack} -BuildRequires: jack-audio-connection-kit-devel -%endif -BuildRequires: yasm BuildRequires: llvm -BuildRequires: llvm-devel -BuildRequires: clang -BuildRequires: clang-libs -BuildRequires: clang-devel -%if 0%{?build_with_clang} -BuildRequires: lld +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 10 +BuildRequires: clang19 +BuildRequires: clang19-libs +BuildRequires: llvm19-devel +BuildRequires: compiler-rt19 +%global llvm_suffix -19 +%else +BuildRequires: clang17 +BuildRequires: clang17-libs +BuildRequires: llvm17-devel +BuildRequires: compiler-rt17 +%global llvm_suffix -17 +%endif +%if "%toolchain" == "clang" +BuildRequires: lld %endif BuildRequires: rust +BuildRequires: rustfmt + %if 0%{?pgo_wayland} +BuildRequires: xorg-x11-server-Xvfb BuildRequires: mutter BuildRequires: gsettings-desktop-schemas BuildRequires: gnome-settings-daemon BuildRequires: mesa-dri-drivers -%endif -%if 0%{?build_with_pgo} -BuildRequires: xorg-x11-server-Xvfb +BuildRequires: mesa-libEGL +BuildRequires: xorg-x11-server-Xwayland +BuildRequires: dbus-x11 +BuildRequires: gnome-keyring %endif %if 0%{?big_endian} @@ -305,11 +263,13 @@ Requires: nspr >= %{nspr_build_version} Requires: nss >= %{nss_build_version} %endif +%if 0%{?fedora} +BuildRequires: fedora-bookmarks Requires: fedora-bookmarks -Suggests: mozilla-ublock-origin +%endif +Suggests: mozilla-ublock-origin Provides: webclient -Provides: bundled(mozilla-https-everywhere) = 2021.7.13 %description GNU IceCat is the GNU version of the Firefox ESR browser. @@ -318,13 +278,13 @@ Extensions included to this version of IceCat: * LibreJS GNU LibreJS aims to address the JavaScript problem described in the article "The JavaScript Trap" of Richard Stallman. - - * HTTPS Everywhere - HTTPS Everywhere is an extension that encrypts your communications with - many major websites, making your browsing more secure. - - * ViewTube - Watch videos from video sharing websites with extra options. + + * JShelter: Mitigates potential threats from JavaScript, including fingerprinting, + tracking, and data collection. Slightly modifies the results of API calls, + differently on different domains, so that the cross-site fingerprint is not + stable. Applies security counter-measures that are likely not to break web pages. + Allows fine-grained control over the restrictions and counter-measures applied + to each domain. * A set of companion extensions for LibreJS by Nathan Nichols are pre-installed, and provide workarounds to use some services at USPS, @@ -336,94 +296,38 @@ Extensions included to this version of IceCat: requested. This implies not downloading feeds, updates, blacklists or any other similar data needed during startup. -%package x11 -Summary: GNU IceCat X11 launcher -Requires: %{name}%{?_isa} -%description x11 -The %{name}-x11 package contains launcher and desktop file -to run GNU IceCat native on X11. - -%package wayland -Summary: GNU IceCat Wayland launcher -Requires: %{name}%{?_isa} -Obsoletes: %{name} < 0:78.6.1-1 -%description wayland -The icecat-wayland package contains launcher and desktop file -to run GNU IceCat native on Wayland. +%if %{with langpacks_subpkg} +%package langpacks +Summary: IceCat langpacks +Requires: %{name} = 4:%{version}-%{release} +%description langpacks +The icecat-langpacks package contains all the localization +and translations langpack add-ons. +%files langpacks -f %{name}.lang +%dir %{langpackdir} +%endif %prep %autosetup -N -n %{name}-%{version} -# Fix permissions -find . -type f -name "*.h" -exec chmod 0644 '{}' \; -find . -type f -name "*.cpp" -exec chmod 0644 '{}' \; -find . -type f -name "*.cc" -exec chmod 0644 '{}' \; -find . -type f -name "*.c" -exec chmod 0644 '{}' \; - # Copy license files tar -xf %{SOURCE5} -%patch1 -p1 -b .fix_addon_installation -%patch2 -p0 -b .libevent_linkflag -%patch3 -p1 -b .build-arm-libaom -%patch4 -p1 -b .arm -%ifarch s390 -%patch5 -p1 -b .rhbz-1219542-s390 -%endif -%patch7 -p0 -b .fix_jar -%patch8 -p0 -b .fix_installer - -%if 0%{?disable_elfhack} -%patch41 -p1 -b .disable-elfhack -%endif - # Fedora patches -%patch219 -p1 -b .rhbz-1173156 -#%%patch220 -p1 -b .nss-version -%patch221 -p1 -b .firefox-nss-addon-hack - -%if 0%{?python3_version_nodots} > 39 -%patch222 -p1 -b .porting_to_python310 +%if 0%{?fedora} +%patch -P 221 -p 1 -b .firefox-nss-addon-hack %endif -%patch223 -p1 -b .glibc-dynstack +%patch -P 224 -p 1 -b .glibcxx -# ARM run-time patch -%ifarch aarch64 -%patch40 -p1 -b .aarch64-skia -%patch226 -p1 -b .1354671 +# ARM64 +%ifarch %{arm64} +%patch -P 226 -p 1 -b .1354671 %endif -%ifarch %{arm} -%patch401 -p1 -b .1526653 -%patch414 -p1 -b .Bug-1238661---fix-mozillaSignalTrampoline-to-work -%patch44 -p1 -b .build-arm-libopus -%endif - -%patch402 -p1 -b .1196777 -%patch403 -p1 -b .1640567 -%patch404 -p1 -b .1715254 -%patch423 -p1 -b .1596503 -%patch424 -p1 -b .1669471 -%patch425 -p1 -b .1692706 -%patch426 -p1 -b .1613672 - -# Wayland specific upstream patches -%patch565 -p1 -b .firefox-pipewire - -%patch584 -p1 -b .firefox-disable-ffvpx-with-vapi -%patch585 -p1 -b .firefox-vaapi-extra-frames -%patch589 -p1 -b .1634213 - -%patch54 -p1 -b .1669639 -%patch55 -p1 -b .1669442 - -# PGO patches -%if 0%{?build_with_pgo} -%if !%{build_with_clang} -%patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 -%endif +%ifarch %{power64} +%patch -P 423 -p 1 -b .1512162 %endif +%patch -P 603 -p1 -b .inline # Remove default configuration and copy the customized one rm -f .mozconfig @@ -440,7 +344,7 @@ echo "ac_add_options --disable-webrtc" >> .mozconfig # Hide DRM Content option # This option does not work on other architectures -%ifarch x86_64 %{ix86} +%ifarch x86_64 echo "ac_add_options --disable-eme" >> .mozconfig %endif @@ -448,10 +352,6 @@ echo "ac_add_options --disable-eme" >> .mozconfig echo "ac_add_options --enable-pulseaudio" >> .mozconfig %endif -%if %{with jack} -echo "ac_add_options --enable-jack" >> .mozconfig -%endif - %if %{with alsa} echo "ac_add_options --enable-alsa" >> .mozconfig %endif @@ -470,31 +370,17 @@ echo "ac_add_options --without-system-nss" >> .mozconfig %endif # Workaround for mozbz#1341234 echo "ac_add_options --allow-addon-sideload" >> .mozconfig - -%if 0%{?system_libicu} -echo "ac_add_options --with-system-icu" >> .mozconfig -%else -echo "ac_add_options --without-system-icu" >> .mozconfig -%endif -echo "ac_add_options --disable-system-cairo" >> .mozconfig echo "ac_add_options --enable-system-pixman" >> .mozconfig -echo "ac_add_options --with-system-libevent=%{_prefix}" >> .mozconfig +echo "ac_add_options --with-system-libevent" >> .mozconfig %if %{?with_vpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig %else echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif -echo "ac_add_options --with-system-jpeg" >> .mozconfig -# This option works on these architectures only -%ifarch %{arm} -echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-av1" >> .mozconfig -echo 'export NEON_FLAGS=-mfpu=vfpv3-d16' >> .mozconfig -%endif -%ifnarch %{arm} +echo "ac_add_options --with-system-jpeg" >> .mozconfig +echo "ac_add_options --enable-ffmpeg" >> .mozconfig echo "ac_add_options --enable-av1" >> .mozconfig -%endif %if 0%{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig @@ -502,10 +388,6 @@ echo "ac_add_options --disable-optimize" >> .mozconfig echo "ac_add_options --enable-rust-debug" >> .mozconfig %else %global optimize_flags "none" -%ifarch %{arm} s390x -# ARMv7 need that (rhbz#1426850) -%define optimize_flags " -fno-schedule-insns" -%endif %if %{?optimize_flags} != "none" echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig %else @@ -519,11 +401,15 @@ echo "ac_add_options --disable-tests" >> .mozconfig echo "ac_add_options --disable-crashreporter" >> .mozconfig # Localization -%if 0%{?build_langpacks} +%if %{with langpacks} echo "ac_add_options --with-l10n-base=$PWD/l10n" >> .mozconfig %endif -%ifarch s390x +%if "%toolchain" == "clang" +echo "ac_add_options --with-libclang-path=`llvm-config%{?llvm_suffix} --libdir`" >> .mozconfig +%endif + +%ifarch s390x %{arm64} echo "ac_add_options --disable-jit" >> .mozconfig %endif @@ -538,8 +424,6 @@ echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> . # Remove executable bit to make brp-mangle-shebangs happy. chmod -x third_party/rust/itertools/src/lib.rs -chmod a-x third_party/rust/gfx-backend-vulkan/src/*.rs -chmod a-x third_party/rust/gfx-hal/src/*.rs chmod a-x third_party/rust/ash/src/extensions/ext/*.rs chmod a-x third_party/rust/ash/src/extensions/khr/*.rs chmod a-x third_party/rust/ash/src/extensions/nv/*.rs @@ -552,7 +436,6 @@ find extensions/gnu -name cose.manifest -delete %build # cbindgen %if 0%{?use_bundled_cbindgen} - mkdir -p my_rust_vendor cd my_rust_vendor %{__tar} xf %{SOURCE17} @@ -566,15 +449,15 @@ replace-with = "vendored-sources" directory = "`pwd`/my_rust_vendor" EOL +# note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` +pushd .cargo +mv config config.toml +popd + env CARGO_HOME=.cargo cargo install cbindgen export PATH=`pwd`/.cargo/bin:$PATH -%endif - -echo "Generate big endian version of config/external/icu/data/icudt67l.dat" -%if 0%{?big_endian} - icupkg -tb config/external/icu/data/icudt67l.dat config/external/icu/data/icudt67b.dat - ls -l config/external/icu/data - rm -f config/external/icu/data/icudt*l.dat +%else +export CBINDGEN=/usr/bin/cbindgen %endif mkdir %{_buildrootdir}/bin || : @@ -599,109 +482,96 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2/-O0/') # Workaround for mozbz#1531309 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-Werror=format-security//') -# Use hardened build? -%if %{?hardened_build} -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" -%endif - -%ifarch s390x %{arm} -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/' -e 's/-O2/-O1/') +%ifarch s390x +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') # If MOZ_DEBUG_FLAGS is empty, firefox'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 -# We don't wantfirefox to use CK_GCM_PARAMS_V3 in nss +# We don't want firefox to use CK_GCM_PARAMS_V3 in nss MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -DNSS_PKCS11_3_0_STRICT" -%if !0%{?build_with_clang} -%ifarch s390x %{power64} aarch64 %{ix86} -MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--print-memory-usage" -%endif -%ifarch %{arm} -MOZ_LINK_FLAGS="-Wl,--no-keep-memory" -echo "ac_add_options --enable-linker=gold" >> .mozconfig +%if "%toolchain" != "clang" +%ifarch s390x %{power64} %{arm64} +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif %endif -%ifarch %{arm} %{ix86} %{power64} -export RUSTFLAGS="-Cdebuginfo=0" -export MOZ_RUST_DEFAULT_FLAGS="-Cdebuginfo=0 -Copt-level=0" -%endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" -export LDFLAGS=$MOZ_LINK_FLAGS +%ifarch s390x +export RUSTFLAGS="-Cdebuginfo=0" +%endif + +# error "STL code can only be used with -fno-exceptions" +CXXFLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-fexceptions/-fno-exceptions/') +export CXXFLAGS="$CXXFLAGS" +export CXXFLAGS="$CXXFLAGS -fpermissive -std=gnu++17" + +export CFLAGS="$MOZ_OPT_FLAGS -std=gnu17" +export LDFLAGS="%{__global_ldflags} $MOZ_LINK_FLAGS -L%{_libdir} -L%{icecatappdir}" export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' -export PKG_CONFIG='%{_bindir}/pkg-config' +export PKG_CONFIG="`which pkg-config`" export PYTHON='%{__python3}' -%if 0%{?build_with_clang} -export LLVM_PROFDATA="llvm-profdata" -export AR="llvm-ar" -export NM="llvm-nm" -export RANLIB="llvm-ranlib" +%if "%toolchain" == "clang" +echo "export LLVM_PROFDATA=\"llvm-profdata\"" >> .mozconfig +echo "export AR=\"llvm-ar\"" >> .mozconfig +echo "export NM=\"llvm-nm\"" >> .mozconfig +echo "export RANLIB=\"llvm-ranlib\"" >> .mozconfig echo "ac_add_options --enable-linker=lld" >> .mozconfig +echo "export CC=clang%{?llvm_suffix}" >> .mozconfig +echo "export CXX=clang++%{?llvm_suffix}" >> .mozconfig %else -export CC=gcc -export CXX=g++ -export AR="gcc-ar" -export NM="gcc-nm" -export RANLIB="gcc-ranlib" +echo "export CC=gcc" >> .mozconfig +echo "export CXX=g++" >> .mozconfig +echo "export AR=\"gcc-ar\"" >> .mozconfig +echo "export NM=\"gcc-nm\"" >> .mozconfig +echo "export RANLIB=\"gcc-ranlib\"" >> .mozconfig %endif + %if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig # PGO build doesn't work with ccache export CCACHE_DISABLE=1 %endif +# Require 4 GB of RAM per CPU core +%global _smp_tasksize_proc 4096 %if %{?less_optbuild} -MOZ_SMP_FLAGS=-j1 +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j1\"" >> .mozconfig %else -MOZ_SMP_FLAGS=-j1 -# On x86_64 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} -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -%endif -%ifarch x86_64 %{power64} 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 +echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig %endif -echo "mk_add_options MOZ_MAKE_FLAGS=\"$MOZ_SMP_FLAGS\"" >> .mozconfig echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig echo "export STRIP=/bin/true" >> .mozconfig -export MACH_USE_SYSTEM_PYTHON=1 -%if 0%{?build_with_pgo} -%if 0%{?pgo_wayland} -if [ -z "$XDG_RUNTIME_DIR" ]; then - export XDG_RUNTIME_DIR=$HOME -fi -xvfb-run mutter --wayland --nested & -if [ -z "$WAYLAND_DISPLAY" ]; then - export WAYLAND_DISPLAY=wayland-0 -else - export WAYLAND_DISPLAY=wayland-1 -fi -MOZ_ENABLE_WAYLAND=1 ./mach build 2>&1 | cat - -%else -GDK_BACKEND=x11 xvfb-run ./mach build 2>&1 | cat - +%if 0%{?launch_wayland_compositor} +cp -p %{SOURCE19} . +. ./run-wayland-compositor %endif -%else -./mach build -v 2>&1 | cat - + +%if %{?debug_build} +export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true +%endif + +#Use python 3.11 for mach +sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/env python3.11|' mach + +./mach build -v 2>&1 | cat - || exit 1 + +%if 0%{?build_with_pgo} +kill $MUTTER_PID %endif %install # set up our default bookmarks +%if 0%{?fedora} +%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +%endif %make_install -C objdir @@ -716,27 +586,13 @@ mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE14} rm -rf %{buildroot}%{_bindir}/%{name} -%{__sed} -e 's/__DEFAULT_WAYLAND__/%{wayland_default}/' \ - -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} +%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE13} > %{buildroot}%{_bindir}/%{name} chmod 755 %{buildroot}%{_bindir}/%{name} - -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE15} > %{buildroot}%{_bindir}/%{name}-x11 -chmod 755 %{buildroot}%{_bindir}/%{name}-x11 -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE16} - -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE12} > %{buildroot}%{_bindir}/%{name}-wayland -chmod 755 %{buildroot}%{_bindir}/%{name}-wayland -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE9} - # -##Install man page -mkdir -p %{buildroot}%{_mandir}/man1 -install -p -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/ - ##Extract langpacks, make any mods needed, repack the langpack, and install it. -%if 0%{?build_langpacks} echo > %{name}.lang +%if %{with langpacks} mkdir -p %{buildroot}%{langpackdir} tar xf %{SOURCE4} for langpack in `ls langpacks/*.xpi`; do @@ -795,10 +651,7 @@ ln -sf %{icecatappdir}/%{name}-bin ${RPM_BUILD_ROOT}%{icecatappdir}/%{name} # Use the system hunspell dictionaries rm -rf ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries - -# Copy over run-icecat.sh -cp -p build/unix/run-%{name}.sh %{buildroot}%{icecatappdir}/ +ln -s %{_datadir}/hunspell ${RPM_BUILD_ROOT}%{icecatappdir}/dictionaries # Remove unused directories rm -rf %{buildroot}%{_libdir}/%{icecat_devel} @@ -811,7 +664,6 @@ rm -rf %{buildroot}%{icecatappdir}/gtk2 mkdir -p %{buildroot}%{_metainfodir} install -pm 644 %{SOURCE10} %{buildroot}%{_metainfodir}/ -install -pm 644 %{SOURCE11} %{buildroot}%{_metainfodir}/ # Moves defaults/preferences to browser/defaults/preferences %pretrans -p @@ -836,20 +688,21 @@ end appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop -%if 0%{?build_langpacks} -%files -f %{name}.lang -%else +%if %{with langpacks_subpkg} %files +%dir %{langpackdir} +%else +%files -f %{name}.lang %endif %doc README.* AUTHORS -%license LICENSE LEGAL COPYING-* +%license LICENSE COPYING-* %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*x*/apps/%{name}*.png %{_metainfodir}/*.appdata.xml -%{_metainfodir}/%{name}.metainfo.xml -%{_mandir}/man1/%{name}* %dir %{icecatappdir} +%{icecatappdir}/glxtest +%{icecatappdir}/vaapitest %{icecatappdir}/browser/ %{icecatappdir}/defaults/ %{icecatappdir}/dictionaries @@ -858,965 +711,12 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{icecatappdir}/*.so %{icecatappdir}/*.ini %{icecatappdir}/omni.ja -%{icecatappdir}/run-icecat.sh %{icecatappdir}/dependentlibs.list -%{icecatappdir}/plugin-container %{icecatappdir}/pingsender %{icecatappdir}/gmp-clearkey/ -%if 0%{?build_langpacks} -%dir %{langpackdir} +%ifarch %{arm64} riscv64 +%{icecatappdir}/v4l2test %endif -%files x11 -%{_bindir}/%{name}-x11 -%{_datadir}/applications/%{name}-x11.desktop - -%files wayland -%{_bindir}/%{name}-wayland -%{_datadir}/applications/%{name}-wayland.desktop - %changelog -* Tue Oct 05 2021 Antonio Trande - 78.15.0-1.rh1 -- Release 78.15.0 - -* Tue Sep 07 2021 Antonio Trande - 78.14.0-1.rh1 -- Release 78.14.0 - -* Wed Aug 11 2021 Antonio Trande - 78.13.0-2.rh3 -- Enable build on PPC64le - -* Tue Aug 10 2021 Antonio Trande - 78.13.0-1.rh3 -- Release 78.13.0 - -* Sun Aug 08 2021 Antonio Trande - 78.13.0-0.5.rh2 -- Patched for Mozilla bug 1715254 (rhbz#1990612) - -* Sat Aug 07 2021 Antonio Trande - 78.13.0-0.4.rh2 -- Update cbindgen to 0.19.0 - -* Thu Aug 05 2021 Antonio Trande - 78.13.0-0.3.rh2 -- Release Candidate 78.13.0-rc2 -- Disable PGO build (incomplete porting to Python 3.10) - -* Tue Aug 03 2021 Antonio Trande - 78.13.0-0.2.rh1 -- Enable PGO build - -* Mon Aug 02 2021 Antonio Trande - 78.13.0-0.1.rh1 -- Release Candidate 78.13.0-rc1 - -* Thu Jul 22 2021 Fedora Release Engineering - 78.12.0-4.rh2.test -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jul 20 2021 Antonio Trande - 78.12.0-3.rh2.test -- Disable debug build mode -- Patched for Mozilla bug #1721326 - -* Thu Jul 15 2021 Antonio Trande - 78.12.0-2.rh2.test -- Enable debug build mode - -* Wed Jul 14 2021 Antonio Trande - 78.12.0-1.rh2 -- Release 78.12.0 -- HTTPS Everywhere 2021.7.13 - -* Tue Jun 01 2021 Antonio Trande - 78.11.0-1.rh1 -- Release 78.11.0 - -* Fri May 07 2021 Antonio Trande - 78.10.1-2.rh1 -- Hide DRM Content option in Preference - -* Wed May 05 2021 Antonio Trande - 78.10.1-1.rh1 -- Release 78.10.1 - -* Sat Apr 24 2021 Antonio Trande - 78.10.0-2.rh1 -- Patched for rhbz#1945720 (Mozilla bug #1680166) - -* Mon Apr 19 2021 Antonio Trande - 78.10.0-1.rh1 -- Release 78.10.0 - -* Fri Apr 09 2021 Antonio Trande - 78.9.0-3.rh1 -- Patched for bug #1613672 -- Use cbindgen 0.18.0 -- Debug build on - -* Tue Mar 30 2021 Jonathan Wakely - 78.9.0-2.rh1 -- Rebuilt for removed libstdc++ symbol (#1937698) - -* Tue Mar 23 2021 Antonio Trande - 78.9.0-1.rh1 -- Release 78.9.0 - -* Thu Feb 25 2021 Antonio Trande - 78.8.0-3.rh1 -- Add patch #1692706 - -* Tue Feb 23 2021 Antonio Trande - 78.8.0-2.rh1 -- Exclude Power64 (rhbz#1932204) -- Fix build option for s390x - -* Tue Feb 23 2021 Antonio Trande - 78.8.0-1.rh1 -- Release 78.8.0 - -* Fri Feb 05 2021 Antonio Trande - 78.7.1-1.rh1 -- Release 78.7.1 - -* Fri Feb 05 2021 Antonio Trande - 78.7.0-3.rh2 -- Fix parameter passing on ppc64le (mozb#1690152) -- Remove gtk2 support as flash plugin is no longer supported - -* Wed Jan 27 2021 Antonio Trande - 78.7.0-2.rh2 -- Build Release 78.7.0-rh2 -- HTTPS Everywhere 2021.1.27 - -* Tue Jan 26 2021 Antonio Trande - 78.7.0-1.rh1 -- Release 78.7.0 - -* Mon Jan 11 2021 Antonio Trande - 78.6.1-3.rh1 -- Added a workaround for rhbz#1908018 - -* Wed Jan 06 2021 Antonio Trande - 78.6.1-2.rh1 -- Fix desktop files - -* Wed Jan 06 2021 Antonio Trande - 78.6.1-1.rh1 -- Release 78.6.1 - -* Sat Dec 26 2020 Antonio Trande - 78.6.0-6.rh1 -- Use wayland/x11 launchers -- Test ARM build with gcc-11.0.0-0.11 - -* Tue Dec 22 2020 Antonio Trande - 78.6.0-5.rh1 -- Add __requires_exclude_from - -* Sun Dec 20 2020 Miro Hrončok - 78.6.0-4.rh1 -- Filter out private libraries provides -- Fixes: rhbz#1908792 - -* Sun Dec 20 2020 Antonio Trande - 78.6.0-3.rh1 -- Add build-arm-libaom patch -- Exclude ARM architectures - -* Sat Dec 19 2020 Antonio Trande - 78.6.0-2.rh1 -- Re-enable system NSS (rhbz#1908792) -- Disable PGO builds (x86_64) - -* Tue Dec 15 2020 Antonio Trande - 78.6.0-1.rh1 -- Release 78.6.0 -- Disable system nss (rhbz#1908018) - -* Thu Nov 19 2020 Antonio Trande - 78.5.0-2.rh2 -- Build Release 78.5.0-rh2 -- HTTPS Everywhere 2020.11.17 - -* Mon Nov 16 2020 Antonio Trande - 78.5.0-1.rh1 -- Release 78.5.0 - -* Tue Oct 27 2020 Antonio Trande - 78.4.0-2.rh1 -- Patched for rhbz#1891234 - -* Fri Oct 23 2020 Antonio Trande - 78.4.0-1.rh1 -- Release 78.4.0 -- Regenerate cbindgen-0.14.3 -- Patched for using Rust-1.47 (mzbz#1663715) - -* Wed Oct 07 2020 Antonio Trande - 78.3.1-2.rh1.test -- PGO build test - -* Thu Oct 01 2020 Antonio Trande - 78.3.1-1.rh1 -- Release 78.3.1 (rh1) -- Patched for mzbz#1640567 - -* Wed Sep 23 2020 Antonio Trande - 78.3.0-2.rh1 -- Rebuild for libevent-2.1.12 - -* Mon Sep 21 2020 Antonio Trande - 78.3.0-1.rh1 -- Release 78.3.0 (rh1) - -* Fri Sep 18 2020 Miro Hrončok - 78.2.0-7.rh6 -- Use python3 instead of python2 for build - -* Wed Sep 09 2020 Antonio Trande - 78.2.0-6.rh6 -- Build Release 78.2.0-rh6 - -* Tue Sep 08 2020 Antonio Trande - 78.2.0-5.rh5 -- Add configure options to allow loading unsigned bundled addons - -* Sun Sep 06 2020 Antonio Trande - 78.2.0-4.rh5 -- Build Release 78.2.0-rh5 - -* Sun Sep 06 2020 Antonio Trande - 78.2.0-3.rh4 -- Build Release 78.2.0-rh4 -- PPC64le build disabled on Fedora 33 - -* Thu Sep 03 2020 Antonio Trande - 78.2.0-2.rh3 -- Build Release 78.2.0-rh3 -- Reintroduce PPC64LE builds - -* Tue Aug 25 2020 Antonio Trande - 78.2.0-1.rh2 -- Release 78.2.0 - -* Sun Aug 23 2020 Antonio Trande - 78.2.0-0.1.rc1.rh1.test -- Release Candidate 78.2.0 - -* Wed Jul 29 2020 Antonio Trande - 78.0.1-2.rh1.test -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jul 02 2020 Antonio Trande - 78.0.1-1.rh1.test -- Release 78.0.1 -- Disable crash reporter - -* Wed Jul 01 2020 Antonio Trande - 78.0-1.rh1.test -- Release 78.0 - -* Tue Jun 02 2020 Antonio Trande - 68.9.0-1.rh2 -- Release 68.9.0 - -* Thu May 28 2020 Antonio Trande - 68.9.0-0.1.rc1.rh1 -- Release candidate 68.9.0 build1 - -* Wed May 20 2020 Antonio Trande - 68.8.0-5.rh1 -- Explicit perl-interpreter BR dependency - -* Sat May 16 2020 Pete Walter - 68.8.0-4.rh1 -- Rebuild for ICU 67 - -* Sat May 16 2020 Pete Walter - 68.8.0-3.rh1 -- Rebuild for ICU 67 -- Remove libgen references - -* Fri May 08 2020 Peter Robinson - 68.8.0-2.rh1 -- Don't exclude aarch64 architecture - -* Tue May 05 2020 Antonio Trande - 68.8.0-1.rh1 -- Release 68.8.0 -- Exclude s390x architecture - -* Tue Apr 07 2020 Antonio Trande - 68.7.0-1.rh1 -- Release 68.7.0 - -* Sun Mar 29 2020 Antonio Trande - 68.6.0-4.rh4 -- Remove libgen addon - -* Sat Mar 21 2020 Antonio Trande - 68.6.0-3.rh3 -- Source code archive regenerated -- HTTPS-everywhere updated to the 2020.3.16 - -* Wed Mar 11 2020 Antonio Trande - 68.6.0-2.rh2 -- Remove useless build dependency - -* Tue Mar 10 2020 Antonio Trande - 68.6.0-1.rh2 -- Release 68.6.0 - -* Sat Mar 07 2020 Antonio Trande - 68.6.0-0.1.rc1.rh1 -- Release candidate 68.6.0 - -* Mon Feb 10 2020 Antonio Trande - 68.5.0-1.rh1 -- Release 68.5.0 - -* Wed Jan 29 2020 Fedora Release Engineering - 68.4.1-2.rh1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild -- Undefine strict symbol checks on s390x - -* Sat Jan 11 2020 Antonio Trande - 68.4.1-1.rh1 -- Release 68.4.1 (release build) - -* Wed Jan 08 2020 Antonio Trande - 68.4.0-2.rh2 -- Release 68.4.0 (release build) - -* Tue Jan 07 2020 Antonio Trande - 68.4.0-1.rh2.test -- Release 68.4.0 -- Test build for ARM and s390x -- Patched for mzbz#1526653 to disable wasm on ARM -- Add --disable-av1 build option for ARM - -* Fri Jan 03 2020 Antonio Trande - 68.4.0-0.2.rc1.rh1 -- New rebuild of source archive (extensions updated) -- Use rh prefix instead of gnu - -* Wed Jan 01 2020 Antonio Trande - 68.4.0-0.1.rc1.gnu1 -- Release candidate 68.4.0 -- Fix rhbz#1785956 - -* Thu Dec 05 2019 Antonio Trande - 68.3.0-2.gnu1 -- Appdata file updated -- Description updated - -* Wed Dec 04 2019 Antonio Trande - 68.3.0-1.gnu1 -- Release 68.3.0 -- Patch for cbindgen/rust-1.39 - -* Wed Nov 27 2019 Antonio Trande - 68.3.0-0.1.rc2.gnu1 -- Release candidate 68.3.0 - -* Fri Nov 22 2019 Antonio Trande - 68.2.0-4.gnu3.test -- Build release 68.2.0-gnu3 -- Undo latest change -- Patched for rust-1.39+ - -* Sun Nov 10 2019 Antonio Trande - 68.2.0-3.gnu2 -- Do not remove cose.manifest files - -* Fri Nov 08 2019 Antonio Trande - 68.2.0-2.gnu2 -- Build release 68.2.0-gnu2 -- HTTPS-Everywhere 2019_11_7 -- Use always system vpx (Fedora 30+) -- Patched for Mozilla bug #1556602 - -* Tue Oct 22 2019 Antonio Trande - 68.2.0-1.gnu1 -- Release 68.2.0 - -* Tue Sep 03 2019 Antonio Trande - 68.1.0-1.gnu1 -- Release 68.1.0 -- Incorporate Wayland patches from Firefox 68 - -* Sun Sep 01 2019 Antonio Trande - 68.0.2-5.gnu3 -- Rebuild after retiring of Python2 - -* Fri Aug 23 2019 Antonio Trande - 68.0.2-4.gnu3 -- Enable langpacks - -* Wed Aug 21 2019 Antonio Trande - 68.0.2-3.gnu3 -- gnu3 build release - -* Mon Aug 19 2019 Antonio Trande - 68.0.2-2.gnu2 -- WebRTC always disabled -- Do not build langpacks -- gnu2 build release -- Disable MOZ_SERVICES_SYNC - -* Thu Aug 15 2019 Antonio Trande - 68.0.2-1.gnu1 -- Release 68.0.2 -- Import cbindgen stuff from Firefox package -- Do not use sqlite from system - -* Sun Jul 28 2019 Antonio Trande - 60.8.0-6.gnu1 -- Add patch to fix the addon installation - -* Thu Jul 25 2019 Fedora Release Engineering - 60.8.0-6.gnu1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue Jul 23 2019 Antonio Trande - 60.8.0-5.gnu1 -- Enable WebRTC on ppc64le - -* Fri Jul 12 2019 Antonio Trande - 60.8.0-4.gnu1 -- Remove redundant Python2 dependencies - -* Thu Jul 11 2019 Antonio Trande - 60.8.0-3.gnu1 -- Remove filtering of private libraries -- Enable webrtc on %%{ix86} x86_64 only - -* Wed Jul 10 2019 Antonio Trande - 60.8.0-2.gnu1 -- Use mozilla-1512162.patch on Fedora 30+ only (GCC-9) - -* Tue Jul 09 2019 Antonio Trande - 60.8.0-1.gnu1 -- Release 60.8.0 - -* Sat Jun 22 2019 Antonio Trande - 60.7.2-1.gnu1 -- Release 60.7.2 - -* Wed Jun 19 2019 Antonio Trande - 60.7.1-1.gnu1 -- Release 60.7.1 -- Do not list Git-tracked icecat.rpmlintrc as source - -* Tue May 28 2019 Antonio Trande - 60.7.0-2.gnu2 -- Build release 60.7.0-gnu2 - -* Mon May 20 2019 Antonio Trande - 60.7.0-1.gnu1 -- Release 60.7.0 - -* Sun May 12 2019 Antonio Trande - 60.6.3-2.gnu2 -- Build release 60.6.3-gnu2 - -* Thu May 09 2019 Antonio Trande - 60.6.3-1.gnu1 -- Release 60.6.3 (bugfix mozb #1549249) - -* Mon May 06 2019 Antonio Trande - 60.6.2-1.gnu1 -- Release 60.6.2 (bugfix mozb #1549061) - -* Sat Apr 06 2019 Antonio Trande - 60.6.1-2.gnu2 -- Source archive rebuilt (gnu2) -- Update extensions -- Use bundled https-everywhere extension - -* Fri Mar 22 2019 Antonio Trande - 60.6.1-1 -- Release 60.6.1 -- Wayland backend made default starting from Fedora 31 (rhbz#1691852) - -* Thu Mar 21 2019 Antonio Trande - 60.6.0-2 -- Patched for building with newer glibc (2.29.9000-4) (mozilla #1533969) -- Excluded on ARM (rhbz #1658940) -- Language files re-based - -* Tue Mar 19 2019 Antonio Trande - 60.6.0-1 -- Release 60.6.0 -- Enable languages - -* Sun Mar 03 2019 Antonio Trande - 60.5.2-1 -- Release 60.5.2 -- Disable Werror-format-security flags -- Enable linker=gold on ARM -- Try to fix libevent LD path - -* Thu Feb 14 2019 Antonio Trande - 60.5.1-1 -- Release 60.5.1 -- Conditional macro for libvpx support - -* Tue Feb 05 2019 Björn Esser - 60.5.0-2 -- rebuilt (libvpx) - -* Tue Jan 29 2019 Antonio Trande - 60.5.0-1 -- Release 60.5.0 - -* Sun Jan 13 2019 Antonio Trande - 60.4.0-2 -- Make Wayland support default on fedora 30+ -- Enable Wayland support -- Drop old patches -- Backported Wayland related code from Firefox 63 -- Added fix for mozbz#1507475 - crash when display changes - -* Wed Dec 12 2018 Antonio Trande - 60.4.0-1 -- Upstream release 60.4.0 - -* Tue Nov 13 2018 Caolán McNamara - 60.3.0-4 -- rebuild for hunspell-1.7.0 - -* Sat Nov 10 2018 Antonio Trande - 60.3.0-3 -- Rebuild with latest changes from Gnuzilla - -* Wed Oct 31 2018 Antonio Trande - 60.3.0-2 -- Drop UserAgent patch (rhbz#1644898) - -* Wed Oct 24 2018 Antonio Trande - 60.3.0-1 -- Upstream release 60.3.0 - -* Wed Oct 03 2018 Antonio Trande - 60.2.2-2 -- Drop UserAgent patch (rhbz#1644898) - -* Wed Oct 03 2018 Antonio Trande - 60.2.2-1 -- Upstream release 60.2.2 - -* Fri Sep 28 2018 Antonio Trande - 60.2.1-1 -- Upstream release 60.2.1 - -* Fri Sep 14 2018 Antonio Trande - 60.2.0-0.1 -- Pre-release 60.2.0 -- Integrate firefox patches for wayland (disabled) -- Setting of upstream patches for 60 releases -- Manpage updated -- Include languages -- Use options to reduce memory requirements at ld runtime on ix86 - -* Sun Aug 05 2018 Antonio Trande - 52.9.0-1 -- Update to 52.9.0 - -* Fri Jul 13 2018 Fedora Release Engineering - 52.8.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jul 10 2018 Pete Walter - 52.8.1-2 -- Rebuild for ICU 62 - -* Thu Jun 07 2018 Antonio Trande - 52.8.1-1 -- Update to 52.8.1 -- Add icecat.rpmlintrc - -* Wed Jun 06 2018 Antonio Trande - 52.8.0-3 -- Source tarball re-created without non-free code - -* Tue Jun 5 2018 Tom Callaway - 52.8.0-2 -- remove non-free files from tarball - -* Sat May 12 2018 Antonio Trande - 52.8.0-1 -- Update to 52.8.0 - -* Mon Apr 30 2018 Pete Walter - 52.7.3-2 -- Rebuild for ICU 61.1 - -* Tue Mar 27 2018 Antonio Trande - 52.7.3-1 -- Update to 52.7.3 - -* Tue Mar 20 2018 Antonio Trande - 52.7.2-1 -- Update to 52.7.2 - -* Sat Mar 10 2018 Antonio Trande - 52.7.0-1 -- Update to 52.7.0 - -* Tue Feb 27 2018 Antonio Trande - 52.6.0-7 -- HTTPS Everywhere updated to 2018.1.11 -- "goteo.org payments with free JS" updated to 1.1 -- "LibreJS compatible Pay.gov" updated to 1.3 -- "Reveal hidden HTML" updated to 1.6 -- Enabled WebRTC, but prevent leaking the LAN ip - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-6 -- Add gcc gcc-c++ BR - -* Sun Feb 18 2018 Antonio Trande - 52.6.0-5 -- Rebuild for libevent-2.1.8 - -* Wed Feb 07 2018 Fedora Release Engineering - 52.6.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Jan 28 2018 Antonio Trande - 52.6.0-3 -- Rebuild for libvpx again - -* Fri Jan 26 2018 Tom Callaway - 52.6.0-2 -- rebuild for new libvpx - -* Wed Jan 24 2018 Antonio Trande - 52.6.0-1 -- Update to 52.6.0 - -* Thu Jan 11 2018 Igor Gnatenko - 52.5.3-4 -- Remove obsolete scriptlets - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-3 -- Set build against NSS-3.34/NSPR-4.17.0 at least - -* Sun Jan 07 2018 Antonio Trande - 52.5.3-2 -- Patched for mozilla bug-1427870 - -* Sun Dec 31 2017 Antonio Trande - 52.5.3-1 -- Update to 52.5.3 -- Use 'with-l10n' option - -* Fri Dec 29 2017 Antonio Trande - 52.5.2-1 -- Update to 52.5.2 -- WebRTC is always disabled -- Add JACK audio backend (bz#1528742) - -* Thu Dec 21 2017 Antonio Trande - 52.3.0-4 -- Appdata file moved into metainfo data directory - -* Mon Dec 04 2017 Caolán McNamara - 52.3.0-3 -- rebuild for hunspell-1.5.2 - -* Sat Sep 02 2017 Antonio Trande - 52.3.0-2 -- Enable language files - -* Wed Aug 16 2017 Antonio Trande - 52.3.0-1 -- Update to 52.3.0 - -* Thu Aug 03 2017 Antonio Trande - 52.2.1-1 -- Update to 52.2.1 -- ICU source code patched to work on big-endian architectures - -* Wed Jul 26 2017 Fedora Release Engineering - 52.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 52.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat May 06 2017 Antonio Trande - 52.1.0-2 -- Fix language files - -* Sat May 06 2017 Jens Lody - 52.1.0-1 -- Update to 52.1.0 -- Remove obsolete firefox-debug.patch -- Spec-file: fix typo in description - -* Sun Apr 16 2017 Antonio Trande - 52.0.2-3 -- Enable languages - -* Fri Apr 14 2017 Antonio Trande - 52.0.2-2 -- Update to 52.0.2 -- Add patch for mozbz#1158076 - enable dark theme by pref - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-5 -- Skia support disabled on ARM/ix86 builds (failed for memory exhausted) - -* Sun Mar 26 2017 Antonio Trande - 52.0.1-4 -- Downgrade optimization level on ARM builds (failed for memory exhausted) -- Use one job with Make on ix86 - -* Wed Mar 22 2017 Antonio Trande - 52.0.1-3 -- Added fix for mozbz#1158076 - -* Mon Mar 20 2017 Antonio Trande - 52.0.1-2 -- Set cflags/libs options for NSS/NSPR -- Add --disable-elf-hack - -* Sun Mar 19 2017 Antonio Trande - 52.0.1-1 -- Update to 52.0.1 -- All patches synchronized with firefox - -* Mon Mar 06 2017 Jens Lody - 45.7.0-8 -- aarch64build-fix (taken from mozjs45) -- include aarch64 again - -* Sun Mar 05 2017 Antonio Trande - 45.7.0-7 -- Build with language files -- Use new source archive -- Exclude aarch64 - -* Sun Mar 05 2017 Jens Lody - 45.7.0-6 -- do not set debug-build-flag - -* Sun Mar 05 2017 Jens Lody - 45.7.0-5 -- (Re-)add language-download.script and make Source-tag unconditional. -- Fix debug build. - -* Sat Feb 18 2017 Antonio Trande - 45.7.0-3 -- Optimization flags disabled on arm/arm64 - -* Thu Feb 16 2017 Jens Lody - - 45.7.0-3 -- Fix gcc7 build, with backport of fix for mozb#1269171 - -* Fri Feb 10 2017 Fedora Release Engineering - 45.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Feb 04 2017 Antonio Trande - 45.7.0-1 -- Update to 45.7.0 - -* Sat Jan 21 2017 Antonio Trande - 45.5.1-7 -- Test for trying ICU patch - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-6 -- System ICU disabled on Fedora > 25 - -* Fri Jan 20 2017 Antonio Trande - 45.5.1-5 -- Patched to make compatible with NSS 3.28.1 (bz#1414987) - -* Thu Jan 05 2017 Antonio Trande - 45.5.1-4 -- Conformed to new rules for scriptlets - -* Tue Dec 13 2016 Caolán McNamara - 45.5.1-3 -- rebuild for hunspell-1.5.4 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-2 -- Keep workaround for bz#1332926 - -* Fri Dec 02 2016 Antonio Trande - 45.5.1-1 -- Update to 45.5.1 - -* Sun Nov 27 2016 Antonio Trande - 45.3.0-0.6.beta -- Debug build -- Debug builds patched (mozb#1013882) -- Patched for removing unnecessary warns - -* Sun Sep 04 2016 Antonio Trande - 45.3.0-0.5.beta -- Drop obsolete patch - -* Sat Sep 03 2016 Antonio Trande - 45.3.0-0.4.beta -- Use MOZ_SMP_FLAGS instead of MOZ_MAKE_FLAGS - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.3.beta -- Update desktop file's translations -- Enable jemalloc - -* Thu Sep 01 2016 Antonio Trande - 45.3.0-0.2.beta -- Disable optimization on ARM - -* Mon Aug 29 2016 Antonio Trande - 45.3.0-0.1.beta -- Update to 45.3.0 (beta) -- Drop old patches -- Reset default compiler flags -- Filtering private libraries - -* Fri Jul 22 2016 Tom Callaway - 38.8.0-13 -- rebuild for libvpx 1.6.0 - -* Wed Jun 29 2016 Antonio Trande - 38.8.0-12 -- Optimization level increased to -O1 - -* Tue Jun 28 2016 Antonio Trande - 38.8.0-11 -- Fix appadata file's tags - -* Sun Jun 26 2016 Antonio Trande - 38.8.0-10 -- Rebuild with newest icecat-38.8.0-gnu2 source archive (24 June) - -* Sun Jun 26 2016 Jens Lody - 38.8.0-9 -- Workaround for #1332926 - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-8 -- Set MOZ_SMP_FLAGS - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-7 -- Undo latest change - -* Sat Jun 18 2016 Antonio Trande - 38.8.0-6 -- Set C++14 standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-5 -- Set C++ standard flag - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-4 -- Disable install stripping -- Disable builds for debugging - -* Fri Jun 17 2016 Antonio Trande - 38.8.0-3 -- Enable builds for debugging - -* Fri May 13 2016 Antonio Trande - 38.8.0-2 -- Remove additional flag - -* Fri May 13 2016 Antonio Trande - 38.8.0-1 -- Update to 38.8.0 - -* Mon Apr 18 2016 Caolán McNamara - 38.7.1-4 -- rebuild for hunspell 1.4.0 - -* Fri Apr 15 2016 David Tardon - 38.7.1-3 -- rebuild for ICU 57.1 - -* Sat Apr 09 2016 Antonio Trande - 38.7.1-2 -- Downgrade optimization level on ARM - -* Fri Apr 08 2016 Antonio Trande - 38.7.1-1 -- Update to 38.7.1 - -* Thu Feb 04 2016 Antonio Trande - 38.6.0-1 -- Update to 38.6.0 -- Patched for GCC6 builds -- Cut off Provides bundled libraries except xulrunner - -* Thu Feb 04 2016 Fedora Release Engineering - 38.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-4 -- Fix description of appdata file - -* Mon Jan 04 2016 Antonio Trande - 38.5.2-3 -- Fix validating of desktop file - -* Sun Jan 03 2016 Antonio Trande - 38.5.2-2 -- .desktop .appdata and .metainfo files renamed (bz#1295234) - -* Fri Jan 01 2016 Antonio Trande - 38.5.2-1 -- Update to 38.5.2 - -* Fri Dec 18 2015 Antonio Trande - 38.5.0-1 -- Update to 38.5.0 - -* Tue Dec 08 2015 Antonio Trande - 38.4.0-3 -- Force -fstack-protector-all flag (bz#1283307) - -* Tue Dec 1 2015 Tom Callaway - 38.4.0-2 -- rebuild for libvpx 1.5.0 - -* Tue Nov 17 2015 Antonio Trande - 38.4.0-1 -- Update to 38.4.0 - -* Tue Nov 03 2015 Antonio Trande - 38.3.0-12 -- ARM neon support disabled on aarch64 - -* Sat Oct 31 2015 Antonio Trande - 38.3.0-11 -- Rebuild for ICU 56 - -* Wed Oct 28 2015 Antonio Trande - 38.3.0-10 -- Rebuild with RPM_LD_FLAGS - -* Wed Oct 28 2015 David Tardon - 38.3.0-9 -- rebuild for ICU 56.1 - -* Tue Oct 20 2015 Antonio Trande - 38.3.0-8 -- Active hardened_build - -* Tue Oct 13 2015 Antonio Trande - 38.3.0-7 -- Rebuilt with updated Addons - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-6 -- Fixed header files directory for freetype-2.6.1 - -* Mon Oct 12 2015 Antonio Trande - 38.3.0-5 -- Languages packaged - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-4 -- WebRTC disabled on extra arches - -* Tue Oct 06 2015 Antonio Trande - 38.3.0-3 -- Updated appdata and manpage files - -* Mon Oct 05 2015 Antonio Trande - 38.3.0-2 -- Disabled crashreporter on F22+ - -* Sat Oct 03 2015 Antonio Trande - 38.3.0-1 -- Update to 38.3.0 -- Patches updated -- Language files not packaged -- Build defined for Gtk3 - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-5 -- Added backported patch for CVE-2015-4473_4482_4488_4489_4491_4492 vulnerabilities - -* Thu Aug 13 2015 Antonio Trande - 31.8.0-4 -- Added backported patch for CVE-2015-4495 vulnerability - -* Tue Jul 21 2015 Antonio Trande - 31.8.0-3 -- Fixed on secondary arches - -* Mon Jul 20 2015 Antonio Trande - 31.8.0-2 -- Un-bundle libvpx-1.4 - -* Fri Jul 17 2015 Antonio Trande - 31.8.0-1 -- Update to 31.8.0 - -* Sun Jul 12 2015 Antonio Trande - 31.7.0-8 -- Packaged IceCat 31.7 in Fedora 21 - -* Fri Jul 03 2015 Antonio Trande - 31.7.0-7 -- Fix .metainfo.xml file - -* Thu Jul 02 2015 Antonio Trande - 31.7.0-6 -- Added .metainfo.xml file - -* Thu Jun 18 2015 Antonio Trande - 31.7.0-5 -- Added options --enable-tree-freetype --enable-stdcxx-compat -- Added patch for Freetype-2.6 headers - -* Wed Jun 17 2015 Fedora Release Engineering - 31.7.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Jun 14 2015 Antonio Trande - 31.7.0-3 -- Re-built locale files -- Re-organized mozconfig options -- Compiled with ccache - -* Wed Jun 10 2015 Antonio Trande - 31.7.0-2 -- Unpacked files found - -* Mon Jun 08 2015 Antonio Trande - 31.7.0-1 -- Update to 31.7.0 -- Make sure locale works for langpacks -- Set default bookmarks -- Made appdata file -- devel package obsoleted - -* Mon May 04 2015 Antonio Trande - 31.6.0-6 -- Required VPX from system for < F23 - -* Sun May 03 2015 Antonio Trande - 31.6.0-5 -- libvpx-1.3.0 bundled only in >= F23 - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-4 -- Disable optimization flags (when GCC5 compiles) on ARM - -* Tue Apr 07 2015 Antonio Trande - 31.6.0-3 -- Compiled against bundle libvpx-1.3.0 - -* Mon Apr 06 2015 Tom Callaway - 31.6.0-2 -- Rebuild for libvpx 1.4.0 - -* Sat Apr 04 2015 Antonio Trande - 31.6.0-1 -- Update to 31.6.0 - -* Mon Mar 16 2015 Antonio Trande - 31.5.0-2 -- New rebuild to fix profile's storage problem - -* Thu Mar 12 2015 Antonio Trande - 31.5.0-1 -- Update to 31.5.0 -- Patched to fix Mozilla Bug1021171 -- crashreporter disabled on > F21 -- Improved .desktop file - -* Wed Feb 04 2015 Petr Machata - 31.4.0-5 -- Bump for rebuild. - -* Mon Feb 02 2015 Antonio Trande - 31.4.0-4 -- Desktop file missing %%u (bz#1188078) - -* Sat Jan 31 2015 Antonio Trande - 31.4.0-3 -- Annulled the user-agent string customization - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-2 -- Added %%license macro - -* Thu Jan 29 2015 Antonio Trande - 31.4.0-1 -- Update to 31.4.0 -- Added MPLv2.0 license of HTML5-video-everywhere extension -- Description updated - -* Mon Jan 26 2015 David Tardon - 31.2.0-8 -- rebuild for ICU 54.1 - -* Wed Jan 21 2015 Antonio Trande - 31.2.0-7 -- Package now requires system-bookmarks (bz#1184297) - -* Wed Nov 26 2014 Antonio Trande - 31.2.0-6 -- libjpeg-turbo unbundled (bz#1164815) - -* Thu Nov 06 2014 Antonio Trande - 31.2.0-5 -- Added -Wno-error=declaration-after-statement -- Built against GStreamer-1.0 -- Package compiled against bundled JPEG - -* Sat Oct 25 2014 Antonio Trande - 31.2.0-4 -- Removed -fexceptions flags from Fedora optflags - -* Thu Oct 23 2014 Antonio Trande - 31.2.0-3 -- Added -Wformat-security flags -- Added special link flags for ARM - -* Wed Oct 22 2014 Antonio Trande - 31.2.0-2 -- Fixed compiler flags - -* Tue Oct 21 2014 Antonio Trande - 31.2.0-1 -- Update to 31.2.0 -- Added 'configure' options -- Built against system NSS/NSPR - -* Thu Oct 16 2014 Antonio Trande - 31.1.1-1 -- Update to 31.1.1 -- New bundled files (bz#1153135) -- Static sub-package is not built anymore -- Man-page updated -- Spyblock addon included - -* Tue Aug 26 2014 Antonio Trande - 24.0-14 -- Added "Provides: webclient" -- Installed manpage file - -* Tue Aug 19 2014 Antonio Trande - 24.0-13 -- Removed system xulrunner conditional -- Ghosted all .xpi language files (handled by %%find_lang) -- Added BSD, ISC, MIT, Apache2.0 licenses - -* Sat Aug 09 2014 Antonio Trande - 24.0-12 -- Removed HTTPS-everywhere RequestPolicy extensions (patch7) - -* Thu Jul 24 2014 Antonio Trande - 24.0-11 -- Remove precompiled .egg files -- Remove bundled jar/class files -- Delete chrpaths -- Added 'Public Domain' license -- Added a patch for using system Python Virtualenv (patch6) - -* Wed Jul 16 2014 Antonio Trande - 24.0-10 -- Added freetype2 system-headers list for Fedora>=21 (patch5) - -* Fri Apr 04 2014 Antonio Trande - 24.0-9 -- Defined other bundled() Provides - -* Sat Mar 29 2014 Antonio Trande - 24.0-8 -- Use system nspr - -* Wed Mar 26 2014 Antonio Trande - 24.0-7 -- Removed much more bundled files (added related BR packages) -- Build browser and xulrunner -- Added freetype2 reference patch - -* Thu Feb 27 2014 Antonio Trande - 24.0-6 -- Sources patched to use system ogg/opus/vorbis libraries -- Build browser alone - -* Wed Feb 05 2014 Antonio Trande - 24.0-5 -- Fix some executable permissions -- Added some tricks -- Build browser and xulrunner -- Defined a conditional macro for xulrunner -- Built a static sub-package -- Added COPYING separated license files -- Added bundled() Provides - -* Mon Jan 27 2014 Antonio Trande - 24.0-4 -- Build browser alone -- Added libffi/libpng linkage from system to .mozconfig file -- Added a patch to exclude APNG support missing error for libpng -- Added libpng-devel BR - -* Tue Jan 14 2014 Antonio Trande - 24.0-3 -- Removed bundled files -- Added nspr/nss Requires - -* Wed Jan 08 2014 Antonio Trande - 24.0-2 -- Timestamp preserving for the 'install' commands -- Added a comment interpretation to the License tag -- Defined all command calls in normal mode - -* Sun Jan 05 2014 Antonio Trande - 24.0-1 -- Initial package - +%autochangelog diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch deleted file mode 100644 index ed3ab16..0000000 --- a/mozilla-1196777.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up firefox-68.0/widget/gtk/nsWindow.cpp.1196777 firefox-68.0/widget/gtk/nsWindow.cpp ---- firefox-68.0/widget/gtk/nsWindow.cpp.1196777 2019-07-02 11:47:06.864726826 +0200 -+++ firefox-68.0/widget/gtk/nsWindow.cpp 2019-07-02 11:48:09.896544339 +0200 -@@ -156,7 +156,8 @@ const gint kEvents = - #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_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK | -+ GDK_FOCUS_CHANGE_MASK; - - #if !GTK_CHECK_VERSION(3, 22, 0) - typedef enum { diff --git a/mozilla-1337988.patch b/mozilla-1337988.patch deleted file mode 100644 index 8c40445..0000000 --- a/mozilla-1337988.patch +++ /dev/null @@ -1,496 +0,0 @@ -diff -up firefox-56.0/dom/plugins/base/nsJSNPRuntime.cpp.1337988 firefox-56.0/dom/plugins/base/nsJSNPRuntime.cpp ---- firefox-56.0/dom/plugins/base/nsJSNPRuntime.cpp.1337988 2017-09-14 22:15:56.000000000 +0200 -+++ firefox-56.0/dom/plugins/base/nsJSNPRuntime.cpp 2017-09-25 10:34:11.205611698 +0200 -@@ -1719,7 +1719,7 @@ NPObjWrapper_ObjectMoved(JSObject *obj, - auto entry = - static_cast(sNPObjWrappers->Search(npobj)); - MOZ_ASSERT(entry && entry->mJSObj); -- MOZ_ASSERT(entry->mJSObj == old); -+ MOZ_ASSERT(entry->mJSObj.unbarrieredGetPtr() == old); - entry->mJSObj = obj; - } - -diff -up firefox-56.0/js/ipc/JavaScriptShared.cpp.1337988 firefox-56.0/js/ipc/JavaScriptShared.cpp ---- firefox-56.0/js/ipc/JavaScriptShared.cpp.1337988 2017-07-31 18:20:47.000000000 +0200 -+++ firefox-56.0/js/ipc/JavaScriptShared.cpp 2017-09-25 10:34:11.205611698 +0200 -@@ -101,7 +101,7 @@ IdToObjectMap::has(const ObjectId& id, c - auto p = table_.lookup(id); - if (!p) - return false; -- return p->value() == obj; -+ return p->value().unbarrieredGet() == obj; - } - #endif - -diff -up firefox-56.0/js/public/RootingAPI.h.1337988 firefox-56.0/js/public/RootingAPI.h ---- firefox-56.0/js/public/RootingAPI.h.1337988 2017-07-31 18:20:47.000000000 +0200 -+++ firefox-56.0/js/public/RootingAPI.h 2017-09-25 10:34:11.206611695 +0200 -@@ -148,6 +148,10 @@ template - struct PersistentRootedMarker; - } /* namespace gc */ - -+#define DECLARE_POINTER_COMPARISON_OPS(T) \ -+ bool operator==(const T& other) const { return get() == other; } \ -+ bool operator!=(const T& other) const { return get() != other; } -+ - // Important: Return a reference so passing a Rooted, etc. to - // something that takes a |const T&| is not a GC hazard. - #define DECLARE_POINTER_CONSTREF_OPS(T) \ -@@ -237,8 +241,6 @@ class Heap : public js::HeapBase::value, - "Type T must be a public GC pointer type"); - public: -- using ElementType = T; -- - Heap() { - static_assert(sizeof(T) == sizeof(Heap), - "Heap must be binary compatible with T."); -@@ -385,8 +387,6 @@ template - class TenuredHeap : public js::HeapBase> - { - public: -- using ElementType = T; -- - TenuredHeap() : bits(0) { - static_assert(sizeof(T) == sizeof(TenuredHeap), - "TenuredHeap must be binary compatible with T."); -@@ -394,6 +394,9 @@ class TenuredHeap : public js::HeapBase< - explicit TenuredHeap(T p) : bits(0) { setPtr(p); } - explicit TenuredHeap(const TenuredHeap& p) : bits(0) { setPtr(p.getPtr()); } - -+ bool operator==(const TenuredHeap& other) { return bits == other.bits; } -+ bool operator!=(const TenuredHeap& other) { return bits != other.bits; } -+ - void setPtr(T newPtr) { - MOZ_ASSERT((reinterpret_cast(newPtr) & flagsMask) == 0); - if (newPtr) -@@ -470,8 +473,6 @@ class MOZ_NONHEAP_CLASS Handle : public - friend class JS::MutableHandle; - - public: -- using ElementType = T; -- - /* Creates a handle from a handle of a type convertible to T. */ - template - MOZ_IMPLICIT Handle(Handle handle, -@@ -533,6 +534,7 @@ class MOZ_NONHEAP_CLASS Handle : public - MOZ_IMPLICIT Handle(MutableHandle& root, - typename mozilla::EnableIf::value, int>::Type dummy = 0); - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr); - -@@ -559,8 +561,6 @@ template - class MOZ_STACK_CLASS MutableHandle : public js::MutableHandleBase> - { - public: -- using ElementType = T; -- - inline MOZ_IMPLICIT MutableHandle(Rooted* root); - inline MOZ_IMPLICIT MutableHandle(PersistentRooted* root); - -@@ -589,6 +589,7 @@ class MOZ_STACK_CLASS MutableHandle : pu - return h; - } - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - DECLARE_NONPOINTER_ACCESSOR_METHODS(*ptr); - DECLARE_NONPOINTER_MUTABLE_ACCESSOR_METHODS(*ptr); -@@ -805,8 +806,6 @@ class MOZ_RAII Rooted : public js::Roote - } - - public: -- using ElementType = T; -- - template - explicit Rooted(const RootingContext& cx) - : ptr(GCPolicy::initial()) -@@ -839,6 +838,7 @@ class MOZ_RAII Rooted : public js::Roote - ptr = mozilla::Move(value); - } - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - DECLARE_POINTER_ASSIGN_OPS(Rooted, T); - DECLARE_NONPOINTER_ACCESSOR_METHODS(ptr); -@@ -903,14 +903,13 @@ template - class MOZ_RAII FakeRooted : public RootedBase> - { - public: -- using ElementType = T; -- - template - explicit FakeRooted(CX* cx) : ptr(JS::GCPolicy::initial()) {} - - template - FakeRooted(CX* cx, T initial) : ptr(initial) {} - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - DECLARE_POINTER_ASSIGN_OPS(FakeRooted, T); - DECLARE_NONPOINTER_ACCESSOR_METHODS(ptr); -@@ -931,8 +930,6 @@ template - class FakeMutableHandle : public js::MutableHandleBase> - { - public: -- using ElementType = T; -- - MOZ_IMPLICIT FakeMutableHandle(T* t) { - ptr = t; - } -@@ -1124,8 +1121,6 @@ class PersistentRooted : public js::Root - } - - public: -- using ElementType = T; -- - PersistentRooted() : ptr(GCPolicy::initial()) {} - - explicit PersistentRooted(RootingContext* cx) -@@ -1203,6 +1198,7 @@ class PersistentRooted : public js::Root - } - } - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - DECLARE_POINTER_ASSIGN_OPS(PersistentRooted, T); - DECLARE_NONPOINTER_ACCESSOR_METHODS(ptr); -@@ -1234,8 +1230,6 @@ class JS_PUBLIC_API(ObjectPtr) - Heap value; - - public: -- using ElementType = JSObject*; -- - ObjectPtr() : value(nullptr) {} - - explicit ObjectPtr(JSObject* obj) : value(obj) {} -@@ -1342,177 +1336,6 @@ Swap(JS::TenuredHeap& aX, JS::Tenured - - } /* namespace mozilla */ - --namespace js { --namespace detail { -- --// DefineComparisonOps is a trait which selects which wrapper classes to define --// operator== and operator!= for. It supplies a getter function to extract the --// value to compare. This is used to avoid triggering the automatic read --// barriers where appropriate. --// --// If DefineComparisonOps is not specialized for a particular wrapper you may --// get errors such as 'invalid operands to binary expression' or 'no match for --// operator==' when trying to compare against instances of the wrapper. -- --template --struct DefineComparisonOps : mozilla::FalseType {}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const JS::Heap& v) { return v.unbarrieredGet(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T get(const JS::TenuredHeap& v) { return v.unbarrieredGetPtr(); } --}; -- --template <> --struct DefineComparisonOps : mozilla::TrueType { -- static const JSObject* get(const JS::ObjectPtr& v) { return v.unbarrieredGet(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const JS::Rooted& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const JS::Handle& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const JS::MutableHandle& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const JS::PersistentRooted& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const js::FakeRooted& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const js::FakeMutableHandle& v) { return v.get(); } --}; -- --} /* namespace detail */ --} /* namespace js */ -- --// Overload operator== and operator!= for all types with the DefineComparisonOps --// trait using the supplied getter. --// --// There are four cases: -- --// Case 1: comparison between two wrapper objects. -- --template --typename mozilla::EnableIf::value && -- js::detail::DefineComparisonOps::value, bool>::Type --operator==(const T& a, const U& b) { -- return js::detail::DefineComparisonOps::get(a) == js::detail::DefineComparisonOps::get(b); --} -- --template --typename mozilla::EnableIf::value && -- js::detail::DefineComparisonOps::value, bool>::Type --operator!=(const T& a, const U& b) { -- return !(a == b); --} -- --// Case 2: comparison between a wrapper object and its unwrapped element type. -- --template --typename mozilla::EnableIf::value, bool>::Type --operator==(const T& a, const typename T::ElementType& b) { -- return js::detail::DefineComparisonOps::get(a) == b; --} -- --template --typename mozilla::EnableIf::value, bool>::Type --operator!=(const T& a, const typename T::ElementType& b) { -- return !(a == b); --} -- --template --typename mozilla::EnableIf::value, bool>::Type --operator==(const typename T::ElementType& a, const T& b) { -- return a == js::detail::DefineComparisonOps::get(b); --} -- --template --typename mozilla::EnableIf::value, bool>::Type --operator!=(const typename T::ElementType& a, const T& b) { -- return !(a == b); --} -- --// Case 3: For pointer wrappers, comparison between the wrapper and a const --// element pointer. -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator==(const typename mozilla::RemovePointer::Type* a, const T& b) { -- return a == js::detail::DefineComparisonOps::get(b); --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator!=(const typename mozilla::RemovePointer::Type* a, const T& b) { -- return !(a == b); --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator==(const T& a, const typename mozilla::RemovePointer::Type* b) { -- return js::detail::DefineComparisonOps::get(a) == b; --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator!=(const T& a, const typename mozilla::RemovePointer::Type* b) { -- return !(a == b); --} -- --// Case 4: For pointer wrappers, comparison between the wrapper and nullptr. -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator==(std::nullptr_t a, const T& b) { -- return a == js::detail::DefineComparisonOps::get(b); --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator!=(std::nullptr_t a, const T& b) { -- return !(a == b); --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator==(const T& a, std::nullptr_t b) { -- return js::detail::DefineComparisonOps::get(a) == b; --} -- --template --typename mozilla::EnableIf::value && -- mozilla::IsPointer::value, bool>::Type --operator!=(const T& a, std::nullptr_t b) { -- return !(a == b); --} -- - #undef DELETE_ASSIGNMENT_OPS - - #endif /* js_RootingAPI_h */ -diff -up firefox-56.0/js/src/gc/Barrier.h.1337988 firefox-56.0/js/src/gc/Barrier.h ---- firefox-56.0/js/src/gc/Barrier.h.1337988 2017-09-14 22:16:01.000000000 +0200 -+++ firefox-56.0/js/src/gc/Barrier.h 2017-09-25 10:34:11.206611695 +0200 -@@ -353,8 +353,8 @@ class WriteBarrieredBase : public Barrie - explicit WriteBarrieredBase(const T& v) : BarrieredBase(v) {} - - public: -- using ElementType = T; - -+ DECLARE_POINTER_COMPARISON_OPS(T); - DECLARE_POINTER_CONSTREF_OPS(T); - - // Use this if the automatic coercion to T isn't working. -@@ -612,13 +612,14 @@ class ReadBarriered : public ReadBarrier - return *this; - } - -- const T& get() const { -- if (InternalBarrierMethods::isMarkable(this->value)) -- this->read(); -+ const T get() const { -+ if (!InternalBarrierMethods::isMarkable(this->value)) -+ return JS::GCPolicy::initial(); -+ this->read(); - return this->value; - } - -- const T& unbarrieredGet() const { -+ const T unbarrieredGet() const { - return this->value; - } - -@@ -626,9 +627,9 @@ class ReadBarriered : public ReadBarrier - return bool(this->value); - } - -- operator const T&() const { return get(); } -+ operator const T() const { return get(); } - -- const T& operator->() const { return get(); } -+ const T operator->() const { return get(); } - - T* unsafeGet() { return &this->value; } - T const* unsafeGet() const { return &this->value; } -@@ -955,35 +956,6 @@ typedef ReadBarriered - - typedef ReadBarriered ReadBarrieredValue; - --namespace detail { -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const PreBarriered& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const GCPtr& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const HeapPtr& v) { return v.get(); } --}; -- --template --struct DefineComparisonOps> : mozilla::TrueType { -- static const T& get(const ReadBarriered& v) { return v.unbarrieredGet(); } --}; -- --template <> --struct DefineComparisonOps : mozilla::TrueType { -- static const Value& get(const HeapSlot& v) { return v.get(); } --}; -- --} /* namespace detail */ -- - } /* namespace js */ - - #endif /* gc_Barrier_h */ -diff -up firefox-56.0/js/src/jsapi-tests/testGCHeapPostBarriers.cpp.1337988 firefox-56.0/js/src/jsapi-tests/testGCHeapPostBarriers.cpp ---- firefox-56.0/js/src/jsapi-tests/testGCHeapPostBarriers.cpp.1337988 2017-09-14 22:16:02.000000000 +0200 -+++ firefox-56.0/js/src/jsapi-tests/testGCHeapPostBarriers.cpp 2017-09-25 10:34:11.206611695 +0200 -@@ -5,7 +5,6 @@ - * 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 "mozilla/TypeTraits.h" - #include "mozilla/UniquePtr.h" - - #include "js/RootingAPI.h" -diff -up firefox-56.0/js/src/vm/SharedMem.h.1337988 firefox-56.0/js/src/vm/SharedMem.h ---- firefox-56.0/js/src/vm/SharedMem.h.1337988 2017-06-15 22:52:29.000000000 +0200 -+++ firefox-56.0/js/src/vm/SharedMem.h 2017-09-25 10:34:11.206611695 +0200 -@@ -12,8 +12,8 @@ - template - class SharedMem - { -- // static_assert(mozilla::IsPointer::value, -- // "SharedMem encapsulates pointer types"); -+ static_assert(mozilla::IsPointer::value, -+ "SharedMem encapsulates pointer types"); - - enum Sharedness { - IsUnshared, -diff -up firefox-56.0/js/xpconnect/src/XPCInlines.h.1337988 firefox-56.0/js/xpconnect/src/XPCInlines.h ---- firefox-56.0/js/xpconnect/src/XPCInlines.h.1337988 2017-09-14 22:16:03.000000000 +0200 -+++ firefox-56.0/js/xpconnect/src/XPCInlines.h 2017-09-25 10:34:11.206611695 +0200 -@@ -465,7 +465,7 @@ inline - void XPCWrappedNativeTearOff::JSObjectMoved(JSObject* obj, const JSObject* old) - { - MOZ_ASSERT(!IsMarked()); -- MOZ_ASSERT(mJSObject == old); -+ MOZ_ASSERT(mJSObject.unbarrieredGetPtr() == old); - mJSObject = obj; - } - -diff -up firefox-56.0/js/xpconnect/src/XPCWrappedNative.cpp.1337988 firefox-56.0/js/xpconnect/src/XPCWrappedNative.cpp ---- firefox-56.0/js/xpconnect/src/XPCWrappedNative.cpp.1337988 2017-09-14 22:16:03.000000000 +0200 -+++ firefox-56.0/js/xpconnect/src/XPCWrappedNative.cpp 2017-09-25 10:34:11.207611692 +0200 -@@ -874,7 +874,7 @@ void - XPCWrappedNative::FlatJSObjectMoved(JSObject* obj, const JSObject* old) - { - JS::AutoAssertGCCallback inCallback; -- MOZ_ASSERT(mFlatJSObject == old); -+ MOZ_ASSERT(mFlatJSObject.unbarrieredGetPtr() == old); - - nsWrapperCache* cache = nullptr; - CallQueryInterface(mIdentity, &cache); -diff -up firefox-56.0/js/xpconnect/src/XPCWrappedNativeProto.cpp.1337988 firefox-56.0/js/xpconnect/src/XPCWrappedNativeProto.cpp ---- firefox-56.0/js/xpconnect/src/XPCWrappedNativeProto.cpp.1337988 2017-07-31 18:20:47.000000000 +0200 -+++ firefox-56.0/js/xpconnect/src/XPCWrappedNativeProto.cpp 2017-09-25 10:34:11.207611692 +0200 -@@ -101,7 +101,7 @@ XPCWrappedNativeProto::CallPostCreatePro - void - XPCWrappedNativeProto::JSProtoObjectFinalized(js::FreeOp* fop, JSObject* obj) - { -- MOZ_ASSERT(obj == mJSProtoObject, "huh?"); -+ MOZ_ASSERT(obj == mJSProtoObject.unbarrieredGet(), "huh?"); - - #ifdef DEBUG - // Check that this object has already been swept from the map. -@@ -117,7 +117,7 @@ XPCWrappedNativeProto::JSProtoObjectFina - void - XPCWrappedNativeProto::JSProtoObjectMoved(JSObject* obj, const JSObject* old) - { -- MOZ_ASSERT(mJSProtoObject == old); -+ MOZ_ASSERT(mJSProtoObject.unbarrieredGet() == old); - mJSProtoObject.init(obj); // Update without triggering barriers. - } - diff --git a/mozilla-1512162.patch b/mozilla-1512162.patch index 99a0b14..02e9585 100644 --- a/mozilla-1512162.patch +++ b/mozilla-1512162.patch @@ -1,7 +1,6 @@ -diff -up firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp.1512162 firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp ---- firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp.1512162 2019-07-17 22:51:30.000000000 +0200 -+++ firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp 2019-07-25 08:08:18.512528313 +0200 -@@ -1092,7 +1092,7 @@ class MOZ_STACK_CLASS CallMethodHelper f +--- a/js/xpconnect/src/XPCWrappedNative.cpp.1512162 2019-07-17 22:51:30.000000000 +0200 ++++ b/js/xpconnect/src/XPCWrappedNative.cpp 2019-07-25 08:08:18.512528313 +0200 +@@ -1055,7 +1055,7 @@ MOZ_ALWAYS_INLINE bool GetOutParamSource(uint8_t paramIndex, MutableHandleValue srcp) const; @@ -10,7 +9,7 @@ diff -up firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp.1512162 firefox-68 MOZ_ALWAYS_INLINE bool QueryInterfaceFastPath(); -@@ -1139,7 +1139,7 @@ class MOZ_STACK_CLASS CallMethodHelper f +@@ -1102,7 +1102,7 @@ ~CallMethodHelper(); @@ -19,25 +18,3 @@ diff -up firefox-68.0.1/js/xpconnect/src/XPCWrappedNative.cpp.1512162 firefox-68 // Trace implementation so we can put our CallMethodHelper in a Rooted. void trace(JSTracer* aTrc); -@@ -1157,6 +1157,10 @@ bool XPCWrappedNative::CallMethod(XPCCal - return helper.get().Call(); - } - -+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) -+// Work around a compiler bug on ppc64le (bug 1512162). -+__attribute__ ((noinline,noclone)) -+#endif - bool CallMethodHelper::Call() { - mCallContext.SetRetVal(JS::UndefinedValue()); - -@@ -1315,6 +1319,10 @@ bool CallMethodHelper::GetOutParamSource - return true; - } - -+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) -+// Work around a compiler bug on ppc64le (bug 1512162). -+__attribute__ ((noinline,noclone)) -+#endif - bool CallMethodHelper::GatherAndConvertResults() { - // now we iterate through the native params to gather and convert results - uint8_t paramCount = mMethodInfo->GetParamCount(); diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch deleted file mode 100644 index f1f37f4..0000000 --- a/mozilla-1516803.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build ---- a/security/sandbox/linux/moz.build -+++ b/security/sandbox/linux/moz.build -@@ -99,9 +99,8 @@ - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. --for f in CONFIG['OS_CXXFLAGS']: -- if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang': -- LDFLAGS += ['--param lto-partitions=1'] -+if CONFIG['CC_TYPE'] != 'clang': -+ LDFLAGS += ['--param', 'lto-partitions=1'] - - DEFINES['NS_NO_XPCOM'] = True - DisableStlWrapping() - diff --git a/mozilla-1526653.patch b/mozilla-1526653.patch deleted file mode 100644 index 31631d5..0000000 --- a/mozilla-1526653.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp -index 636537f847862ef693dd6582e2783de4e3d403c5..383c380f04ceb6a111dbfe9a046e3454a56e31b4 100644 ---- a/js/src/wasm/WasmSignalHandlers.cpp -+++ b/js/src/wasm/WasmSignalHandlers.cpp -@@ -248,7 +248,16 @@ using mozilla::DebugOnly; - #endif - - #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS --# include -+struct user_vfp { -+ unsigned long long fpregs[32]; -+ unsigned long fpscr; -+}; -+ -+struct user_vfp_exc { -+ unsigned long fpexc; -+ unsigned long fpinst; -+ unsigned long fpinst2; -+}; - #endif - - #if defined(ANDROID) diff --git a/mozilla-1580174-webrtc-popup.patch b/mozilla-1580174-webrtc-popup.patch deleted file mode 100644 index 2d154eb..0000000 --- a/mozilla-1580174-webrtc-popup.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -1155,6 +1155,28 @@ - } - } - -+bool IsPopupWithoutToplevelParent(nsMenuPopupFrame* aMenuPopupFrame) { -+ // Check if the popup is autocomplete (like tags autocomplete -+ // in the bookmark edit popup). -+ nsAtom* popupId = aMenuPopupFrame->GetContent()->GetID(); -+ if (popupId && popupId->Equals(NS_LITERAL_STRING("PopupAutoComplete"))) { -+ return true; -+ } -+ -+ // Check if the popup is in popupnotificationcontent (like choosing capture -+ // device when starting webrtc session). -+ nsIFrame* parentFrame = aMenuPopupFrame->GetParent(); -+ if (!parentFrame) { -+ return false; -+ } -+ parentFrame = parentFrame->GetParent(); -+ if (parentFrame && parentFrame->GetContent()->NodeName().EqualsLiteral( -+ "popupnotificationcontent")) { -+ return true; -+ } -+ return false; -+} -+ - // Wayland keeps strong popup window hierarchy. We need to track active - // (visible) popup windows and make sure we hide popup on the same level - // before we open another one on that level. It means that every open -@@ -1211,10 +1233,14 @@ - LOG(("...[%p] GetParentMenuWidget() = %p\n", (void*)this, parentWindow)); - - // If the popup is a regular menu but GetParentMenuWidget() returns -- // nullptr which means it's connected non-menu parent -- // (bookmark toolbar for instance). -+ // nullptr which means is not a submenu of any other menu. - // In this case use a parent given at nsWindow::Create(). -- if (!parentWindow && !menuPopupFrame->IsContextMenu()) { -+ // But we have to avoid using mToplevelParentWindow in case the popup -+ // is in 'popupnotificationcontent' element or autocomplete popup, -+ // otherwise the popupnotification would disappear when for -+ // example opening a popup with microphone selection. -+ if (!parentWindow && !menuPopupFrame->IsContextMenu() && -+ !IsPopupWithoutToplevelParent(menuPopupFrame)) { - parentWindow = - get_window_for_gtk_widget(GTK_WIDGET(mToplevelParentWindow)); - } - diff --git a/mozilla-1634213.patch b/mozilla-1634213.patch deleted file mode 100644 index d2a4138..0000000 --- a/mozilla-1634213.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/gfx/gl/GLScreenBuffer.cpp b/gfx/gl/GLScreenBuffer.cpp ---- a/gfx/gl/GLScreenBuffer.cpp -+++ b/gfx/gl/GLScreenBuffer.cpp -@@ -88,10 +88,14 @@ - #if defined(XP_MACOSX) - factory = SurfaceFactory_IOSurface::Create(gl, caps, ipcChannel, flags); - #elif defined(MOZ_WAYLAND) -- if (gl->GetContextType() == GLContextType::EGL) { -- if (gfxPlatformGtk::GetPlatform()->UseWaylandDMABufWebGL()) { -- factory = -- MakeUnique(gl, caps, ipcChannel, flags); -+ if (gl->GetContextType() == GLContextType::EGL && -+ gfxPlatformGtk::GetPlatform()->UseWaylandDMABufWebGL()) { -+ auto DMABUFFactory = -+ MakeUnique(gl, caps, ipcChannel, flags); -+ if (DMABUFFactory && DMABUFFactory->CanCreateSurface()) { -+ factory = std::move(DMABUFFactory); -+ } else { -+ gfxPlatformGtk::GetPlatform()->DisableWaylandDMABufWebGL(); - } - } - #elif defined(MOZ_X11) -diff --git a/gfx/gl/SharedSurfaceDMABUF.h b/gfx/gl/SharedSurfaceDMABUF.h ---- a/gfx/gl/SharedSurfaceDMABUF.h -+++ b/gfx/gl/SharedSurfaceDMABUF.h -@@ -71,6 +71,11 @@ - bool hasAlpha = mReadCaps.alpha; - return SharedSurface_DMABUF::Create(mGL, mFormats, size, hasAlpha); - } -+ -+ bool CanCreateSurface() { -+ UniquePtr test = CreateShared(gfx::IntSize(1, 1)); -+ return test != nullptr; -+ } - }; - - } // namespace gl -diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h ---- a/gfx/thebes/gfxPlatformGtk.h -+++ b/gfx/thebes/gfxPlatformGtk.h -@@ -88,7 +88,8 @@ - - #ifdef MOZ_WAYLAND - bool UseWaylandDMABufTextures(); -- bool UseWaylandDMABufWebGL(); -+ bool UseWaylandDMABufWebGL() { return mUseWebGLDmabufBackend; } -+ void DisableWaylandDMABufWebGL() { mUseWebGLDmabufBackend = false; } - bool UseWaylandHardwareVideoDecoding(); - #endif - -@@ -110,6 +111,9 @@ - #ifdef MOZ_X11 - Display* mCompositorDisplay; - #endif -+#ifdef MOZ_WAYLAND -+ bool mUseWebGLDmabufBackend; -+#endif - }; - - #endif /* GFX_PLATFORM_GTK_H */ -diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp ---- a/gfx/thebes/gfxPlatformGtk.cpp -+++ b/gfx/thebes/gfxPlatformGtk.cpp -@@ -116,6 +116,9 @@ - - Factory::ReleaseFTLibrary(gPlatformFTLibrary); - gPlatformFTLibrary = nullptr; -+ -+ mUseWebGLDmabufBackend = -+ IsWaylandDisplay() && nsWaylandDisplay::IsDMABufWebGLEnabled(); - } - - void gfxPlatformGtk::FlushContentDrawing() { -@@ -725,9 +728,6 @@ - bool gfxPlatformGtk::UseWaylandDMABufTextures() { - return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufTexturesEnabled(); - } --bool gfxPlatformGtk::UseWaylandDMABufWebGL() { -- return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufWebGLEnabled(); --} - bool gfxPlatformGtk::UseWaylandHardwareVideoDecoding() { - return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufVAAPIEnabled() && - gfxPlatform::CanUseHardwareVideoDecoding(); -diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml ---- a/modules/libpref/init/StaticPrefList.yaml -+++ b/modules/libpref/init/StaticPrefList.yaml -@@ -9111,7 +9111,7 @@ - # Use DMABuf backend for WebGL on Wayland. - - name: widget.wayland-dmabuf-webgl.enabled - type: RelaxedAtomicBool -- value: false -+ value: true - mirror: always - - # Use VA-API for video playback on Wayland. - diff --git a/mozilla-1640567.patch b/mozilla-1640567.patch deleted file mode 100644 index c1f3f44..0000000 --- a/mozilla-1640567.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp ---- a/layout/xul/nsMenuPopupFrame.cpp -+++ b/layout/xul/nsMenuPopupFrame.cpp -@@ -1422,11 +1422,9 @@ - !GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - screenPoint = nsPoint(anchorRect.x, anchorRect.y); - mAnchorRect = anchorRect; -- } else -+ } - #endif -- { -- screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); -- } -+ screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); - } else { - // with no anchor, the popup is positioned relative to the root frame - anchorRect = rootScreenRect; - diff --git a/mozilla-1669442.patch b/mozilla-1669442.patch deleted file mode 100644 index 6373816..0000000 --- a/mozilla-1669442.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/recurse.mk b/config/recurse.mk ---- a/config/recurse.mk -+++ b/config/recurse.mk -@@ -206,7 +206,7 @@ - # Interdependencies that moz.build world don't know about yet for compilation. - # Note some others are hardcoded or "guessed" in recursivemake.py and emitter.py - ifeq ($(MOZ_WIDGET_TOOLKIT),gtk) --toolkit/library/target: widget/gtk/mozgtk/gtk3/target -+toolkit/library/build/target: widget/gtk/mozgtk/gtk3/target - endif - - ifndef MOZ_FOLD_LIBS - diff --git a/mozilla-1669639.patch b/mozilla-1669639.patch deleted file mode 100644 index 2d79542..0000000 --- a/mozilla-1669639.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up firefox-81.0.1/build/mach_bootstrap.py.old firefox-81.0.1/build/mach_bootstrap.py ---- firefox-81.0.1/build/mach_bootstrap.py.old 2020-10-06 14:16:06.212974910 +0200 -+++ firefox-81.0.1/build/mach_bootstrap.py 2020-10-06 14:19:03.313179557 +0200 -@@ -507,7 +507,10 @@ class ImportHook(object): - # doesn't happen or because it doesn't matter). - if not os.path.exists(module.__file__[:-1]): - if os.path.exists(module.__file__): -- os.remove(module.__file__) -+ try: -+ os.remove(module.__file__) -+ except: -+ pass - del sys.modules[module.__name__] - module = self(name, globals, locals, fromlist, level) - diff --git a/mozilla-1692706.patch b/mozilla-1692706.patch deleted file mode 100644 index b25d5dd..0000000 --- a/mozilla-1692706.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# User Ian Neal -# Date 1614236439 0 -# Node ID cc45c336687916a6d1bfed79a80dc8a292b139a5 -# Parent 8024f219bda91c98fcbba16f2bfc6b4833014bfc -Bug 1692706 - Update ccache stats parser for ccache 4.x. r=glandium - -Differential Revision: https://phabricator.services.mozilla.com/D105863 - -diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py ---- a/python/mozbuild/mozbuild/controller/building.py -+++ b/python/mozbuild/mozbuild/controller/building.py -@@ -842,7 +842,7 @@ - - DIRECTORY_DESCRIPTION = "cache directory" - PRIMARY_CONFIG_DESCRIPTION = "primary config" -- SECONDARY_CONFIG_DESCRIPTION = "secondary config (readonly)" -+ SECONDARY_CONFIG_DESCRIPTION = "secondary config" - ABSOLUTE_KEYS = {'cache_files', 'cache_size', 'cache_max_size'} - FORMAT_KEYS = {'cache_size', 'cache_max_size'} - -@@ -874,7 +874,9 @@ - line, self.PRIMARY_CONFIG_DESCRIPTION) - elif line.startswith(self.SECONDARY_CONFIG_DESCRIPTION): - self.secondary_config = self._strip_prefix( -- line, self.SECONDARY_CONFIG_DESCRIPTION) -+ self._strip_prefix(line, self.SECONDARY_CONFIG_DESCRIPTION), -+ "(readonly)", -+ ) - else: - for stat_key, stat_description in self.STATS_KEYS: - if line.startswith(stat_description): diff --git a/mozilla-1715254_glibc_2.34.patch b/mozilla-1715254_glibc_2.34.patch deleted file mode 100644 index 1626b10..0000000 --- a/mozilla-1715254_glibc_2.34.patch +++ /dev/null @@ -1,54 +0,0 @@ - -# HG changeset patch -# User Alexandre Lissy -# Date 1623246328 0 -# Node ID ecb4011a0c76a1c7040054a44712e277f3dc24a1 -# Parent 9ec189804055442e5cc98d69dd01b71e90ed0cb5 -Bug 1715254 - Deny clone3 to force glibc fallback r=gcp - -Differential Revision: https://phabricator.services.mozilla.com/D117297 - -diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp ---- a/security/sandbox/linux/SandboxFilter.cpp -+++ b/security/sandbox/linux/SandboxFilter.cpp -@@ -853,16 +853,19 @@ class SandboxPolicyCommon : public Sandb - // Yield - case __NR_sched_yield: - return Allow(); - - // Thread creation. - case __NR_clone: - return ClonePolicy(InvalidSyscall()); - -+ case __NR_clone3: -+ return Error(ENOSYS); -+ - // More thread creation. - #ifdef __NR_set_robust_list - case __NR_set_robust_list: - return Allow(); - #endif - #ifdef ANDROID - case __NR_set_tid_address: - return Allow(); -@@ -1499,16 +1502,19 @@ class ContentSandboxPolicy : public Sand - // the child would inherit the seccomp-bpf policy and almost - // certainly die from an unexpected SIGSYS. We also can't have - // fork() crash, currently, because there are too many system - // libraries/plugins that try to run commands. But they can - // usually do something reasonable on error. - case __NR_clone: - return ClonePolicy(Error(EPERM)); - -+ case __NR_clone3: -+ return Error(ENOSYS); -+ - # ifdef __NR_fadvise64 - case __NR_fadvise64: - return Allow(); - # endif - - # ifdef __NR_fadvise64_64 - case __NR_fadvise64_64: - return Allow(); - diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index e390a28..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,14 +0,0 @@ -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/rhbz-1173156.patch b/rhbz-1173156.patch deleted file mode 100644 index 9750861..0000000 --- a/rhbz-1173156.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up a/extensions/auth/nsAuthSambaNTLM.cpp.old b/extensions/auth/nsAuthSambaNTLM.cpp ---- a/extensions/auth/nsAuthSambaNTLM.cpp.old 2014-11-25 12:23:22.000000000 +0100 -+++ b/extensions/auth/nsAuthSambaNTLM.cpp 2014-12-23 15:26:36.606674625 +0100 -@@ -161,7 +161,7 @@ - const char* username = PR_GetEnv("USER"); - if (!username) return NS_ERROR_FAILURE; - -- const char* const args[] = {"ntlm_auth", -+ const char* const args[] = {"/usr/bin/ntlm_auth", - "--helper-protocol", - "ntlmssp-client-1", - "--use-cached-creds", diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch deleted file mode 100644 index f94e43a..0000000 --- a/rhbz-1219542-s390-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/run-wayland-compositor b/run-wayland-compositor new file mode 100755 index 0000000..23ead19 --- /dev/null +++ b/run-wayland-compositor @@ -0,0 +1,60 @@ +#!/usr/bin/bash +# Run wayland compositor and set WAYLAND_DISPLAY env variable + +set -x + +echo export DESKTOP_SESSION=gnome > $HOME/.xsessionrc +echo export XDG_CURRENT_DESKTOP=GNOME > $HOME/.xsessionrc +echo export XDG_SESSION_TYPE=wayland >> $HOME/.xsessionrc + +# Turn off the screen saver and screen locking +gsettings set org.gnome.desktop.screensaver idle-activation-enabled false +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.screensaver lock-delay 3600 + +# Disable the screen saver +# This starts the gnome-keyring-daemon with an unlocked login keyring. libsecret uses this to +# store secrets. Firefox uses libsecret to store a key that protects sensitive information like +# credit card numbers. +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + # if not found, launch a new one + eval `dbus-launch --sh-syntax` +fi + +if [ -z "$XDG_RUNTIME_DIR" ]; then + export XDG_RUNTIME_DIR=$HOME +fi + +export WAYLAND_DISPLAY=icecat-pgo-wayland-0 +if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.lock +fi + +echo "Launch mutter for $WAYLAND_DISPLAY" +mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY --no-x11 & MUTTER_PID=$! +export MUTTER_PID +echo "Mutter PID $MUTTER_PID" + +echo "Waiting for mutter to start..." +sleep 5 +retry_count=0 +max_retries=5 +until [ $retry_count -gt $max_retries ]; do + if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + retry_count=$(($max_retries + 1)) + else + retry_count=$(($retry_count + 1)) + echo "Waiting for Mutter, retry: $retry_count" + sleep 2 + fi +done + +if [ ! -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + echo "Mutter failed to start!" + exit 1 +fi + +echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." + + diff --git a/sources b/sources index d7ea5ed..889ba13 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (cbindgen-vendor.tar.xz) = 41a8c7717849f225f0ce81f2829fbb50c326b58126b330b2e3f0704afdf07a3fa7be40e47f412d9fee8516cad15720769c0e1672b0aa470a7973e04db6d53ac5 -SHA512 (icecat-78.15.0-langpacks.tar.gz) = f46d8be1a5dca39d68c3c55f6764ddfec8c99f3a15b1112e873f7e7828a21739a3a1a927ee03465107ee80c8878d6fecaedaa9c6d4657e211293c40bd36ea2ea -SHA512 (icecat-78.15.0-rh1.tar.bz2) = 01f8f941df48a78b654d5ac81ad0ac1aae9ac6aecc769beafefc62590ebc30a2e98df72517df3c2cd8a657b4cfceed2b51f6eda979c5f3bc3208f89ce43953a7 +SHA512 (cbindgen-vendor.tar.xz) = 647dcadf3507bd05262613d03ff18a8c876bcbb4e83ce59f911128ae020ac16695298987c6c14f8b7a7aee5bb096740c6885c0a854d8b26431fc9a8ff864c369 +SHA512 (icecat-140.7.0-langpacks.tar.gz) = a4618e3272b48be4307c79222bdd55f321aefb6d6ba08beb10178d0b95530bc4130cf86901d0906e714bd75106ad8513957fe3ad335431c8faf5b2d9767e17de +SHA512 (icecat-140.7.0-rh1.tar.bz2) = 7a19f7928322bea905828e6a4e981395687f1b649e37518a8000bcfcb29446b424ee592f708d0c7c93ebeb901820752785f883a937e9361e9f172a0a9bacb603 SHA512 (icecat-COPYING-licensefiles.tar.gz) = ed541845170f1d209e322b0def3248d571e0c42c4a17c74e83197e743bd8a128a1475f5312d905c8e70d047eddeac17e604373892eb6d5f1720c5c361849c42c SHA512 (icecat.png) = a3cec16cb15a27c3c91b53e2c534e78b07911011ff1331e450c0baf8e13b76da7cea2a90e5d75191fa88cfbfd40a0a7f3e553e92b64d0043dadd5ad5edfdf81c