3.1 KiB
deb metadata
Bootstrap script and shared documentation for the deb organization's APT repository on BJPHoster Gitea.
Quick setup
Run this one-liner on a Debian-based machine with Bash, curl and CA certificates installed:
curl -fsSL https://git.bjphoster.com/deb/.meta/raw/branch/main/setup.sh | bash
The script runs privileged commands directly when the effective UID is 0. Otherwise it uses sudo, which may prompt for your password. If sudo is unavailable, it exits with status 1 and prints manca sudo ed รจ necessario to standard error. Your account must be allowed to run the installation commands and apt update through sudo.
The script checks for apt, curl, install and mktemp, then:
- Downloads the registry's public signing key over HTTPS into a temporary directory.
- Creates
/etc/apt/keyringsand/etc/apt/sources.list.dif needed. - Installs the key as
/etc/apt/keyrings/bjphoster-deb.ascwith mode0644. - Writes
/etc/apt/sources.list.d/bjphoster-deb.listwith mode0644. - Runs
apt updateto refresh package indexes.
Temporary files are removed on exit. A failed command stops setup with a nonzero status. Files already installed remain in place if a later step fails. Running the script again replaces the same two files without appending duplicate entries. If you previously added this repository to a different source file, remove that duplicate entry yourself.
To inspect the script before running it:
curl -fsSL https://git.bjphoster.com/deb/.meta/raw/branch/main/setup.sh -o setup.sh
less setup.sh
bash setup.sh
Repository configuration
The source entry is:
deb [signed-by=/etc/apt/keyrings/bjphoster-deb.asc] https://git.bjphoster.com/api/packages/deb/debian stable main
stable is the registry's distribution name and main is its component. Use these values on supported Debian-based systems, regardless of the host's release codename. Each package still has its own architecture and operating system dependency requirements; adding the repository does not guarantee every package supports your machine.
The key is downloaded from:
https://git.bjphoster.com/api/packages/deb/debian/repository.key
signed-by limits this key to this source entry. Gitea generates the package indexes and signed release metadata from packages published to the organization's Debian registry. Git repositories and release attachments alone do not publish packages to APT. See the Gitea Debian registry documentation.
Install packages
After setup, install a published package normally, for example:
sudo apt install skeptical-updater
When already running as root, omit sudo. Setup itself only configures the repository and refreshes indexes; it does not install or upgrade packages.
Remove the repository
sudo rm -f /etc/apt/sources.list.d/bjphoster-deb.list /etc/apt/keyrings/bjphoster-deb.asc
sudo apt update
When already running as root, omit sudo. Removing the source leaves installed packages in place.
License
MIT, see LICENSE.