89luca89 / 89luca89/distrobox

[Error] Distrobox is not location independent.

Abierto
#315 18 comentarios 2 reacciones 0 asignados Ver en GitHub
bug help wanted host-distro wait-on-user
Lenguaje dominante
Go
Estrellas
13k
Forks
541
Merge medio
20 h 47 min
PR fusionados (30 d)
4

Descripción

**Describe the bug**
`distrobox-enter` fails if location of distrobox-scripts changed on disk.

**To Reproduce**
This happened to me with Nix on Ubuntu when updating and the old distrobox version got GC'd from the nix store:

0. Assume a `nix`-enabled system
1. Get older distrobox: `nix-store -r /nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15`
2. Create a box `/nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15/bin/distrobox-create --name testbox --image ubuntu:20.04`
3. Enter box `/nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15/bin/distrobox-enter testbox` and leave again - works.
4. Stop box `/nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15/bin/distrobox-stop testbox`
5. Remove old distrobox: `nix-store --delete /nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15`
6. Get newer distrobox: `nix-store -r /nix/store/7nsxw7jggd33hrcbclgm5v13xds90r8w-distrobox-1.3.0`
7. Try to enter box `/nix/store/7nsxw7jggd33hrcbclgm5v13xds90r8w-distrobox-1.3.0/bin/distrobox-enter testbox` and observe reference to old version in failure message.
8. Get older distrobox again: `nix-store -r /nix/store/hcn0gjbb8xpl717pdp2bamzjcmspz3rp-distrobox-1.2.15`
9. Try to enter box `/nix/store/7nsxw7jggd33hrcbclgm5v13xds90r8w-distrobox-1.3.0/bin/distrobox-enter testbox` and observe things work.

**Expected behavior**
Distrobox should map its own location to a static path inside the container. (Distrobox already has great Nix support!)

**Logs**
Podman logs do not provide any useful data.

**Desktop (please complete the following information):**
- Are you using podman or docker? Podman
- Which version or podman or docker? Podman 4.1.0 (`/nix/store/76hhw9w196lpwmkyzh4c526ax6sb19gs-podman-wrapper-4.1.0/bin/podman`)
- Which version of distrobox? 1.2.15 and 1.3.0, see above

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.