Commit graph

318 commits

Author SHA1 Message Date
Ondřej Budai
76c18566fc spec: exclude i686 architecture
RHEL 8 doesn't have golang in the i686 buildroot anymore. Fedora doesn't have
i686 images and kernel anymore. Also, osbuild-composer doesn't have support
for building i686.

Let's exclude i686 for these reasons, it's dead.
2020-05-28 19:44:13 +02:00
Ondřej Budai
5f0dffefe4 13
Release osbuild-composer version 13
2020-05-28 09:44:36 +02:00
Ondřej Budai
fcd3394a82 spec: bump the osbuild dependency to version 15
The new Fedora IoT image type uses org.osbuild.ostree.commit assembler with
tar option that was introduced in osbuild 15, therefore the dependency version
must be bumped.

This also bumps the submodule to 9cbedc04. That's basically version 15 of
osbuild with one fix related to secrets.
2020-05-28 00:31:30 +02:00
Alexander Todorov
ef392a5b93 Build -tests RPM on RHEL unconditionally 2020-05-15 09:35:24 +02:00
Ondřej Budai
e2c9b9d881 12
Release osbuild-composer version 12
2020-05-14 07:30:56 +02:00
Ondřej Budai
169f54ed34 11
Release osbuild-composer version 11
2020-04-29 20:42:37 +02:00
Ondřej Budai
c6b9bf4545 spec: fix warnings during the package removal
Currently, removing osbuild-composer produces these warnings:

Failed to stop osbuild-worker@.service: Unit name
osbuild-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-worker@.service' for details.
Failed to stop osbuild-remote-worker@.service: Unit name
osbuild-remote-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-remote-worker@.service' for
details.

%systemd_preun calls on a package upgrade this:
systemctl --no-reload disable --now [ARGS...]

I tried using a wildcard:

systemctl --no-reload disable --now "osbuild-worker@*.service"

But this gives:

Invalid unit name "osbuild-worker@*.service" was escaped as
"osbuild-worker@\x2a.service" (maybe you should use systemd-escape?)
Failed to disable unit: Unit file osbuild-worker@\x2a.service does not exist.

In the end I decided to use two commands - disable and stop. Disable works
without a wildcard, stop requires one. This solution should mimic systemctl
disable --now pretty well.
2020-04-29 10:50:58 +02:00
Ondřej Budai
e3acf45588 spec: fix warnings during the package upgrade
Currently, upgrading osbuild-composer produces these warnings:

Failed to try-restart osbuild-worker@.service: Unit name
osbuild-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-worker@.service' for details.
Failed to try-restart osbuild-remote-worker@.service: Unit name
osbuild-remote-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-remote-worker@.service'
for details.

%systemd_postun_with_restart calls on a package upgrade this:
systemctl try-restart [ARGS...]

However, try-restart requires using a wildcard when restarting all
the services created from a template unit. This commit therefore adds the
wildcards.
2020-04-29 10:50:58 +02:00
Ondřej Budai
e235fdedb3 tests/image: boot the vhd images on Azure
Previously, vhd images were tested using QEMU. This commit changes that to
boot them in the actual Azure infrastructure.

Azure VMs have quite a lot of dependencies - a network interface, a virtual
network, a network security group, a public ip address and a disk. Azure CLI
and Azure Portal handle the creation of all these resources internally.
However, when using the API, the caller is responsible to create all these
resources before creating an actual VM.

To handle the creation of all the resources in the right order, a deployment
is used. A deployment is a set of resources defined in a JSON document.
It can optionally take parameters to customize each deployment. After the
deployment is finished, the VM is up and ready to be tested using SSH.

Sadly, the deployments are a bit hard to clean-up. One would expect that
deleting a deployment removes all the deployed resources. However, it doesn't
work this way and therefore it's needed to clean up all resources "manually".
For this reason, our deployment sets a unique tag on all the resources created
by the deployment. After this test is finished, the API is queried for all
the resources with the tag and then, they're deleted in the right order.
2020-04-27 20:34:20 +02:00
Ondřej Budai
5d77188de0 bump osbuild to version 12
We will soon need the support for vhdx format, which is supported since
osbuild 12.

This commit bumps the dependency in the spec file and also updates the
submodule.
2020-04-24 15:27:39 +02:00
Ondřej Budai
dbfc2a0929 10
Release osbuild-composer version 10
2020-04-15 16:59:42 +02:00
Martin Sehnoutka
e887518736 image-tests: Include qemu command specific for aarch64
The osbuild-image-tests don't currently support boot test for any
alternative architecture because the qemu-system-x86_64 command is
hardcoded. This patch introduces a branch specific to aarch64, but
without a KVM support as I was unable to make it run in Beaker, which is
currently the only offering we have with ARM machines. As a workaround
the boot tests will be skipped if kvm kernel module is not found and only
image-info tests will run.
2020-04-15 15:22:57 +02:00
Martin Sehnoutka
2b83a16c37 osbuild requirement: bump to version 11
The newest osbuild is needed for support for aarch64. The aarch64 images
are using GPT which requires stable partuuid which was included in the
latest osbuild release (11). This will be used to produce stable
image-info tests.
2020-04-07 21:14:05 +02:00
Ondřej Budai
09109b4f8e 9
Release osbuild-composer version 9
2020-04-01 15:56:57 +02:00
Lars Karlitski
c5823d92b4 spec: build test binaries against installed libraries
On Fedora, the `%gobuild` macro turns off go modules and sets gopath to
installed libraries (in `/usr/share/gocode`).

When building the test binaries, we used `go test -c` directly, which
downloaded the libraries into GOPATH. That's wasteful and doesn't work
in mock (without internet). Replicate what `%gobuild` does by setting
`GO111MODULE=off` and `GOPATH` to the correct value.

RHEL uses modules as intended. No change is necessary.
2020-03-31 09:48:23 +02:00
Brian C. Lane
856eb59edf client: Move the weldrcheck integration tests to client
With this change the integration tests can now also be run as unit tests
against the mocked server. The way it works is this:

internal/client/unit_test.go sets up the mock server and is built
when the `integration` build tag is *not* included.

internal/client/integration_test.go sets up the connection to an
existing server and is built when the `integration` build tag *is*
included.

The test code is built and run for both cases.

Currently they all pass for the integration test run. The unit test
cases need some work because the mocked server isn't a real server with
real depsolving and package lists. A future commit will fix this.
2020-03-27 19:07:33 +01:00
Ondřej Budai
0d5c2d141c spec: add notes to remove the lines related to renaming in F34
The packaging guidelines requires that these provides and obsoletes stays
in the spec file for 2 fedora versions. The name change was introduced in
Fedora 32, there the lines should be removed in F34.
2020-03-25 11:43:39 +01:00
Ondřej Budai
0b08eb1904 spec: add spec file for osbuild-composer package
We successfully renamed the package in Fedora to osbuild-composer
(RHBZ #1815577). This commit adds the new spec file.

Changes: the tests subpackage is not built by default, to build it
--with tests parameter must be passed to rpmbuild.

Let's hope both spec files stay in sync.
2020-03-25 11:43:39 +01:00