Skip to content

Commit

Permalink
⬆️ Upgrade s6-overlay from 2.2.0.3 to 3.1.0.1 (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Jun 10, 2022
1 parent aff5db4 commit 4355c99
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 33 deletions.
28 changes: 18 additions & 10 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV \
PS1="$(whoami)@$(hostname):$(pwd)$ " \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
TERM="xterm-256color"

# Copy root filesystem
Expand All @@ -28,21 +29,25 @@ RUN \
curl=7.68.0-1ubuntu2.11 \
jq=1.6-1ubuntu0.20.04.1 \
tzdata=2022a-0ubuntu0.20.04 \
xz-utils=5.2.4-1 \
\
&& S6_VERSION="3.1.0.1" \
&& S6_ARCH="${BUILD_ARCH}" \
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="x86"; fi \
&& if [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="i686"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
\
&& curl -J -L -o /tmp/s6-overlay.tar.gz \
"https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${S6_ARCH}.tar.gz" \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& tar zxvfh \
/tmp/s6-overlay.tar.gz \
-C / \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \
| tar -C / -Jxpf - \
\
&& tar zxvfh \
/tmp/s6-overlay.tar.gz \
-C /usr ./bin \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-arch.tar.xz" \
| tar -C / -Jxpf - \
\
&& mkdir -p /etc/fix-attrs.d \
&& mkdir -p /etc/services.d \
Expand All @@ -61,6 +66,9 @@ RUN \
"https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${BUILD_ARCH}" \
&& chmod a+x /usr/bin/tempio \
\
&& apt-get purge -y --auto-remove \
xz-utils \
&& apt-get clean \
&& rm -fr \
/tmp/* \
/var/{cache,log}/* \
Expand Down
17 changes: 0 additions & 17 deletions base/rootfs/etc/cont-finish.d/99-message.sh

This file was deleted.

2 changes: 1 addition & 1 deletion base/rootfs/etc/cont-init.d/00-banner.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Displays a simple add-on banner on startup
Expand Down
2 changes: 1 addition & 1 deletion base/rootfs/etc/cont-init.d/01-log-level.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Sets the log level correctly
Expand Down
8 changes: 4 additions & 4 deletions base/rootfs/usr/bin/service
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# ==============================================================================

start() {
s6-svc -wU -u -T2500 "/var/run/s6/services/${service}"
s6-svc -wU -u -T2500 "/run/service/${service}"
}

stop() {
s6-svc -wD -d -T2500 "/var/run/s6/services/${service}"
s6-svc -wD -d -T2500 "/run/service/${service}"
}

restart() {
Expand All @@ -19,13 +19,13 @@ restart() {
}

status() {
s6-svstat "/var/run/s6/services/${service}"
s6-svstat "/run/service/${service}"
}

service="$1"
command="$2"

if [[ ! -d "/var/run/s6/services/${service}" ]] ; then
if [[ ! -d "/run/service/${service}" ]] ; then
echo "s6 service not found for ${service}, exiting..."
exit
fi;
Expand Down

0 comments on commit 4355c99

Please sign in to comment.