Commit graph

15 commits

Author SHA1 Message Date
Gianluca Zuccarelli
71fd5dafdc internal/distro: rhel7 repo customizations
Wire up the repository customizations for
rhel7 images.
2023-04-21 17:40:00 +02:00
Ondřej Budai
d8342862d5 customizations: create all groups unconditionally
We had this weird condition in code that prevented composer to create groups
with the same name as a user has. This unfortunately means that you are not
able to create a user with a primary group with a certain GID that has the
same name as the user. There's the gid field in the user customization,
but it requires that the group already exists.

In order to allow that, we need to remove the condition. From now on, it's
possible to create groups with the same name as a user has, which can be used
to create primary groups with a custom gid.

Note that the lorax compatibility behaviour was actually wrong. When lorax was
given a custom gid for a user, it didn't require the gid to exist. When it
didn't, the group was just created. Thus, we still don't have full backward
compatibility, but at least we now have support for this.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-04-19 11:50:49 +02:00
Achilleas Koutsou
d2a5c9aafa test: regenerate affected manifests
RHEL 7 manifests included rel-eng packages in their OS pipelines.
These have now been removed.
2023-02-23 16:22:42 +01:00
Tomáš Hozza
f5580b1f3e Test: regenerate image manifest that use files customization
Regenerate image manifests which use the files customization and are
affected by the recent change to `osbuild/fsnode.go`, specifically to
always setting the `RemoveDestination` to `true`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
aa9373cb18 Test: use dir and file customizations in qcow2 image manifests
Add the new directories and files customization to the customized qcow2
image manifests used for testing.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
b36c03f20c manifest/os: move the systemd services stage more to the end
Move the handling of the list of enabled and disabled systemd services
more to the end of the `os` pipeline, just before the SELinux stage.
This has no functional effect on produced images, but it will make it
nicer once the handling of the custom files and directories will be
added to the pipeline. Specifically it should be added right before the
services stage to allow enabling custom service files, but after all
other configurations that are applied to the image.

Regenerate all manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Achilleas Koutsou
fe7860778c test: update RHEL 7 manifests
Changes:
- Removed unnecessary packages from build roots.  Build packages are
  added on-demand.
- Some stages changed order in the OS pipeline for azure-rhui.  This
  will have no functional effect.
- RHSM Facts stage added to all RHEL 7 manifests.  This wont be used
  since RHEL 7 is not built in the cloud service.  The RHSM fact is
  added by the test case generator to all image types to test that the
  option is working properly.
- Azure archive pipeline renamed to xz like in all the other rewritten
  image types that use the xz pipeline.
- Azure image filename before archiving has changed from 'disk.vhd' to
  'image.vhd'.  Again, this will have no functional effect because the
  name of the final artifact is unchanged (disk.vhd.xz).
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
6fdf917271 distro/rhel7: update distribution implementation
Update the implementation of the distro.Distro interface to match the
one in RHEL 8, 9, and Fedora.  The main change is that the runner is a
runner.Runner and not a string.

The runner name is now rhel79 (changed from rhel7).  This is
functionally equivalent based on osbuild's runner version fallback
logic.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
a93ae83c5c distro/rhel7: add packageset chains to qcow2
The qcow2 image type for RHEL 7 doesn't have packageset chains defined.
This means that the blueprint packages are never merged into the os
pipeline.

This is unnecessary right now because of the upcoming rewrite, but it
will minimise the differences that will show up in the manifest.

The qcow2-customize manifest has an added block of options for the
grub2.legacy stage because now the dracut-config-rescue package is being
installed in the image.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
73882b7289 test: update customized test manifests to include bluez
Our 'customize' test manifests include an option to disable the
bluetooth.service.  Originally this option was added for image types
that included bluez in their default package set (Fedora IoT commit) but
it was later copied to the qcow2 image type as a way of testing
customizations.

Until recently, building these caused no issues.  On distros with more
recent versions of systemd, disabling a non-existent service causes an
error and these manifests fail to build.

Added the 'bluez' package to all manifests that include the 'disable
bluetooth.service' customization and updated the manifests.  These
should all be buildable now.
2023-01-23 19:54:39 +01:00
Achilleas Koutsou
4bd2c0cb1d test: regenerate manifests
Regenerate manifests with the added RHSM fact.
RHEL 9 manifests haven't changed because the stage is missing in the OS
pipeline (bug).
2022-11-30 10:04:16 +01:00
Achilleas Koutsou
a2a3ac8ffe test: regenerate manifests with chrony stages
Regenerate all manifests that used the old chrony stage options with the
'timeservers' field.  This is now replaced by the 'servers' field, which
is a slice of objects with a 'hostname' field instead of a slice of
strings.
2022-11-28 17:20:49 +01:00
Achilleas Koutsou
93592dabc1 test: regenerate manifests 2022-07-27 18:29:59 +02:00
Achilleas Koutsou
2b6faea320 Remove image info from all test manifests
We never generated it for the newest distro versions and we don't test
it on any of the old ones.

It's better this way.
2022-07-27 10:01:16 +02:00
Christian Kellner
06e05df620 distro: add support for building a rhel 7 (qcow2)
Based on the RHEL 8.6 pipelines, needs a special buildroot with two
extra packages: python3-iniparse and python3-PyYAML.
Only x86_64 support for now.
2022-06-21 00:06:26 +02:00