Skip to content

Commit

Permalink
Rename gosu
Browse files Browse the repository at this point in the history
The current gosu script is not a replacement for gosu, because of that
it is better to rename to a completely new name to avoid confusion and
compatibility issues.

Fixes #2070

Signed-off-by: Alexandre Vicenzi <[email protected]>
  • Loading branch information
alexandrevicenzi committed Dec 10, 2024
1 parent 1c1ddf0 commit 31c9e03
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/bci_build/package/mariadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from bci_build.package.helpers import generate_package_version_check
from bci_build.package.versions import get_pkg_version

_MARIADB_GOSU = b"""#!/bin/bash
_MARIADB_IDEXEC = b"""#!/bin/bash
u=$1
shift
Expand Down Expand Up @@ -110,7 +110,7 @@
Path(__file__).parent / "mariadb" / str(mariadb_version) / "LICENSE"
).read_bytes(),
"healthcheck.sh": healthcheck,
"gosu": _MARIADB_GOSU,
"idexec": _MARIADB_IDEXEC,
"_constraints": generate_disk_size_constraints(11),
},
support_level=SupportLevel.L3,
Expand All @@ -129,8 +129,11 @@
COPY healthcheck.sh /usr/local/bin/
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/healthcheck.sh
COPY gosu /usr/local/bin/gosu
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/gosu
COPY idexec /usr/local/bin/idexec
{DOCKERFILE_RUN} chmod 755 /usr/local/bin/idexec
# replace gosu calls with idexec
{DOCKERFILE_RUN} sed -i 's/gosu/idexec/g' /usr/local/bin/{_ENTRYPOINT_FNAME}
{DOCKERFILE_RUN} sed -i -e 's,$(pwgen .*),$(openssl rand -base64 36),' /usr/local/bin/{_ENTRYPOINT_FNAME}
Expand Down

0 comments on commit 31c9e03

Please sign in to comment.