diff --git a/waterfox/browser/installer/linux/debian/changelog.in b/waterfox/browser/installer/linux/debian/changelog.in new file mode 100644 index 000000000000..53bf99b349c0 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/changelog.in @@ -0,0 +1,4 @@ +${PKG_NAME} (${PKG_VERSION}) UNRELEASED; urgency=low + * Automated repackaging for ${PKG_VERSION} + + -- Alex Kontos ${CHANGELOG_DATE} diff --git a/waterfox/browser/installer/linux/debian/compat b/waterfox/browser/installer/linux/debian/compat new file mode 100644 index 000000000000..9a037142aa3c --- /dev/null +++ b/waterfox/browser/installer/linux/debian/compat @@ -0,0 +1 @@ +10 \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/control.in b/waterfox/browser/installer/linux/debian/control.in new file mode 100644 index 000000000000..6942868ae4a8 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/control.in @@ -0,0 +1,14 @@ +Source: ${PKG_NAME} +Section: web +Priority: optional +Maintainer: BrowserWorks +Standards-Version: 4.6.2 +Build-Depends: debhelper (>= 9) +Homepage: https://www.waterfox.net + +Package: ${PKG_NAME} +Architecture: ${ARCH_NAME} +Depends: ${DEPENDS} +Recommends: curl | wget, gnupg, ca-certificates +Provides: gnome-www-browser, www-browser +Description: ${DESCRIPTION} diff --git a/waterfox/browser/installer/linux/debian/dirs b/waterfox/browser/installer/linux/debian/dirs new file mode 100644 index 000000000000..3c292ce6bc85 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/lib/waterfox \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/install.in b/waterfox/browser/installer/linux/debian/install.in new file mode 100644 index 000000000000..881cb12506d3 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/install.in @@ -0,0 +1,2 @@ +waterfox/* ${PKG_INSTALL_PATH} +debian/${PKG_NAME}.desktop usr/share/applications diff --git a/waterfox/browser/installer/linux/debian/links.in b/waterfox/browser/installer/linux/debian/links.in new file mode 100644 index 000000000000..9306f8cce705 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/links.in @@ -0,0 +1,12 @@ +${PKG_INSTALL_PATH}/waterfox usr/bin/${PKG_NAME} +${PKG_INSTALL_PATH}/waterfox usr/bin/waterfox +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default16.png usr/share/icons/hicolor/16x16/apps/${PKG_NAME}.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default32.png usr/share/icons/hicolor/32x32/apps/${PKG_NAME}.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default48.png usr/share/icons/hicolor/48x48/apps/${PKG_NAME}.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default64.png usr/share/icons/hicolor/64x64/apps/${PKG_NAME}.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default128.png usr/share/icons/hicolor/128x128/apps/${PKG_NAME}.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default16.png usr/share/icons/hicolor/16x16/apps/waterfox.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default32.png usr/share/icons/hicolor/32x32/apps/waterfox.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default48.png usr/share/icons/hicolor/48x48/apps/waterfox.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default64.png usr/share/icons/hicolor/64x64/apps/waterfox.png +${PKG_INSTALL_PATH}/browser/chrome/icons/default/default128.png usr/share/icons/hicolor/128x128/apps/waterfox.png \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/manpage.1.in b/waterfox/browser/installer/linux/debian/manpage.1.in new file mode 100644 index 000000000000..4c8bf79e310c --- /dev/null +++ b/waterfox/browser/installer/linux/debian/manpage.1.in @@ -0,0 +1,90 @@ +.TH ${DISPLAY_NAME} 1 "${MANPAGE_DATE}" waterfox "Linux User's Manual" +.SH NAME +waterfox \- ${DISPLAY_NAME} offers safe and easy web browsing +.SH SYNOPSIS +.B waterfox +[\fIOPTIONS\fR] [\fIURL\fR] + +.B /usr/lib/waterfox/waterfox +[\fIOPTIONS\fR] [\fIURL\fR] +.SH DESCRIPTION +\fB${DISPLAY_NAME}\fR is an open-source web browser, designed for standards +compliance, performance, privacy, and portability. It supports a wide range +of modern web technologies and extensions. +.SH USAGE +If there is a \fB${DISPLAY_NAME}\fR browser already running, invoking +\fBwaterfox\fR will arrange for it to create a new browser window; otherwise +it will start a new instance. +.SH OPTIONS +A summary of commonly used options is included below. For the full list, +run \fBwaterfox \-\-help\fR. +.SS "X11 options" +.TP +.BI \-\-display= DISPLAY +Use the specified X display. +.TP +.B \-\-sync +Make X calls synchronous. +.TP +.B \-\-no\-xshm +Do not use X shared memory extension. +.SS "Browser options" +.TP +.B \-h, \-\-help +Show summary of options and exit. +.TP +.B \-v, \-\-version +Print ${DISPLAY_NAME} version and exit. +.TP +\fB\-P\fR [\fIprofile\fR] +Start with \fIprofile\fR. When no profile is given, displays the Profile Manager. +This may require \fB\-\-no\-remote\fR. +.TP +.B \-ProfileManager +Start with Profile Manager. May require \fB\-\-no\-remote\fR. +.TP +.B \-\-no\-remote +Do not connect to a running ${DISPLAY_NAME} instance. Use with options that +would otherwise be sent to an existing process. +.TP +\fB\-\-new\-window\fR \fIURL\fR +Open \fIURL\fR in a new window. +.TP +\fB\-\-new\-tab\fR \fIURL\fR +Open \fIURL\fR in a new tab. +.TP +.B \-\-private\-window +Open a new private browsing window. +.TP +\fB\-\-safe\-mode\fR +Start ${DISPLAY_NAME} in Troubleshoot Mode (extensions disabled). +.TP +.B \-\-headless +Run without a visible UI (useful for testing/automation). +.TP +\fB\-\-Profile\fR \fIPATH\fR +Start with the profile located at \fIPATH\fR. +.SH ENVIRONMENT +.TP +.B MOZ_GDK_DISPLAY +When set, overrides the display passed down to GTK on X11-only builds. Normally +set by the parent process on launch with \fB\-\-display\fR. +.TP +.B MOZ_ENABLE_WAYLAND +Set to 1 to prefer Wayland backend on supported environments. +.SH FILES +.TP +\fI/usr/bin/waterfox\fR +Symbolic link to \fB/usr/lib/waterfox/waterfox\fR. +.TP +\fI/usr/lib/waterfox/waterfox\fR +${DISPLAY_NAME} executable. +.TP +\fI/usr/lib/waterfox/waterfox\-bin\fR +Legacy executable. +.SH BUGS +Report issues at \fIhttps://github.com/BrowserWorks/Waterfox/issues\fR. +.SH AUTHORS +.TP +.B BrowserWorks +.I https://www.waterfox.net diff --git a/waterfox/browser/installer/linux/debian/manpages.in b/waterfox/browser/installer/linux/debian/manpages.in new file mode 100644 index 000000000000..de88540d51ba --- /dev/null +++ b/waterfox/browser/installer/linux/debian/manpages.in @@ -0,0 +1 @@ +debian/${PKG_NAME}.1 \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/package-prefs.js b/waterfox/browser/installer/linux/debian/package-prefs.js new file mode 100644 index 000000000000..49ff6c84110b --- /dev/null +++ b/waterfox/browser/installer/linux/debian/package-prefs.js @@ -0,0 +1,27 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + * Package defaults for Waterfox (Debian repackaging). + * This file is installed into defaults/pref/package-prefs.js by the repackager. + * + * These preferences are intended for distribution-level defaults, not user + * settings. They can be overridden by user prefs in profiles. + */ + +/* Improve startup performance on multi-process by enabling the forkserver. */ +pref("dom.ipc.forkserver.enable", true); + +/* Disable in-app updates when installed via system packages. */ +pref("app.update.enabled", false); +pref("app.update.auto", false); +pref("app.update.autoInstallEnabled", false); +pref("app.update.staging.enabled", false); +pref("app.update.background.enabled", false); + +/* Optional distribution identifiers to help diagnostics. */ +pref("distribution.id", "waterfox-debian"); +pref("distribution.version", "1"); +pref("distribution.about", "Waterfox packaged for Debian"); diff --git a/waterfox/browser/installer/linux/debian/postinst.in b/waterfox/browser/installer/linux/debian/postinst.in new file mode 100644 index 000000000000..99078d5bb995 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/postinst.in @@ -0,0 +1,93 @@ +#!/bin/sh -e +# postinst script for Waterfox +# Sets system alternatives for x-www-browser and gnome-www-browser to Waterfox. + +set -e + +case "$$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + # Configure Waterfox apt source and keyring for self-updates + KEYRING="/usr/share/keyrings/waterfox-archive-keyring.gpg" + LIST_FILE="/etc/apt/sources.list.d/waterfox.list" + ARCH="$$(dpkg --print-architecture)" + + # Determine codename + if command -v lsb_release >/dev/null 2>&1; then + CODENAME="$$(lsb_release -sc)" + elif [ -r /etc/os-release ]; then + . /etc/os-release + CODENAME="$${VERSION_CODENAME:-}" + fi + [ -n "$$CODENAME" ] || CODENAME="bookworm" + + REPO_LINE="deb [arch=$${ARCH} signed-by=$${KEYRING}] https://pkg.waterfox.net/waterfox $${CODENAME} main" + + # Ensure keyring directory exists + mkdir -p "/usr/share/keyrings" || true + + # Install keyring if shipped as ASCII armor (optional) + # If the keyring is already installed by the package payload, this is a no-op. + if [ ! -s "$$KEYRING" ] && [ -r /usr/share/waterfox/waterfox.asc ]; then + if command -v gpg >/dev/null 2>&1; then + gpg --dearmor "$$KEYRING" || true + chmod 0644 "$$KEYRING" || true + fi + fi + + # Try to fetch keyring from pkg.waterfox.net if not bundled + if [ ! -s "$$KEYRING" ]; then + KEY_URL_GPG="https://pkg.waterfox.net/waterfox/waterfox-archive-keyring.gpg" + KEY_URL_ASC="https://pkg.waterfox.net/waterfox/waterfox.asc" + if command -v curl >/dev/null 2>&1; then + curl -fsSL "$$KEY_URL_GPG" -o "$$KEYRING" || true + if [ ! -s "$$KEYRING" ] && command -v gpg >/dev/null 2>&1; then + curl -fsSL "$$KEY_URL_ASC" | gpg --dearmor >"$$KEYRING" || true + fi + elif command -v wget >/dev/null 2>&1; then + wget -qO "$$KEYRING" "$$KEY_URL_GPG" || true + if [ ! -s "$$KEYRING" ] && command -v gpg >/dev/null 2>&1; then + wget -qO- "$$KEY_URL_ASC" | gpg --dearmor >"$$KEYRING" || true + fi + fi + chmod 0644 "$$KEYRING" || true + fi + + mkdir -p "$$(dirname "$$LIST_FILE")" + if [ -f "$$LIST_FILE" ]; then + if ! grep -qF "$$REPO_LINE" "$$LIST_FILE"; then + sed -i 's|^deb .*pkg\.waterfox\.net.*$$||' "$$LIST_FILE" || true + echo "$$REPO_LINE" >> "$$LIST_FILE" + fi + else + echo "$$REPO_LINE" > "$$LIST_FILE" + fi + + if command -v update-alternatives >/dev/null 2>&1; then + update-alternatives --install /usr/bin/gnome-www-browser \ + gnome-www-browser /usr/bin/${PKG_NAME} 100 \ + --slave /usr/share/man/man1/gnome-www-browser.1.gz \ + gnome-www-browser.1.gz /usr/share/man/man1/${PKG_NAME}.1.gz || true + + update-alternatives --install /usr/bin/x-www-browser \ + x-www-browser /usr/bin/${PKG_NAME} 100 \ + --slave /usr/share/man/man1/x-www-browser.1.gz \ + x-www-browser.1.gz /usr/share/man/man1/${PKG_NAME}.1.gz || true + fi + ;; +esac + +# Refresh icon cache if available +if [ -x /usr/bin/gtk-update-icon-cache ]; then + for dir in /usr/share/icons/hicolor; do + if [ -d "$$dir" ]; then + gtk-update-icon-cache -q "$$dir" || true + fi + done +fi + +# Update desktop database if available +if [ -x /usr/bin/update-desktop-database ]; then + update-desktop-database -q || true +fi + +exit 0 \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/postrm.in b/waterfox/browser/installer/linux/debian/postrm.in new file mode 100644 index 000000000000..e45434c569a9 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/postrm.in @@ -0,0 +1,33 @@ +#!/bin/sh -e +# postrm script for Waterfox +# Refreshes desktop and icon caches after removal/purge. + +set -e + +case "$$1" in + remove|purge|disappear) + # Refresh icon cache if available + if [ -x /usr/bin/gtk-update-icon-cache ]; then + if [ -d /usr/share/icons/hicolor ]; then + /usr/bin/gtk-update-icon-cache -q /usr/share/icons/hicolor || true + fi + fi + + # Refresh desktop database if available + if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q || true + fi + + # If purging, remove Waterfox apt source and keyring + if [ "$$1" = "purge" ]; then + rm -f /etc/apt/sources.list.d/waterfox.list || true + rm -f /usr/share/keyrings/waterfox-archive-keyring.gpg || true + fi + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade) + # Nothing to do for these actions + ;; +esac + +exit 0 \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/prerm.in b/waterfox/browser/installer/linux/debian/prerm.in new file mode 100644 index 000000000000..20bd15284451 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/prerm.in @@ -0,0 +1,23 @@ +#!/bin/sh -e +# prerm script for Waterfox +# Cleans up system alternatives when removing the package. + +set -e + +case "$$1" in + remove|deconfigure) + if command -v update-alternatives >/dev/null 2>&1; then + # Remove Waterfox alternatives registrations if present + update-alternatives --remove x-www-browser /usr/bin/${PKG_NAME} || true + update-alternatives --remove gnome-www-browser /usr/bin/${PKG_NAME} || true + fi + ;; + upgrade) + # Nothing to do on upgrade + ;; + failed-upgrade|abort-install|abort-upgrade) + # Nothing to do on failed/aborted operations + ;; +esac + +exit 0 \ No newline at end of file diff --git a/waterfox/browser/installer/linux/debian/rules b/waterfox/browser/installer/linux/debian/rules new file mode 100644 index 000000000000..9f6a4920be74 --- /dev/null +++ b/waterfox/browser/installer/linux/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# Waterfox Debian packaging rules (debhelper, simple dh sequence) +# This package repackages prebuilt binaries; we skip build/test stages. + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ + +# Avoid touching .xpi files for reproducibility (they are already signed/packed) +override_dh_strip_nondeterminism: + dh_strip_nondeterminism -Xxpi + +# Skip auto configure/build/test — binaries are prebuilt +override_dh_auto_configure override_dh_auto_build override_dh_auto_test: + @echo "Skipping auto-configure/build/test (prebuilt binaries)." + +# Do not run dh_auto_install; installation is driven by debian/install +override_dh_auto_install: + @echo "Skipping dh_auto_install; using dh_install mappings." + : + +# Perform file installation via debian/install and symlinks via debian/links +override_dh_install: + dh_install diff --git a/waterfox/browser/installer/linux/debian/waterfox.desktop b/waterfox/browser/installer/linux/debian/waterfox.desktop new file mode 100644 index 000000000000..bc3455b390dc --- /dev/null +++ b/waterfox/browser/installer/linux/debian/waterfox.desktop @@ -0,0 +1,23 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Waterfox +GenericName=Web Browser +Comment=Browse the World Wide Web +Exec=waterfox %u +Icon=waterfox +Terminal=false +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json; +StartupNotify=true +StartupWMClass=waterfox +Keywords=Internet;WWW;Browser;Web;Explorer; +Actions=new-window;new-private-window; + +[Desktop Action new-window] +Name=New Window +Exec=waterfox --new-window %u + +[Desktop Action new-private-window] +Name=New Private Window +Exec=waterfox --private-window %u