Moved the function that searches for the boot partition index to the
PartitionTable struct as a method. The method returns -1 if not found
and it's now the responsibility of the caller to handle the case where
it is not found.
Unlike the original regression test which explicitly names the excluded
dependency, this test installs a package that depends on the excluded
package without naming it. Based on the new way we depsolve blueprint
packages in RHEL 8.5, this should now work as well.
- Rewrote regression.sh to be like base tests with list of regression
test scripts to be run and fail counts
- Separate regression tests in CI to have better control of distro
runners
To avoid packages specified in a blueprint from conflicting with exclude
lists, we depsolve blueprint packages separately and pass them into the
Manifest generator under the new "blueprint" package set key.
This approach has the added benefit that dependencies of packages
specified in the blueprint are not subject to exclusion in addition to
the explicitly named packages.
The OS pipeline which installs the packages for the base system merges
the two package sets before running the RPM stage. The signature of the
function is changed to explicitly require blueprint packages be
specified (though `nil` or empty slice is valid).
The kernel selection test is adapted to merge the package sets before
counting kernel package.
Adaptation of changes in
https://github.com/osbuild/osbuild-composer/pull/1349
- Cleaned up distro-specific edge package sets
- Added edge package set merging in PackageSets() function
- Edge image type definitions are no longer arch specific, just like the
other image types
- Move all package set definitions to package_sets.go file.
- Do not append image package sets to arch and distro sets; this happens
automatically in PackageSets() method.
- Fix architecture-specific package sets (boot and build where
available).
Live image pipeline: Creates the live image in a file through a loopback
device.
Stages:
- truncate: create the file to hold the image
- sfdisk: partition the device
- mkfs.fat, mkfs.xfs: create the filesystems
- copy: copy the tree from the previous pipeline (the OS pipeline) into
the directories where the partitions are mounted
- grub2.inst: install the bootloader
QEMU pipeline: Convert the live image from the previous pipeline to a
qcow2 image.
coreStages() was meant to produce the stages that are common between all
image types. Since there are too many exceptions and differences between
traditional and edge image types, keep the two pipelines separately
instead.
Moved SELinux stages to the end of each pipeline.
Renamed the argument to have clearer (and correct) meaning and added a
function docstring to describe the purpose.
The argument is set to 'true' in the build pipeline.
Let's explain how RPMs for RHEL are built:
We use a subscribed RHEL 8.x machine and mock build these on it. Mock
initializes its own buildroot based on the latest RHEL 8 CDN content, see[1].
This means that the minor version of the buildroot is independent of the minor
version of the host.
However, we currently upload RPMs to a directory whose name consists also of
the minor version of the host. Our hosts are currently running RHEL 8.3 so
the RPMs are uploaded into rhel-8.3 directory despite them being built in the
RHEL 8.4 buildroot (RHEL 8 CDN buildroot specifically). This means that
we cannot guarantee that they are installable on RHEL 8.3 which is weird.
This commit adds a special case for hosts that run on subscribed RHEL and
thus build RPMs in a buildroot constructed from RHEL CDN. These RPMs are
now uploaded into rhel-8-cdn directory. This change more accurately reflects
the way we build our RPMs and removes some confusion.
Also, we need to bump osbuild commit so we have a version that already has
the rhel-8-cdn change in it.
[1]: https://github.com/rpm-software-management/mock/blob/main/mock-core-configs/etc/mock/templates/rhel-8.tpl#L37
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Previously a bad error code was returned, fixes#1477.
Testing:
I have two test cases to test the solution. The first is a request that
makes depsolve crash by changing the dnf-json script by an almost empty
one that only throws an exception. The second one fails because it
requests a non existing package. The former ends with a 500 error and
the later with a 400.
----8<-----
HTTP/1.1 500 Internal Server Error
Failed to depsolve base packages for ami/x86_64/centos-8: ailed to
depsolve base packages for ami/x86_64/centos-8: unexpected end of JSON
input
----8<-----
HTTP/1.1 400 Bad Request
Content-Length: 226Failed to depsolve base packages for
ami/x86_64/centos-8: DNF error occured: MarkingErrors: Error occurred
when marking packages for installation: Problems in request:
missing packages: jesuisunpaquetquinexistepas_idonotexist
Introduce Dockerfile and devcontainer.json specifying how to build and
run a containerized development environment in VSCode.
The configuration is inspired by the osbuild repo where a similar
configuration directory already exists.
Some osbuild stages added as part of PR#1525 declare unexported types
which are complete copies of types with custom MarshalJSON method,
to prevent recursion when marshalling to JSON.
Modify relevant osbuild stages to use type alias instead of declaring a
complete type copy.
https://github.com/osbuild/osbuild-composer/pull/1525
Signed-off-by: Tomas Hozza <thozza@redhat.com>