osbuild2: tar stage

Rename creation function from old assembler and add inputs.
This commit is contained in:
Achilleas Koutsou 2021-04-07 23:18:57 +02:00 committed by Ondřej Budai
parent 5c3dd46d63
commit 883adea2ac

View file

@ -16,11 +16,29 @@ type TarStageOptions struct {
func (TarStageOptions) isStageOptions() {}
type TarStageInput struct {
inputCommon
References TarStageReferences `json:"references"`
}
func (TarStageInput) isStageInput() {}
type TarStageInputs struct {
Tree *TarStageInput `json:"tree"`
}
func (TarStageInputs) isStageInputs() {}
type TarStageReferences []string
func (TarStageReferences) isReferences() {}
// Assembles a tree into a tar archive. Compression is determined by the suffix
// (i.e., --auto-compress is used).
func NewTarAssembler(options *TarStageOptions) *Stage {
func NewTarStage(options *TarStageOptions, inputs *TarStageInputs) *Stage {
return &Stage{
Type: "org.osbuild.tar",
Options: options,
Inputs: inputs,
}
}