debootstrap

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const BuilderId = "debootstrap.builder"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	StateData map[string]interface{}
	// contains filtered or unexported fields
}

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (*Artifact) Id() string

func (*Artifact) State

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) ConfigSpec

func (b *Builder) ConfigSpec() hcldec.ObjectSpec

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) (generatedVars []string, warnings []string, err error)

func (*Builder) Run

func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error)

type Cleanup added in v0.0.3

type Cleanup interface {
	Cleanup(multistep.StateBag)
}

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	Suite     string `mapstructure:"suite" required:"true"`
	MirrorURL string `mapstructure:"mirror_url" required:"true"`

	Variant string `mapstructure:"variant" required:"false"`

	MountPath         string     `mapstructure:"mount_path" required:"false"`
	MountDevice       string     `mapstructure:"mount_device" required:"false"`
	MountChrootDevice [][]string `mapstructure:"mount_chroot_device" required:"false"`

	CommandWrapper string `mapstructure:"command_wrapper" required:"false"`

	RootfsArchivePath    string `mapstructure:"rootfs_archive_path" required:"false"`
	RootfsArchiveCommand string `mapstructure:"rootfs_archive_command" required:"false"`
	RootfsArchiveUid     string `mapstructure:"rootfs_archive_uid" required:"false"`
	RootfsArchiveGid     string `mapstructure:"rootfs_archive_gid" required:"false"`

	SquashfsPath    string `mapstructure:"squashfs_path" required:"false"`
	SquashfsCommand string `mapstructure:"squashfs_command" required:"false"`
	SquashfsFormat  string `mapstructure:"squashfs_format" required:"false"`
	SquashfsUid     string `mapstructure:"squashfs_uid" required:"false"`
	SquashfsGid     string `mapstructure:"squashfs_gid" required:"false"`
	// contains filtered or unexported fields
}

func (*Config) FlatMapstructure

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type FlatConfig

type FlatConfig struct {
	PackerBuildName      *string           `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"`
	PackerBuilderType    *string           `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"`
	PackerCoreVersion    *string           `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"`
	PackerDebug          *bool             `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"`
	PackerForce          *bool             `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"`
	PackerOnError        *string           `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"`
	PackerUserVars       map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"`
	PackerSensitiveVars  []string          `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
	Suite                *string           `mapstructure:"suite" required:"true" cty:"suite" hcl:"suite"`
	MirrorURL            *string           `mapstructure:"mirror_url" required:"true" cty:"mirror_url" hcl:"mirror_url"`
	Variant              *string           `mapstructure:"variant" required:"false" cty:"variant" hcl:"variant"`
	MountPath            *string           `mapstructure:"mount_path" required:"false" cty:"mount_path" hcl:"mount_path"`
	MountDevice          *string           `mapstructure:"mount_device" required:"false" cty:"mount_device" hcl:"mount_device"`
	MountChrootDevice    [][]string        `mapstructure:"mount_chroot_device" required:"false" cty:"mount_chroot_device" hcl:"mount_chroot_device"`
	CommandWrapper       *string           `mapstructure:"command_wrapper" required:"false" cty:"command_wrapper" hcl:"command_wrapper"`
	RootfsArchivePath    *string           `mapstructure:"rootfs_archive_path" required:"false" cty:"rootfs_archive_path" hcl:"rootfs_archive_path"`
	RootfsArchiveCommand *string           `mapstructure:"rootfs_archive_command" required:"false" cty:"rootfs_archive_command" hcl:"rootfs_archive_command"`
	RootfsArchiveUid     *string           `mapstructure:"rootfs_archive_uid" required:"false" cty:"rootfs_archive_uid" hcl:"rootfs_archive_uid"`
	RootfsArchiveGid     *string           `mapstructure:"rootfs_archive_gid" required:"false" cty:"rootfs_archive_gid" hcl:"rootfs_archive_gid"`
	SquashfsPath         *string           `mapstructure:"squashfs_path" required:"false" cty:"squashfs_path" hcl:"squashfs_path"`
	SquashfsCommand      *string           `mapstructure:"squashfs_command" required:"false" cty:"squashfs_command" hcl:"squashfs_command"`
	SquashfsFormat       *string           `mapstructure:"squashfs_format" required:"false" cty:"squashfs_format" hcl:"squashfs_format"`
	SquashfsUid          *string           `mapstructure:"squashfs_uid" required:"false" cty:"squashfs_uid" hcl:"squashfs_uid"`
	SquashfsGid          *string           `mapstructure:"squashfs_gid" required:"false" cty:"squashfs_gid" hcl:"squashfs_gid"`
}

FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfig) HCL2Spec

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

type StepDebootstrap

type StepDebootstrap struct {
	Suite     string
	Variant   string
	MountPath string
	MirrorURL string
}

func (*StepDebootstrap) Cleanup

func (s *StepDebootstrap) Cleanup(state multistep.StateBag)

func (*StepDebootstrap) Run

type StepEarlyCleanup added in v0.0.3

type StepEarlyCleanup struct{}

func (*StepEarlyCleanup) Cleanup added in v0.0.3

func (s *StepEarlyCleanup) Cleanup(state multistep.StateBag)

func (*StepEarlyCleanup) Run added in v0.0.3

type StepMakeSquashfs added in v0.0.5

type StepMakeSquashfs struct {
	MountPath       string
	SquashfsPath    string
	SquashfsCommand string
	SquashfsFormat  string
	SquashfsUid     string
	SquashfsGid     string
}

func (*StepMakeSquashfs) Cleanup added in v0.0.5

func (s *StepMakeSquashfs) Cleanup(state multistep.StateBag)

func (*StepMakeSquashfs) Run added in v0.0.5

type StepMountChrootDevice added in v0.0.2

type StepMountChrootDevice struct {
	MountChrootDevice [][]string
}

func (*StepMountChrootDevice) Cleanup added in v0.0.2

func (s *StepMountChrootDevice) Cleanup(state multistep.StateBag)

func (*StepMountChrootDevice) Run added in v0.0.2

type StepMountDevice added in v0.0.2

type StepMountDevice struct {
	MountPath   string
	MountDevice string
}

func (*StepMountDevice) Cleanup added in v0.0.2

func (s *StepMountDevice) Cleanup(state multistep.StateBag)

func (*StepMountDevice) Run added in v0.0.2

type StepPrepareMountPath added in v0.0.2

type StepPrepareMountPath struct {
	MountPath string
}

func (*StepPrepareMountPath) Cleanup added in v0.0.2

func (s *StepPrepareMountPath) Cleanup(state multistep.StateBag)

func (*StepPrepareMountPath) Run added in v0.0.2

type StepRootfsArchive added in v0.0.3

type StepRootfsArchive struct {
	MountPath            string
	RootfsArchivePath    string
	RootfsArchiveCommand string
	RootfsArchiveUid     string
	RootfsArchiveGid     string
}

func (*StepRootfsArchive) Cleanup added in v0.0.3

func (s *StepRootfsArchive) Cleanup(state multistep.StateBag)

func (*StepRootfsArchive) Run added in v0.0.3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL