New mount type added: org.osbuild.ostree.deployment. Adding this to a stage will setup all needed bind mounts so that a given `tree` will look like an active OSTree deployment, very much as OSTree does during early boot. This is often necessary when making changes to files in /etc for an ostree image.
32 lines
725 B
Go
32 lines
725 B
Go
package osbuild
|
|
|
|
type OSTreeMountOptions struct {
|
|
Deployment OSTreeMountDeployment `json:"deployment"`
|
|
}
|
|
|
|
func (OSTreeMountOptions) isMountOptions() {}
|
|
|
|
type OSTreeMountDeployment struct {
|
|
// Name of the stateroot to be used in the deployment
|
|
OSName string `json:"osname"`
|
|
|
|
// OStree ref to create and use for deployment
|
|
Ref string `json:"ref"`
|
|
|
|
// The deployment serial (usually '0')
|
|
Serial *int `json:"serial,omitempty"`
|
|
}
|
|
|
|
func NewOSTreeDeploymentMount(name, osName, ref string, serial int) *Mount {
|
|
return &Mount{
|
|
Type: "org.osbuild.ostree.deployment",
|
|
Name: name,
|
|
Options: &OSTreeMountOptions{
|
|
Deployment: OSTreeMountDeployment{
|
|
OSName: osName,
|
|
Ref: ref,
|
|
Serial: &serial,
|
|
},
|
|
},
|
|
}
|
|
}
|