Commit graph

3606 commits

Author SHA1 Message Date
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
schutzbot
0cc6e5cf70 Post release version bump
[skip ci]
2025-05-21 08:35:09 +00:00
Tomáš Hozza
f30174d9ba Test/stages/rpm: add compatibility with RPM 6.0
RPM 6.0 (landed in F43, current rawhide), no longer uses short key ID
for the 'gpg-pubkey' pseudo-package, but to prevent any collision, it
uses full key ID.

This means that we can't consistently just compare the pipeline rpm
stage metadata from the test data with what we get from building the
test manifest. The reason is that we need to keep running the unit test
in upstream and downstream CI pipelines for OSes, which may ship RPM
6.0, but also older RPM version.

Extend the test case to do a special case check for any 'gpg-pubkey'
package in the metadata if the package version length differs between
the test data and data got from building the manifest.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-20 09:33:41 +02:00
schutzbot
e7b0705c1d Schutzfile: Update images dependency ref to latest 2025-05-19 17:59:06 +02:00
Achilleas Koutsou
3446b98adf schutbot: update terraform ref
Adds Fedora 42 AWS runners
2025-05-16 16:56:15 +02:00
Achilleas Koutsou
e5802d4eb6 github: drop Fedora 40, add Fedora 42 2025-05-16 16:56:15 +02:00
schutzbot
72e3e1699e schutzfile: Update snapshots to 20250515 2025-05-15 10:19:36 +02:00
Achilleas Koutsou
0ac83fd421 stages/kickstart: post-installation scripts
Add a new %post option to the kickstart stage that supports adding
multiple post blocks to a kickstart file, with all the options supported
by the directive.
2025-05-14 09:06:40 +02:00
Tomáš Hozza
68b2301daf Test/inline sources: add lzma+base64 success case
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
c33dfcb43b Test/inline sources: update and rename the base64 success case
Rename the 'success' case to 'base64_success' as a preparation for
adding test case for other encodings.

The test case was originally embedding the tools/inline-source.py
script. Since the script has been updated, let's update the embedded
date in the test case as well.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
1dc2cdcc14 Tools/inline-source.py: support specifying data encoding
Extend the script to support specifying the data encoding. Keep
'base64' as the default encoding.

Add support for 'lzma+base64' encoding.

Also use the 'base64' module, instead of 'binascii' module for base64
encoding. This is consistent with what the actual source implementation
uses.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
e172e6e6f6 Sources/inline: support lzma+base64 encoded data
Extend the inline source to support lzma compressed and base64 encoded
'data'. This will allow us to reduce the potential manifest size when
embedding big files. The aim is specifically at eventually embedding
SBOMs of the image.

An example single SBOM can be a JSON file with size of about 1.9 MiB.
The lzma+base64 combination reduces the 'data' to embed to "only" around
250 KiB.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:27:36 +02:00
Tomáš Hozza
6c5c0aa462 CI: don't build F39 RPMs
These are no longer consumed by any dependent project AFAICT, so let's
drop the EOL Fedora 39 builds.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-13 10:17:55 +02:00
Michael Vogt
d068c6d91f dnfjson: detect/error if no repositories are defined
This commit adds an error message if no repositories are
defined in the dnfjson query. We had the issue in
https://github.com/osbuild/bootc-image-builder/issues/922
that in a RHEL bootc-container no repositories are defined.

Here the error is quite confusing, as it complains about
error marking packages which is technically correct but
hides the root of the problem.

With this detect we can construct a more useful error
message in the higher layers.
2025-05-12 20:51:57 +02:00
schutzbot
6c961552ce Schutzfile: Update images dependency ref to latest 2025-05-12 13:51:37 +02:00
schutzbot
3319173a1b Schutzfile: Update images dependency ref to latest 2025-05-09 15:48:38 +03:00