Commit graph

29 commits

Author SHA1 Message Date
Jacob Kozol
51c610e1ae osbuild: remove tar image size
Image size should not be specified for a tar image. When the tar
assembler was being created image size was not passed to it. However,
the TarAssemblerOptions contained a Size field which would default to 0.
This field is removed so that the tar assembler options no longer
specify a size. The assembler tests are also updated to reflect this
change.
2020-04-29 12:36:43 +02:00
Martin Sehnoutka
439b005514 distro: harcode partuuids
We need to make partition uuids stable to be able to run image-info
tests on images using gpt. For example all aarch64 images use gpt.

Also change the type of the (part) UUID to string because that's what
the other UUIDs use and it is easier to work with.
2020-04-15 15:22:57 +02:00
Martin Sehnoutka
cdb4b72cf0 osbuild: add partuuid into the partition struct
The partuuid is a uuid of a specific GPT partition as opposed to the ptuuid
which is associated with the partition table and filesystem uuid which
is associated with a filesystem on a partition.

The support for partuuid was introduced in osbuild 11, see this PR for
reference: https://github.com/osbuild/osbuild/pull/306
2020-04-14 07:55:48 +02:00
Jiri Kortus
b0e28689fb Add unit test for systemd stage
Refs: #406
2020-04-01 09:52:10 +02:00
Jiri Kortus
e516180640 Add unit tests for SELinux stage
Refs: #406
2020-04-01 00:26:22 +02:00
Jiri Kortus
44b501d401 Add unit test for timezone stage
Refs: #406
2020-04-01 00:25:59 +02:00
Jiri Kortus
8dafb64f1b Add unit tests for script stage
Refs: #406
2020-04-01 00:25:34 +02:00
Jiri Kortus
8c808831d3 Add unit test for users stage
Refs: #406
2020-04-01 00:24:39 +02:00
Jiri Kortus
ea02b33d2b Add unit test for RPM stage
Refs: #406
2020-04-01 00:19:43 +02:00
Jiri Kortus
600a0f50a9 Add unit test for locale stage
Refs: #406
2020-03-31 09:35:20 +02:00
Jiri Kortus
c4d5edaf0d Add unit tests for Pipeline struct
Refs: #406
2020-03-31 09:35:11 +02:00
Jiri Kortus
f5ad337c62 Add unit test for keymap stage
Refs: #406
2020-03-30 20:45:33 +02:00
Jiri Kortus
c2ed6da92e Add unit test for hostname stage
Refs: #405
2020-03-30 20:44:16 +02:00
Jiri Kortus
5fc1f10ecb Add unit test for GRUB2 stage
Refs: #405
2020-03-27 19:18:14 +01:00
Jiri Kortus
3306a3b20e Add unit test for groups stage
Refs: #405
2020-03-27 19:11:13 +01:00
Jiri Kortus
bc52b93ece Add unit tests for fstab stage
Refs: #405
2020-03-27 19:10:42 +01:00
Jiri Kortus
ea3fccd643 Add unit tests for chrony stage
Refs: #405
2020-03-27 19:09:30 +01:00
Jiri Kortus
dd3fc6bd7c Add coverage for *assembler.go
Resolves: #363
2020-03-27 16:37:12 +02:00
Jiri Kortus
2d8b9c3178 Add unit test for firewall stage
Refs: #405
2020-03-27 15:22:08 +01:00
Jiri Kortus
dae77de5ac Add unit test for Fix BLS stage
Refs: #405
2020-03-27 15:21:47 +01:00
Tom Gundersen
895a4769e3 osbuild: remove dead code
The helper functions were never used, we should aim to use the
osbuild types just as regular structs for serialization purposes.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-03-26 00:31:37 +01:00
Jiri Kortus
f5cf649511 Fix typo in RootFilesystemUUID
RootFilesystemUUDI -> RootFilesystemUUID
2020-03-24 11:01:20 +01:00
Ondřej Budai
54e27e607c stage: make the unmarshalling error more verbose
Prior this commit there was no information in the log about the unrecognized
stage. This commit adds the stage name to the unmarshalling error.
2020-03-17 12:21:01 +01:00
Tom Gundersen
8d3be9e2c0 osbuild/stages: drop the dnf stage
This is no longer used, and will be deprecated in osbuild eventually.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-03-15 19:38:59 +01:00
Tom Gundersen
4da1ab03b3 osbuild: introduce manifest concept
A manifest is simply a struct containing a sources and a pipeline
object. We want to store and transfer pielines always with their
sources, and will use the manifest for this.

When serialized, a manifest can be the input to `osbuild`, just
like a bare pipeline can be. This means there will be no need
to pass in sources separately on the commandline.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-03-03 22:25:49 +01:00
Ondřej Budai
1676cf58da lint: fix gosimple/S1004 errors 2020-03-02 14:28:55 +01:00
Tom Gundersen
7f97401ef8 osbuild: add RPM stage type
This is the replacement for the DNF stage, containing only GPG
keys and package checksums. It is meant to be used together with
the files source to actually fetch the packages. Depsolving must
be done in composer and the full package list inserted into
the pipeline.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-02-14 14:43:27 +01:00
Tom Gundersen
3b774e0e6d osbuild: add source type
This represents the sources objects, for now only org.osbuild.files
is supported.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-02-14 14:43:27 +01:00
Tom Gundersen
d133454d91 pipeline: rename package to osbuild
Rename the package from `pipeline` to `osbuild` to reflect that it
will no longer be specific to pipelines, but rather covers all
osbuild datatypes.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-02-14 14:43:27 +01:00