Commit graph

9 commits

Author SHA1 Message Date
Ondřej Budai
ea8d080c8a osbuild1/result: fix conversion of success field from v2
When a stage is successful in a manifest v2, the success field is omitted from
the result. In other words, the default value of the success field is true
which is against the default value of boolean in Go. This commit implements
a workaround.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-19 18:50:31 +01:00
Achilleas Koutsou
f8b3b3f7e2 rhel84,osbuild2: add system ID to ISO
New stage option added in osbuild
https://github.com/osbuild/osbuild/pull/611

System ID is used by osinfo to identify the RHEL boot ISOs, where the
system ID is "LINUX".
2021-03-17 18:12:17 +00:00
Achilleas Koutsou
33cebcc8fc osbuild2: port tar assembler to new stage 2021-03-17 18:12:17 +00:00
Achilleas Koutsou
bec194dfff osbuild2: add support for new osbuild stages
- org.osbuild.anaconda
    Configures Anaconda.  For now, only enabling kickstart modules is
    supported.

- org.osbuild.buildstamp
    Creates a buildstamp file, which is required by Anaconda.

- org.osbuild.kickstart
    Creates a kickstart file.

- org.osbuild.lorax-script
    Uses lorax template helpers to execute a template.

- org.osbuild.bootiso
    Prepares a bootable file system tree suitable for writing on an ISO
    file system

- org.osbuild.discinfo
    Creates a .discinfo file, used by the Anaconda installer.

- org.osbuild.xorrisofs
    Uses the `xorrisofs` command line utility to an ISO.

- org.osbuild.implantisomd5
    Uses the `implantisomd5` command to implant MD5 checksums into an
    ISO.
2021-03-17 18:12:17 +00:00
Achilleas Koutsou
011559f785 osbuild2: add SavedEntry to Grub2StageOptions
Added in osbuild1 already.
2021-03-17 18:12:17 +00:00
Achilleas Koutsou
f107241ee2 obsuild2: support additional layers in oci-archive
The org.osbuild.oci-archive stage now supports an arbitrary number of
layers on top of the Base layer.  The keys for these layers follow the
pattern "layer.N" (N = 1, 2, 3, ...).

We use a custom marshaller and unmarshaller for the
OCIArchiveStageInputs to handle this.  The unmarshaller also validates
the layer keys to match the pattern in the schema.
2021-03-17 18:12:17 +00:00
Achilleas Koutsou
dc5e46139a osbuild2: new dracut stage to re-create initrd 2021-03-17 18:12:17 +00:00
Achilleas Koutsou
164faa7503 osbuild{1,2}: new stages in unmarshal method
Recently added stages org.osbuild.sysconfig and
org.osbuild.kernel-cmdline were missing from the Manifest unmarshal
method causing it to fail when trying to unmarshal manifests that
contained them.
2021-03-17 18:12:17 +00:00
Achilleas Koutsou
756d5b063f osbuild2: new schema types: stages, inputs, sources
Adding new types and adapting copies of all the old types to match the
new Manifest schema:

New types:
- Stages
    - org.osbuild.ostree.init
    - org.osbuild.ostree.pull
    - org.osbuild.ostree.preptree (replaces org.osbuild.rpm-ostree)
    - org.osbuild.curl
- Converted from assemblers
    The concept of a Build and Assembler stage in gone now. Instead they
    are regular Stages like any other.
    - org.osbuild.oci-archive
    - org.osbuild.ostree.commit
- Sources
    - org.osbuild.curl
    - org.osbuild.ostree
- Inputs
    - org.osbuild.files
    - org.osbuild.ostree

Types with changes:
- Stages
    - org.osbuild.rpm:
        - New input structure for defining packages
        - New options

Basically copies:
- The rest simply rename the `Name` field to `Type`

Decoding types with interface fields:
Types that contain interfaces with multiple implementations implement
their own UnmarshalJSON method.  In these cases, we use a JSON decoder
with the `DisallowUnknownFields` option to catch errors during the
deserialization while trying to determine which implementation matches
the data.

Copied tests for copied types are adapted accordingly.
2021-03-17 18:12:17 +00:00