From bf8048292f0908dfc406494baf9c4709f68de195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 22:45:20 +0200 Subject: [PATCH 1/9] feat: Change Docker base image to ubuntu:hirsute-20220113 --- CHANGELOG.md | 4 ++++ Dockerfile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ec493a..c4143123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This file only reflects the changes that are made in this image. Please refer to the [Salt 3004 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3004.html) for the list of changes in SaltStack. +**3004.1** + +- Change Docker base image to `ubuntu:hirsute-20220113` + **3004_6** - Set the number of worker threads to start by setting `SALT_WORKER_THREADS` env variable. diff --git a/Dockerfile b/Dockerfile index 1117e106..d212b64f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:hirsute-20210917 +FROM ubuntu:hirsute-20220113 ARG BUILD_DATE ARG VCS_REF From be810450fccf1b34567baea4f2331c1c161a5bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 22:49:04 +0200 Subject: [PATCH 2/9] Upgrade salt-master to 3004.1 Silicon --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- CHANGELOG.md | 3 ++- Dockerfile | 2 +- README.md | 8 ++++---- VERSION | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 51668096..98b5d958 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,7 +26,7 @@ The full log with the outputted error. **Version report (please complete the following information):** - Host OS: [e.g. `uname -a`] - Docker: [e.g. `docker --version`] - - Image tag: [e.g. `3004`] + - Image tag: [e.g. `3004.1`] **Additional context** Add any other context about the problem here. diff --git a/CHANGELOG.md b/CHANGELOG.md index c4143123..dad03a6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # Changelog This file only reflects the changes that are made in this image. -Please refer to the [Salt 3004 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3004.html) +Please refer to the [Salt 3004.1 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3004.1.html) for the list of changes in SaltStack. **3004.1** +- Upgrade `salt-master` to `3004.1` *Silicon* - Change Docker base image to `ubuntu:hirsute-20220113` **3004_6** diff --git a/Dockerfile b/Dockerfile index d212b64f..6af533fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG VCS_REF # https://github.com/saltstack/salt/releases # NOTE: Review org.label-schema.version label if necessary -ENV SALT_VERSION="3004" \ +ENV SALT_VERSION="3004.1" \ PYTHON_VERSION="3.9" ENV SALT_DOCKER_DIR="/etc/docker-salt" \ diff --git a/README.md b/README.md index 247afa18..074fd84e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Architecture ARM64][arch_arm64_badge]][arch_link] [![Architecture ARM/v7][arch_arm_badge]][arch_link] -# Dockerized Salt Master v3004 _Silicon_ +# Dockerized Salt Master v3004.1 _Silicon_ Dockerfile to build a [Salt Project](https://saltproject.io) Master image for the Docker opensource container platform. @@ -46,7 +46,7 @@ For other methods to install `salt-master` please refer to the [Official Salt Pr Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/cdalvaro/docker-salt-master/) and is the recommended method of installation. ```sh -docker pull cdalvaro/docker-salt-master:3004 +docker pull cdalvaro/docker-salt-master:3004.1 ``` You can also pull the latest tag which is built from the repository `HEAD` @@ -593,8 +593,8 @@ Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVIC - https://docs.saltproject.io/en/getstarted/ - https://docs.saltproject.io/en/latest/contents.html -[saltproject_badge]: https://img.shields.io/badge/Salt-v3004-lightgrey.svg?logo=Saltstack -[saltproject_release_notes]: https://docs.saltproject.io/en/latest/topics/releases/3004.html "Salt Project Release Notes" +[saltproject_badge]: https://img.shields.io/badge/Salt-v3004.1-lightgrey.svg?logo=Saltstack +[saltproject_release_notes]: https://docs.saltproject.io/en/latest/topics/releases/3004.1.html "Salt Project Release Notes" [ubuntu_badge]: https://img.shields.io/badge/ubuntu-hirsute--20210917-E95420.svg?logo=Ubuntu [ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image" [github_publish_badge]: https://img.shields.io/github/workflow/status/cdalvaro/docker-salt-master/Publish%20Docker%20image?label=build&logo=GitHub&logoColor=%23181717 diff --git a/VERSION b/VERSION index 9b4923ed..a2ff1a8f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3004 \ No newline at end of file +3004.1 \ No newline at end of file From ab1111fce54e8a69339b2cd5bf4c7bdade8dc250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 22:52:58 +0200 Subject: [PATCH 3/9] feat: Upgrade libgit2 to version 1.4.2 --- CHANGELOG.md | 1 + assets/build/functions.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dad03a6e..ef92ba16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ for the list of changes in SaltStack. **3004.1** - Upgrade `salt-master` to `3004.1` *Silicon* +- Upgrade `libgit2` to version `1.4.2` - Change Docker base image to `ubuntu:hirsute-20220113` **3004_6** diff --git a/assets/build/functions.sh b/assets/build/functions.sh index 65c97b82..6fb21940 100755 --- a/assets/build/functions.sh +++ b/assets/build/functions.sh @@ -200,10 +200,10 @@ function install_libssh2() #---------------------------------------------------------------------------------------------------------------------- function install_libgit2() { - local LIBGIT2_VERSION=1.3.0 + local LIBGIT2_VERSION=1.4.2 local LIBGIT2_URL="https://github.com/libgit2/libgit2/archive/refs/tags/v${LIBGIT2_VERSION}.tar.gz" local FILE_NAME="libgit2-${LIBGIT2_VERSION}.tar.gz" - local SHA256_SUM='192eeff84596ff09efb6b01835a066f2df7cd7985e0991c79595688e6b36444e' + local SHA256_SUM='901c2b4492976b86477569502a41c31b274b69adc177149c02099ea88404ef19' local CURRENT_DIR="$(pwd)" local WORK_DIR="$(mktemp -d)" && cd "${WORK_DIR}" From 191b44638234fd8e9a0fb8c2e44722d04eacb1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 22:56:25 +0200 Subject: [PATCH 4/9] feat: Upgrade pygit2 to version 1.9.1 --- CHANGELOG.md | 1 + assets/build/install.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef92ba16..7edf533d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ for the list of changes in SaltStack. **3004.1** - Upgrade `salt-master` to `3004.1` *Silicon* +- Upgrade `pygit2` to version `1.9.1` - Upgrade `libgit2` to version `1.4.2` - Change Docker base image to `ubuntu:hirsute-20220113` diff --git a/assets/build/install.sh b/assets/build/install.sh index b68385e8..042448d3 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -42,7 +42,7 @@ pip3 install timelib==0.2.5 # Install pygit2 package install_libssh2 install_libgit2 -pip3 install pygit2==1.7.0 +pip3 install cached-property cffi==1.14.6 pygit2==1.9.1 # Downloading bootstrap-salt.sh script BOOTSTRAP_VERSION='2021.09.17' From 60e44a0aa0f724b13a1cce3cad73588d2f838df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 23:06:06 +0200 Subject: [PATCH 5/9] feat: Fix Jinja2 version to avoid Markup import error --- CHANGELOG.md | 1 + assets/build/install.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7edf533d..60c96581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ for the list of changes in SaltStack. - Upgrade `salt-master` to `3004.1` *Silicon* - Upgrade `pygit2` to version `1.9.1` - Upgrade `libgit2` to version `1.4.2` +- Fix Jinja2 version to avoid Markup import error - Change Docker base image to `ubuntu:hirsute-20220113` **3004_6** diff --git a/assets/build/install.sh b/assets/build/install.sh index 042448d3..fa4f82df 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -72,6 +72,10 @@ log_debug "Options: ${SALT_BOOTSTRAP_OPTS[@]}" sh "${BOOTSTRAP_FILE}" ${SALT_BOOTSTRAP_OPTS[@]} git "v${SALT_VERSION}" chown -R "${SALT_USER}": "${SALT_ROOT_DIR}" +# Fix Jinja2 version to avoid Markup import error +# https://github.com/saltstack/salt/issues/61848 +pip3 install -I markupsafe==2.0.1 jinja2==3.0.3 + # Configure ssh log_info "Configuring ssh ..." sed -i -e "s|^[# ]*StrictHostKeyChecking.*$| StrictHostKeyChecking no|" /etc/ssh/ssh_config From b14ce875f9300f27be06a5df518f8781b1e51962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Mon, 28 Mar 2022 23:14:03 +0200 Subject: [PATCH 6/9] doc: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 074fd84e..586f0492 100644 --- a/README.md +++ b/README.md @@ -595,7 +595,7 @@ Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVIC [saltproject_badge]: https://img.shields.io/badge/Salt-v3004.1-lightgrey.svg?logo=Saltstack [saltproject_release_notes]: https://docs.saltproject.io/en/latest/topics/releases/3004.1.html "Salt Project Release Notes" -[ubuntu_badge]: https://img.shields.io/badge/ubuntu-hirsute--20210917-E95420.svg?logo=Ubuntu +[ubuntu_badge]: https://img.shields.io/badge/ubuntu-hirsute--20220113-E95420.svg?logo=Ubuntu [ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image" [github_publish_badge]: https://img.shields.io/github/workflow/status/cdalvaro/docker-salt-master/Publish%20Docker%20image?label=build&logo=GitHub&logoColor=%23181717 [github_publish_workflow]: https://github.com/cdalvaro/docker-salt-master/actions?query=workflow%3A%22Publish+Docker+image%22 From 28bdcb66510d2f79c2d7b78cac635976f89b4bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Tue, 29 Mar 2022 09:50:49 +0200 Subject: [PATCH 7/9] feat: Update salt-bootstrap to version v2022.03.15 --- CHANGELOG.md | 1 + assets/build/install.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c96581..743a9b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ for the list of changes in SaltStack. **3004.1** - Upgrade `salt-master` to `3004.1` *Silicon* +- Upgrade `salt-bootstrap` to version `2022.03.15` - Upgrade `pygit2` to version `1.9.1` - Upgrade `libgit2` to version `1.4.2` - Fix Jinja2 version to avoid Markup import error diff --git a/assets/build/install.sh b/assets/build/install.sh index fa4f82df..8a7615e0 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -45,10 +45,10 @@ install_libgit2 pip3 install cached-property cffi==1.14.6 pygit2==1.9.1 # Downloading bootstrap-salt.sh script -BOOTSTRAP_VERSION='2021.09.17' +BOOTSTRAP_VERSION='2022.03.15' BOOTSTRAP_URL="https://raw.githubusercontent.com/saltstack/salt-bootstrap/v${BOOTSTRAP_VERSION}/bootstrap-salt.sh" BOOTSTRAP_FILE='bootstrap-salt.sh' -BOOTSTRAP_SHA256='090d652cd6290debce0e3a4eded65086a4272e69446e711eb26f87160593b6a2' +BOOTSTRAP_SHA256='ed66dc9e71aed7602b9ae548f8535131831026f934f19f868fdefbe6a3ab9bf9' download "${BOOTSTRAP_URL}" "${BOOTSTRAP_FILE}" check_sha256 "${BOOTSTRAP_FILE}" "${BOOTSTRAP_SHA256}" From 0c013a57978fc8c374e69e42a6f4efc60334fc82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Tue, 29 Mar 2022 09:58:19 +0200 Subject: [PATCH 8/9] feat: Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8c922aa9..8efc7ffa 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /logs/ /3pfs/ .vscode/ +.idea/ # tests /tests/**/keys/ From 5e5151a40dfcfc5bf89847fc9ac37e1b116dbb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Tue, 29 Mar 2022 16:41:51 +0200 Subject: [PATCH 9/9] enh: Improve libssh2 and libgit2 compilation times --- assets/build/functions.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/build/functions.sh b/assets/build/functions.sh index 6fb21940..8568c4d9 100755 --- a/assets/build/functions.sh +++ b/assets/build/functions.sh @@ -186,6 +186,8 @@ function install_libssh2() -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_DEBUG_LOGGING=OFF -DCLEAR_MEMORY=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF ) build_and_install "libssh2 v${LIBSSH2_VERSION}" ${_OPTS[@]} @@ -212,7 +214,15 @@ function install_libgit2() check_sha256 "${FILE_NAME}" "${SHA256_SUM}" extract "${FILE_NAME}" - build_and_install "libgit2 v${LIBGIT2_VERSION}" -DBUILD_CLAR=OFF + _OPTS=( + -DBUILD_SHARED_LIBS=ON + -DUSE_SSH=ON + -DUSE_THREADS=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + ) + + build_and_install "libgit2 v${LIBGIT2_VERSION}" ${_OPTS[@]} cd "${CURRENT_DIR}" rm -rf "${WORK_DIR}"