Commit graph

69 commits

Author SHA1 Message Date
schutzbot
feee1255b0 Post release version bump
[skip ci]
2023-08-30 08:17:13 +00:00
schutzbot
271f5eff31 Post release version bump
[skip ci]
2023-08-23 15:27:18 +00:00
schutzbot
694e956104 Post release version bump
[skip ci]
2023-08-16 08:18:35 +00:00
schutzbot
b8836948c5 Post release version bump
[skip ci]
2023-08-02 08:15:32 +00:00
schutzbot
722d023104 Post release version bump
[skip ci]
2023-07-19 08:13:33 +00:00
schutzbot
06072d5d89 Post release version bump
[skip ci]
2023-06-27 12:58:15 +00:00
schutzbot
8a10dc7b5d Post release version bump
[skip ci]
2023-06-21 08:13:27 +00:00
schutzbot
a8bba69935 Post release version bump
[skip ci]
2023-06-07 08:14:17 +00:00
schutzbot
a7b3ef3936 Post release version bump
[skip ci]
2023-05-24 08:13:14 +00:00
schutzbot
4add41d50f Post release version bump
[skip ci]
2023-05-10 08:13:14 +00:00
schutzbot
1eb71723a0 Post release version bump
[skip ci]
2023-04-26 08:15:08 +00:00
schutzbot
1df905222e Post release version bump
[skip ci]
2023-04-12 08:13:49 +00:00
schutzbot
7f68136324 Post release version bump
[skip ci]
2023-03-29 08:14:39 +00:00
schutzbot
36341203a1 Post release version bump
[skip ci]
2023-02-27 16:41:44 +00:00
schutzbot
b5b3a5ba8c Post release version bump
[skip ci]
2023-02-20 14:37:54 +00:00
schutzbot
291726a83b Post release version bump
[skip ci]
2023-02-15 08:15:11 +00:00
schutzbot
ab2d48350a Post release version bump
[skip ci]
2023-02-07 15:51:39 +00:00
schutzbot
c0fb5cf90c Post release version bump
[skip ci]
2023-01-20 16:04:06 +00:00
schutzbot
c3eef90fed Post release version bump
[skip ci]
2023-01-18 08:14:30 +00:00
schutzbot
423f0a77c8 Post release version bump
[skip ci]
2023-01-04 08:14:40 +00:00
schutzbot
1133f4d24f Post release version bump
[skip ci]
2022-12-21 08:15:55 +00:00
schutzbot
cf4608fe43 Post release version bump
[skip ci]
2022-12-07 08:15:17 +00:00
schutzbot
5f1e2cf5aa Post release version bump
[skip ci]
2022-11-23 08:16:54 +00:00
schutzbot
70bed2e984 Post release version bump
[skip ci]
2022-11-09 08:19:42 +00:00
schutzbot
845f58631c Post release version bump
[skip ci]
2022-10-26 08:18:16 +00:00
schutzbot
6523fd8d41 Post release version bump
[skip ci]
2022-10-12 08:19:37 +00:00
schutzbot
14e3cfc860 Post release version bump
[skip ci]
2022-09-28 08:21:46 +00:00
schutzbot
a298254dce Post release version bump
[skip ci]
2022-09-14 08:18:10 +00:00
Simon de Vlieger
ea6085fae6 osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
schutzbot
1782f2fea9 Post release version bump
[skip ci]
2022-08-31 08:16:19 +00:00
schutzbot
d467e88f99 Post release version bump
[skip ci]
2022-08-26 17:11:12 +00:00
schutzbot
cf8ebb46b2 Post release version bump
[skip ci]
2022-08-17 08:17:53 +00:00
schutzbot
f91bb0a24f Post release version bump
[skip ci]
2022-08-03 08:18:04 +00:00
schutzbot
5fb7acc53e Post release version bump
[skip ci]
2022-07-27 09:06:45 +00:00
schutzbot
7dcc7d4499 Post release version bump
[skip ci]
2022-07-20 08:17:54 +00:00
schutzbot
b06c2311fd Post release version bump
[skip ci]
2022-07-06 08:26:42 +00:00
Simon de Vlieger
5c25f17ab7 main: add a --version argument
This adds a `osbuild --version` command that prints the current osbuild
version in use. Allows users to confirm their osbuild is up to date
enough to use newer features.
2022-07-06 09:57:24 +02:00
Christian Kellner
6c02002cbd pipeline: remove Assembler class
Now that assemblers are represented via the `Stage` class, the
Assembler class is not needed anymore. Adjust the monitor method
to take an `pipeline.Stage` for the `assembler` method as well.
2021-01-19 10:42:26 +01:00
Christian Kellner
945914b195 osbuild: introduce Manifest class
The 'Manifest' class represents what to build and the necessary
sources to do so. For now thus it is just a combination of the
pipeline the source options.
2021-01-09 18:09:47 +01:00
Christian Kellner
0b6f36158d osbuild: use load function via the format module
Instead of importing the load, load_build functions into the osbuild
namespace and using it via that, use the load function via the module
that provides them, i.e. the formats.v1 module.
2021-01-09 18:09:47 +01:00
Christian Kellner
aaf61ce9fc formats: extract manifest loading into module
Extract the code that loads a pipeline from a pipeline description,
i.e. a manifest, into a new module inside a new 'formats' package.
The idea is to have different descriptions, i.e. different formats,
for the same internal representation. This allows changing the
internal representation, i.e. data structures, but still having the
same external description.
Later a new description might be added that better matches the new
internal representation.
2021-01-09 18:09:47 +01:00
David Rheinsberg
421414ef0b osbuild: extract CLI to prepare for additional entrypoints
This extracts the CLI entrypoint into `main_cli.py` and prepares the
codebase for the introduction of additional entrypoints. This should
not contain any functional changes.

The idea behind this is to add `main_api.py` (and maybe more in the
future), which will be similar to `main_cli.py` but contain the
`osbuild-api` entrypoint. This will make all entrypoints nicely symetric
and the only difference will be `setup.py` selecting the right
entrypoint for each executable, as well as `__main__.py` selecting the
entrypoint for the module itself (which we will keep to the CLI for
compatibility).
2020-04-28 15:39:54 +02:00
Lars Karlitski
82a2be53d4 pipeline: return logs in --json mode
A pipeline run only returned logs in the `StageFailed` and
`AssemblerFailed` exceptions. Remove those and always return structured
data instead.

It only returns data for stages that actually ran (i.e., didn't come
from the cache). This is similar to the output in interactive mode.

Also change osbuildtest to be able to deal with output that is larger
than the pipe buffer by using subprocess.communicate().
2019-12-14 13:49:24 +01:00
Lars Karlitski
64713449ce Introduce runners
We've been using a generic `osbuild-run`, which sets up the build
environment (and works around bugs) for all build roots. It is already
getting unwieldy, because it tries to detect the OS for some things it
configures. It's also about to cause problems for RHEL, which doesn't
currently support a python3 shebang without having /etc around.

This patch changes the `build` key in a pipeline to not be a pipeline
itself, but an object with `runner` and `pipeline` keys. `pipeline` is
the build pipeline, as before. `runner` is the name of the runner to
use. Runners are programs in the `runners` subdirectory.

Three runners are included in this patch. They're copies of osbuild-run
for now (except some additions for rhel82). The idea is that each of
them only contains the minimal setup code necessary for an OS, and that
we can review what's needed when updating a build root.

Also modify the `--build-pipeline` command line switch to accept such a
build object (instead of a pipeline) and rename it accordingly, to
`--build-env`.

Correspondingly, `OSBUILD_TEST_BUILD_PIPELINE` → `OSBUILD_TEST_BUILD_ENV`.
2019-11-25 13:05:22 +01:00
Tom Gundersen
679b79c5e5 osbuild: split package into separate files
Import modules between files using the syntax `from . import foobar`,
renaming what used to be `FooBar` to `foobar.FooBar` when moved to a
separate file.

In __init__.py only import what is meant to be public API.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-08-21 09:56:50 +04:00
Tom Gundersen
9741087e92 Stage/init: fix the order of arguments
Make the order of argumnets in line with how it is used (and also
how it is conceptionally closer to the pipeline json document).

This makes no practical difference as the two arguments were both
just used for computing the hash.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-08-13 17:13:13 +02:00
Tom Gundersen
6d7cd1b93c Pipeline: drop the base concept
Each pipeline is now self-contained without references to another.
However, as the final stage in a pipeline is saved to the content
store, we are able to reuse it if one pipeline is the prefix of
another, as described in the previous commit. This makes the
concept of a base redundant.

The ObjectStore must take a directory as argument, never None, so
the conditional assertion for this in Pipeline.run() is ok to
remove.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-08-13 17:13:13 +02:00
Tom Gundersen
67da9e0cca Pipeline: reuse existing trees if they exist in the object store
Don't do this only for the base, but for any prefix of the current
pipeline.

Note that if two pipelines share a prefix, but one is not the prefix
of another, no sharing is possible. Only a proper prefix can be
reused by another pipeline, as only the result of the last pipeline
is saved to the object store (this restriction could be changed in
the future).

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-08-13 17:13:13 +02:00
Tom Gundersen
0a9223b6f2 Pipeline: drop the build setter
Take this as an argumnet to __init__ in the same way that `base`
is.

This avoids us having to deal with the case of someone setting a
stage before the build, which does not work as the stage id will
be wrong.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-08-13 17:13:13 +02:00
Lars Karlitski
68832d2aaf osbuild: check for right errno from os.rename()
Renaming a directory over an existing one is only an error if the
existing one is not empty, in which case ENOEMPTY is thrown.

Tested with:

    >>> os.mkdir("foo")
    >>> os.mkdir("bar")
    >>> os.rename("foo", "bar")
    # no error

    >>> open("foo/a", "w").write("a")
    1
    >>> try: os.rename("bar", "foo")
    ... except OSError as e: e.errno == errno.ENOTEMPTY
    ...
    True
2019-08-12 13:06:18 +02:00