No description
Find a file
2025-08-29 19:51:33 +02:00
spitfire Switched packaging from .tar.gz to .tar.xz using built-in mach package 2025-08-29 19:51:33 +02:00
.gitignore Fixed builds on windows, again >:( 2025-07-16 13:10:43 +02:00
go.mod Switched packaging from .tar.gz to .tar.xz using built-in mach package 2025-08-29 19:51:33 +02:00
go.sum Switched packaging from .tar.gz to .tar.xz using built-in mach package 2025-08-29 19:51:33 +02:00
main.go Switched packaging from .tar.gz to .tar.xz using built-in mach package 2025-08-29 19:51:33 +02:00
README.md Added --extra-mozconfig flag 2025-08-28 22:28:29 +02:00

Logo

Spitfire Builder

This is a "simple" script for building the Spitfire Browser based on Mozilla Firefox source code.

Project Overview

Spitfire Builder is an automation toolchain for producing customized builds of the Spitfire Browser (a fork of Mozilla Firefox).
It handles the entire build process, including:

  • Source management - clone, update, and clean the upstream Mozilla repository.
  • Patching - apply Spitfire branding, configuration, and optional custom .mozconfig flags through a patching system.
  • Compilation - configure and build for different platforms and architectures.
  • Packaging - compress build artifacts into distributable archives.
  • Deployment - upload releases to SourceForge and update the projects APPINDEX metadata.

By consolidating these steps into a single script, Spitfire Builder reduces manual work, ensures consistent builds, and makes it easy to produce nightly or release versions of Spitfire Browser.

Dependencies

  • Mercurial (hg)
  • Git
  • Golang (tested with v1.21)
  • Python 3.11 and pip3

Flags

Below is a detailed description of all the flags supported by the Spitfire Builder script:

General

  • -h, --help
    Show help and exit.

Build process

  • -a, --all
    Run full flow: clone/update, discard changes, clean, apply pre-patche, configure, build, resolve build dir, apply post-patches. (No upload unless you also pass --upload.)
  • -b, --build
    Build only (plus optional pre/post patch steps if you pass --pre-patch / --post-patch).
  • -u, --update
    Clone (if missing) and update the Mozilla repo.
  • --clean
    Revert uncommitted changes without removing build artifacts.
  • --full-clean
    Full clobber of build artifacts.
  • --pre-patch
    Apply pre-compile patches to source.
  • --post-patch
    Apply post-compile patches to built output.
  • --skip-patch-update
    Don't fetch/reset the patches repo (use what's already cloned).
  • --extra-mozconfig="<lines>"
    Extra .mozconfig lines to inject via a local patch after all standard pre-patches and before configure/build.
    Accepts semicolon (;) or newline separators. Lines are written into a patch targeting .mozconfig.
  • -r, --run
    Run the built project after a successful build.
  • --skip-deps
    Skip system dependency checks.
  • --ignore-errors
    Keep going even if a step fails (errors are collected and printed at the end).

Compression & upload

  • -c, --compress
    Compress the target directory into a .tar.gz (used for release artifacts).
  • --upload
    Upload the compressed file to SourceForge (requires sourceforge_config.json).
  • --upload-path=<path>
    If set, compress/upload this path instead of the auto-detected build dir.

Customization & targeting

  • -t=<component-arch-release-platform>, --target=<...>
    Target tuple for naming/artifacts.
  • -v=<version>, --version=<version>
    Package version. For nightly, defaults to current date (YYYY.MM.DD).
  • --component=<name>
    Component name (default: browser).
  • --arch=<arch>
    Architecture (default: host arch, e.g. amd64).
  • --release=<type>
    Release channel (default: nightly).
  • --platform=<platform>
    Platform (default: host OS, e.g. linux, windows).
  • --work-dir=<path>
    Working directory (default: ./mozilla-release).

Example usage:

  • All build steps:
go run . -a
  • All build setps without fetching new patches:
go run . -a --skip-patch-update
  • Upload:
go run . --upload -c
  • Build and upload:
go run . --upload -c -a
  • Custom Mozbuild Flags (Example fix OOM by switching to ThinLTO and fewer jobs):
go run . -a \
 --extra-mozconfig='ac_add_options MOZ_LTO=thin; mk_add_options MOZ_MAKE_FLAGS=-j6; export RUSTFLAGS="-C codegen-units=8"'
  • Display all flags:
go run . -h

Config file for uploading example:

sourceforge_config.json

{
  "SFKeyPath": "~/.ssh/id_rsa.pub",
  "SFUser": "internet-addict",
  "SFHost": "web.sourceforge.net",
  "SFProject": "spitfire-browser"
}

APPINDEX example:

C:a6af7ebb5c1382084704be0b5714ab026c819d63
P:spitfire-browser
R:nightly
V:2024.12.23
A:amd64
S:838594187
I:3595780372
T:Spitfire
U:https://spitfirebrowser.xyz/
L:AGPL-3.0
o:browser
m:Internet Addict
t:1734949294
D:
p:linux
q:
d:https://downloads.sourceforge.net/project/spitfire-browser/browser/amd64/nightly/2024.12.23/browser-amd64-nightly-linux.tar.gz
I:https://weforge.xyz/Spitfire/Branding/raw/branch/main/active/browser/icon.svg
S:https://spitfirebrowser.xyz/static/images/screenshots/1.png
T:browser,experimental,testing
r: Automated Nightly build of Spitfire
c:a6af7ebb5c1382084704be0b5714ab026c819d63

Repository structure

Link to repository

spitfire-browser/
├── browser/
│   ├── amd64/
│   │   ├── stable/
│   │   │   ├── vx.x.x/deb.tar.gz
│   │   ├── nightly/
│   │       ├── yyyy-mm-dd/deb.tar.gz
│   ├── arm/
│   │   ├── stable/
│   │   │   ├── vx.x.x/
│   │   ├── nightly/
│   │       ├── yyyy-mm-dd/
├── luncher/
│   ├── stable/
│   │   ├── vx.x.x/
│   ├── nightly/
│       ├── yyyy-mm-dd/
├── installer/
│   ├── stable/
│   │   ├── vx.x.x/
│   ├── nightly/
│       ├── yyyy-mm-dd/
├── addons/ (planned)
│   ├── themes/
│   │   ├── stable/
│   │   │   ├── x.x.x/
│   │   ├── nightly/
│   │       ├── yyyy-mm-dd/
│   ├── custom-configs/
│   │   ├── stable/
│   │   │   ├── x.x.x/
│   │   ├── nightly/
│   │       ├── yyyy-mm-dd/
│   ├── search-engines/
│       ├── stable/
│       │   ├── x.x.x/
│       ├── nightly/
│           ├── yyyy-mm-dd/
├── APPINDEX