From 68851fb6b38a2282eabc8429a2697076e1489d85 Mon Sep 17 00:00:00 2001 From: grizzlyuser Date: Aug 02 2020 20:41:04 +0000 Subject: [PATCH 1/3] libre/iceweasel: 79.0 Sync with upstreams Upstream Firefox now requires about-logo.svg in branding dir, so added it by copying the same source file that is used for other logos. LDFLAGS for i686 were changed the same way Arch Linux ARM did it. Otherwise, the build fails due to this flag. --- diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 03aa412..736e2b0 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -1,4 +1,4 @@ -# Maintainer (arch): Jan Alexander Steffens (heftig) +# Maintainer (arch): Jan Alexander Steffens (heftig) # Contributor (arch): Ionut Biru # Contributor (arch): Jakub Schmidtke # Maintainer (connochaetos): Henry Jensen @@ -44,9 +44,9 @@ pkgname=iceweasel epoch=1 -pkgver=78.0.1 +pkgver=79.0 pkgrel=1 -pkgrel+=.parabola3 +pkgrel+=.parabola1 _brandingver=77.0 _brandingrel=1 pkgdesc="Standalone web browser derived from Mozilla Firefox" @@ -57,7 +57,7 @@ url="https://wiki.parabola.nu/Iceweasel" depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse) makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm - python-setuptools python-psutil) + python-setuptools python-psutil lld) # FIXME: 'mozilla-serarchplugins' package needs re-working (see note in prepare()) makedepends+=(quilt libxslt imagemagick git jq) optdepends=('networkmanager: Location detection via available WiFi networks' @@ -69,6 +69,7 @@ replaces=('firefox') options=(!emptydirs !makeflags !strip) source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc} 0001-Use-remoting-name-for-GDK-application-names.patch + bug1654465.diff $pkgname.desktop) source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} libre.patch @@ -78,13 +79,14 @@ source_armv7h=(arm.patch build-arm-libopus.patch) source_i686=('rust-static-disable-network-test-on-static-libraries.patch' 'avoid-libxul-OOM-python-check.patch') -sha256sums=('494d277b120028e036e2aee3f658d79afc895457dc6aadb1c02f0547ef1d66ca' +sha256sums=('12a922855914ec6b4d4f06a4ac58bc549aca6bdafd3722d68a3d709a935e5713' 'SKIP' '3bb7463471fb43b2163a705a79a13a3003d70fff4bbe44f467807ca056de9a75' + 'e577f7e5636deda0026b0e385186f3ecb2212c9b84b6a2949a1811dab3e410d6' '44be8e819b8334ed36e9410d62dbc6c16dd8f8329a191403bfdce3cf2e9181fc' '57ea7663a8bf3d9326cf17798db0846b987bd26f4a20670d9aa3a02a58a29471' 'SKIP' - 'f9d0a6b4ecd82d28b130a9c08dc3b060b50f1f34fc47d2a4675f9d982d15b3b3' + '069f093e7aceec210b17472b65a26de6c926a50aeb3c413e532a8ec3742cf09c' '0ed6b8efa00f73a96bceaba2d6a31fb11d416106729ab9b8289b191eb9acccfa' '714998c5fc379f54a66ff80a845b7880169cd5b4094b77b719a99d33b65c0940') sha256sums_i686=('125000a8d4eec602d51eebcb9c94fb48c3ec1f5162ea28116bfdfe14d1a34cf9' @@ -104,6 +106,9 @@ prepare() { echo "applying 0001-Use-remoting-name-for-GDK-application-names.patch" patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch + # https://bugzilla.mozilla.org/show_bug.cgi?id=1654465 + patch -Np1 -i ../bug1654465.diff + cat >../mozconfig </dev/null # custom new tab page # FIXME: the newtab page (aka "Start Page") has changed significantly @@ -346,13 +354,13 @@ build() { export MOZ_DEBUG_FLAGS=" " export CFLAGS+=" -g0" export CXXFLAGS+=" -g0" - export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" + export LDFLAGS+=" -Wl,--no-keep-memory" export RUSTFLAGS="-Cdebuginfo=0" ;; i686) # disable LTO (clang has issues on IA32) export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" - export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" + export LDFLAGS+=" -Wl,--no-keep-memory" # libvpx has some hard-coded compiler flags for MMX, SSE, SSE2, use the correct one # per CARCH (75.0 uses an intrisic _mm_empty now, which required the corresponding @@ -405,15 +413,11 @@ END xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \ ./mach python build/pgo/profileserver.py - if [[ ! -s merged.profdata ]]; then - echo "No profile data produced." - return 1 - fi + stat -c "Profile data found (%s bytes)" merged.profdata + test -s merged.profdata - if [[ ! -s jarlog ]]; then - echo "No jar log produced." - return 1 - fi + stat -c "Jar log found (%s bytes)" jarlog + test -s jarlog echo "Removing instrumented browser..." ./mach clobber diff --git a/libre/iceweasel/bug1654465.diff b/libre/iceweasel/bug1654465.diff new file mode 100644 index 0000000..f9982cb --- /dev/null +++ b/libre/iceweasel/bug1654465.diff @@ -0,0 +1,77 @@ + build/moz.configure/rust.configure | 2 +- + config/makefiles/rust.mk | 5 +++++ + .../mozbuild/test/configure/test_toolchain_configure.py | 14 -------------- + 3 files changed, 6 insertions(+), 15 deletions(-) + +diff --git c/build/moz.configure/rust.configure i/build/moz.configure/rust.configure +index aaa693059d95..c90ae5ca7b25 100644 +--- c/build/moz.configure/rust.configure ++++ i/build/moz.configure/rust.configure +@@ -146,7 +146,7 @@ def rust_compiler(rustc_info, cargo_info, build_project): + or by directly running the installer from https://rustup.rs/ + ''')) + if build_project == 'tools/crashreporter': +- rustc_min_version = Version('1.31.0') ++ rustc_min_version = Version('1.38.0') + else: + rustc_min_version = Version('1.43.0') + cargo_min_version = rustc_min_version +diff --git c/config/makefiles/rust.mk i/config/makefiles/rust.mk +index a9abcc9af4c0..b5c7973104ce 100644 +--- c/config/makefiles/rust.mk ++++ i/config/makefiles/rust.mk +@@ -63,6 +63,11 @@ ifndef MOZ_DEBUG_RUST + ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) + cargo_rustc_flags += -Clto + endif ++# Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when ++# using -Clto. ++ifeq (,$(filter 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION))) ++RUSTFLAGS += -Cembed-bitcode=yes ++endif + endif + endif + +diff --git c/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py i/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py +index e1921ece6865..759d4d98cc0d 100755 +--- c/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py ++++ i/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py +@@ -1796,38 +1796,24 @@ class RustTest(BaseConfigureTest): + arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')), + 'thumbv7neon-linux-androideabi') + +- self.assertEqual( +- self.get_rust_target('arm-unknown-linux-androideabi', +- version='1.32.0', +- arm_target=ReadOnlyNamespace( +- arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')), +- 'armv7-linux-androideabi') +- + self.assertEqual( + self.get_rust_target('arm-unknown-linux-androideabi', + arm_target=ReadOnlyNamespace( + arm_arch=7, fpu='neon', thumb2=False, float_abi='softfp')), + 'armv7-linux-androideabi') + + self.assertEqual( + self.get_rust_target('arm-unknown-linux-androideabi', + arm_target=ReadOnlyNamespace( + arm_arch=7, fpu='vfpv2', thumb2=True, float_abi='softfp')), + 'armv7-linux-androideabi') + + self.assertEqual( + self.get_rust_target('armv7-unknown-linux-gnueabihf', + arm_target=ReadOnlyNamespace( + arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')), + 'thumbv7neon-unknown-linux-gnueabihf') + +- self.assertEqual( +- self.get_rust_target('armv7-unknown-linux-gnueabihf', +- version='1.32.0', +- arm_target=ReadOnlyNamespace( +- arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')), +- 'armv7-unknown-linux-gnueabihf') +- + self.assertEqual( + self.get_rust_target('armv7-unknown-linux-gnueabihf', + arm_target=ReadOnlyNamespace( diff --git a/libre/iceweasel/libre.patch b/libre/iceweasel/libre.patch index 4464fe5..bb0572a 100644 --- a/libre/iceweasel/libre.patch +++ b/libre/iceweasel/libre.patch @@ -331,15 +331,6 @@ index 5bc3a4b6c2..afc8d388e2 100644 AboutLoginsOpenPreferences: { wantUntrusted: true }, AboutLoginsOpenSite: { wantUntrusted: true }, AboutLoginsRecordTelemetryEvent: { wantUntrusted: true }, -@@ -783,8 +781,6 @@ const listeners = { - "AboutLogins:OpenFAQ": ["AboutLoginsParent"], - "AboutLogins:GetHelp": ["AboutLoginsParent"], - "AboutLogins:OpenPreferences": ["AboutLoginsParent"], -- "AboutLogins:OpenMobileAndroid": ["AboutLoginsParent"], -- "AboutLogins:OpenMobileIos": ["AboutLoginsParent"], - "AboutLogins:OpenSite": ["AboutLoginsParent"], - "AboutLogins:SortChanged": ["AboutLoginsParent"], - "AboutLogins:Subscribe": ["AboutLoginsParent"], diff --git a/browser/components/aboutlogins/AboutLoginsChild.jsm b/browser/components/aboutlogins/AboutLoginsChild.jsm index a4cd976dd5..c24b42eed0 100644 --- a/browser/components/aboutlogins/AboutLoginsChild.jsm From 1c8d63c71390aa14fc4fe8d0ff8ff7e2f334ebd7 Mon Sep 17 00:00:00 2001 From: grizzlyuser Date: Aug 02 2020 20:41:04 +0000 Subject: [PATCH 2/3] libre/iceweasel: use DuckDuckGo HTML search It looks like not all JavaScript that is available on the regular DuckDuckGo page is free software. They have many projects in their repos, but some of the JS from the search page has no clear licensing info. So replaced the URL of the default search engine to HTML version that currently doesn't have any JS at all. --- diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 736e2b0..6aa80a8 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -281,6 +281,7 @@ END pushd browser/components/search/extensions sed -i "${_remove_engines_sed}" list.json + sed -i 's|https://duckduckgo.com/|https://html.duckduckgo.com/html/|' ddg/manifest.json # Sanity-check search-engines patching _removed_engines_regex='Bing|Google|Seznam|Twitter|Yahoo|Yandex|Яндекс|amazon|bing|google|ebay|twitter' From a72996ebf1d63da2ef98a292b3a28f3ac360a578 Mon Sep 17 00:00:00 2001 From: grizzlyuser Date: Aug 02 2020 20:41:04 +0000 Subject: [PATCH 3/3] libre/iceweasel: remove generated .git dir after cleanup Otherwise, when PGO is ON, the build fails after './mach clobber'. It looks like the build system does cleaning differently when .git dir is present. --- diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 6aa80a8..3e3cef9 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -298,13 +298,14 @@ END # Removing What's New tab from Developer Tools, usages are removed by libre.patch rm -rf devtools/client/whats-new - # Removing files specified in .gitignore. # Upstream tarball can contain some ignored cruft, - # including binary blobs (for example, python2). + # including binaries (for example, python3). + echo 'Removing files specified in .gitignore...' git init && git clean -dfX \ -e '!ipc/chromium/src/third_party/libevent/evconfig-private.h' \ -e '!toolkit/crashreporter/google-breakpad/src/third_party/lss/' \ -e '!third_party/python/**/*.egg-info/' + rm -rf .git } _check_build_config() {