Versions in this module Expand all Collapse all v0 v0.88.0 Nov 13, 2026 Changes in this version type Lock + ZPKB string v0.87.0 Nov 13, 2026 Changes in this version + const ABIProvidesAnnotation + const AnnotationSourceURI + const ArtifactType + const ArtifactTypeProvenance + const ArtifactTypeSignature + const ArtifactTypeSource + const CatalogFileName + const CatalogMaxBytes + const CatalogProjectName + const CatalogVersion + const CosignSignatureAnnotation + const DefaultDistBase + const DefaultSignerName + const DefaultThreshold + const DeprecatedEnv + const ExtTarGz + const ExtTarXz + const ExtTarZst + const ExtraTrustedKeysEnv + const GlibcMinKernelAnnotation + const GlibcProject + const GlibcVersionAnnotation + const KnownDeprecatedAsOf + const LockfileVersion + const MaxSignatures + const MaxSignerNameLen + const MaxTrustedKeys + const MediaLayerGz + const MediaLayerXz + const MediaLayerZst + const MediaSimpleSigning + const MediaSourceLayer + const PinsFromRecipes + const PinsPublished + const SignerKeyIDAnnotation + const SpecAnnotation + const SpecVersion + const StorePlatformFile + const TrustThresholdEnv + const TrustedKeysEnv + const WhyNoDate + const WithdrawnEnv + var BuildOrders = []BuildOrder + var CacheBase = "" + var DefaultDeprecated = KnownDeprecated + var DefaultWithdrawn = map[string][]Withdrawal + var DistBase = DefaultDistBase + var ErrBadProjectName = errors.New("artifact: not a project name") + var ErrBadService = errors.New("service block") + var ErrBadVersionString = errors.New("not a version") + var ErrInsecurePath = errors.New("artifact: insecure path in archive") + var ErrSameNamespace = errors.New("artifact: source and destination are the same namespace") + var ErrSourceAbsent = errors.New("artifact: source not in the mirror") + var Exec func(argv0 string, argv []string, env []string) error + var HTTPClient = NewHTTPClient() + var ImplicitRootsOff = false + var KnownDeprecated = map[string][]string + var KnownSupported = map[string][]string + var PantryBase = "https://raw.githubusercontent.com/pkgxdev/pantry/main/projects" + var PantryOverlay = "https://raw.githubusercontent.com/go-zpkg/pantry-overlay/main/projects" + var RetiredSigningPublicKeys = []string + var RevokedSigningKeys []RevokedKey + var SigningPublicKey = "RWTfNcOkaTHT5lsudyEtExOI45lQQEHCu+fckxlKljWtzfuFTQtgjLZT" + var UpstreamDist = "" + var Warn func(msg string) + func Annotation(ann map[string]string, key string) string + func AnnotationPresent(ann map[string]string, key string) (string, bool) + func BinNames(project string, provides []string) []string + func BinNamesFor(project string, provides []string, version string) []string + func CanonicalLoaderExists() bool + func CatalogTarball(c Catalog) ([]byte, error) + func CertPool() *x509.CertPool + func CheckStorePlatform(dir, osn, arch string) error + func CompanionsFor(project, osn, arch string) (map[string]string, error) + func ConfigError() error + func CopyPublished(ctx context.Context, src, dst *OCIClient, project, tag string) (ocispec.Descriptor, error) + func Decompressor(ext string, body io.Reader) (io.Reader, func(), error) + func Describe(c Concrete) string + func Dir() string + func Distinguish(specs []Concrete) []string + func DocDiff(a, b any) string + func DownloadArtifact(project, ver, osn, arch string) ([]byte, string, error) + func ELFInterp(p string) (string, error) + func ELFNeeded(p string) ([]string, error) + func ELFRunpath(p string) (runpath, rpath []string, err error) + func EmitHCL(doc map[string]any) string + func Env(name string) string + func ExpandStorePath(p string) string + func Extract(tr *tar.Reader, dest string, strip int) error + func FetchMeta(project string) (deps map[string]string, provides []string, err error) + func FetchMetaFor(project, osn, arch string) (deps map[string]string, provides []string, err error) + func FetchRuntimeEnv(project, prefix, version string) (map[string]string, error) + func FetchRuntimeEnvIn(project string, closure []Resolved, dir string) (map[string]string, error) + func FindClosureBin(closure []Resolved, dir, project, name string) string + func FindLoader(dir string) string + func FindLoaderFor(dir, arch string) string + func GOARCH() string + func GOOS() string + func GlibcConstraint() string + func GlibcFlavor() string + func GlibcMinKernel(path string) (string, error) + func HCLToMap(src []byte, filename string) (map[string]any, error) + func HCLToYAML(src []byte, filename string) ([]byte, error) + func HostKernel() (string, error) + func HostSlug() (string, string) + func Install(r Resolved, pkgxDir string) (bool, error) + func InstallFor(r Resolved, pkgxDir, osn, arch string) (bool, error) + func InstalledVersions(project, dir string) []string + func IsELF(p string) bool + func IsNotPublished(err error) bool + func IsOCI(base string) bool + func IsPlatformTag(tag string) bool + func IsVersionTag(tag string) bool + func LibDirs(closure []Resolved, dir string) []string + func LibPath(closure []Resolved, dir string) string + func LinkView(viewDir, storeDir, project string, v Ver, hash string) error + func LoaderName() string + func LoaderNameFor(arch string) string + func LockAge(generated string, now time.Time) string + func LockPinned(d Lock) string + func MachoNeeded(p string) ([]string, error) + func MarkStorePlatform(dir, osn, arch string) + func MarshalCatalog(c Catalog) ([]byte, error) + func MarshalSpec(c Concrete) string + func NewHTTPClient() *http.Client + func ParseBuildRef(spec string) (rest, hash string) + func PinTag(uri string) string + func PreferNotWithdrawn(project string, builds []Build) (keep []Build, setAside []Build) + func PrefixOf(project string, closure []Resolved, dir string) string + func PrimaryBin(project string, provides []string) string + func PrimaryBinFor(project string, provides []string, version string) string + func ProjectToRequest(err error) string + func PublishCatalog(c *OCIClient, cat Catalog, osn, arch string) error + func PublishedTagFor(project string, v Ver, osn, arch string) (string, bool, error) + func RenderLock(d Lock) string + func ResolveBinPath(bin string) string + func ResolveBuild(dir, project string, v Ver) (string, bool) + func SetupScratchRootfs(loader, shellPath string) + func SetupScratchRootfsAt(root, loaderName, loaderTarget, shellTarget string) error + func ShortBuilder(id string) string + func ShortHash(identity string) string + func SonameComesFromOutside(soname string) bool + func SonameProviders() []string + func SonamesUnder(prefixes []string) map[string]bool + func SourceDigest(data []byte) string + func SourceTag(sha256hex string) string + func SplitFlavor(tag string) (version, glibc string) + func SplitVariantHash(tag string) (version, hash string) + func StoreBuildDirName(v Ver, hash string) string + func StoreBuildPrefix(dir, project string, v Ver, hash string) string + func StoreDirName(v Ver) string + func StoreHash(v Ver, contentDigest, source string) string + func StorePlatform(dir string) (osn, arch string, ok bool) + func StorePrefix(dir, project string, v Ver) string + func StoreTotals(entries []StoreEntry) (bytes int64, versions, projects int, olderBytes int64) + func StubBins(closure []Resolved, dir, prefix string) (int, error) + func StubBinsStaged(closure []Resolved, s Stage) (int, error) + func UnknownStorePlaceholders(p string) []string + func ValidatePlatformSlug(s string) error + func ValidateProjectName(p string) error + func ValidateSpecHash(s string) error + func ValidateVersionString(v string) error + func VerifyRequired() bool + func VerifySignature(tarball, payload []byte, b64sig, pubkey string) error + func VerifySignatureDigest(digest string, payload []byte, b64sig, pubkey string) error + func WithdrawnNote(project string, builds []Build) string + func YAMLToHCL(src []byte, name string) ([]byte, error) + type Attestation struct + KeyID string + Payload []byte + Sig string + type BlobFile struct + Digest string + func (b *BlobFile) Close() error + type Build struct + Builder string + Installed string + InstalledAt time.Time + Published bool + Signatures *SignatureReport + Spec Concrete + Version Ver + func BuildsOf(project, version, dir, osn, arch string) ([]Build, error) + func MatchBuild(builds []Build, prefix string) (Build, error) + func SortBuilds(project string, builds []Build, by BuildOrder) []Build + func (b Build) Hash() string + type BuildOrder string + const ByClosure + const ByHash + const ByInstalled + const ByStatus + func ParseBuildOrder(s string) (BuildOrder, error) + type Catalog struct + Dropped int + Generated string + Projects []CatalogProject + func CatalogFromTarball(b []byte) (Catalog, error) + func FetchCatalog(c *OCIClient, osn, arch string) (Catalog, error) + func UnmarshalCatalog(b []byte) (Catalog, error) + func (c *Catalog) Age(now time.Time) string + func (c *Catalog) Children(prefix string) []Node + func (c *Catalog) Complete(partial string) []Node + func (c *Catalog) DepTree(project string, depth int) []DepNode + func (c *Catalog) Dependents(project string, depth int) []DepNode + func (c *Catalog) Lookup(project string) (CatalogProject, bool) + func (c *Catalog) ProvidersOf(command string) []string + func (c *Catalog) Search(query string) []SearchHit + func (c *Catalog) WhyDepends(from, to string) []string + type CatalogProject struct + Deps []string + Platforms []string + Project string + Provides []string + Summary string + Versions []string + type Concrete struct + Deps []Dep + Graft string + Platform string + Recipe string + Variants Variants + func UnmarshalSpec(s string) (Concrete, error) + func VerifySpec(annotation, wantHash string) (Concrete, error) + func (c Concrete) Canonical() string + func (c Concrete) Hash() string + func (c Concrete) IsZero() bool + func (c Concrete) VariantTag() string + type ConflictError struct + AskedBy []string + Constraints []string + Err error + Project string + func (e *ConflictError) Error() string + func (e *ConflictError) Unwrap() error + type Dep struct + Hash string + Project string + Version string + type DepNode struct + Known bool + Project string + Repeat bool + Under []DepNode + Version string + type Edge struct + Constraint string + Of string + On string + type Graph struct + Asks map[string][]Edge + Deps map[string][]Edge + Lines map[string][]Ver + Roots []string + Versions map[string]Ver + func GraphFor(roots map[string]string, osn, arch string) (*Graph, error) + type Lock struct + Generated string + Overlay string + Pantry string + Pinned string + Pins []LockPin + Platform string + Roots []string + Version int + ZBK string + func ParseLock(src []byte, path string) (Lock, error) + func ReadLock(path string) (Lock, error) + type LockPin struct + Project string + Spec string + Version string + type NoArtifactHereError struct + Absent []string + Arch string + Available []Ver + Constraints []string + OS string + Project string + func (e *NoArtifactHereError) Error() string + type Node struct + Leaf bool + Name string + Under int + type NotPublishedError struct + Err error + Project string + Registry string + Repo string + func (e *NotPublishedError) Error() string + func (e *NotPublishedError) Unwrap() error + type OCIClient struct + func NewOCIClient(base string) (*OCIClient, error) + func (c *OCIClient) Annotations(project, ver, osn, arch string) (map[string]string, error) + func (c *OCIClient) ArtifactDigest(project, ver, osn, arch string) (string, error) + func (c *OCIClient) AttachReferrer(project, ver, osn, arch string, rf Referrer) error + func (c *OCIClient) EnsureIndexed(project, ver string, desc ocispec.Descriptor) (repaired bool, err error) + func (c *OCIClient) FetchAttestations(project, ver, osn, arch string) ([]Referrer, map[string]string, error) + func (c *OCIClient) HasPlatform(project, ver, osn, arch string) (bool, error) + func (c *OCIClient) HasSource(project, sha256hex string) (bool, error) + func (c *OCIClient) IndexLists(project, ver string, desc ocispec.Descriptor) (bool, error) + func (c *OCIClient) ListTags(project string) ([]string, error) + func (c *OCIClient) PinnedDigest(project, uri string) (string, error) + func (c *OCIClient) PlatformAnnotations(project, ver, osn, arch string) (map[string]string, error) + func (c *OCIClient) Platforms(project, ver string) ([]string, error) + func (c *OCIClient) ProvenanceOfTag(project, tag, osn, arch string) (SignatureReport, string, error) + func (c *OCIClient) Pull(project, ver, osn, arch string) ([]byte, string, error) + func (c *OCIClient) PullFile(project, ver, osn, arch string) (*BlobFile, string, error) + func (c *OCIClient) PullSource(project, sha256hex string) ([]byte, error) + func (c *OCIClient) Push(project, ver, osn, arch string, tarball []byte, ext string) error + func (c *OCIClient) PushSource(project string, data []byte, uri string) (ocispec.Descriptor, error) + func (c *OCIClient) PushWithReferrers(project, ver, osn, arch string, tarball []byte, ext string, refs []Referrer) (ocispec.Descriptor, error) + func (c *OCIClient) PushWithReferrersAnnotated(project, ver, osn, arch string, tarball []byte, ext string, refs []Referrer, ...) (ocispec.Descriptor, error) + func (c *OCIClient) Referrers(project string, subject ocispec.Descriptor) ([]ocispec.Descriptor, error) + func (c *OCIClient) SignaturesOfDigest(project, ver, osn, arch, digest string) (SignatureReport, error) + func (c *OCIClient) SignaturesOfTag(project, tag, osn, arch string) (SignatureReport, error) + func (c *OCIClient) SpecOf(project, tag, osn, arch string) (Concrete, bool, error) + func (c *OCIClient) VerifyArtifact(project, ver, osn, arch string, tarball []byte) error + func (c *OCIClient) VerifyArtifactDigest(project, ver, osn, arch, digest string) error + type Referrer struct + Annotations map[string]string + ArtifactType string + Blob []byte + MediaType string + type Resolved struct + Project string + Version Ver + func CompleteClosure(roots map[string]string, dir string) ([]Resolved, error) + func CompleteClosureFor(roots map[string]string, dir, osn, arch string) ([]Resolved, error) + func MergeClosures(a, b []Resolved) []Resolved + func ResolveClosure(roots map[string]string) ([]Resolved, error) + func ResolveClosureFor(roots map[string]string, osn, arch string) ([]Resolved, error) + type RevokedKey struct + Because string + Key string + Name string + type SearchHit struct + Match string + Project string + Why string + type Service struct + Args []string + Capabilities []string + Command string + ConfigurationDirectory *ServiceDirectory + Description string + Documentation string + Name string + ProcSubset string + Reload string + Restart string + RuntimeDirectory *ServiceDirectory + StateDirectory *ServiceDirectory + StopTimeout string + User string + func FetchService(project string) (*Service, error) + func ParseService(src []byte, filename string) (*Service, error) + type ServiceDirectory struct + Mode string + type SignatureReport struct + Malformed int + Revoked []RevokedKey + Signers []string + Threshold int + Untrusted int + func (r SignatureReport) Err() error + func (r SignatureReport) OK() bool + func (r SignatureReport) RevokedNote() string + func (r SignatureReport) Signed() bool + func (r SignatureReport) String() string + type Signer struct + Key string + Name string + func ParseSigner(entry string) (Signer, error) + func ParseSigners(list string) ([]Signer, error) + func (s Signer) KeyID() string + func (s Signer) String() string + type Stage struct + Arch string + Dir string + GuestDir string + OS string + Prefix string + type StoreEntry struct + Bytes int64 + Newest bool + Project string + Version string + func LiveFromLocks(entries []StoreEntry, locks []Lock) (live, dead []StoreEntry) + func ScanStore(dir string) ([]StoreEntry, error) + type TrustSet struct + Revoked []RevokedKey + Signers []Signer + Threshold int + func DefaultTrustSet() TrustSet + func LoadTrustSet() (TrustSet, error) + func (t TrustSet) Count(digest string, atts []Attestation) (names []string, untrusted int, err error) + func (t TrustSet) Names() []string + type VariantConstraint struct + Exact bool + Propagate bool + Values []string + type VariantConstraints map[string]VariantConstraint + func ParseConstraints(s string) (VariantConstraints, error) + func (cs VariantConstraints) Satisfies(have Variants) bool + type Variants map[string][]string + func (v Variants) Bool(name string) (val, ok bool) + func (v Variants) String() string + type Ver struct + Nums []int + Raw string + Rebuild int + Tag string + Variant string + func FetchVersions(project string) ([]Ver, error) + func InstalledBuilds(project, dir string) []Ver + func ParseStoreDirName(name string) (Ver, bool) + func ParseVer(s string) Ver + func PickVersion(project, constraint string) (Ver, error) + func PickVersionFor(project, constraint, osn, arch string) (Ver, error) + func PickVersionForAll(project string, constraints []string, osn, arch string) (Ver, error) + func PickVersionForAllWarn(project string, constraints []string, osn, arch string) (Ver, string, error) + func VersionsFor(project, osn, arch string) ([]Ver, error) + func VersionsForSourced(project, osn, arch string) ([]Ver, bool, error) + func VersionsFromTags(tags []string) []Ver + func (v Ver) RegistryTag() string + func (v Ver) Satisfies(constraint string) bool + type Withdrawal struct + Because string + Hash string + SupersededBy string + Version string + func WithdrawalOf(project, version, hash string) (Withdrawal, bool) + func (w Withdrawal) String() string