Name

pkg-gencontrol — helper utility for generating pkgng package manifests

Synopsis

pkg-gencontrol { --package-name | -p package } { --version | -v version } [ --staging-directory | -P staging-directory ] [ --user | -u account ] [ --group | -g account ] [--prefix directory] [--origin origin] {--comment comment} {--description description} [--arch architecture] [--abi abi] [--www URL] [--maintainer maintainer]

Description

pkg-gencontrol creates a pkgng manifest for the package named package, in a +MANIFEST file in staging-directory. This manifest is used by the create subcommand of pkg(8). It is in FreeBSD's Universal Configuration Language format.

Note

Older and other package creation tools use the plist format for the +MANIFEST file, and also require other files named variously +BUILD_INFO, +BUILD_VERSION, +COMMENT, and +DESC. Modern versions of pkg(8) that have switched to UCL take everything, including what was in those other files, from +MANIFEST, and that is the only file generated by pkg-gencontrol.

Package information settings

The --version , --comment , and --description arguments set the version, comment, and description information in the manifest. Because pkg(8) complains about manifests that lack them, they are in effect mandatory, albeit that this is not documented. The comment is encoded as a UCL string, so should not contain newlines. If reading it from file, one should use the -n 1 option to head(1) or something similar. The description is encoded as a multiple‐line UCL string, and can contain newlines. The version is forcibly encoded as a string, to prevent UCL from seeing it as potentially a floating point number.

The --prefix , --origin , --arch , --abi , --www , and --maintainer arguments set the prefix, origin, processor architecure, ABI, WWW home page, and maintainer information in the manifest, as displayed by the info subcommand of pkg(8), and are optional. The prefix defaults to /, and the origin to local/package. The others are not written to the manifest if they are not set. This default of the origin is suitable for locally‐created packages, but for packages originating from the ports tree the correct origin (the relative subdirectory within the ports tree of the source, which is not necessarily the same as package) should be used.

Filesystem sources

The entire subtree of staging-directory is scanned for files and subdirectories, all of which are included in the manifest, ignoring files at the top level whose names begin with a + character, and not following symbolic links. Their owners and primary groups are ignored, and written to the manifest as owner root and group wheel. The --user and --group options allow the owner and primary group of every file and directory entry to be set to account instead.

pkg-gencontrol recognizes when the same file has been referenced by multiple hard links, and skips re‐processing it for hash values. It does this based upon the device number and inode number of the file, alone.

Caution

If the staging-directory tree is being updated as pkg-gencontrol runs, in‐place modifications will not be recognized. Only run pkg-gencontrol against a quiescent tree.

See also

  • dpkg-gencontrol(8) – which shares the -v , -p , and -P options with this command, but generates different control files for a different package creation tool.

Author

Jonathan de Boyne Pollard