Add support for the newly added `servers` option in the
`org.osbuild.chrony` osbuild stage [1]. The option allows one to
specify timeservers to be used by chrony, including a subset of
lower-level configuration options per each server.
Implement a custom JSON marshaller method for `ChronyStageOptions` to
ensure that exactly one of 'timeservers' or 'servers' is specified, as
mandated by the stage schema.
Optional values in `ChronyConfigServer` are declared as pointers to
distinguish the case when the value was explicitly set by the user from
the default value when the structure instance is created. All of these
options should be omitted from the JSON, but only when not explicitly
set, not when their value us "0" for int or "false" for bool. Downside
of this approach is that one can not easily use pointer to a basic
type literal in the struct literal. Passing the basic type literal has
to be workarounded using an intermediate variable, which address is
used in the struct literal.
Add unit test cases for the added functionality.
[1] https://github.com/osbuild/osbuild/pull/692
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the newly added `subscription-manager` option in the
`org.osbuild.rhsm` osbuild stage [1]. The option allows one to
create configure subset of subscription-manager options in its
configuration file `/etc/rhsm/rhsm.conf`.
Add unit test cases for the added functionality.
[1] https://github.com/osbuild/osbuild/pull/659
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the newly added `unit-dropins` option in the
`org.osbuild.systemd` osbuild stage [1]. The stage allows one to
create `.service` unit files drop-in configuration files under
`/usr/lib/systemd/system/`.
Add unit test cases for the added functionality.
[1] https://github.com/osbuild/osbuild/pull/664
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the `org.osbuild.cloud-init` osbuild stage [1],
which allows one to configure cloud-init by creating
configuration files under `/etc/cloud/cloud.cfg.d/`.
Add unit test cases for the newly added stage.
[1] https://github.com/osbuild/osbuild/pull/689
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the newly added `network-scripts` option in the
`org.osbuild.sysconfig` osbuild stage [1]. The stage allows one to
create `ifcfg` configuration files under
`/etc/sysconfig/network-scripts`.
Add unit test cases for the added functionality as well as for other
options of the stage, which were missing.
[1] https://github.com/osbuild/osbuild/pull/663
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the `org.osbuild.systemd-logind` osbuild stage [1],
which allows one to configure systemd-logind by creating
configuration drop-ins.
Add unit test cases for the newly added stage.
[1] https://github.com/osbuild/osbuild/pull/668
Signed-off-by: Tomas Hozza <thozza@redhat.com>
The `org.osbuild.dracut` stage was previously not tested for JSON
unmarshalling. Add the missing test case and extend Stage's
`UnmarshalJSON()` method.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the `org.osbuild.dracut.conf` osbuild stage [1], which
allows one to configure dracut by creating configuration files.
Add unit test cases for the newly added stage.
[1] https://github.com/osbuild/osbuild/pull/688
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add support for the `org.osbuild.modprobe` osbuild stage [1], which
allows one to configure modprobe by creating configuration files.
Add unit test cases for the newly added stage.
[1] https://github.com/osbuild/osbuild/pull/670
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Add two new helper functions `IntToPtr()` and `BoolToPtr()` to the
`internal/common` package, which can be used to conveniently set
basic type literals in a struct literal, in which pointer to the basic
type is expected.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
The oldest distributions that we now support are RHEL 8.4 and Fedora 33.
They both support go 1.15, let's bump.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
For RHEL 8.5, user and ssh key are added in blueprint.
For Fedora 33, RHEL 8.3 and 8.4, user and ssh key have to be
added in ks file due to bz#1896178.
bz#1896178 has been fixed already on RHEL 8.5 only, but still exists
on Fedora 33, RHEL 8.3 and 8.4. This update covers Fedora 33,
RHEL 8.5, RHEL 8.4 and RHEL 8.3.
Add package sets to the top level distribution and the
architectures. Merge package sets when requested through
`imageType.PackageSets()`.
This allows us to have "cascading" package sets:
distro > arch > image type
Previously this was only supported for the build packages. The idea is
generalised based on the idea of arbitrary package sets.
Certain package sets have special meaning (for the distro):
- packages: blueprint packages and special option packages are merged
into this one.
- build: is not expected to be defined on the image type so it is merged
from the distro and arch explicitly.
Traditional tar image type.
Pipelines generation function for tar image type uses the same pipelines
and stages as the tar installer, but exports the OS image directly.
Global const for defining kickstart path for all installer types.
Kernel options added to point to path.
Kickstart file renamed to osbuild.ks for all types and placed in the
bootiso root.
Fixes#1363
A recent update to crypto-policies changed its requirements from:
Recommends: grubby
to:
Recommends: (grubby if kernel)
We don't install kernel in the build pipeline, thus grubby was now no longer
installed. This caused also s390utils-core to not be installed on s390x.
s390utils-core has to be in the build pipeline though because we use
/usr/sbin/zipl from it to install the bootloader to s390x images.
Long story short, images for s390x currently cannot be build because
/usr/sbin/zipl is no longer in the build pipeline. This commit fixes that
by explicitly adding s390utils-core to the package list for s390x.
I verified this fix on an actual s390x machine. The test manifest was
regenerated but it's actually still the same because we use an older
snapshot that doesn't contain the newest crypto-policies change.
Kudos to Tomáš Hozza for helping me out!
Signed-off-by: Ondřej Budai <ondrej@budai.cz>