summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2021-07-02 13:15:44 +0000
committerVlad Glagolev2021-07-02 13:15:44 +0000
commitef83781152f2ee1dc2ab3198b293d9e91cb928f4 (patch)
tree4b90ef0146d3292c54575acb874a83c574e4de71
parent7e2b2d7c216aeefe17f9e7bcf15ccb4b0e87bb54 (diff)
packer-bin: new spell, tool for building machine images
-rw-r--r--ChangeLog3
-rwxr-xr-xbin-utils/packer-bin/BUILD1
-rwxr-xr-xbin-utils/packer-bin/DEPENDS1
-rwxr-xr-xbin-utils/packer-bin/DETAILS31
-rwxr-xr-xbin-utils/packer-bin/FINAL4
-rw-r--r--bin-utils/packer-bin/HISTORY3
-rwxr-xr-xbin-utils/packer-bin/INSTALL2
-rwxr-xr-xbin-utils/packer-bin/PRE_BUILD4
8 files changed, 49 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 86a5d49..b723b20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2021-07-02 Vlad Glagolev <stealth@sourcemage.org>
+ * bin-utils/packer-bin: new spell, tool for building machine images
+
2021-07-01 Vlad Glagolev <stealth@sourcemage.org>
* bin-net/consul-bin: new spell, service discovery and configuration tool
* bin-utils/consul-template-bin: new spell, template rendering and
diff --git a/bin-utils/packer-bin/BUILD b/bin-utils/packer-bin/BUILD
new file mode 100755
index 0000000..27ba77d
--- /dev/null
+++ b/bin-utils/packer-bin/BUILD
@@ -0,0 +1 @@
+true
diff --git a/bin-utils/packer-bin/DEPENDS b/bin-utils/packer-bin/DEPENDS
new file mode 100755
index 0000000..f7c362b
--- /dev/null
+++ b/bin-utils/packer-bin/DEPENDS
@@ -0,0 +1 @@
+depends unzip
diff --git a/bin-utils/packer-bin/DETAILS b/bin-utils/packer-bin/DETAILS
new file mode 100755
index 0000000..2a67b26
--- /dev/null
+++ b/bin-utils/packer-bin/DETAILS
@@ -0,0 +1,31 @@
+ SPELL=packer-bin
+ SPELLX=${SPELL/-bin/}
+ VERSION=1.7.3
+if [[ "${SMGL_COMPAT_ARCHS[1]}" == "x86_64" || "${SMGL_COMPAT_ARCHS[1]}" == "em64t" ]]; then
+ ARCH=amd64
+ SOURCE_HASH=sha256:1a8719f0797e9e45abd98d2eb38099b09e5566ec212453052d2f21facc990c73:UPSTREAM_HASH
+else
+ ARCH=386
+ SOURCE_HASH=sha512:492abc450286ace97563e7d3cd6c6add86ebc21daca1d566c65a4a3c867979f0: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://www.packer.io/
+ ENTERED=20210702
+ LICENSE[0]=MPL
+ SHORT="tool for building machine images"
+cat << EOF
+This is a binary version of Packer.
+
+Packer is a tool for building identical machine images for multiple platforms
+from a single source configuration.
+
+Packer is lightweight, runs on every major operating system, and is highly
+performant, creating machine images for multiple platforms in parallel.
+Packer comes out of the box with support for many platforms, the full list of
+which can be found at https://www.packer.io/docs/builders.
+
+Support for other platforms can be added via plugins.
+EOF
diff --git a/bin-utils/packer-bin/FINAL b/bin-utils/packer-bin/FINAL
new file mode 100755
index 0000000..1571059
--- /dev/null
+++ b/bin-utils/packer-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/packer-bin/HISTORY b/bin-utils/packer-bin/HISTORY
new file mode 100644
index 0000000..dfdc983
--- /dev/null
+++ b/bin-utils/packer-bin/HISTORY
@@ -0,0 +1,3 @@
+2021-07-02 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS, DEPENDS, {PRE_,}BUILD, INSTALL, FINAL: created spell,
+ version 1.7.3
diff --git a/bin-utils/packer-bin/INSTALL b/bin-utils/packer-bin/INSTALL
new file mode 100755
index 0000000..4a8ea48
--- /dev/null
+++ b/bin-utils/packer-bin/INSTALL
@@ -0,0 +1,2 @@
+# /usr/bin is handled by smgl-fhs
+install -vm 755 packer "${INSTALL_ROOT}/usr/bin"
diff --git a/bin-utils/packer-bin/PRE_BUILD b/bin-utils/packer-bin/PRE_BUILD
new file mode 100755
index 0000000..5416781
--- /dev/null
+++ b/bin-utils/packer-bin/PRE_BUILD
@@ -0,0 +1,4 @@
+mk_source_dir "${SOURCE_DIRECTORY}" &&
+cd "${SOURCE_DIRECTORY}" &&
+
+unpack_file ''