build fixes

This commit is contained in:
Martin Stransky 2021-04-22 15:55:40 +02:00
parent defc416c28
commit 3180583dfa
3 changed files with 39 additions and 46 deletions

View File

@ -40,7 +40,7 @@ ExcludeArch: armv7hl
# https://bugzilla.redhat.com/show_bug.cgi?id=1951606 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606
%global enable_mozilla_crashreporter 0 %global enable_mozilla_crashreporter 0
%ifarch x86_64 %{ix86} %ifarch x86_64 %{ix86}
%global enable_mozilla_crashreporter 0 %global enable_mozilla_crashreporter 1
%endif %endif
%if %{build_with_asan} %if %{build_with_asan}
%global enable_mozilla_crashreporter 0 %global enable_mozilla_crashreporter 0
@ -151,7 +151,7 @@ ExcludeArch: armv7hl
Summary: Mozilla Firefox Web browser Summary: Mozilla Firefox Web browser
Name: firefox Name: firefox
Version: 88.0 Version: 88.0
Release: 3%{?pre_tag}%{?dist} Release: 4%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/ URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -233,6 +233,7 @@ Patch416: mozilla-1693472.patch
Patch417: mozilla-1702606.patch Patch417: mozilla-1702606.patch
Patch418: mozilla-1703657.patch Patch418: mozilla-1703657.patch
Patch419: mozilla-1703763.patch Patch419: mozilla-1703763.patch
Patch420: mochitest-wayland-workaround.patch
# PGO/LTO patches # PGO/LTO patches
Patch600: pgo.patch Patch600: pgo.patch
@ -385,23 +386,6 @@ Provides: webclient
Mozilla Firefox is an open-source web browser, designed for standards Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability. compliance, performance and portability.
%if %{enable_mozilla_crashreporter}
%global moz_debug_prefix %{_prefix}/lib/debug
%global moz_debug_dir %{moz_debug_prefix}%{mozappdir}
%global uname_m %(uname -m)
%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip
%global symbols_file_path %{moz_debug_dir}/%{symbols_file_name}
%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list
%global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo
%package -n %{crashreporter_pkg_name}
Summary: Debugging symbols used by Mozilla's crash reporter servers
%description -n %{crashreporter_pkg_name}
This package provides debug information for Firefox, for use by
Mozilla's crash reporter servers. If you are trying to locally
debug %{name}, you want to install %{name}-debuginfo instead.
%files -n %{crashreporter_pkg_name} -f debugcrashreporter.list
%endif
%package x11 %package x11
Summary: Firefox X11 launcher. Summary: Firefox X11 launcher.
Requires: %{name} Requires: %{name}
@ -486,6 +470,7 @@ This package contains results of tests executed during build.
%patch417 -p1 -b .1702606 %patch417 -p1 -b .1702606
%patch418 -p1 -b .1703657 %patch418 -p1 -b .1703657
%patch419 -p1 -b .1703763 %patch419 -p1 -b .1703763
%patch420 -p1 -b .mochitest-wayland-workaround
# PGO patches # PGO patches
%if %{build_with_pgo} %if %{build_with_pgo}
@ -572,6 +557,10 @@ echo "ac_add_options --enable-address-sanitizer" >> .mozconfig
echo "ac_add_options --disable-jemalloc" >> .mozconfig echo "ac_add_options --disable-jemalloc" >> .mozconfig
%endif %endif
%if !%{enable_mozilla_crashreporter}
echo "ac_add_options --disable-crashreporter" >> .mozconfig
%endif
# api keys full path # api keys full path
echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozconfig echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozconfig
# It seems that the api key we have is for the safe browsing only # It seems that the api key we have is for the safe browsing only
@ -890,14 +879,6 @@ create_default_langpack "zh-TW" "zh"
%{__rm} -rf %{buildroot}%{mozappdir}/dictionaries %{__rm} -rf %{buildroot}%{mozappdir}/dictionaries
ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries
# Enable crash reporter for Firefox application
%if %{enable_mozilla_crashreporter}
sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{mozappdir}/application.ini
# Add debuginfo for crash-stats.mozilla.com
%{__mkdir_p} %{buildroot}/%{moz_debug_dir}
%{__cp} objdir/dist/%{symbols_file_name} %{buildroot}/%{moz_debug_dir}
%endif
%if 0%{?run_firefox_tests} %if 0%{?run_firefox_tests}
%{__mkdir_p} %{buildroot}/%{version}-%{release}/test_results %{__mkdir_p} %{buildroot}/%{version}-%{release}/test_results
%{__cp} test_results/* %{buildroot}/%{version}-%{release}/test_results %{__cp} test_results/* %{buildroot}/%{version}-%{release}/test_results
@ -1014,11 +995,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/32x32/apps/firefox.png %{_datadir}/icons/hicolor/32x32/apps/firefox.png
%{_datadir}/icons/hicolor/48x48/apps/firefox.png %{_datadir}/icons/hicolor/48x48/apps/firefox.png
%{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg %{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg
%if %{enable_mozilla_crashreporter}
%{mozappdir}/crashreporter %{mozappdir}/crashreporter
%{mozappdir}/crashreporter.ini %{mozappdir}/crashreporter.ini
%{mozappdir}/minidump-analyzer %{mozappdir}/minidump-analyzer
%{mozappdir}/Throbber-small.gif %{mozappdir}/Throbber-small.gif
%{mozappdir}/browser/crashreporter-override.ini %{mozappdir}/browser/crashreporter-override.ini
%endif
%{mozappdir}/*.so %{mozappdir}/*.so
%{mozappdir}/defaults/pref/channel-prefs.js %{mozappdir}/defaults/pref/channel-prefs.js
%{mozappdir}/dependentlibs.list %{mozappdir}/dependentlibs.list
@ -1038,6 +1021,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%changelog %changelog
* Thu Apr 22 2021 Martin Stransky <stransky@redhat.com> - 88.0-4
- Run with mochitest test suite.
* Thu Apr 22 2021 Martin Stransky <stransky@redhat.com> - 88.0-3 * Thu Apr 22 2021 Martin Stransky <stransky@redhat.com> - 88.0-3
- Build with crashreporter enabled. - Build with crashreporter enabled.

View File

@ -5,7 +5,7 @@ set -x
RUN_XPCSHELL_TEST=0 RUN_XPCSHELL_TEST=0
RUN_REFTEST=1 RUN_REFTEST=1
RUN_MOCHITEST=0 RUN_MOCHITEST=1
RUN_CRASHTEST=1 RUN_CRASHTEST=1
while (( "$#" )); do while (( "$#" )); do
@ -37,34 +37,38 @@ NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
if [ $RUN_XPCSHELL_TEST -ne 0 ] ; then if [ $RUN_XPCSHELL_TEST -ne 0 ] ; then
./mach xpcshell-test 2>&1 | cat - | tee $TEST_DIR/xpcshell # ./mach xpcshell-test 2>&1 | cat - | tee $TEST_DIR/xpcshell
./mach xpcshell-test --enable-webrender 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr ./mach xpcshell-test --enable-webrender 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr
sleep 60
fi fi
# Basic render testing # Basic render testing
export TEST_PARAMS="--setpref reftest.ignoreWindowSize=true --setpref widget.wayland-focus-workaroud=true" export TEST_PARAMS="--setpref reftest.ignoreWindowSize=true --setpref widget.wayland-focus-workaroud=true"
export TEST_FLAVOUR="" #export TEST_FLAVOUR=""
if [ $RUN_REFTEST -ne 0 ] ; then #if [ $RUN_REFTEST -ne 0 ] ; then
./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR # ./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
fi #fi
if [ $RUN_CRASHTEST -ne 0 ] ; then #if [ $RUN_CRASHTEST -ne 0 ] ; then
./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR # ./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
fi #fi
if [ $RUN_MOCHITEST -ne 0 ] ; then #if [ $RUN_MOCHITEST -ne 0 ] ; then
./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR # ./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
fi #fi
# WebRender testing # WebRender testing
export TEST_PARAMS="--enable-webrender $TEST_PARAMS" export TEST_PARAMS="--enable-webrender $TEST_PARAMS"
export TEST_FLAVOUR="-wr" export TEST_FLAVOUR="-wr"
if [ $RUN_REFTEST -ne 0 ] ; then if [ $RUN_REFTEST -ne 0 ] ; then
./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR ./mach reftest $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
sleep 60
fi fi
if [ $RUN_CRASHTEST -ne 0 ] ; then if [ $RUN_CRASHTEST -ne 0 ] ; then
./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR ./mach crashtest $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
sleep 60
fi fi
if [ $RUN_MOCHITEST -ne 0 ] ; then if [ $RUN_MOCHITEST -ne 0 ] ; then
./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR ./mach mochitest dom $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
sleep 60
fi fi
rm -f objdir/dist/bin/certutil rm -f objdir/dist/bin/certutil

View File

@ -25,10 +25,13 @@ export TEST_FLAVOUR=""
export TEST_PARAMS="--enable-webrender $TEST_PARAMS" export TEST_PARAMS="--enable-webrender $TEST_PARAMS"
export TEST_FLAVOUR="-wr" export TEST_FLAVOUR="-wr"
xvfb-run -s "$X_PARAMS" -n 95 ./mach xpcshell-test --sequential $TEST_PARAMS 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr xvfb-run -s "$X_PARAMS" -n 95 ./mach xpcshell-test --sequential $TEST_PARAMS 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr
xvfb-run -s "$X_PARAMS" -n 96 ./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR sleep 60
xvfb-run -s "$X_PARAMS" -n 97 ./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR xvfb-run -s "$X_PARAMS" -n 96 ./mach reftest $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
#xvfb-run -s "$X_PARAMS" -n 98 ./mach mochitest dom --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR sleep 60
#xvfb-run -s "$X_PARAMS" -n 98 ./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR xvfb-run -s "$X_PARAMS" -n 97 ./mach crashtest $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
sleep 60
xvfb-run -s "$X_PARAMS" -n 98 ./mach mochitest dom $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
#xvfb-run -s "$X_PARAMS" -n 98 ./mach mochitest $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
rm -f objdir/dist/bin/certutil rm -f objdir/dist/bin/certutil
rm -f objdir/dist/bin/pk12util rm -f objdir/dist/bin/pk12util