Commit graph

3557 commits

Author SHA1 Message Date
schutzbot
3319173a1b Schutzfile: Update images dependency ref to latest 2025-05-09 15:48:38 +03:00
schutzbot
a602125f99 schutzfile: Update snapshots to 20250501 2025-05-09 15:48:23 +03:00
schutzbot
0e10c05172 Post release version bump
[skip ci]
2025-05-07 08:35:21 +00:00
Michael Vogt
ec3f70199c test: drop module_platform_id from depsolve tests
Drop `module_platform_id` as it is now optional and none of
our tests is using it (i.e. has any observable difference if
missing).

Once we start using it we need to add it (and maybe a
"with_platform_id" as parameter on top so that both with/without
platform_id is tested).
2025-05-07 10:28:47 +02:00
Michael Vogt
549136b1b0 tools: drop requirement for module_platform_id from request
The PLATFORM_ID got retired from fedora-43 [0] and it
seems like it was always kinda optional. So lets make
it optional for real to avoid failing to build fedora-43
images.

[0] https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID
2025-05-07 10:28:47 +02:00
Brian C. Lane
59fe07a6ab solver: Call update_cache
DNF apparently doesn't check the expiration time on the cache unless you
call this first. It may help improve issues with the cache being out of
sync.

Internally dnf checks the mtime of the main repomd.xml file when using
baseurl, and it checks the hash values when using metalink so this
should not result in any noticeable extra slowdowns when things are
fresh.
2025-05-05 13:56:54 +03:00
schutzbot
841985691c Schutzfile: Update images dependency ref to latest 2025-04-29 12:48:01 +03:00
Benjamin A. Beasley
3932cc479c In Fedora 41+, depend on typer-slim rather than typer
This works around a file conflict on /usr/bin/typer between
python3-typer-cli and erlang-dialyzer until the problem can be fixed in
python-typer and/or erlang. See RHBZ#2359557, RHBZ#2359567.

After the file conflict is resolved, the python3-typer-slim dependency
will still be more precise and minimal than python3-typer, so no further
change will be required.

By depending on typer-slim[standard], we still get the nice-to-have
optional dependencies that plain typer would bring in (currently, rich
and shellingham), but without the generic typer command-line tool.
2025-04-28 14:38:58 +02:00
Brian C. Lane
d3dc07886c solver: Use load_repos instead of update_and_load_enabled_repos
The old function has been deprecated by dnf5, use load_repos directly
and only load the available repos (the ones osbuild has setup), not the
system repos.

Fixes #2080
2025-04-25 17:16:13 -07:00
schutzbot
68830eabe4 Schutzfile: Update images dependency ref to latest 2025-04-24 18:14:43 +02:00
schutzbot
025c8dd51d Post release version bump
[skip ci]
2025-04-23 08:33:27 +00:00
Nikita Dubrovskii
73e3544e86 stages/coreos.live-artifacts: fix kernel and initrd paths in s390x ISO
The `generic.ins` template uses:
  images/kernel.img
  images/initrd.img

However, kernel and initrd are currently stored as:
  images/pxeboot/vmlinuz
  images/pxeboot/initrd.img

This change ensures correct paths are used.
2025-04-23 08:01:11 +02:00
Tomáš Hozza
e294f38d9c Tests: fix packit config validation
Packit changed the command to validate its configuration, without
keeping backward compatibility.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-22 21:15:21 +02:00
schutzbot
50a6f2733e Post release version bump
[skip ci]
2025-04-16 13:57:25 +00:00
schutzbot
aced2eaa00 Schutzfile: Update images dependency ref to latest 2025-04-14 12:32:39 +02:00
Tomáš Hozza
7ff3fe0b50 Stages/waagent.conf: support additional options
Extend the stage to support setting new options:
 - Provisioning.UseCloudInit
 - Provisioning.Enabled

Extend the stage test to use them and add a simple stage unit test for
the schema.

Related to https://github.com/osbuild/images/issues/1416

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-14 08:18:04 +02:00
Tomáš Hozza
d41d8ecb3f Stages/waagent.conf: fix copy&paste error
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-14 08:18:04 +02:00
Tomáš Hozza
bea378f191 Stages/rhsm: add unit test for the stage schema
I forgot to add the file to
https://github.com/osbuild/osbuild/pull/2070.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-11 15:39:20 +02:00
Achilleas Koutsou
db9f03ad41 stages: add unit tests for chrony stage
Add unit tests that check the schema and file contents for the chrony
stage.
2025-04-11 09:00:42 +02:00
Achilleas Koutsou
7771a39557 test/chrony: add all the new refclock options
Add all the new refclock options to the test manifest.
2025-04-11 09:00:42 +02:00
Achilleas Koutsou
8baf16da06 stages/chrony: support specifying refclocks
The refclock directive can be used to specify one or more hardware
reference clocks to be used as a time source.  Each refclock line must
specify a driver and a mandatory parameter, in the form:

  refclock driver parameter

Drivers can have driver-specific options:

  refclock driver parameter:[driver-option,...]

General refclock options can also be specified:

  refclock driver parameter:[driver-option,...] [general-option]...

The stage options schema is written so that the "driver" property is an
object that must match one of four schemas corresponding to the four
drivers, each with a "name" property matching the driver name.
Each driver defines its required property and any optional
driver-specific options.

There are more general refclock options supported than the ones defined
in this commit, but we can add them if and when we need them in the
future.

Note that the restriction on the top-level stage options schema is now
lifted and any set of options can be specified.  Servers are not
required.  However, at least one top-level property is required still.

Docs: https://chrony-project.org/doc/3.4/chrony.conf.html
2025-04-11 09:00:42 +02:00
Tomáš Hozza
c9639c41f9 Stages/rhsm: support setting 'auto_enable_yum_plugins' option
Support setting the `auto_enable_yum_plugins` option in the `rhsm`
section of `rhsm.conf`.

Add a unit test for the stage schema and also adjust the stage test
manifest.

Related to: https://github.com/osbuild/images/issues/1408

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-10 12:29:21 +02:00
schutzbot
912a1130cf Post release version bump
[skip ci]
2025-04-09 08:35:18 +00:00
Achilleas Koutsou
56fca5d632 github: bump ubuntu runners to 24.04
20.04 is EOL soon.
2025-04-09 00:04:29 +02:00
schutzbot
a73afaa2f7 schutzfile: Update snapshots to 20250404 2025-04-08 23:38:26 +02:00
Tomáš Hozza
09bc0d1ffb GH Action/create-tag: allow passing the version when run manually
Modify the action to allow passing the version when run manually. This
will be useful in the future once we branch-off a `rhel-x.y` branch to
backport a fix and will be doing the first "dot" release from such
branch.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-08 21:20:31 +02:00
Achilleas Koutsou
52a822075e stages/systemd.unit.create: support StandardOutput
Add support for the StandardOutput option in the [Service] section of
systemd units.

https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#StandardOutput=
2025-04-08 12:43:28 +02:00
schutzbot
5c42636a7c Schutzfile: Update images dependency ref to latest 2025-04-07 14:05:42 +02:00
Michael Vogt
f52aeb0676 osbuild: add experimental flag debug-qemu-user
This commit adds support for more debug for `qemu-user` options.
When settings:
```
$ sudo IMAGE_BUILDER_EXPERIMENAL=debug-qemu-user bootc-image-builder ...
```
extra debug will be printed. This hopefully helps to track down
the root cause of
https://github.com/podman-desktop/extension-bootc/issues/1475
2025-04-03 10:49:06 +02:00
Michael Vogt
ba0d9df68e util: add new util.experimentalflags.get_{bool,string} helpers
This commit adds two new helpers:
- util.experimentalflags.get_bool()
- util.experimentalflags.get_string()
similar to what we added in the images library in PR:
https://github.com/osbuild/images/pull/1248

The idea is that we provide experimentalflags for osbuild via
an environment like `OSBUILD_EXPERIMENTAL` and for those we
make no API promises. This will be initially used for better
debug of qemu-user.
2025-04-03 10:49:06 +02:00
luizademelo
cda3c43b2c stages: fix description for org.osbuild.containers.unit.create
Fixes #2053
2025-04-03 02:25:31 +02:00
Achilleas Koutsou
961bed0b80 test: add manifest for testing the hmac stage 2025-04-02 13:06:47 +02:00
Achilleas Koutsou
5b77ff6f65 stages: add new stage org.osbuild.hmac
The new org.osbuild.hmac stage can be used to calculate hmac digests to
be stored alongside files for verification.
2025-04-02 13:06:47 +02:00
schutzbot
7b843dc83e Post release version bump
[skip ci]
2025-04-01 13:54:43 +00:00
Neal Gompa
6433436178 runners: Add AlmaLinux runner links to permit AlmaLinux as a host
As part of AlmaLinux shipping the OSBuild stack, allow osbuild to
recognize AlmaLinux as a valid host.
2025-04-01 10:35:18 +02:00
schutzbot
69d95ddcf5 Schutzfile: Update images dependency ref to latest 2025-03-31 11:29:53 +02:00
schutzbot
140abb03b0 Post release version bump
[skip ci]
2025-03-26 08:33:10 +00:00
schutzbot
2b41f804a5 Schutzfile: Update images dependency ref to latest 2025-03-25 11:36:37 +01:00
Tom Koscielniak
5260d753f3 tests/CI: Upgrade rhel 9.4 GA to 9.5 GA 2025-03-25 10:54:37 +01:00
Tom Koscielniak
1668c78cfb tests/CI: Add rhel 9.7 and 10.1 nightly runners 2025-03-20 14:27:44 +01:00
Dusty Mabe
5a19d41f3e stages/coreos.live-artifacts: loosen requirements on modules dir
We originally required there to be only one kernel modules directory
since we typically only have one kernel installed. Change this check
up a bit since some kernel module RPMs aren't delivering a new kernel
but do deliver kmods that were built against a different kernel.

For example v4l2loopback from https://elrepo.org/

```
bash-5.1# rpm -ql kmod-v4l2loopback
/etc/depmod.d/kmod-v4l2loopback.conf
/lib/modules/5.14.0-427.13.1.el9_4.x86_64
/lib/modules/5.14.0-427.13.1.el9_4.x86_64/extra
/lib/modules/5.14.0-427.13.1.el9_4.x86_64/extra/v4l2loopback
/lib/modules/5.14.0-427.13.1.el9_4.x86_64/extra/v4l2loopback/v4l2loopback.ko
/usr/share/doc/kmod-v4l2loopback-0.12.7
/usr/share/doc/kmod-v4l2loopback-0.12.7/GPL-v2.0.txt
/usr/share/doc/kmod-v4l2loopback-0.12.7/greylist.txt
```

This patch now allows an image built from a Containerfile like the
following to work as input to the live artifacts stage.

```
FROM rhcos
RUN <<EOF
    set -eux -o pipefail
    dnf install -y https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm
    dnf install -y v4l2loopback
    dnf clean all
    ostree container commit
EOF
```
2025-03-19 22:25:59 +01:00
schutzbot
74d6eb37bd Schutzfile: Update images dependency ref to latest 2025-03-18 15:34:32 +01:00
schutzbot
bf29dfbb2b Schutzfile: Update images dependency ref to latest 2025-03-17 19:54:13 +01:00
rverdile
a62276c7dc stages: add insights-client config stage 2025-03-17 19:34:16 +01:00
Michael Vogt
e93cd75e5b test/rpm: add schema validation test for boot_root 2025-03-13 13:47:43 +01:00
Achilleas Koutsou
2e45963aed test: add rpm stage test for boot_root
Add a stage build test for the boot_root option of the org.osbuild.rpm
stage.  The test defined two manifests that both install the
kernel-uki-virt kernel but differ in the value of the boot_root option.
The diff shows the effect of the value on the install location of the
kernel.
2025-03-13 13:47:43 +01:00
Achilleas Koutsou
305a54f1a2 stages/rpm: add new kernel_install_env options
Add support for setting environment variables for kernel-install and its
plugins.  These can be used to control the behaviour of kernel-install
during the kernel rpm installation.  Currently, we only add support for
$BOOT_ROOT, which we need to control the path where the kernel should be
installed.

Normally, kernel-install scripts will detect the correct path based on
the filesystem layout, specifically the ESP path.  However, during our
installation the filesystem is not yet set up, so with this option, we
can control the installation path based on the location we know the ESP
will be mounted in the final image.

This is a very similar override to what we do with the
org.osbuild.fix-bls stage.

The stage option is added under a kernel_install_env object so we can
potentially support more of the known env vars in the future.
2025-03-13 13:47:43 +01:00
Achilleas Koutsou
7be822d6e9 stages/rpm: set encoding for subprocess.run()
Printing 'owner' in an fstring triggers the mypy warning 'str-bytes-safe'

  Error: If x = b'abc' then f"{x}" or "{}".format(x) produces "b'abc'",
  not "abc".

We can't yet use the nicer run() argument, 'text=True', because we still
target the RHEL 7 build root which only has Python 3.6 and 'text' was
introduced in Python 3.7.
2025-03-13 13:47:43 +01:00
schutzbot
8daf928b62 Post release version bump
[skip ci]
2025-03-12 08:33:19 +00:00
Achilleas Koutsou
f2ab07cf85 stages/grub2.inst: grub2-mkimage in tmpdir
Use a temporary directory for the output of grub2-mkimage.

This makes the stage clean up the grub2-core.img from the build root
after its done.  It also has the nice side-effect that unit tests that
call the stage are independent.  Previously, a bug in the stage *might*
have been missed if a certain configuration of the stage was not
creating the grub2-core.img.  One unit test could create an image at the fixed path
(/var/tmp/grub2-core.img) and then another one could call the stage with
the buggy configuration but the `shutil.copyfile()` call at the end of
the stage would succeed because it would find the image from the
previous stage run.

To accommodate for this change, the unit test with the mocked run call
is adjusted to intercept the random tmp output path and use it to create
a fake file for the stage to succeed.
2025-03-08 02:30:32 +01:00