PKGSURF(1) User Commands PKGSURF(1)

pkgsurfImage Packaging System repository resurfacing utility

pkgsurf -s target_repo -r refrence_repo [-n] [-p publisher_prefix]... [-i name]... [-c pattern]...

pkgsurf is a package publication tool for replacing packages in a target repository that have not changed since the latest published version in the reference repository. The result is a new version surface of all packages in the target repository.

pkgsurf operations are not reversible. In case the pkgsurf operation must be reverted, you should store the target repository in its own ZFS dataset and take a snapshot of the dataset before you run pkgsurf.

Packages in the target repository are compared to packages in the reference repository and analyzed for content changes. For each package, if no content change is found, the package manifest is removed from the target repository and replaced with the manifest of the same package from the reference repository.

The target repository must be a file system based repository. For optimal performance, the reference repository should also be a file system based repository.

The target repository should contain only one version of each package. If the target repository contains a package that is both newer than the latest version in the reference repository and older than the latest version in the target repository, no package manifest replacement is done for that package.

The reference repository can contain one or more versions of each package. However, only the latest version will be used for comparison.

The following options are supported:

, -?
Display a usage message.
pattern
Treat every package whose FMRI matches pattern as changed and do not reversion it, even if there is no content change. This option can be specified multiple times.
name
Ignore set actions with the name field set to name for determination of content change. The package will be reversioned even if this action differs between target and reference versions. This option can be specified multiple times.
Perform a trial run of the operation with no changes made to the target repository.
publisher_prefix
Specify the name of the publisher to be resurfaced. This option can be specified multiple times.

By default, packages from all publishers found in target and reference repositories are resurfaced.

reference_repo
Specify the URI of the reference repository to be used for manifest comparison. Only the latest version of each package is considered.
target_repo
Specify the path to the target repository. Packages in this repository are reversioned to the versions present in the reference repository according to the comparison results. The target repository should contain only one version of each package. The target repository must be a file system based repository.

The following environment variable is supported:

The absolute path of the target repository.

The following exit values are returned:

0
Command succeeded.
1
An error occurred.
2
Invalid command line options were specified.
99
An unanticipated exception occurred.

Resurface a Repository

Reversion each package in the target repository that did not have any content change from the same package in the reference repository.

pkgsurf -s /path/to/target -r http://reference.example.com

Sample package in the target repository:

set name=pkg.fmri value=pkg://example.com/foo@2.0:20381001T163427Z
dir group=sys mode=0755 owner=root path=usr

Sample package in the reference repository:

set name=pkg.fmri value=pkg://example.com/foo@1.0:20381001T163427Z
dir group=sys mode=0755 owner=root path=usr

Sample package in the target repository after the pkgsurf operation:

set name=pkg.fmri value=pkg://example.com/foo@1.0:20381001T163427Z
dir group=sys mode=0755 owner=root path=usr

The command line interface of pkgsurf is . The output of pkgsurf is and may change at any time.

pkgrepo(1), pkg(7)

February 17, 2022 OmniOS