blue-build/cli

blue-build distroboxes are broken/bluebuild build podman errors

Opened this issue · 3 comments

[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="cannot find UID/GID for user user: no subuid ranges found for user \"user\" in /etc/subuid - check rootless mode in man pages."
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=warning msg="Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user"
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="cannot find UID/GID for user user: no subuid ranges found for user \"user\" in /etc/subuid - check rootless mode in man pages."
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=warning msg="Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user"
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="cannot find UID/GID for user user: no subuid ranges found for user \"user\" in /etc/subuid - check rootless mode in man pages."
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=warning msg="Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user"
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="cannot find UID/GID for user user: no subuid ranges found for user \"user\" in /etc/subuid - check rootless mode in man pages."
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=warning msg="Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user"
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="cannot find UID/GID for user user: no subuid ranges found for user \"user\" in /etc/subuid - check rootless mode in man pages."
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=warning msg="Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user"
[04:40:28 server:local-40] => time="2024-08-17T04:40:28+02:00" level=error msg="invalid internal status, try resetting the pause process with \"podman system migrate\": cannot re-exec process to join the existing user namespace

My podman installation works fine on aurora because distrobox works and hello world is also fine.
Something related to the distroboxes are broken, the exact same repo/template file works on the cargo install method.

I followed the exact steps that were in the README

distrobox create blue-build --image ghcr.io/blue-build/cli
distrobox enter blue-build
distrobox-export --bin $(which bluebuild --export-path ~/.local/bin/distrobox
exit
...

I layered zsh on my host and konsole executes zsh -l on startup if that matters for any reason.
BlueBuild 0.8.12

Am I missing something?

Yeah we have an issue open to fix the distrobox setup. We had one of our users get it working. Here's their message in our Discord:

Sharing a working distrobox-assemble configuration for the cli. I've successfully used this with both bluebuild build and bluebuild switch. This method relies on the podman build driver. Haven't gotten the default (docker?) method working.

In distrobox.ini:

[bluebuild-root]
#image=ghcr.io/blue-build/cli:latest
image=ghcr.io/blue-build/cli:main
home="~/distrobox/bluebuild"
exported_bins="/usr/bin/bluebuild"
additional_packages=""
init_hooks="ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/podman"
init_hooks="ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree"
init_hooks="ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/ostree"
init=false
unshare_all=false
nvidia=false
pull=true
root=true
replace=true
start_now=true
exported_apps=""
volume="/etc/bluebuild:/etc/bluebuild:z"

In ~/.bashrc:

if [ -f "${HOME}/.local/bin/bluebuild" ]; then
  bluebuild() {
    local args=("$@")
    if (( ${#args[@]} > 0 )); then
      case "${args[0]}" in
        build|switch)
          ${HOME}/.local/bin/bluebuild "${args[0]}" --build-driver=podman "${args[@]:1}"
          ;;
        *)
          ${HOME}/.local/bin/bluebuild "$@"
          ;;
      esac
    else
      ${HOME}/.local/bin/bluebuild
    fi
  }
fi

The in draft PR is #160, the original issue is #145

Yeah we have an issue open to fix the distrobox setup. We had one of our users get it working. Here's their message in our Discord:

For what it's worth, I'm still happily using this configuration since I posted it on the discord.

Some of the steps in that distrobox-assemble configuration might be unnecessary, but I haven't bothered investigating whether it still works are removing some parts of it.

If this works for other people too, it might be worth temporarily putting this in the documentation until the underlying issue is resolved.