builder

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Buildscript string
	Buildconf   string

	Bundledir   string
	Cert        string
	Clearver    string
	Format      string
	Mixver      string
	Repodir     string
	Rpmdir      string
	Statedir    string
	Versiondir  string
	Yumconf     string
	Yumtemplate string
	Upstreamurl string

	Signing int
	Bump    int
}

A Builder contains all configurable fields required to perform a full mix operation, and is used to encapsulate life time data.

func New

func New() *Builder

New will return a new instance of Builder with some predetermined sane default values.

func NewFromConfig

func NewFromConfig(conf string) *Builder

NewFromConfig creates a new Builder with the given Configuration.

func (*Builder) AddBundles

func (b *Builder) AddBundles(bundles []string, force bool, allbundles bool, git bool) int

AddBundles will copy the specified clr-bundles from the configured Clear Linux version to the mix-bundles directory bundles: array slice of bundle names force: override bundle in mix-dir when present all: include all CLR bundles. Overrides bundles. git: automatically git commit with bundles added

func (*Builder) AddRPMList

func (b *Builder) AddRPMList(rpms []os.FileInfo)

AddRPMList copies rpms into the repodir and calls createrepo_c on it to generate a yum-consumable repository for the chroot builder to use.

func (*Builder) BuildChroots

func (b *Builder) BuildChroots(template *x509.Certificate, privkey *rsa.PrivateKey, signflag bool) error

BuildChroots will attempt to construct the chroots required by populating roots using the m4 bundle configurations in conjunction with the YUM configuration file, installing all required named packages into the roots.

func (*Builder) BuildImage

func (b *Builder) BuildImage(format string, template string)

BuildImage will now proceed to build the full image with the previously validated configuration.

func (*Builder) BuildUpdate

func (b *Builder) BuildUpdate(prefixflag string, minvflag int, formatflag string, signflag bool, publishflag bool, keepchrootsflag bool) error

BuildUpdate will produce an update consumable by the swupd client

func (*Builder) CleanChroots

func (b *Builder) CleanChroots()

CleanChroots will remove chroots based on what bundles are defined

func (*Builder) InitMix

func (b *Builder) InitMix(clearver string, mixver string, all bool, upstreamurl string) error

InitMix will initialise a new swupd-client consumable "mix" with the given based Clear Linux version and specified mix version.

func (*Builder) LoadBuilderConf

func (b *Builder) LoadBuilderConf(builderconf string)

LoadBuilderConf will read the builder configuration from the command line if it was provided, otherwise it will fall back to reading the configuration from the local builder.conf file.

func (*Builder) ReadBuilderConf

func (b *Builder) ReadBuilderConf()

ReadBuilderConf will populate the configuration data from the builder configuration file, which is mandatory information for performing a mix.

func (*Builder) ReadVersions

func (b *Builder) ReadVersions()

ReadVersions will initialise the mix versions (mix and clearlinux) from the configuration files in the version directory.

func (*Builder) SignManifestMOM

func (b *Builder) SignManifestMOM()

SignManifestMOM will sign the Manifest.Mom file in in place based on the Mix version read from builder.conf. Shelling out to openssl because signing and pkcs7 stuff is not well supported in Go yet.. but the command works well and is how things worked previously

func (*Builder) UpdateMixVer

func (b *Builder) UpdateMixVer()

UpdatMixVer automatically bumps the mixversion file +10 to prepare for the next build without requiring user intervention. This makes the flow slightly more automatable.

func (*Builder) UpdateRepo

func (b *Builder) UpdateRepo(ver string, allbundles bool)

UpdateRepo will fetch the clr-bundles for our configured Clear Linux version

Jump to

Keyboard shortcuts

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