feat: Debian packaging files for Waterfox on Linux

This commit is contained in:
Alex Kontos
2025-09-15 16:05:58 +01:00
parent 3630520885
commit 8313f8f7f9
14 changed files with 350 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
${PKG_NAME} (${PKG_VERSION}) UNRELEASED; urgency=low
* Automated repackaging for ${PKG_VERSION}
-- Alex Kontos <MrAlex94@users.noreply.github.com> ${CHANGELOG_DATE}

View File

@@ -0,0 +1 @@
10

View File

@@ -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}

View File

@@ -0,0 +1,2 @@
usr/bin
usr/lib/waterfox

View File

@@ -0,0 +1,2 @@
waterfox/* ${PKG_INSTALL_PATH}
debian/${PKG_NAME}.desktop usr/share/applications

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1 @@
debian/${PKG_NAME}.1

View File

@@ -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");

View File

@@ -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 </usr/share/waterfox/waterfox.asc >"$$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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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