Package packslip for a distribution

For distribution packagers: build a packslip package that installs and verifies tools, without the publisher commands, offline from a source archive. To install packslip yourself, including from the signed APT and RPM repositories, see Install packslip.

Choose a build

The package manager installs packslip; packslip then installs tools from their signed upstream releases. Build without default features and select one:

FeatureCommandsUse it for
install-cliinstall, verify, pin, show, completion, versionA distribution package that bootstraps tools
verify-cliverify, pin, show, completion, versionA verifier-only package
cargo build --locked --release --no-default-features --features install-cli
cargo build --locked --release --no-default-features --features verify-cli

The Rust crate's features lists the library features behind them.

Build offline packages

The source recipes in packaging/debian/ and packaging/rpm/packslip.spec build from a source archive that bundles every Cargo dependency, so the package build needs no network. Neither recipe runs rustup or another language package manager. They do not claim admission to Debian main or compliance with Fedora's packaging policy.

Prepare the source archive

This step needs network access, a Rust toolchain compatible with Cargo.toml, Bash, Git, tar, and Python 3.11 or newer. From a checkout of the release you are packaging, run:

git clone https://github.com/jdx/packslip
cd packslip
git checkout vX.Y.Z
scripts/package-source.sh source

The script ends with:

Prepared packslip-X.Y.Z (complete installer, offline Cargo sources)

The script exports the committed HEAD, so commit local changes before testing them. It writes three files to source/:

Each vendored crate keeps its original checksum file and license, and Cargo refuses one that no longer matches. The archive vendors every platform's dependencies; a build compiles only those its target needs.

Build and test the packages

On Linux with Docker, build and install each package in its native distribution image:

scripts/check-distro-packages.sh deb source deb-results
scripts/check-distro-packages.sh rpm source rpm-results

The deb check uses an Ubuntu 26.04 image and the rpm check a Fedora 44 image, each with its distribution's Rust toolchain. Preparing the image fetches the build tools. The package build, tests, and installation then run with networking disabled and cargo --frozen.

Each check fails unless the installed package:

Build unsigned source packages

Install devscripts, debhelper, and rpm, then run:

scripts/package-debian-source.sh source resolute
scripts/package-rpm-source.sh source

The Debian source package carries upstream's changelog entry and maintainer, so use it for testing. PACKAGE_REVISION sets that entry's revision number (default 1). To build one under your own name:

  1. Unpack the archive beside its orig copy and add the Debian recipe:

    cd source
    tar -xf packslip-X.Y.Z.tar.gz
    cd packslip-X.Y.Z
    cp -R packaging/debian debian
    
  2. Set Maintainer in debian/control.

  3. Write your own debian/changelog (for example with dch) with a version X.Y.Z-<revision>, so dpkg-source finds the orig archive.

  4. Run dpkg-buildpackage -S -d. It signs the upload with your GPG key. -d skips checking the build dependencies in debian/control, which a source-only build does not use.

Write your own recipe

The recipes build and test with:

cargo build --release --frozen --no-default-features --features install-cli --bin packslip
cargo test --frozen --no-default-features --features install-cli

The build environment needs a Rust toolchain at least as new as rust-version in Cargo.toml, a C compiler, CMake, pkg-config, and jq. Only the action integration tests use jq; the installed CLI does not. The package needs the system's CA certificates at run time.

Both recipes set AWS_LC_SYS_NO_JITTER_ENTROPY=1 while building and testing, because the jitter-entropy sources of aws-lc-sys must compile without the distribution's optimization flags. The RPM spec also adds -fPIE to LDFLAGS for Fedora's hardening flags.

Both recipes install:

Installed pathSource
/usr/bin/packslipThe install-cli build
/etc/packslip/pins.d/An empty directory for administrators' pin files; see Require signers with pin files
/usr/share/man/man1/packslip.1packaging/packslip.1, the install-cli man page
/usr/share/bash-completion/completions/packslippackslip completion bash
/usr/share/zsh/site-functions/_packslippackslip completion zsh
/usr/share/fish/vendor_completions.d/packslip.fishpackslip completion fish
bootstrap.md in the documentation directorycontent/docs/bootstrap.md
The licenseLICENSE: Debian installs it as /usr/share/doc/packslip/copyright-upstream; the RPM marks it %license

Packaging compresses the man page to packslip.1.gz, and Debian's tools also compress bootstrap.md. The RPM also ships README.md.

Keep a packaged version current

An unchanged package keeps working while its formats are supported and its trust root is current; a verify-cli build never refreshes its trust root. Maintaining packaged verifiers says what forces an update and what upstream backports.