Skip to content

ArchiveBox/debian-archivebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchiveBox Debian Package

This repo builds the third-party archivebox .deb package.

The package intentionally does not translate ArchiveBox Python/plugin dependencies into Debian package dependencies. It is a thin apt wrapper around the normal Python install flow:

  1. apt installs /usr/bin/archivebox, /opt/archivebox/install.sh, a systemd unit, and a small package metadata file.
  2. postinstall reuses a suitable host uv when one is already installed, or installs uv into /opt/archivebox/uv as a fallback.
  3. uv resolves Python 3.13 from the host or its normal managed-Python location for the archivebox system user.
  4. uv pip install installs ArchiveBox into /opt/archivebox/venv.
  5. Runtime extractor/plugin dependencies remain managed by archivebox install.

Install

echo 'deb [trusted=yes] https://archivebox.github.io/debian-archivebox dev main' | sudo tee /etc/apt/sources.list.d/archivebox.list
sudo apt update
sudo apt install archivebox

Then initialize an archive:

mkdir -p ~/archivebox/data && cd ~/archivebox/data
archivebox init
sudo archivebox install
archivebox add 'https://example.com'

The package creates the archivebox system user and the state/config/runtime directories needed for systemd usage. Regular users can keep archives anywhere they own; sudo archivebox install installs runtime dependencies without leaving the collection owned by root.

The unsigned apt repo is the minimally viable install path. If signing is added later, users can switch from [trusted=yes] to a normal signed-by= keyring.

Build Locally

go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
./bin/build_deb.sh
sudo apt install ./dist/archivebox_*.deb

By default, bin/build_deb.sh packages the latest ArchiveBox/ArchiveBox:dev commit and stores that exact source archive URL in /opt/archivebox/package.env. Override the source when needed:

ARCHIVEBOX_REF=v0.9.34 ./bin/build_deb.sh
ARCHIVEBOX_PIP_SPEC='archivebox==0.9.34' DEB_VERSION='0.9.34' ./bin/build_deb.sh

Automation

.github/workflows/build.yml rebuilds from ArchiveBox:dev by:

  • workflow_dispatch for manual rebuilds
  • repository_dispatch with type archivebox-dev-updated
  • a scheduled poll every 30 minutes

The workflow publishes:

  • a prerelease named dev-<upstream-sha>
  • the updated apt repository on gh-pages

Before publishing, CI verifies the built package on an Ubuntu GitHub Actions runner by installing the .deb with apt, running the installed /usr/bin/archivebox as both root and a normal passwordless-sudo user, running full archivebox install flows for both, archiving a local fixture page as the normal user, and asserting that index.sqlite3 plus real files under archive/ are written to disk.

A push webhook or upstream workflow can trigger an immediate rebuild with:

gh api repos/ArchiveBox/debian-archivebox/dispatches \
  -f event_type=archivebox-dev-updated \
  -F client_payload[ref]=dev

Packages

 
 
 

Contributors

Languages