Commit graph

5666 commits

Author SHA1 Message Date
Achilleas Koutsou
c7aecdf31c distro: delete distro.Manifest type
Delete the distro.Manifest type and its tests.
Change all occurrences of distro.Manifest to manifest.OSBuildManifest.
2023-05-31 16:40:07 +02:00
Achilleas Koutsou
5498764725 manifest: serialize to OSBuildManifest instead of distro.Manifest
Copy the Marshal and Unmarshal functions from distro.Manifest to
manifest.OSBuildManifest to keep the same behaviour.

The Version() function isn't used, so let's drop it.
2023-05-31 16:40:07 +02:00
Achilleas Koutsou
8f69088af1 distro: remove architecture names and use platform enum
Removing the dependence of the manifest package on the distro package to
import manifest into distro.
Wherever arch names are needed, we use the enums from the platform
package instead.
2023-05-31 16:40:07 +02:00
Achilleas Koutsou
0f925c445c subscription: new package for subscription options
Move the subscription options from distro to its own package.
Now we can import the manifest package into the distro package (instead
of the other way around) so we can work with the manifest.Manifest type
in distro.
2023-05-31 16:40:07 +02:00
Achilleas Koutsou
ea305d9c0f distro: simplify checkOptions() arguments
Make checkOptions() take the whole blueprint and options.  There is no
need to pass in the resolved containers separately since we only care
whether there are any containers defined for image types that don't
support them.
2023-05-31 16:40:07 +02:00
Achilleas Koutsou
e4e411a4c1 distro/rhel7: move imageType implementation to separate file 2023-05-31 16:40:07 +02:00
Achilleas Koutsou
31fd40f359 distro/fedora: move imageType implementation to separate file 2023-05-31 16:40:07 +02:00
Achilleas Koutsou
3d9dcff7f6 distro: inline initializeManifest
Inline the initializeManifest() function so we can start simplifying the
PackageSets() and Manifest() (the two callers) separately.
2023-05-31 16:40:07 +02:00
Gianluca Zuccarelli
744eb9d337 spec: depend on osbuild v85
osbuild v85 added the ability to save the `sslverify` field, this
commit sets the dependency to v85.

Added in https://github.com/osbuild/osbuild/pull/1298
2023-05-31 16:24:36 +02:00
Gianluca Zuccarelli
388e2572d7 internal/osbuild: add missing sslverify field
The blueprint customizations enabled the `sslverify`
field. However, this has not been implemented yet in
the yum repos stage.
2023-05-31 16:24:36 +02:00
Gianluca Zuccarelli
ce299dfa0e internal/rpmmd: change ignoressl to pointer
Change the `IgnoreSSL` field in `rpmmd.RepoConfig`
to a pointer. This will be later used to configure
the `SSLVerify` field in the yum repo stage.
2023-05-31 16:24:36 +02:00
schutzbot
173de3eba4 Post release version bump
[skip ci]
2023-05-31 08:22:34 +00:00
Jakub Rusz
686b01d0ba tests/vmware: fix cleanup trap and failure check
The cleanup trap was removed and therefore it never ran. Also changing
the check if the test is successful as before it was passing despite
failures being present.
2023-05-30 16:45:30 +02:00
Jakub Rusz
86d11d9b67 tests/vsphere: report only ipv4 address 2023-05-30 16:45:30 +02:00
Jakub Rusz
a5547a2fa0 vmware: fix typo in cleanup call 2023-05-30 16:45:30 +02:00
Jakub Rusz
4b6cb10c55 CI: update centos-stream-8 images and snapshots 2023-05-30 16:45:30 +02:00
dependabot[bot]
be6119ccfe build(deps): bump github.com/Azure/go-autorest/autorest/azure/auth
Bumps [github.com/Azure/go-autorest/autorest/azure/auth](https://github.com/Azure/go-autorest) from 0.5.11 to 0.5.12.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/azure/auth/v0.5.11...autorest/azure/auth/v0.5.12)

---
updated-dependencies:
- dependency-name: github.com/Azure/go-autorest/autorest/azure/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 17:36:58 +02:00
dependabot[bot]
92bd58bd76 build(deps): bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:04:27 +02:00
dependabot[bot]
d4a5b5c694 build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 10:45:21 +02:00
Sanne Raymaekers
e27a866917 schutzbot/terraform: update
Adds a newer centos-stream-8 build.
2023-05-25 10:14:32 +02:00
Sanne Raymaekers
da2feadabf Schutzfile: bump osbuild to v85 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
6335fb38cc test/cases/vmware.sh: add integration test for ova types 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
8a8607cdf6 internal/vmware: add support for the GOVC_FOLDER option
When importing the ova it also creates a VM, and users don't always have
permission to register in the default folder.
2023-05-25 10:14:32 +02:00
Sanne Raymaekers
ce52f658d1 test/data/manifests: regenerate manifests 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
f5b01125b6 tools/test-case-generators: add ovf image type 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
967306bc47 internal/upload: add import.ova support to vmware 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
e91dcae110 fedora: add ova image type 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
a7c02245ee rhel8: add ova image type 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
39f1e74d73 rhel9: add ova image type 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
1687937c51 internal/image: add ova support to live image 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
53fa47f104 internal/osbuild: add ovf stage 2023-05-25 10:14:32 +02:00
Tomáš Hozza
0292725ce4 internal/GCP: remove all remaining uses of cloudbuild
Some uses of `cloudbuild` GCP API have been left in our internal cloud
API implementation for GCP. We do not use `cloudbuild` to import GCE
images into GCP any more.

Do not request the `cloudbuild` authentication scope when getting new
GCP client.

Update vendored packages accordingly.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-24 19:28:06 +02:00
dependabot[bot]
d56726646c build(deps): bump google.golang.org/api from 0.122.0 to 0.123.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.122.0 to 0.123.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.122.0...v0.123.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 15:42:06 +02:00
dependabot[bot]
9929ee8951 build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 13:12:24 +02:00
dependabot[bot]
96067cf511 build(deps): bump github.com/labstack/echo/v4 from 4.10.0 to 4.10.2
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.10.0 to 4.10.2.
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.10.0...v4.10.2)

---
updated-dependencies:
- dependency-name: github.com/labstack/echo/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 13:08:02 +02:00
Tomáš Hozza
f335096f66 distro/rhel9: revert hybrid boot on RHEL EC2 (RHUI) images before 9.3
For backward compatibility, revert changes related to hybrid boot mode
for RHEL (RHUI) EC2 images before 9.3 release.

This change does not affect CentOS Stream 9 AMI images nor the RHEL AMI
build by the service or on-premise.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-23 13:04:31 +02:00
Tomáš Hozza
3eb5779e8b distro/rhel8: revert hybrid boot on RHEL EC2 (RHUI) images before 8.9
For backward compatibility, revert changes related to hybrid boot mode
for RHEL (RHUI) EC2 images before 8.9 release.

This change does not affect CentOS Stream 8 AMI images nor the RHEL AMI
build by the service or on-premise.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-23 13:04:31 +02:00
Sanne Raymaekers
8e637848e4 internal/manifest: execute rhc's post install script
The post install script customises the selinux policy, but is gated on
`selinuxenabled`, which will fail inside the buildroot container.

As a result it's never executed.
2023-05-22 21:39:14 +02:00
dependabot[bot]
1410a1e6de build(deps): bump cloud.google.com/go/storage from 1.27.0 to 1.30.1
Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.27.0 to 1.30.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.27.0...pubsub/v1.30.1)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 19:23:32 +02:00
Paul Whalen
cd5cc08ce6 iot: add fedora-release-iot to iot-installer
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2023-05-22 17:15:56 +02:00
Tomáš Hozza
2a50092920 Test: add Fedora iot-raw-image test manifests with customizations
Add Fedora iot-raw-image test manifests with supported customizations,
specifically:
 - custom users and groups
 - custom enabled services
 - custom files and directories

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
bf377d81c1 Test/ostree-raw-image: test dirs and files customizations
Extend the `ostree-raw-image.sh` to use the directories and files
customizations for the raw image and test their effect using the ansible
playbook.

Custom files and directories are currently tested only on Fedora,
because they are allowed by policy only there.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
956e3b9b69 Test: reformat parts of ostree-simplified-installer.sh
Reformat calls of `ansible-playbook` by splitting them into multiple
lines. This makes it easier to read.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
34c1594216 Test: reformat parts of ostree-raw-image.sh
Break the execution of `ansible-playbook` into multiple lines to make it
easier to read.

Add a comment on top of the second `ansible-playbook` execution if
Ignitions is availble, explaining what differs. Otherwise this is hard
to spot.

There are 3 places in the script, where there are always 2 executions of
the `ansible-playbook`. First the user from the BP is used. On the
second run, the user created by Ignition is used. This was not the case
for the last 2 executions of `ansible-playbook` at the end of the
script. Adjust the order for consistency with the rest of the script.

The changes should have no effect on the test case.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
9ab20f72b0 distro/fedora: restrict allowed 'iot-raw-image' type customizations
Previously, the rest was mostly silently ignored without errors.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
76cbec2149 distro/el8: restrict allowed 'edge-raw-image' type customizations
Previously, the rest was mostly silently ignored without errors.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
2cd7074b23 distro/el9: restrict allowed 'edge-raw-image' type customizations
Previously, the rest was mostly silently ignored without errors.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
f24e2cb175 image/ostree-raw: pass services from workload to the pipeline
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
c53471a3f6 manifest/ostree-deployment: support services customization
One of the IOT use cases for custom files and directories is to be able
to enable a custom systemd unit. This was previously not possible to do
via BP Customizations.

In addition, the test case for custom files and directories in
ostree-based images (currently only build-time images) takes advantage
of enabling a custom systemd unit file, this this will enable using the
same test scenario also for deploy-time ostree image types.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
edf3a38b29 distro/fedora: hook up custom dirs / files for iot raw-image
Set the user provided BP customizations related to custom files and
directories to the iot raw-image type, to ensure that these get
created while deploying a commit.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00