constants

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrubConf               = "/etc/cos/grub.cfg"
	GrubOEMEnv             = "grub_oem_env"
	GrubDefEntry           = "cOS"
	DefaultTty             = "tty1"
	BiosPartName           = "bios"
	EfiLabel               = "COS_GRUB"
	EfiPartName            = "efi"
	ActiveLabel            = "COS_ACTIVE"
	PassiveLabel           = "COS_PASSIVE"
	SystemLabel            = "COS_SYSTEM"
	RecoveryLabel          = "COS_RECOVERY"
	RecoveryPartName       = "recovery"
	StateLabel             = "COS_STATE"
	StatePartName          = "state"
	InstallStateFile       = "state.yaml"
	PersistentLabel        = "COS_PERSISTENT"
	PersistentPartName     = "persistent"
	OEMLabel               = "COS_OEM"
	OEMPartName            = "oem"
	MountBinary            = "/usr/bin/mount"
	EfiDevice              = "/sys/firmware/efi"
	LinuxFs                = "ext4"
	LinuxImgFs             = "ext2"
	SquashFs               = "squashfs"
	EfiFs                  = "vfat"
	BiosFs                 = ""
	EfiSize                = uint(64)
	OEMSize                = uint(64)
	StateSize              = uint(15360)
	RecoverySize           = uint(8192)
	PersistentSize         = uint(0)
	BiosSize               = uint(1)
	ImgSize                = uint(3072)
	HTTPTimeout            = 60
	PartStage              = "partitioning"
	LiveDir                = "/run/initramfs/live"
	RecoveryDir            = "/run/cos/recovery"
	StateDir               = "/run/cos/state"
	OEMDir                 = "/run/cos/oem"
	PersistentDir          = "/run/cos/persistent"
	ActiveDir              = "/run/cos/active"
	TransitionDir          = "/run/cos/transition"
	EfiDir                 = "/run/cos/efi"
	RecoverySquashFile     = "recovery.squashfs"
	ActiveImgFile          = "active.img"
	PassiveImgFile         = "passive.img"
	RecoveryImgFile        = "recovery.img"
	IsoBaseTree            = "/run/rootfsbase"
	CosSetup               = "/usr/bin/cos-setup"
	AfterInstallChrootHook = "after-install-chroot"
	AfterInstallHook       = "after-install"
	BeforeInstallHook      = "before-install"
	AfterResetChrootHook   = "after-reset-chroot"
	AfterResetHook         = "after-reset"
	BeforeResetHook        = "before-reset"
	AfterUpgradeChrootHook = "after-upgrade-chroot"
	AfterUpgradeHook       = "after-upgrade"
	BeforeUpgradeHook      = "before-upgrade"
	LuetCosignPlugin       = "luet-cosign"
	LuetMtreePlugin        = "luet-mtree"
	LuetDefaultRepoURI     = "quay.io/costoolkit/releases-green"
	LuetRepoMaxPrio        = 1
	LuetDefaultRepoPrio    = 90
	UpgradeActive          = "active"
	UpgradeRecovery        = "recovery"
	ChannelSource          = "system/cos"
	TransitionImgFile      = "transition.img"
	TransitionSquashFile   = "transition.squashfs"
	RunningStateDir        = "/run/initramfs/cos-state" // TODO: converge this constant with StateDir/RecoveryDir in dracut module from cos-toolkit
	ActiveImgName          = "active"
	PassiveImgName         = "passive"
	RecoveryImgName        = "recovery"
	GPT                    = "gpt"
	BuildImgName           = "elemental"
	UsrLocalPath           = "/usr/local"
	OEMPath                = "/oem"

	// SELinux targeted policy paths
	SELinuxTargetedPath        = "/etc/selinux/targeted"
	SELinuxTargetedContextFile = SELinuxTargetedPath + "/contexts/files/file_contexts"
	SELinuxTargetedPolicyPath  = SELinuxTargetedPath + "/policy"

	// Kernel and initrd paths are arbitrary and coupled to grub.cfg
	IsoKernelPath = "/boot/kernel"
	IsoInitrdPath = "/boot/initrd"
	IsoRootFile   = "rootfs.squashfs"
	IsoEFIImg     = "uefi.img"
	ISOLabel      = "COS_LIVE"

	// Default directory and file fileModes
	DirPerm        = os.ModeDir | os.ModePerm
	FilePerm       = 0666
	NoWriteDirPerm = 0555 | os.ModeDir
	TempDirPerm    = os.ModePerm | os.ModeSticky | os.ModeDir

	// Eject script
	EjectScript = "#!/bin/sh\n/usr/bin/eject -rmF"

	ArchAmd64 = "amd64"
	Archx86   = "x86_64"
	ArchArm64 = "arm64"

	Fedora = "fedora"
	Ubuntu = "ubuntu"
	Suse   = "suse"
)

Variables

This section is empty.

Functions

func GetBuildDiskDefaultPackages

func GetBuildDiskDefaultPackages() map[string]string

func GetBuildKeyEnvMap

func GetBuildKeyEnvMap() map[string]string

GetBuildKeyEnvMap returns environment variable bindings to BuildConfig data

func GetCloudInitPaths

func GetCloudInitPaths() []string

func GetDefaultSquashfsCompressionOptions

func GetDefaultSquashfsCompressionOptions() []string

func GetDefaultSquashfsOptions

func GetDefaultSquashfsOptions() []string

GetDefaultSquashfsOptions returns the default options to use when creating a squashfs

func GetDiskKeyEnvMap

func GetDiskKeyEnvMap() map[string]string

GetDiskKeyEnvMap returns environment variable bindings to RawDisk data

func GetISOKeyEnvMap

func GetISOKeyEnvMap() map[string]string

GetISOKeyEnvMap returns environment variable bindings to LiveISO data

func GetInstallKeyEnvMap

func GetInstallKeyEnvMap() map[string]string

GetInstallKeyEnvMap returns environment variable bindings to InstallSpec data

func GetResetKeyEnvMap

func GetResetKeyEnvMap() map[string]string

GetResetKeyEnvMap returns environment variable bindings to ResetSpec data

func GetRunKeyEnvMap

func GetRunKeyEnvMap() map[string]string

GetRunKeyEnvMap returns environment variable bindings to RunConfig data

func GetUpgradeKeyEnvMap

func GetUpgradeKeyEnvMap() map[string]string

GetUpgradeKeyEnvMap returns environment variable bindings to UpgradeSpec data

Types

This section is empty.

Jump to

Keyboard shortcuts

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