|
Packit Service |
15f37d |
package osbuild1
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
// The RPMStageOptions describe the operations of the RPM stage.
|
|
Packit Service |
15f37d |
//
|
|
Packit Service |
15f37d |
// The RPM stage installs a given set of packages, identified by their
|
|
Packit Service |
15f37d |
// content hash. This ensures that given a set of RPM stage options,
|
|
Packit Service |
15f37d |
// the output is be reproducible, if the underlying tools are.
|
|
Packit Service |
15f37d |
type RPMStageOptions struct {
|
|
Packit Service |
15f37d |
GPGKeys []string `json:"gpgkeys,omitempty"`
|
|
Packit Service |
15f37d |
Packages []RPMPackage `json:"packages"`
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
// RPMPackage represents one RPM, as referenced by its content hash
|
|
Packit Service |
15f37d |
// (checksum). The files source must indicate where to fetch the given
|
|
Packit Service |
15f37d |
// RPM. If CheckGPG is `true` the RPM must be signed with one of the
|
|
Packit Service |
15f37d |
// GPGKeys given in the RPMStageOptions.
|
|
Packit Service |
15f37d |
type RPMPackage struct {
|
|
Packit Service |
15f37d |
Checksum string `json:"checksum"`
|
|
Packit Service |
15f37d |
CheckGPG bool `json:"check_gpg,omitempty"`
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
func (RPMStageOptions) isStageOptions() {}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
// NewRPMStage creates a new RPM stage.
|
|
Packit Service |
15f37d |
func NewRPMStage(options *RPMStageOptions) *Stage {
|
|
Packit Service |
15f37d |
return &Stage{
|
|
Packit Service |
15f37d |
Name: "org.osbuild.rpm",
|
|
Packit Service |
15f37d |
Options: options,
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
// RPMStageMetadata gives the set of packages installed by the RPM stage
|
|
Packit Service |
15f37d |
type RPMStageMetadata struct {
|
|
Packit Service |
15f37d |
Packages []RPMPackageMetadata `json:"packages"`
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
// RPMPackageMetadata contains the metadata extracted from one RPM header
|
|
Packit Service |
15f37d |
type RPMPackageMetadata struct {
|
|
Packit Service |
15f37d |
Name string `json:"name"`
|
|
Packit Service |
15f37d |
Version string `json:"version"`
|
|
Packit Service |
15f37d |
Release string `json:"release"`
|
|
Packit Service |
15f37d |
Epoch *string `json:"epoch"`
|
|
Packit Service |
15f37d |
Arch string `json:"arch"`
|
|
Packit Service |
15f37d |
SigMD5 string `json:"sigmd5"`
|
|
Packit Service |
15f37d |
SigPGP string `json:"sigpgp"`
|
|
Packit Service |
15f37d |
SigGPG string `json:"siggpg"`
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
func (RPMStageMetadata) isStageMetadata() {}
|