Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
sync from gl upstream (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored Dec 19, 2023
1 parent 0e9f688 commit bf374ab
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gardenlinux/bin/check-pkgs-availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_unavailable_packages(available_packages, required_packages):


def check_packages(arch, dist) -> list():
available_packages = get_available_pkgs_from_repo(f"http://repo.gardenlinux.io/gardenlinux/dists/{dist}/main/binary-{arch}/Packages")
available_packages = get_available_pkgs_from_repo(f"https://repo.gardenlinux.io/gardenlinux/dists/{dist}/main/binary-{arch}/Packages")
required_packages = read_pkg_files(arch)
missing_packages = get_unavailable_packages(available_packages, required_packages)
return missing_packages
Expand Down
2 changes: 1 addition & 1 deletion gardenlinux/bin/garden-version
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function get_minor_from_repo {
minor=0 # running index
limit=100 # hard limit the search in case of unexpected curl results
major=$1 # major to check the latest minor for
repo_url="http://repo.gardenlinux.io/gardenlinux/dists/$major.__MINOR__/Release"
repo_url="https://repo.gardenlinux.io/gardenlinux/dists/$major.__MINOR__/Release"
while [ $minor -le $limit ]
do
check_url=${repo_url//__MINOR__/$minor}
Expand Down
1 change: 1 addition & 0 deletions gardenlinux/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ build: needslim
build-base-test: needslim
cp -p ../gardenlinux.asc base-test/gardenlinux.asc
cp ../tests/Pipfile base-test/
cp ../tests/Pipfile.lock base-test/
@$(GARDENLINUX_BUILD_CRE) build --build-arg VERSION=$(VERSION) -t gardenlinux/base-test:$(VERSION) base-test
rm base-test/gardenlinux.asc
rm base-test/Pipfile
Expand Down
20 changes: 14 additions & 6 deletions gardenlinux/container/base-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
FROM gardenlinux/slim
ARG DEBIAN_DIST=bookworm
FROM debian:${DEBIAN_DIST}-slim
ARG DEBIAN_DIST

ENV DEBIAN_FRONTEND noninteractive
ENV SHELL /bin/bash
ENV PYTHONPATH /gardenlinux/bin:/gardenlinux/ci:/gardenlinux/ci/glci:/gardenlinux/tests:/gardenlinux/features
ARG GARDENLINUX_MIRROR_KEY=/etc/apt/trusted.gpg.d/gardenlinux.asc
ARG VERSION

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates

COPY gardenlinux.asc $GARDENLINUX_MIRROR_KEY
RUN chown root:root $GARDENLINUX_MIRROR_KEY \
&& chmod 644 $GARDENLINUX_MIRROR_KEY

RUN echo "deb http://deb.debian.org/debian testing main contrib non-free" > /etc/apt/sources.list \
&& echo "deb [signed-by=$GARDENLINUX_MIRROR_KEY] http://repo.gardenlinux.io/gardenlinux $VERSION main" >> /etc/apt/sources.list \
# Install packages from debian dist by default, only install packages from repo.gardenlinux.io if they are specified
# with higher pin prio than 900
RUN echo "Package: onmetal-image\nPin: origin repo.gardenlinux.io\nPin-Priority: 1001" > /etc/apt/preferences.d/onmetal-images \
&& echo "Package: *\nPin: release a=${DEBIAN_DIST}\nPin-Priority: 900" > /etc/apt/preferences.d/default

RUN echo "deb http://deb.debian.org/debian ${DEBIAN_DIST} main contrib non-free" > /etc/apt/sources.list \
&& echo "deb [signed-by=$GARDENLINUX_MIRROR_KEY] https://repo.gardenlinux.io/gardenlinux $VERSION main" >> /etc/apt/sources.list \
&& sed -i 's/deb.debian.org/cdn-aws.deb.debian.org/g' /etc/apt/sources.list \
&& if [ -f "/etc/apt/sources.list.d/debian.sources"] ; then sed -i 's/deb.debian.org/cdn-aws.deb.debian.org/g' /etc/apt/sources.list.d/debian.sources ; else echo "file not present" ; fi \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
unzip \
ca-certificates \
less \
apt-transport-https \
gnupg \
Expand All @@ -32,7 +40,7 @@ RUN echo "deb http://deb.debian.org/debian testing main contrib non-free" > /etc
inetutils-ping \
wget \
iproute2 \
libguestfs-tools \
guestfish \
qemu-system-x86 \
qemu-system-arm \
qemu-efi-aarch64 \
Expand All @@ -49,7 +57,7 @@ ENV VIRTUAL_ENV="$VIRTUAL_ENV_PARENT/.venv"
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY Pipfile "$VIRTUAL_ENV_PARENT"
COPY Pipfile Pipfile.lock "$VIRTUAL_ENV_PARENT/"
# Do not use --system, we want the pip from the virtual env
RUN cd "$VIRTUAL_ENV_PARENT" && pipenv install --dev
WORKDIR /gardenlinux/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e

update-kernel-cmdline
for kernel in /boot/vmlinuz-*; do
kernel-install add "${kernel#*-}" "${kernel}"
done
update-syslinux
Original file line number Diff line number Diff line change
@@ -1 +1 @@
add_dracutmodules+=" ignition ignition-extra "
add_dracutmodules+=" ignition ignition-extra systemd-networkd "
2 changes: 1 addition & 1 deletion gardenlinux/features/base/test/test_users.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from helper.tests.users import users

def test_users(client, non_dev, non_feature_githubActionRunner, non_vhost, non_hyperscalers, non_container):
def test_users(client, non_dev, non_feature_githubActionRunner, non_vhost, non_hyperscalers, non_container, non_ccee):
users(client)
2 changes: 1 addition & 1 deletion gardenlinux/features/server/test/test_users.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from helper.tests.users import users

def test_users(client, non_dev, non_feature_githubActionRunner, non_vhost, non_hyperscalers):
def test_users(client, non_dev, non_feature_githubActionRunner, non_vhost, non_hyperscalers, non_ccee):
users(client)
6 changes: 5 additions & 1 deletion gardenlinux/features/vmware/exec.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ set -Eeuo pipefail
# growpart is done in initramfs, growroot by systemd
mv /etc/cloud/cloud.cfg /etc/cloud/cloud.cfg.bak
cat /etc/cloud/cloud.cfg.bak | grep -v "^ - growpart$" | grep -v "^ - resizefs$" | grep -v "^ - ntp$" >/etc/cloud/cloud.cfg
rm /etc/cloud/cloud.cfg.bak
rm /etc/cloud/cloud.cfg.bak

# Remove ignition config on arm64
# This is incompatible in combination with arm64, vmware, readonly (ignition)
if [ "$(uname -m)" = aarch64 ]; then rm /etc/kernel/cmdline.d/50-ignition.cfg; fi

0 comments on commit bf374ab

Please sign in to comment.