Enable crash reporter

This commit is contained in:
Jan Horak 2023-10-30 08:50:43 +01:00
parent b896e22d66
commit 118a6c91ec
4 changed files with 57 additions and 1 deletions

1
.gitignore vendored
View File

@ -603,3 +603,4 @@ firefox-3.6.4.source.tar.bz2
/firefox-118.0.1.source.tar.xz
/firefox-118.0.2.source.tar.xz
/firefox-langpacks-118.0.2-20231010.tar.xz
/dump_syms-vendor.tar.xz

View File

@ -169,7 +169,7 @@ ExcludeArch: i686
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 119.0
Release: 2%{?pre_tag}%{?dist}
Release: 3%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
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
@ -177,6 +177,7 @@ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pr
Source1: firefox-langpacks-%{version}%{?pre_version}-20231023.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source3: dump_syms-vendor.tar.xz
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
Source20: firefox.desktop
@ -700,6 +701,24 @@ cd -
export CBINDGEN=/usr/bin/cbindgen
%endif
%if %{enable_mozilla_crashreporter}
mkdir -p my_rust_vendor
cd my_rust_vendor
tar xf %{SOURCE3}
mkdir -p .cargo
cat > .cargo/config <<EOL
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "`pwd`"
EOL
env CARGO_HOME=.cargo cargo install dump_syms
export PATH=`pwd`/.cargo/bin:$PATH
cd -
%endif
mkdir %{_buildrootdir}/bin || :
cp %{SOURCE32} %{_buildrootdir}/bin || :
@ -1125,6 +1144,9 @@ fi
#---------------------------------------------------------------------
%changelog
* Mon Oct 30 2023 Jan Horak <jhorak@redhat.com> - 119.0-3
- Enable mozilla crash reporter
* Fri Oct 27 2023 Martin Stransky <stransky@redhat.com>- 119.0-2
- Added fix for mzbz#1861615

32
gen_dump_syms-vendor.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
set -x
# Dummy Cargo.toml file with cbindgen dependency
cat > Cargo.toml <<EOL
[package]
name = "dummy"
version = "0.0.1"
description = """
This is a dummy package which contains dependency on cbindgen
to be used with 'cargo vendor' commmand.
"""
[dependencies]
dump_syms = "2.2.2"
[[bin]]
name = "dummy"
path = "dummy.rs"
doc = false
EOL
cargo install cargo-vendor
cargo vendor
cd vendor
tar -cJf ../dump_syms-vendor.tar.xz *
cd ..
rm -f Cargo.toml
rm -rf vendor

View File

@ -2,3 +2,4 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5
SHA512 (firefox-119.0.source.tar.xz) = 4b555c444add36567fd538752b122f227cf78bb70b72c79e6d8ae8d9c2e61c3cdacfae79c37970753b8b5c7716b28c686071eb7b551773c30a76852f3550676c
SHA512 (firefox-langpacks-119.0-20231023.tar.xz) = f23a71aa3d5d0dab7d38a2c10bab9943034a7b858df07f49d29baadb8df74a679597621e491b5f011a471bee0efb9e368b7e7664f793637a78169cd6483a94be
SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54
SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3