diff --git a/internal/osbuild2/tar_stage.go b/internal/osbuild2/tar_stage.go new file mode 100644 index 000000000..f8c87963b --- /dev/null +++ b/internal/osbuild2/tar_stage.go @@ -0,0 +1,26 @@ +package osbuild2 + +type TarStageOptions struct { + // Filename for tar archive + Filename string `json:"filename"` + + // Enable support for POSIX ACLs + ACLs bool `json:"acls,omitempty"` + + // Enable support for SELinux contexts + SELinux bool `json:"selinux,omitempty"` + + // Enable support for extended attributes + Xattrs bool `json:"xattrs,omitempty"` +} + +func (TarStageOptions) isStageOptions() {} + +// Assembles a tree into a tar archive. Compression is determined by the suffix +// (i.e., --auto-compress is used). +func NewTarAssembler(options *TarStageOptions) *Stage { + return &Stage{ + Type: "org.osbuild.tar", + Options: options, + } +}