Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bib: remove usage of BootcLegacyDiskImage (for qemu-9.1) #689

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 3 additions & 11 deletions bib/cmd/bootc-image-builder/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,19 +304,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 {
Expand Down
8 changes: 2 additions & 6 deletions test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,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(
# TestCaseCentos(image="raw", target_arch="arm64"))
pass
test_cases.append(
TestCaseCentos(image="raw", target_arch="arm64"))
elif platform.machine() == "arm64":
# TODO: add arm64->x86_64 cross build test too
pass
Expand Down
Loading