Skip to content

Conversation

@maribu
Copy link
Member

@maribu maribu commented Nov 20, 2025

Contribution description

Running BUILD_IN_DOCKER=1 in an application folder outside of RIOT created empty 1 folders by adding

-v '<path/to/external/app>/1:/data/riotbuild/0:delegated' -e 'BUILD_IN_DOCKER=/data/riotbuild/0'

to the docker command line.

This changes the invocation to add just -e 'BUILD_IN_DOCKER=0' instead.

Testing procedure

Running make BUILD_IN_DOCKER=1 should not leave turds in the file system anymore, even when doing so in an external app dir.

Issues/PRs references

Bug introduced in #20638.

Running `BUILD_IN_DOCKER=1` in an application folder outside of RIOT
created empty `1` folders by adding

  -v '<path/to/external/app>/1:/data/riotbuild/0:delegated' -e 'BUILD_IN_DOCKER=/data/riotbuild/0'

to the docker command line.

This changes the invocation to add just `-e 'BUILD_IN_DOCKER=0'` instead.
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: build system Area: Build system Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 20, 2025
@riot-ci
Copy link

riot-ci commented Nov 20, 2025

Murdock results

✔️ PASSED

193aa54 build-system: do not create empty folders named 1

Success Failures Total Runtime
10931 0 10932 18m:12s

Artifacts

@crasbe
Copy link
Contributor

crasbe commented Nov 20, 2025

I added $(info $(call docker_volume_and_env,BUILD_IN_DOCKER,,0) to line 308 to see what was previously set in the environment even on a normal call:

buechse@skyleaf:~/RIOTstuff/riot-vanillaice/RIOT$ BUILD_IN_DOCKER=1 make -C tests/sys/shell
make: Entering directory '/home/buechse/RIOTstuff/riot-vanillaice/RIOT/tests/sys/shell'
using BOARD="native64" as "native" on a 64-bit system
-e 'BUILD_IN_DOCKER=/data/riotbuild/riotbase/tests/sys/shell/1'
Launching build container using image "docker.io/riot/riotbuild@sha256:08fa7da2c702ac4db7cf57c23fc46c1971f3bffc4a6eff129793f853ec808736".
docker run --rm --tty --user $(id -u) --platform linux/amd64 -v '/usr/share/zoneinfo/Europe/Berlin:/etc/localtime:ro' -v '/home/buechse/RIOTstuff/riot-vanillaice/RIOT:/data/riotbuild/riotbase:delegated' -v '/home/buechse/.cargo/registry:/data/riotbuild/.cargo/registry:delegated' -v '/home/buechse/.cargo/git:/data/riotbuild/.cargo/git:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'BUILD_IN_DOCKER=0' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'       -e 'DISABLE_MODULE=' -e 'DEFAULT_MODULE=test_utils_print_stack_usage' -e 'FEATURES_REQUIRED=' -e 'FEATURES_BLACKLIST=' -e 'FEATURES_OPTIONAL=' -e 'USEMODULE=app_metadata ps shell_builtin_cmd_help_json shell_cmds_default ztimer_msec' -e 'USEPKG='  -w '/data/riotbuild/riotbase/tests/sys/shell/' 'docker.io/riot/riotbuild@sha256:08fa7da2c702ac4db7cf57c23fc46c1971f3bffc4a6eff129793f853ec808736' make
using BOARD="native64" as "native" on a 64-bit system
-e 'BUILD_IN_DOCKER=/data/riotbuild/riotbase/tests/sys/shell/0'
Building application "tests_shell" for "native64" with CPU "native".

So essentially this (outside the container, inside the container):

-e 'BUILD_IN_DOCKER=/data/riotbuild/riotbase/tests/sys/shell/1'
-e 'BUILD_IN_DOCKER=/data/riotbuild/riotbase/tests/sys/shell/0'

So yeah, fascinating that it worked at all.

@maribu maribu added this pull request to the merge queue Nov 20, 2025
Merged via the queue into RIOT-OS:master with commit 42283c4 Nov 21, 2025
30 checks passed
@maribu maribu deleted the docker/don-t-leave-1-dirs branch November 21, 2025 04:01
@maribu
Copy link
Member Author

maribu commented Nov 21, 2025

Thx ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants