Sometime after 20210210 evaluates if [ -x /usr/bin/bash ] to false

I run a local gitlab instance with runners for various tasks including updating the https://review.tumbleweed.boombatower.com/. The very simple image (https://github.com/boombatower/tumbleweed-review/blob/master/Dockerfile) used to update the review site no longer works after building a new version. Instead the runner prints “shell not found”.

Reading the Gitlab runner source: https://gitlab.com/gitlab-org/gitlab-runner/-/blob/master/shells/bash.go#L18, and https://gitlab.com/gitlab-org/gitlab-runner/-/blob/master/shells/bash.go#L255. The following are the relevant bits.

script.DockerCommand = ]string{"sh", "-c", detectScript}

which runs:


if  -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash $@
elif  -x /usr/bin/bash ]; then
    exec /usr/bin/bash $@
elif  -x /bin/bash ]; then
    exec /bin/bash $@
elif  -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh $@
elif  -x /usr/bin/sh ]; then
    exec /usr/bin/sh $@
elif  -x /bin/sh ]; then
    exec /bin/sh $@
elif  -x /busybox/sh ]; then
    exec /busybox/sh $@
else
    echo shell not found
    exit 1
fi


Testing locally I can verify the test for the shell being executable does not work (for any):

docker run -it --rm boombatower/tumbleweed-review sh -c "if  -x /usr/bin/bash ]; then echo executable ; fi"

That said if the image in the above is replaced with the last built image (boombatower/tumbleweed-review@sha256:bd874e788d62fd097133df20ca8ff9d1d2440d540574129c2b5053d95052f668) then it works. /etc/os-release indicates TW 20210210.

ls -l /usr/bin/bash
-rwxr-xr-x 1 root root 1152112 Mar 25 20:14 /usr/bin/bash

Regardless of the change, this seems like it should work, but I am assuming related to the update-alternatives or usr-merge stuff. Any pointers would be appreciated.

As noted by pedja in IRC this looks like https://bugzilla.opensuse.org/show_bug.cgi?id=1182451. After reading, additional context my runner is a Leap 15.2 machine.