Documentation ¶
Index ¶
- type Builder
- func (b *Builder) AddBundles(bundles []string, force bool, allbundles bool, git bool) int
- func (b *Builder) AddRPMList(rpms []os.FileInfo)
- func (b *Builder) BuildChroots(template *x509.Certificate, privkey *rsa.PrivateKey, signflag bool) error
- func (b *Builder) BuildImage(format string, template string)
- func (b *Builder) BuildUpdate(prefixflag string, minvflag int, formatflag string, signflag bool, ...) error
- func (b *Builder) CleanChroots()
- func (b *Builder) InitMix(clearver string, mixver string, all bool, upstreamurl string) error
- func (b *Builder) LoadBuilderConf(builderconf string)
- func (b *Builder) ReadBuilderConf()
- func (b *Builder) ReadVersions()
- func (b *Builder) SignManifestMOM()
- func (b *Builder) UpdateMixVer()
- func (b *Builder) UpdateRepo(ver string, allbundles bool)
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 ¶
NewFromConfig creates a new Builder with the given Configuration.
func (*Builder) AddBundles ¶
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 ¶
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 ¶
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 ¶
InitMix will initialise a new swupd-client consumable "mix" with the given based Clear Linux version and specified mix version.
func (*Builder) LoadBuilderConf ¶
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 ¶
UpdateRepo will fetch the clr-bundles for our configured Clear Linux version