9 releases

0.0.10 Jan 28, 2025
0.0.9 Jan 14, 2025
0.0.8 Dec 30, 2024
0.0.6 Nov 28, 2024
0.0.1 Feb 5, 2024

#155 in Profiling

Download history 123/week @ 2024-11-17 329/week @ 2024-11-24 59/week @ 2024-12-01 15/week @ 2024-12-08 114/week @ 2024-12-15 18/week @ 2024-12-22 165/week @ 2024-12-29 37/week @ 2025-01-05 115/week @ 2025-01-12 12/week @ 2025-01-19 95/week @ 2025-01-26 17/week @ 2025-02-02

241 downloads per month

MIT and GPL-3.0-or-later

7.5MB
204K SLoC

C 116K SLoC // 0.1% comments Rust 41K SLoC // 0.0% comments M4 20K SLoC // 0.2% comments Shell 17K SLoC // 0.2% comments Happy 6.5K SLoC Ebuild 2.5K SLoC // 0.1% comments GNU Style Assembly 67 SLoC Bitbake 39 SLoC Automake 9 SLoC

Contains (autotools obfuscated code, 470KB) testdata/autotools/configure, (obscure autoconf code, 1KB) testdata/autotools/configure.ac

QA library and tools based on pkgcraft.

Usage

The main use for pkgcruft is to scan ebuild repos for issues. It works in a similar fashion to pkgcheck but operates in a much more performant manner while supporting features such as ignore directives, native package filtering, and sorted output.

For basic use cases, simply run pkgcruft scan inside an ebuild repo.

Warning

To maximize report accuracy, pkgcruft should generate package metadata itself during a scanning run. Alternatively, it can be manually generated using various tools from pkgcraft-tools.

For more explanation, pkgcraft is much more strict than alternatives on what is allowed in global scope. However, if a less stringent tool is used, potential reports may be skipped as pkgcruft will not regenerate data for packages with valid cache entries.

Build requirements

A recent version of rust and compatible clang compiler.

Install

Build and install from crates.io:

cargo install pkgcruft

Build and install from git:

cargo install pkgcruft --git https://github.com/pkgcraft/pkgcraft.git

Install with cargo-binstall:

cargo binstall pkgcruft

Benchmarking

Benchmarks can be run individually for every supported check against a repo target:

# set repo target
export PKGCRUFT_BENCH_REPO=path/to/repo

# run benchmarks
cargo criterion Check --features test -p pkgcruft

Dependencies

~38–73MB
~1.5M SLoC