namcap(1)

πŸ“¦ version 3.6.0, in arch rolling

πŸ’… namcap(1) β€” the package analysis utility, bestie edition

Okay so this is the manual page for namcap, and honestly? It's the moment your Arch Linux packages get a vibe check before they go out into the world. Let's go. 🫢


✨ SYNOPSIS ✨

namcap [options] <package|PKGBUILD> [package|PKGBUILD] ...

🌸 DESCRIPTION 🌸

namcap is a package analysis utility that goes looking for problems with Arch Linux packages or their PKGBUILD files. Bestie it will literally apply rules to the file list, to the files themselves, or to individual PKGBUILD files. She's thorough like that. πŸ’–

Rules return lists of messages, and each message is one of three types: error, warning, or information (think notes or comments, like when your friend leaves a lil sticky note on your screen).

  • Errors β€” designated by E: β€” are things namcap is very sure are wrong and need to be fixed. No cap, fix them. 🚨
  • Warnings β€” designated by W: β€” are things namcap thinks should be changed, but if you know what you're doing then you can lowkey leave them. Your call, queen. ⚠️
  • Information β€” designated by I: β€” are only shown when you use the info argument. They give info that might be helpful but isn't anything that needs changing. Just lil gossips. πŸ’¬

πŸŽ€ OPTIONS πŸŽ€

  • -e RULELIST, --exclude=RULELIST β€” do not run the RULELIST rules on the package. Skipping them, ignoring them, choosing peace. πŸ™ˆ
  • -i, --info β€” display information messages (the I: ones, the lil extra notes). ✨
  • -L, --list β€” return a list of valid rules and their descriptions. The full menu, iykyk. πŸ“œ
  • -m, --machine-readable β€” displays easily parseable namcap tags instead of the normal human readable description; for example using non-fhs-man-page instead of "Non-FHS man page (%s) found. Use /usr/share/man instead". A full list of namcap tags along with their human readable descriptions can be found at /usr/share/namcap/tags. πŸ€–
  • -r RULELIST, --rules=RULELIST β€” only apply the RULELIST rules to the package. Picky eater mode, and we respect it. πŸ’…

RULELIST is a comma-separated list of rule names.

  • -v, --version β€” print version and exit. Short and iconic. πŸ‘‘

πŸ‘‘ RULES πŸ‘‘

Here's the whole roster, bestie. Every single one, no skipping. 🌈

  • arrays β€” verifies that array variables are actually arrays and not strings. Strings pretending to be arrays? Not on her watch. 🚫
  • badbackups β€” verifies that backup entries don't begin with /.
  • carch β€” looks for references to i686 and i586 and tells you to use $CARCH instead.
  • capsnames β€” checks a PKGBUILD to verify that the package name has no upper case characters.
  • capsnamespkg β€” checks a package to verify that the package name has no upper case characters.
  • checksums β€” makes sure that a PKGBUILD includes valid checksums. πŸ”₯
  • depends β€” this module runs ldd on all executables, gets the link-level dependencies, finds the smallest subset of dependencies that cover the link-level dependencies, and compares that list to the depends of the package. It returns messages in three cases: dependency detected and not included, dependency included but already satisfied, and dependency included and not needed. These suggestions are just guidelines and all package builders should take this into account (i.e. you're smarter than namcap is). 😭

Some cases where namcap fails are dlopen() and obscure links. dlopen()'d libraries don't show up because they are loaded at run time: in the case of a program that loads plugins. Obscure links are the cases where only a small portion of the package needs something to run; usually, the small portion won't be accessed unless that thing is installed (i.e. a java plugin for mozilla included in the java package). It's giving "it's complicated". πŸ’€

  • directoryname β€” checks the directory names in the package file list for standard directories (i.e. /etc, /usr/bin, /usr/lib). All files in directories that are non-standard are returned.
  • elffiles β€” gives an error if it finds ELF (binary) files outside the standard paths (/bin, /usr/bin, etc.).
  • emptydir β€” looks for directories in a package that don't contain any files. Empty. Void. Nothing. πŸ«₯
  • extravars β€” verifies that extra variables start with an underscore.
  • fhsinfopages β€” verifies correct installation of info pages.
  • fhsmanpages β€” verifies correct installation of man pages. (Yes, this very genre of page. Meta. πŸŽ€)
  • fileownership β€” verifies that all files are owned by root:root and not some other user or group.
  • gnomemime β€” checks for generated GNOME mime files.
  • hicoloricons β€” checks whether the hicolor icon cache is updated when a package installs files in /usr/share/icons/hicolor.
  • infodirectory β€” verifies that a package does not contain the info directory file (/usr/share/info/dir).
  • invalidstartdir β€” any PKGBUILDs that refer to files in $startdir are incorrect.
  • libtool β€” warns if libtool (*.la) files are present.
  • license β€” verifies that the licenses variable has been filled in in a PKGBUILD.
  • licensepkg β€” verifies that the licenses variable has been filled in in a package. For packages with a custom license it checks whether the license file has been installed in /usr/share/licenses/$pkgname/.
  • perllocal β€” searches for perllocal.pod. perllocal.pod is a nasty file that's included during most perl module installations. Truly the villain of the story. 😀
  • permissions β€” checks basic file and and directory permissions. It returns warnings about world readable bits not being set, world writable bits being set, and world executable bit not being set for directories.
  • rpath β€” gives an error if a binary has RPATH set to something other than /usr/lib.
  • runpath β€” gives an error if a binary has RUNPATH set to something other than /usr/lib, /usr/lib32.
  • scrollkeeper β€” verifies that there aren't any scrollkeeper directories.
  • sfurl β€” warns if a PKGBUILD is downloading from a specific sourceforge mirror instead of the generic downloads.sourceforge.net.
  • symlink β€” finds out symbolic and hard links which do not point to a valid path in the package.
  • tags β€” for package maintainers, this module verifies that we have remembered to add a Maintainer and Contributor comment. Give credit bestie!! 🫢
  • url β€” verifies that we have the url variable set in the PKGBUILD.
  • urlpkg β€” verifies that we have the url variable set in the package file.

πŸ¦‹ EXAMPLES πŸ¦‹

  • namcap foo.pkg.tar.gz β€” apply all rules to foo.pkg.tar.gz. Full glam squad, every rule. ✨
  • namcap -r depends,symlink foo.pkg.tar.gz β€” apply the depends and symlink rules to foo.pkg.tar.gz.
  • namcap PKGBUILD β€” apply all PKGBUILD based rules to the file PKGBUILD.
  • namcap --list β€” list all of the available rules. The whole menu, again. πŸ“‹

Copyright Β© 2003-2023 Namcap contributors, see AUTHORS for details.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Like, none. Zero. Don't come for her if it breaks. 😭


Okay that's the whole page bestie, you're officially namcap-pilled. Go audit something iconic. πŸ’…βœ¨

namcap 3.6.0 β€” dated Aug 24, 2025 β€” mwah, that's a wrap πŸŽ€

πŸ“¦ where this page comes from