https://blue-build.org/ logo
Rebasing to a BlueBuild-built image
# questions
g
If I run
bluebuild switch
I get this error:
Copy code
bash
l/goose-linux:latest => Writing manifest to image destination
l/goose-linux:latest => Loaded image: localhost/goose-linux:latest
l/goose-linux:latest => Pulling manifest: ostree-unverified-image:containers-storage:localhost/goose-linux:latest
l/goose-linux:latest => error: Preparing import: Fetching manifest: failed to invoke method OpenImage: reference "[overlay@/var/lib/co
ntainers/storage+/run/containers/storage:overlay.imagestore=/usr/lib/containers/storage,overlay.mountopt=nodev,metacopy=on]localhost/g
oose-linux:latest" does not resolve to an image ID
ERROR => Failed:
  × Failed to switch to image localhost/goose-linux:latest

error: Recipe `switch` failed on line 23 with exit code 1
The image builds correctly with
bluebuild build
and I can do something like
docker run -it localhost/goose-linux:latest bash
just fine. I thought maybe
rpm-ostree
was expecting
podman
, so I've also tried generating a Containerfile, which works, but building it with
podman
tells me this:
Copy code
bash
--> 36435b4e32a3
[6/6] STEP 16/42: RUN --mount=type=bind,src=.bluebuild-scripts_f82e9742,dst=/scripts/,ro   /scripts/pre_build.sh
/bin/sh: line 1: /scripts/pre_build.sh: Permission denied
Error: building at STEP "RUN --mount=type=bind,src=.bluebuild-scripts_f82e9742,dst=/scripts/,ro /scripts/pre_build.sh": while running 
runtime: exit status 126
Docker can build the Containerfile but tells me :
Copy code
bash
Pulling manifest: ostree-unverified-registry:containers-storage:localhost/goose-linux
error: Preparing import: Fetching manifest: failed to invoke method OpenImage: invalid reference format
when trying to rebase. My end goal is to have an ostree OS which contains its own BlueBuild repo which I can rebuild and rebase from, all locally.
a
message has been deleted
g
bluebuild switch
is seutp to require the use of
podman
. This looks like a bug in the
rpm_ostree_driver
. The
generate
command might not be extracting the build files which is why you're running into that. Mind finding the command that's run by using trace logging (
-vv
)?
g
err I'm guessing you meant -vv on the switch call... it looks like it is calling podman
Copy code
bash
[16:31:13 INFO  blue_build_process_management::drivers::podman_driver:174] => Successfully built localhost/goose-linux:latest
[16:31:13 TRACE blue_build_process_management::drivers::podman_driver:74] => "podman" "image" "scp" "root@localhost::localhost/goose-linux:latest" "root@localhost::"
[16:31:13 l/goose-linux:latest] => Copying blob sha256:da8249c9bf25250c513eb0abe1afa42323ac46d05def24cb9512bde970f9483b
---
Copy code
bash
[16:32:09 l/goose-linux:latest] => Copying config sha256:2c46bfd82b64eec1d5869dd20806de6aa57739750c170380786a7dea744e6d27
[16:32:09 l/goose-linux:latest] => Writing manifest to image destination
[16:32:09 l/goose-linux:latest] => Loaded image: localhost/goose-linux:latest
[16:32:09 TRACE blue_build_process_management::drivers::podman_driver:732] => PodmanDriver::remove_image(RemoveImageOpts { image: Reference { registry: "localhost", mirror_registry: None, repository: "goose-linux", tag: Some("latest"), digest: None }, privileged: false })
[16:32:09 TRACE blue_build_process_management::drivers::podman_driver:742] => "podman" "rmi" "localhost/goose-linux:latest"
[16:32:11 TRACE blue_build_process_management::drivers::rpm_ostree_driver:55] => "rpm-ostree" "rebase" "ostree-unverified-image:containers-storage:localhost/goose-linux:latest" "--reboot"
[16:32:13 l/goose-linux:latest] => Pulling manifest: ostree-unverified-image:containers-storage:localhost/goose-linux:latest
[16:32:13 l/goose-linux:latest] => error: Preparing import: Fetching manifest: failed to invoke method OpenImage: reference "[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.imagestore=/usr/lib/containers/storage,overlay.mountopt=nodev,metacopy=on]localhost/goose-linux:latest" does not resolve to an image ID
[16:32:13 ERROR blue_build::commands:32] => Failed:
  × Failed to switch to image localhost/goose-linux:latest

error: Recipe `switch` failed on line 23 with exit code 1
g
If you do
sudo podman images
, do you see your image?
g
no... although I've tried all these commands with/without a sudo prefix
g
The
podman image scp
is supposed to copy it to the root container storage
g
So I figured the problem was with my image so I installed Bazzite from scratch and rebased to the template following its instructions. This is as close to a clean OS as I can think of. When trying to build and switch to an image locally, I still get these errors. For instance, this comes up when trying to build a wayblue image
Copy code
bash
l/hyprland:latest => Copying blob sha256:7b82fa7b9935298a7755f70a10fad56fc3f544d0d566a155de6dfedf0275e347
l/hyprland:latest => Copying config sha256:1e1322cfbc7c7918d54c8a3ff99ed70205011079ae860108eaac4a66bc370044
l/hyprland:latest => Writing manifest to image destination
l/hyprland:latest => Loaded image: localhost/hyprland:latest
l/hyprland:latest => Pulling manifest: ostree-unverified-image:containers-storage:localhost/hyprland:latest
l/hyprland:latest => error: Preparing import: Fetching manifest: failed to invoke method OpenImage: reference "[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.imagestore=/usr/lib/containers/storage,overlay.mountopt=nodev,metacopy=on]localhost/hyprland:latest" does not resolve to an image ID
ERROR => Failed:
  × Failed to switch to image localhost/hyprland:latest
When I
build
I do see the images (including localhost/niri:latest) in
podman image ls
but can't scp or rebase on them
Copy code
bash
given@fedora:~/wayblue$ podman image scp root@localhost::localhost/niri root@localhost::
[sudo] password for given: 
Error: localhost/niri: image not known
Error: exit status 125
Another curious thing is
switch
generates
.bluebuild-scripts_<hash>/
which can't be removed unless with
sudo
.
Copy code
bash
given@fedora:~/wayblue$ bluebuild build ./recipes/recipe-niri.yml
INFO  => Recipe ./recipes/recipe-niri.yml is valid
INFO  => Templating for recipe at ./recipes/recipe-niri.yml
ERROR => Failed:
  × Failed to remove old build script dir at ./.bluebuild-scripts_8b31c09e
  ╰─▶ Permission denied (os error 13)
9 Views