From 5ec1898142487cfebd45a35703779cb6391f15dc Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Mon, 28 Oct 2024 17:11:55 -0700 Subject: [PATCH] =?UTF-8?q?Bump=20Alpine=203.20.0=20=E2=86=92=203.20.3=20a?= =?UTF-8?q?nd=20nerctl=201.7.7=20=E2=86=92=202.0.0-rc.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rest of the changes are re-applying some diffs that got lost when merging in the refactored upstream branch, plus some alphabetical sorting of some sections. There should be no functional changes beyond the Alpine and nerdctl bumps. Signed-off-by: Jan Dubois --- .github/workflows/release.yml | 4 ++-- .gitignore | 3 ++- Dockerfile | 6 +++--- Makefile | 30 +++++++++++++++++++----------- README.md | 10 +++++----- build.sh | 10 +++++----- edition/min | 4 ++-- edition/rd | 2 +- edition/std | 2 +- genapkovl-lima.sh | 22 +++++++++++----------- mkimg.lima.sh | 20 ++++++++++---------- src/aports | 2 +- 12 files changed, 62 insertions(+), 53 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8ddc1c..e4fd760 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: pull_request: env: - ALPINE_VERSION: 3.20.0 + ALPINE_VERSION: 3.20.3 DOCKER_BUILDKIT: 1 jobs: @@ -43,4 +43,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | tag="${GITHUB_REF##*/}" - gh release create "${tag}" --draft --title "${tag}" iso/alpine-lima-rd-* + gh release create --draft --title "${tag}" "${tag}" iso/alpine-lima-rd-* diff --git a/.gitignore b/.gitignore index c12a76f..8d36c17 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ /ci.yaml /rd.yaml /std.yaml +# downloaded assets +/cri-dockerd-* /nerdctl-* /openresty-* /qemu-* -/cri-dockerd-* diff --git a/Dockerfile b/Dockerfile index 2791e51..4055787 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,13 @@ FROM alpine:${ALPINE_VERSION} ARG ARCH=x86_64 ARG OPENRESTY_VERSION=0.0.2 -RUN \ - apk add alpine-sdk build-base apk-tools alpine-conf busybox \ +RUN apk add alpine-sdk build-base apk-tools alpine-conf busybox \ fakeroot xorriso squashfs-tools sudo \ mtools dosfstools grub-efi # syslinux is missing for aarch64 -RUN if [ "${ARCH}" = "x86_64" ]; then apk add syslinux; fi +ARG TARGETARCH +RUN if [ "${TARGETARCH}" = "amd64" ]; then apk add syslinux; fi COPY --from=binfmt /usr/bin /binfmt diff --git a/Makefile b/Makefile index aec92e4..4c00320 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -ALPINE_VERSION ?= 3.20.0 +ALPINE_VERSION ?= 3.20.3 REPO_VERSION ?= $(shell echo "$(ALPINE_VERSION)" | sed -E 's/^([0-9]+\.[0-9]+).*/v\1/') GIT_TAG ?= $(shell echo "v$(ALPINE_VERSION)" | sed 's/^vedge$$/origin\/master/') BUILD_ID ?= $(shell git describe --tags) @@ -21,12 +21,12 @@ ARCH_ALIAS_x86_64 = amd64 ARCH_ALIAS_aarch64 = arm64 ARCH_ALIAS = $(shell echo "$(ARCH_ALIAS_$(ARCH))") -NERDCTL_VERSION=1.7.7 -QEMU_VERSION=v8.1.5 -CRI_DOCKERD_VERSION=0.3.15 -CRI_DOCKERD_ORG=Mirantis BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION) +CRI_DOCKERD_ORG=Mirantis +CRI_DOCKERD_VERSION=0.3.15 +NERDCTL_VERSION=2.0.0-rc.3 OPENRESTY_VERSION=0.0.5 +QEMU_VERSION=v8.1.5 .PHONY: mkimage mkimage: openresty-v$(OPENRESTY_VERSION)-$(ARCH).tar @@ -43,8 +43,21 @@ mkimage: openresty-v$(OPENRESTY_VERSION)-$(ARCH).tar .PHONY: iso iso: - ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ./build.sh + ALPINE_VERSION=$(ALPINE_VERSION) \ + CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) \ + NERDCTL_VERSION=$(NERDCTL_VERSION) \ + QEMU_VERSION=$(QEMU_VERSION) \ + ARCH=$(ARCH) \ + ARCH_ALIAS=$(ARCH_ALIAS) \ + BUILD_ID=$(BUILD_ID) \ + EDITION=$(EDITION) \ + REPO_VERSION=$(REPO_VERSION) \ + ./build.sh +iso: cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH) +cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH): + curl -o $@ -Ls https://github.com/$(CRI_DOCKERD_ORG)/cri-dockerd/releases/download/v$(CRI_DOCKERD_VERSION)/cri-dockerd-$(CRI_DOCKERD_VERSION).$(ARCH_ALIAS).tgz + curl -o $@.LICENSE -Ls https://raw.githubusercontent.com/$(CRI_DOCKERD_ORG)/cri-dockerd/v$(CRI_DOCKERD_VERSION)/LICENSE iso: nerdctl-full-$(NERDCTL_VERSION)-$(ARCH) nerdctl-full-$(NERDCTL_VERSION)-$(ARCH): @@ -58,11 +71,6 @@ iso: qemu-$(QEMU_VERSION)-copying qemu-$(QEMU_VERSION)-copying: curl -o $@ -Ls https://raw.githubusercontent.com/qemu/qemu/$(QEMU_VERSION)/COPYING -iso: cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH) -cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH): - curl -o $@ -Ls https://github.com/$(CRI_DOCKERD_ORG)/cri-dockerd/releases/download/v$(CRI_DOCKERD_VERSION)/cri-dockerd-$(CRI_DOCKERD_VERSION).$(ARCH_ALIAS).tgz - curl -o $@.LICENSE -Ls https://raw.githubusercontent.com/$(CRI_DOCKERD_ORG)/cri-dockerd/v$(CRI_DOCKERD_VERSION)/LICENSE - .PHONY: lima lima: ALPINE_VERSION=$(ALPINE_VERSION) EDITION=$(EDITION) ARCH=$(ARCH) ./lima.sh diff --git a/README.md b/README.md index a395f2f..3f74890 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Note that this repo includes the [Alpine aports](https://github.com/alpinelinux/ git submodule update --init ``` -The examples show the default values for `ALPINE_VERSION=3.14.3 EDITION=std`, `ARCH` defaults to the OS architecture `uname -m`. +The examples show the default values for `ALPINE_VERSION=3.20.3 EDITION=std`, `ARCH` defaults to the OS architecture `uname -m`. The options need to be specified only to select non-default setting. ### Build the builder @@ -59,7 +59,7 @@ The options need to be specified only to select non-default setting. The ISO builder will be created inside a docker image. You can specify the Alpine version used to create it: ``` -make mkimage ALPINE_VERSION=3.14.3 +make mkimage ALPINE_VERSION=3.20.3 ``` ### Build the ISO @@ -67,17 +67,17 @@ make mkimage ALPINE_VERSION=3.14.3 This docker image can then be used to create ISO images that will be stored under `./iso`: ``` -make iso ALPINE_VERSION=3.14.3 EDITION=std +make iso ALPINE_VERSION=3.20.3 EDITION=std ``` ### Run the ISO with qemu ``` -make run ALPINE_VERSION=3.14.3 EDITION=std +make run ALPINE_VERSION=3.20.3 EDITION=std ``` ### Run the ISO with Lima ``` -make lima ALPINE_VERSION=3.14.3 EDITION=std +make lima ALPINE_VERSION=3.20.3 EDITION=std ``` diff --git a/build.sh b/build.sh index 817589d..916d540 100755 --- a/build.sh +++ b/build.sh @@ -12,16 +12,16 @@ source "edition/${EDITION}" ${DOCKER} run --rm \ --platform "linux/${ARCH_ALIAS}" \ -v "${PWD}/iso:/iso" \ - -v "${PWD}/mkimg.lima.sh:/home/build/aports/scripts/mkimg.lima.sh:ro" \ + -v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}.LICENSE:/home/build/cri-dockerd.license:ro" \ + -v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}:/home/build/cri-dockerd.tar.gz:ro" \ -v "${PWD}/genapkovl-lima.sh:/home/build/aports/scripts/genapkovl-lima.sh:ro" \ - -v "${PWD}/lima-init.sh:/home/build/lima-init.sh:ro" \ - -v "${PWD}/lima-init.openrc:/home/build/lima-init.openrc:ro" \ -v "${PWD}/lima-init-local.openrc:/home/build/lima-init-local.openrc:ro" \ + -v "${PWD}/lima-init.openrc:/home/build/lima-init.openrc:ro" \ + -v "${PWD}/lima-init.sh:/home/build/lima-init.sh:ro" \ -v "${PWD}/lima-network.awk:/home/build/lima-network.awk:ro" \ + -v "${PWD}/mkimg.lima.sh:/home/build/aports/scripts/mkimg.lima.sh:ro" \ -v "${PWD}/nerdctl-full-${NERDCTL_VERSION}-${ARCH}:/home/build/nerdctl-full.tar.gz:ro" \ -v "${PWD}/qemu-${QEMU_VERSION}-copying:/home/build/qemu-copying:ro" \ - -v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}:/home/build/cri-dockerd.tar.gz:ro" \ - -v "${PWD}/cri-dockerd-${CRI_DOCKERD_VERSION}-${ARCH}.LICENSE:/home/build/cri-dockerd.license:ro" \ $(env | grep ^LIMA_ | xargs -n 1 printf -- '-e %s ') \ -e "LIMA_REPO_VERSION=${REPO_VERSION}" \ -e "LIMA_BUILD_ID=${BUILD_ID}" \ diff --git a/edition/min b/edition/min index 1af741a..fedbe14 100644 --- a/edition/min +++ b/edition/min @@ -4,15 +4,15 @@ export LIMA_INSTALL_CLOUD_INIT=false export LIMA_INSTALL_CLOUD_UTILS_GROWPART=false export LIMA_INSTALL_CNI_PLUGINS=false export LIMA_INSTALL_CNI_PLUGIN_FLANNEL=false +export LIMA_INSTALL_CRI_DOCKERD=false export LIMA_INSTALL_CTR=false export LIMA_INSTALL_CURL=false export LIMA_INSTALL_DOCKER=false export LIMA_INSTALL_E2FSPROGS_EXTRA=false export LIMA_INSTALL_GIT=false export LIMA_INSTALL_GNUTAR=false -export LIMA_INSTALL_K3S=false -export LIMA_INSTALL_CRI_DOCKERD=false export LIMA_INSTALL_IPTABLES=false +export LIMA_INSTALL_K3S=false export LIMA_INSTALL_LIMA_INIT=false export LIMA_INSTALL_LOGROTATE=false export LIMA_INSTALL_MKCERT=false diff --git a/edition/rd b/edition/rd index bdc85eb..4d5f2b6 100644 --- a/edition/rd +++ b/edition/rd @@ -4,9 +4,9 @@ LIMA_INSTALL_CA_CERTIFICATES=true LIMA_INSTALL_CLOUD_UTILS_GROWPART=true LIMA_INSTALL_CNI_PLUGINS=true LIMA_INSTALL_CNI_PLUGIN_FLANNEL=true -LIMA_INSTALL_CURL=true LIMA_INSTALL_CRI_DOCKERD=true LIMA_INSTALL_CTR=true +LIMA_INSTALL_CURL=true LIMA_INSTALL_DOCKER=true LIMA_INSTALL_E2FSPROGS_EXTRA=true LIMA_INSTALL_GIT=true diff --git a/edition/std b/edition/std index 9208722..fa68df2 100644 --- a/edition/std +++ b/edition/std @@ -1,11 +1,11 @@ source edition/min -LIMA_INSTALL_LIMA_INIT=true LIMA_INSTALL_BINFMT_MISC=true LIMA_INSTALL_CA_CERTIFICATES=true LIMA_INSTALL_CLOUD_UTILS_GROWPART=true LIMA_INSTALL_E2FSPROGS_EXTRA=true LIMA_INSTALL_GIT=true LIMA_INSTALL_IPTABLES=true +LIMA_INSTALL_LIMA_INIT=true LIMA_INSTALL_LOGROTATE=true LIMA_INSTALL_OPENSSH_SFTP_SERVER=true LIMA_INSTALL_SSHFS=true diff --git a/genapkovl-lima.sh b/genapkovl-lima.sh index 2e4473c..5904899 100755 --- a/genapkovl-lima.sh +++ b/genapkovl-lima.sh @@ -230,6 +230,17 @@ if [ "${LIMA_INSTALL_CNI_PLUGIN_FLANNEL}" == "true" ]; then fi fi +if [ "${LIMA_INSTALL_CRI_DOCKERD}" == "true" ]; then + mkdir -p "${tmp}/cri-dockerd" + tar xz -C "${tmp}/cri-dockerd" -f /home/build/cri-dockerd.tar.gz + mkdir -p "${tmp}/usr/local/bin/" + cp "${tmp}/cri-dockerd/cri-dockerd/cri-dockerd" "${tmp}/usr/local/bin/" + + #Copy the LICENSE file for cri-dockerd + mkdir -p "${tmp}/usr/share/doc/cri-dockerd/" + cp /home/build/cri-dockerd.license "${tmp}/usr/share/doc/cri-dockerd/LICENSE" +fi + if [ "${LIMA_INSTALL_CTR}" == "true" ]; then echo "containerd-ctr" >> "$tmp"/etc/apk/world fi @@ -312,17 +323,6 @@ if [ "${LIMA_INSTALL_TZDATA}" == "true" ]; then echo tzdata >> "$tmp"/etc/apk/world fi -if [ "${LIMA_INSTALL_CRI_DOCKERD}" == "true" ]; then - mkdir -p "${tmp}/cri-dockerd" - tar xz -C "${tmp}/cri-dockerd" -f /home/build/cri-dockerd.tar.gz - mkdir -p "${tmp}/usr/local/bin/" - cp "${tmp}/cri-dockerd/cri-dockerd/cri-dockerd" "${tmp}/usr/local/bin/" - - #Copy the LICENSE file for cri-dockerd - mkdir -p "${tmp}/usr/share/doc/cri-dockerd/" - cp /home/build/cri-dockerd.license "${tmp}/usr/share/doc/cri-dockerd/LICENSE" -fi - mkdir -p "${tmp}/etc" mkdir -p "${tmp}/proc" mkdir -p "${tmp}/usr" diff --git a/mkimg.lima.sh b/mkimg.lima.sh index 9bf35ed..300b388 100755 --- a/mkimg.lima.sh +++ b/mkimg.lima.sh @@ -35,6 +35,11 @@ profile_lima() { if [ "${LIMA_INSTALL_CURL}" == "true" ]; then apks="$apks curl" fi + if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then + apks="$apks libseccomp runc containerd tini-static device-mapper-libs" + apks="$apks docker-engine docker-openrc docker-cli docker" + apks="$apks socat xz" + fi if [ "${LIMA_INSTALL_E2FSPROGS_EXTRA}" == "true" ]; then apks="$apks e2fsprogs-extra" fi @@ -44,17 +49,15 @@ profile_lima() { if [ "${LIMA_INSTALL_GNUTAR}" == "true" ]; then apks="$apks tar" fi - if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then - apks="$apks libseccomp runc containerd tini-static device-mapper-libs" - apks="$apks docker-engine docker-openrc docker-cli docker" - apks="$apks socat xz" - fi - if [ "${LIMA_INSTALL_LIMA_INIT}" == "true" ]; then - apks="$apks e2fsprogs lsblk sfdisk shadow sudo udev" + if [ "${LIMA_INSTALL_IPTABLES}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then + apks="$apks iptables ip6tables" fi if [ "${LIMA_INSTALL_K3S}" == "true" ]; then apks="$apks k3s" fi + if [ "${LIMA_INSTALL_LIMA_INIT}" == "true" ]; then + apks="$apks e2fsprogs lsblk sfdisk shadow sudo udev" + fi if [ "${LIMA_INSTALL_LOGROTATE}" == "true" ]; then apks="$apks logrotate" fi @@ -73,9 +76,6 @@ profile_lima() { if [ "${LIMA_INSTALL_TINI}" == "true" ]; then apks="$apks tini-static" fi - if [ "${LIMA_INSTALL_IPTABLES}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL_FULL}" == "true" ]; then - apks="$apks iptables ip6tables" - fi if [ "${LIMA_INSTALL_TZDATA}" == "true" ]; then apks="$apks tzdata" fi diff --git a/src/aports b/src/aports index 1402388..095bac4 160000 --- a/src/aports +++ b/src/aports @@ -1 +1 @@ -Subproject commit 1402388a3a746e9961791846350e35f1d4d4618d +Subproject commit 095bac49b6e2f64f2c05f3cbfde30d86210b17e0