huan / docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.
https://hub.docker.com/r/zixia/simple-mail-forwarder/
Apache License 2.0
544 stars 86 forks source link

v1.3 does not work with arm 64 architecture #84

Open huan opened 3 years ago

huan commented 3 years ago

We have two reports from arm 64 users that the SMF can not start as expected:

Need to be investigated and fixed.

gothchibjo commented 2 years ago

Confirm for 1.4.7: aarch64

pd-giz-dave commented 1 year ago

I have discovered three issues:

  1. the install-s6-overlays.sh script always loads the amd version (its not using the $URL variable built in the previous line)
  2. the -C option on the tar line is set to '\' (line continuation) and should be '/' (root)
  3. version 2 of s6 only provides a binary for 'arm'

Modified install-s6-overlays.sh is below: `#!/usr/bin/env bash

set -eo pipefail

if [[ -n "$1" ]]; then S6_VERSION=$1; shift else echo "arg 1 should be the s6 version" exit 1 fi

case $(uname -m) in armv6l) ;& # fall through armv7l) ARCH=arm ;; armv8l) ARCH=arm ;; aarch64) ARCH=arm ;; i386) ARCH=x86 ;; x86_64) ARCH=amd64 ;; *) echo "ARCH not supported: $ARCH" exit 1 ;; esac

URL="https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-${ARCH}.tar.gz" curl -L -s "$URL" | tar xpzf - -C / `

Running script/build.sh then creates a binary on my aarch64 system that works. Maybe update to version 3 of s6? (I tried but got tangled up in other problems).