diff --git a/firefox-esr.changes b/firefox-esr.changes index 13cb473..0ad2e8a 100644 --- a/firefox-esr.changes +++ b/firefox-esr.changes @@ -6,6 +6,8 @@ Mon Oct 21 13:13:29 UTC 2019 - Wolfgang Rosenauer mozilla-bmo1573381.patch mozilla-bmo1512162.patch mozilla-bmo1585099.patch +- added mozilla-sle12-lower-python-requirement.patch to support + SLE12 still ------------------------------------------------------------------- Wed Oct 2 21:08:05 UTC 2019 - Wolfgang Rosenauer diff --git a/firefox-esr.spec b/firefox-esr.spec index fcdbaf4..ecfa1c4 100644 --- a/firefox-esr.spec +++ b/firefox-esr.spec @@ -16,6 +16,8 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +# either MozillaFirefox or firefox-esr +%define pkgname firefox-esr # changed with every update # orig_version vs. mainver: To have beta-builds @@ -50,10 +52,15 @@ BuildArch: i686 %endif # general build definitions +%if %{pkgname} == "firefox-esr" %define progname firefox-esr -%define pkgname firefox-esr -%define srcname firefox %define appname Firefox ESR +%else +%define progname firefox +%define appname Firefox +%endif + +%define srcname firefox %define progdir %{_prefix}/%_lib/%{progname} %define gnome_dir %{_prefix} %define desktop_file_name %{progname} @@ -94,13 +101,14 @@ BuildRequires: mozilla-nss-devel >= 3.44.1 BuildRequires: firefox-nasm >= 2.13 BuildRequires: nodejs10 #BuildRequires: python2-xml -BuildRequires: firefox-python3 >= 3.5 %else BuildRequires: nasm >= 2.13 BuildRequires: nodejs8 >= 8.11 BuildRequires: python2-xml -BuildRequires: python3 >= 3.5 %endif +# Official requirement is 3.5, but for SLE-12 we lower (patch) the +# requirement to 3.4, as thats the python-version we have there +BuildRequires: python3 >= 3.4 BuildRequires: python-devel BuildRequires: rust >= 1.34 BuildRequires: rust-cbindgen >= 0.8.7 @@ -200,6 +208,7 @@ Patch20: mozilla-bmo1511604.patch Patch21: mozilla-bmo1554971.patch Patch22: mozilla-nestegg-big-endian.patch Patch24: mozilla-fix-top-level-asm.patch +Patch25: mozilla-sle12-lower-python-requirement.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -214,6 +223,9 @@ Recommends: libcanberra0 Recommends: libpulse0 # addon leads to startup crash (bnc#908892) Obsoletes: tracker-miner-firefox < 0.15 +%if 0%{?devpkg} == 0 +Obsoletes: %{name}-devel < %{version} +%endif # libproxy's mozjs pacrunner crashes FF (bnc#759123) %if 0%{?suse_version} < 1220 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 @@ -334,6 +346,7 @@ cd $RPM_BUILD_DIR/%{srcname}-%{orig_version} %patch21 -p1 %patch22 -p1 %patch24 -p1 +%patch25 -p1 # Firefox %patch101 -p1 %patch102 -p1 @@ -513,8 +526,10 @@ cp -rf $RPM_BUILD_DIR/obj/dist/%{srcname}/* %{buildroot}%{progdir} mkdir -p %{buildroot}%{progdir}/distribution/extensions mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/ # renaming executables (for regular vs. ESR) -mv %{buildroot}%{progdir}/firefox %{buildroot}%{progdir}/%{progname} -mv %{buildroot}%{progdir}/firefox-bin %{buildroot}%{progdir}/%{progname}-bin +%if "%{srcname}" != "%{progname}" +mv %{buildroot}%{progdir}/%{srcname} %{buildroot}%{progdir}/%{progname} +mv %{buildroot}%{progdir}/%{srcname}-bin %{buildroot}%{progdir}/%{progname}-bin +%endif # install gre prefs install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ # install browser prefs @@ -613,8 +628,8 @@ rm -f %{buildroot}%{progdir}/run-mozilla.sh rm -f %{buildroot}%{progdir}/LICENSE rm -f %{buildroot}%{progdir}/precomplete rm -f %{buildroot}%{progdir}/update-settings.ini -# devel %if 0%{?devpkg} +# devel mkdir -p %{buildroot}%{_bindir} install -m 755 %SOURCE12 %{buildroot}%{_bindir} # inspired by mandriva diff --git a/mozilla-sle12-lower-python-requirement.patch b/mozilla-sle12-lower-python-requirement.patch new file mode 100644 index 0000000..29d7b6c --- /dev/null +++ b/mozilla-sle12-lower-python-requirement.patch @@ -0,0 +1,41 @@ +# HG changeset patch +# Parent 9edebbc21d9835abacb6110b1591d2ae1b6a0727 +On SLE-12 we have only python 3.4 available at the moment. But +as it seems, no python 3.5 features are being used to build, so +lowering the requirements work. + +diff -r 9edebbc21d98 build/moz.configure/init.configure +--- a/build/moz.configure/init.configure Fri Sep 20 08:00:18 2019 +0200 ++++ b/build/moz.configure/init.configure Fri Oct 11 12:44:23 2019 +0200 +@@ -412,7 +412,7 @@ + 'MozillaBuild python: %s' % e) + else: + # Fall back to the search routine. +- python, version = find_python3_executable(min_version='3.5.0') ++ python, version = find_python3_executable(min_version='3.4.5') + + # The API returns a bytes whereas everything in configure is unicode. + if python: +@@ -424,7 +424,7 @@ + 'PATH or define PYTHON3 to point to a Python ' + '3.5 executable.') + +- if version < (3, 5, 0): ++ if version < (3, 4, 5): + raise FatalCheckError('Python 3.5 or newer is required to build; ' + '%s is Python %d.%d' % (python, version[0], + version[1])) +diff -r 9edebbc21d98 taskcluster/scripts/run-task +--- a/taskcluster/scripts/run-task Fri Sep 20 08:00:18 2019 +0200 ++++ b/taskcluster/scripts/run-task Fri Oct 11 12:44:23 2019 +0200 +@@ -16,8 +16,8 @@ + import sys + + +-if sys.version_info[0:2] < (3, 5): +- print('run-task requires Python 3.5+') ++if sys.version_info[0:2] < (3, 4): ++ print('run-task requires Python 3.4+') + sys.exit(1) + +