summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrandom-nick2020-09-29 20:41:54 +0200
committerrandom-nick2020-09-29 20:41:54 +0200
commit1a4db7a0a339e056f0074e48825fa3428bbd0e57 (patch)
treef305e21518af6c14b59b2cf955f48a0640603d87
parent0b12f3c6841328a594bfd2b07aa5d60eb56eda17 (diff)
downloadaur-1a4db7a0a339e056f0074e48825fa3428bbd0e57.tar.gz
2020.09
Also took some patches and changes from the firefox PKGBUILD and disabled elfhack because it currently seems to be failing on PGO builds.
-rw-r--r--.SRCINFO12
-rw-r--r--0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch46
-rw-r--r--0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch31
-rw-r--r--PKGBUILD46
-rw-r--r--bug1654465.diff78
5 files changed, 113 insertions, 100 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 62056d533759..54e869c3963d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = waterfox
pkgdesc = Fork of Mozilla Firefox featuring some legacy extensions, removed telemetry and no Pocket integration. This is the Current branch.
- pkgver = 2020.08
+ pkgver = 2020.09
pkgrel = 1
url = https://www.waterfox.net/
arch = x86_64
@@ -45,12 +45,14 @@ pkgbase = waterfox
options = !emptydirs
options = !makeflags
options = !strip
- source = Waterfox-2020.08-current.tar.gz::https://github.com/MrAlex94/Waterfox/archive/2020.08-current.tar.gz
+ source = Waterfox-2020.09-current.tar.gz::https://github.com/MrAlex94/Waterfox/archive/2020.09-current.tar.gz
source = waterfox.desktop
- source = bug1654465.diff
- sha256sums = 45e407c01fb9a378ba3f174d2218a3e71cbda312e80a6f1fdc8ea00552b4a69f
+ source = 0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
+ source = 0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
+ sha256sums = 458f372f08ce5791a4f561372a78f2e212c8bb2245a59d89c0901ce50431b8c1
sha256sums = 3c8a3e73ffcb4670ca25fc7087b9c5d93ebbef2f3be8a33cf81ae424c3f27fa3
- sha256sums = 4d181c76060845048092724b2fc6f0c2aa76db543c9ba3490f313651de6bb97d
+ sha256sums = c2489a4ad3bfb65c064e07180a1de9a2fbc3b1b72d6bc4cd3985484d1b6b7b29
+ sha256sums = 52cc26cda4117f79fae1a0ad59e1404b299191a1c53d38027ceb178dab91f3dc
pkgname = waterfox
diff --git a/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch b/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
new file mode 100644
index 000000000000..427dfcdc1e00
--- /dev/null
+++ b/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jed Davis <jld@mozilla.com>
+Date: Fri, 28 Aug 2020 09:23:58 +0000
+Subject: [PATCH] Bug 1660901 - Support the fstat-like subset of fstatat in the
+ Linux sandbox policies. r=gcp
+
+Differential Revision: https://phabricator.services.mozilla.com/D88499
+---
+ security/sandbox/linux/SandboxFilter.cpp | 6 ++++++
+ security/sandbox/linux/broker/SandboxBrokerUtils.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
+index e522d61e065c..4087bdc07e01 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -243,6 +243,12 @@ class SandboxPolicyCommon : public SandboxPolicyBase {
+ auto path = reinterpret_cast<const char*>(aArgs.args[1]);
+ auto buf = reinterpret_cast<statstruct*>(aArgs.args[2]);
+ auto flags = static_cast<int>(aArgs.args[3]);
++
++ if (fd != AT_FDCWD && (flags & AT_EMPTY_PATH) != 0 &&
++ strcmp(path, "") == 0) {
++ return ConvertError(fstatsyscall(fd, buf));
++ }
++
+ if (fd != AT_FDCWD && path[0] != '/') {
+ SANDBOX_LOG_ERROR("unsupported fd-relative fstatat(%d, \"%s\", %p, %d)",
+ fd, path, buf, flags);
+diff --git a/security/sandbox/linux/broker/SandboxBrokerUtils.h b/security/sandbox/linux/broker/SandboxBrokerUtils.h
+index 85a006740c2c..db33b5028e77 100644
+--- a/security/sandbox/linux/broker/SandboxBrokerUtils.h
++++ b/security/sandbox/linux/broker/SandboxBrokerUtils.h
+@@ -19,10 +19,12 @@
+ typedef struct stat64 statstruct;
+ # define statsyscall stat64
+ # define lstatsyscall lstat64
++# define fstatsyscall fstat64
+ #elif defined(__NR_stat)
+ typedef struct stat statstruct;
+ # define statsyscall stat
+ # define lstatsyscall lstat
++# define fstatsyscall fstat
+ #else
+ # error Missing stat syscall include.
+ #endif
diff --git a/0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch b/0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
new file mode 100644
index 000000000000..dd5a535359a0
--- /dev/null
+++ b/0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@mozilla.com>
+Date: Sun, 6 Sep 2020 20:20:39 +0000
+Subject: [PATCH] Bug 1660901 - ignore AT_NO_AUTOMOUNT in fstatat system call.
+ r=jld
+
+Per the manpage "Both stat() and lstat() act as though AT_NO_AUTOMOUNT
+was set.", so don't bail if it's set in a call to fstatat.
+
+Differential Revision: https://phabricator.services.mozilla.com/D89121
+---
+ security/sandbox/linux/SandboxFilter.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
+index 4087bdc07e01..c4f6c318ad1c 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -254,9 +254,10 @@ class SandboxPolicyCommon : public SandboxPolicyBase {
+ fd, path, buf, flags);
+ return BlockedSyscallTrap(aArgs, nullptr);
+ }
+- if ((flags & ~AT_SYMLINK_NOFOLLOW) != 0) {
++ if ((flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) != 0) {
+ SANDBOX_LOG_ERROR("unsupported flags %d in fstatat(%d, \"%s\", %p, %d)",
+- (flags & ~AT_SYMLINK_NOFOLLOW), fd, path, buf, flags);
++ (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)), fd,
++ path, buf, flags);
+ return BlockedSyscallTrap(aArgs, nullptr);
+ }
+ return (flags & AT_SYMLINK_NOFOLLOW) == 0 ? broker->Stat(path, buf)
diff --git a/PKGBUILD b/PKGBUILD
index e2297bd97840..10d0217fc842 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
# Maintainer: <random-nick at email dot com>
# Based on the official firefox package by:
-# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Jakub Schmidtke <sjakub@gmail.com>
pkgname=waterfox
-pkgver=2020.08
+pkgver=2020.09
pkgrel=1
pkgdesc="Fork of Mozilla Firefox featuring some legacy extensions, removed telemetry and no Pocket integration. This is the Current branch."
arch=(x86_64)
@@ -22,13 +22,15 @@ optdepends=('libnotify: Notification integration'
'speech-dispatcher: Text-to-Speech'
'hunspell-en_US: Spell checking, American English')
options=(!emptydirs !makeflags !strip)
-_archivename=2020.08-current # patch releases don't follow the same format so we can't use $pkgver
+_archivename=2020.09-current # patch releases don't follow the same format so we can't use $pkgver
source=(Waterfox-$_archivename.tar.gz::https://github.com/MrAlex94/Waterfox/archive/$_archivename.tar.gz
$pkgname.desktop
- bug1654465.diff)
-sha256sums=('45e407c01fb9a378ba3f174d2218a3e71cbda312e80a6f1fdc8ea00552b4a69f'
+ 0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
+ 0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch)
+sha256sums=('458f372f08ce5791a4f561372a78f2e212c8bb2245a59d89c0901ce50431b8c1'
'3c8a3e73ffcb4670ca25fc7087b9c5d93ebbef2f3be8a33cf81ae424c3f27fa3'
- '4d181c76060845048092724b2fc6f0c2aa76db543c9ba3490f313651de6bb97d')
+ 'c2489a4ad3bfb65c064e07180a1de9a2fbc3b1b72d6bc4cd3985484d1b6b7b29'
+ '52cc26cda4117f79fae1a0ad59e1404b299191a1c53d38027ceb178dab91f3dc')
#_disable_pgo=y # uncomment this to disable building the profiled browser and using PGO
prepare() {
@@ -36,9 +38,16 @@ prepare() {
cd Waterfox-$_archivename
# https://bugzilla.mozilla.org/show_bug.cgi?id=1654465
- patch -Np1 -i ../bug1654465.diff
+ #patch -Np1 -i ../bug1654465.diff
+
+ # https://bugs.archlinux.org/task/67978
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1660901
+ patch -Np1 -i ../0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
+ patch -Np1 -i ../0003-Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system.patch
cat >../mozconfig <<END
+mk_add_options MOZ_OBJDIR=${PWD@Q}/obj
+
ac_add_options --enable-application=browser
ac_add_options --prefix=/usr
@@ -71,6 +80,7 @@ ac_add_options --enable-crashreporter
ac_add_options --disable-gconf
ac_add_options --disable-updater
ac_add_options --disable-tests
+ac_add_options --disable-elf-hack
END
}
@@ -79,21 +89,17 @@ build() {
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
+ export MACH_USE_SYSTEM_PYTHON=1
# LTO needs more open files
ulimit -n 4096
- # -fno-plt with cross-LTO causes obscure LLVM errors
- # LLVM ERROR: Function Import: link error
- CFLAGS="${CFLAGS/-fno-plt/}"
- CXXFLAGS="${CXXFLAGS/-fno-plt/}"
-
# prevents references to $srcdir being included in error messages
# some references still remain in libxul.so and omni.ja
CFLAGS+=" -ffile-prefix-map=$srcdir=."
CXXFLAGS+=" -ffile-prefix-map=$srcdir=."
- # supress warnings
+ # suppress warnings
CFLAGS+=" -w"
CXXFLAGS+=" -w"
@@ -111,32 +117,38 @@ END
JARLOG_FILE="$PWD/jarlog" \
xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
./mach python build/pgo/profileserver.py
+ echo "Merging profile data..."
+ for i in *.profraw; do
+ stat -c "Raw profile data file $i found (%s bytes)" $i
+ done
llvm-profdata merge -o merged.profdata *.profraw
if [[ ! -s merged.profdata ]]; then
echo "No profile data produced."
return 1
fi
+ stat -c "Profile data found (%s bytes)" merged.profdata
if [[ ! -s jarlog ]]; then
- echo "No jar log produced."
+ echo "No jarlog produced."
return 1
fi
+ stat -c "Profile jarlog found (%s bytes)" jarlog
echo "Removing instrumented browser..."
./mach clobber
echo "Building optimized browser..."
cat >.mozconfig ../mozconfig - <<END
-ac_add_options --enable-lto
+ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use
-ac_add_options --with-pgo-profile-path=${PWD@Q}
+ac_add_options --with-pgo-profile-path=${PWD@Q}/
ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
END
else
echo "Building browser without PGO..."
cat >.mozconfig ../mozconfig - <<END
-ac_add_options --enable-lto
+ac_add_options --enable-lto=cross
END
fi
./mach build
diff --git a/bug1654465.diff b/bug1654465.diff
deleted file mode 100644
index 7b6e4311556f..000000000000
--- a/bug1654465.diff
+++ /dev/null
@@ -1,78 +0,0 @@
- 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,8 +146,8 @@ 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.22.0')
-+ rustc_min_version = Version('1.38.0')
- cargo_min_version = Version('0.23.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(