From b623874e96cae8250e116c486b6a1b885889e511 Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Mon, 1 Feb 2021 13:29:58 +0100 Subject: test building tarball with some very preliminary patches --- PKGBUILD | 4 ++-- PKGBUILD_global_menubar | 4 ++-- binary_tarball/scripts/3_Configure_Source_Code.sh | 3 +++ deb_patches/python3-remove-fstrings.patch | 4 ++-- deb_patches/reduce-rust-debuginfo.patch | 21 +++++++++++++++++++++ deb_patches/relax-cargo-dep.patch | 11 +++++++++++ deb_patches/silence-gtk-style-assertions.patch | 17 ++++++++++++++++- deb_patches/use-system-icupkg.patch | 13 +++++++++++++ unity-menubar.patch | 19 ++++++++++--------- 9 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 deb_patches/reduce-rust-debuginfo.patch create mode 100644 deb_patches/relax-cargo-dep.patch create mode 100644 deb_patches/use-system-icupkg.patch diff --git a/PKGBUILD b/PKGBUILD index f00c7bd..7ddafc4 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -48,14 +48,14 @@ sha256sums_x86_64=('5f03712642f5e77de4581d2ba3ee3e87cfa44c3d2fdd8fe0fb56ea05a57f 'SKIP' '682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5' 'f2f7403c9abd33a7470a5861e247b488693cf8d7d55c506e7e579396b7bf11e6' - '6ca4d5a50a6645ff35da0bd2e9b606172f55123ddaec3ed1f87416c18f9800ff') + 'ee302586f5291f809759f5eae3e5bad60b13007d9a9d37ac7f397597eb1d8665') sha256sums_aarch64=('5f03712642f5e77de4581d2ba3ee3e87cfa44c3d2fdd8fe0fb56ea05a57f7b50' '0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2' 'SKIP' 'SKIP' '682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5' 'f2f7403c9abd33a7470a5861e247b488693cf8d7d55c506e7e579396b7bf11e6' - '6ca4d5a50a6645ff35da0bd2e9b606172f55123ddaec3ed1f87416c18f9800ff' + 'ee302586f5291f809759f5eae3e5bad60b13007d9a9d37ac7f397597eb1d8665' '6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7' '2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9') diff --git a/PKGBUILD_global_menubar b/PKGBUILD_global_menubar index f4859ca..b4fb0c7 100644 --- a/PKGBUILD_global_menubar +++ b/PKGBUILD_global_menubar @@ -48,14 +48,14 @@ sha256sums_x86_64=('5f03712642f5e77de4581d2ba3ee3e87cfa44c3d2fdd8fe0fb56ea05a57f 'SKIP' '682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5' 'f2f7403c9abd33a7470a5861e247b488693cf8d7d55c506e7e579396b7bf11e6' - '6ca4d5a50a6645ff35da0bd2e9b606172f55123ddaec3ed1f87416c18f9800ff') + 'ee302586f5291f809759f5eae3e5bad60b13007d9a9d37ac7f397597eb1d8665') sha256sums_aarch64=('5f03712642f5e77de4581d2ba3ee3e87cfa44c3d2fdd8fe0fb56ea05a57f7b50' '0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2' 'SKIP' 'SKIP' '682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5' 'f2f7403c9abd33a7470a5861e247b488693cf8d7d55c506e7e579396b7bf11e6' - '6ca4d5a50a6645ff35da0bd2e9b606172f55123ddaec3ed1f87416c18f9800ff' + 'ee302586f5291f809759f5eae3e5bad60b13007d9a9d37ac7f397597eb1d8665' '6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7' '2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9') diff --git a/binary_tarball/scripts/3_Configure_Source_Code.sh b/binary_tarball/scripts/3_Configure_Source_Code.sh index 829c803..2fc0dcf 100755 --- a/binary_tarball/scripts/3_Configure_Source_Code.sh +++ b/binary_tarball/scripts/3_Configure_Source_Code.sh @@ -117,6 +117,9 @@ patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/armhf-reduce-linker-memory-use.patch patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/build-with-libstdc++-7.patch" patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/fix-armhf-webrtc-build.patch" patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/webrtc-fix-compiler-flags-for-armhf.patch" +patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/reduce-rust-debuginfo.patch" +patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/relax-cargo-dep.patch" +patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/use-system-icupkg.patch" patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-variable-annotations.patch" patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-fstrings.patch" patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-pep487.patch" diff --git a/deb_patches/python3-remove-fstrings.patch b/deb_patches/python3-remove-fstrings.patch index abc5be8..75f20d9 100644 --- a/deb_patches/python3-remove-fstrings.patch +++ b/deb_patches/python3-remove-fstrings.patch @@ -427,6 +427,6 @@ Author: Olivier Tilloy category_name = util.snake_case(category_name) - full_path = f"{category_name}::{metric_name}" + full_path = "{}::{}".format(category_name, metric_name) - objs_by_type[key].append((get_metric_id(metric), full_path)) - # Now for the modules for each category. + if metric.type == "event": + events_by_id[get_metric_id(metric)] = full_path diff --git a/deb_patches/reduce-rust-debuginfo.patch b/deb_patches/reduce-rust-debuginfo.patch new file mode 100644 index 0000000..e6a9148 --- /dev/null +++ b/deb_patches/reduce-rust-debuginfo.patch @@ -0,0 +1,21 @@ +Description: reduce the rust debuginfo level + because compiling with debuginfo=2 causes the OOM killer to interrupt the build + on launchpad builders. Initially this was only on 32 bit architectures, but + with firefox 63 it started happening frequently on arm64 and ppc64el too, + with newer versions it started happening very frequently on s390x too, and with + firefox 84 (built with rustc 1.47) it started happening on amd64 too. + This patch would initially decrease debug_info for selected architectures, but + with recent versions of rustc pretty much all supported architectures are + affected, so it is now unconditional. + +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -2167,7 +2167,7 @@ def rust_compile_flags(opt_level, debug_ + debug_assertions = False + + if debug_symbols: +- debug_info = "2" ++ debug_info = "1" + + opts = [] + diff --git a/deb_patches/relax-cargo-dep.patch b/deb_patches/relax-cargo-dep.patch new file mode 100644 index 0000000..f83558c --- /dev/null +++ b/deb_patches/relax-cargo-dep.patch @@ -0,0 +1,11 @@ +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -168,7 +168,7 @@ + rustc_min_version = Version("1.47.0") + else: + rustc_min_version = Version(MINIMUM_RUST_VERSION) +- cargo_min_version = rustc_min_version ++ cargo_min_version = Version("1.46.0") + + version = rustc_info.version + is_nightly = "nightly" in version.version diff --git a/deb_patches/silence-gtk-style-assertions.patch b/deb_patches/silence-gtk-style-assertions.patch index 36ec8e3..71cf2aa 100644 --- a/deb_patches/silence-gtk-style-assertions.patch +++ b/deb_patches/silence-gtk-style-assertions.patch @@ -13,8 +13,23 @@ Author: Olivier Tilloy if (mTextSelectedBackground == mTextSelectedText) { // Some old distros/themes don't properly use the .selection style, so // fall back to the regular text view style. +@@ -13,6 +13,14 @@ + if (mTextSelectedBackground == mTextSelectedText) { + // Some old distros/themes don't properly use the .selection style, so + // fall back to the regular text view style. ++@@ -1413,6 +1413,7 @@ bool nsLookAndFeel::WidgetUsesImage(Widg ++ GTK_STATE_FLAG_BACKDROP, GTK_STATE_FLAG_INSENSITIVE}; ++ ++ GtkStyleContext* style = GetStyleContext(aNodeType); +++ if (!style) return false; ++ ++ GValue value = G_VALUE_INIT; ++ for (GtkStateFlags state : sFlagsToCheck) { + --- a/widget/gtk/WidgetStyleCache.cpp + +++ b/widget/gtk/WidgetStyleCache.cpp + @@ -933,7 +933,7 @@ static GtkStyleContext* GetWidgetRootSty @@ -1413,6 +1413,7 @@ bool nsLookAndFeel::WidgetUsesImage(Widg - GTK_STATE_FLAG_BACKDROP, GTK_STATE_FLAG_INSENSITIVE}; + }; GtkStyleContext* style = GetStyleContext(aNodeType); + if (!style) return false; diff --git a/deb_patches/use-system-icupkg.patch b/deb_patches/use-system-icupkg.patch new file mode 100644 index 0000000..99eb4b5 --- /dev/null +++ b/deb_patches/use-system-icupkg.patch @@ -0,0 +1,13 @@ +diff -r 08cd64cdbc3b config/external/icu/data/convert_icudata.py +--- a/config/external/icu/data/convert_icudata.py Fri Jul 17 11:18:09 2020 +0000 ++++ b/config/external/icu/data/convert_icudata.py Sat Jul 18 14:40:33 2020 +0200 +@@ -11,7 +11,7 @@ + subprocess.run( + [ +- os.path.join(buildconfig.topobjdir, "dist", "host", "bin", "icupkg"), ++ "icupkg", + "-tb", + data_file, + output.name, + ] + diff --git a/unity-menubar.patch b/unity-menubar.patch index 7bc0cd7..bafed92 100644 --- a/unity-menubar.patch +++ b/unity-menubar.patch @@ -14,7 +14,7 @@ --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -6427,11 +6427,18 @@ function onViewToolbarsPopupShowing(aEve +@@ -6274,11 +6274,18 @@ function onViewToolbarsPopupShowing(aEve MozXULElement.insertFTLIfNeeded("browser/toolbarContextMenu.ftl"); let firstMenuItem = aInsertPoint || popup.firstElementChild; let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); @@ -98,7 +98,7 @@ "components.conf", --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js -@@ -320,6 +320,9 @@ pref("dom.mouseevent.click.hack.use_lega +@@ -312,6 +312,9 @@ pref("dom.mouseevent.click.hack.use_lega // Fastback caching - if this pref is negative, then we calculate the number // of content viewers to cache based on the amount of available memory. pref("browser.sessionhistory.max_total_viewers", -1); @@ -126,7 +126,7 @@ } --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -60,6 +60,15 @@ UNIFIED_SOURCES += [ +@@ -59,6 +59,15 @@ UNIFIED_SOURCES += [ SOURCES += [ "MediaKeysEventSourceFactory.cpp", @@ -142,7 +142,7 @@ "nsWindow.cpp", # conflicts with X11 headers "WaylandVsyncSource.cpp", # conflicts with X11 headers ] -@@ -140,6 +149,7 @@ LOCAL_INCLUDES += [ +@@ -139,6 +148,7 @@ LOCAL_INCLUDES += [ "/layout/base", "/layout/forms", "/layout/generic", @@ -4476,7 +4476,7 @@ +#endif /* __nsNativeMenuDocListener_h__ */ --- /dev/null +++ b/widget/gtk/nsNativeMenuService.cpp -@@ -0,0 +1,503 @@ +@@ -0,0 +1,504 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -4484,6 +4484,7 @@ + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + ++#include "mozilla/dom/Element.h" +#include "mozilla/Assertions.h" +#include "mozilla/Preferences.h" +#include "mozilla/UniquePtr.h" @@ -5069,7 +5070,7 @@ +#endif /* __nsNativeMenuService_h__ */ --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp -@@ -6096,6 +6096,10 @@ void nsWindow::HideWindowChrome(bool aSh +@@ -6148,6 +6148,10 @@ void nsWindow::HideWindowChrome(bool aSh SetWindowDecoration(aShouldHide ? eBorderStyle_none : mBorderStyle); } @@ -5100,7 +5101,7 @@ /** * GetLastUserInputTime returns a timestamp for the most recent user input * event. This is intended for pointer grab requests (including drags). -@@ -701,6 +705,8 @@ class nsWindow final : public nsBaseWidg +@@ -703,6 +707,8 @@ class nsWindow final : public nsBaseWidg static CSDSupportLevel sCSDSupportLevel; static bool sTransparentMainWindow; @@ -5146,7 +5147,7 @@ import sys # Static atom definitions, used to generate nsGkAtomList.h. -@@ -2560,7 +2561,7 @@ STATIC_ATOMS = [ +@@ -2562,7 +2563,7 @@ STATIC_ATOMS = [ InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), # END ATOMS @@ -5174,7 +5175,7 @@ if defined('MOZ_X11'): --- a/xpfe/appshell/AppWindow.cpp +++ b/xpfe/appshell/AppWindow.cpp -@@ -71,7 +71,7 @@ +@@ -76,7 +76,7 @@ # include "mozilla/XULStore.h" #endif -- cgit