1942 Commits
Author SHA1 Message Date
Luca Di Maio 10bab91563 Merge pull request #2195 from 89luca89/fix/nvidia_arch_tests
fix(e2e): update host distros on nvidia tests, avoid problems with stale dependencies
2026-08-09 21:27:03 +02:00
Luca Di Maio 77ca686be6 fix(e2e): update host distros on nvidia tests, avoid problems with stale dependencies
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-08-09 21:16:18 +02:00
Alessio Biancalana 9f4430cd18 fix(init,rm): honor user volumes under host-mount paths and --rm-home in headless rm (#2192)
* fix(init): do not shadow user volumes under host-mount paths

* fix(rm): honor --rm-home when stdin is not a tty
2026-08-09 19:51:27 +02:00
Alessio Biancalana 736989b677 fix(enter): use a real isatty check for --tty allocation (#2193)
* fix(enter): use a real isatty check for --tty allocation

* test(containermanager): make IsTTY regression test lint-clean
2026-08-09 19:15:49 +02:00
distrobox-docs-bot 0b04e4c94b Automatic Man Page Update
Signed-off-by: distrobox-docs-bot <distrobox-docs-bot@users.noreply.github.com>
2026-08-09 09:44:21 +00:00
A 37a41eb41f input: update documentation to make it more clear that certain flags to distrobox assemble run after every container restart (#2191) 2026-08-09 11:43:49 +02:00
distrobox-docs-bot 2c4a231fa0 Automatic Man Page Update
Signed-off-by: distrobox-docs-bot <distrobox-docs-bot@users.noreply.github.com>
2026-08-08 17:33:08 +00:00
Luca Di Maio eafe590a8d Merge pull request #2190 from 89luca89/feat/test_overhaul
ci(e2e): add end-to-end behavioral tests across distros and engines
2026-08-08 19:32:23 +02:00
Luca Di Maio 6aee0c552b Merge pull request #2139 from 89luca89/migrate-subcommand-implementation
feat(migrate): add `distrobox migrate` subcommand for v1→v2 containers
2026-08-07 21:43:12 +02:00
Alessio Biancalana 8abacf7205 fix(migrate): use the shared config scripts dir for migration
The migrate command introduced a parallel insidedistrobox.ScriptsDir()
that resolved to the old v2 prerelease location
(~/.local/share/distrobox/v2), which was abandoned in 94ae7fa with a
BREAKING CHANGE note. The two resolutions only agree when
DBX_SCRIPTS_DIR is set, which is exactly what the tests do - hiding the
divergence: migrate provisioned and filtered on a different host
directory than the create command mounts into new containers.

- drop insidedistrobox.ScriptsDir(); migrate now provisions and filters
  on c.cfg.ScriptsDir, the same resolution the create command uses
- set ScriptsDir on the recreated container's CreateOptions: it was
  left empty, which made ProvisionScripts("") fail on real runtimes
- make the scripts-mount filter path-boundary aware
- add an end-to-end migration test driving a fake podman runtime:
  v1 inspect JSON in, then compare the recreated container's create
  spec to the known-good v2 layout (scripts mounted from the config
  scripts dir, distrobox.version label set, v1 helper mounts gone)
2026-08-07 16:36:57 +02:00
Luca Di Maio b0b6b56b67 docs: refresh compatibility list, drop EOL distros and add current releases
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-08-07 15:44:50 +02:00
Luca Di Maio f01efac527 ci(e2e): verify the v2 binary end-to-end across distros and engines
Unit tests can't prove the rewritten binary actually works on each supported
distro and on both podman and docker; this exercises the real thing.

Move the tests in a set of simple scripts to run them.
Make a smaller e2e test for CLI and Images that runs on every PR
Keep the full compatibility suite in a separate job for main merge and
manual runs.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-08-07 14:46:19 +02:00
Luca Di Maio 1f3fa8109e test: pin slug, env-filter, and ps-parser behavior
Lock down the container-name slug, enter env allow/deny, and podman/docker
ps parsers so provider JSON drift and symlink/env edge cases fail in CI
instead of in the field. Fixtures also capture the known doc/code and
comma-in-label quirks so they're tracked rather than silently accepted.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-08-07 11:12:13 +02:00
Alessio Biancalana 1832fb65e1 fix(migrate): preserve same-path user volumes on recreate 2026-08-02 18:07:12 +02:00
Alessio Biancalana 92f092b1ab fix(providers): correctly map docker inspect output for migrate 2026-08-02 17:54:03 +02:00
Alessio Biancalana 6cef357d3b fix: add license headers to new files 2026-08-02 17:40:16 +02:00
Alessio Biancalana d50fd8d92b fix: codespell issues 2026-08-02 17:36:06 +02:00
Alessio Biancalana 23f196f54b refactor(migrate): flatten per-container loop in Execute 2026-08-02 17:36:06 +02:00
Alessio Biancalana 7ee57a7721 feat(migrate): detect outdated containers via distrobox.version label 2026-08-02 17:36:05 +02:00
Alessio Biancalana 9b65bec2fd fix: resolve goconst warnings in migrate command 2026-08-02 17:30:53 +02:00
Alessio Biancalana e793feccf8 feat(migrate): add distrobox migrate subcommand for v1→v2 containers 2026-08-02 17:30:52 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> d34399f3da chore(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 (#2183)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 9.2.1 to 9.3.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/82606bf257cbaff209d206a39f5134f0cfbfd2ee...ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: 9.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-02 17:23:58 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 0049f1bd07 chore(deps): bump stefanzweifel/git-auto-commit-action (#2184)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/04702edda442b2e678b25b537cec683a1493fcb9...4a55954c782fc1ea30b9056cd3e7a2b40ca8887d)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: 7.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-01 18:26:16 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4bbe39d9a1 chore(deps): bump github.com/urfave/cli/v3 from 3.10.0 to 3.10.1 (#2186)
Bumps [github.com/urfave/cli/v3](https://github.com/urfave/cli) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v3
  dependency-version: 3.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-01 18:23:10 +02:00
Alessio Biancalana ff4cc63ac3 fix: bump install script next branch to rc4 (#2179) 2026-07-30 09:45:15 +02:00
Luca Di Maio 0c3f8d6472 test(nvidia): add debian as a tested host and guest distro
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-26 17:59:08 +02:00
Luca Di Maio 32bb5e8727 Merge pull request #2171 from 89luca89/feat/gpu-integration-improvements
fix(gpu): isolate NVIDIA libraries and fix Docker device groups for ROCm
2.0.0-rc.4
2026-07-25 18:00:53 +02:00
Luca Di Maio 3b5253e5c5 ci(nvidia): run the --nvidia VM e2e test on relevant PRs
The harness boots real VMs, so gate it to PRs touching distrobox-init or the
test itself instead of every push.

Base images use a split cache restore/save and on failure the per-distro log
dir is uploaded so it's debuggable without a re-run.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 17:19:55 +02:00
Luca Di Maio 5611967de8 test(nvidia): add local VM e2e test for --nvidia driver mirroring
The --nvidia path had no automated coverage and regresses easily (silent
32/64-bit collisions, dropped files), and GPU CI runners to exercise it
don't exist. This harness needs no GPU: it installs the nvidia driver in a
throwaway VM, runs `distrobox create --nvidia` against ubuntu/fedora/arch
guests, and checks every file the host package manager ships is mirrored in
with a matching checksum and resolvable deps. The package manifest is the
source of truth, so any gap fails loudly instead of silently.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 17:19:55 +02:00
Luca Di Maio 4fadc607d3 fix(docker): forward host supplementary groups for GPU device access
ROCm and other GPU workloads reach the device through /dev/kfd and
/dev/dri/renderD*, which are typically owned by group render (mode 0660).
Podman keeps the invoking user's supplementary groups via the
run.oci.keep_original_groups annotation, but the docker path forwarded only
the primary gid, so the container user was not in render/video and hit EACCES.

This generally puts docker on par with podman+crun
run.oci.keep_original_groups annotation.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 17:19:21 +02:00
Luca Di Maio ee5724ee62 fix(init): isolate NVIDIA driver libraries in a dedicated dir
The --nvidia path mapped each driver library to a guest destination by
rewriting its host path (x86_64-linux-gnu / lib64 / lib32 via sed), which is
fragile across distros and can shadow the guest's own libGL/glvnd/Mesa.

Mount libs into /usr/lib/distrobox-nvidia/{lib64,lib32} bucketed by ELF class +
one ld.so.conf, instead of guessing the guest path; 4 mount loops fold into one.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 17:19:21 +02:00
distrobox-docs-bot c08ad8dec7 Automatic Man Page Update
Signed-off-by: distrobox-docs-bot <distrobox-docs-bot@users.noreply.github.com>
2026-07-25 10:01:22 +00:00
Luca Di Maio 24eeae0f86 test(commands): make generate-all-entries test hermetic
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 11:56:17 +02:00
Luca Di Maio e15c09fe97 Merge pull request #2175 from 89luca89/fix/ci_failures
fix(init): resolve compatibility-matrix container setup failures
2026-07-25 11:55:15 +02:00
Luca Di Maio 1ed078f68a fix(init): mask systemd-tmpfiles rules over host-shared paths
In rootless containers systemd-tmpfiles chowns the bind-mounted /tmp,
/dev and /sys and fails with EPERM, aborting package setup (systemd
>= 261, tpm-udev). Masks those configs.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 11:37:16 +02:00
Luca Di Maio 270bdba514 fix(init): accept zypper informational exit codes on install
zypper returns >= 100 when the transaction committed but a caveat
applies - e.g. 107 when a package %post fails, common in containers.
Only 106 was accepted; warn on the whole band except 105 (a real abort).

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 11:36:59 +02:00
Luca Di Maio 7c26238742 fix(init): sync alpine base to the repo before installing
alpine:edge's base image musl can lag the repo, so new package binaries
fail to relocate newer symbols (e.g. renameat2) and their post-install
scripts abort.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 11:36:01 +02:00
Luca Di Maio 9c2ba30891 fix(docs): remove broken distro from compatibility list
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-25 11:32:38 +02:00
Luca Di Maio 1308ae11ce chore(license): add GPL-3.0 SPDX header to Go sources (#2173)
The legacy shell tree carried a per-file license header; the Go rewrite
shipped without one. Add it to all files and enforce it going forward
via golangci-lint's goheader linter, so the notice can't be dropped.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-24 18:08:51 +02:00
Luca Di Maio 64acbeade6 refactor(providers): drop unused InspectImageOutput type
The exported struct was produced and consumed by nothing — no
InspectImage method exists and no caller references it — so it was
dead public surface, not a usable affordance.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-24 14:25:52 +02:00
Luca Di Maio 60103b1da1 refactor(containermanager): use slices.Contains for PATH segment checks
The (:|^)…(:|$) regexes only tested whether a path was an exact
colon-delimited segment — what slices.Contains over strings.Split does
directly, without recompiling a regex on every loop iteration.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-24 14:25:45 +02:00
Luca Di Maio e513cf8d8a refactor(cleanup): remove dead code and duplication (#2172)
* refactor(userenv): drop unreachable UID/GID id-command fallbacks

os.Getuid/os.Getgid only return -1 on Windows, and distrobox is
Linux/macOS only, so the `id -ru`/`id -rg` fallbacks never executed.
Call them directly and drop the now-unused //nolint:gocognit.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

* refactor(config): use maps.Copy in mergeConfigMaps

Replace the hand-rolled nested-loop map merge with the stdlib
maps.Copy. Rename the variadic parameter to configMaps so it no
longer shadows the maps package.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

* refactor(ephemeral): drop DryRun field shadowing CreateOptions

EphemeralOptions embedded CreateOptions yet redeclared DryRun,
shadowing it. Remove the field and rely on promotion; set DryRun
in the embedded CreateOptions at the call sites instead.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

* refactor(create): drop duplicate local --verbose flag

The root command already declares --verbose/-v as a persistent
flag, so create's local copy was redundant. Remove it; -v and
--verbose on `distrobox create` still resolve to the global.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

* refactor(containermanager): use time.RFC3339Nano in TimestampNow

Replace the hand-written "…000000000+00:00" layout with the stdlib
RFC3339Nano constant. Output is equivalent RFC3339 (UTC "Z", trailing
zeros trimmed), still valid input for `podman/docker logs --since`.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

---------

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-24 11:01:07 +02:00
balanza 91fc884c26 refactor(config): move the script dir resolution to the global config
So that we centralize all the references to environment configurations
and their defaults
2026-07-21 21:12:04 +02:00
Luca Di Maio 8561affccb fix(enter): parse distrobox flags after the container name (#2165)
`distrobox enter my-box --help` and any distrobox flag placed after the
container name, was passed to the container manager as the command instead
of being parsed, so it failed with a crun error. This diverged from the
original bash distrobox-enter, which keeps parsing flags after the name and
only starts the command at -e/--exec/--.

The port stopped flag parsing at the first positional (StopOnNthArg), which
cannot tell the name from the command: when --name or DBX_CONTAINER_NAME
already supplies the name, the first positional *is* the command. So the
command boundary is resolved before parsing and everything past it is handed
to urfave verbatim, letting flags be recognized wherever they appear while
the custom command is still passed through untouched. ephemeral gets the
same treatment.

Unknown flags after the name are rejected, as in bash, so a mistyped flag
surfaces instead of being silently executed inside the container.

Fixes https://github.com/89luca89/distrobox/issues/2160

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-07-18 17:00:12 +02:00
balanza 17216a5d19 fix(inside-distrobox): do not consider scripts in PATH
The presence of distrobox-init (or -export or -host-exec) in the host PATH must not be considered when checking the
presence of the scripts, the container manager is only considering the
configured host directory as a source for copying the files into a
newly-created container.

An alternative solution could it be to use the location of the file when
the script is detected in PATH. That has been discarded for two reasons:
1. the need to propagate the value of the file location though all the
   usage chain; also, potentially each file can be in different
   locations thus requiring the code to handle them;
2. the scripts in PATH may not be the ones used by the current version
   of Distrobox (think about try out the latest version while having the
   stable one installed on the machine).
2026-07-17 14:28:26 +02:00
NN708 427a626fa7 docs: update vanilla distrobox icon 2026-07-17 11:26:47 +02:00
Alessio Attilio 4c334118a1 fix(init): check if group exists before appending user (#2162) 2026-07-11 16:47:46 +02:00
Alessio Attilio 4c5198d18c fix: ensure rootful containers add user to sudo/wheel group (#2158) 2026-07-11 12:38:52 +02:00
Alessio Attilio 7146d04dfa fix: resolve --version flag conflict with --verbose/-v 2026-07-08 23:19:28 +02:00
distrobox-docs-bot 4bb853db4b Automatic Man Page Update
Signed-off-by: distrobox-docs-bot <distrobox-docs-bot@users.noreply.github.com>
2026-07-06 06:23:04 +00:00