Skip to content

sbportal: Update to firefox version 78.9.0 #2103

Merged
merged 1 commit into from
May 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 194 additions & 19 deletions firefox_esr.be0
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
#!/bin/env beesh

# BEE_VERSION firefox_esr-45.9.0-1
# BEE_VERSION firefox_esr-78.9.0-0

#export BEE_TMP_TMPDIR=/dev/shm BEE_TMP_BUILDROOT=/dev/shm/bee-root BEE_MAKEFLAGS='-j80'

SRCURL[0]="https://ftp.mozilla.org/pub/firefox/releases/${PKGVERSION}${PKGEXTRANAME}/source/firefox-${PKGVERSION}${PKGEXTRANAME}.source.tar.xz"

mee_configure() {
bee_configure \
--enable-application=browser \
--disable-necko-wifi \
--enable-official-branding \
--without-system-icu \
--without-system-nspr \
--disable-dbus \
--disable-update \
--disable-crashreporter \
--disable-tests \
--enable-optimize \
--enable-safe-browsing

. /usr/local/package/lib/node.profile
. /pkg/rustc-1.50.0-0/profile

cat > ${S}/mozconfig <<-EOF
ac_add_options --enable-application=browser
ac_add_options --disable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --without-system-icu
ac_add_options --without-system-nspr
ac_add_options --disable-elf-hack
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-tests
ac_add_options --enable-optimize
mk_add_options MOZ_MAKE_FLAGS="${BEE_MAKEFLAGS}"
mk_add_options MOZ_OBJDIR=$B
unset MOZ_TELEMETRY_REPORTING
EOF
${S}/mach configure
}

mee_build() {
export CARGO_HOME=$B/.cargo
${S}/mach build
}

mee_build_post() {
Expand All @@ -40,10 +53,13 @@ mee_build_post() {
EOF
}

mee_install() {
DESTDIR=$D ${S}/mach install
}

mee_install_post() {
if [ "${PKGEXTRANAME}" = "esr" ] ; then
mv -v "${D}${BINDIR}/firefox" "${D}${BINDIR}/firefox${PKGEXTRANAME}${PKGVERSION[1]}"
mv -v "${D}${PREFIX}/local/bin/firefox" "${D}${PREFIX}/local/bin/firefox${PKGEXTRANAME}${PKGVERSION[1]}"
else
start_cmd install -d ${D}${LIBDIR}/mariux64
start_cmd mv ${D}${BINDIR}/${PKGNAME} ${D}${LIBDIR}/mariux64/${PKGNAME}
Expand All @@ -59,10 +75,6 @@ mee_install_post() {
done
fi

# remove unneeded firefox-devel

rm -r ${D}${LIBDIR}/firefox-devel-${PKGVERSION}

# install menu-entry

start_cmd mkdir -p ${D}${DATADIR}/applications
Expand All @@ -82,8 +94,171 @@ mee_install_post() {
mkdir -p \${HOME}
chmod 0700 \${HOME}

exec firefox${PKGEXTRANAME}${PKGVERSION[1]} -no-remote https://sbportal.sap.mpg.de/irj/portal
exec firefox${PKGEXTRANAME}${PKGVERSION[1]} -no-remote https://sbportal.sap.mpg.de/irj/portal/classic
EOF

chmod 755 ${D}/usr/local/bin/sbportal



cat <<-EOF >${D}${PREFIX}/local/lib/firefox/defaults/pref/autoconfig.js
// Any comment. You must start the file with a comment!
pref("general.config.filename", "default_config_mariux.cfg");
pref("general.config.obscure_value", 0);
EOF

cat <<-EOF >${D}${PREFIX}/local/lib/firefox/default_config_mariux.cfg
// Any comment. You must start the file with a comment!
pref("storage.nfs_filesystem", true);
pref("network.captive-portal-service.enabled",false);

// Don't show WhatsNew on first run after every update
pref("browser.startup.homepage_override.mstone","ignore");

//disable slowStartup Notification
pref("browser.slowStartup.notificationDisabled", true);
pref("browser.slowStartup.maxSamples", 0);
pref("browser.slowStartup.samples", 0);
pref("browser.rights.3.shown", true);
pref("startup.homepage_welcome_url", "");
pref("startup.homepage_welcome_url.additional", "");
pref("startup.homepage_override_url", "");
pref("browser.laterrun.enabled", false);
pref("browser.shell.checkDefaultBrowser", false);

//disable daily pings to Mozilla about extensions and recent startup
lockPref("extensions.getAddons.cache.enabled", false);

//disable sending the URL of the website where a plugin crashed
pref("dom.ipc.plugins.reportCrashURL", false);

//disable auto update for extensions
lockPref("extensions.update.autoUpdateDefault", false);

//disable about:addons' Get Add-ons panel (uses Google-Analytics)
pref("extensions.getAddons.showPane", false); // hidden pref
pref("extensions.webservice.discoverURL", "");

// Don't ask to install the Flash plugin
pref("plugins.notifyMissingFlash", false);

// Disable upload of health reports
lockPref("datareporting.healthreport.uploadEnabled", false);
//disable about:healthreport page (which connects to Mozilla for locale/css+js+json)
lockPref("datareporting.healthreport.about.reportUrl", "data:text/plain,");

// Disable all data upload (Telemetry and FHR)
lockPref("toolkit.telemetry.unified", false);
lockPref("toolkit.telemetry.enabled", false);
lockPref("toolkit.telemetry.server", "");
lockPref("toolkit.telemetry.newProfilePing.enabled", false);
lockPref("toolkit.telemetry.shutdownPingSender.enabled", false);
lockPref("toolkit.telemetry.updatePing.enabled", false);
lockPref("toolkit.telemetry.bhrPing.enabled", false);
lockPref("toolkit.telemetry.firstShutdownPing.enabled", false);
lockPref("toolkit.telemetry.cachedClientID", "");
lockPref("toolkit.telemetry.archive.enabled", false);
lockPref("datareporting.policy.dataSubmissionEnabled", false);
lockPref("browser.ping-centre.telemetry", false);

//disable "Snippets" (Mozilla content shown on about:home screen)
defaultPref("browser.aboutHomeSnippets.updateUrl", "https://127.0.0.1"); //test

//disable experiments https://wiki.mozilla.org/Telemetry/Experiments
defaultPref("experiments.enabled", false);
defaultPref("experiments.manifest.uri", "");
defaultPref("experiments.supported", false);
defaultPref("experiments.activeExperiment", false);
// disable Mozilla permission to silently opt you into tests
defaultPref("network.allow-experiments", false);

/* 0206: disable geographically specific results/search engines e.g. "browser.search.*.US"
* i.e. ignore all of Mozilla's various search engines in multiple locales ***/
defaultPref("browser.search.geoSpecificDefaults", false);
defaultPref("browser.search.geoSpecificDefaults.url", "");

/* 0503: disable Normandy/Shield [FF60+]
* Shield is an telemetry system (including Heartbeat) that can also push and test "recipes"
* [1] https://wiki.mozilla.org/Firefox/Shield
* [2] https://github.com/mozilla/normandy ***/
defaultPref("app.normandy.enabled", false);
defaultPref("app.normandy.api_url", "");

/* 0601: disable link prefetching
* [1] https://developer.mozilla.org/docs/Web/HTTP/Link_prefetching_FAQ ***/
defaultPref("network.prefetch-next", false);
/* 0602: disable DNS prefetching
* [1] https://www.ghacks.net/2013/04/27/firefox-prefetching-what-you-need-to-know/
* [2] https://developer.mozilla.org/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control ***/
defaultPref("network.dns.disablePrefetch", true);
defaultPref("network.dns.disablePrefetchFromHTTPS", true); // [HIDDEN PREF ESR] [DEFAULT: true FF70+]
/* 0603: disable predictor / prefetching ***/
defaultPref("network.predictor.enabled", false);
defaultPref("network.predictor.enable-prefetch", false); // [FF48+]

/* 0320: disable about:addons' Recommendations pane (uses Google Analytics) ***/
defaultPref("extensions.getAddons.showPane", false); // [HIDDEN PREF]

//disable pocket
defaultPref("extensions.pocket.enabled", false);

//disable flyweb https://flyweb.github.io/
pref("dom.flyweb.enabled", false);

//disable Shield https://wiki.mozilla.org/Firefox/Shield
lockPref("extensions.shield-recipe-client.enabled", false);
lockPref("extensions.shield-recipe-client.api_url", "");

//disable Follow on Search and Activity Stream
defaultPref("browser.newtabpage.activity-stream.enabled", false);
defaultPref("browser.library.activity-stream.enabled", false);

//disable link-mouseover opening connection to linked server
lockPref("network.http.speculative-parallel-limit", 0);

//disable pings (but enforce same host in case)
lockPref("browser.send_pings", false);
lockPref("browser.send_pings.require_same_host", true);

//disable location bar using search - PRIVACY
defaultPref("keyword.enabled", false);

//disable location bar domain guessing - PRIVACY/SECURITY
defaultPref("browser.fixup.alternate.enabled", false);

//display all parts of the url in the location bar - helps SECURITY
lockPref("browser.urlbar.trimURLs", false);

//disable location bar making speculative connections (FF56+)
lockPref("browser.urlbar.speculativeConnect.enabled", false);

//disable SSL session tracking test
defaultPref("security.ssl.disable_session_identifiers", true);

//disable SSL Error Reporting
defaultPref("security.ssl.errorReporting.automatic", false);
defaultPref("security.ssl.errorReporting.enabled", false);
defaultPref("security.ssl.errorReporting.url", "");

//disable the DNT HTTP header, which is essentially USELESS
defaultPref("privacy.donottrackheader.enabled", false);

//set max popups from a single non-click event - default is 20!
defaultPref("dom.popup_maximum", 3);

//limit events that can cause a popup default is "change click dblclick mouseup pointerup notificationclick reset submit touchend"
defaultPref("dom.popup_allowed_events", "click dblclick");

//enable Firefox's built-in PDF reader
defaultPref("pdfjs.disabled", false);

//session restore save time
defaultPref("browser.sessionstore.interval",150000);

//enable legacy extensions
defaultPref("extensions.legacy.enabled",true);

//disable firefox refresh request
defaultPref("browser.disableResetPrompt",true);
EOF
}