diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 75daa87..a5a87fe 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -46,7 +46,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7 cache-from: | type=local,src=${{ env.CACHE_PATH }} ghcr.io/cdalvaro/docker-salt-master:latest @@ -69,7 +69,7 @@ jobs: needs: build strategy: matrix: - platform: [linux/amd64, linux/arm64] + platform: [linux/amd64, linux/arm64, linux/arm/v7] env: DOCKER_CLI_EXPERIMENTAL: enabled SALTAPI_URL: https://localhost:8000/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e67e99..9a66d47 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ on: env: GITHUB_REF_NAME: ${{ github.event.release.tag_name }} IMAGE_NAME: cdalvaro/docker-salt-master - PLATFORMS: linux/amd64,linux/arm64 + PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7 CACHE_PATH: /tmp/.buildx-docker-salt-master-cache EXTRA_REGISTRIES: ghcr.io quay.io diff --git a/CHANGELOG.md b/CHANGELOG.md index 48dd17f..869134f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/late **3002** +- Bring back support for Linux ARMv7 platform - Remove patch for muting sudo `RLIMIT_CORE` message - Install `pygit2` and `m2crypto` from ubuntu repositories - Change Docker base image to `ubuntu:focal-20200925` diff --git a/assets/build/install.sh b/assets/build/install.sh index 4aaa13e..83882c2 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -4,16 +4,16 @@ set -e source "${SALT_BUILD_DIR}/functions.sh" -# Install build dependencies -echo "Installing dependencies ..." -BUILD_DEPENDENCIES=( - cmake gcc g++ make \ - libhttp-parser-dev libssl-dev zlib1g-dev \ - libcurl4-openssl-dev libffi-dev swig \ -) - +echo "Updating repositories ..." apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends "${BUILD_DEPENDENCIES[@]}" + +# Install arm build dependencies +if [[ "$(uname -i)" =~ ^(arm|aarch64) ]]; then + echo "Installing arm dependencies ..." + DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ + make gcc g++ cmake libzmq3-dev \ + libhttp-parser-dev libssl-dev libcurl4-openssl-dev +fi # Create salt user echo "Creating ${SALT_USER} user ..." @@ -27,9 +27,9 @@ EOF # Install python3 packages echo "Installing python3 packages ..." DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ -python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \ -python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \ -python3-pygit2 python3-m2crypto + python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \ + python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \ + python3-pygit2 python3-m2crypto # Bootstrap script options: # https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-options @@ -41,10 +41,17 @@ python3-pygit2 python3-m2crypto ## -p: Extra-package to install ## -x: Changes the python version used to install a git version of salt SALT_BOOTSTRAP_OPTS=( -M -N -X -d -P -p salt-api -p salt-call -x "python${PYTHON_VERSION}" ) +_WGET_ARGS=() + +if [[ "$(uname -i)" == 'armv7l' ]]; then + ## -I: allow insecure connections while downloading any files + SALT_BOOTSTRAP_OPTS+=( -I ) + _WGET_ARGS+=( --no-check-certificate ) +fi echo "Installing saltstack ..." echo "Option: ${SALT_BOOTSTRAP_OPTS[@]}" -wget -O bootstrap-salt.sh https://bootstrap.saltstack.com +wget ${_WGET_ARGS[@]} -O bootstrap-salt.sh https://bootstrap.saltstack.com sh bootstrap-salt.sh ${SALT_BOOTSTRAP_OPTS[@]} git "v${SALT_VERSION}" chown -R "${SALT_USER}": "${SALT_ROOT_DIR}" @@ -97,6 +104,6 @@ stdout_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log EOF -# purge build dependencies and cleanup apt +# Purge build dependencies and cleanup apt DEBIAN_FRONTEND=noninteractive apt-get clean --yes rm -rf /var/lib/apt/lists/*