Skip to content

Commit

Permalink
Merge branch 'master' into alpine-initrd
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka authored Jun 21, 2023
2 parents 6112b6d + dbacc56 commit 9b3887a
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/flavors.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
},
{
"flavor": "rockylinux"
},
{
"flavor": "almalinux"
}
]
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ framework:
# Copy flavor-specific overlay files
IF [[ "$FLAVOR" =~ ^alpine* ]]
COPY overlay/files-alpine/ /framework
ELSE IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ]
ELSE IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "almalinux" ]
COPY overlay/files-fedora/ /framework
ELSE IF [ "$FLAVOR" = "debian" ] || [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-20-lts" ] || [ "$FLAVOR" = "ubuntu-22-lts" ] || [[ "$FLAVOR" =~ ^ubuntu-.*-lts-arm-.*$ ]]
COPY overlay/files-ubuntu/ /framework
Expand Down Expand Up @@ -361,7 +361,7 @@ base-image:

# Set /boot/vmlinuz pointing to our kernel so kairos-agent can use it
# https://github.com/kairos-io/kairos-agent/blob/0288fb111bc568a1bfca59cb09f39302220475b6/pkg/elemental/elemental.go#L548 q
IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ]
IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "almalinux" ]
RUN rm -rf /boot/initramfs-*
END

Expand Down
7 changes: 5 additions & 2 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ flavors:
rockylinux:
- systemd-base
- dracut-network-legacy-compat
almalinux:
- systemd-base
- dracut-network-legacy-compat
opensuse-tumbleweed:
- systemd-base
- systemd-latest
Expand Down Expand Up @@ -111,9 +114,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20230616132629-repository.yaml
reference: 20230621111751-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20230609142225-repository.yaml
reference: 20230613201238-repository.yaml
61 changes: 61 additions & 0 deletions images/Dockerfile.almalinux
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
ARG BASE_IMAGE=almalinux:latest

FROM $BASE_IMAGE

RUN echo "install_weak_deps=False" >> /etc/dnf/dnf.conf

RUN dnf install -y epel-release && dnf clean all
RUN dnf update -y
RUN dnf makecache
RUN dnf install -y \
dracut-live \
livecd-tools \
dracut-squash \
dracut-network \
efibootmgr \
audit \
device-mapper \
dosfstools \
dracut \
dracut-live \
dracut-network \
dracut-squash \
e2fsprogs \
efibootmgr \
gawk \
grub2 \
grub2-efi-x64 \
grub2-efi-x64-modules \
grub2-pc \
kernel \
kernel-modules \
kernel-modules-extra \
livecd-tools \
lvm2 \
nano \
openssh-server \
parted \
polkit \
rsync \
shim-x64 \
squashfs-tools \
sudo \
systemd \
systemd-networkd \
systemd-resolved \
systemd-timesyncd \
tar \
which \
epel-release \
https://zfsonlinux.org/epel/zfs-release-2-2.el9.noarch.rpm \
rsync && dnf clean all

RUN mkdir -p /run/lock
RUN touch /usr/libexec/.keep
RUN systemctl enable [email protected]
RUN systemctl enable [email protected]
RUN systemctl enable [email protected]
RUN systemctl enable systemd-networkd
RUN systemctl enable systemd-resolved
RUN systemctl disable dnf-makecache.service
RUN systemctl enable sshd
3 changes: 0 additions & 3 deletions images/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ FROM $BASE_IMAGE
RUN echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
RUN dnf install -y "https://zfsonlinux.org/fedora/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm" && dnf clean all
RUN dnf install -y \
NetworkManager \
squashfs-tools \
dracut-live \
livecd-tools \
dracut-squash \
Expand Down Expand Up @@ -37,7 +35,6 @@ RUN dnf install -y \
livecd-tools \
lvm2 \
nano \
NetworkManager \
openssh-server \
parted \
polkit \
Expand Down
4 changes: 0 additions & 4 deletions images/Dockerfile.rockylinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ RUN dnf install -y epel-release && dnf clean all
RUN dnf update -y
RUN dnf makecache
RUN dnf install -y \
NetworkManager \
squashfs-tools \
dracut-live \
livecd-tools \
dracut-squash \
Expand All @@ -35,7 +33,6 @@ RUN dnf install -y \
livecd-tools \
lvm2 \
nano \
NetworkManager \
openssh-server \
parted \
polkit \
Expand All @@ -61,5 +58,4 @@ RUN systemctl enable [email protected]
RUN systemctl enable systemd-networkd
RUN systemctl enable systemd-resolved
RUN systemctl disable dnf-makecache.service
RUN systemctl disable NetworkManager
RUN systemctl enable sshd
13 changes: 4 additions & 9 deletions overlay/files/system/oem/00_rootfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
# copy the file with a prefix starting by 90, e.g. /oem/91_custom.yaml
name: "Rootfs Layout Settings"
stages:
rootfs.before:
- name: "Pull data from provider"
datasource:
providers: ["aws", "gcp", "openstack", "cdrom"]
path: "/oem"
rootfs:
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -e "/run/cos/uki_mode" ]'
name: "Layout configuration for active/passive mode"
Expand Down Expand Up @@ -158,21 +153,21 @@ stages:
directories:
- path: /var/log/journal
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ -s /usr/local/etc/machine-id ]'
name: "Restore /etc/machine-id"
name: "Restore /etc/machine-id for systemd systems"
commands:
- cat /usr/local/etc/machine-id > /etc/machine-id
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ -s /var/lib/dbus/machine-id ]'
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ -s /var/lib/dbus/machine-id ] && [ -f "/sbin/openrc" ]'
name: "Restore /etc/machine-id for openrc systems"
commands:
- cat /var/lib/dbus/machine-id > /etc/machine-id
fs:
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -s /usr/local/etc/machine-id ] '
name: "Save /etc/machine-id"
name: "Save /etc/machine-id for systemd systems"
commands:
- |
mkdir -p /usr/local/etc
cp /etc/machine-id /usr/local/etc
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -s /var/lib/dbus/machine-id ] '
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -s /var/lib/dbus/machine-id ] && [ -f "/sbin/openrc" ]'
name: "Save /etc/machine-id for openrc systems"
commands:
- |
Expand Down
2 changes: 1 addition & 1 deletion overlay/files/system/oem/10_accounting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ stages:
if: '[ -e /sbin/rc-service ]'
commands:
- sed -i -e 's/ttyS0.*//g' /etc/inittab
- echo "ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab
- echo "ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab

0 comments on commit 9b3887a

Please sign in to comment.