From 7bce94db74c3fb05ac5f4d518a71353166a2e594 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 14 Nov 2021 00:09:37 +0100 Subject: [PATCH 1/8] Add new package signing key for x86_64 --- alpine-make-vm-image | 1 + 1 file changed, 1 insertion(+) diff --git a/alpine-make-vm-image b/alpine-make-vm-image index d47c197..f89baff 100755 --- a/alpine-make-vm-image +++ b/alpine-make-vm-image @@ -97,6 +97,7 @@ readonly VIRTUAL_PKG=".make-$PROGNAME" readonly ALPINE_KEYS=' alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe\nqxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O\nQ0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA\njixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R\nL5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo\nGuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B\nywIDAQAB alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0\ncGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX\nyHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j\ng01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB\nCa1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY\nsWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw\nwwIDAQAB +alpine-devel@lists.alpinelinux.org-6165ee59.rsa.pub:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAutQkua2CAig4VFSJ7v54\nALyu/J1WB3oni7qwCZD3veURw7HxpNAj9hR+S5N/pNeZgubQvJWyaPuQDm7PTs1+\ntFGiYNfAsiibX6Rv0wci3M+z2XEVAeR9Vzg6v4qoofDyoTbovn2LztaNEjTkB+oK\ntlvpNhg1zhou0jDVYFniEXvzjckxswHVb8cT0OMTKHALyLPrPOJzVtM9C1ew2Nnc\n3848xLiApMu3NBk0JqfcS3Bo5Y2b1FRVBvdt+2gFoKZix1MnZdAEZ8xQzL/a0YS5\nHd0wj5+EEKHfOd3A75uPa/WQmA+o0cBFfrzm69QDcSJSwGpzWrD1ScH3AK8nWvoj\nv7e9gukK/9yl1b4fQQ00vttwJPSgm9EnfPHLAtgXkRloI27H6/PuLoNvSAMQwuCD\nhQRlyGLPBETKkHeodfLoULjhDi1K2gKJTMhtbnUcAA7nEphkMhPWkBpgFdrH+5z4\nLxy+3ek0cqcI7K68EtrffU8jtUj9LFTUC8dERaIBs7NgQ/LfDbDfGh9g6qVj1hZl\nk9aaIPTm/xsi8v3u+0qaq7KzIBc9s59JOoA8TlpOaYdVgSQhHHLBaahOuAigH+VI\nisbC9vmqsThF2QdDtQt37keuqoda2E6sL7PUvIyVXDRfwX7uMDjlzTxHTymvq2Ck\nhtBqojBnThmjJQFgZXocHG8CAwEAAQ== ' : ${APK_TOOLS_URI:="https://github.com/alpinelinux/apk-tools/releases/download/v2.10.4/apk-tools-2.10.4-x86_64-linux.tar.gz"} From faf94d8977056ee317cdcd1521a1cc30d85b399c Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 26 Nov 2021 01:16:36 +0100 Subject: [PATCH 2/8] Avoid installing all linux-firmware-* packages for non-virt kernels Closes #21 --- alpine-make-vm-image | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/alpine-make-vm-image b/alpine-make-vm-image index f89baff..d17a72c 100755 --- a/alpine-make-vm-image +++ b/alpine-make-vm-image @@ -465,7 +465,12 @@ setup_mkinitfs . "base $ROOTFS $INITFS_FEATURES" #----------------------------------------------------------------------- einfo "Installing kernel linux-$KERNEL_FLAVOR" -_apk add --root . linux-$KERNEL_FLAVOR +if [ "$KERNEL_FLAVOR" = 'virt' ]; then + _apk add --root . linux-$KERNEL_FLAVOR +else + # Avoid installing *all* linux-firmware-* packages (see #21). + _apk add --root . linux-$KERNEL_FLAVOR linux-firmware-none +fi #----------------------------------------------------------------------- einfo 'Setting up extlinux bootloader' From 145347d0da37fe20f3eab363f7716078ad0e275a Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 26 Nov 2021 01:29:12 +0100 Subject: [PATCH 3/8] example: Replace v3.11 with latest-stable --- example/repositories | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/repositories b/example/repositories index 8b78406..3a81b6a 100644 --- a/example/repositories +++ b/example/repositories @@ -1,2 +1,2 @@ -https://nl.alpinelinux.org/alpine/v3.11/main -https://nl.alpinelinux.org/alpine/v3.11/community +https://dl-cdn.alpinelinux.org/alpine/latest-stable/main +https://dl-cdn.alpinelinux.org/alpine/latest-stable/community From 1e607ede77d85187b879f5abd758db95295e11a9 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 26 Nov 2021 01:31:52 +0100 Subject: [PATCH 4/8] Release version 0.8.0 --- README.adoc | 4 ++-- alpine-make-vm-image | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index f979397..af1ed1c 100644 --- a/README.adoc +++ b/README.adoc @@ -1,8 +1,8 @@ = Make Alpine Linux VM Image :script-name: alpine-make-vm-image -:script-sha1: 9803170e07b05b97eb6712e6a9097ad656954d0f +:script-sha1: ddf44e4132a32e762cd0ae46e12c0122c5c18877 :gh-name: alpinelinux/{script-name} -:version: 0.7.0 +:version: 0.8.0 ifdef::env-github[] image:https://github.com/{gh-name}/workflows/CI/badge.svg["Build Status", link="https://github.com/{gh-name}/actions"] diff --git a/alpine-make-vm-image b/alpine-make-vm-image index d17a72c..84da831 100755 --- a/alpine-make-vm-image +++ b/alpine-make-vm-image @@ -90,7 +90,7 @@ set -eu PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" readonly PROGNAME='alpine-make-vm-image' -readonly VERSION='0.7.0' +readonly VERSION='0.8.0' readonly VIRTUAL_PKG=".make-$PROGNAME" # Alpine APK keys for verification of packages for x86_64. From ea1f0ac1223142f9f8e8ed563466a5c92cff32fd Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 26 Nov 2021 01:32:51 +0100 Subject: [PATCH 5/8] License: Bump year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 784b697..d90b540 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright 2017-2020 Jakub Jirutka . +Copyright 2017-2021 Jakub Jirutka . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 4e3726a8fb46bc4d69c835be7e9df2d67d935ad6 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 18 Dec 2021 17:20:29 +0100 Subject: [PATCH 6/8] Use HTTP instead of HTTPS in repositories URLs Now it fails on GitHub Actions (f*cking Ubuntu or what?!): fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz 6907320:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: See-Also: #12 --- example/repositories | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/repositories b/example/repositories index 3a81b6a..8c3ca09 100644 --- a/example/repositories +++ b/example/repositories @@ -1,2 +1,2 @@ -https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -https://dl-cdn.alpinelinux.org/alpine/latest-stable/community +http://dl-cdn.alpinelinux.org/alpine/latest-stable/main +http://dl-cdn.alpinelinux.org/alpine/latest-stable/community From ea139ca4f95a43f182357236679a6397761d2960 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 18 Dec 2021 17:15:42 +0100 Subject: [PATCH 7/8] Download apk-tools from gitlab.alpinelinux.org --- alpine-make-vm-image | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/alpine-make-vm-image b/alpine-make-vm-image index 84da831..cc137e1 100755 --- a/alpine-make-vm-image +++ b/alpine-make-vm-image @@ -72,9 +72,9 @@ # APK_OPTS Options to pass into apk on each execution. # Default is "--no-progress". # -# APK_TOOLS_URI URL of static apk-tools tarball to download if $APK is -# not found on the host system. Default is x86_64 apk-tools -# from https://github.com/alpinelinux/apk-tools/releases. +# APK_TOOLS_URI URL of apk-tools binary to download if $APK is not found +# on the host system. Default is x86_64 apk.static from +# https://gitlab.alpinelinux.org/alpine/apk-tools/-/packages. # # APK_TOOLS_SHA256 SHA-256 checksum of $APK_TOOLS_URI. # @@ -100,8 +100,8 @@ alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub:MIIBIjANBgkqhkiG9w0BAQEFAAOC alpine-devel@lists.alpinelinux.org-6165ee59.rsa.pub:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAutQkua2CAig4VFSJ7v54\nALyu/J1WB3oni7qwCZD3veURw7HxpNAj9hR+S5N/pNeZgubQvJWyaPuQDm7PTs1+\ntFGiYNfAsiibX6Rv0wci3M+z2XEVAeR9Vzg6v4qoofDyoTbovn2LztaNEjTkB+oK\ntlvpNhg1zhou0jDVYFniEXvzjckxswHVb8cT0OMTKHALyLPrPOJzVtM9C1ew2Nnc\n3848xLiApMu3NBk0JqfcS3Bo5Y2b1FRVBvdt+2gFoKZix1MnZdAEZ8xQzL/a0YS5\nHd0wj5+EEKHfOd3A75uPa/WQmA+o0cBFfrzm69QDcSJSwGpzWrD1ScH3AK8nWvoj\nv7e9gukK/9yl1b4fQQ00vttwJPSgm9EnfPHLAtgXkRloI27H6/PuLoNvSAMQwuCD\nhQRlyGLPBETKkHeodfLoULjhDi1K2gKJTMhtbnUcAA7nEphkMhPWkBpgFdrH+5z4\nLxy+3ek0cqcI7K68EtrffU8jtUj9LFTUC8dERaIBs7NgQ/LfDbDfGh9g6qVj1hZl\nk9aaIPTm/xsi8v3u+0qaq7KzIBc9s59JOoA8TlpOaYdVgSQhHHLBaahOuAigH+VI\nisbC9vmqsThF2QdDtQt37keuqoda2E6sL7PUvIyVXDRfwX7uMDjlzTxHTymvq2Ck\nhtBqojBnThmjJQFgZXocHG8CAwEAAQ== ' -: ${APK_TOOLS_URI:="https://github.com/alpinelinux/apk-tools/releases/download/v2.10.4/apk-tools-2.10.4-x86_64-linux.tar.gz"} -: ${APK_TOOLS_SHA256:="efe948160317fe78058e207554d0d9195a3dfcc35f77df278d30448d7b3eb892"} +: ${APK_TOOLS_URI:="https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.12.9/x86_64/apk.static"} +: ${APK_TOOLS_SHA256:="5176da3d4c41f12a08b82809aca8e7e2e383b7930979651b8958eca219815af5"} : ${APK:="apk"} : ${APK_OPTS:="--no-progress"} @@ -395,8 +395,8 @@ if ! command -v "$APK" >/dev/null; then temp_dir="$(mktemp -d /tmp/$PROGNAME.XXXXXX)" wgets "$APK_TOOLS_URI" "$APK_TOOLS_SHA256" "$temp_dir" - tar -C "$temp_dir" -xzf "$temp_dir/${APK_TOOLS_URI##*/}" - APK="$(ls "$temp_dir"/apk-tools-*/apk)" + APK="$temp_dir/apk.static" + chmod +x "$APK" fi #----------------------------------------------------------------------- From b0f0a05b1848e0ff363cfbb36bf319fc02132caa Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 28 Dec 2021 11:42:24 +0100 Subject: [PATCH 8/8] Add FUNDING.yml --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f191d60 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: jirutka