namcap(1)
π 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 theinfoargument. 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 theRULELISTrules on the package. Skipping them, ignoring them, choosing peace. π-i,--infoβ display information messages (theI: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 usingnon-fhs-man-pageinstead 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 theRULELISTrules 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 toi686andi586and tells you to use$CARCHinstead.capsnamesβ checks aPKGBUILDto 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 aPKGBUILDincludes valid checksums. π₯dependsβ this module runslddon all executables, gets the link-level dependencies, finds the smallest subset of dependencies that cover the link-level dependencies, and compares that list to thedependsof 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 byroot:rootand 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β anyPKGBUILDs that refer to files in$startdirare incorrect.libtoolβ warns if libtool (*.la) files are present.licenseβ verifies that thelicensesvariable has been filled in in aPKGBUILD.licensepkgβ verifies that thelicensesvariable 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 forperllocal.pod.perllocal.podis 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 hasRPATHset to something other than/usr/lib.runpathβ gives an error if a binary hasRUNPATHset to something other than/usr/lib,/usr/lib32.scrollkeeperβ verifies that there aren't any scrollkeeper directories.sfurlβ warns if aPKGBUILDis downloading from a specific sourceforge mirror instead of the genericdownloads.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 aMaintainerandContributorcomment. Give credit bestie!! π«Άurlβ verifies that we have theurlvariable set in thePKGBUILD.urlpkgβ verifies that we have theurlvariable set in the package file.
π¦ EXAMPLES π¦
namcap foo.pkg.tar.gzβ apply all rules tofoo.pkg.tar.gz. Full glam squad, every rule. β¨namcap -r depends,symlink foo.pkg.tar.gzβ apply thedependsandsymlinkrules tofoo.pkg.tar.gz.namcap PKGBUILDβ apply all PKGBUILD based rules to the filePKGBUILD.namcap --listβ list all of the available rules. The whole menu, again. π
π COPYRIGHT π
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
- arch rolling: namcap 3.6.0-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms