Skip to content

Commit

Permalink
Updated the Alpine install ISOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Sep 21, 2023
1 parent 8734509 commit feabdd1
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 40 deletions.
12 changes: 6 additions & 6 deletions generic-hyperv.json
Original file line number Diff line number Diff line change
Expand Up @@ -6178,8 +6178,8 @@
"memory": 2048,
"cpus": 2,
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -6489,8 +6489,8 @@
"memory": 2048,
"cpus": 2,
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -6816,8 +6816,8 @@
"memory": 2048,
"cpus": 2,
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down
12 changes: 6 additions & 6 deletions generic-libvirt.json
Original file line number Diff line number Diff line change
Expand Up @@ -6153,8 +6153,8 @@
"memory": 2048,
"http_directory": "http",
"headless": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -6474,8 +6474,8 @@
"memory": 2048,
"http_directory": "http",
"headless": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -6816,8 +6816,8 @@
"memory": 2048,
"http_directory": "http",
"headless": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down
12 changes: 6 additions & 6 deletions generic-parallels.json
Original file line number Diff line number Diff line change
Expand Up @@ -8055,8 +8055,8 @@
"hard_drive_interface": "ide",
"guest_os_type": "linux",
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down Expand Up @@ -8602,8 +8602,8 @@
"hard_drive_interface": "ide",
"guest_os_type": "linux",
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down Expand Up @@ -9159,8 +9159,8 @@
"hard_drive_interface": "ide",
"guest_os_type": "linux",
"http_directory": "http",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down
12 changes: 6 additions & 6 deletions generic-virtualbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -6660,8 +6660,8 @@
"vrdp_bind_address": "127.0.0.1",
"vrdp_port_min": 11000,
"vrdp_port_max": 12000,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -7089,8 +7089,8 @@
"vrdp_bind_address": "127.0.0.1",
"vrdp_port_min": 11000,
"vrdp_port_max": 12000,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down Expand Up @@ -7558,8 +7558,8 @@
"vrdp_bind_address": "127.0.0.1",
"vrdp_port_min": 11000,
"vrdp_port_max": 12000,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_port": 22,
Expand Down
12 changes: 6 additions & 6 deletions generic-vmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -6701,8 +6701,8 @@
"vnc_disable_password": true,
"vnc_bind_address": "127.0.0.1",
"vmx_remove_ethernet_interfaces": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down Expand Up @@ -7082,8 +7082,8 @@
"vnc_disable_password": true,
"vnc_bind_address": "127.0.0.1",
"vmx_remove_ethernet_interfaces": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down Expand Up @@ -7479,8 +7479,8 @@
"vnc_disable_password": true,
"vnc_bind_address": "127.0.0.1",
"vmx_remove_ethernet_interfaces": true,
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"skip_compaction": false,
"ssh_username": "root",
"ssh_password": "vagrant",
Expand Down
12 changes: 6 additions & 6 deletions packer-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,8 @@
{
"name": "alpine315",
"output_directory": "output/alpine315",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.8-x86_64.iso",
"iso_checksum": "sha256:5d14f2cb237d213c5055d9df5655f475ec7a5077252994693192154b9217b346",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.10-x86_64.iso",
"iso_checksum": "sha256:e76a44fed0f0e3f4ff909e20706ae226411fbd00810e7fadcee52f3edab1b1f2",
"boot_wait": "5s",
"disk_size": 1,
"headless": true,
Expand Down Expand Up @@ -1323,8 +1323,8 @@
{
"name": "alpine316",
"output_directory": "output/alpine316",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.5-x86_64.iso",
"iso_checksum": "sha256:bf98c7a0fe722a8419222e5ac4e933768cf50e053af8bc53bfd748c99c7d952f",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.7-x86_64.iso",
"iso_checksum": "sha256:6b447e9b2e2ca561c01b03a7b21b6839c718ed85323d2d100ff2e10ea5191470",
"boot_wait": "5s",
"disk_size": 1,
"headless": true,
Expand Down Expand Up @@ -1458,8 +1458,8 @@
{
"name": "alpine317",
"output_directory": "output/alpine317",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.3-x86_64.iso",
"iso_checksum": "sha256:3ae1f6304346ce99e5eafddf0132c86c0fc7136ffad767a2c725501d8a9d5c04",
"iso_url": "https://mirrors.edge.kernel.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.5-x86_64.iso",
"iso_checksum": "sha256:d3aec585da8327095edb37b4b7b5eed4623a993196edf12e74641ee5f16291f6",
"boot_wait": "5s",
"disk_size": 1,
"headless": true,
Expand Down
3 changes: 3 additions & 0 deletions res/providers/providers-v7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ function provide-packer() {
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/parallels
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/virtualbox

mv `find /usr/local/bin/github.com/ -type f` /usr/local/bin/
rm -rf /usr/local/bin/github.com/

}

function provide-setup() {
Expand Down
3 changes: 3 additions & 0 deletions res/providers/providers-v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ function provide-packer() {
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/parallels
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/virtualbox

mv `find /usr/local/bin/github.com/ -type f` /usr/local/bin/
rm -rf /usr/local/bin/github.com/

}

function provide-setup() {
Expand Down
3 changes: 3 additions & 0 deletions res/providers/providers-v9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ function provide-packer() {
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/parallels
PACKER_PLUGIN_PATH=/usr/local/bin/ /usr/local/bin/packer plugins install github.com/hashicorp/virtualbox

mv `find /usr/local/bin/github.com/ -type f` /usr/local/bin/
rm -rf /usr/local/bin/github.com/

}

function provide-setup() {
Expand Down
41 changes: 37 additions & 4 deletions robox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -922,19 +922,52 @@ function iso() {

# Replace the existing ISO and hash values with the update values.
sed --in-place "s/$ISO_URL/$URL/g" $ROBOX_FILES
sed --in-place "s/$ISO_CHECKSUM/sha256:$SHA/g" $ROBOX_FILES
sed --in-place "s/$ISO_CHECKSUM/sha256:$SHA/g" $ROBOX_FILES

elif [ "$1" == "alpine" ]; then

# Build a loop with all of the Alpine ISO names.
cat "$BASE/packer-cache.json" | jq -r -c ".builders[] | select( .name | contains(\"alpine\")) | .name" | grep -v alpine35-hyperv | while read NAME; do

ISO_URL=`cat "$BASE/packer-cache.json" | jq -r -c ".builders[] | select( .name == \"$NAME\") | .iso_url" 2>/dev/null`
ISO_CHECKSUM=`cat "$BASE/packer-cache.json" | jq -r -c ".builders[] | select( .name == \"$NAME\") | .iso_checksum" 2>/dev/null`

# Find the new Alpine ISO URL and check whether the URL is valid.
URL="$(echo $ISO_URL | perl -pe 's/^((.*\d+\.)*)(\d+)(.*)$/$1.($3+1).$4/e')"
ISO=`${CURL} --fail --head --silent --location --output /dev/null --write-out "%{exitcode}" "${URL}"`
if [ "$ISO" == "0" ]; then

# Download the ISO file and calculate the new hash value.
set -o pipefail
SHA=`${CURL} --fail --speed-time 60 --speed-limit 1024 --silent --location "${URL}" | sha256sum | awk -F' ' '{print $1}'`
if [ $? != 0 ] || [ "$SHA" == "" ]; then
tput setaf 1; printf "\nThe Alpine ISO update failed.\n\n"; tput sgr0
return 1
fi
set +o pipefail

# Escape the URL strings.
URL=`echo $URL | sed "s/\//\\\\\\\\\//g"`
ISO_URL=`echo $ISO_URL | sed "s/\//\\\\\\\\\//g"`

# Replace the existing ISO and hash values with the update values.
sed --in-place "s/$ISO_URL/$URL/g" $ROBOX_FILES
sed --in-place "s/$ISO_CHECKSUM/sha256:$SHA/g" $ROBOX_FILES
fi

done

elif [ "$1" == "hardened" ] || [ "$1" == "hardenedbsd" ]; then
iso hardenedbsd13
iso hardenedbsd14
elif [ "$1" == "stream" ] || [ "$1" == "streams" ]; then
elif [ "$1" == "stream" ] || [ "$1" == "streams" ]; then
iso centos8s
iso centos9s
elif [ "$1" == "all" ]; then
iso arch
iso centos8s
iso centos9s
iso gentoo
iso alpine
iso streams
iso hardenedbsd
fi

Expand Down

0 comments on commit feabdd1

Please sign in to comment.