Commit graph

3621 commits

Author SHA1 Message Date
Achilleas Koutsou
ece618d0d0 stages/test: add unit tests for the dnf4.versionlock stage 2025-07-07 17:19:25 +02:00
Achilleas Koutsou
06344b6827 stages: add a new dnf4.versionlock stage
New stage that writes a versionlock.list to lock packages in the format
used by the dnf4 versionlock plugin.
2025-07-07 17:19:25 +02:00
schutzbot
0fb474b9c4 Schutzfile: Update images dependency ref to latest 2025-07-07 13:56:52 +02:00
Leonardo Rossetti
4af53e4c6e add ssh_pwauth to org.osbuild.cloud-init
Signed-off-by: Leonardo Rossetti <lrossett@redhat.com>
2025-07-04 21:52:00 +02:00
Jelle van der Waa
f7ef1d6464 stages/vagrant: add virtualbox support
This adds support generating a virtualbox vagrant image. It differs from
libvirt by requiring an xml file and a vmdk image.

When the provider is set to libvirt it is required to pass a
`virtualbox` configuration section to this stage which must include the
mac address.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-04 14:09:47 +02:00
schutzbot
4ec94759a1 Post release version bump
[skip ci]
2025-07-02 08:36:52 +00:00
Tom Koscielniak
efc8b2dd90 tests/CI: Fix RHEL 10 mock config creation and repo URLs
Fix RHEL 10 mock confings not being created if the machine was subscribed and fix RHEL 9 being used in the RHEL 10 mock confings for a repo path.
These issues caused the rpm jobs for RHEL 10 GA to fail.
2025-07-01 17:53:44 +02:00
Tom Koscielniak
9671226fad tests/CI: Upgrade rhel 9.5 GA to 9.6 GA and add 10.0 GA
Upgrade CI to 9.6 GA and 10.0 GA (first GA runners for rhel 10) and remove 9.6 and 10.0 nightly runners from the CI.
2025-07-01 17:53:44 +02:00
Simon de Vlieger
ae70eb08d2 stages/ovf: test vbox_mac_address
Test that different calls result in different mac addresses (with the
same prefix), also test that when the correct options are passed that
the mac address is returned as is.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
54ac04e001 stage/ovf: mac address pattern
Adds a pattern for the mac address, without delimiters; as this is the
direct input for the virtualbox mac address property.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
02537089d8 stage/ovf: additional schema tests
Adds tests to more thoroughly look at the vmware and virtualbox schemas
by passing wrong types.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
19c38cb38f stages/ovf: allow setting mac address for vbox
The MAC address will need to be the same as the one being used by the
Vagrant stage *if* it's being used. This leaves it up to images to
generate the correct MAC address and set it in both places.

When the OVF stage is used separately it's still fine to use a random
MAC address.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
1cb0f26b09 stages/ovf: virtualbox's ostype as option
Let the user of the stage set the os type for the virtualbox bits.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
ce2bda719c stages/ovf: vmware's ostype as option
Let the user of the stage set the os type for the vmware bits.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
9559cd0528 stages/ovf: write virtualbox
Expand the written XML to include information as used by VirtualBox.
This should not affect any other use cases of the OVF document that is
generated and is purely extra information consumed by VirtualBox.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Simon de Vlieger
d85ead3956 stages/ovf: reformat
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-07-01 15:16:35 +02:00
Michael Vogt
67fabadbd4 osbuild: drop + when doing QEMU_LOG=unimp
This commit drops the `QEMU_LOG=+unimp` and replaces it with
`QEMU_LOG=unimp`. The `+` format does not work and we found
this in https://github.com/osbuild/bootc-image-builder/pull/963#issuecomment-3001154460
2025-06-27 11:37:38 +02:00
schutzbot
6eddc8eec2 schutzfile: Update snapshots to 20250626 2025-06-27 11:30:44 +02:00
Alexander Larsson
b7c0520392 stages: Add tests for org.osbuild.write-device
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2025-06-25 11:12:25 +02:00
Alexander Larsson
30ca57de2c stages: Add org.osbuild.write-device stage
This stage writes a file to a device using dd. This is a
rewrite/backport of one of the stages in osbuild-auto.

The osbuild-auto stage is used in automotive-image-builder to write
the aboot image to the "boot_a" partition, to allow android boot
systems to boot. We will want similar functionallity in
bootc-image-builder, so it is important to upstream this.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2025-06-25 11:12:25 +02:00
schutzbot
aac3c8b359 Schutzfile: Update images dependency ref to latest 2025-06-23 21:50:59 +02:00
Karolina Surma
7390f91592 Mark tests needing TOML-writing library with a custom marker
This way they can be conveniently skipped with `pytest -m "not
tomlwrite"` in environments where such libraries aren't available.
2025-06-23 19:51:29 +02:00
Karolina Surma
516301c02b Skip tests creating system units in RPM environment
Attempting to run them during the RPM build ends with an error:
'Failed to create directory '/run/systemd/': Permission denied'
2025-06-23 19:51:29 +02:00
schutzbot
23c8bf3e8c Post release version bump
[skip ci]
2025-06-20 10:35:58 +00:00
Simon de Vlieger
d566c68f94 stages/wsl-distribution: stage to write wsl config
This is a new stage to be able to write a (subset) of relevant keys into
the `wsl-distribution` configuration file.

The file, and these options, are necessary for the enablement of fancy
logos and experiences in WSL2.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-19 10:22:57 +02:00
Tomáš Hozza
53301d5e6f GHA: enable the stale action to delete its saved state
It turns out that the stale action is not able to delete its saved
state due to missing permissions. As a result, it was not processing
issues and PRs, that have been processed once, for almost a month.

The error in the job log was:
```
Warning: Error delete _state: [403] Resource not accessible by integration
```

The fix is to add `actions: write` to the action permissions

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-18 15:07:25 +01:00
schutzbot
230be8b504 Post release version bump
[skip ci]
2025-06-17 10:53:06 +00:00
Brian C. Lane
8c35e072cc tox: Limit it to virtualenv < 20.22.0 for py36 support 2025-06-17 00:21:21 -07:00
Brian C. Lane
3f91723402 Tests/tox: Fedora 43 is now using python 3.14
Add testing on pythong 3.14 and keep testing on python 3.13 for the
current stable Fedora version (42 at this time).

Use osbuild-ci:latest-202506112350 for tests.yml
2025-06-17 00:21:21 -07:00
Simon de Vlieger
bc99513c0a stages/test: kickstart different messages
On Python 3.6 we're getting a *different* error message from other
versions in CI. Let's accept both versions.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:31:49 -07:00
Simon de Vlieger
3bbacb5703 solver/dnf5: switch base exception type
libdnf5 changed error types [1], [2], [3] and they no longer inherit from
`RuntimeError`; instead catch `Exception` which is the new common base
type.

This fixes issues in our CI.

[1]: https://github.com/rpm-software-management/dnf5/pull/2124
[2]: https://github.com/rpm-software-management/dnf5/pull/2118#issuecomment-2876601471
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=2365689

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:23:25 -07:00
Simon de Vlieger
cde6e1e114 source/containers-storage: error message
An error message has changed in skopeo [1] (or one of it's underlying
libraries). This new version is now in our CI so let's fix our tests.

[1]: f423f01d1b

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 09:22:28 -07:00
schutzbot
83b1b48108 schutzfile: Update snapshots to 20250605 2025-06-16 13:39:30 +02:00
Simon de Vlieger
daed32e462 compat: ast.Str -> ast.Constant
Python 3.14 removed the long deprecated `ast.Str` [1]. Rewrite to use
`ast.Constant` conditionally for any version that isn't 3.6.

Since 3.6 is our lowest supported version we don't check for below.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-16 12:26:15 +02:00
Karolina Surma
010ceb6ba5 Avoid the multiprocessing forkserver method
The default method has changed in Python 3.14:
https://docs.python.org/dev/whatsnew/3.14.html#whatsnew314-multiprocessing-start-method
2025-06-16 12:06:34 +02:00
Karolina Surma
df2e83d417 Always assert the correct architecture in test_curl_user_agent 2025-06-13 09:54:28 -07:00
Achilleas Koutsou
0968ee8d81 stages/grub2: add compat_version for fixed behaviour
For the terminal_input, terminal_output, and serial variables in the
GRUB_CFG_TEMPLATE, the keys were not set when those variables were not
defined in the options.  This caused the template variables to show up
in the final file itself, which could break the config.  For example,
the following line was being generated for one of our images:

    serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1${terminal_input}${terminal_output}

Setting the keys to an empty string when they're not defined solves the
issue.

Since this is a stage behaviour change, the new behaviour is toggled by
an option that maintains backwards compatibility when not set.
This introduces a new convention of adding a `compat_version` number to
the stage options to control the behaviour.  The value defaults to 1,
which is the old (broken) behaviour.  Manifest generators should always
set it to 2 to get the correct behaviour.
2025-06-13 14:14:57 +02:00
Miro Hrončok
de26d79fee spec: Don't use tomli on Fedora, fix comment 2025-06-12 16:38:55 +02:00
Simon de Vlieger
42281231b0 stages/containers: don't validate keys
In Python 3.14 configparser started validating keys. We use hacky bits
to write duplicate keys which means we have delimiters in our keys which
is now no longer allowed.

Let's explicitly turn off key validation for now as suggested by
mhroncok in [1].

[1]: https://github.com/osbuild/osbuild/issues/2109#issuecomment-2964585958

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-12 15:31:34 +02:00
Simon de Vlieger
44cb7934db stages/systemd: don't validate keys
In Python 3.14 configparser started validating keys. We use hacky bits
to write duplicate keys which means we have delimiters in our keys which
is now no longer allowed.

Let's explicitly turn off key validation for now as suggested by
mhroncok in [1].

[1]: https://github.com/osbuild/osbuild/issues/2109#issuecomment-2964585958

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-12 15:31:34 +02:00
schutzbot
c3ea64e19e Schutzfile: Update images dependency ref to latest 2025-06-12 15:23:25 +02:00
Brian C. Lane
a828ef95d6 stages/erofs: Add exclude_paths support
Add the ability to exclude files and directories from the erofs
image. This uses the mkfs.erofs --exclude-regex feature, so simple
matches or regexes can be used.
2025-06-11 20:22:23 +02:00
Brian C. Lane
86c89a2421 stages/squashfs: Add exclude_paths support
Add the ability to exclude files and directories from the squashfs
image. This uses the mksquashfs -regex -e FILES... feature, so simple
matches or regexes can be used.

This also adds a new test for squashfs, based on the existing test for
erofs.
2025-06-11 20:22:23 +02:00
schutzbot
387806a8c3 Schutzfile: Update images dependency ref to latest 2025-06-11 10:28:45 +02:00
schutzbot
a6c21533c6 schutzfile: Update snapshots to 20250601 2025-06-04 13:03:06 +02:00
schutzbot
06d6772dca Post release version bump
[skip ci]
2025-06-04 08:35:40 +00:00
Michael Vogt
d8f38568c0 sources: add tiny unit test for inline source fechting
This commit adds a small unit test that the inline source
works as expected by creating some test_data and then
checking that it ends up in the cache.

Note that this is also already tested in the tests in
osbuild/test/run/test_sources.py but there its a lot more
indirect and in the spirit of tests-as-documentation having
an explicit test here seems useful (its also quicker to
run and easier to discover).

Small followup for https://github.com/osbuild/osbuild/pull/2090
where this was discussed originally.
2025-06-03 20:28:31 +02:00
Simon de Vlieger
a464815ea8 stages/tar: allow chosen compression
The `org.osbuild.tar` stage only supports auto compression which is
based on the filename. For several (newer) artifacts such as Vagrant
(`.box`) and WSL (`.wsl`) we want to explicitly give the compression
algorithm.

I've chosen a (few) commonly used compression algorithms. If others are
needed they are one-line followups away.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-03 18:18:23 +02:00
Simon de Vlieger
b5e4775b24 test: simplify git clone command
In some (ununderstood) cases the combination of `--no-single-branch` and
`--depth=1` leads to the revision we want to check out not being
available.

Achilleas suggested to change the command to this instead.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-02 16:00:25 +02:00
schutzbot
87f7b62316 Schutzfile: Update images dependency ref to latest 2025-06-02 16:00:09 +02:00