validate a port before
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
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)
portcheck end up on standard error
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
the root ports directory will be detected as being
/home/joe/cvs/ports/openbsd-wip. To override this
behaviour, see the
The following options are available:
- Intended for running
portcheckon the whole ports tree, i.e., the one lying in
PORTSDIR. This option adds several ignore patterns (see
-xoption description) and disables some other checks (e.g., for missing distinfo).
PKGPATHdetermining 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:
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.