#!/bin/bash printf "\n\n------------------------------ FINAL PREBUILD CONFIGURATION ---------------------------------\n"; set -e # Setup Script Variables srcdir=$1; CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../)} _SOURCE_REPO='https://gitlab.com/librewolf-community/browser/source.git'; _PKGVER_TAG="v${pkgver}-${pkgrel}" _SOURCE_TAG=${SOURCE_TAG:-${_PKGVER_TAG}} _SOURCE_REPO_DIR="${CI_PROJECT_DIR}"/source _PATCHES_DIR="${_SOURCE_REPO_DIR}"/patches _MOZBUILD=$srcdir/../mozbuild mkdir -p ${_MOZBUILD} # Copy Source Code Changes to Source Code printf "\nCopying branding and source code changes to firefox source code\n"; git clone $_SOURCE_REPO ${_SOURCE_REPO_DIR} cd ${_SOURCE_REPO_DIR} git checkout ${_SOURCE_TAG} cd .. cp -r ${_SOURCE_REPO_DIR}/themes/browser $srcdir/; cd $srcdir cat >${CI_PROJECT_DIR}/mozconfig <> ${CI_PROJECT_DIR}/mozconfig fi if [[ $CARCH == 'aarch64' ]]; then cat >>${CI_PROJECT_DIR}/mozconfig <>${CI_PROJECT_DIR}/mozconfig <= 24 patch patch -Np1 -i "${CI_PROJECT_DIR}/deb_patches/fix-ftbfs-newer-cbindgen.patch" # Remove some pre-installed addons that might be questionable patch -Np1 -i ${_PATCHES_DIR}/remove_addons.patch # Debian patch to enable global menubar # if [[ ! -z "${GLOBAL_MENUBAR}" ]];then # patch -Np1 -i ${_PATCHES_DIR}/unity-menubar.patch # fi # experimentally re-included patch -Np1 -i ${_PATCHES_DIR}/unity-menubar.patch patch -Np1 -i ${_PATCHES_DIR}/mozilla-kde_after_unity.patch # Disabling Pocket printf "\nDisabling Pocket\n"; patch -Np1 -i "${_PATCHES_DIR}/sed-patches/disable-pocket.patch" # More patches patch -Np1 -i "${_PATCHES_DIR}/context-menu.patch" patch -Np1 -i "${_PATCHES_DIR}/urlbarprovider-interventions.patch" # Remove Internal Plugin Certificates patch -Np1 -i "${_PATCHES_DIR}/sed-patches/remove-internal-plugin-certs.patch" # allow SearchEngines option in non-ESR builds patch -Np1 -i "${_PATCHES_DIR}/sed-patches/allow-searchengines-non-esr.patch" # remove search extensions (experimental) # patch -Np1 -i "${_PATCHES_DIR}/search-config.patch" cp "${_SOURCE_REPO_DIR}/assets/search-config.json" services/settings/dumps/main/search-config.json # stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10) patch -Np1 -i "${_PATCHES_DIR}/sed-patches/stop-undesired-requests.patch" # change some hardcoded directory strings that could lead to unnecessarily # created directories patch -Np1 -i ${_PATCHES_DIR}/mozilla_dirs.patch # somewhat experimental patch to fix bus/dbus/remoting names to io.gitlab.librewolf # should not break things, buuuuuuuuuut we'll see. patch -Np1 -i ${_PATCHES_DIR}/dbus_name.patch # add v100 about dialog patch -Np1 -i ${_PATCHES_DIR}/aboutLogos.patch # allow uBlockOrigin to run in private mode by default, without user intervention. patch -Np1 -i ${_PATCHES_DIR}/allow-ubo-private-mode.patch # add custom uBO assets (on first launch only) patch -Np1 -i ${_PATCHES_DIR}/custom-ubo-assets-bootstrap-location.patch # patch -Np1 -i ${_PATCHES_DIR}/faster-package-multi-locale.patch # ui patches # 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. patch -Np1 -i ${_PATCHES_DIR}/ui-patches/pref-naming.patch # patch -Np1 -i ${_PATCHES_DIR}/ui-patches/handlers.patch # patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remap-links.patch # patch -Np1 -i ${_PATCHES_DIR}/ui-patches/hide-default-browser.patch # Add LibreWolf logo to Debugging Page patch -Np1 -i ${_PATCHES_DIR}/ui-patches/lw-logo-devtools.patch # patch -Np1 -i ${_PATCHES_DIR}/ui-patches/privacy-preferences.patch # remove firefox references in the urlbar, when suggesting opened tabs. patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remove-branding-urlbar.patch # remove cfr UI elements, as they are disabled and locked already. patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remove-cfrprefs.patch # do not display your browser is being managed by your organization in the settings. patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remove-organization-policy-banner.patch # hide "snippets" section from the home page settings, as it was already locked. patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remove-snippets-from-home.patch # add warning that sanitizing exceptions are bypassed by the options in History > Clear History when LibreWolf closes > Settings patch -Np1 -i ${_PATCHES_DIR}/ui-patches/sanitizing-description.patch # add patch to hide website appearance settings patch -Np1 -i ${_PATCHES_DIR}/ui-patches/website-appearance-ui-rfp.patch # pref pane patch -Np1 -i ${_PATCHES_DIR}/librewolf-pref-pane.patch # fix telemetry removal, see https://gitlab.com/librewolf-community/browser/linux/-/merge_requests/17, for example patch -Np1 -i ${_PATCHES_DIR}/disable-data-reporting-at-compile-time.patch # allows hiding the password manager (from the lw pref pane) / via a pref patch -Np1 -i ${_PATCHES_DIR}/hide-passwordmgr.patch rm -rf source