summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD25
-rw-r--r--breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch189
-rw-r--r--g++-error-crashreporter.patch12
4 files changed, 224 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77d3f3e97034..c061d0af9812 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = firefox-esr
pkgdesc = Standalone web browser from mozilla.org, Extended Support Release
pkgver = 52.3.0
- pkgrel = 2
+ pkgrel = 3
url = https://www.mozilla.org/en-US/firefox/organizations/
arch = i686
arch = x86_64
@@ -44,6 +44,7 @@ pkgbase = firefox-esr
conflicts = firefox
options = !emptydirs
options = !makeflags
+ options = !strip
source = https://ftp.mozilla.org/pub/firefox/releases/52.3.0esr/source/firefox-52.3.0esr.source.tar.xz
source = firefox.desktop
source = firefox-symbolic.svg
@@ -52,6 +53,8 @@ pkgbase = firefox-esr
source = firefox-install-dir.patch
source = fix-wifi-scanner.diff
source = use-noexcept-instead-of-an-exception-specification-in-mozalloc.patch
+ source = g++-error-crashreporter.patch
+ source = breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch
validpgpkeys = 2B90598A745E992F315E22C58AB132963A06537A
sha256sums = c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b
sha256sums = c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826
@@ -61,6 +64,8 @@ pkgbase = firefox-esr
sha256sums = d86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd
sha256sums = 9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8
sha256sums = 37e127dbed0285dc48e8033959a84e241c3e5cf0ce9544a172e640b54d3dfe0e
+ sha256sums = 966a69f6044afd2401daa0d3317dedb34cd7f6b826a65f4a7785ef69d1ceef8e
+ sha256sums = 1fe3b7f8b14f1978b96866f983d16709581d9df389fb46881fa63f080d036931
pkgname = firefox-esr
diff --git a/PKGBUILD b/PKGBUILD
index bba221bf91ed..99887277c293 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=firefox-esr
pkgver=52.3.0
-pkgrel=2
+pkgrel=4
pkgdesc="Standalone web browser from mozilla.org, Extended Support Release"
arch=(i686 x86_64)
license=(MPL GPL LGPL)
@@ -19,13 +19,15 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'speech-dispatcher: Text-to-Speech')
provides=(firefox)
conflicts=(firefox)
-options=(!emptydirs !makeflags)
+options=(!emptydirs !makeflags !strip)
source=(https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
firefox.desktop firefox-symbolic.svg
0001-Bug-1338655-Don-t-try-to-build-mp4parse-bindings.-r-.patch
0001-Bug-54395-remove-hardcoded-flag-lcrmf.patch
firefox-install-dir.patch fix-wifi-scanner.diff
- use-noexcept-instead-of-an-exception-specification-in-mozalloc.patch)
+ use-noexcept-instead-of-an-exception-specification-in-mozalloc.patch
+ g++-error-crashreporter.patch
+ breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch)
sha256sums=('c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b'
'c202e5e18da1eeddd2e1d81cb3436813f11e44585ca7357c4c5f1bddd4bec826'
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
@@ -33,7 +35,9 @@ sha256sums=('c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b'
'93c495526c1a1227f76dda5f3a43b433bc7cf217aaf74bd06b8fc187d285f593'
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
'9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8'
- '37e127dbed0285dc48e8033959a84e241c3e5cf0ce9544a172e640b54d3dfe0e')
+ '37e127dbed0285dc48e8033959a84e241c3e5cf0ce9544a172e640b54d3dfe0e'
+ '966a69f6044afd2401daa0d3317dedb34cd7f6b826a65f4a7785ef69d1ceef8e'
+ '1fe3b7f8b14f1978b96866f983d16709581d9df389fb46881fa63f080d036931')
validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A')
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
@@ -68,6 +72,12 @@ prepare() {
# https://hg.mozilla.org/mozilla-central/rev/ae7e3082d862
patch -Np1 -i ../use-noexcept-instead-of-an-exception-specification-in-mozalloc.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1277926
+ patch -Np1 -i ../g++-error-crashreporter.patch
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1394149
+ patch -Np1 -i ../breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch
+
echo -n "$_google_api_key" >google-api-key
echo -n "$_mozilla_api_key" >mozilla-api-key
@@ -106,11 +116,9 @@ ac_add_options --enable-system-pixman
# Features
ac_add_options --enable-startup-notification
-ac_add_options --disable-crashreporter
+ac_add_options --enable-crashreporter
ac_add_options --enable-alsa
ac_add_options --disable-updater
-
-STRIP_FLAGS="--strip-debug"
END
}
@@ -134,7 +142,8 @@ build() {
package() {
cd firefox-${pkgver}esr
- make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
+ DESTDIR="$pkgdir" ./mach install
+ find . -name '*crashreporter-symbols.zip' -exec cp -fvt "$startdir" {} +
_vendorjs="$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
install -Dm644 /dev/stdin "$_vendorjs" <<END
diff --git a/breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch b/breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch
new file mode 100644
index 000000000000..5449c007f80a
--- /dev/null
+++ b/breakpad-still-uses-struct-ucontext-in-ucontext_reader-cc.patch
@@ -0,0 +1,189 @@
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2017-08-27 17:39:00.081780670 +0200
+@@ -40,15 +40,15 @@
+
+ #if defined(__i386__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_ESP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_EIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -88,15 +88,15 @@
+
+ #elif defined(__x86_64)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RSP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fpregs) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -145,15 +145,15 @@
+
+ #elif defined(__ARM_EABI__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const context_t* uc) {
+ return uc->uc_mcontext.arm_sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.arm_pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ out->context_flags = MD_CONTEXT_ARM_FULL;
+
+ out->iregs[0] = uc->uc_mcontext.arm_r0;
+@@ -184,15 +184,15 @@
+
+ #elif defined(__aarch64__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs) {
+ out->context_flags = MD_CONTEXT_ARM64_FULL;
+
+@@ -210,11 +210,11 @@
+
+ #elif defined(__mips__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2017-08-27 17:39:11.743721257 +0200
+@@ -41,21 +41,21 @@
+
+ // Wraps platform-dependent implementations of accessors to ucontext structs.
+ struct UContextReader {
+- static uintptr_t GetStackPointer(const struct ucontext* uc);
++ static uintptr_t GetStackPointer(const ucontext_t* uc);
+
+- static uintptr_t GetInstructionPointer(const struct ucontext* uc);
++ static uintptr_t GetInstructionPointer(const ucontext_t* uc);
+
+ // Juggle a arch-specific ucontext into a minidump format
+ // out: the minidump structure
+ // info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp);
+ #elif defined(__aarch64__)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs);
+ #else
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
+ #endif
+ };
+
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc 2017-08-27 17:39:37.367593788 +0200
+@@ -439,9 +439,9 @@
+ // Fill in all the holes in the struct to make Valgrind happy.
+ memset(&g_crash_context_, 0, sizeof(g_crash_context_));
+ memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
+- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
++ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t));
+ #if defined(__aarch64__)
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ struct ucontext* uc_ptr = (ucontext_t*)uc;
+ struct fpsimd_context* fp_ptr =
+ (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
+ if (fp_ptr->head.magic == FPSIMD_MAGIC) {
+@@ -450,9 +450,9 @@
+ }
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+ // FP state is not part of user ABI on ARM Linux.
+- // In case of MIPS Linux FP state is already part of struct ucontext
++ // In case of MIPS Linux FP state is already part of ucontext_t
+ // and 'float_state' is not a member of CrashContext.
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ if (uc_ptr->uc_mcontext.fpregs) {
+ memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
+ sizeof(g_crash_context_.float_state));
+@@ -476,7 +476,7 @@
+ // ExceptionHandler::HandleSignal().
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
+- struct ucontext context;
++ ucontext_t context;
+ getcontext(&context);
+ return HandleSignal(sig, &siginfo, &context);
+ }
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h 2017-08-27 17:39:45.479554314 +0200
+@@ -191,7 +191,7 @@
+ struct CrashContext {
+ siginfo_t siginfo;
+ pid_t tid; // the crashing thread.
+- struct ucontext context;
++ ucontext_t context;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ // #ifdef this out because FP state is not part of user ABI for Linux ARM.
+ // In case of MIPS Linux FP state is already part of struct
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/microdump_writer/microdump_writer.cc 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/microdump_writer/microdump_writer.cc 2017-08-27 17:40:42.127289699 +0200
+@@ -571,7 +571,7 @@
+
+ void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
+
+- const struct ucontext* const ucontext_;
++ const ucontext_t* const ucontext_;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_;
+ #endif
+--- a/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc 2017-04-11 04:13:23.000000000 +0200
++++ b/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc 2017-08-27 17:41:08.215173976 +0200
+@@ -1247,7 +1247,7 @@
+ const int fd_; // File descriptor where the minidum should be written.
+ const char* path_; // Path to the file where the minidum should be written.
+
+- const struct ucontext* const ucontext_; // also from the signal handler
++ const ucontext_t* const ucontext_; // also from the signal handler
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_; // ditto
+ #endif
diff --git a/g++-error-crashreporter.patch b/g++-error-crashreporter.patch
new file mode 100644
index 000000000000..8bd7c6b0436f
--- /dev/null
+++ b/g++-error-crashreporter.patch
@@ -0,0 +1,12 @@
+diff --git a/toolkit/crashreporter/crashreporter.mozbuild b/toolkit/crashreporter/crashreporter.mozbuild
+index b2b901e..74ce4c3 100644
+--- a/toolkit/crashreporter/crashreporter.mozbuild
++++ b/toolkit/crashreporter/crashreporter.mozbuild
+@@ -17,6 +17,7 @@ elif CONFIG['GNU_CXX']:
+ CXXFLAGS += [
+ '-Wno-unused-local-typedefs',
+ '-Wno-shadow',
++ '-fomit-frame-pointer',
+ ]
+ if CONFIG['CLANG_CXX']:
+ CXXFLAGS += ['-Wno-implicit-fallthrough']