summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/prep-librewolf-dpkg.conf9
-rwxr-xr-xscripts/prep-librewolf-dpkg.sh118
2 files changed, 70 insertions, 57 deletions
diff --git a/scripts/prep-librewolf-dpkg.conf b/scripts/prep-librewolf-dpkg.conf
index 97d05e9..434d8dc 100644
--- a/scripts/prep-librewolf-dpkg.conf
+++ b/scripts/prep-librewolf-dpkg.conf
@@ -4,12 +4,11 @@
# Available options for DISTRO: ubuntu debian
DISTRO=${DISTRO:-'debian'}
# current version of Firefox package in target distro
-distro_firefox_version=${distro_firefox_version:-'95.0.1-1'}
+distro_firefox_version=${distro_firefox_version:-'96.0.1-1'}
# current version of Firefox, as defined by name of the orig tarball.
-firefox_version=${firefox_version:-'95.0.1'}
-# Tag for LibreWolf common and linux repos
-librewolf_version=${librewolf_version:-'95.0.2-1'}
-lw_common_version=${librewolf_version:-'95.0.1-1'}
+firefox_version=${firefox_version:-'96.0.1'}
+# Tag for LibreWolf linux repo
+librewolf_version=${librewolf_version:-'96.0.1-1'}
settings_commit=${settings_commit:-'master'}
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../)}
output_dir=${CI_PROJECT_DIR}/out
diff --git a/scripts/prep-librewolf-dpkg.sh b/scripts/prep-librewolf-dpkg.sh
index bebac15..9b827d1 100755
--- a/scripts/prep-librewolf-dpkg.sh
+++ b/scripts/prep-librewolf-dpkg.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# File: prep-librewolf-dpkg.sh
# Location: https://gitlab.com/bgstack15/librewolf-linux.git
-# Latest supported version: librewolf-85.0-1
+# Latest supported version: librewolf-96.0-1
# Author: bgstack15
# SPDX-License-Identifier: CC-BY-SA-4.0
# Startdate: 2020-11-29
@@ -9,6 +9,7 @@
# Purpose: Prepare initial assets for running "dpkg-buildpackage -b -us -uc" for LibreWolf by adapting distro Firefox assets
# History:
# 2021-03-10 add initial Ubuntu support
+# 2022-01-18 modified to use "source" repo instead of "common" for version 96.0.1
# Usage:
# Can send these final assets up to Open Build Service
# References:
@@ -28,7 +29,7 @@ test -z "${librewolf_dpkg_conf}" && export librewolf_dpkg_conf="$( find "$( dirn
test ! -r "${librewolf_dpkg_conf}" && { echo "Unable to load config file, which should be named the same as this script but with a .conf ending. Aborted." 1>&2 ; exit 1 ; }
. "${librewolf_dpkg_conf}"
-librewolf_common_url=https://gitlab.com/librewolf-community/browser/common.git
+librewolf_source_url=https://gitlab.com/librewolf-community/browser/source.git
librewolf_settings_url=https://gitlab.com/librewolf-community/settings.git
librewolf_linux_url=https://gitlab.com/librewolf-community/browser/linux.git
@@ -82,8 +83,7 @@ test -z "${SKIP_EXTRACT}" && {
# test -z "${SKIP_GIT}" && (
# yes, use a sub-shell because of this cd. pushd is a bash builtin, but we are using sh and not bash.
# cd "${git_source_dir}"
- lw_cv="${lw_common_version}" ; test -z "${lw_cv}" && lw_cv=${librewolf_version}
- git clone "${librewolf_common_url}" ${git_source_dir}/common || : ; ( cd "${git_source_dir}/common" ; git checkout master ; git pull ; git checkout "v${lw_cv}" ; )
+ git clone "${librewolf_source_url}" ${git_source_dir}/source || : ; ( cd "${git_source_dir}/source" ; git checkout main ; git pull ; )
git clone "${librewolf_settings_url}" ${git_source_dir}/settings || : ; ( cd "${git_source_dir}/settings" ; git checkout master ; git pull ; )
git clone "${librewolf_linux_url}" ${git_source_dir}/linux || : ; ( cd "${git_source_dir}/linux" ; git checkout master ; git pull ; git checkout "v${librewolf_version}" ; )
@@ -119,7 +119,9 @@ EOF
# overlay the orig tarball contents with LibreWolf contents
# LibreWolf branding
-cp -pr "${git_source_dir}"/common/source_files/browser/branding "${source_dir}"/browser/
+cp -pr "${git_source_dir}"/source/themes/browser/base \
+ "${git_source_dir}"/source/themes/browser/branding \
+ "${source_dir}"/browser/
# update mozconfig with needed info
sed -i -e '/with-app-name=/d' "${debian_dir}${_mozconfig}"
cat <<EOF >> "${debian_dir}${_mozconfig}"
@@ -127,19 +129,19 @@ cat <<EOF >> "${debian_dir}${_mozconfig}"
# Start of LibreWolf effects
ac_add_options --disable-tests
ac_add_options --disable-debug
+ac_add_options --disable-default-browser-agent
ac_add_options --prefix=/usr
-ac_add_options --enable-release
ac_add_options --enable-hardening
ac_add_options --enable-rust-simd
-# Branding ac_add_options --enable-update-channel=release
+# Branding
ac_add_options --with-app-name=librewolf
ac_add_options --with-app-basename=LibreWolf
ac_add_options --with-branding=browser/branding/librewolf
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
-ac_add_options --with-unsigned-addon-scopes=app,system
-ac_add_options --allow-addon-sideload
+
+export MOZ_REQUIRE_SIGNING=
# Features
ac_add_options --enable-jack
@@ -150,6 +152,7 @@ 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
+#ac_add_options --with-wasi-sysroot=\$HOME/.mozbuild/wrlb/wasi-sysroot
EOF
test "$( uname -p )" = "x86_64" && { echo "ac_add_options --disable-elf-hack" >> "${debian_dir}${_mozconfig}" ; }
@@ -194,50 +197,61 @@ librewolf/stop-undesired-requests.patch -p1
librewolf/about-dialog.patch -p1
EOF
else
- cp -pr "${git_source_dir}"/common/patches/megabar.patch \
- "${git_source_dir}"/common/patches/remove_addons.patch \
- "${git_source_dir}"/common/patches/mozilla-vpn-ad.patch \
- "${git_source_dir}"/common/patches/sed-patches/disable-pocket.patch \
- "${git_source_dir}"/common/patches/context-menu.patch \
- "${git_source_dir}"/common/patches/browser-confvars.patch \
- "${git_source_dir}"/common/patches/urlbarprovider-interventions.patch \
- "${git_source_dir}"/common/patches/sed-patches/remove-internal-plugin-certs.patch \
- "${git_source_dir}"/common/patches/sed-patches/allow-searchengines-non-esr.patch \
- "${git_source_dir}"/common/patches/sed-patches/stop-undesired-requests.patch \
- "${git_source_dir}"/common/patches/about-dialog.patch \
- "${git_source_dir}"/linux/deb_patches/*.patch \
- "${git_source_dir}"/common/patches/mozilla_dirs.patch \
- "${git_source_dir}"/common/patches/allow-ubo-private-mode.patch \
- "${git_source_dir}"/common/patches/ui-patches/*.patch \
+ cp -pr $( sed -r "${git_source_dir}"/source/assets/patches.txt -e "s@^@/home/librewolf/debian/git/source/@" ) \
"${debian_dir}"/patches/librewolf/
- cat <<EOF >> "${debian_dir}"/patches/series
-librewolf/armhf-reduce-linker-memory-use.patch -p1
-librewolf/fix-armhf-webrtc-build.patch -p1
-librewolf/webrtc-fix-compiler-flags-for-armhf.patch -p1
-librewolf/remove_addons.patch -p1
-librewolf/megabar.patch -p1
-librewolf/reduce-rust-debuginfo.patch -p1
-librewolf/mozilla-vpn-ad.patch -p1
-librewolf/disable-pocket.patch -p1
-librewolf/context-menu.patch -p1
-librewolf/browser-confvars.patch -p1
-librewolf/urlbarprovider-interventions.patch -p1
-librewolf/remove-internal-plugin-certs.patch -p1
-librewolf/allow-searchengines-non-esr.patch -p1
-librewolf/stop-undesired-requests.patch -p1
-librewolf/about-dialog.patch -p1
-librewolf/mozilla_dirs.patch -p1
-librewolf/allow-ubo-private-mode.patch -p1
-librewolf/add-language-warning.patch -p1
-librewolf/pref-naming.patch -p1
-librewolf/remove-branding-urlbar.patch -p1
-librewolf/remove-cfrprefs.patch -p1
-librewolf/remove-organization-policy-banner.patch -p1
-librewolf/remove-snippets-from-home.patch -p1
-librewolf/sanitizing-description.patch -p1
+ awk -F'/' '{print "librewolf/"$NF}' "${git_source_dir}"/source/assets/patches.txt | \
+ sed -r -e 's@$@ -p1@' >> "${debian_dir}"/patches/series
+ # remove xmas because it does the same tasks as what we accomplish in this script.
+ sed -i -r -e '/xmas\.patch/s/^/#/;' "${debian_dir}"/patches/series
+ # Fixes to the LibreWolf patches for version 96.0.1.
+ # remove_addons.patch will be fixed when https://gitlab.com/librewolf-community/browser/source/-/merge_requests/10
+ test -n "a" && patch -p1 "${debian_dir}/patches/librewolf/remove_addons.patch" <<EOF
+diff --git a/patches/remove_addons.patch b/patches/remove_addons.patch
+index a6585ed..3487f6d 100644
+--- a/patches/remove_addons.patch
++++ b/patches/remove_addons.patch
+@@ -13,7 +13,7 @@ index 269dcb2..ed7c31d 100644
+ - "report-site-issue",
+ "pictureinpicture",
+ "proxy-failover",
+- ]
++ "search-detection",
+ diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
+ index 496379c..dd6f359 100644
+ --- a/browser/locales/Makefile.in
EOF
- # Fixes to the LibreWolf patches for version 95.0.1
- # None yet
+ # just for the dpkg, because of dpkg changes to the moz.build
+ test -n "a" && patch -p1 "${debian_dir}"/patches/librewolf/xmas.patch <<EOF
+diff --git a/patches/xmas.patch b/patches/xmas.patch
+index 8d5103c..39861c3 100644
+--- a/patches/xmas.patch
++++ b/patches/xmas.patch
+@@ -35,8 +35,8 @@ diff --git a/moz.build b/moz.build
+ index 41c9ad7..046e01b 100644
+ --- a/moz.build
+ +++ b/moz.build
+-@@ -202,3 +202,5 @@ SPHINX_TREES["metrics"] = "docs/metrics"
+- SPHINX_TREES["gtest"] = "docs/gtest"
++@@ -205,3 +205,5 @@
++ DIRS += ["debian/extra-stuff"]
+
+ include("build/templates.mozbuild")
+ +
+EOF
+
+ # Fixes for Debian Firefox? 96.0.1
+ # there's probably a better way to do this with pip, but I don't know it.
+ # Basically, we are updating importlib_metadata and attrs to min needed because
+ # somehow they're wrong in the orig.tar.xz.
+ pip3 install --target "${source_dir}"/third_party/python attrs importlib_metadata
+ cd "${source_dir}"/third_party/python
+ for word in attrs importlib_metadata zipp ;
+ do
+ # yes, move importlib_metadata-4.10.1.dist-info/ to inside importlib_metadata/
+ # we could not just loop the pip3 command because zipp is dragged in by importlib_metadata.
+ mv -f "${word}"-* "${word}"/ || :
+ done
+ cd "${OLDPWD}"
fi
# observe that build-with-libstdc++-7 is disabled for this dpkg. Debian builds Firefox with gcc, not clang.
@@ -293,7 +307,7 @@ rm -rf "${debian_dir}"/librewolf_settings
cp -pr "${git_source_dir}"/settings "${debian_dir}"/librewolf_settings
rm -rf "${debian_dir}"/librewolf_settings/.git*
-cp -p "${git_source_dir}"/common/source_files/search-config.json "${debian_dir}"/
+cp -p "${git_source_dir}"/source/assets/search-config.json "${debian_dir}"/
sed -i -r "${debian_dir}"/rules \
-e '/override_dh_auto_configure/a\ cp -pf debian/search-config.json services/settings/dumps/main/'
bgstack15