fix: timer-parse, copy-perms, notify-deps

This commit is contained in:
humocs-man committed 2026-10-04 12:57:27 +02:00
1 parent 36ca08f4c3
commit 23e273f8c3
4 files changed
+36 -12

No files matched your search

+9 -8
View File
@@ -73,14 +73,14 @@ RUN --mount=type=bind,from=build-ctx,source=/build/50-prepare-flatpak-for-bazaar
###############################################################################
# 1. Kopiere die Filesystem-Fixes (tmpfiles.d, Vendor-Default)
COPY configs/bootc-fix.conf /usr/lib/tmpfiles.d/bootc-fix.conf
COPY --chmod=0644 configs/bootc-fix.conf /usr/lib/tmpfiles.d/bootc-fix.conf
# 1b. Container-Policy & Registry Auth für bootc
# sigstoreSigned-Pflicht für eigenes Image, Public-Registries explizit erlaubt
COPY configs/containers/policy.json /etc/containers/policy.json
COPY cosign.pub /etc/pki/containers/cosign.pub
COPY configs/auth.json /etc/containers/auth.json
COPY configs/humocs-man.yaml /etc/containers/registries.d/humocs-man.yaml
COPY --chmod=0644 configs/containers/policy.json /etc/containers/policy.json
COPY --chmod=0644 cosign.pub /etc/pki/containers/cosign.pub
COPY --chmod=0600 configs/auth.json /etc/containers/auth.json
COPY --chmod=0644 configs/humocs-man.yaml /etc/containers/registries.d/humocs-man.yaml
RUN chmod 0644 /etc/containers/policy.json /etc/pki/containers/cosign.pub && \
chmod 0600 /etc/containers/auth.json && \
@@ -88,8 +88,9 @@ RUN chmod 0644 /etc/containers/policy.json /etc/pki/containers/cosign.pub && \
python3 -m json.tool /etc/containers/auth.json > /dev/null
# 2. Kopiere die Systemd-Overrides als Vendor-Drop-ins (kein /etc/-Override im Image)
COPY configs/bootc-timer-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.timer.d/override.conf
COPY configs/bootc-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.service.d/override.conf
# --chmod=0644: schliesst world-writable Warnungen von systemd aus (0644 statt 0666 durch Checkout-umask)
COPY --chmod=0644 configs/bootc-timer-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.timer.d/override.conf
COPY --chmod=0644 configs/bootc-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.service.d/override.conf
# 3. Kopiere das Benachrichtigungs-Skript
COPY --chmod=755 scripts/notify-bootc-user.sh /usr/bin/
@@ -99,7 +100,7 @@ COPY --chmod=755 scripts/notify-bootc-user.sh /usr/bin/
# =============================================================================
# 4. Kopiere den Systemd-Service für den Erst-Boot von Flatpak
COPY configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service
COPY --chmod=0644 configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service
# 5. Aktiviere Services (Presets greifen nicht bei COPY-Dateien)
RUN systemctl enable \
+3 -1
View File
@@ -16,7 +16,9 @@ dnf5 install -y \
micro \
fuse \
fuse-libs \
fuse3
fuse3 \
jq \
libnotify
dnf5 clean all
+1 -2
View File
@@ -1,8 +1,7 @@
[Timer]
# Leeren der Standardwerte
# Leeren der Standardwerte (nur Listen-Keys duerfen leer zugewiesen werden)
OnBootSec=
OnUnitInactiveSec=
RandomizedDelaySec=
OnCalendar=
# Prüfe jeden Tag um 20:00 Uhr
+23 -1
View File
@@ -10,15 +10,32 @@ SYSTEMCTL="/usr/bin/systemctl"
TAG="bootc-timer"
have() { command -v "$1" >/dev/null 2>&1; }
# Harte Abhaengigkeiten pruefen (jq für bootc-JSON, notify-send für Desktop-Dialog)
# Fehlt etwas, ist das ein Build-Fehler (Paket fehlt im Image) – klar loggen statt kryptisch crashen.
if ! have jq; then
$LOGGER -t "$TAG" "FEHLER: 'jq' fehlt im Image (notify-bootc-user.sh braucht es). Abbruch."
exit 1
fi
# =============================================================================
# Flatpaks im Hintergrund aktualisieren
# Flatpaks im Hintergrund aktualisieren (nur wenn flatpak vorhanden)
# =============================================================================
if have "$FLATPAK"; then
$LOGGER -t "$TAG" "Suche nach Flatpak-Updates..."
$FLATPAK update -y --noninteractive || $LOGGER -t "$TAG" "Flatpak-Update fehlgeschlagen oder keine Updates vorhanden."
else
$LOGGER -t "$TAG" "Flatpak nicht installiert, ueberspringe Flatpak-Update."
fi
# =============================================================================
# 1. Bootc Upgrade ausfuehren
# =============================================================================
if ! have "$BOOTC"; then
$LOGGER -t "$TAG" "FEHLER: '$BOOTC' fehlt im Image. Abbruch."
exit 1
fi
$LOGGER -t "$TAG" "Suche nach System-Updates (bootc)..."
$BOOTC upgrade || true
@@ -49,6 +66,11 @@ fi
$LOGGER -t "$TAG" "Sende Benachrichtigung an User-ID: $USER_ID"
if ! have "$NOTIFY"; then
$LOGGER -t "$TAG" "Update bereit, aber 'notify-send' (libnotify) fehlt im Image – keine Desktop-Benachrichtigung moeglich."
exit 0
fi
# =============================================================================
# 4. Benachrichtigung senden
# =============================================================================