diff --git a/Containerfile b/Containerfile index 0c1c930..ade24e2 100644 --- a/Containerfile +++ b/Containerfile @@ -90,6 +90,7 @@ RUN --mount=type=bind,from=build-ctx,source=/build/40-multimedia.sh,target=/tmp/ # LAYER 5: Flatpak Vorbereitung (Winzig, ganz unten) RUN --mount=type=bind,from=build-ctx,source=/build/50-prepare-flatpak-for-bazaar.sh,target=/tmp/50-prepare-flatpak-for-bazaar.sh \ + --mount=type=cache,dst=/var/cache \ --mount=type=tmpfs,dst=/tmp \ bash /tmp/50-prepare-flatpak-for-bazaar.sh diff --git a/build/10-repos.sh b/build/10-repos.sh index 900fc18..32f057d 100755 --- a/build/10-repos.sh +++ b/build/10-repos.sh @@ -10,6 +10,12 @@ dnf5 install -y \ # Die Shell (Paket `noctalia`, v5) liegt in den offiziellen Fedora-Repos, # der Greeter aktuell NUR in Terra (Stand: Fedora 44). # Siehe https://docs.noctalia.dev/greeter/installation/ +# terra-release wird als Bootstrap-Paket aus dem Dritt-Repo installiert; +# fuer genau dieses Paket ist --nogpgcheck noetig, da der Fyra-GPG-Key +# erst durch terra-release selbst bereitgestellt wird. Alle weiteren +# DNF-Operationen (noctalia-greeter) laufen ueber das installierte Repo +# mit dessen Key und normaler Signaturpruefung. Repo wird nach der +# Installation entfernt (siehe 21-greetd.sh). dnf5 install -y --nogpgcheck \ --repofrompath "terra,https://repos.fyralabs.com/terra${FEDORA_VERSION}" \ terra-release diff --git a/build/21-greetd.sh b/build/21-greetd.sh index 44e0b9b..59250da 100755 --- a/build/21-greetd.sh +++ b/build/21-greetd.sh @@ -75,7 +75,12 @@ id greeter # System-Setup des Greeters: richtet u.a. /etc/pam.d/greetd ein. # Pfad laut PACKAGING.md: share/noctalia-greeter/setup_greeter_system.sh if [[ -x /usr/share/noctalia-greeter/setup_greeter_system.sh ]]; then - /usr/share/noctalia-greeter/setup_greeter_system.sh || true + # Fehler nicht vollstaendig schlucken: PAM/State des Greeters haengen + # daran. Bei Fehlschlag laut warnen, damit defekte Login-Screens nicht + # erst zur Laufzeit auffallen. (Kein harter Abbruch: Setup ist teils + # idempotent und heilt beim Boot nach.) + /usr/share/noctalia-greeter/setup_greeter_system.sh \ + || echo "WARN: setup_greeter_system.sh fehlgeschlagen - Greeter-State/PAM ggf. unvollstaendig (Journal pruefen)" else echo "WARN: setup_greeter_system.sh nicht gefunden - Greeter-State wird erst beim Boot angelegt" fi diff --git a/build/30-virt.sh b/build/30-virt.sh index 4e341a9..83ade19 100755 --- a/build/30-virt.sh +++ b/build/30-virt.sh @@ -26,7 +26,7 @@ dnf5 install -y \ # Fail-fast wie in 40-multimedia.sh: --skip-unavailable duerfte stille # Luecken reissen (jq/libnotify sind harte Skript-Abhaengigkeiten). -for pkg in distrobox toolbox just micro fuse fuse3 jq libnotify; do +for pkg in distrobox toolbox just micro fuse fuse-libs fuse3 jq libnotify; do rpm -q "${pkg}" >/dev/null 2>&1 || { echo "FEHLER: ${pkg} fehlt (Repo-Luecke?)"; exit 1; } done echo "Virt/Tools-Stack OK" diff --git a/build/40-multimedia.sh b/build/40-multimedia.sh index 876e991..ecb6697 100755 --- a/build/40-multimedia.sh +++ b/build/40-multimedia.sh @@ -24,4 +24,13 @@ dnf5 install -y \ intel-media-driver \ @multimedia +# Soft-Check: Freeworld/Codec-Pakete koennen durch RPMFusion-Umbenennungen +# fehlen (siehe Kommentar oben). Dann zumindest loggen, statt still zu +# schlucken - harte Asserts wuerden den Build bei legitimen Umbenennungen killen. +for pkg in mesa-va-drivers-freeworld ffmpeg; do + if ! rpm -q "${pkg}" >/dev/null 2>&1; then + echo "WARN: ${pkg} nicht installiert (Repo-/Umbenennungsproblem?)" >&2 + fi +done + dnf5 clean all diff --git a/configs/flatpak-preinstall.service b/configs/flatpak-preinstall.service index d05d773..b26701b 100644 --- a/configs/flatpak-preinstall.service +++ b/configs/flatpak-preinstall.service @@ -18,7 +18,13 @@ ExecStart=/usr/bin/flatpak config --set extra-languages "de" # lassen ("No ref chosen", Service wuerde ewig failen). Bei Bedarf (erste # Qt-Flatpak-App) interaktiv nachinstallieren, dort darf flatpak fragen: # flatpak install flathub org.kde.KStyle.Adwaita -ExecStart=/usr/bin/flatpak install -y flathub io.github.kolunmi.Bazaar com.brave.Browser com.ranfdev.DistroShelf org.gtk.Gtk3theme.adw-gtk3 org.gtk.Gtk3theme.adw-gtk3-dark +# Getrennte Schritte: ein fehlendes Paket blockiert nicht die uebrigen +# (bessere Diagnose im Journal, Teilerfolge moeglich). +ExecStart=/usr/bin/flatpak install -y flathub io.github.kolunmi.Bazaar +ExecStart=/usr/bin/flatpak install -y flathub com.brave.Browser +ExecStart=/usr/bin/flatpak install -y flathub com.ranfdev.DistroShelf +ExecStart=/usr/bin/flatpak install -y flathub org.gtk.Gtk3theme.adw-gtk3 +ExecStart=/usr/bin/flatpak install -y flathub org.gtk.Gtk3theme.adw-gtk3-dark # Noctalia-CSS fuer ALLE Flatpaks lesbar machen (read-only, systemweit): # volle Palette statt nur Hell/Dunkel - gilt auch fuer spaeter per Bazaar # installierte Apps (kein Override pro App noetig, Neustart genuegt). diff --git a/iso/iso.toml b/iso/iso.toml index b5fc75a..64dffc7 100644 --- a/iso/iso.toml +++ b/iso/iso.toml @@ -11,7 +11,7 @@ lang de_DE.UTF-8 keyboard --vckeymap=de --xlayouts='de' timezone Europe/Berlin --utc # --- Netzwerk (frueh aktivieren: %post bootc switch braucht Registry-Zugriff) --- -network --bootproto=dhcp --device=link --activate +network --bootproto=dhcp --device=link --activate --hostname=fluffy-pancake # --- Bootloader --- bootloader --location=mbr # --- Automatische Partitionierung (bootc-Rezept, passt zu --rootfs=btrfs) --- diff --git a/scripts/kanshi-autoconfig b/scripts/kanshi-autoconfig index 6ee5ba7..e616566 100755 --- a/scripts/kanshi-autoconfig +++ b/scripts/kanshi-autoconfig @@ -51,7 +51,7 @@ from pathlib import Path MARKER = "# kanshi-autoconfig: managed" CONFIG_PATH = Path.home() / ".config" / "kanshi" / "config" -POLL_INTERVAL = 5 +POLL_INTERVAL = 10 _VM_CACHE = None @@ -79,12 +79,24 @@ def norm_rate(value): def choose_mode(modes, current, in_vm): - """Modus waehlen: VM-Heuristik, sonst preferred, sonst current/erster.""" + """Modus waehlen: VM-Heuristik (hoechste Aufloesung, bevorzugt ~60 Hz), + sonst preferred, sonst current/erster.""" if in_vm: + # In VMs meldet die Firmware oft einen Kleinstmodus als preferred. + # Daher die Aufloesung mit den meisten Pixeln waehlen; bei Gleichstand + # die Bildwiederholrate nahe 60 Hz. + best = None + best_key = None for m in modes: + w = m.get("width") or 0 + h = m.get("height") or 0 rate = norm_rate(m.get("refresh") or m.get("rate")) or 0 - if m.get("width") == 1920 and m.get("height") == 1080 and round(rate) == 60: - return m + key = (w * h, -abs(rate - 60) if rate else 0) + if best_key is None or key > best_key: + best_key = key + best = m + if best is not None: + return best for m in modes: if m.get("preferred"): return m diff --git a/scripts/labwc-appmenu b/scripts/labwc-appmenu index 8d8861b..c83ba1a 100755 --- a/scripts/labwc-appmenu +++ b/scripts/labwc-appmenu @@ -20,6 +20,12 @@ import shutil import sys import xml.sax.saxutils as sax +def esc(value): + # sax.escape maskiert standardmaessig nur <, >, &. Fuer Attributwerte + # (doppelte Anfuehrungszeichen) zusaetzlich " maskieren, damit Namen/ + # Icons mit Anfuehrungszeichen das Pipe-Menue nicht ungueltig machen. + return sax.escape(str(value), {'"': '"', "'": '''}) + APP_DIRS = [ os.path.expanduser("~/.local/share/flatpak/exports/share/applications"), "/var/lib/flatpak/exports/share/applications", @@ -137,23 +143,23 @@ def main(): items = sections[label] if not items: continue - out.append(' ' % sax.escape(label)) + out.append(' ' % esc(label)) for _, name, command, icon in sorted(items): if icon: - out.append(' ' % (sax.escape(name), sax.escape(icon))) + out.append(' ' % (esc(name), esc(icon))) else: - out.append(' ' % sax.escape(name)) - out.append(' ' % sax.escape(command)) + out.append(' ' % esc(name)) + out.append(' ' % esc(command)) out.append(" ") rest = sections[FALLBACK_SECTION] if rest: - out.append(' ' % sax.escape(FALLBACK_SECTION)) + out.append(' ' % esc(FALLBACK_SECTION)) for _, name, command, icon in sorted(rest): if icon: - out.append(' ' % (sax.escape(name), sax.escape(icon))) + out.append(' ' % (esc(name), esc(icon))) else: - out.append(' ' % sax.escape(name)) - out.append(' ' % sax.escape(command)) + out.append(' ' % esc(name)) + out.append(' ' % esc(command)) out.append(" ") out.append("") sys.stdout.write("\n".join(out) + "\n") diff --git a/scripts/notify-bootc-user.sh b/scripts/notify-bootc-user.sh index a63d185..eea58c7 100755 --- a/scripts/notify-bootc-user.sh +++ b/scripts/notify-bootc-user.sh @@ -72,8 +72,15 @@ $LOGGER -t "$TAG" "Update gestaged. Suche aktive Desktop-User..." # echter Desktop-Nutzer (eigene greetd-Session) und wird ausgeschlossen. USER_IDS="" if have "${LOGINCTL}"; then + # Spaltenlayout von `loginctl list-sessions` ist versionsabhaengig + # (CLASS/SEAT/STATE wandern). Daher token-basiert statt fester Indizes: + # Zeile muss "seat0" und "user" als eigenstaendige Tokens enthalten und + # der Nutzername (3. Spalte) darf nicht "greeter" sein. UIDs deduplizieren. USER_IDS="$(${LOGINCTL} list-sessions --no-legend 2>/dev/null \ - | awk 'NF >= 6 && $4 == "seat0" && $6 == "user" && $3 != "greeter" {print $2}' || true)" + | awk '$0 ~ /(^|[[:space:]])seat0([[:space:]]|$)/ \ + && $0 ~ /(^|[[:space:]])user([[:space:]]|$)/ \ + && $3 != "greeter" {print $2}' \ + | sort -u || true)" fi if [[ -z "${USER_IDS}" ]]; then @@ -112,6 +119,7 @@ for USER_ID in ${USER_IDS}; do --action="reboot=Jetzt neu starten" \ --wait \ 2>/dev/null || echo "closed")" + ACTION="${ACTION:-closed}" if [[ "${ACTION}" == "reboot" ]]; then REBOOT_REQUESTED=1 break