diff options
-rwxr-xr-x | scripts/prep-librewolf-dpkg.sh | 84 |
1 files changed, 57 insertions, 27 deletions
diff --git a/scripts/prep-librewolf-dpkg.sh b/scripts/prep-librewolf-dpkg.sh index 30a574a..ecf4b6f 100755 --- a/scripts/prep-librewolf-dpkg.sh +++ b/scripts/prep-librewolf-dpkg.sh @@ -177,16 +177,46 @@ if test "${DISTRO}" = "ubuntu" ; then 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/search-config.patch \ + "${git_source_dir}"/common/patches/sed-patches/stop-undesired-requests.patch \ + "${git_source_dir}"/common/patches/allow_dark_preference_with_rfp.patch \ + "${git_source_dir}"/common/patches/about-dialog.patch \ "${debian_dir}"/patches/librewolf/ cat <<EOF >> "${debian_dir}"/patches/series librewolf/remove_addons.patch -p1 librewolf/megabar.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/search-config.patch -p1 +librewolf/stop-undesired-requests.patch -p1 +librewolf/allow_dark_preference_with_rfp.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/search-config.patch \ + "${git_source_dir}"/common/patches/sed-patches/stop-undesired-requests.patch \ + "${git_source_dir}"/common/patches/allow_dark_preference_with_rfp.patch \ + "${git_source_dir}"/common/patches/about-dialog.patch \ "${git_source_dir}"/linux/deb_patches/*.patch \ "${debian_dir}"/patches/librewolf/ cat <<EOF >> "${debian_dir}"/patches/series @@ -198,33 +228,21 @@ 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/search-config.patch -p1 +librewolf/stop-undesired-requests.patch -p1 +librewolf/allow_dark_preference_with_rfp.patch -p1 +librewolf/about-dialog.patch -p1 EOF fi # observe that build-with-libstdc++-7 is disabled for this dpkg. Debian builds Firefox with gcc, not clang. -# additional main LibreWolf activities -# disable pocket in source -sed -i "/\"pocket\"/d" "${source_dir}"/browser/components/moz.build -sed -i "/SaveToPocket\.init/d" "${source_dir}"/browser/components/BrowserGlue.jsm -# Remove internal plugin certificates -sed -i -r -e '/organizationalUnit.{0,5}=.{0,5}Mozilla/{N;N;N;d}' "${source_dir}"/toolkit/mozapps/extensions/internal/XPIInstall.jsm -# allow SearchEngines option in non-ESR builds -sed -i -r -e '/enterprise_only/s#true#false#g;' "${source_dir}"/browser/components/enterprisepolicies/schemas/policies-schema.json -# stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10) -_settings_services_sed='s#firefox.settings.services.mozilla.com#f.s.s.m.c.qjz9zk#g' -sed "$_settings_services_sed" -i "${source_dir}"/browser/components/newtab/data/content/activity-stream.bundle.js -sed "$_settings_services_sed" -i "${source_dir}"/modules/libpref/init/all.js -sed "$_settings_services_sed" -i "${source_dir}"/services/settings/Utils.jsm -sed "$_settings_services_sed" -i "${source_dir}"/toolkit/components/search/SearchUtils.jsm - -# Remove Internal Plugin Certificates -_cert_sed="s#if (aCert.organizationalUnit == \"Mozilla [[:alpha:]]\+\") {\n" -_cert_sed="${_cert_sed}[[:blank:]]\+return AddonManager\.SIGNEDSTATE_[[:upper:]]\+;\n" -_cert_sed="${_cert_sed}[[:blank:]]\+}#" -_cert_sed="${_cert_sed}// NOTE: removed#g" -sed -z "$_cert_sed" -i "${source_dir}"/toolkit/mozapps/extensions/internal/XPIInstall.jsm - ##################################### # Script 4 tasks @@ -279,17 +297,29 @@ rm -rf "${debian_dir}"/librewolf_settings/.git* if test "${DISTRO}" = "debian" ; then cat <<EOF >> "${debian_dir}"/browser.install.in -debian/librewolf_settings/librewolf.cfg usr/lib/@browser@ -debian/librewolf_settings/defaults usr/lib/@browser@ -debian/librewolf_settings/distribution usr/share/@browser@ + +debian/librewolf_settings/@browser@.cfg usr/share/@browser@/@browser@.cfg +debian/librewolf_settings/defaults/pref/local-settings.js usr/share/@browser@/defaults/pref/local-settings.js +debian/librewolf_settings/distribution/policies.json usr/share/@browser@/distribution/policies.json EOF + cat <<EOF >> "${debian_dir}"/browser.links.in + +/usr/share/distribution/policies.json usr/lib/@browser@/distribution/policies.json +/usr/share/@browser@/defaults/pref/local-settings.js usr/lib/@browser@/defaults/pref/local-settings.js +/usr/share/@browser@/@browser@.cfg /usr/lib/@browser@/@browser@.cfg +EOF + +# somewhat of a brute force approach - should help having everything everywhere, though +sed -e 's#/usr/share/@browser@/distribution /usr/lib/@browser@/distribution##' -i "${debian_dir}"/browser.links.in + else cat <<EOF >> "${debian_dir}"/firefox.install.in + debian/librewolf_settings/librewolf.cfg @MOZ_LIBDIR@/ -debian/librewolf_settings/defaults @MOZ_LIBDIR@/ -debian/librewolf_settings/distribution @MOZ_LIBDIR@/ +debian/librewolf_settings/defaults/pref/local-settings.js @MOZ_LIBDIR@/defaults/pref/local-settings.js +debian/librewolf_settings/distribution/policies.json @MOZ_LIBDIR@/distribution/policies.json EOF fi |