Documentation
¶
Overview ¶
Package dnfpins queries AlmaLinux 10 repodata over HTTP and updates package pins across Dockerfiles and .goreleaser.yaml.
Index ¶
- Constants
- func RpmCompareValues(a, b string) int
- func UpdateDockerfileAnsiblePins(path, ansibleVer, bashVer string) error
- func UpdateDockerfileUbiPins(path, shadowVer, bashVer string) error
- func UpdateGoreleaserDnfPins(path string, pins *AlmaLinuxPins) error
- type AlmaLinuxPins
- type PrimaryXML
- type RepomdDataElem
- type RepomdLocation
- type RepomdXML
- type RpmPackage
- type RpmVersion
Constants ¶
const ( AlmaLinuxBaseURL = "https://repo.almalinux.org/almalinux/10" AnsibleDockerfilePath = "containers/ansible/Dockerfile" UbiDockerfilePath = "containers/ubi/Dockerfile" GoreleaserConfigPath = ".goreleaser.yaml" )
The AlmaLinux 10 repository and the files whose pins are rewritten from it.
Variables ¶
This section is empty.
Functions ¶
func RpmCompareValues ¶
RpmCompareValues implements the RPM segment comparison algorithm (rpmvercmp).
func UpdateDockerfileAnsiblePins ¶
UpdateDockerfileAnsiblePins updates the ARG lines in containers/ansible/Dockerfile.
func UpdateDockerfileUbiPins ¶
UpdateDockerfileUbiPins updates the ARG lines in containers/ubi/Dockerfile.
func UpdateGoreleaserDnfPins ¶
func UpdateGoreleaserDnfPins(path string, pins *AlmaLinuxPins) error
UpdateGoreleaserDnfPins updates build_args in .goreleaser.yaml for both cargoship-ubi and cargoship-ansible.
Types ¶
type AlmaLinuxPins ¶
AlmaLinuxPins holds the newest version of each package the containers pin.
func QueryLatestAlmaLinuxPackages ¶
func QueryLatestAlmaLinuxPackages(ctx context.Context) (*AlmaLinuxPins, error)
QueryLatestAlmaLinuxPackages finds latest versions of ansible-core, bash-completion, and shadow-utils.
type PrimaryXML ¶
type PrimaryXML struct {
XMLName xml.Name `xml:"metadata"`
Packages []RpmPackage `xml:"package"`
}
PrimaryXML represents metadata xml packages.
func FetchPrimaryXML ¶
FetchPrimaryXML fetches and decodes the primary.xml.gz from a given repository component.
type RepomdDataElem ¶
type RepomdDataElem struct {
Type string `xml:"type,attr"`
Location RepomdLocation `xml:"location"`
}
RepomdDataElem is one <data> element of a repomd.xml index.
type RepomdLocation ¶
type RepomdLocation struct {
Href string `xml:"href,attr"`
}
RepomdLocation is a location href, relative to the repository root.
type RepomdXML ¶
type RepomdXML struct {
XMLName xml.Name `xml:"repomd"`
Data []RepomdDataElem `xml:"data"`
}
RepomdXML models the top-level repodata/repomd.xml index.
type RpmPackage ¶
type RpmPackage struct {
Name string `xml:"name"`
Arch string `xml:"arch"`
Version RpmVersion `xml:"version"`
Checksum string `xml:"checksum"`
Location RepomdLocation `xml:"location"`
}
RpmPackage is one <package> entry of a primary.xml document.
func FindLatestRPM ¶
func FindLatestRPM(primary *PrimaryXML, pkgName string) (*RpmPackage, error)
FindLatestRPM searches PrimaryXML for the newest version of pkgName.
type RpmVersion ¶
type RpmVersion struct {
Epoch string `xml:"epoch,attr"`
Ver string `xml:"ver,attr"`
Rel string `xml:"rel,attr"`
}
RpmVersion is an RPM epoch-version-release triple, as primary.xml spells it.
func (RpmVersion) Compare ¶
func (v RpmVersion) Compare(other RpmVersion) int
Compare compares RpmVersion to other using standard RPM EVR comparison semantics. Returns -1 if v < other, 0 if v == other, 1 if v > other.
func (RpmVersion) FullVersion ¶
func (v RpmVersion) FullVersion() string
FullVersion returns the version-release representation used for package specification: "<ver>-<rel>".