Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
LibreWolf
LibreWolf.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File LibreWolf.spec of Package LibreWolf
# # spec file for package LibreWolf # # Copyright (c) 2022 SUSE LLC # 2006-2022 Wolfgang Rosenauer <wr@rosenauer.org> # 2021-2022 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 with_pipewire0_3 1 %define do_profiling 0 %define wayland_supported 1 %define use_ccache 0 # upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 %define project librewolf-community %define pkgname librewolf %define major 102 %define mainver %{major}.0 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: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/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 # PATCH-FEATURE-UPSTREAM patches from upstream Patch90: arm.patch # Patch91: browser-confvars.patch Patch92: context-menu.patch # Patch93: megabar.patch # Patch94: mozilla-vpn-ad2.patch Patch95: remove_addons.patch # Patch96: search-config.patch Patch97: unity-menubar.patch Patch98: urlbarprovider-interventions.patch # Patch99: about-dialog.patch # Patch100: allow_dark_preference_with_rfp.patch Patch101: mozilla_dirs.patch Patch102: allow-ubo-private-mode.patch Patch103: mozilla-kde_after_unity.patch Patch104: dbus_name.patch Patch105: custom-ubo-assets-bootstrap-location.patch Patch106: librewolf-pref-pane.patch Patch107: disable-data-reporting-at-compile-time.patch Patch108: hide-passwordmgr.patch Patch109: aboutLogos.patch Patch110: faster-package-multi-locale.patch Patch111: mozilla-kde_after_unity.patch # PATCH-FEATURE-UPSTREAM sed patches from upstream Patch190: allow-searchengines-non-esr.patch Patch191: disable-pocket.patch Patch192: remove-internal-plugin-certs.patch Patch193: stop-undesired-requests.patch # PATCH-FEATURE-UPSTREAM ui patches from upstream # Patch256: add-language-warning.patch Patch257: pref-naming.patch Patch258: remove-branding-urlbar.patch Patch259: remove-cfrprefs.patch Patch260: remove-organization-policy-banner.patch Patch261: remove-snippets-from-home.patch Patch262: sanitizing-description.patch Patch263: privacy-preferences.patch Patch264: remap-links.patch Patch265: hide-default-browser.patch Patch266: handlers.patch Patch267: lw-logo-devtools.patch Patch268: website-appearance-ui-rfp.patch # PATCH-FIX-OPENSUSE patches from mozilla/firefox${major} # Gecko/Toolkit Patch1: mozilla-nongnome-proxies.patch Patch2: mozilla-kde.patch Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-aarch64-startup-crash.patch Patch5: mozilla-fix-aarch64-libopus.patch Patch6: mozilla-s390-context.patch Patch7: mozilla-pgo.patch Patch8: mozilla-reduce-rust-debuginfo.patch Patch9: mozilla-bmo1005535.patch Patch10: mozilla-bmo1568145.patch Patch11: mozilla-bmo1504834-part1.patch Patch13: mozilla-bmo1504834-part3.patch Patch14: mozilla-bmo1512162.patch Patch15: mozilla-fix-top-level-asm.patch Patch17: mozilla-bmo849632.patch Patch18: mozilla-bmo998749.patch Patch20: mozilla-s390x-skia-gradient.patch Patch21: mozilla-libavcodec58_91.patch Patch22: mozilla-silence-no-return-type.patch Patch23: mozilla-bmo531915.patch Patch25: one_swizzle_to_rule_them_all.patch Patch26: svg-rendering.patch # existing patches not update to repo # PATCH-FIX-OPENSUSE additional (not pushed to repo) change from mozilla/firefox${major} # patch999: opensuse-upstream-change-from-mozilla_firefox101.patch # PATCH-FIX-BUILD from AUR/firefox-appmenu patch998: fix-wayland-build.patch # new patches not update to repo # BuildRequires: autoconf213 %if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300 BuildRequires: cargo >= 1.59 BuildRequires: rust >= 1.59 %else # Newer sle/leap/tw use parallel versioned rust releases which have # a different method for provides that we can use to request a # specific version # minimal requirement: BuildRequires: rust+cargo >= 1.59 # actually used upstream: BuildRequires: cargo1.60 BuildRequires: rust1.60 %endif %if 0%{?use_ccache} BuildRequires: ccache %endif BuildRequires: clang-devel >= 5 %if 0%{?sle_version} <= 150300 BuildRequires: gcc11-c++ %else BuildRequires: gcc-c++ %endif BuildRequires: fdupes BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel BuildRequires: libproxy-devel BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: dejavu-fonts BuildRequires: rust-cbindgen >= 0.23.0 BuildRequires: update-desktop-files BuildRequires: libiw-devel %if 0%{?do_profiling} BuildRequires: xvfb-run %endif BuildRequires: nasm >= 2.14 BuildRequires: nodejs >= 10.22.1 BuildRequires: python3 >= 3.5 BuildRequires: python3-devel BuildRequires: unzip BuildRequires: yasm BuildRequires: zip # BuildRequires: lld BuildRequires: Mesa-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(nspr) >= 4.34 BuildRequires: pkgconfig(nss) >= 3.79 BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(xt) 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 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) %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 %define _default_patch_fuzz 2 pushd %{_sourcedir} # %patch999 -p1 popd %patch998 -p1 # openSUSE %patch1 -p1 # %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch17 -p1 %patch18 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch25 -p1 %patch26 -p1 # new patches not update to repo # # upstream %ifarch aarch64 armv7l # FIXME conflict with openSUSE patch %patch90 -p1 %endif # %patch91 -p1 %patch92 -p1 # %patch93 -p1 # %patch94 -p1 %patch95 -p1 %patch97 -p1 %patch98 -p1 # deprecated ## %patch99 -p1 ## %patch100 -p1 %patch101 -p1 # allow uBlockOrigin to run in private mode by default, without user intervention. %patch102 -p1 # Do really need this on oS ?? we already have mozilla-kde.patch. # KDE menu # patch -Np1 -i ${_patches_dir}/mozilla-kde.patch # custom patch that does not conflict with the unity patch # %patch103 -p1 # somewhat experimental patch to fix bus/dbus/remoting names to io.gitlab.librewolf # should not break things, buuuuuuuuuut we'll see. %patch104 -p1 # add custom uBO assets (on first launch only) %patch105 -p1 # pref pane %patch106 -p1 # fix telemetry removal, see https://gitlab.com/librewolf-community/browser/linux/-/merge_requests/17, for example %patch107 -p1 # allows hiding the password manager (from the lw pref pane) / via a pref %patch108 -p1 # add v100 about dialog %patch109 -p1 # %patch110 -p1 # use LibreWolf upstream mozilla-kde_after_unity.patch %patch111 -p1 # ui patches # show a warning saying that changing language is not allowed through the UI, # and that it requires to visit our FAQ, instead of telling the user to check his connection. # %patch256 -p1 # remove references to firefox from the settings UI, change text in some of the links, # explain that we force en-US and suggest enabling history near the session restore checkbox. %patch257 -p1 # remove firefox references in the urlbar, when suggesting opened tabs. %patch258 -p1 # remove cfr UI elements, as they are disabled and locked already. %patch259 -p1 # do not display your browser is being managed by your organization in the settings. %patch260 -p1 # hide "snippets" section from the home page settings, as it was already locked. %patch261 -p1 # add warning that sanitizing exceptions are bypassed by the options in History # Clear History when LibreWolf closes > Settings %patch262 -p1 # add patch to hide website appearance settings %patch268 -p1 # %patch266 -p1 # %patch264 -p1 # %patch265 -p1 # Add LibreWolf logo to Debugging Page %patch267 -p1 # %patch263 -p1 # 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 %{_sourcedir}/$(basename %{S:1} .tar.xz)/themes/browser . # Dsiabling Pocket %patch191 -p1 # Remove Internal Plugin Certificates %patch192 -p1 # allow SearchEngines option in non-ESR builds %patch190 -p1 # remove search extensions (experimental) # %patch96 -p1 cp -r %{_sourcedir}/$(basename %{S:1} .tar.xz)/assets/search-config.json services/settings/dumps/main/search-config.json # stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10) %patch193 -p1 %build %ifarch %arm %ix86 # Limit RAM usage during link export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" %ifarch ppc64 ppc64le %if 0%{?clang_build} == 0 export CFLAGS="$CFLAGS -mminimal-toc" %endif %endif export CXXFLAGS="$CFLAGS" export MOZ_NOSPAM=1 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system # LTO needs more open files ulimit -n 4096 export MOZCONFIG=%{_builddir}/firefox-%{version}/mozconfig cat << END > $MOZCONFIG %if 0%{?clang_build} export CC=clang export CXX=clang++ %else %if 0%{?sle_version} <= 150300 export CC=gcc-11 %else export CC=gcc export CXX=g++ %if 0%{?gcc_version:%{gcc_version}} >= 12 export CFLAGS="$CFLAGS -fimplicit-constexpr" %endif %endif %endif 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=0 # 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 # 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 # options for ci / weaker build systems # mk_add_options MOZ_MAKE_FLAGS="-j4" # ac_add_options --enable-linker=gold ac_add_options --enable-optimize # From mozilla/firefox${major}: LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) %if 0%{?suse_version} > 1500 ac_add_options --enable-lto %if 0%{?do_profiling} ac_add_options MOZ_PGO=1 %endif %endif # ac_add_options --enable-linker=lld # building with elf-hack started to fail everywhere with FF73 %ifnarch aarch64 ppc64 ppc64le s390x ac_add_options --disable-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 END %if 0%{?use_ccache} ccache -s %endif %if 0%{?do_profiling} xvfb-run --server-args="-screen 0 1920x1080x24" \ %endif ./mach build -v %install export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system DESTDIR=%{buildroot} ./mach install mkdir -p %{buildroot}/%{_libdir}/%{pkgname} cp -r %{_sourcedir}/$(basename %{S:2} .tar.xz)/* %{buildroot}/%{_libdir}/%{pkgname}/ 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); 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}/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 %license %{_libdir}/librewolf/LICENSE.txt %doc %{_libdir}/librewolf/*.md %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/librewolf %{_libdir}/librewolf/librewolf-bin %{_libdir}/librewolf/librewolf.cfg %{_libdir}/librewolf/omni.ja %{_libdir}/librewolf/pingsender %{_libdir}/librewolf/platform.ini %{_libdir}/librewolf/plugin-container %{_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