From ea2d40edfd6fdc574689cf4d86bf2b2cf06e8779 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 24 2019 08:11:43 +0000 Subject: import firefox-68.2.0-2.el8_0 --- diff --git a/.firefox.metadata b/.firefox.metadata index b448290..e74f6f6 100644 --- a/.firefox.metadata +++ b/.firefox.metadata @@ -1,8 +1,10 @@ 18a8f30a0356c751b8d0ea6f76e764cab13ee046 SOURCES/Python-2.7.13.tar.xz e86c38c48960b95353503b78e1de9ddca1ed34d7 SOURCES/cbindgen-vendor.tar.xz -c24f8036294edba40fd36f52a9dbe2cfe30cd229 SOURCES/firefox-68.1.0esr.source.tar.xz +19815556c558a99ea76b4abb357eddb684cfd05a SOURCES/firefox-68.2.0esr.source.tar.xz +caa5f5f4d7046b49d85951cf99b5ce9a9de1034b SOURCES/firefox-langpacks-68.2.0esr-20191017.tar.xz 6724218efbb1f3fa14541cb2f255970b98446a45 SOURCES/firefox-symbolic.svg 0de63f863b158454b9429234b52ed28a397ec45c SOURCES/gtk3-private-3.22.26-1.el6.src.rpm e188ab1a444697bc649e223c28389d82ca94c472 SOURCES/libffi-3.0.13-18.el7_3.src.rpm -cd7cbb8925956da9d83ddfd989e725f036a56e44 SOURCES/nodejs-8.11.4-1.fc27.src.rpm +4f8d3bf2483d95261ff90742ecec82d6a899eca3 SOURCES/nodejs-8.11.4-1.3.fc27.src.rpm +a379070abf5000cde61411c97af7e733b267a4d3 SOURCES/openssl-1.0.2k-19.6.bundle.el7_7.src.rpm 77fd30f7ebc12a629a31c1e252cec06af55a71fe SOURCES/yasm-1.2.0-3.el5.src.rpm diff --git a/.gitignore b/.gitignore index 48624d8..818ed14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ SOURCES/Python-2.7.13.tar.xz SOURCES/cbindgen-vendor.tar.xz -SOURCES/firefox-68.1.0esr.source.tar.xz +SOURCES/firefox-68.2.0esr.source.tar.xz +SOURCES/firefox-langpacks-68.2.0esr-20191017.tar.xz SOURCES/firefox-symbolic.svg SOURCES/gtk3-private-3.22.26-1.el6.src.rpm SOURCES/libffi-3.0.13-18.el7_3.src.rpm -SOURCES/nodejs-8.11.4-1.fc27.src.rpm +SOURCES/nodejs-8.11.4-1.3.fc27.src.rpm +SOURCES/openssl-1.0.2k-19.6.bundle.el7_7.src.rpm SOURCES/yasm-1.2.0-3.el5.src.rpm diff --git a/README.debrand b/README.debrand deleted file mode 100644 index 01c46d2..0000000 --- a/README.debrand +++ /dev/null @@ -1,2 +0,0 @@ -Warning: This package was configured for automatic debranding, but the changes -failed to apply. diff --git a/SOURCES/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch b/SOURCES/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch deleted file mode 100644 index b551e1b..0000000 --- a/SOURCES/Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 firefox-60.0/mfbt/LinuxSignal.h ---- firefox-60.0/mfbt/LinuxSignal.h.mozilla-1238661 2018-04-27 08:55:38.848241768 +0200 -+++ firefox-60.0/mfbt/LinuxSignal.h 2018-04-27 09:06:47.946769859 +0200 -@@ -22,7 +22,7 @@ __attribute__((naked)) void SignalTrampo - void* aContext) { - asm volatile("nop; nop; nop; nop" : : : "memory"); - -- asm volatile("b %0" : : "X"(H) : "memory"); -+ asm volatile("bx %0" : : "r"(H), "l"(aSignal), "l"(aInfo), "l"(aContext) : "memory"); - } - - #define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline) diff --git a/SOURCES/build-nss-version.patch b/SOURCES/build-nss-version.patch index e7132c1..0d497e2 100644 --- a/SOURCES/build-nss-version.patch +++ b/SOURCES/build-nss-version.patch @@ -1,13 +1,11 @@ -diff -up firefox-68.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-68.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-68.0/media/webrtc/trunk/Makefile.old firefox-68.0/media/webrtc/trunk/Makefile -diff -up firefox-68.0/old-configure.in.old firefox-68.0/old-configure.in ---- firefox-68.0/old-configure.in.old 2019-07-25 21:39:10.458338754 +0200 -+++ firefox-68.0/old-configure.in 2019-07-25 21:39:17.316311409 +0200 +diff -up firefox-68.2.0/old-configure.in.nss-version firefox-68.2.0/old-configure.in +--- firefox-68.2.0/old-configure.in.nss-version 2019-10-17 14:22:18.589707911 +0200 ++++ firefox-68.2.0/old-configure.in 2019-10-17 14:22:56.607541146 +0200 @@ -1537,7 +1537,7 @@ MOZ_ARG_WITH_BOOL(system-nss, _USE_SYSTEM_NSS=1 ) if test -n "$_USE_SYSTEM_NSS"; then -- AM_PATH_NSS(3.44.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) +- AM_PATH_NSS(3.44.2, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + AM_PATH_NSS(3.44.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) fi diff --git a/SOURCES/distribution.ini b/SOURCES/distribution.ini index 0a0429e..8bf461e 100644 --- a/SOURCES/distribution.ini +++ b/SOURCES/distribution.ini @@ -1,7 +1,7 @@ [Global] id=redhat version=1.0 -about=Mozilla Firefox for CentOS Linux +about=Mozilla Firefox for Red Hat Enterprise Linux [Preferences] app.distributor=redhat diff --git a/SOURCES/firefox-centos-default-prefs.js b/SOURCES/firefox-centos-default-prefs.js deleted file mode 100644 index 607a132..0000000 --- a/SOURCES/firefox-centos-default-prefs.js +++ /dev/null @@ -1,35 +0,0 @@ -pref("app.update.auto", false); -pref("app.update.enabled", false); -pref("app.update.autoInstallEnabled", false); -pref("general.smoothScroll", true); -pref("intl.locale.matchOS", true); -pref("toolkit.storage.synchronous", 0); -pref("toolkit.networkmanager.disable", false); -pref("offline.autoDetect", true); -pref("browser.backspace_action", 2); -pref("browser.display.use_system_colors", true); -pref("browser.download.folderList", 1); -pref("browser.link.open_external", 3); -pref("browser.shell.checkDefaultBrowser", false); -pref("network.manage-offline-status", true); -pref("extensions.shownSelectionUI", true); -pref("ui.SpellCheckerUnderlineStyle", 1); -pref("startup.homepage_override_url", "http://www.redhat.com"); -pref("startup.homepage_welcome_url", "http://www.redhat.com"); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); -pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); -pref("media.gmp-gmpopenh264.provider.enabled",false); -pref("media.gmp-gmpopenh264.autoupdate",false); -pref("media.gmp-gmpopenh264.enabled",false); -pref("media.gmp-gmpopenh264.enabled",false); -pref("plugins.notifyMissingFlash", false); -/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ -pref("browser.display.use_system_colors", false); -pref("layers.use-image-offscreen-surfaces", false); -/* Allow sending credetials to all https:// sites */ -pref("network.negotiate-auth.trusted-uris", "https://"); -pref("security.use_sqldb", false); -/* Use OS settings for UI language */ -pref("intl.locale.requested", ""); -/* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ -pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/SOURCES/firefox-redhat-default-prefs.js b/SOURCES/firefox-redhat-default-prefs.js new file mode 100644 index 0000000..607a132 --- /dev/null +++ b/SOURCES/firefox-redhat-default-prefs.js @@ -0,0 +1,35 @@ +pref("app.update.auto", false); +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("general.smoothScroll", true); +pref("intl.locale.matchOS", true); +pref("toolkit.storage.synchronous", 0); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("browser.backspace_action", 2); +pref("browser.display.use_system_colors", true); +pref("browser.download.folderList", 1); +pref("browser.link.open_external", 3); +pref("browser.shell.checkDefaultBrowser", false); +pref("network.manage-offline-status", true); +pref("extensions.shownSelectionUI", true); +pref("ui.SpellCheckerUnderlineStyle", 1); +pref("startup.homepage_override_url", "http://www.redhat.com"); +pref("startup.homepage_welcome_url", "http://www.redhat.com"); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); +pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); +pref("media.gmp-gmpopenh264.provider.enabled",false); +pref("media.gmp-gmpopenh264.autoupdate",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("plugins.notifyMissingFlash", false); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ +pref("browser.display.use_system_colors", false); +pref("layers.use-image-offscreen-surfaces", false); +/* Allow sending credetials to all https:// sites */ +pref("network.negotiate-auth.trusted-uris", "https://"); +pref("security.use_sqldb", false); +/* Use OS settings for UI language */ +pref("intl.locale.requested", ""); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ +pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/SOURCES/firefox-rhel6-hugepage.patch b/SOURCES/firefox-rhel6-hugepage.patch new file mode 100644 index 0000000..4855721 --- /dev/null +++ b/SOURCES/firefox-rhel6-hugepage.patch @@ -0,0 +1,13 @@ +diff -up firefox-68.1.0/xpcom/threads/nsThread.cpp.old firefox-68.1.0/xpcom/threads/nsThread.cpp +--- firefox-68.1.0/xpcom/threads/nsThread.cpp.old 2019-09-20 12:17:35.481661390 +0200 ++++ firefox-68.1.0/xpcom/threads/nsThread.cpp 2019-09-20 12:19:14.269180516 +0200 +@@ -556,7 +556,8 @@ void nsThread::InitCommon() { + // kernel report them as separate regions, even when they are adjacent to + // heap memory. This allows us to accurately track the actual memory + // consumption of our allocated stacks. +- madvise(mStackBase, stackSize, MADV_NOHUGEPAGE); ++ // not supported on RHEL6 ++ // madvise(mStackBase, stackSize, MADV_NOHUGEPAGE); + + pthread_attr_destroy(&attr); + #elif defined(XP_WIN) diff --git a/SOURCES/python-2.7-gcc8-fix.patch b/SOURCES/python-2.7-gcc8-fix.patch new file mode 100644 index 0000000..d4da520 --- /dev/null +++ b/SOURCES/python-2.7-gcc8-fix.patch @@ -0,0 +1,57 @@ +commit 0b91f8a668201fc58fa732b8acc496caedfdbae0 +Author: Florian Weimer +Date: Sun Apr 29 12:18:33 2018 -0700 + + Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374) + + By spec, the "long double" in _PyGC_Head requires the union to always be 16-byte + aligned. However, obmalloc only yields 8-byte alignment. Compilers including GCC + 8 are starting to use alignment information to do store-merging. So, the "long + double" needs to be changed to a simple "double" as was long ago done in Python + 3 by e348c8d154cf6342c79d627ebfe89dfe9de23817. For 2.7, we need to add some + dummy padding to make sure _PyGC_Head stays the same size. + +diff --git a/Include/objimpl.h b/Include/objimpl.h +index 5f28683329..cbf6bc3f87 100644 +--- Python-2.7.13/Include/objimpl.h ++++ Python-2.7.13/Include/objimpl.h +@@ -248,6 +248,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); + /* for source compatibility with 2.2 */ + #define _PyObject_GC_Del PyObject_GC_Del + ++/* ++ * Former over-aligned definition of PyGC_Head, used to compute the size of the ++ * padding for the new version below. ++ */ ++union _gc_head; ++union _gc_head_old { ++ struct { ++ union _gc_head_old *gc_next; ++ union _gc_head_old *gc_prev; ++ Py_ssize_t gc_refs; ++ } gc; ++ long double dummy; ++}; ++ + /* GC information is stored BEFORE the object structure. */ + typedef union _gc_head { + struct { +@@ -255,7 +269,8 @@ typedef union _gc_head { + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; +- long double dummy; /* force worst-case alignment */ ++ double dummy; /* Force at least 8-byte alignment. */ ++ char dummy_padding[sizeof(union _gc_head_old)]; + } PyGC_Head; + + extern PyGC_Head *_PyGC_generation0; +diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-04-29-12-07-00.bpo-33374.-xegL6.rst b/Misc/NEWS.d/next/Core and Builtins/2018-04-29-12-07-00.bpo-33374.-xegL6.rst +new file mode 100644 +index 0000000000..9ec1a605c8 +--- /dev/null ++++ Python-2.7.13/Misc/NEWS.d/next/Core and Builtins/2018-04-29-12-07-00.bpo-33374.-xegL6.rst +@@ -0,0 +1,3 @@ ++Tweak the definition of PyGC_Head, so compilers do not believe it is always ++16-byte aligned on x86. This prevents crashes with more aggressive ++optimizations present in GCC 8. diff --git a/SOURCES/python-missing-utimensat.patch b/SOURCES/python-missing-utimensat.patch new file mode 100644 index 0000000..d19ecab --- /dev/null +++ b/SOURCES/python-missing-utimensat.patch @@ -0,0 +1,12 @@ +diff -up python3/Python-3.6.8/configure.old python3/Python-3.6.8/configure +--- Python-3.6.8/configure.old 2019-10-01 12:56:35.074551835 +0200 ++++ Python-3.6.8/configure 2019-10-01 12:56:44.240517798 +0200 +@@ -11438,7 +11438,7 @@ for ac_func in alarm accept4 setitimer g + sigaction sigaltstack siginterrupt sigpending sigrelse \ + sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ + sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ +- truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ ++ truncate uname unlinkat unsetenv utimes waitid waitpid wait3 wait4 \ + wcscoll wcsftime wcsxfrm wmemcmp writev _getpty + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/SPECS/firefox.spec b/SPECS/firefox.spec index 784830d..b7f0f6b 100644 --- a/SPECS/firefox.spec +++ b/SPECS/firefox.spec @@ -1,13 +1,14 @@ -# Fails with internal compiler error -# ExcludeArch: s390x - # Set for local builds only %global disable_toolsets 0 # Use system nspr/nss? FIXME %if 0%{?rhel} == 8 %global system_nss 1 -%else +%endif +%if 0%{?rhel} == 7 +%global system_nss 1 +%endif +%if 0%{?rhel} == 6 %global system_nss 1 %endif %define use_bundled_ffi 0 @@ -33,7 +34,6 @@ %global system_ffi 1 %else %global system_ffi 0 -%global use_llvmts 0 %endif %if 0%{?rhel} < 8 %global use_dts 1 @@ -41,6 +41,9 @@ %global use_rustts 1 %global dts_version 8 +%if 0%{?rhel} == 6 +%global dts_version 8 +%endif %global rust_version 1.31 %global rust_toolset_version 1.35 %global llvm_version 7.0 @@ -113,10 +116,13 @@ %define bundled_python_version_2 2.7.13 %define bundled_python_version_3 3.6.8 %define use_bundled_yasm 1 +%define use_bundled_openssl 0 +%define use_bundled_nodejs 0 %if 0%{?rhel} < 8 %define use_bundled_nodejs 1 -%else -%define use_bundled_nodejs 0 +%if 0%{?rhel} == 6 +%define use_bundled_openssl 1 +%endif %endif # GTK3 bundling @@ -148,7 +154,7 @@ #global pre_tag alpha %global official_branding 1 -%global build_langpacks 0 +%global build_langpacks 1 %global enable_mozilla_crashreporter 0 %if !%{debug_build} @@ -159,8 +165,8 @@ Summary: Mozilla Firefox Web browser Name: firefox -Version: 68.1.0 -Release: 1%{?pre_tag}%{?dist} +Version: 68.2.0 +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ %if 0%{?rhel} == 7 @@ -172,11 +178,11 @@ ExclusiveArch: i686 x86_64 ppc64 s390x Source0: https://hg.mozilla.org/releases/mozilla-release/archive/firefox-%{version}%{?pre_version}.source.tar.xz %if %{build_langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20190828.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20191017.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig -Source12: firefox-centos-default-prefs.js +Source12: firefox-redhat-default-prefs.js Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -195,7 +201,8 @@ Source205: gtk3-private-%{gtk3_nvr}-setup-flags-env.inc Source206: gtk3-private-%{gtk3_nvr}-requires-provides-filter.inc Source301: yasm-1.2.0-3.el5.src.rpm Source303: libffi-3.0.13-18.el7_3.src.rpm -Source304: nodejs-8.11.4-1.fc27.src.rpm +Source304: nodejs-8.11.4-1.3.fc27.src.rpm +Source305: openssl-1.0.2k-19.6.bundle.el7_7.src.rpm #Python %if 0%{?use_bundled_python_2} @@ -207,6 +214,8 @@ Source101: https://www.python.org/ftp/python/%{bundled_python_version_3}/Py # Build patches Patch1000: python-2.7.patch Patch1001: build-ppc64le-inline.patch +Patch1002: python-2.7-gcc8-fix.patch +Patch1003: python-missing-utimensat.patch # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1699374 Patch1: no-rust-lto.patch Patch2: rust-network-check.patch @@ -237,6 +246,7 @@ Patch225: mozilla-1005640-accept-lang.patch #Patch226: rhbz-1354671.patch Patch230: rhbz-1503632-nss.patch Patch231: firefox-pipewire.patch +Patch232: firefox-rhel6-hugepage.patch # Upstream patches Patch402: mozilla-1196777.patch @@ -247,8 +257,6 @@ Patch415: mozilla-1436242.patch #Patch500: debug.patch Patch501: python-encode.patch -Patch10000: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch - # Debian patches %if %{?system_nss} @@ -472,9 +480,13 @@ https://extensions.gnome.org. %if 0%{?use_bundled_python_2} %setup -q -T -c -n python2 -a 100 %patch1000 -p0 -b .build +%patch1002 -p0 -b .gcc8 %endif %if 0%{?use_bundled_python_3} %setup -q -T -c -n python3 -a 101 +%if 0%{?rhel} == 6 +%patch1003 -p0 -b .missing-utimensat.patch +%endif %endif %setup -q -n %{tarballdir} # Build patches, can't change backup suffix from default because during build @@ -513,6 +525,9 @@ https://extensions.gnome.org. %if 0%{?rhel} == 8 %patch231 -p1 -b .pipewire %endif +%if 0%{?rhel} == 6 +%patch232 -p1 -b .hugepage +%endif # This ensures no migration of certdb to sqlite on the RHEL6 and RHEL7. # This needs to stay for the future releases @@ -540,10 +555,6 @@ https://extensions.gnome.org. %patch501 -p1 -b .python-encode %patch1001 -p1 -b .ppc64le-inline -%ifarch %{arm} -%patch10000 -p1 -b .mozilla-1238661 -%endif - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{official_branding} @@ -665,7 +676,6 @@ set -e export SHELL=/bin/sh %endif -#GTK3 >> %if ! 0%{?avoid_bundled_rebuild} rm -rf %{_buildrootdir}/* %endif @@ -720,45 +730,27 @@ function build_bundled_package() { export PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" fi pushd $PACKAGE_DIR + echo "Installing $PACKAGE_DIR/$PACKAGE_RPM"; echo "===============================" - rpm2cpio $PACKAGE_DIR/$PACKAGE_RPM | cpio -iduv + PACKAGE_LIST=$(echo $PACKAGE_DIR/$PACKAGE_RPM | tr " " "\n") + for PACKAGE in $PACKAGE_LIST + do + rpm2cpio $PACKAGE | cpio -iduv + done + + PATH=$PACKAGE_DIR/usr/bin:$PATH + export PATH + LD_LIBRARY_PATH=$PACKAGE_DIR/usr/%{_lib}:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH + # Clean rpms to avoid including them to package %if ! 0%{?avoid_bundled_rebuild} rm -f $PACKAGE_FILES %endif - PATH=$PACKAGE_DIR/usr/bin:$PATH - export PATH - LD_LIBRARY_PATH=$PACKAGE_DIR/usr/%{_lib} - export LD_LIBRARY_PATH popd } - -# If needed build the bundled python 2.7 and 3.6 and put it in the PATH -%if 0%{?use_bundled_python_3} - pushd %{_builddir}/python3/Python-%{bundled_python_version_3} - ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" - make %{?_smp_mflags} install V=1 - cp Tools/scripts/pathfix.py %{_buildrootdir}/bin - popd -%endif -%if 0%{?use_bundled_python_2} - pushd %{_builddir}/python2/Python-%{bundled_python_version_2} - ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" - make %{?_smp_mflags} install V=1 - popd -%endif - -# Build and install local node if needed -# ====================================== -%if %{use_bundled_nodejs} - build_bundled_package 'nodejs-8*.rpm' 'nodejs-*.rpm' %{SOURCE304} - export MOZ_NODEJS=$PACKAGE_DIR/usr/bin/node -%else - export MOZ_NODEJS=/usr/bin/node -%endif - # Build and install local yasm if needed # ====================================== %if %{use_bundled_yasm} @@ -770,7 +762,6 @@ function build_bundled_package() { rpm -ivh %{SOURCE200} rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/gtk3-private.spec %endif - rm -rf %{_buildrootdir}/* pushd %{_buildrootdir} install_rpms_to_current_dir gtk3-private-%{gtk3_nvr}*.rpm install_rpms_to_current_dir gtk3-private-devel-%{gtk3_nvr}*.rpm @@ -793,7 +784,54 @@ function build_bundled_package() { %endif %filter_setup -# GTK3 << +# If needed build the bundled python 2.7 and 3.6 and put it in the PATH +%if 0%{?use_bundled_python_3} + pushd %{_builddir}/python3/Python-%{bundled_python_version_3} + ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" --with-pydebug + make %{?_smp_mflags} install V=1 -j1 + cp Tools/scripts/pathfix.py %{_buildrootdir}/bin + popd +%endif +%if 0%{?use_bundled_python_2} + pushd %{_builddir}/python2/Python-%{bundled_python_version_2} + ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" + make %{?_smp_mflags} install V=1 + popd +%endif + +function replace_prefix() { + FILE_NAME=$1 + PKG_CONFIG_PREFIX=$2 + + cat $FILE_NAME | tail -n +2 > tmp.txt + echo "$PKG_CONFIG_PREFIX" > $FILE_NAME + cat tmp.txt >> $FILE_NAME + rm -rf tmp.txt +} + +# Build and install local openssl if needed +# ========================================= +%if 0%{?use_bundled_openssl} + rpm -ivh %{SOURCE305} + rpmbuild --nodeps -ba %{_specdir}/openssl.spec + pushd %{_buildrootdir} + install_rpms_to_current_dir openssl-1.0.2k*.rpm + install_rpms_to_current_dir openssl-libs-1.0.2k*.rpm + install_rpms_to_current_dir openssl-devel-1.0.2k*.rpm + install_rpms_to_current_dir openssl-static-1.0.2k*.rpm + # openssl is installed to %{_buildrootdir}/usr/lib(64)/... + export PKG_CONFIG_PATH=%{_buildrootdir}/%{_libdir}/pkgconfig/:$PKG_CONFIG_PATH + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/libcrypto.pc prefix=%{_buildrootdir}/usr + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/libssl.pc prefix=%{_buildrootdir}/usr + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/openssl.pc prefix=%{_buildrootdir}/usr + cat %{_buildrootdir}/%{_libdir}/pkgconfig/libcrypto.pc + cat %{_buildrootdir}/%{_libdir}/pkgconfig/libssl.pc + cat %{_buildrootdir}/%{_libdir}/pkgconfig/openssl.pc + pushd %{_rpmdir} + rm -f openssl-*.rpm + popd + popd +%endif # We need to disable exit on error temporarily for the following scripts: set +e @@ -804,6 +842,15 @@ source scl_source enable devtoolset-%{dts_version} source scl_source enable rust-toolset-%{rust_toolset_version} %endif +# Build and install local node if needed +# ====================================== +%if %{use_bundled_nodejs} + build_bundled_package 'nodejs-8*.rpm' 'nodejs-*.rpm' %{SOURCE304} + export MOZ_NODEJS=$PACKAGE_DIR/usr/bin/node +%else + export MOZ_NODEJS=/usr/bin/node +%endif + mkdir -p my_rust_vendor cd my_rust_vendor %{__tar} xf %{SOURCE2} @@ -834,8 +881,8 @@ case "%{sqlite_build_version}" in esac %endif -echo "Generate big endian version of config/external/icu/data/icud64l.dat" %if 0%{?big_endian} +echo "Generate big endian version of config/external/icu/data/icud64l.dat" # ./mach python intl/icu_sources_data.py . # rm -f config/external/icu/data/icudt*l.dat mv config/external/icu/data/icudt64l.dat config/external/icu/data/icudt64b.dat @@ -896,8 +943,12 @@ export CC=gcc export CXX=g++ MOZ_SMP_FLAGS=-j1 -# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. +# More than two build tasks can lead to OOM gcc crash. +%if 0%{?rhel} < 8 +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +%else %ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" @@ -905,6 +956,7 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif +%endif %if 0%{?bundle_gtk3} # gtk3-private-setup-flags-env.inc @@ -1109,7 +1161,6 @@ echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@firefox.mo # Table of fallbacks for each language # please file a bug at bugzilla.redhat.com if the assignment is incorrect -create_default_langpack "bn-IN" "bn" create_default_langpack "es-AR" "es" create_default_langpack "fy-NL" "fy" create_default_langpack "ga-IE" "ga" @@ -1196,6 +1247,8 @@ rm -rf %{_srcrpmdir}/gtk3-private-%{gtk3_nvr}*.src.rpm find %{_rpmdir} -name "gtk3-private-*%{gtk3_nvr}*.rpm" -delete rm -rf %{_srcrpmdir}/libffi*.src.rpm find %{_rpmdir} -name "libffi*.rpm" -delete +rm -rf %{_srcrpmdir}/openssl*.src.rpm +find %{_rpmdir} -name "openssl*.rpm" -delete %post update-desktop-database &> /dev/null || : @@ -1243,7 +1296,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{mozappdir}/browser/features/*.xpi %{mozappdir}/distribution/distribution.ini # That's Windows only -%ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi +#%exclude %{mozappdir}/browser/features/aushelper@mozilla.org.xpi %attr(644, root, root) %{mozappdir}/browser/blocklist.xml #%dir %{mozappdir}/browser/extensions #%{mozappdir}/browser/extensions/* @@ -1303,6 +1356,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Mon Oct 21 2019 Martin Stransky - 68.2.0-2 +- Rebuild + +* Thu Oct 17 2019 Martin Stransky - 68.2.0-1 +- Update to 68.2.0 ESR + +* Thu Oct 10 2019 Martin Stransky - 68.1.0-6 +- Enable system nss on RHEL6 + +* Thu Sep 5 2019 Jan Horak - 68.1.0-2 +- Enable building langpacks + * Wed Aug 28 2019 Jan Horak - 68.1.0-1 - Update to 68.1.0 ESR