Commit graph

5428 commits

Author SHA1 Message Date
Gianluca Zuccarelli
b7e7bafb2e internal/remotefile: create a remote file resolver
Create a resolver to fetch the contents of a
remote file which can be used at build time.
The initial usecase for this resolver is to
resolve remote gpgkeys but the resolver has
been made more generic for general files.
2023-03-16 09:55:39 +00:00
Gianluca Zuccarelli
c056db4811 worker/server: add file resolver job
Add a file resolver job to the worker server in
order for us to resolve the contents of a remote
file.
2023-03-16 09:55:39 +00:00
Gianluca Zuccarelli
98d611d34f worker/server: fix container resolver job error
The container job resolve job error message was printing
the wrong error type to the error string.
2023-03-16 09:55:39 +00:00
Gianluca Zuccarelli
b493da1878 internal/clienterrors: add file resolution error
Add a client error type for an error in the remote
file resolution job.
2023-03-16 09:55:39 +00:00
Antonio Murdaca
414424cd30 simplified-installer: enable isolinux
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2023-03-15 12:35:50 +01:00
Sanne Raymaekers
861e1473d9 test/vmware: boot VMs with EFI and use SCSI as a disk controller
Since we use streamOptimized images everywhere, we no longer need to use
IDE and boot with bios. Let's test a more realistic scenario.
2023-03-15 10:37:21 +01:00
Simon de Vlieger
23627e9ce0 distro/fedora: add support for Fedora 39 2023-03-15 09:31:23 +01:00
yih
4023b61e1a test fdo create user 2023-03-10 14:40:49 +01:00
Sanne Raymaekers
a25e0f4adb prometheus:: add arch label to dequeue metrics
Only add the arch label for osbuild job types, as the finish metrics
behave similarly. Having arch labels on dequeue metrics for any other
job type (but not on the finish metrics) would produce weird results.
2023-03-09 18:47:57 +01:00
yih
d7e2e5d740 add sysroot permission test 2023-03-09 18:54:06 +08:00
Simon de Vlieger
a28d535577 image-installer: switch payload to minimal-rpm
With the addition of the minimal rpm package set and image type in #3181
the previously added bare metal package set is a duplicate. It's not
used elsewhere within fedora and the minimal rpm package set is
officially defined.
2023-03-08 12:15:23 +01:00
Simon de Vlieger
5f0d273248 distro: remove duplicate version checks for fonts
The new names of the packages are being added twice in two different
checks, remove the redundant code.
2023-03-08 12:12:18 +01:00
schutzbot
365e8242f9 Post release version bump
[skip ci]
2023-03-08 08:23:28 +00:00
Brian C. Lane
b1c2dbdfc6 Remove old build tag comments
Go is transitioning from the old '// +build' form to '//go:build', this
removes all uses of the old form, adding the new one where needed.

See https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md
2023-03-07 09:22:23 -08:00
Brian C. Lane
7a4bb863dd Update deprecated io/ioutil functions
ioutil has been deprecated since go 1.16, this fixes all of the
deprecated functions we are using:

ioutil.ReadFile -> os.ReadFile
ioutil.ReadAll -> io.ReadAll
ioutil.WriteFile -> os.WriteFile
ioutil.TempFile -> os.CreateTemp
ioutil.TempDir -> os.MkdirTemp

All of the above are a simple name change, the function arguments and
results are exactly the same as before.

ioutil.ReadDir -> os.ReadDir

now returns a os.DirEntry but the IsDir and Name functions work the
same. The difference is that the FileInfo must be retrieved with the
Info() function which can also return an error.

These were identified by running:
golangci-lint run --build-tags=integration ./...
2023-03-07 09:22:23 -08:00
Tomáš Hozza
0e4a5b34b2 worker: allow configuring number of upload threads for Azure
The default number of threads (16) is OK for general use case. However,
we are being asked by RH IT to lower the number of threads when
uploading the image to Azure using proxy server.

Make the number of threads configurable in the worker configuration and
default to the currently used value if it is not provided.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-03-03 18:15:53 +01:00
Sanne Raymaekers
a08eb69b2e templates/packer/ansible: fix enabling cdn repos on aarch64 2023-03-03 17:58:49 +01:00
Sanne Raymaekers
c1032f31e4 templates/packer/ansible: fix unregister
The community redhat_subscription module calls `subscription-manager
unsusbscribe`, which doesn't exist. Use shell for now.
2023-03-03 17:58:49 +01:00
schutzbot
3f9da9df33 schutzfile: Update snapshots to 20230301 2023-03-03 13:11:42 +01:00
Sanne Raymaekers
ca8a05bd3a templates/packer: subscribe packer machines
To avoid a mismatch between the RPMs (which are build using CDN content)
and the packer instances (RHUI, which might be older).
2023-03-03 13:00:05 +01:00
Sanne Raymaekers
41d98c85a7 tools/appsre-ansible: revert sub removal on rpmbuild machines
The rhel-9 templates used in mock don't work with RHUI, they require the
CDN. This reintroduces the RHUI-CDN repo sync issue again.

This reverts commit d9f2ac14bc.
2023-03-03 13:00:05 +01:00
yih
266cfdcc44 fix ansible error on centos9 2023-03-02 16:03:11 +01:00
Diaa Sami
19f9ab7f58 koji: log unsuccessful requests only once 2023-03-02 15:48:12 +01:00
Tomáš Hozza
f8b39cd34e manifest/os: fix SUPPRESSED_ERROR issue reported by Coverity
Fix the following error reported by Coverity:
```
Defect type: SUPPRESSED_ERROR
1. osbuild-composer-75/_build/src/github.com/osbuild/osbuild-composer/internal/manifest/os.go:546: suppressed_error: The error returned by the function "GetVerStrFromPackageSpecList(p.packageSpecs, "dracut-config-rescue")" is not explicitly checked.
2. osbuild-composer-75/_build/src/github.com/osbuild/osbuild-composer/internal/manifest/os.go:546: remediation: Explicitly check the return error.
   544|   				}
   545|
   546|-> 				rescueVer, _ := rpmmd.GetVerStrFromPackageSpecList(p.packageSpecs, "dracut-config-rescue")
   547|   				hasRescue := rescueVer != ""
   548|   				bootloader = osbuild.NewGrub2LegacyStage(
```

Change the code to check if the called function returned an error or
not. If not error is returned, then the function returns a package
version string.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-03-01 20:20:52 +01:00
Sanne Raymaekers
75e6333b9e Revert "tools/appsre-ansible: workaround missing authselect-compat"
This reverts commit 4833f99070.
2023-03-01 20:05:38 +01:00
Sanne Raymaekers
0096ff3689 Revert "Packer: workaround missing authselect-compat-1.2.5-2.el9_1 in RHUI repos"
This reverts commit 0a4a75e19e.
2023-03-01 20:05:38 +01:00
Sanne Raymaekers
d9f2ac14bc tools/appsre-ansible: don't subscribe machines used for rpmbuild
We actually use rhui/cloud access images for rpmbuild as well. And the
sync issue between cdn and rhui repos can cause issues when rpms are
build against older packages.
2023-03-01 20:05:38 +01:00
Sanne Raymaekers
56aa40ea5e test/data/manifests: regenerate fedora manifests 2023-03-01 14:35:56 +01:00
Sanne Raymaekers
b06863e468 distro/fedora: add open-vm-tools to vmdk package set 2023-03-01 14:35:56 +01:00
schutzbot
12e5dbd531 Post release version bump
[skip ci]
2023-03-01 12:06:53 +00:00
Antonio Murdaca
ed4d12fe33 ignition: enable systemd firstboot condition through kargs
This is a workaround to make the systemd believe it's firstboot
when ignition runs on real firstboot.
Right now, since we ship /etc/machine-id, systemd thinks it's not firstboot
and ignition depends on it to run on the real firstboot to enable services from presets.
Since this only applies to artifacts with ignition and changing machineid-compat at
commit creation time may have undesiderable effect, we're doing it here as a stopgap.
We may revisit this in the future.
This patch also pins the version of osbuild because it depends on a fix
for the ignition stage.

Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-28 18:35:45 +01:00
Alexander Todorov
72b223c064 Remove duplicate function and use the shared implementation 2023-02-28 11:15:49 +01:00
Alexander Todorov
e064c12449 Update test suite after rebase to weldr-client-35.9
in order to avoid failures in nightly pipelines b/c JSON format has
changed
2023-02-28 11:15:49 +01:00
Juan Abia
a761184725 Modify CIV options
With the previous method of passing options, we encountered some
problems when sending the options via an array.
2023-02-28 10:26:01 +01:00
Achilleas Koutsou
f11589367e internal: FIXME notes for container package set
Tracing the package set and repository journey, I found that the
container package defined on the image type is never really used.

Added notes to fix later.
2023-02-23 16:22:42 +01: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
Achilleas Koutsou
b8fc241755 gen-manifests: copy whole repo config when generating tests
The bug wasn't caught because the PackageSets field of the repository
wasn't being copied after parsing the compose request for the test
manifest.

This should now catch future occurrences of this bug.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
b0a6b486a1 distro/test: set dnf-json path for solver
The value comes from the command line args of the test binary
(osbuild-composer-manifest-tests).  It works in our tests because we use
the default value, but if it was set differently it would have been
ignored.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
114ed20fab distro/test: include package sets field in manifest test repos
The test previously ignored the package-sets field in the repos in the
compose request.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
2a4cd1966d distro: pass all repos to initializeManifest
Pass through all repos to the initalizeManifest() function.  Each
pipeline will then select which repositories it needs based on the
PackageSets field of each repository.

Before, we only passed global repos down to the manifest generators and
pipeline-specific repositories would only be used if they were attached
to package sets and were handled explicitly by a pipeline generator.

The repositories of the "blueprint" package set are explicitly added to
the workload and returned by the "os" pipeline.
The repositories of the "installer" package set are explicitly added to
the "anaconda-tree" pipeline.

If a repository was specified for any other pipeline, for example
"build", the repositories for the that package set were never added to
the pipeline.

Fixes #3290
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
c7e0b69704 manifest: add only necessary repositories to each pipeline
Each pipeline constructor receives the full list of repositories and
filters the list based on its own internal name.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
a66003e513 manifest: helper function for collecting pipeline repos
Function that filters a list of repositories to return only the global
repos and any that define a given pipeline or package set name in their
list of PackageSets.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
50f578924c distro: rename osPkgsKey from "packages" to "os"
Match the key for the OS packages to the name of the OS pipeline ("os").
We will use this key to identify package sets that are returned from the
OS pipeline since the manifest returns package sets indexed by each
pipeline's name.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
942d807877 weldr: fix payload repos package sets assignment
The PayloadPackageSets() was being added to the wrong field in each
payload repository.
Also updated the outdated docstring.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
b918dc8a8c distro/test: add new test for pipeline-specific repos
New test that runs through a few different scenarios of assigning
repositories to specific package sets.  Each scenario defines a set of
global repositories (or none) and a set of pipeline-specific
repositories (or none) and an expected result.  It then calls the
distro's PackageSets() method.  The test checks that the package sets
that are returned are assigned the correct repositories based on the
test case's expected result.

A basic string-set struct is implemented to help with merging and
comparing string slices.

This test should currently fail due to #3290.
2023-02-23 16:22:42 +01:00
Achilleas Koutsou
777d27efbf distro/test: remove RHEL 7 exception from PipelineNames test
RHEL 7 rewrite makes this exception obsolete.
2023-02-23 16:22:42 +01:00
schutzbot
cd8898842c Post release version bump
[skip ci]
2023-02-22 14:01:35 +00:00
Xiaofeng Wang
eaee7870ba test: Add user in simplified installer blueprint
Run ansible playbook with user configured in simplified installer
blueprint
2023-02-22 12:18:12 +01:00
Irene Diez
38b6b9cdcf distro/rhel8+9: allow User/Group customizations on edge-si
Signed-off-by: Irene Diez <idiez@redhat.com>
2023-02-22 12:18:12 +01:00
Irene Diez
dbadd42a01 distro/rhel8+9: deprecate User/Group customi. on edge-commit/container
Signed-off-by: Irene Diez <idiez@redhat.com>
2023-02-22 12:18:12 +01:00