Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [DO NOT MERGE]: Bump Alpine version to 3.20 #4092

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1131,3 +1131,5 @@ help:
@echo
@echo "make run is currently an alias for make run-live"
@echo

pkg/alpine:pkg/alpine-base
26 changes: 0 additions & 26 deletions images/rootfs.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,29 +102,3 @@ files:
contents: 'EVE_HV'
- path: /opt/vendor
directory: true
- path: /etc/securetty
contents: |
console
tty0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
hvc0
ttyS0
ttyS1
ttyS2
ttyAMA0
ttyAMA1
ttyTCU0
ttyTHS0
ttyTHS1
ttymxc0
ttymxc2
2 changes: 1 addition & 1 deletion pkg/acrn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2023 Zededa, Inc.
# SPDX-License-Identifier: Apache-2.0

FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS kernel-build
FROM lfedge/eve-alpine:e34284a8dd69c9c5ba7c52cd7b7d08fc2db1e0ac AS kernel-build

ENV BUILD_PKGS \
gcc make libc-dev dev86 xz-dev perl bash python3-dev gettext iasl \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/misc/acrn-manager/acrnctl.c
+++ b/misc/acrn-manager/acrnctl.c
@@ -771,7 +771,7 @@
{
char df_opt[16] = "VM_NAME";

- if (argc != 2 || ((argv + 1) && !strcmp(argv[1], "help"))) {
+ if (argc != 2 || !strcmp(argv[1], "help")) {
printf("acrnctl %s %s\n", cmd->cmd, df_opt);
return -1;
}
12 changes: 12 additions & 0 deletions pkg/acrn/patches-1.3/0010-do-not-redefine-PAGESIZE.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/misc/tools/acrntrace/acrntrace.h.1
+++ b/misc/tools/acrntrace/acrntrace.h
@@ -10,7 +10,9 @@
#define PCPU_NUM 4
#define TRACE_ELEMENT_SIZE 32 /* byte */
#define TRACE_ELEMENT_NUM ((4 * 1024 * 1024 - 64) / TRACE_ELEMENT_SIZE)
+#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
+#endif
#define PAGE_MASK (~(PAGE_SIZE - 1))
#define MMAP_SIZE (4 * 1024 * 1024)
/*
45 changes: 18 additions & 27 deletions pkg/alpine-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
FROM busybox@sha256:ef320ff10026a50cf5f0213d35537ce0041ac1d96e9b7800bafd8bc9eff6c693 AS builder
FROM busybox@sha256:ef320ff10026a50cf5f0213d35537ce0041ac1d96e9b7800bafd8bc9eff6c693 AS base

WORKDIR /rootfs
ARG TARGETARCH
ENV ROOTFS_VERSION=3.20.1

FROM base as rootfs-amd64
ENV ALPINE_TARGETARCH=x86_64
FROM base as rootfs-arm64
ENV ALPINE_TARGETARCH=aarch64
FROM base as rootfs-riscv64
ENV ALPINE_TARGETARCH=riscv64

# hadolint ignore=DL3006
FROM rootfs-${TARGETARCH} as builder

# Since riscv64 is not officially supported yet, we use distinct package source
# busybox do not support https to storage.googleapis.com so we use http here
# and replace with https for repo url
RUN case $(uname -m) in \
x86_64|aarch64) \
ROOTFS_URL="https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/$(uname -m)/alpine-minirootfs-3.16.2-$(uname -m).tar.gz"; \
;; \
riscv64) \
ROOT_URL=http://storage.googleapis.com/eve-alpine && \
ROOTFS_URL="$ROOT_URL/images/alpine-minirootfs-220909-riscv64.tar.gz"; \
;; \
*) echo "Unsupported architecture $(uname -m). Exiting" && exit 1 \
;; \
esac && \
wget -q -O /tmp/rootfs.tar.gz "$ROOTFS_URL" && \
tar xzf /tmp/rootfs.tar.gz && \
if [ "$(uname -m)" = "riscv64" ] ; then \
wget -q -P etc/apk/keys \
"$ROOT_URL/keys/builder@projecteve.dev-62fe6660.rsa.pub" && \
ROOT_URL=https://storage.googleapis.com/eve-alpine && \
echo "$ROOT_URL/v3.16/main" > etc/apk/repositories && \
echo "$ROOT_URL/v3.16/community" >> etc/apk/repositories && \
echo "$ROOT_URL" > etc/apk/cache.url; \
fi
ADD https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/${ALPINE_TARGETARCH}/alpine-minirootfs-${ROOTFS_VERSION}-${ALPINE_TARGETARCH}.tar.gz /alpine-rootfs.tar.gz

WORKDIR /rootfs
RUN tar -xpzf /alpine-rootfs.tar.gz -C ./

FROM scratch

# seed the root filesystem
COPY --from=builder /rootfs/ /

# set the defaults for docker run
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CMD sh
2 changes: 1 addition & 1 deletion pkg/alpine-base/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
image: eve-alpine-base
org: lfedge
network: yes
network: no
11 changes: 5 additions & 6 deletions pkg/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# image was bootstraped using FROM lfedge/eve-alpine-base:fad44e3702708a8d044663a20fd98d933dddb41e AS cache
# to update please see https://github.com/lf-edge/eve/blob/master/docs/BUILD.md#how-to-update-eve-alpine-package
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS cache
# image was bootstraped using FROM lfedge/eve-alpine-base:3a027878543a19e70e83c296f7bd4a791c26970a AS cache
# to update please see https://github.com/lf-edge/eve/blob/master/docs/ALPINE.md
FROM lfedge/eve-alpine-base:3a027878543a19e70e83c296f7bd4a791c26970a AS cache

ARG ALPINE_VERSION=3.16
ARG ALPINE_VERSION=3.20
# this is only needed once, when this package
# is rebased on the new version of Alpine and
# you have to have FROM alpine:x.y.z above:
Expand Down Expand Up @@ -37,10 +37,9 @@ RUN for repo in main community testing; do \

# set the default repository to use
RUN cp /mirror/${ALPINE_VERSION}/rootfs/etc/apk/repositories /etc/apk
RUN cat /mirror/edge/rootfs/etc/apk/repositories >> /etc/apk/repositories
RUN apk update

FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS compactor
FROM lfedge/eve-alpine-base:3a027878543a19e70e83c296f7bd4a791c26970a AS compactor

COPY --from=cache /etc/apk/repositories* /etc/apk/
COPY --from=cache /etc/apk/keys /etc/apk/keys/
Expand Down
2 changes: 1 addition & 1 deletion pkg/alpine/eve-alpine-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# eve-alpine-deploy.sh 3.17
set -e

ALPINE_VERSION=${1:-3.16}
ALPINE_VERSION=${1:-3.20}

bail() {
echo "$@"
Expand Down
56 changes: 0 additions & 56 deletions pkg/alpine/mirrors/3.16/community

This file was deleted.

Loading
Loading