Documentation
¶
Overview ¶
Package rpm reads bounded RPM v4 headers for native repository metadata.
Index ¶
- Constants
- func DecodeRepomd(body []byte, root string) (string, string, error)
- func IsPrimaryMetadataPath(p string) bool
- func Serves(t repo.PackageType) bool
- func SignRepomd(body []byte, armoredPrivate, passphrase string) ([]byte, error)
- type Dependency
- type Handler
- func (Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Classify(_ repo.Config, p string) format.Class
- func (Handler) Deleted(ctx context.Context, env format.Env, c repo.Config, removed []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Inspect(ctx context.Context, env format.Env, _ repo.Config, w format.Write) (any, error)
- func (Handler) Owed(c repo.Config, cached bool, p string) []format.WorkRef
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- func (Handler) Work(ctx context.Context, env format.Env, work types.WorkItem) error
- func (Handler) WorkKinds() []string
- type Metadata
- type Package
Constants ¶
const ( KindIndex = "rpm.index" PropName = "rpm.name" PropVersion = "rpm.version" PropRelease = "rpm.release" PropArch = "rpm.architecture" )
Variables ¶
This section is empty.
Functions ¶
func DecodeRepomd ¶
DecodeRepomd validates the published primary reference. The referenced primary is fetched and checked separately, before any virtual composition.
func IsPrimaryMetadataPath ¶
IsPrimaryMetadataPath recognizes the checksum-named primary indexes published by createrepo_c and older Yum tooling.
func Serves ¶
func Serves(t repo.PackageType) bool
Types ¶
type Dependency ¶
Dependency is an RPM capability and its optional epoch-version-release constraint. Flags retain the RPM sense bits until repodata is encoded.
type Handler ¶
type Metadata ¶
Metadata is a complete depth-root repodata publication. Files are keyed relative to that root, so all metadata paths sit inside repodata/.
type Package ¶
type Package struct {
Name, Version, Release, Architecture string
Summary, Description, License, URL string
Path string
Epoch uint32
InstalledSize uint64
BuildTime uint32
ArchiveSize int64
SHA256 string
Provides, Requires, Conflicts, Obsoletes []Dependency
}
Package is the identity and descriptive metadata read from a genuine RPM header. Path and checksums are supplied by the content-addressed item.
func DecodePrimary ¶
DecodePrimary validates a checksum-addressed, bounded primary index and returns packages with repository-relative paths for native selection.
func ReadPackage ¶
ReadPackage validates the lead, signature and main header bounds, the package's header identity against its path, and the compressed payload digest when the RPM supplies one. The reader is the stored blob itself.