containers / podman-desktop-extension-bootc

Support for bootable OS containers (bootc) and generating disk images
Apache License 2.0
412 stars 16 forks source link

When .iso is selected, show warning cannot build with others selected. #702

Closed cdrage closed 1 month ago

cdrage commented 2 months ago

Bug description

Unfortunately we cannot do multiple types output when iso is selected with raw, qcow2, etc:

Build Image Log ----------
ID:     httpd
Image:  quay.io/bootc-extension/httpd
Type:   raw,iso
Folder: /home/axel7083/Downloads
----------
{
  "name": "httpd-bootc-image-builder",
  "Image": "quay.io/centos-bootc/bootc-image-builder:latest-1720185748",
  "Tty": true,
  "HostConfig": {
    "Privileged": true,
    "SecurityOpt": [
      "label=type:unconfined_t"
    ],
    "Binds": [
      "/home/axel7083/Downloads:/output/",
      "/var/lib/containers/storage:/var/lib/containers/storage"
    ]
  },
  "Labels": {
    "bootc.image.builder": "true"
  },
  "Cmd": [
    "quay.io/bootc-extension/httpd:latest",
    "--output",
    "/output/",
    "--local",
    "--type",
    "raw",
    "--type",
    "iso",
    "--target-arch",
    "amd64"
  ]
}
----------
podman \
run \
--rm \
--name \
httpd-bootc-image-builder \
--tty \
--privileged \
--security-opt \
label=type:unconfined_t \
-v \
/home/axel7083/Downloads:/output/ \
-v \
/var/lib/containers/storage:/var/lib/containers/storage \
--label \
bootc.image.builder=true \
quay.io/centos-bootc/bootc-image-builder:latest-1720185748 \
quay.io/bootc-extension/httpd:latest \
--output \
/output/ \
--local \
--type \
raw \
--type \
iso \
--target-arch \
amd64
----------
Trying to pull quay.io/centos-bootc/bootc-image-builder:latest-1720185748...
Getting image source signatures
Copying blob sha256:a9d1ca2b0aab6a93e0a56f5e7955c43138a8e2f46413db6db9dfd8cf3c539412
Copying blob sha256:f0c78caae05f45ada0f664941d8526bcefb371b577e7e8d6265e25a683912807
Copying blob sha256:967f891a5e4fec8b354c88dc83fda687a053d2fc7bfba630eeb45def4348d79f
Copying config sha256:4fbe3c714b191596d6edf8ecc37df0dad149eeb4be17d930f41b35007b26e051
Writing manifest to image destination
Generating manifest manifest-raw-iso.json
2024/08/01 13:00:22 error: cannot build manifest: cannot detect build types [raw iso]: cannot build "iso" with different target types

We should show a warning that if iso is selected, iso must be the only one built.

Operating system

mac m1

Installation Method

None

Version

1.11.1

Steps to reproduce

No response

Relevant log output

No response

Additional context

No response

deboer-tim commented 2 months ago

:(

We should deselect all other options / warn the user when iso is selected.

IMHO an error would be better usability and fit in with our other validation.

benoitf commented 2 months ago

@cdrage is it for this repository or for bootc repository ?

cdrage commented 2 months ago

@cdrage is it for this repository or for bootc repository ?

My mistake, it is! I transferred it over.

:(

We should deselect all other options / warn the user when iso is selected.

IMHO an error would be better usability and fit in with our other validation.

I've updated the description, my mistake. That's what I meant, we should just output a warning.