Skip to content

[0.0.27] feat(packaging): add FreeBSD Ports recipe (#2512) - #2563

Closed
Xuepoo wants to merge 1 commit into
ctx-1471/feat-distro-recipesfrom
ctx-1473/feat-freebsd-ports
Closed

Xuepoo wants to merge 1 commit into
ctx-1471/feat-distro-recipesfrom
ctx-1473/feat-freebsd-ports

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Closes #2512

Priority: P1 | Area: package | Milestone: v0.0.27 | Task: CTX-1473

Summary

Adds a FreeBSD Ports recipe for Bitty at packaging/freebsd/x11/bitty/
(Makefile, pkg-plist, pkg-descr, distinfo) plus the docs and a
CI-checkable gate:

  • PORTNAME=bitty, PORTVERSION=0.0.27 (the line Cargo.toml is being
    bumped to), CATEGORIES=x11 — the same category FreeBSD uses for
    x11/kitty, x11/alacritty, and x11/wezterm; x11-servers is for X
    servers, not terminals.
  • Builds from the released source tarball for the v0.0.27 tag with
    USES=cargo and a CARGO_CRATES list regenerated from Cargo.lock
    (397 crates.io entries + 17 git-sourced crates in 8 @git+... groups).
    The CDN artifact scripts/install.sh points FreeBSD users at
    (…/releases/v0.0.27/bitty-0.0.27-x86_64-unknown-freebsd.tar.xz) carries
    only bin/bitty plus docs, so it cannot supply terminfo or desktop
    integration — hence a source port. freebsd.md documents both paths.
  • LICENSE=MIT APACHE20 (LICENSE_COMB=dual) matching Cargo.toml
    (MIT OR Apache-2.0), nfpm.yaml, and packaging/PKGBUILD; only the MIT
    text ships in the repo, so only LICENSE_FILE_MIT is pinned.
  • LIB_DEPENDS = fontconfig + freetype, exactly the direct NEEDED set in
    packaging/linux/runtime-deps.toml. X11/Wayland/Vulkan stay dlopen-time
    (same stance as the apk, which depends only on fontconfig + freetype).
  • ONLY_FOR_ARCHS=amd64: release CI builds and tests
    x86_64-unknown-freebsd only; aarch64 has no coverage, so it is excluded
    rather than silently claimed.
  • do-install stages bin/bitty, the .desktop launcher, AppStream
    metainfo, the hicolor icon set (16–512 px + scalable), tic -x-compiled
    share/terminfo/b/bitty, and README/CHANGELOG.
  • distinfo is deliberately comment-only: checksums cannot exist before the
    tag does. The file says so and freebsd.md documents the tag-time
    make makesum (and make cargo-crates) step.

Docs and gate:

  • packaging/freebsd.md — build/install from a ports tree, make stage /
    make check-plist, distinfo regeneration, what is not covered, and an
    explicit best-effort, not supported label per packaging/README.md
    (no release job installs this package, no published checksum for it).
  • packaging/README.md — new freebsd row in the Formats table, a sentence
    on why it is best-effort, and a build-freebsd bullet in Release Matrix
    marked build-only.
  • packaging/INSTALL.md — FreeBSD install bullet.
  • scripts/tests/check-distro-recipes.test.sh — FreeBSD section; the
    distro-recipes-test just recipe and the just check aggregate already
    include this script, so no justfile change was needed.

Scope

Packaging only: no Rust source, no build-system, no workflow changes. The
only non-packaging/ file touched is the existing distro-recipes gate
script. Nothing outside this worktree or issue #2512 is touched.

Base note: this branch is stacked on ctx-1471/feat-distro-recipes
(PR #2558), because the FreeBSD checks extend
scripts/tests/check-distro-recipes.test.sh, which that PR introduces and
which is not in main yet. Retarget to main once #2558 lands.

Verification

bash scripts/tests/check-distro-recipes.test.sh (also just distro-recipes-test) — exit 0:

PASS: Alpine APKBUILD integrity
PASS: Gentoo repo_name exists and contains 'bitty'
PASS: Gentoo layout.conf valid
PASS: Gentoo source ebuild integrity
PASS: Gentoo binary ebuild integrity
PASS: Void Linux template integrity
PASS: FreeBSD ports Makefile integrity
PASS: FreeBSD pkg-descr is non-empty and carries a WWW line
PASS: FreeBSD distinfo defers checksums to make makesum
PASS: FreeBSD pkg-plist (13 entries) matches in-tree sources
PASS: FreeBSD recipe has no hardcoded host paths
PASS: Documentation exists: packaging/alpine.md
PASS: Documentation exists: packaging/gentoo.md
PASS: Documentation exists: packaging/void.md
PASS: Documentation exists: packaging/freebsd.md
PASS: INSTALL.md references all four distro packaging guides
check-distro-recipes.test.sh: ALL PASS

The new check was proved to bite — PORTNAME=bittey plus a bogus
share/examples/bitty.conf plist entry:

FAIL: FreeBSD Makefile missing PORTNAME=bitty
FAIL: pkg-plist entry has no in-tree source: share/examples/bitty.conf
check-distro-recipes.test.sh: FAIL      (exit 1)

Both were restored and the gate is green again.

Other packaging-scoped gates, all passing:

just distro-recipes-test   → check-distro-recipes.test.sh: ALL PASS
just package-manifests-test → check-package-manifests.test: PASS
just release-paths-test    → release-paths-test: OK

bash -n scripts/tests/check-distro-recipes.test.sh — clean. Added files
grep clean for secrets, host paths (/home/, /Users/, /mnt/) and
non-ASCII bytes; the CARGO_CRATES list was diffed against Cargo.lock
(0 missing, 0 extra, 17/17 git crates).

just check was not run: it needs a sibling bitty-plugins checkout
(#2459). No FreeBSD host is available in this environment, so make stage /
make check-plist / make makesum were not executed — the port is
structurally gated only, which is why it is labeled best-effort.

Port covers the 0.0.27 release line: x11/bitty builds from the released
source tarball with USES=cargo and a CARGO_CRATES list generated from
Cargo.lock, and installs bin/bitty, the desktop entry, AppStream metadata,
the hicolor icon set, the compiled terminfo entry, and the docs.

distinfo stays comment-only until make makesum runs at tag time; the docs
say so and packaging/freebsd.md labels the port best-effort, not supported.

check-distro-recipes.test.sh gains version-agnostic FreeBSD assertions:
Makefile fields, USES=cargo and CARGO_CRATES presence, do-install coverage,
pkg-plist entries resolving to in-tree sources, icon-size agreement,
pkg-descr/distinfo content, and absence of hardcoded host paths.
@Xuepoo Xuepoo added feat Feature P1 Priority: high area:package Area: package lifecycle labels Oct 23, 2026
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cf64421d-7e1a-4bec-be8b-7867ad7f3bbd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Xuepoo
Xuepoo deleted the branch ctx-1471/feat-distro-recipes October 23, 2026 14:50
@Xuepoo Xuepoo closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:package Area: package lifecycle feat Feature P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant