From 7260002b9d3795fce9b215c2b0aa329077e2cb3d Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 3 Sep 2019 23:53:57 +0200 Subject: [PATCH 1/2] firefox: update to 69.0. --- srcpkgs/firefox/patches/fix-musl.patch | 11 ---- .../patches/initialize_sched_param.patch | 22 ++++++++ .../firefox/patches/ppc64le-bug-1512162.patch | 50 ------------------- srcpkgs/firefox/template | 32 ++++++++---- 4 files changed, 45 insertions(+), 70 deletions(-) delete mode 100644 srcpkgs/firefox/patches/fix-musl.patch create mode 100644 srcpkgs/firefox/patches/initialize_sched_param.patch delete mode 100644 srcpkgs/firefox/patches/ppc64le-bug-1512162.patch diff --git a/srcpkgs/firefox/patches/fix-musl.patch b/srcpkgs/firefox/patches/fix-musl.patch deleted file mode 100644 index c1cb99bf651..00000000000 --- a/srcpkgs/firefox/patches/fix-musl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/profiler/core/platform-linux-android.cpp.orig 2019-07-09 22:58:30.039475686 +0200 -+++ tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:39.331437677 +0200 -@@ -73,7 +73,7 @@ - - int profiler_current_thread_id() { - // glibc doesn't provide a wrapper for gettid(). --#if defined(__GLIBC__) -+#if defined(__linux__) - return static_cast(static_cast(syscall(SYS_gettid))); - #else - return static_cast(gettid()); diff --git a/srcpkgs/firefox/patches/initialize_sched_param.patch b/srcpkgs/firefox/patches/initialize_sched_param.patch new file mode 100644 index 00000000000..ee593c3c217 --- /dev/null +++ b/srcpkgs/firefox/patches/initialize_sched_param.patch @@ -0,0 +1,22 @@ +source: https://github.com/padenot/audio_thread_priority/commit/a1443a02667c649cb72873a45b98fffbd2eac5a8 + +commit a1443a02667c649cb72873a45b98fffbd2eac5a8 +Author: Paul Adenot +Date: Mon Aug 19 15:00:39 2019 +0200 + + initialize sched_param using std::mem::zeroed to fix compilation against other libc than glibc + +diff --git a/src/rt_linux.rs b/src/rt_linux.rs +index d8c0114..fbb4fde 100644 +--- third_party/rust/audio_thread_priority/src/rt_linux.rs.orig 2019-09-03 22:57:00.197152845 +0200 ++++ third_party/rust/audio_thread_priority/src/rt_linux.rs 2019-09-03 23:05:42.219159018 +0200 +@@ -93,8 +93,8 @@ pub fn promote_current_thread_to_real_time_internal(audio_buffer_frames: u32, + { + let thread_id = unsafe { libc::syscall(libc::SYS_gettid) }; + let pthread_id = unsafe { libc::pthread_self() }; ++ let mut param = unsafe { std::mem::zeroed::() }; + let mut policy = 0; +- let mut param = libc::sched_param { sched_priority: 0 }; + + if unsafe { libc::pthread_getschedparam(pthread_id, &mut policy, &mut param) } < 0 { + error!("pthread_getschedparam error {}", pthread_id); diff --git a/srcpkgs/firefox/patches/ppc64le-bug-1512162.patch b/srcpkgs/firefox/patches/ppc64le-bug-1512162.patch deleted file mode 100644 index ec38f2262be..00000000000 --- a/srcpkgs/firefox/patches/ppc64le-bug-1512162.patch +++ /dev/null @@ -1,50 +0,0 @@ - -diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp ---- js/xpconnect/src/XPCWrappedNative.cpp -+++ js/xpconnect/src/XPCWrappedNative.cpp -@@ -1152,16 +1152,20 @@ bool XPCWrappedNative::CallMethod(XPCCal - if (NS_FAILED(rv)) { - return Throw(rv, ccx); - } - - JS::Rooted helper(ccx, /* init = */ ccx); - return helper.get().Call(); - } - -+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) -+// Work around a compiler bug on ppc64le (bug 1512162). -+__attribute__ ((noinline,noclone)) -+#endif - bool CallMethodHelper::Call() { - mCallContext.SetRetVal(JS::UndefinedValue()); - - mCallContext.GetContext()->SetPendingException(nullptr); - - if (mVTableIndex == 0) { - return QueryInterfaceFastPath(); - } -@@ -1310,16 +1314,20 @@ bool CallMethodHelper::GetOutParamSource - return false; - } - } - } - - return true; - } - -+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN) -+// Work around a compiler bug on ppc64le (bug 1512162). -+__attribute__ ((noinline,noclone)) -+#endif - bool CallMethodHelper::GatherAndConvertResults() { - // now we iterate through the native params to gather and convert results - uint8_t paramCount = mMethodInfo->GetParamCount(); - for (uint8_t i = 0; i < paramCount; i++) { - const nsXPTParamInfo& paramInfo = mMethodInfo->GetParam(i); - if (!paramInfo.IsOut()) { - continue; - } - - - - diff --git a/srcpkgs/firefox/template b/srcpkgs/firefox/template index 82d454d0f68..87c81211fd0 100644 --- a/srcpkgs/firefox/template +++ b/srcpkgs/firefox/template @@ -3,7 +3,7 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/firefox-i18n". # pkgname=firefox -version=68.0.2 +version=69.0 revision=1 build_helper="rust" short_desc="Mozilla Firefox web browser" @@ -11,7 +11,7 @@ maintainer="Johannes " license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://www.mozilla.org/firefox/" distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz" -checksum=9b3e6d8f99819f9eda9ebba403b644a2b96d19450b42cae422bbf4386902a840 +checksum=413c3febdfeb69eade818824eecbdb11eaeda71de229573810afd641ba741ec5 lib32disabled=yes @@ -32,9 +32,6 @@ build_options="alsa dbus pulseaudio startup_notification xscreensaver sndio wayl build_options_default="alsa dbus pulseaudio startup_notification xscreensaver sndio wayland" # 19:55.85 /usr/bin/ld: failed to set dynamic section sizes: memory exhausted -if [ "$XBPS_WORDSIZE" -eq 32 ]; then - nodebug=yes -fi case $XBPS_TARGET_MACHINE in armv6*) @@ -44,6 +41,13 @@ case $XBPS_TARGET_MACHINE in ppc*) broken="ftbfs in several places" ;; esac +# we need this because cargo verifies checksums of all files in vendor +# crates when it builds and gives us no way to override or update the +# file sanely... so just clear out the file list +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json +} + post_extract() { case "$XBPS_TARGET_MACHINE" in *-musl) @@ -59,6 +63,11 @@ post_extract() { # Note: This is for Void Linux use ONLY. echo -n "cd894504-7a2a-4263-abff-ff73ee89ffca" > mozilla-api-key } + +post_patch() { + _clear_vendor_checksums audio_thread_priority +} + do_build() { cp "${FILESDIR}/mozconfig" "${wrksrc}/.mozconfig" @@ -114,10 +123,15 @@ do_build() { ;; esac - if [ "$XBPS_WORDSIZE" -eq 32 ]; then - # ENOMEM - echo "ac_add_options --disable-debug-symbols" >>.mozconfig - fi + # work around large debug symbols on 32-bit hosts + if [ "$XBPS_WORDSIZE" = "32" ]; then + export CFLAGS="${CFLAGS/-g/-g1}" + export CXXFLAGS="${CXXFLAGS/-g/-g1}" + export LDFLAGS+=" -Wl,--no-keep-memory" + # patch the rust debug level, this is hardcoded + sed -i "s/debug_info = '2'/debug_info = '1'/" \ + build/moz.configure/toolchain.configure + fi export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox" From 58a7874e091a26e9932819aecabc0263faec1fe0 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 4 Sep 2019 23:32:03 +0200 Subject: [PATCH 2/2] firefox-i18n: update to 69.0. [ci skip] --- srcpkgs/firefox-i18n/template | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/srcpkgs/firefox-i18n/template b/srcpkgs/firefox-i18n/template index a18f552af2c..ebd94fbc42c 100644 --- a/srcpkgs/firefox-i18n/template +++ b/srcpkgs/firefox-i18n/template @@ -1,6 +1,6 @@ # Template file for 'firefox-i18n' pkgname=firefox-i18n -version=68.0.2 +version=69.0 revision=1 build_style=meta homepage="https://www.mozilla.org/firefox/" @@ -192,27 +192,27 @@ checksum="2ea325dae9dfd9725a533d7a4630b9326d408ab9a4b925b70468d28a2d45d2ba 92967023816682d0991bdf50e08eb9a199a45c95b848b5aeceefc0906d267a1e 65e4a1bac6db7d51f67d3d522ffa5104031619fc5a427e446de90a959cf1b5ae 774d4102558b9744c141dbb6b89915beee1401c7997caafc5e84c3d3431505aa - 2c8af1b518a1ab9470a2a8a6b2728a107ae92043dfe63a0bfbfb1423e11561b4 - 772c0e432e5e2a07ce0f7f150a0e999e291490e1c8b1d7a47085c231e1bfb551 - cb144fe7128393e757eb0e89fbfa1a64a98d75645563ef23538c81ea2395c54b - b1fc0e8abe44a489728a5d35a7e30b2c189b3afee57ccf1ca3d457863bcaf613 - 3672383cd1054cbc082c7b2ea423461af6088f80784b72ab0c961f648dcb6046 - d13c1b0ffb1325352b0abd42dba05d3932814dcbbf01049d8e3e96c35ca4cecc - 5197f27b5f1a6fda42dfdd23ab26e7852e6055d949b3421a604107f07d9ffab3 - a931a967980d2c85436a24035eb2da0de6996fcfcf2013b1b2c7481a5e3de81b - bf136d69e10bb4300753e1bde4a4287837ab1576669c51f679bf37d8de4961e6 - c265e73b9bc51156e04f69073d10dd4ea82f70bdfbd4d1246648a4158f9887f9 - 840fc9402492c653f07709d04ffe8e33b96e6c7a8873fe14ec6d382f9650769c - c0e795d692d62262a8e300e2ae573873b21538d79a9ad0bb3fd5c12486e12cef - fa1ce8c4e3c8d0c25817766e9eb1897a055d032d4a6b69b9bf83a07d1d9234ac - c3bbcd6f00dfe6e8c086489a03797366dcddca55326269d32239f5a1a5466836 - 638fa687bd1f367b88a983c66a3644cbef2d86608bb17cf8a71f1fa149156138 - 1098aeed113c1050e1ba6b42ae22fb547912a8fd864b56ba44e561a60ea19203 - 7dcb700b1bf6ae29a2c76362337bd5b34f8951b5fbcd5316e892c81e5434092d - d4deb3fc82619bf21f5e30fa488724da3ac17d0b3002661f95345a4fdfa5342c - 7121d04c37484902cd0c68a7fd2c68af25b43d5a71872cff65e408845029885c - d02e0982655a560b547629a9635abb0e491163ea7eb443d454f9e09ff0a05904 - 0bfe3a70d2b393973eb5c097191a38ecfe57cdd61000dc5b1d01acc8ac700604 - b4824070be3c764c0e1be0baea8baf5cc4700732bdf4f7a5f946f81227caceea - 3f8ec0fb6428fcf7eeba212165e4c5d4d61b865e3e26780e2a893704e1a169d8 - 093fe238df44efe1491c952454142222662c4c58ea953d558d7a3b344ead0799" + 2ac5b6fb05fcedb814da033d4a7a579bdc8e19bbc3dd3edbe08e709b5b6e311b + 86176fd8917153a67b4d5ae19a061fdcb18479fd0cbd1ffdf7f726450851f0ce + d86b03d4cfa9712fa593a63c00827552b4747530c426134d36bdf0f4ed587cdd + 83d33e85bab0271f86f4d37a95948832e2d00848976907b6b0dd9f075d188a0f + 27aac8e38302d92cef43b194fc155f903ef5ecdacac04dfbe18fd6f7fb544c84 + b71f4fed7c00fc252424eaec5e1559ad957b808eba745e66e70a7f75fa7ca747 + 43543c941e2976d3dd66eef023de7735f55deb7b2265c5c8a4bad43e2ea14af8 + 09c9c634997a203286140231a873be5c25cd9c928970497b70c6b1f352fe1233 + bf84a75b854f9bde124580a1de538b80a3e70ac5f1deacbe52a946d45d8b76fd + 674027a04ab4514a53dbd75e9d101b79e8c4fbcf8fc510ca915f043222126a65 + 2f68ed32a10cb8a573343c5fda4833cc2832f58494de4c6abf724e2491c5e223 + 0f4a049f8948ffc98acdad2540b86037d7e097d388254f39411290bed7386584 + bca60f844f4c2290de67ca951186892eae2cb3afd1eee4a767b300123b8ae3e8 + 693b875ed60ada718f6d232f1e419782a95be667ff6f5b6fd6f3e46ded7e536a + 0c38cb8b264c7a7fa529d9803b150ffec1038c031db1dda63fd327ec0e4452d3 + a6f74c6e2eabab97f049f0df75219e62dcfe29561ce5b3e36a10f3b9235ecf82 + 7113f3531359dc59549ea0d6dbf1b092d9bc0e98bd744622549b633b60988a5b + 72b6391e5102612ece89c2656a178542ce60ce98734ee0aba40bc5ef649ceebe + 8a8660aa9162ff0e7651fa11ce003f2ffa1b11e57a26163a5955f96118d69c5b + 52e8a8f03317c6642f3f2108bd8a81abcad641b9da599af16159e3619f228f5b + 0ad05b3a76b50bb7bfd1a111f04c1354af424aa83345a3ea308ddb969c812f8b + 4fab9b94d6b99369507970ddef43c2945e8058e8c950b6ffd8b1f3546aac680f + 9ee89b73c4f6812d426caa7cbad86d2e5c11328ce1b9b775405c81f156798382 + 775a6b293da08b501cf754994c7708dd423a2d3848a22572e0e854ee34fcd178"