Skip to content

Add libarchive 3.8.1; make it a diffoscope runtime dep - #540

Merged
twitchyliquid64 merged 1 commit into
mainfrom
libarchive-for-diffoscope
Jul 31, 2026
Merged

Add libarchive 3.8.1; make it a diffoscope runtime dep#540
twitchyliquid64 merged 1 commit into
mainfrom
libarchive-for-diffoscope

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

What

Adds libarchive 3.8.1 (library-only) and makes it a runtime dep of diffoscope.

Why

diffoscope imports python's libarchive-c at startup — not lazily — which
dlopens the native libarchive.so. No package ships it, so every
diffoscope invocation dies at import, --version included:

AttributeError: /usr/bin/python3.14: undefined symbol: archive_version_number
Missing or incomplete libarchive module. Try installing your system's 'libarchive' package.

(The odd undefined symbol on the python binary itself is libarchive-c's
ctypes fallback after find_library('archive') returns nothing.)

Found on v0.5.0 release night by repro-lab's rc-tools, which invokes every
tool instead of trusting command -v — locating a binary is not evidence
that it runs.

Recipe notes

  • One subtlety baked into the diffoscope wrapper: ctypes' find_library()
    has neither ldconfig nor gcc inside a composed root, so libarchive-c can't
    find the .so on its own even when present — it honors $LIBARCHIVE, so the
    console script ships behind a two-line wrapper that sets it (overridable).

  • Library only: --disable-bsdtar/bsdcat/bsdcpio/bsdunzip — the tools aren't
    needed and every compressor skipped is a runtime dep not dragged in.

  • Linked against zlib / bzip2 / zstd (already in pkgs); lz4, lzo2, lzma,
    xml2, expat, openssl, nettle, ACLs and xattrs configured out.

  • No make check: the suite exercises the ACL/xattr/locale surface we
    deliberately configured out.

  • Source staged at gs://minimal-staging-archives/libarchive-3.8.1.tar.gz,
    sha256 bde832a5e3344dc723cfe9cc37f8e54bde04565bfe6f136bc1bd31ab352e9fab
    (upstream GitHub release tarball).

Tested

On min 0.5.0, in a clean-room session on this branch:

  • min package build libarchive — builds clean (autotools kit: sed/grep/gawk-bootstrap, same set as file)
  • min package build diffoscope (spec hash changes with the new dep) — builds clean
  • task running bare diffoscope --version in the composed root — diffoscope 325, first successful invocation of this package

🤖 Generated with Claude Code

diffoscope imports python's libarchive-c at startup, which dlopens the
native libarchive.so — no package ships it, so every diffoscope
invocation dies at import:

  AttributeError: /usr/bin/python3.14: undefined symbol: archive_version_number

Library-only build (bsd* tools disabled), linked against zlib/bzip2/zstd,
everything else configured out. Found by repro-lab's rc-tools on the
v0.5.0 release night — it invokes every tool instead of trusting
'command -v', which is the only reason this was visible at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1430ad2b-c469-48d7-ad71-2f983e068b48

📥 Commits

Reviewing files that changed from the base of the PR and between 02e5f82 and 96f3690.

📒 Files selected for processing (5)
  • minimal.toml
  • packages/diffoscope/build.ncl
  • packages/diffoscope/build.sh
  • packages/libarchive/build.ncl
  • packages/libarchive/build.sh

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

@twitchyliquid64
twitchyliquid64 added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 97e04d2 Jul 31, 2026
10 checks passed
@twitchyliquid64
twitchyliquid64 deleted the libarchive-for-diffoscope branch July 31, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants