Packaging

GitHub Pages APT Repository

This repository publishes both the official website and the preview APT repository. The website is a human-readable portal; the APT repository is a machine-readable directory for apt. The machine path stays under /debian to preserve compatibility with the published lofibox.sources example.

Directory Layout

public/
  index.html
  assets/
  docs/
  zh/
  .nojekyll
  lofibox-archive-keyring.pgp
  debian/
    dists/trixie/...
    pool/...

User Install Entry

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://vicliu624.github.io/lofibox-apt/lofibox-archive-keyring.pgp \
  | sudo tee /etc/apt/keyrings/lofibox-archive-keyring.pgp >/dev/null

sudo tee /etc/apt/sources.list.d/lofibox.sources >/dev/null <<'EOF'
Types: deb
URIs: https://vicliu624.github.io/lofibox-apt/debian
Suites: trixie
Components: main
Architectures: amd64 arm64 armhf
Signed-By: /etc/apt/keyrings/lofibox-archive-keyring.pgp
EOF

Publishing Flow

The GitHub Actions workflow checks out lofibox-apt and LoFiBox-Zero, builds the Debian package, generates a signed APT repository with a GPG key, copies site/ into the same Pages artifact root, validates the website and APT boundaries, then deploys the artifact with GitHub Pages. The packaged application source is vicliu624/LoFiBox-Zero; this repository only publishes the portal and APT repository.

  1. Push to main for the default publishing flow, or manually trigger the Publish LoFiBox APT Repository workflow.
  2. Select source_ref, usually the LoFiBox-Zero main branch or a release tag.
  3. Select the suite; the current default is trixie.
  4. When preview_suffix is auto, the workflow generates a ~lofibox<run_number> suffix.
  5. The preview suffix deliberately sorts below the future official Debian version, so the workflow uses dch -b when applying it.
  6. The APT repository suite remains trixie, while the package changelog distribution is kept at unstable so Lintian sees a valid Debian upload target.
  7. Lintian runs with --profile debian because GitHub runners are Ubuntu hosts but the package is linted as Debian packaging.
  8. The repository publishes amd64, arm64, and Raspberry Pi ARMv6-compatible armhf packages. The armhf build is forced to ARMv6 hard-float flags and validated with ELF CPU attributes.
  9. The workflow builds packages, generates the repository, copies the website, validates public/, and deploys Pages.

APT CI Notes for 0.2.0

The push-triggered publishing path is publish-xbuild.yml. It is intentionally separate from the LoFiBox-Zero source CI: source CI validates the application tree, while apt CI rebuilds Debian packages, validates package metadata, signs the repository, and publishes the combined Pages artifact.

Repository Setup

In GitHub repository settings, set Pages to GitHub Actions and add the two Actions secrets below. Pushes to main publish from LoFiBox-Zero main with the default suite. Manual runs can still choose a specific LoFiBox-Zero ref.

Secrets

SecretUse
LOFIBOX_APT_GPG_PRIVATE_KEYImports the private key used for APT repository signing. ASCII-armored and base64-encoded private key material are both supported.
LOFIBOX_APT_GPG_KEY_IDSelects the signing key for aptly / gpg. A full fingerprint is recommended; if it does not match, the workflow falls back to the imported private-key fingerprint.

Preview the Website Locally

cd lofibox-apt
python3 -m http.server --directory site 8080
# open the local preview in a browser

Simulate the Pages Artifact Locally

scripts/stage-pages-site.sh --site site --output public
python3 -m http.server --directory public 8080
Boundary constraint: Do not put HTML pages into public/debian, and do not move the Debian pool into website assets. The website may link to the APT key and deb822 example, but it must not change the directory structure that apt clients depend on.