$linuxjunkies
>

namcap(1)

namcap analyzes Arch Linux packages for common packaging mistakes and policy violations.

UbuntuDebianFedoraArch

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

FlagWhat it does
-i, --infoShow information about available rules and exit
-l, --listList all rules and exit
-r RULEOnly run the specified rule (can be used multiple times)
-e RULEExclude a specific rule from checking
-bCheck binary packages (.pkg.tar files)
-pCheck PKGBUILD source files instead of binary packages
-ACheck 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.zst

Check a PKGBUILD source file for packaging mistakes before building

namcap -p PKGBUILD

List all available checking rules with their descriptions

namcap -l

Check only the 'unusedso' rule for unused shared objects

namcap -r unusedso mypackage-1.0-1-x86_64.pkg.tar.zst

Check PKGBUILD excluding orphaned files and missing dependency rules

namcap -e orphans -e missingdeps PKGBUILD

Analyze multiple packages in one command

namcap mypackage-1.0-1-x86_64.pkg.tar.zst myotherpackage-2.0-1-x86_64.pkg.tar.zst

Related commands