67.5. just-1.58.0
A command runner for project-specific recipes
| Version | 1.58.0, release 1 |
| Shelf | devtools — Debuggers, tracers, profilers, analysers, linters, language servers and developer utilities |
| Phase | 40_lang (Languages), 13 of 186 in build order |
| Licence | CC0-1.0 |
| Homepage | https://github.com/casey/just |
| Build time | 4.8 SBU |
| Installed size | 6.0 MiB in 6 files |
| Recipe | ports/core/devtools/just/kpkgbuild |
About
just is a command runner: a justfile in a project names recipes, short sequences of shell commands with arguments, and just <recipe> runs one. It is a Rust program built from the crates in its vendor bundle; see rust.
Sources
just-1.58.0.tar.gz(803.9 KiB)
sha256c8a36e6e9397f2fdfcb0cc246fcdb790b52a784f3c8cabc0d8baeb031852a148
upstream: https://github.com/casey/just/archive/1.58.0.tar.gz
archive copy: sources-1/devtools--just-1.58.0.tar.gzjust-vendor-1.58.0.tar.xz(8.0 MiB)
sha256ad50098cdb3c3c04db1b0f3b6ed5f8a9312c5b21c1ac9f4834621bdbb3a25d4f
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-1/devtools--just-vendor-1.58.0.tar.xz
Dependencies
Depends on: rust.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install just'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/devtools/just.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/devtools/just
echo 'c8a36e6e9397f2fdfcb0cc246fcdb790b52a784f3c8cabc0d8baeb031852a148 just-1.58.0.tar.gz' | sha256sum -c -
echo 'ad50098cdb3c3c04db1b0f3b6ed5f8a9312c5b21c1ac9f4834621bdbb3a25d4f just-vendor-1.58.0.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/just
SRC=$SRC_ROOT/just-1.58.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf just-1.58.0.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz
export RUSTFLAGS="-C target-feature=-crt-static"
cargo build --release --frozen --offline
install -Dm755 target/release/just $PKG/usr/bin/just
install -d "$PKG/usr/share/man/man1"
target/release/just --man > "$PKG/usr/share/man/man1/just.1"
for _sh in bash zsh fish; do
target/release/just --completions $_sh > just.$_sh
done
install -Dm644 just.bash $PKG/usr/share/bash-completion/completions/just
install -Dm644 just.zsh $PKG/usr/share/zsh/site-functions/_just
install -Dm644 just.fish $PKG/usr/share/fish/vendor_completions.d/just.fish
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/just, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf just-1.58.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/just, and runs the triggers its paths call for.
Contents
Installed programs: just.
Installed directories: /usr/share/licenses/just.
Short descriptions
just |
🤖 Just a command runner - https://github.com/casey/just |
Notes
The manual page and the bash, zsh and fish completions are not files in the source. build.sh runs the binary it has just built, just --man and just --completions <shell>, and installs what it prints, so they always describe the program in the package.