Commit graph

13 commits

Author SHA1 Message Date
Tom Gundersen
529bc803db runner: introduce runner abstraction
For now all it does is represent the name of the runner and what requirements
it has of the build pipeline.

Move some package definitions from the runner package set to where it belongs.
2022-07-12 08:19:57 +01:00
Tom Gundersen
b405ce4d89 manifest/build: replace explicit dnf with implicit rpm
The pipelines don't use dnf, only rpm. Let the ones that need it pull it in.
2022-07-12 08:19:57 +01:00
Tom Gundersen
ab4a3c0885 manifest/commit_server: pull in nginx
nginx is a requirement for this pipeline to work.
2022-07-07 12:00:56 +01:00
Tom Gundersen
c296b666cf distro/fedora: drop usage of MakePackageChainSet
Pass PackageSets when initialising the Manifest, and read the chains back out.

This also fixes a bug where all repos were always used, rather than filtering per
package set.

Finally, this moves the 'chrony' inclusion from distro.go to the OSPipeline where
it belongs. In doing so the logic is changed slightly, where chrony is now
installed if NTP servers are configured (regardless of source), whereas in the
past it was included if the timezone was set in the blueprint (which made no sense).
2022-07-07 12:00:56 +01:00
Tom Gundersen
70d7a25a8e manifest: build packages - move over 'rpm-ostree'
Move `iotBuildPackages()` from the distro to the pipelines.
2022-07-04 23:04:29 +01:00
Tom Gundersen
4961a17ba8 manifest: implicitly track pipelines in manifest
Pipelines are now added to their manifest on creation, and we
ensure that dependants are associated with the same manifest.
2022-07-04 23:04:29 +01:00
Tom Gundersen
28b8a790b5 manifest: provide depsolved packages when serializing
Rather than providing packageSpecs when constructing the
Manifest, do so at Serialize() time.

This allows the overall flow to be:

```
m := Manifest.New()
m.AddPipeline()
...
c := m.GetPackageSetChains()
p := Depsolve(c)
m.Serialize(p)
```
2022-07-04 23:04:29 +01:00
Tom Gundersen
8f9b6eef8f manifest/pipelines: add ExtraPackages
Allow the packages returned by a pipeline to be extended by setting
the optional property ExtraPackages.

In the case of OSPipeline, a further UserPackages property is added.
This allows the caller to set the set of packages that should be
depsolevd in a second transaction, on top of the one for the base
packages.

This functionality is currently unused so this is a noop.
2022-07-04 23:04:29 +01:00
Tom Gundersen
fc08579c29 manifest/build: implement getPackageSetChain
A build pipeline now tracks all its dependents, and each pipeline
now implements a `getBuildPackages()` method. For now those
return the empty slice, but will be extended by each pipeline in the
future.

`getPackageSetChain() of the build pipeline simply collects all the
build package sets of its dependents.
2022-07-04 23:04:29 +01:00
Tom Gundersen
0743eb2f81 manifest: use call-by-reference in pipeline interface
This allows interface methods to modify the state of the pipeline
objects. We will use this in subsequent patches.
2022-07-04 23:04:29 +01:00
Tom Gundersen
ef952c90a8 manifest/pipelines: rename getPackages()
Name it `getPackageSpecs()` instead so we can introduce a new
function `getPackages()` that is about package names rather than
full specs, in a follow-up commit.
2022-07-04 23:04:29 +01:00
Tom Gundersen
6940853215 manifest: remove unused public functions from pipelines
These were only used from the manifest package, make them internal,
or read private fields directly.
2022-07-04 23:04:29 +01:00
Tom Gundersen
f791bde0e4 pipeline: fully encapsulate manifest generation
Make it the responsibility of each pipeline to track its required
sources, and use this to generate a manifest from its pipelines.

This removes the dependency on osbuild2 from distro.go, and the
only other uses of osbuild2 are to specify parameters in
ImageConfig, which will eventually go away too.

As a consequence, this only attaches the required sources for a
given manifest, rather than all known packages in the package set
map.
2022-07-04 23:04:29 +01:00
Renamed from internal/pipeline/commit_server_tree.go (Browse further)