OpenBSD manual page server

Manual Page Search Parameters

PORTCHECK(1) General Commands Manual PORTCHECK(1)

portcheckvalidate a port before submitting

portcheck [-dNP] [-p portsdir] [-x pattern]

portcheck -A [-dP] [-p portsdir] [-x pattern] [subdir ...]

portcheck is used to validate the OpenBSD port or port hierarchy in current directory. It should be used before submitting ports for review to avoid making common mistakes. portcheck verifies that directory and file structure for a port is in place and that no bogus files exist.

When it's done, portcheck will print detected value of port's PKGPATH to standard output, unless it fails in detection. In the latter case, the -p option should be provided. All other (error) messages from portcheck end up on standard error output.

By default, portcheck automatically picks up nearest parent directory named “ports”, with an optional “mystuff” or “openbsd-wip” subdirectory component, as the ports root directory. For example: if the port being imported is located in /home/joe/cvs/ports/openbsd-wip/devel/p5-Foo, then the root ports directory will be detected as being /home/joe/cvs/ports/openbsd-wip. To override this behaviour, see the -p option.

The following options are available:

Intended for running portcheck on the whole ports tree, i.e., the one lying in PORTSDIR. This option adds several ignore patterns (see -x option description) and disables some other checks (e.g., for missing distinfo). PKGPATH determining and printing won't be done. Implicit change of working directory to the ports tree root is done before starting any checks. Also, in this mode one or more subdir arguments could be specified, to narrow the check only for given subdirectories of ports tree root.
Show debugging information such as calling of check routines.
Disable expensive checks that use “print-plist-with-depends” target, e.g., proper usage of gtk-update-icon-cache(1), update-desktop-database(1) and update-mime-database(1).
Forces the given directory to be treated as ports root directory. Cancels autodetection of the root ports directory made by default. This option is useful, e.g., when you have a temporary ports tree in a non-standard location.
Intended to be used when working on new ports. Enables the checks like the presence of REVISION markers and non-0.0 SHARED_LIBS. It also enables checks for the presence of CVS directories that could be left by mistake when creating a new port based on another one.
Excludes files and subdirectories matching given shell globbing pattern from any checks. Note that matching is done against relative path, and not against absolute path or base name either. I.e., to exclude the “x11/kde4/libs/logs” from checks, you must pass the whole line as argument, not just “logs”. Multiple -x options may be specified.

To validate a new port you've just prepared, go to port's directory and run:

$ portcheck -N

If you were working on updating of an existing port in CVS tree:

$ portcheck

To run a global check of the whole “devel” category in ports tree, use the -A option instead:

$ portcheck -Ap /usr/ports devel


This utility was split from portimport(1) in 2013 and first appeared in OpenBSD 5.5.

May 29, 2019 OpenBSD-current