--- a/MozillaFirefox/MozillaFirefox.spec Wed May 02 09:28:53 2018 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec Fri Jun 08 22:25:59 2018 +0200
@@ -18,11 +18,12 @@
# changed with every update
-%define major 59
+%define major 60
%define mainver %major.99
%define update_channel beta
%define branding 1
-%define releasedate 20180426170554
+%define releasedate 20180607135512
+%define source_prefix firefox-%{mainver}
# PIE, full relro (x86_64 for now)
%define build_hardened 1
@@ -57,6 +58,7 @@
BuildRequires: autoconf213
BuildRequires: dbus-1-glib-devel
BuildRequires: fdupes
+BuildRequires: memory-constraints
%if 0%{?suse_version} <= 1320
BuildRequires: gcc7-c++
%else
@@ -71,7 +73,7 @@
BuildRequires: libproxy-devel
BuildRequires: makeinfo
BuildRequires: mozilla-nspr-devel >= 4.19
-BuildRequires: mozilla-nss-devel >= 3.36.1
+BuildRequires: mozilla-nss-devel >= 3.37.3
BuildRequires: python-devel
BuildRequires: python2-xml
BuildRequires: rust >= 1.24
@@ -120,7 +122,7 @@
License: MPL-2.0
Group: Productivity/Networking/Web/Browsers
Url: http://www.mozilla.org/
-Source: firefox-%{version}-source.tar.xz
+Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
Source1: MozillaFirefox.desktop
Source2: MozillaFirefox-rpmlintrc
Source3: mozilla.sh.in
@@ -141,6 +143,8 @@
# please get your own set of keys.
Source18: mozilla-api-key
Source19: google-api-key
+Source20: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz.asc
+Source21: mozilla.keyring
# Gecko/Toolkit
Patch1: mozilla-nongnome-proxies.patch
Patch2: mozilla-kde.patch
@@ -153,10 +157,11 @@
Patch9: mozilla-i586-DecoderDoctorLogger.patch
Patch10: mozilla-i586-domPrefs.patch
Patch11: mozilla-enable-csd.patch
+Patch12: mozilla-fix-skia-aarch64.patch
+Patch13: mozilla-bmo1375074.patch
# Firefox/browser
Patch101: firefox-kde.patch
Patch102: firefox-branded-icons.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): coreutils shared-mime-info desktop-file-utils
Requires(postun): shared-mime-info desktop-file-utils
@@ -206,7 +211,7 @@
%package translations-other
Summary: Extra translations for %{appname}
Group: System/Localization
-Provides: locale(%{name}:ach;af;an;as;ast;az;bg;bn_BD;bn_IN;br;bs;cak;cy;dsb;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;id;is;ka;kab;kk;km;kn;lij;lt;lv;mai;mk;ml;mr;ms;ne-NP;nn_NO;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;uz;vi;xh)
+Provides: locale(%{name}:ach;af;an;as;ast;az;bg;bn_BD;bn_IN;br;bs;cak;cy;dsb;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;id;is;ka;kab;kk;km;kn;lij;lt;lv;mai;mk;ml;mr;ms;ne-NP;nn_NO;oc;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;uz;vi;xh)
Requires: %{name} = %{version}
Obsoletes: %{name}-translations < %{version}-%{release}
@@ -248,11 +253,11 @@
%prep
%if %localize
-%setup -q -n mozilla -b 7 -b 10
+%setup -q -n %{source_prefix} -b 7 -b 10
%else
-%setup -q -n mozilla
+%setup -q -n %{source_prefix}
%endif
-cd $RPM_BUILD_DIR/mozilla
+cd $RPM_BUILD_DIR/%{source_prefix}
%patch1 -p1
%patch2 -p1
%patch3 -p1
@@ -268,6 +273,8 @@
%patch10 -p1
%endif
%patch11 -p1
+%patch12 -p1
+%patch13 -p1
# Firefox
%patch101 -p1
%patch102 -p1
@@ -317,7 +324,11 @@
export CFLAGS="$CFLAGS -mminimal-toc"
%endif
export CXXFLAGS="$CFLAGS"
+%ifarch %{arm}
+export RUSTFLAGS="-Cdebuginfo=0"
+%endif
export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
+%limit_build -m 1500
cat << EOF > $MOZCONFIG
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
@@ -371,9 +382,13 @@
%ifarch %arm
ac_add_options --with-fpu=vfpv3-d16
ac_add_options --with-float-abi=hard
+%ifarch armv6l armv6hl
+ac_add_options --with-arch=armv6
+%else
ac_add_options --with-arch=armv7-a
%endif
-%ifarch %arm s390x
+%endif
+%ifarch aarch64 %arm s390x
ac_add_options --disable-webrtc
%endif
EOF
@@ -403,35 +418,31 @@
install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js
# install additional locales
%if %localize
-rm -f %{_tmppath}/translations.*
-touch %{_tmppath}/translations.{common,other}
-for locale in $(cat $RPM_BUILD_DIR/mozilla/browser/locales/shipped-locales) ; do
- case $locale in
- ja-JP-mac|en-US|'')
- ;;
- *)
- pushd $RPM_BUILD_DIR/compare-locales
- PYTHONPATH=lib \
- scripts/compare-locales -m ../l10n-merged/$locale \
- ../mozilla/browser/locales/l10n.ini ../l10n $locale
- popd
- LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
- make -C browser/locales langpack-$locale
- cp -rL dist/xpi-stage/locale-$locale \
- %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
- # remove prefs, profile defaults, and hyphenation from langpack
- rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
- rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
- # check against the fixed common list and sort into the right filelist
- _matched=0
- for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
- [ "$_match" = "$locale" ] && _matched=1
- done
- [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
- echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
- >> %{_tmppath}/translations.$_l10ntarget
- esac
-done
+truncate -s 0 %{_tmppath}/translations.{common,other}
+sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \
+ | xargs -P 8 -n 1 -I {} /bin/sh -c '
+ locale=$1
+ pushd $RPM_BUILD_DIR/compare-locales
+ PYTHONPATH=lib \
+ scripts/compare-locales -m ../l10n-merged/$locale \
+ ../%{source_prefix}/browser/locales/l10n.ini ../l10n $locale
+ popd
+ LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
+ make -C browser/locales langpack-$locale
+ cp -rL dist/xpi-stage/locale-$locale \
+ %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
+ # remove prefs, profile defaults, and hyphenation from langpack
+ rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
+ rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
+ # check against the fixed common list and sort into the right filelist
+ _matched=0
+ for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
+ [ "$_match" = "$locale" ] && _matched=1
+ done
+ [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
+ echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
+ >> %{_tmppath}/translations.$_l10ntarget
+' -- {}
%endif
# remove some executable permissions
find %{buildroot}%{progdir} \
@@ -442,9 +453,10 @@
-name "*.dtd" -o \
-name "*.txt" -o \
-name "*.xml" -o \
- -name "*.css" | xargs chmod a-x
+ -name "*.css" \
+ -exec chmod a-x {} +
# remove mkdir.done files from installed base
-find %{buildroot}%{progdir} -name ".mkdir.done" | xargs rm
+find %{buildroot}%{progdir} -type f -name ".mkdir.done" -delete
# overwrite the mozilla start-script and link it to /usr/bin
mkdir --parents %{buildroot}/usr/bin
sed "s:%%PREFIX:%{_prefix}:g