From 031d59c82ccadb931db70bc3c22a013f1104b8e5 Mon Sep 17 00:00:00 2001 From: Dominique Roux Date: Sun, 4 Aug 2019 21:23:44 +0200 Subject: [PATCH 1/3] Added Devuan support for __docker type --- cdist/conf/type/__docker/manifest | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/cdist/conf/type/__docker/manifest b/cdist/conf/type/__docker/manifest index 04a9ff27..f20337d7 100755 --- a/cdist/conf/type/__docker/manifest +++ b/cdist/conf/type/__docker/manifest @@ -64,6 +64,43 @@ case "$os" in require="__apt_source/docker" __package docker-ce --state "${state}" fi ;; + devuan) + os_version="$(cat "$__global/explorer/os_version")" + + case "$os_version" in + ascii) + distributione="stretch" + ;; + jessie) + distribution="jessie" + ;; + *) + echo "Your devuan release ($os_version) is currently not supported by this type (${__type##*/}).">&2 + echo "Please contribute an implementation for it if you can." >&2 + exit 1 + ;; + esac + + if [ "${state}" = "present" ]; then + __package apt-transport-https + __package ca-certificates + __package gnupg2 + fi + __apt_key_uri docker --name "Docker Release (CE deb) " \ + --uri "https://download.docker.com/linux/${os}/gpg" --state "${state}" + + require="__apt_key_uri/docker" __apt_source docker \ + --uri "https://download.docker.com/linux/${os}" \ + --distribution "${distribution}" \ + --state "${state}" \ + --component "stable" + if [ "$version" != "latest" ]; then + require="__apt_source/docker" __package docker-ce --version "${version}" --state "${state}" + else + require="__apt_source/docker" __package docker-ce --state "${state}" + fi + + ;; *) echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 echo "Please contribute an implementation for it if you can." >&2 From c6b739b5b6de870e629d421b140587278777b5de Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sun, 4 Aug 2019 21:52:59 +0200 Subject: [PATCH 2/3] ++changelog --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index ae2eac8d..57412999 100644 --- a/docs/changelog +++ b/docs/changelog @@ -4,6 +4,7 @@ Changelog next: * Build: Overcome bash CDPATH when building docs (Dmitry Bogatov) * Type __grafana_dashboard: Update distribution name, package signing key URI and repository URI (Dominique Roux) + * Type __docker: Add devuan support (Dominique Roux) 5.1.2: 2019-06-21 * Core: Add support for type parameters deprecation (Darko Poljak) From 2f7dc5a65d264d7f210ab06834980d8782c4a565 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sun, 4 Aug 2019 21:54:13 +0200 Subject: [PATCH 3/3] Fix variable typo --- cdist/conf/type/__docker/manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__docker/manifest b/cdist/conf/type/__docker/manifest index f20337d7..6a57d85a 100755 --- a/cdist/conf/type/__docker/manifest +++ b/cdist/conf/type/__docker/manifest @@ -69,7 +69,7 @@ case "$os" in case "$os_version" in ascii) - distributione="stretch" + distribution="stretch" ;; jessie) distribution="jessie"