summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rwxr-xr-xbin-utils/envconsul-bin/BUILD1
-rwxr-xr-xbin-utils/envconsul-bin/DEPENDS1
-rwxr-xr-xbin-utils/envconsul-bin/DETAILS33
-rwxr-xr-xbin-utils/envconsul-bin/FINAL4
-rw-r--r--bin-utils/envconsul-bin/HISTORY3
-rwxr-xr-xbin-utils/envconsul-bin/INSTALL2
-rwxr-xr-xbin-utils/envconsul-bin/PRE_BUILD4
8 files changed, 50 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b723b20..e07d492 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2021-07-02 Vlad Glagolev <stealth@sourcemage.org>
* bin-utils/packer-bin: new spell, tool for building machine images
+ * bin-utils/envconsul-bin: new spell, start subprocess with envvar
+ populated from Consul and Vault
2021-07-01 Vlad Glagolev <stealth@sourcemage.org>
* bin-net/consul-bin: new spell, service discovery and configuration tool
diff --git a/bin-utils/envconsul-bin/BUILD b/bin-utils/envconsul-bin/BUILD
new file mode 100755
index 0000000..27ba77d
--- /dev/null
+++ b/bin-utils/envconsul-bin/BUILD
@@ -0,0 +1 @@
+true
diff --git a/bin-utils/envconsul-bin/DEPENDS b/bin-utils/envconsul-bin/DEPENDS
new file mode 100755
index 0000000..f7c362b
--- /dev/null
+++ b/bin-utils/envconsul-bin/DEPENDS
@@ -0,0 +1 @@
+depends unzip
diff --git a/bin-utils/envconsul-bin/DETAILS b/bin-utils/envconsul-bin/DETAILS
new file mode 100755
index 0000000..c1933ab
--- /dev/null
+++ b/bin-utils/envconsul-bin/DETAILS
@@ -0,0 +1,33 @@
+ SPELL=envconsul-bin
+ SPELLX=${SPELL/-bin/}
+ VERSION=0.11.0
+if [[ "${SMGL_COMPAT_ARCHS[1]}" == "x86_64" || "${SMGL_COMPAT_ARCHS[1]}" == "em64t" ]]; then
+ ARCH=amd64
+ SOURCE_HASH=sha256:e52fe2036cacec12b24431044af2c71989c21271ef4d880d3f0e713aee203bc0:UPSTREAM_HASH
+else
+ ARCH=386
+ SOURCE_HASH=sha256:47a2715fd0acd0181bf7b07a408a52747fceee77477e594c6020b7295c45e398:UPSTREAM_HASH
+fi
+ SOURCE=${SPELLX}_${VERSION}_linux_${ARCH}.zip
+ SOURCE_URL[0]=https://releases.hashicorp.com/${SPELLX}/${VERSION}/${SOURCE}
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ GATHER_DOCS=off
+ WEB_SITE=https://github.com/hashicorp/envconsul
+ ENTERED=20210702
+ LICENSE[0]=MPL
+ SHORT="start subprocess with envvar populated from Consul and Vault"
+cat << EOF
+This is a binary version of Envconsul.
+
+Envconsul provides a convenient way to launch a subprocess with environment
+variables populated from HashiCorp Consul and Vault. The tool is inspired by
+envdir and envchain, but works on many major operating systems with no runtime
+requirements. It is also available via a Docker container for scheduled
+environments.
+
+Envconsul supports 12-factor applications which get their configuration via the
+environment. Environment variables are dynamically populated from Consul or
+Vault, but the application is unaware; applications just read environment
+variables. This enables extreme flexibility and portability for applications
+across systems.
+EOF
diff --git a/bin-utils/envconsul-bin/FINAL b/bin-utils/envconsul-bin/FINAL
new file mode 100755
index 0000000..1571059
--- /dev/null
+++ b/bin-utils/envconsul-bin/FINAL
@@ -0,0 +1,4 @@
+# binaries require /lib64
+if [ ! -d "${INSTALL_ROOT}/lib64" ]; then
+ ln -vsf "${TRACK_ROOT}/lib" "${INSTALL_ROOT}/lib64"
+fi
diff --git a/bin-utils/envconsul-bin/HISTORY b/bin-utils/envconsul-bin/HISTORY
new file mode 100644
index 0000000..edab7f6
--- /dev/null
+++ b/bin-utils/envconsul-bin/HISTORY
@@ -0,0 +1,3 @@
+2021-07-02 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS, DEPENDS, {PRE_,}BUILD, INSTALL, FINAL: created spell,
+ version 0.11.0
diff --git a/bin-utils/envconsul-bin/INSTALL b/bin-utils/envconsul-bin/INSTALL
new file mode 100755
index 0000000..9715c20
--- /dev/null
+++ b/bin-utils/envconsul-bin/INSTALL
@@ -0,0 +1,2 @@
+# /usr/bin is handled by smgl-fhs
+install -vm 755 envconsul "${INSTALL_ROOT}/usr/bin"
diff --git a/bin-utils/envconsul-bin/PRE_BUILD b/bin-utils/envconsul-bin/PRE_BUILD
new file mode 100755
index 0000000..5416781
--- /dev/null
+++ b/bin-utils/envconsul-bin/PRE_BUILD
@@ -0,0 +1,4 @@
+mk_source_dir "${SOURCE_DIRECTORY}" &&
+cd "${SOURCE_DIRECTORY}" &&
+
+unpack_file ''