diff --git a/archive.sh b/archive.sh index 3738f73..e2ba41b 100644 --- a/archive.sh +++ b/archive.sh @@ -1,12 +1,17 @@ #!/usr/bin/env bash -set -x +##set -x -VERSIONS="2.4.80 2.4.81 2.4.82 2.4.83 2.4.84 2.4.85 2.4.86 2.4.87 2.4.88 2.4.89 2.4.90 2.4.91 2.4.92 2.4.93" +cd /home/misp-release/export + +# (-‸ლ) +VERSIONS="2.4.80 2.4.81 2.4.82 2.4.83 2.4.84 2.4.85 2.4.86 2.4.87 2.4.88 2.4.89 2.4.90 2.4.91 2.4.92 2.4.93 2.4.95 2.4.96 2.4.97 2.4.98 2.4.99 2.4.100 2.4.101 2.4.102 2.4.103 2.4.104 2.4.105 2.4.106 2.4.107 2.4.108 2.4.109 2.4.110 2.4.111 2.4.113 2.4.114 2.4.115 2.4.116 2.4.117 2.4.118 2.4.119 2.4.120 2.4.121 2.4.122 2.4.123" for VERSION in `echo ${VERSIONS}`; do LATEST_MISP=`find . -maxdepth 1 -type d -name MISP_v${VERSION}\* | TZ=utc xargs ls -ld --full-time | sort -k 6 |tail -1 |awk '{print $9}'` - mkdir archive/${VERSION} - mv ${LATEST_MISP} archive/${VERSION} && \ - echo "Deleting all the others" + mkdir -p archive/${VERSION} + if [[ ! ${LATEST_MISP} == "." ]]; then + mv ${LATEST_MISP} archive/${VERSION} && \ + echo "Deleting all the others" + fi find . -maxdepth 1 -type d -name MISP_v${VERSION}\* -exec rm -rv {} \; done diff --git a/deploy.sh b/deploy.sh index ea07a9c..08a4322 100755 --- a/deploy.sh +++ b/deploy.sh @@ -11,7 +11,7 @@ TIME_START=$(date +%s) # TODO: Move into seprate file GOT_PACKER=$(which packer > /dev/null 2>&1; echo $?) -if [[ "${GOT_PACKER}" == "0" ]]; then +if [[ "${GOT_PACKER}" == 0 ]]; then echo "Packer detected, version: $(packer -v)" PACKER_RUN=$(which packer) else @@ -20,7 +20,7 @@ else fi GOT_RHASH=$(which rhash > /dev/null 2>&1; echo $?) -if [[ "${GOT_RHASH}" == "0" ]]; then +if [[ "${GOT_RHASH}" == 0 ]]; then echo "rhash detected, version: $(rhash --version)" RHASH_RUN=$(which rhash) else @@ -152,14 +152,14 @@ think () { } checkInstaller () { - /usr/bin/wget -q -O ${PATH_TO_INSTALLER}.sfv ${URL_TO_INSTALLER}.sfv + /usr/bin/wget --no-cache -q -O ${PATH_TO_INSTALLER}.sfv ${URL_TO_INSTALLER}.sfv rhash_chk=$(cd scripts ; ${RHASH_RUN} -c ${NAME_OF_INSTALLER}.sfv > /dev/null 2>&1; echo $?) for sum in $(echo ${SHA_SUMS} |sed 's/--sha//g'); do - /usr/bin/wget -q -O ${PATH_TO_INSTALLER}.sha${sum} ${URL_TO_INSTALLER}.sha${sum} + /usr/bin/wget --no-cache -q -O ${PATH_TO_INSTALLER}.sha${sum} ${URL_TO_INSTALLER}.sha${sum} INSTsum=$(shasum -a ${sum} ${PATH_TO_INSTALLER} | cut -f1 -d\ ) chsum=$(cat ${PATH_TO_INSTALLER}.sha${sum} | cut -f1 -d\ ) - if [[ "${chsum}" == "${INSTsum}" ]] && [[ "${rhash_chk}" == "0" ]]; then + if [[ ${chsum} == ${INSTsum} ]] && [[ ${rhash_chk} == 0 ]]; then echo "sha${sum} matches" else echo "sha${sum}: ${chsum} does not match the installer sum of: ${INSTsum}" @@ -197,7 +197,7 @@ if [[ -e ${PATH_TO_INSTALLER} ]]; then echo "Checking checksums" checkInstaller else - /usr/bin/wget -q -O ${PATH_TO_INSTALLER} ${URL_TO_INSTALLER} + /usr/bin/wget --no-cache -q -O ${PATH_TO_INSTALLER} ${URL_TO_INSTALLER} checkInstaller fi diff --git a/misp.json b/misp.json index c453fcb..64914cb 100644 --- a/misp.json +++ b/misp.json @@ -11,9 +11,9 @@ "https_proxy": "{{env `https_proxy`}}", "iso_checksum": "b957311833d79c14bd6743feac2e641938f99ee96679895a04c703391d1fb6e8c92fe609d9401228c28d85fee7a816967051f5206119e7fe674f8ca798e9267d", "iso_checksum_type": "sha512", - "iso_name": "ubuntu-18.04.3-server-amd64.iso", + "iso_name": "ubuntu-18.04.4-server-amd64.iso", "iso_path": "iso", - "iso_url": "http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.3-server-amd64.iso", + "iso_url": "http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/ubuntu-18.04.4-server-amd64.iso", "memory": "3072", "no_proxy": "{{env `no_proxy`}}", "ovftool_path": "ovftool", @@ -70,6 +70,7 @@ ["modifyvm", "{{.Name}}", "--natpf1", "jupyter-notebook,tcp,,8889,0.0.0.0,8889" ], ["modifyvm", "{{.Name}}", "--natpf1", "misp-modules,tcp,,1666,0.0.0.0,6666" ], ["modifyvm", "{{.Name}}", "--audio", "none"], + ["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"], ["modifyvm", "{{.Name}}", "--usb", "off"], ["modifyvm", "{{.Name}}", "--vrde", "off"], ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"], diff --git a/verify.txt b/verify.txt index 7264224..368c080 100644 --- a/verify.txt +++ b/verify.txt @@ -19,6 +19,7 @@ Download the OVA and the ASC into the same directory. On the command line verify the PGP signature first, example: +$ gpg --keyserver pgp.circl.lu --recv-key 0x34F20B13 $ gpg --verify MISP_v2.4.107@latest.ova.asc MISP_v2.4.107@latest.ova gpg: Signature made Wed 15 May 2019 07:04:42 PM JST gpg: using RSA key EDEC891834F20B13