89luca89 / 89luca89/distrobox

Distrobox containers needing old distrobox packages/versions after an update in NixOS

Offen
#2,003 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Go
Sterne
13k
Forks
541
Ø Merge
20 Std. 47 Min.
Gemergte PRs (30 T.)
4

Beschreibung

**To Reproduce**
Setup a distrobox container with the following config:

```nix
{ config, pkgs, ... }:
{

programs.distrobox = {
enable = true;
enableSystemdUnit = true;
# setting
containers = {
common-ubuntu = {
additional_packages = "zoxide eza git neovim";
entry = true;
image = "ubuntu:latest";
nvidia = true;
init_hooks = [
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
"ln -sf /usr/share/zoneinfo/Asia/Tehran /etc/localtime"
];
};
};
};
}
```

**Expected behavior**
To able to use distrobox's containers after system upgrade

**Logs**

podman logs common-ubuntu > podman.logs
[podman.log](https://github.com/user-attachments/files/25405910/podman.log)

distrobox enter --verbose common-ubuntu
[distrobox.log](https://github.com/user-attachments/files/25405973/distrobox.log)

```js
...
...
volumeMounts:
- mountPath: /etc/hostname
name: etc-hostname-host-0
readOnly: true
- mountPath: /usr/bin/entrypoint
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-init-host-1
readOnly: true
- mountPath: /usr/bin/distrobox-host-exec
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-host-exec-host-2
...
...
volumes:
- hostPath:
path: /etc/hostname
type: File
name: etc-hostname-host-0
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-init
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-init-host-1
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-host-exec
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-host-exec-host-2
...
...
- hostPath:
path: /nix/store/z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2/bin/distrobox-export
type: DirectoryOrCreate
name: nix-store-z9ry9x4f5g61kmmmwv5a8ydjxhvapr7n-distrobox-1.8.2.2-bin-distrobox-export-host-12
```

Run the commands with `--verbose` and post the log here as a file upload
Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag

```sh
❯ ls -al $(which -a distrobox)
lrwxrwxrwx - root root 1 Jan 1970 󰡯 /home/allen/.nix-profile/bin/distrobox -> /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox
❯ ls -al /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox
lrwxrwxrwx - root root 1 Jan 1970 󰡯 /nix/store/fhvgsj70mdpr7bm0nb56n98xs8a9f9ra-home-manager-path/bin/distrobox -> /nix/store/ci91x37p3xrhynlccrfvh6pb3kwi0slv-distrobox-1.8.2.4/bin/distrobox
```
They seem to point to an older version of distrobox which doesn't exist as of upgrading my system

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue zeigt, dass distrobox-Container nach einem NixOS-Systemupgrade auf alte Store-Pfade verweisen, die nicht mehr existieren. Untersuche die Containerkonfiguration und die Volume-Mounts in den Logs, um zu verstehen, wie Pfade festgelegt werden. Sieh dir den distrobox-Quellcode an, um zu prüfen, wie diese Pfade erzeugt werden und ob er mit der Garbage Collection des Nix-Stores umgehen kann. Prüfe, ob es einen Mechanismus gibt, um Containerreferenzen nach einem Host-Upgrade zu aktualisieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
bash, docker, nixos, shell
Bereich
cli, developer-experience
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.