namcap(1)
namcap analyzes Arch Linux packages for common packaging mistakes and policy violations.
Synopsis
namcap [OPTION]... PACKAGE...Description
namcap is a static analysis tool for Arch Linux packages (.pkg.tar.* archives and PKGBUILD files). It inspects package contents and metadata to detect issues like missing dependencies, unused libraries, insecure permissions, missing man page compression, and violations of the Arch packaging standards.
It can analyze either binary packages (the compiled .pkg.tar files) or source packages (PKGBUILD scripts directly), making it useful both during package development and for auditing existing packages in repositories.
Common options
| Flag | What it does |
|---|---|
-i, --info | Show information about available rules and exit |
-l, --list | List all rules and exit |
-r RULE | Only run the specified rule (can be used multiple times) |
-e RULE | Exclude a specific rule from checking |
-b | Check binary packages (.pkg.tar files) |
-p | Check PKGBUILD source files instead of binary packages |
-A | Check all rules (including experimental ones) |
Examples
Analyze a compiled package for common issues and policy violations
namcap mypackage-1.0-1-x86_64.pkg.tar.zstCheck a PKGBUILD source file for packaging mistakes before building
namcap -p PKGBUILDList all available checking rules with their descriptions
namcap -lCheck only the 'unusedso' rule for unused shared objects
namcap -r unusedso mypackage-1.0-1-x86_64.pkg.tar.zstCheck PKGBUILD excluding orphaned files and missing dependency rules
namcap -e orphans -e missingdeps PKGBUILDAnalyze multiple packages in one command
namcap mypackage-1.0-1-x86_64.pkg.tar.zst myotherpackage-2.0-1-x86_64.pkg.tar.zst