1 Commits
Author SHA1 Message Date
Renovate Bot 571c2ff66a Add renovate.json 2026-05-31 04:01:28 +00:00
5 changed files with 21 additions and 76 deletions
-1
View File
@@ -1,2 +1 @@
output output
out
+9 -24
View File
@@ -1,29 +1,14 @@
ARG CHUNKAH_CONFIG_STR FROM quay.io/fedora/fedora-bootc:44
FROM quay.io/fedora/fedora-bootc:44 AS builder
# Install ZFS # Install ZFS
# we want to keep ALL dnf downloaded packages in dnf cache, RUN dnf install -y kernel-devel-$(uname -r | awk -F'-' '{print $1}')
# this is not the default, hackily add it to the config, RUN dnf install -y https://zfsonlinux.org/fedora/zfs-release-3-1$(rpm --eval "%{dist}").noarch.rpm
# assume there is not much in it. should be improved RUN dnf install -y zfs
RUN echo 'keepcache=True' >> /etc/dnf/dnf.conf
# deps RUN useradd -m -d /var/home/backup backup
RUN --mount=type=cache,target=/var/cache/libdnf5 <<EOF RUN mkdir /backups && chown backup:backup /backups
dnf install -y kernel-devel-$(uname -r | awk -F'-' '{print $1}')
dnf install -y https://zfsonlinux.org/fedora/zfs-release-3-1$(rpm --eval "%{dist}").noarch.rpm COPY --chown=root:root --chmod=600 id_ed25519.pub /root/.ssh/authorized_keys
dnf install -y zfs btop borgbackup COPY --chown=backup:backup --chmod=600 id_ed25519.pub /var/home/backup/.ssh/authorized_keys
dnf clean all && rm -rf /run/dnf && rm -rf /tmp/*
EOF
RUN bootc container lint RUN bootc container lint
FROM quay.io/coreos/chunkah AS chunkah
ARG CHUNKAH_CONFIG_STR
RUN --mount=type=bind,target=/run/src,rw \
--mount=from=builder,target=/chunkah,ro \
chunkah build --prune /sysroot/ --max-layers 128 \
--label ostree.commit- --label ostree.final-diffid- \
--output oci:/run/src/out
FROM oci:out
+6 -19
View File
@@ -2,33 +2,24 @@ REPO="gitea.wefers.page/julian/backup-server"
TAG="latest" TAG="latest"
build() { build() {
sudo rm -rf out # ABSOLUTELY DO NOT USE --squash, as ostree NEEDS the layers
# --no-cache \ buildah build \
sudo buildah build \
-t ${REPO}:${TAG} \ -t ${REPO}:${TAG} \
--build-arg CHUNKAH_CONFIG_STR="$(sudo podman inspect "quay.io/fedora/fedora-bootc:44")" \
--pull \ --pull \
--layers \ --layers \
--format oci \ --format oci \
--skip-unused-stages=false \
-v $(pwd):/run/src --security-opt=label=disable \
--network=host \
. .
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
sudo buildah login gitea.wefers.page -u julian -p 278b81490079574229dce45b66b726d2ae7e83c0 buildah login gitea.wefers.page -u julian -p 278b81490079574229dce45b66b726d2ae7e83c0
sudo buildah push \ buildah push \
--compression-format zstd:chunked \ --compression-format zstd \
"${REPO}:${TAG}" "${REPO}:${TAG}"
fi fi
} }
mkImage() { mkImage() {
# set -euo
# echo "current partitions:"
# lsblk
# read -p "target USB stick device to write image to: /dev/" dev
sudo podman run \ sudo podman run \
--rm \ --rm \
-it \ -it \
@@ -42,12 +33,8 @@ mkImage() {
-v /var/lib/containers/storage:/var/lib/containers/storage \ -v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \ quay.io/centos-bootc/bootc-image-builder:latest \
--type anaconda-iso \ --type anaconda-iso \
--use-librepo=true \ --use-librepo=True \
--rootfs ext4 \
${REPO}:${TAG} ${REPO}:${TAG}
# --in-vm \
# sudo dd if=output/bootiso/install.iso of=/dev/${dev} bs=4M
} }
$1 $1
-32
View File
@@ -1,18 +1,3 @@
[customizations]
hostname = "backupserver"
[[customizations.user]]
name = "backup"
description = "Default user account"
password = "$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31L..."
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGPAWtzq2/cuv+zPzdDSCe/5pc0HRCxmwFiI5Fu3sEok julian@local"
home = "/srv/widget/"
shell = "/usr/bin/bash"
groups = ["widget", "users", "wheel"]
uid = 1200
gid = 1200
expiredate = 12345
[customizations.iso] [customizations.iso]
volume_id = "JuliansBackupServer" volume_id = "JuliansBackupServer"
application_id = "JuliansBackupServer" application_id = "JuliansBackupServer"
@@ -25,20 +10,3 @@ publisher = "Julian"
# org.fedoraproject.Anaconda.Modules.Security # org.fedoraproject.Anaconda.Modules.Security
# ] # ]
# disable = ["org.fedoraproject.Anaconda.Modules.Users"] # disable = ["org.fedoraproject.Anaconda.Modules.Users"]
[customizations.installer.kickstart]
contents = """
# Basic setup
text
lang en_US
keyboard de
timezone Europe/Berlin
network --device=enp1s0 --bootproto=static --ip=192.168.178.3 --netmask=255.255.255.0 --gateway=192.168.178.1 --nameserver=1192.168.178.8
# Here's where we reference the container image to install - notice the kickstart
# has no `%packages` section! What's being installed here is a container image.
# ostreecontainer --url gitea.wefers.page/julian/backup-server:latest
firewall --disabled
services --enabled=sshd
"""
+6
View File
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>julian/renovate-config"
]
}