Firefox 55.0.3 and some other fixes firefox55
authorWolfgang Rosenauer <wr@rosenauer.org>
Sun, 17 Sep 2017 09:14:58 +0200
branchfirefox55
changeset 992 b2ba34e0dc10
parent 991 fde25c29562d
child 993 c360e9aac24a
Firefox 55.0.3 and some other fixes
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/create-tar.sh
MozillaFirefox/google-api-key
MozillaFirefox/l10n_changesets.txt
MozillaFirefox/mozilla-ucontext.patch
MozillaFirefox/mozilla.sh.in
mozilla-ucontext.patch
series
--- a/MozillaFirefox/MozillaFirefox.changes	Fri Aug 11 10:46:34 2017 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Sun Sep 17 09:14:58 2017 +0200
@@ -1,4 +1,15 @@
 -------------------------------------------------------------------
+Mon Sep  4 18:27:44 UTC 2017 - wr@rosenauer.org
+
+- update to Firefox 55.0.3
+  * Fix an issue with addons when using a path containing non-ascii
+    characters (bmo#1389160)
+  * Fix file uploads to some websites, including YouTube (bmo#1383518)
+- fix Google API key build integration
+- add mozilla-ucontext.patch to fix Tumbleweed build
+- do not enable XINPUT2 for now (boo#1053959)
+
+-------------------------------------------------------------------
 Fri Aug 11 08:32:30 UTC 2017 - wr@rosenauer.org
 
 - update to Firefox 55.0.1
--- a/MozillaFirefox/MozillaFirefox.spec	Fri Aug 11 10:46:34 2017 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Sun Sep 17 09:14:58 2017 +0200
@@ -18,10 +18,10 @@
 
 # changed with every update
 %define major 55
-%define mainver %major.0.1
+%define mainver %major.0.3
 %define update_channel release
 %define branding 1
-%define releasedate 20170810000000
+%define releasedate 20170824000000
 
 # PIE, full relro (x86_64 for now)
 %define build_hardened 1
@@ -45,10 +45,6 @@
 %define __find_requires sh %{SOURCE4}
 %global provfind sh -c "grep -v '.so' | %__find_provides"
 %global __find_provides %provfind
-# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
-# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution,
-# please get your own set of keys.
-%define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q
 %define localize 1
 %ifarch %ix86 x86_64
 %define crashreporter 1
@@ -132,7 +128,11 @@
 Source15:       firefox-appdata.xml
 Source16:       MozillaFirefox.changes
 Source17:       l10n_changesets.txt
+# Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys
+# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution,
+# please get your own set of keys.
 Source18:       mozilla-api-key
+Source19:       google-api-key
 # Gecko/Toolkit
 Patch1:         mozilla-nongnome-proxies.patch
 Patch3:         mozilla-kde.patch
@@ -142,6 +142,7 @@
 Patch8:         mozilla-no-stdcxx-check.patch
 Patch9:         mozilla-reduce-files-per-UnifiedBindings.patch
 Patch10:        mozilla-aarch64-startup-crash.patch
+Patch11:        mozilla-ucontext.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-no-default-ualocale.patch
@@ -253,6 +254,7 @@
 %patch9 -p1
 %endif
 %patch10 -p1
+%patch11 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
@@ -279,7 +281,6 @@
 export MOZILLA_OFFICIAL=1
 export BUILD_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
-export MOZ_GOOGLE_API_KEY=%{_google_api_key}
 %if 0%{?suse_version} <= 1320
 export CC=gcc-5
 %endif
@@ -347,6 +348,7 @@
 #ac_add_options --enable-chrome-format=jar
 ac_add_options --enable-update-channel=%{update_channel}
 ac_add_options --with-mozilla-api-keyfile=%{SOURCE18}
+ac_add_options --with-google-api-keyfile=%{SOURCE19}
 %if %branding
 ac_add_options --enable-official-branding
 %endif
--- a/MozillaFirefox/create-tar.sh	Fri Aug 11 10:46:34 2017 +0200
+++ b/MozillaFirefox/create-tar.sh	Sun Sep 17 09:14:58 2017 +0200
@@ -7,8 +7,8 @@
 
 CHANNEL="release"
 BRANCH="releases/mozilla-$CHANNEL"
-RELEASE_TAG="FIREFOX_55_0_1_RELEASE"  # 55.0.1 build2
-VERSION="55.0.1"
+RELEASE_TAG="FIREFOX_55_0_3_RELEASE"  # 55.0.3 build2
+VERSION="55.0.3"
 
 # mozilla
 if [ -d mozilla ]; then
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/google-api-key	Sun Sep 17 09:14:58 2017 +0200
@@ -0,0 +1,1 @@
+AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q
--- a/MozillaFirefox/l10n_changesets.txt	Fri Aug 11 10:46:34 2017 +0200
+++ b/MozillaFirefox/l10n_changesets.txt	Sun Sep 17 09:14:58 2017 +0200
@@ -71,7 +71,7 @@
 pa-IN f01bcb8c13a2
 pl d76f3ba7ebd5
 pt-BR 7cf0629777d1
-pt-PT 0b540f6980f5
+pt-PT a762c23994b3
 rm f16da0c1a769
 ro 6538d74548a9
 ru 4feb4e4200f5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-ucontext.patch	Sun Sep 17 09:14:58 2017 +0200
@@ -0,0 +1,1 @@
+../mozilla-ucontext.patch
\ No newline at end of file
--- a/MozillaFirefox/mozilla.sh.in	Fri Aug 11 10:46:34 2017 +0200
+++ b/MozillaFirefox/mozilla.sh.in	Sun Sep 17 09:14:58 2017 +0200
@@ -103,7 +103,8 @@
 export GNOME_DISABLE_CRASH_DIALOG=1
 
 # enable xinput2 (boo#1032003)
-export MOZ_USE_XINPUT2=1
+# breaks too many things right now (boo#1053959)
+#export MOZ_USE_XINPUT2=1
 
 moz_debug=0
 script_args=""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-ucontext.patch	Sun Sep 17 09:14:58 2017 +0200
@@ -0,0 +1,313 @@
+# HG changeset patch
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+# Parent  f6b8a48d89d77c7a3eb13fef234c618943306c2b
+Replace struct ucontext with ucontext_t
+
+diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc
+--- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc
++++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc
+@@ -35,25 +35,25 @@
+ namespace google_breakpad {
+ 
+ // Minidump defines register structures which are different from the raw
+ // structures which we get from the kernel. These are platform specific
+ // functions to juggle the ucontext and user structures into minidump format.
+ 
+ #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;
+ 
+   out->context_flags = MD_CONTEXT_X86_FULL |
+                        MD_CONTEXT_X86_FLOATING_POINT;
+ 
+   out->gs = regs[REG_GS];
+   out->fs = regs[REG_FS];
+@@ -83,25 +83,25 @@ void UContextReader::FillCPUContext(RawC
+   out->float_save.data_selector = fp->datasel;
+ 
+   // 8 registers * 10 bytes per register.
+   my_memcpy(out->float_save.register_area, fp->_st, 10 * 8);
+ }
+ 
+ #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;
+ 
+   out->context_flags = MD_CONTEXT_AMD64_FULL;
+ 
+   out->cs = regs[REG_CSGSFS] & 0xffff;
+ 
+   out->fs = (regs[REG_CSGSFS] >> 32) & 0xffff;
+@@ -140,25 +140,25 @@ void UContextReader::FillCPUContext(RawC
+   out->flt_save.mx_csr = fpregs->mxcsr;
+   out->flt_save.mx_csr_mask = fpregs->mxcr_mask;
+   my_memcpy(&out->flt_save.float_registers, &fpregs->_st, 8 * 16);
+   my_memcpy(&out->flt_save.xmm_registers, &fpregs->_xmm, 16 * 16);
+ }
+ 
+ #elif defined(__ARM_EABI__)
+ 
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_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;
+   out->iregs[1] = uc->uc_mcontext.arm_r1;
+   out->iregs[2] = uc->uc_mcontext.arm_r2;
+   out->iregs[3] = uc->uc_mcontext.arm_r3;
+   out->iregs[4] = uc->uc_mcontext.arm_r4;
+   out->iregs[5] = uc->uc_mcontext.arm_r5;
+@@ -179,25 +179,25 @@ void UContextReader::FillCPUContext(RawC
+   // TODO: fix this after fixing ExceptionHandler
+   out->float_save.fpscr = 0;
+   my_memset(&out->float_save.regs, 0, sizeof(out->float_save.regs));
+   my_memset(&out->float_save.extra, 0, sizeof(out->float_save.extra));
+ }
+ 
+ #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;
+ 
+   out->cpsr = static_cast<uint32_t>(uc->uc_mcontext.pstate);
+   for (int i = 0; i < MD_CONTEXT_ARM64_REG_SP; ++i)
+     out->iregs[i] = uc->uc_mcontext.regs[i];
+   out->iregs[MD_CONTEXT_ARM64_REG_SP] = uc->uc_mcontext.sp;
+   out->iregs[MD_CONTEXT_ARM64_REG_PC] = uc->uc_mcontext.pc;
+@@ -205,25 +205,25 @@ void UContextReader::FillCPUContext(RawC
+   out->float_save.fpsr = fpregs->fpsr;
+   out->float_save.fpcr = fpregs->fpcr;
+   my_memcpy(&out->float_save.regs, &fpregs->vregs,
+       MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT * 16);
+ }
+ 
+ #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;
+ }
+ 
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ #if _MIPS_SIM == _ABI64
+   out->context_flags = MD_CONTEXT_MIPS64_FULL;
+ #elif _MIPS_SIM == _ABIO32
+   out->context_flags = MD_CONTEXT_MIPS_FULL;
+ #else
+ #error "This mips ABI is currently not supported (n32)"
+ #endif
+ 
+diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h
+--- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h
++++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h
+@@ -36,29 +36,29 @@
+ #include "linux/dump_writer_common/raw_context_cpu.h"
+ #include "common/memory.h"
+ #include "google_breakpad/common/minidump_format.h"
+ 
+ namespace google_breakpad {
+ 
+ // 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
+ };
+ 
+ }  // namespace google_breakpad
+ 
+ #endif  // CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H
+diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc
+--- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc
++++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc
+@@ -434,30 +434,30 @@ bool ExceptionHandler::HandleSignal(int 
+       info->si_code == SI_TKILL;
+   if (signal_trusted || (signal_pid_trusted && info->si_pid == getpid())) {
+     sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+   }
+ 
+   // 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;
++  ucontext_t* 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) {
+     memcpy(&g_crash_context_.float_state, fp_ptr,
+            sizeof(g_crash_context_.float_state));
+   }
+ #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
+   // 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));
+   }
+ #endif
+   g_crash_context_.tid = syscall(__NR_gettid);
+   if (crash_handler_ != NULL) {
+     if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_),
+@@ -471,17 +471,17 @@ bool ExceptionHandler::HandleSignal(int 
+ // This is a public interface to HandleSignal that allows the client to
+ // generate a crash dump. This function may run in a compromised context.
+ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+   siginfo_t siginfo = {};
+   // Mimic a trusted signal to allow tracing the process (see
+   // ExceptionHandler::HandleSignal().
+   siginfo.si_code = SI_USER;
+   siginfo.si_pid = getpid();
+-  struct ucontext context;
++  ucontext_t context;
+   getcontext(&context);
+   return HandleSignal(sig, &siginfo, &context);
+ }
+ 
+ // This function may run in a compromised context: see the top of the file.
+ bool ExceptionHandler::GenerateDump(CrashContext *context) {
+   if (IsOutOfProcess())
+     return crash_generation_client_->RequestDump(context, sizeof(*context));
+diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h
+--- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h
++++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h
+@@ -186,17 +186,17 @@ class ExceptionHandler {
+                                     MinidumpCallback callback,
+                                     void* callback_context);
+ 
+   // This structure is passed to minidump_writer.h:WriteMinidump via an opaque
+   // blob. It shouldn't be needed in any user code.
+   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
+     // ucontext so 'float_state' is not required.
+     fpstate_t float_state;
+ #endif
+   };
+ 
+diff --git a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc
+--- a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc
++++ b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc
+@@ -566,17 +566,17 @@ class MicrodumpWriter {
+          ++iter) {
+       DumpModule(iter->first, false, 0, iter->second);
+     }
+     return true;
+   }
+ 
+   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
+   LinuxDumper* dumper_;
+   const MappingList& mapping_list_;
+   const MicrodumpExtraInfo microdump_extra_info_;
+   char* log_line_;
+ };
+diff --git a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc
+--- a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc
++++ b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc
+@@ -1242,17 +1242,17 @@ class MinidumpWriter {
+       return false;
+     return WriteFile(result, buf);
+   }
+ 
+   // Only one of the 2 member variables below should be set to a valid value.
+   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
+   LinuxDumper* dumper_;
+   MinidumpFileWriter minidump_writer_;
+   off_t minidump_size_limit_;
+   MDLocationDescriptor crashing_thread_context_;
+   // Blocks of memory written to the dump. These are all currently
--- a/series	Fri Aug 11 10:46:34 2017 +0200
+++ b/series	Sun Sep 17 09:14:58 2017 +0200
@@ -8,6 +8,7 @@
 mozilla-no-stdcxx-check.patch
 mozilla-reduce-files-per-UnifiedBindings.patch
 mozilla-aarch64-startup-crash.patch
+mozilla-ucontext.patch
 
 # Firefox patches
 firefox-kde.patch