diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73d576f4..0a5cc063 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,7 +79,7 @@ jobs: - name: Install test dependencies run: | sudo apt update - sudo apt install -y python3-pytest python3-paramiko python3-boto3 flake8 qemu-system-x86 qemu-efi-aarch64 qemu-system-arm qemu-user-static pylint libosinfo-bin + sudo apt install -y python3-pytest python3-paramiko python3-boto3 flake8 pylint libosinfo-bin - name: Diskspace (before) run: | df -h @@ -90,6 +90,18 @@ jobs: sudo rm -rf /var/lib/containers/storage sudo mkdir -p /etc/containers echo -e "[storage]\ndriver = \"overlay\"\nrunroot = \"/run/containers/storage\"\ngraphroot = \"/var/lib/containers/storage\"" | sudo tee /etc/containers/storage.conf + - name: Updating qemu-user + run: | + # get qemu-9 with openat2 patches via qemu-user-static, that + # has no dependencies so just install. + # XXX: remove once ubuntu ships qemu-9.1 + sudo apt install -y software-properties-common + sudo apt-add-repository -y ppa:mvo/qemu + sudo apt install --no-install-recommends -y qemu-user-static + # Now remove ppa again, the metadata confuses apt. Then install + # qemu-system-* from the regular repo again. + sudo apt-add-repository --remove -y ppa:mvo/qemu + sudo apt install -y qemu-system-arm qemu-system-x86 qemu-efi-aarch64 - name: Install python test deps run: | # make sure test deps are available for root diff --git a/bib/cmd/bootc-image-builder/image.go b/bib/cmd/bootc-image-builder/image.go index d4091448..c16fe245 100644 --- a/bib/cmd/bootc-image-builder/image.go +++ b/bib/cmd/bootc-image-builder/image.go @@ -388,19 +388,11 @@ func manifestForDiskImage(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest mf.Distro = manifest.DISTRO_FEDORA runner := &runner.Linux{} - // Remove the "NewBootcLegacyDiskImage" if part below and - // *only* use the "else" part of the code once either of the - // following is available in centos/rhel - // https://github.com/containers/bootc/pull/462 - // https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html - if c.Architecture != arch.Current() { - legacyImg := image.NewBootcLegacyDiskImage(img) - err = legacyImg.InstantiateManifestFromContainers(&mf, []container.SourceSpec{containerSource}, runner, rng) - } else { - err = img.InstantiateManifestFromContainers(&mf, []container.SourceSpec{containerSource}, runner, rng) + if err := img.InstantiateManifestFromContainers(&mf, []container.SourceSpec{containerSource}, runner, rng); err != nil { + return nil, err } - return &mf, err + return &mf, nil } func labelForISO(os *source.OSRelease, arch *arch.Arch) string { diff --git a/test/testcases.py b/test/testcases.py index 78d8e926..b61be492 100644 --- a/test/testcases.py +++ b/test/testcases.py @@ -102,12 +102,8 @@ def gen_testcases(what): # pylint: disable=too-many-return-statements ] # do a cross arch test too if platform.machine() == "x86_64": - # TODO: re-enable once - # https://github.com/osbuild/bootc-image-builder/issues/619 - # is resolved - # test_cases.append( - # TestCaseC9S(image="raw", target_arch="arm64")) - pass + test_cases.append( + TestCaseC9S(image="raw", target_arch="arm64")) elif platform.machine() == "arm64": # TODO: add arm64->x86_64 cross build test too pass