Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zzndb001:test
LibreWolf
LibreWolf.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File LibreWolf.spec of Package LibreWolf
# # spec file for package LibreWolf # # Copyright (c) 2024 SUSE LLC # 2006-2024 Wolfgang Rosenauer <wr@rosenauer.org> # 2021-2024 zzndb001 <zzndb001@gmail.com> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define _dwz_low_mem_die_limit 40000000 %define _dwz_max_die_limit 200000000 %define with_pipewire0_3 1 %define do_profiling 0 %define wayland_supported 1 %define use_ccache 1 # upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 # use clang on aarch64 because of the out of memory issue %ifarch %arm64 aarch64 %define clang_build 1 %endif %define localize 1 %define progdir %{_prefix}/%_lib/%{pkgname} %define __provides_exclude ^lib.*\\.so.*$ %define __requires_exclude ^(libmoz.*|liblgpllibs.*|libxul.*|libgk.*)$ %define project librewolf-community %define pkgname librewolf %define major 132 %define mainver %{major}.0.1 # No i586 on SLE-12, as the rpmlints are broken and can't handle the big rpms resulting from this build. %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 ExclusiveArch: aarch64 ppc64le x86_64 s390x %else # Firefox only supports i686 %ifarch %ix86 ExclusiveArch: i586 i686 BuildArch: i686 %{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2} %endif %endif %{expand:%%global optflags %(echo "%optflags"|sed -e s/-flto=auto//) } Name: LibreWolf Version: %{mainver} Release: 0 Summary: Community-maintained fork of Firefox, focused on privacy, security and freedom License: MPL-2.0 URL: https://librewolf.net Source0: firefox-%{version}.source.tar.xz Source1: source-master.tar.xz Source2: settings-master.tar.xz Source3: https://gitlab.com/%{project}/browser/arch/-/raw/master/%{pkgname}.desktop Source4: https://gitlab.com/%{project}/browser/linux/-/raw/master/content/io.gitlab.%{project}.appdata.xml.in Source5: firefox-l10n-%{version}.tar.xz # Patch997: https://bazaar.launchpad.net/~mozillateam/firefox/firefox.bionic/download/1633/debian/patches/unity-menubar.patch # PATCH-FEATURE-UPSTREAM patches from upstream # Patch90: arm.patch Patch91: xmas.patch Patch92: context-menu.patch Patch95: remove_addons.patch # Patch97: unity-menubar.patch Patch98: urlbarprovider-interventions.patch Patch99: allow-JXL-in-non-nightly-browser.patch Patch101: mozilla_dirs.patch Patch102: allow-ubo-private-mode.patch Patch104: dbus_name.patch Patch105: custom-ubo-assets-bootstrap-location.patch Patch106: pref-pane-small.patch Patch107: disable-data-reporting-at-compile-time.patch Patch108: hide-passwordmgr.patch Patch113: librewolf-prefs.patch Patch115: fullpage-translations.patch Patch116: devtools-bypass.patch Patch117: fullpage-translations-customization.patch # PATCH-FEATURE-UPSTREAM sed patches from upstream Patch190: allow-searchengines-non-esr.patch Patch191: disable-pocket.patch Patch193: stop-undesired-requests.patch # PATCH-FEATURE-UPSTREAM ui patches from upstream Patch256: firefox-view.patch Patch257: pref-naming.patch Patch259: remove-cfrprefs.patch Patch260: remove-organization-policy-banner.patch Patch263: privacy-preferences.patch Patch265: hide-default-browser.patch Patch266: handlers.patch Patch267: lw-logo-devtools.patch Patch268: website-appearance-ui-rfp.patch Patch269: allow_cookies_for_site.patch # PATCH-FIX-OPENSUSE patches from mozilla/firefox${major} # Gecko/Toolkit Patch1: mozilla-nongnome-proxies.patch Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-aarch64-startup-crash.patch Patch6: mozilla-s390-context.patch Patch7: mozilla-pgo.patch Patch8: mozilla-reduce-rust-debuginfo.patch Patch10: mozilla-bmo1504834-part1.patch Patch14: mozilla-bmo849632.patch Patch15: mozilla-bmo998749.patch Patch17: mozilla-libavcodec58_91.patch Patch18: mozilla-silence-no-return-type.patch Patch19: mozilla-bmo531915.patch Patch20: one_swizzle_to_rule_them_all.patch Patch21: svg-rendering.patch Patch24: mozilla-bmo1746799.patch # new patches from mozilla/firefox${major} # Firefox/browser # existing patches not update to repo ## 4 files changed, 116 insertions(+), 46 deletions(-) ## mozilla-bmo1504834-part1.patch | 8 ++--- ## mozilla-bmo1746799.patch | 62 +++++++++++++++++++++------------- ## mozilla-ntlm-full-path.patch | 28 +++++++++++----- ## mozilla-silence-no-return-type.patch | 64 +++++++++++++++++++++++++++++------- # PATCH-FIX-OPENSUSE additional (not pushed to repo) change from mozilla/firefox${major} patch999: opensuse-upstream-changes-from-mozilla_firefox132.patch # Patch-FIX-BUILD from AUR/firefox-appmenu patch998: fix-wayland-build.patch # BuildRequires: obs-service-verify_file BuildRequires: autoconf213 %if 0%{?use_ccache} BuildRequires: ccache %endif %if 0%{?suse_version} < 1599 BuildRequires: clang15-devel %else BuildRequires: clang18-devel %endif %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600 BuildRequires: gcc13 BuildRequires: gcc13-c++ %else BuildRequires: gcc-c++ %endif BuildRequires: cargo1.78 BuildRequires: rust1.78 BuildRequires: fdupes BuildRequires: memory-constraints BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel BuildRequires: libproxy-devel BuildRequires: dejavu-fonts BuildRequires: rust-cbindgen >= 0.26 BuildRequires: update-desktop-files BuildRequires: libiw-devel %if 0%{?do_profiling} BuildRequires: xvfb-run %endif BuildRequires: nasm >= 2.14 BuildRequires: nodejs >= 12.22.12 %if 0%{?sle_version} > 150000 && 0%{?sle_version} <= 150600 BuildRequires: nodejs12 >= 12.22.12 BuildRequires: python39 BuildRequires: python39-curses BuildRequires: python39-devel %else # ALP BuildRequires: nodejs >= 12.22.12 BuildRequires: python3 >= 3.7 BuildRequires: python3-devel BuildRequires: python3-curses %endif BuildRequires: unzip BuildRequires: yasm BuildRequires: zip # BuildRequires: lld BuildRequires: Mesa-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(nspr) >= 4.35 BuildRequires: pkgconfig(nss) >= 3.105 BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(glib-2.0) >= 2.22 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gtk+-3.0) >= 3.14.0 BuildRequires: pkgconfig(gtk+-unix-print-3.0) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libpulse) %if 0%{?with_pipewire0_3} BuildRequires: pkgconfig(libpipewire-0.3) %endif # libavcodec is required for H.264 support but the # openSUSE version is currently not able to play H.264 # therefore the Packman version is required # minimum version of libavcodec is 53 Recommends: libavcodec-full >= 0.10.16 Recommends: libcanberra0 Recommends: libpulse0 Recommends: myspell-en # To make security-keys (e.g. Yubikey) work with FF, it needs the udev-rules installed. # A clean package with the most common rules exists only in SP3 onwards. `u2f-hosts` could be used on older # code streams, but it contains more than just the rules, so we're not recommending it here. %if 0%{?suse_version} >= 1600 || 0%{?sle_version} >= 150300 Recommends: libfido2-udev %endif Requires(post): coreutils shared-mime-info desktop-file-utils Requires(postun):shared-mime-info desktop-file-utils %requires_ge mozilla-nspr %requires_ge mozilla-nss %requires_ge libfreetype6 Provides: %{pkgname} Provides: appdata() Provides: appdata(librewolf.appdata.xml) ExcludeArch: armv6l armv6hl ppc ppc64 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Community-maintained fork of Firefox, focused on privacy, security and freedom. Some usefully links: https://librewolf-community.gitlab.io/docs/ https://gitlab.com/librewolf-community/browser/linux/-/issues/147#note_483991577 %prep %setup -q -n firefox-%{version} -b1 -b2 -a5 %define _default_patch_fuzz 2 pushd %{_sourcedir} %if 0%{?suse_version} < 1599 %patch999 -p1 %else %autopatch -p1 999 %endif popd %if 0%{?suse_version} < 1599 %patch998 -p1 %patch1 -p1 %patch3 -p1 %patch4 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch10 -p1 %patch14 -p1 %patch15 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch24 -p1 %else %autopatch -p1 998 # openSUSE %autopatch -p1 1 3 4 6 7 8 10 14 15 17 18 19 20 21 24 %endif %if 0%{?suse_version} < 1599 %patch92 -p1 %patch95 -p1 %patch98 -p1 %patch99 -p1 %patch101 -p1 %patch102 -p1 %patch104 -p1 %patch105 -p1 %patch106 -p1 %patch113 -p1 %patch107 -p1 %patch108 -p1 %patch116 -p1 %patch117 -p1 %patch115 -p1 %else # upstream %autopatch -p1 92 95 98 99 101 102 104 105 106 113 107 108 116 117 115 %endif %ifarch aarch64 armv7l # FIXME conflict with openSUSE patch # %patch90 -p1 %endif # pref pane # ref source_repo/scripts/librewolf-patches.py ## 1) patch it in # %patch106 -p1 pushd %{_builddir}/$(basename %{S:1} .tar.xz)/patches/pref-pane ## 2) new files cp category-librewolf.svg %{_builddir}/firefox-%{version}/browser/themes/shared/preferences/category-librewolf.svg cp librewolf.css %{_builddir}/firefox-%{version}/browser/themes/shared/preferences/librewolf.css cp librewolf.inc.xhtml %{_builddir}/firefox-%{version}/browser/components/preferences/librewolf.inc.xhtml cp librewolf.js %{_builddir}/firefox-%{version}/browser/components/preferences/librewolf.js popd %if 0%{?suse_version} < 1599 %patch256 -p1 %patch257 -p1 %patch259 -p1 %patch260 -p1 %patch268 -p1 %patch269 -p1 %patch266 -p1 %patch265 -p1 %patch267 -p1 %patch263 -p1 %patch191 -p1 %patch190 -p1 %patch193 -p1 %else # ui patches %autopatch -p1 256 257 259 260 268 269 266 265 267 263 # sed patches %autopatch -p1 191 190 193 %endif # hack for arch desktop sed -i 's#Exec=/usr/lib/librewolf#Exec=/usr/bin#g' %{S:3} # Copying branding and source code changes to firefox source code cp -r %{_builddir}/$(basename %{S:1} .tar.xz)/themes/browser . # remove search extensions (experimental) cp -r %{_builddir}/$(basename %{S:1} .tar.xz)/assets/search-config.json services/settings/dumps/main/search-config.json # ref source_repo/scripts/librewolf-patches.py ## xmas.patch %if 0%{?suse_version} < 1599 %patch91 -p1 %else %autopatch -p1 91 %endif # override the firefox version echo "%{version}-%{release}" > browser/config/version.txt echo "%{version}-%{release}" > browser/config/version_display.txt %define settings %{_builddir}/$(basename %{S:2} .tar.xz) mkdir -p lw pushd lw cp -v %{settings}/librewolf.cfg . cp -v %{settings}/distribution/policies.json . cp -v %{settings}/defaults/pref/local-settings.js . popd # Locale mv firefox-l10n-%{version} lw/l10n pushd lw/l10n ## Patching appstrings.properties find . -path '*/appstrings.properties' -exec sed -i s/Firefox/LibreWolf/ {} \; ## Applying LibreWolf locales pushd %{_builddir}/$(basename %{S:1} .tar.xz)/l10n ## FIXME: typo of sv locale ? mv sv sv-SE for i in $(find . -name '*.ftl'); do lang=$(cut -d '/' -f2 <<< $i) # ./cs/browser/browser.inc.ftl -> cs ofile=$(cut -d '/' -f3- <<< $i) # ./cs/browser/browser.inc.ftl -> browser/browser.inc.ftl pref=$(cut -d '/' -f2-3 <<< $i) # ./cs/browser/browser.inc.ftl -> cs/browser file=${ofile/.inc/} target_path="%{_builddir}/firefox-%{version}/lw/l10n/${pref}/" if [[ ${lang} == "en-US" ]]; then pref=$(cut -d '/' -f3 <<< $i) # ./cs/browser/browser.inc.ftl -> browser target_path="%{_builddir}/firefox-%{version}/${pref}/locales/${lang}/" fi if [[ ${ofile} == ${file} ]]; then # no .inc in filename, override echo "Override with LibreWolf locale: $i >> ${target_path}${file}" cat ${i} > ${target_path}${file} else # append echo "Append LibreWolf locale: $i >> ${target_path}${file}" cat ${i} >> ${target_path}${file} fi done popd popd %build %ifarch aarch64 %arm %ix86 ### NOTE: these sections are not required anymore. Alson --no-keep-memory + -Wl,-z,pack-relative-relocs causes ### ld to go OOM (https://sourceware.org/bugzilla/show_bug.cgi?id=30756) # Limit RAM usage during link # export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--no-map-whole-files -Wl,--hash-size=31 -Wl,--no-relax" # A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer # export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes %endif export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" %ifarch ppc64 ppc64le %endif %ifarch %ix86 # Not enough memory on 32-bit systems, reduce debug info. export CFLAGS="\$CFLAGS -g1" %endif export CXXFLAGS="$CFLAGS" export MOZ_NOSPAM=1 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system %ifarch aarch64 %arm ppc64 ppc64le riscv64 %limit_build -m 3000 %else %limit_build -m 4000 %endif export CFLAGS="%{optflags}" %if 0%{?clang_build} == 0 export CC=gcc export CXX=g++ %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150600 export CC=gcc-13 export CXX=g++-13 %endif %else export CC=clang export CXX=clang++ %endif export MOZCONFIG=%{_builddir}/firefox-%{version}/mozconfig cat << END > $MOZCONFIG ac_add_options --enable-application=browser mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj # This supposedly speeds up compilation (We test through dogfooding anyway) ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-bootstrap ac_add_options --prefix=%{_prefix} ac_add_options --libdir=%{_libdir} ac_add_options --includedir=%{_includedir} ac_add_options --enable-release ac_add_options --enable-hardening # ac_add_options --enable-rust-simd # Branding ac_add_options --enable-update-channel=release ac_add_options --with-app-name=%{pkgname} # ac_add_options --with-app-basename=%{name} ac_add_options --with-branding=browser/branding/%{pkgname} ac_add_options --with-distribution-id=io.gitlab.%{pkgname}-community ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --allow-addon-sideload # at least temporary until the "wasi-sysroot" issue is solved ac_add_options --without-wasm-sandboxed-libraries %ifarch x86_64 aarch64 ac_add_options --enable-rust-simd %endif export MOZ_REQUIRE_SIGNING= export MOZ_APP_REMOTINGNAME=%{pkgname} # System libraries ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-zlib # Features ac_add_options --enable-alsa ac_add_options --enable-jack ac_add_options --disable-crashreporter ac_add_options --disable-updater ac_add_options --disable-tests ac_add_options --disable-default-browser-agent # Disables crash reporting, telemetry and other data gathering tools # obsoleted? # TODO: use source/assets/moczonfig in the future # NOTE: let us use it for one last build, otherwise, there might be some conflicts mk_add_options MOZ_CRASHREPORTER=0 mk_add_options MOZ_DATA_REPORTING=0 mk_add_options MOZ_SERVICES_HEALTHREPORT=0 mk_add_options MOZ_TELEMETRY_REPORTING=0 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} # experimental JXL support ac_add_options --enable-jxl ac_add_options --enable-optimize # From mozilla/firefox${major}: LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) %ifarch x86_64 %if 0%{?suse_version} > 1500 ac_add_options --enable-lto %if 0%{?do_profiling} ac_add_options MOZ_PGO=1 %endif %endif %endif %ifarch %arm %arm64 aarch64 ac_add_options --disable-lto # options for ci / weaker build systems # ac_add_options --enable-linker=gold %endif # ac_add_options --enable-linker=lld %ifarch %ix86 %arm # OOM on 32-bit when ld passed -Wl,-z,pack-relative-relocs # ac_add_options --enable-elf-hack %endif %if 0%{?wayland_supported} ac_add_options --enable-default-toolkit=cairo-gtk3-wayland %else ac_add_options --enable-default-toolkit=cairo-gtk3 %endif %if 0%{?use_ccache} ac_add_options --with-ccache %endif %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 %endif ac_add_options --with-l10n-base=%{_builddir}/firefox-%{version}/lw/l10n END %if 0%{?use_ccache} ccache -s %endif %if 0%{?do_profiling} xvfb-run --server-args="-screen 0 1920x1080x24" \ %endif ./mach build -v %if %localize # Packaging with locales cat "%{_builddir}/firefox-%{version}/browser/locales/shipped-locales" \ | xargs "./mach" package-multi-locale --locales %endif %install export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system DESTDIR=%{buildroot} ./mach install # some doc cp -r %{settings}/docs %{buildroot}/%{_libdir}/%{pkgname}/docs pushd %{buildroot}/%{_libdir}/%{pkgname} || exit install -Dvm644 /dev/stdin defaults/pref/vendor.js <<END // Use system-provided dictionaries pref("spellchecker.dictionary_path", "/usr/share/myspell"); // Don't disable extensions in the application directory // done in librewolf.cfg // pref("extensions.autoDisableScopes", 11); // Ref: firefox-maintenance/firefox/firefox.js pref("intl.locale.requested", ""); // pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); /* Disable DoH by default */ pref("network.trr.mode", 5); // do not disable any scope pref("extensions.autoDisableScopes", 0); pref("extensions.shownSelectionUI", true); pref("extensions.langpacks.signatures.required", false); // enable D-Bus inteface for Gnome Shell search pref("browser.gnome-search-provider.enabled", true); END mkdir -p distribution install -Dvm644 /dev/stdin "distribution/distribution.ini" <<END [Global] id=io.gitlab.%{pkgname}-community version=1.0 about=LibreWolf - Build on openSUSE Build Service [Preferences] app.distributor="LibreWolf Community" app.distributor.channel=%{pkgname} app.partner.librewolf=%{pkgname} END popd || exit # desktop install -Dm 0644 -t %{buildroot}/%{_datadir}/applications/ %{S:3} # icon # install -Dm 0644 -T browser/branding/%{pkgname}/content/identity-icons-brand.svg %{buildroot}/%{_datadir}/icons/hicolor/symbolic/apps/%{pkgname}-symbolic.svg pushd %{buildroot}/%{_libdir}/%{pkgname}/browser/chrome/icons/default || exit 1 for size in 16 32 48 64 128; do install -Dm 0644 -T default${size}.png %{buildroot}/%{_datadir}/icons/hicolor/${size}x${size}/apps/%{pkgname}.png done popd || exit 1 # appdata install -Dm 0644 -T %{S:4} %{buildroot}/%{_datadir}/metainfo/%{pkgname}.appdata.xml # excludes rm -f %{buildroot}/%{_libdir}/%{pkgname}/browser/features/proxy-failover@mozilla.com.xpi rm -f %{buildroot}/%{_libdir}/%{pkgname}/pingsender rm -f %{buildroot}/%{_libdir}/%{pkgname}/precomplete rm -f %{buildroot}/%{_libdir}/%{pkgname}/removed-files %fdupes %{buildroot}/%{_libdir}/%{pkgname} %fdupes %{buildroot}/%{_datadir} # update mime and desktop database %post %mime_database_post %desktop_database_post %icon_theme_cache_post exit 0 %postun %desktop_database_postun %mime_database_postun %icon_theme_cache_postun exit 0 %files %{_bindir}/librewolf %dir /usr/lib64/librewolf %dir %{_libdir}/librewolf/docs %doc %{_libdir}/librewolf/docs/* %{_libdir}/librewolf/application.ini %dir /usr/lib64/librewolf/browser %dir /usr/lib64/librewolf/browser/chrome %{_libdir}/librewolf/browser/chrome/icons/ %{_libdir}/librewolf/browser/features/ %{_libdir}/librewolf/browser/omni.ja %{_libdir}/librewolf/defaults/ %{_libdir}/librewolf/dependentlibs.list %dir /usr/lib64/librewolf/distribution %{_libdir}/librewolf/distribution/ %{_libdir}/librewolf/fonts/ %{_libdir}/librewolf/gmp-clearkey/ %{_libdir}/librewolf/*.so %{_libdir}/librewolf/glxtest %if 0%{?wayland_supported} %{_libdir}/librewolf/vaapitest %endif %ifarch aarch64 riscv64 %arm %{_libdir}/librewolf/v4l2test %endif %{_libdir}/librewolf/librewolf %{_libdir}/librewolf/librewolf-bin %{_libdir}/librewolf/librewolf.cfg %{_libdir}/librewolf/omni.ja %{_libdir}/librewolf/platform.ini %{_datadir}/applications/%{pkgname}.desktop %{_datadir}/icons/hicolor/ %{_datadir}/metainfo/ %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor