From aa65d098e10874d5ddb7056e2015c1bc9a6e13e9 Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Fri, 10 Apr 2020 01:20:14 +0200 Subject: [PATCH] Remove mozilla plugin certificates, fixes #112 Via `sed` instead of a patch, in the hope that it might be less of a maintenance burden compared to patch witch changes in the file to patch with subsequent upstream releases. Should only be merged once it's ensured there are no unforseen side effects when built with the Plugin Certificates removed. --- PKGBUILD | 7 +++++++ binary_tarball/scripts/3_Configure_Source_Code.sh | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index 27b91cc..e4b10ac 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -129,6 +129,13 @@ fi # this one only to remove an annoying error message: sed -i 's#SaveToPocket.init();#// SaveToPocket.init();#g' browser/components/BrowserGlue.jsm + # Remove Internal Plugin Certificates + _cert_sed='s#if (aCert.organizationalUnit == "Mozilla [[:alpha:]]\+") {\n' + _cert_sed+='[[:blank:]]\+return AddonManager\.SIGNEDSTATE_[[:upper:]]\+;\n' + _cert_sed+='[[:blank:]]\+}#' + _cert_sed+='// NOTE: removed#g' + sed -z "$_cert_sed" -i toolkit/mozapps/extensions/internal/XPIInstall.jsm + # allow SearchEngines option in non-ESR builds sed -i 's#"enterprise_only": true,#"enterprise_only": false,#g' browser/components/enterprisepolicies/schemas/policies-schema.json diff --git a/binary_tarball/scripts/3_Configure_Source_Code.sh b/binary_tarball/scripts/3_Configure_Source_Code.sh index 2c06643..08d31ed 100755 --- a/binary_tarball/scripts/3_Configure_Source_Code.sh +++ b/binary_tarball/scripts/3_Configure_Source_Code.sh @@ -128,5 +128,12 @@ sed -i "s/'pocket'/#'pocket'/g" browser/components/moz.build # this one only to remove an annoying error message: sed -i 's#SaveToPocket.init();#// SaveToPocket.init();#g' browser/components/BrowserGlue.jsm +# Remove Internal Plugin Certificates +_cert_sed='s#if (aCert.organizationalUnit == "Mozilla [[:alpha:]]\+") {\n' +_cert_sed+='[[:blank:]]\+return AddonManager\.SIGNEDSTATE_[[:upper:]]\+;\n' +_cert_sed+='[[:blank:]]\+}#' +_cert_sed+='// NOTE: removed#g' +sed -z "$_cert_sed" -i toolkit/mozapps/extensions/internal/XPIInstall.jsm + # allow SearchEngines option in non-ESR builds sed -i 's#"enterprise_only": true,#"enterprise_only": false,#g' browser/components/enterprisepolicies/schemas/policies-schema.json