From 28fc45de63d01bce1ff1c1023e2fcc0b62b71939 Mon Sep 17 00:00:00 2001 From: humocs-man Date: Sat, 3 Oct 2026 23:11:34 +0200 Subject: [PATCH] Portalfehler behoben --- Containerfile | 33 ++++++---- Justfile | 18 ------ build/21-greetd.sh | 4 +- build/22-noctalia.sh | 7 ++- ...move-packages.sh => 98-remove-packages.sh} | 9 ++- build/README.md | 7 +-- build/copr-helpers.sh | 30 ---------- configs/skel/.config/labwc/autostart | 20 +++++++ configs/systemd/user/labwc-session.target | 11 ++++ iso/bootc.ks | 13 ---- iso/config.toml | 6 -- iso/enable_anaconda.sh | 60 ------------------- iso/iso.toml | 7 ++- scripts/seed-labwc-skel.sh | 31 +++++++++- 14 files changed, 105 insertions(+), 151 deletions(-) rename build/{20-remove-packages.sh => 98-remove-packages.sh} (64%) delete mode 100755 build/copr-helpers.sh create mode 100644 configs/systemd/user/labwc-session.target delete mode 100644 iso/bootc.ks delete mode 100644 iso/config.toml delete mode 100755 iso/enable_anaconda.sh diff --git a/Containerfile b/Containerfile index 07571f2..becea6b 100644 --- a/Containerfile +++ b/Containerfile @@ -45,35 +45,28 @@ RUN --mount=type=bind,from=build-ctx,source=/build/10-repos.sh,target=/tmp/10-re --mount=type=tmpfs,dst=/tmp \ bash /tmp/10-repos.sh && dnf5 clean all -# LAYER 2: Unerwünschte Pakete entfernen (Guard - auf bootc-Basis meist No-Op) -RUN --mount=type=bind,from=build-ctx,source=/build/20-remove-packages.sh,target=/tmp/20-remove-packages.sh \ - --mount=type=cache,dst=/var/cache \ - --mount=type=cache,dst=/var/log \ - --mount=type=tmpfs,dst=/tmp \ - bash /tmp/20-remove-packages.sh - -# LAYER 2b: labwc Desktop-Basis (Compositor, Portale, Audio, Docking-Tools) +# LAYER 2: labwc Desktop-Basis (Compositor, Portale, Audio, Docking-Tools) RUN --mount=type=bind,from=build-ctx,source=/build/20-desktop-labwc.sh,target=/tmp/20-desktop-labwc.sh \ --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ bash /tmp/20-desktop-labwc.sh -# LAYER 2c: Login-Stack (greetd + tuigreet-Fallback + Noctalia-Greeter) +# LAYER 2b: Login-Stack (greetd + tuigreet-Fallback + Noctalia-Greeter) RUN --mount=type=bind,from=build-ctx,source=/build/21-greetd.sh,target=/tmp/21-greetd.sh \ --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ bash /tmp/21-greetd.sh -# LAYER 2d: Noctalia Shell v5 (nativ, aus Fedora-Repos) +# LAYER 2c: Noctalia Shell v5 (nativ, aus Fedora-Repos) RUN --mount=type=bind,from=build-ctx,source=/build/22-noctalia.sh,target=/tmp/22-noctalia.sh \ --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ bash /tmp/22-noctalia.sh -# LAYER 2e: Plymouth Bootsplash (Text-Theme + Initramfs-Rebuild) +# LAYER 2d: Plymouth Bootsplash (Text-Theme + Initramfs-Rebuild) RUN --mount=type=bind,from=build-ctx,source=/build/23-plymouth.sh,target=/tmp/23-plymouth.sh \ --mount=type=bind,from=build-ctx,source=/build/plymouth-theme,target=/tmp/plymouth-theme \ --mount=type=cache,dst=/var/cache \ @@ -142,6 +135,10 @@ COPY configs/applications/bing-wallpaper-toggle.desktop /usr/share/applications/ # sein (world-writable Units warnt systemd lautstark an). COPY --chmod=644 configs/systemd/user/bing-wallpaper.service /usr/lib/systemd/user/bing-wallpaper.service COPY --chmod=644 configs/systemd/user/bing-wallpaper.timer /usr/lib/systemd/user/bing-wallpaper.timer +# Session-Target: zieht graphical-session.target hoch (Details in der Datei). +# Braucht kein enable (wird aus dem labwc-Autostart gestartet, kein [Install] +# noetig). --chmod wie oben: 644, keine world-writable Units. +COPY --chmod=644 configs/systemd/user/labwc-session.target /usr/lib/systemd/user/labwc-session.target # labwc/kanshi-Defaults fuer neue Benutzer (Bestand bleibt via seed-labwc-skel) COPY configs/skel/ /etc/skel/ @@ -169,12 +166,14 @@ RUN set -u; \ id greeter >/dev/null || { echo "FEHLER: Service-User greeter fehlt (21-greetd.sh pruefen)"; exit 1; }; \ grep -q 'pam_gnome_keyring\.so' /etc/pam.d/greetd || { echo "FEHLER: Keyring-PAM in /etc/pam.d/greetd fehlt"; exit 1; }; \ test -f /usr/lib64/security/pam_gnome_keyring.so || { echo "FEHLER: pam_gnome_keyring.so fehlt (Paket gnome-keyring-pam?)"; exit 1; }; \ + test -f /usr/lib64/security/pam_fprintd.so || { echo "FEHLER: pam_fprintd.so fehlt (Paket fprintd-pam?)"; exit 1; }; \ wrapper="$(command -v noctalia-greeter-session || true)"; \ echo "Gefundener Wrapper: ${wrapper}"; \ test -n "${wrapper}" || { echo "FEHLER: noctalia-greeter-session nicht installiert (Terra-Repo/includepkgs pruefen)"; exit 1; }; \ sed -i "s|^command = \".*\"|command = \"${wrapper}\"|" /etc/greetd/config.toml; \ grep -Eq "^command = \"${wrapper}\"" /etc/greetd/config.toml || { echo "FEHLER: Wrapper-Pfad konnte nicht in /etc/greetd/config.toml uebernommen werden"; exit 1; }; \ command -v dbus-run-session >/dev/null || { echo "FEHLER: dbus-run-session fehlt"; exit 1; }; \ + command -v dbus-update-activation-environment >/dev/null || { echo "FEHLER: dbus-update-activation-environment fehlt (Paket dbus-tools?)"; exit 1; }; \ test -x /usr/bin/pkexec || { echo "FEHLER: pkexec fehlt"; exit 1; }; \ test -f /usr/share/wayland-sessions/labwc.desktop || { echo "FEHLER: labwc-Session fehlt"; exit 1; }; \ echo "Greeter-Check OK (${wrapper})" @@ -204,6 +203,18 @@ RUN systemctl enable \ # werden beim Deployment ggf. erneut gesetzt) RUN restorecon -Rv /etc/greetd /etc/skel /usr/share/wayland-sessions 2>/dev/null || true +############################################################################### +# PRE-FINAL CLEANUP +############################################################################### +# Unerwuenschte Pakete entfernen (ABSICHTLICH hier hinten: erst nach allen +# Install-Layern, damit auch spaet hereingezogene Abhaengigkeiten erwischt +# werden). Danach 99-cleanup.sh mit autoremove + Cache-Bereinigung. +RUN --mount=type=bind,from=build-ctx,source=/build/98-remove-packages.sh,target=/tmp/98-remove-packages.sh \ + --mount=type=cache,dst=/var/cache \ + --mount=type=cache,dst=/var/log \ + --mount=type=tmpfs,dst=/tmp \ + bash /tmp/98-remove-packages.sh + ############################################################################### # FINAL CLEANUP ############################################################################### diff --git a/Justfile b/Justfile index c9d46ee..1b4fc72 100644 --- a/Justfile +++ b/Justfile @@ -290,24 +290,6 @@ run-vm-raw $target_image=(registry + "/" + image_name) $tag=default_tag: && (_ru [group('Run Virtual Machine')] run-vm-iso $target_image=(registry + "/" + image_name) $tag=default_tag: && (_run-vm target_image tag "iso" "iso/iso.toml") -# Run a virtual machine using systemd-vmspawn -[group('Run Virtual Machine')] -spawn-vm rebuild="0" type="qcow2" ram="6G": - #!/usr/bin/env bash - - set -euo pipefail - - [ "{{ rebuild }}" -eq 1 ] && echo "Rebuilding the ISO" && just build-vm {{ rebuild }} {{ type }} - - systemd-vmspawn \ - -M "bootc-image" \ - --console=gui \ - --cpus=2 \ - --ram=$(echo {{ ram }}| /usr/bin/numfmt --from=iec) \ - --network-user-mode \ - --vsock=false --pass-ssh-key=false \ - -i ./output/**/*.{{ type }} - # Runs shell check on all Bash scripts lint: #!/usr/bin/env bash diff --git a/build/21-greetd.sh b/build/21-greetd.sh index c89b91e..1aa4bf4 100755 --- a/build/21-greetd.sh +++ b/build/21-greetd.sh @@ -20,10 +20,12 @@ dnf5 install -y \ greetd \ greetd-selinux \ dbus-daemon \ + dbus-tools \ polkit \ tuigreet \ noctalia-greeter \ - fprintd + fprintd \ + fprintd-pam dnf5 clean all diff --git a/build/22-noctalia.sh b/build/22-noctalia.sh index c3fa8c2..85cd2dd 100755 --- a/build/22-noctalia.sh +++ b/build/22-noctalia.sh @@ -14,6 +14,10 @@ echo "Installing Noctalia Shell v5..." # Bei Basis-Wechsel (z.B. F44 -> F45 im Containerfile) kommen automatisch # die neuen Motive mit. Bricht das Schema je, knallt der Build laut # (kein stiller leerer Picker). +# HINWEIS: Bewusst NUR -base + -gnome, NICHT das Meta-Paket fXX-backgrounds: +# Das Meta zieht ALLE Desktop-Varianten herein (-kde/-mate/-budgie/-xfce), +# und -xfce haengt an xfdesktop -> Thunar -> exo/garcon (ganzer XFCE-Baum). +# Auf labwc/Noctalia braucht niemand KDE-/XFCE-Wallpaper. FEDORA_VERSION="$(rpm -E %fedora)" # Nur das Paket selbst: v5 ist nativ (C++/OpenGL ES), Bildformate und @@ -36,7 +40,8 @@ dnf5 install -y \ adw-gtk3-theme \ dconf \ gsettings-desktop-schemas \ - f${FEDORA_VERSION}-backgrounds \ + f${FEDORA_VERSION}-backgrounds-base \ + f${FEDORA_VERSION}-backgrounds-gnome \ fedora-workstation-backgrounds \ gnome-backgrounds diff --git a/build/20-remove-packages.sh b/build/98-remove-packages.sh similarity index 64% rename from build/20-remove-packages.sh rename to build/98-remove-packages.sh index 9b8ddb6..ded80c4 100755 --- a/build/20-remove-packages.sh +++ b/build/98-remove-packages.sh @@ -2,11 +2,14 @@ set -eoux pipefail ############################################################################### -# Bereinigung unerwuenschter Pakete (Guard-Layer) +# Bereinigung unerwuenschter Pakete (laeuft ABSICHTLICH zuletzt, direkt vor +# 99-cleanup.sh): Erst hier sind alle Install-Layer durch, sodass auch +# Pakete erwischt werden, die spaete Layer als Abhaengigkeit hereinziehen +# (z.B. thunar). Fehlende Pakete sind kein Fehler. ############################################################################### # Auf fedora-bootc-Basis gibt es kein Plasma/Firefox/Discover mehr. # Das Skript bleibt als Sicherheitsnetz, falls unerwuenschte Pakete -# ueber Abhaengigkeiten hereinkommen. Fehlende Pakete sind kein Fehler. +# ueber Abhaengigkeiten hereinkommen. echo "Removing unwanted packages (if present)..." dnf5 remove -y \ firefox \ @@ -15,6 +18,8 @@ dnf5 remove -y \ plasma-discover-flatpak \ plasma-discover-notifier \ sddm \ + Thunar \ + thunar-volman \ || true rm -f /etc/xdg/autostart/org.kde.discover.notifier.desktop || true diff --git a/build/README.md b/build/README.md index e18274e..f4a6f39 100644 --- a/build/README.md +++ b/build/README.md @@ -9,19 +9,16 @@ Scripts are named with a number prefix and run in ascending order during the con ## Included Scripts - **`10-repos.sh`** - RPM Fusion (frei + nonfree) + Terra-Repo (fuer noctalia-greeter) -- **`20-remove-packages.sh`** - Guard-Layer: entfernt unerwuenschte Pakete, falls vorhanden (auf fedora-bootc-Basis meist No-Op) - **`20-desktop-labwc.sh`** - labwc-Compositor, XWayland, kanshi, Portale, Pipewire, Docking-Tools (bolt), PolicyKit, Fonts - **`21-greetd.sh`** - greetd + tuigreet-Fallback + Noctalia-Greeter, SDDM/GDM aus, graphical.target - **`22-noctalia.sh`** - Noctalia Shell v5 aus den Fedora-Repos +- **`23-plymouth.sh`** - Plymouth-Bootsplash (Theme "fluffy", Initramfs-Rebuild) - **`30-virt.sh`** - Virtualisierungstools, Distrobox, Toolbox, Micro, etc. - **`40-multimedia.sh`** - Mesa Freeworld, Codecs, FFmpeg, GStreamer, Intel-Media-Treiber - **`50-prepare-flatpak-for-bazaar.sh`** - Laedt Flathub-Repo-Definition fuer Bazaar +- **`98-remove-packages.sh`** - Entfernt unerwuenschte Pakete (ABSICHTLICH ganz hinten: erst nach allen Install-Layern) - **`99-cleanup.sh`** - Finale Bereinigung (autoremove, dnf clean, tmp/log-Caches) -## Hilfsscript - -- **`copr-helpers.sh`** - Funktionen fuer sichere COPR-Repo-Installation (enable, install, disable) - ## Erstellung eigener Scripts ```bash diff --git a/build/copr-helpers.sh b/build/copr-helpers.sh deleted file mode 100755 index e82d4be..0000000 --- a/build/copr-helpers.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/bash -set -euo pipefail - -############################################################################### -# COPR Helper Functions -############################################################################### -# These helper functions follow the @ublue-os/bluefin pattern for managing -# COPR repositories in a safe, isolated manner. -############################################################################### - -copr_install_isolated() { - local copr_name="$1" - shift - local packages=("$@") - - if [[ ${#packages[@]} -eq 0 ]]; then - echo "ERROR: No packages specified for copr_install_isolated" - return 1 - fi - - repo_id="copr:copr.fedorainfracloud.org:${copr_name//\//:}" - - echo "Installing ${packages[*]} from COPR $copr_name (isolated)" - - dnf5 -y copr enable "$copr_name" - dnf5 -y copr disable "$copr_name" - dnf5 -y install --enablerepo="$repo_id" "${packages[@]}" - - echo "Installed ${packages[*]} from $copr_name" -} diff --git a/configs/skel/.config/labwc/autostart b/configs/skel/.config/labwc/autostart index ff4185a..c33fd09 100644 --- a/configs/skel/.config/labwc/autostart +++ b/configs/skel/.config/labwc/autostart @@ -1,6 +1,26 @@ # labwc-Autostart – fluffy-pancake (Noctalia-Zweig) # Tastatur/Locale stehen in ~/.config/labwc/environment. +# >>> fluffy-session-integration >>> +# Session-Integration (MUSS vor allen Apps laufen): User-Units (u.a. +# xdg-desktop-portal) brauchen die Session-Variablen im systemd-Environment +# und ein aktives graphical-session.target. labwc richtet beides NICHT +# selbst ein (anders als GNOME/KDE) - ohne diesen Block bleibt der +# Portal-Dienst mit "Dependency failed" tot (keine Settings-, Datei- und +# Screenshare-Portale). Idempotent, auch bei Parallel-Logins harmlos. +# HINWEIS: Block nur als Ganzes zwischen den Markern pflegen, der +# Seed-Skript (seed-labwc-skel) erkennt ihn an der Marker-Zeile. +{ +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE 2>/dev/null || \ + systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE 2>/dev/null || true +# Ueber das eigene Session-Target: graphical-session.target hat +# RefuseManualStart=yes und kann NICHT direkt gestartet werden. +# labwc-session.target (Requires= darauf) zieht es als Abhaengigkeit +# hoch - das ist erlaubt und erfuellt das Requisite= von xdg-desktop-portal. +systemctl --user start labwc-session.target 2>/dev/null || true +} >/dev/null 2>&1 +# <<< fluffy-session-integration <<< + # 0. XDG-Standardordner (Dokumente, Bilder, Videos, ...) anlegen bzw. # bei Locale-Wechsel umbenennen. Laeuft unter labwc sonst nie # (kein X-Session-Autostart); u.a. braucht Noctalias Wallpaper-Picker diff --git a/configs/systemd/user/labwc-session.target b/configs/systemd/user/labwc-session.target new file mode 100644 index 0000000..9333c6c --- /dev/null +++ b/configs/systemd/user/labwc-session.target @@ -0,0 +1,11 @@ +# labwc-Session-Target – fluffy-pancake (Noctalia-Zweig) +# Zieht graphical-session.target als Abhaengigkeit hoch. Das ist der +# EINZIGE erlaubte Weg: graphical-session.target hat RefuseManualStart=yes, +# kann also nicht direkt gestartet werden. xdg-desktop-portal hat aber ein +# Requisite= darauf und bleibt ohne sie mit "Dependency failed" tot. +# Gestartet wird dieses Target aus dem labwc-Autostart +# (fluffy-session-integration-Block). +[Unit] +Description=labwc graphical session (fluffy-pancake) +Requires=graphical-session.target +After=graphical-session.target diff --git a/iso/bootc.ks b/iso/bootc.ks deleted file mode 100644 index b6c04a0..0000000 --- a/iso/bootc.ks +++ /dev/null @@ -1,13 +0,0 @@ -lang de_DE.UTF-8 -keyboard de -timezone Europe/Berlin --utc - -network --bootproto=dhcp - -bootloader --location=mbr -clearpart --all --initlabel -autopart - -reboot - -bootc install humocs-man.duckdns.org/humocs-man/fluffy-pancake:stable diff --git a/iso/config.toml b/iso/config.toml deleted file mode 100644 index 91cf114..0000000 --- a/iso/config.toml +++ /dev/null @@ -1,6 +0,0 @@ -[customizations.installer.kickstart] -contents = """ -# Sprache und Tastatur festlegen -lang de_DE.UTF-8 -keyboard --vckeymap=de --xlayouts='de' -""" diff --git a/iso/enable_anaconda.sh b/iso/enable_anaconda.sh deleted file mode 100755 index 87fab27..0000000 --- a/iso/enable_anaconda.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash -set -eoux pipefail - -IMAGE_INFO="$(cat /usr/share/ublue-os/image-info.json)" -IMAGE_REF="$(jq -r '."image-ref"' <<<"$IMAGE_INFO")" -IMAGE_TAG="$(jq -r '."image-tag"' <<<"$IMAGE_INFO")" -IMAGE_REF="${IMAGE_REF##*://}" - -# --- Live UX ------------------------------------------------------------- - -tee /usr/share/glib-2.0/schemas/zz-installer.gschema.override <<'EOF' -[org.gnome.shell] -welcome-dialog-last-shown-version='4294967295' -favorite-apps = ['liveinst.desktop', 'org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop'] -EOF - -tee /usr/share/glib-2.0/schemas/zz-installer-power.gschema.override <<'EOF' -[org.gnome.settings-daemon.plugins.power] -sleep-inactive-ac-type='nothing' -sleep-inactive-battery-type='nothing' -sleep-inactive-ac-timeout=0 -sleep-inactive-battery-timeout=0 - -[org.gnome.desktop.session] -idle-delay=uint32 0 -EOF - -glib-compile-schemas /usr/share/glib-2.0/schemas - -rm -f /etc/xdg/autostart/org.gnome.Software.desktop || true - -# --- Installer ----------------------------------------------------------- - -dnf install -y \ - anaconda \ - anaconda-gui \ - anaconda-live \ - libblockdev-btrfs \ - libblockdev-lvm \ - libblockdev-dm \ - firefox - -tee /usr/share/applications/liveinst.desktop <<'EOF' -[Desktop Entry] -Name=Install System -Comment=Install this system to disk -Exec=anaconda -Icon=system-installer -Terminal=false -Type=Application -Categories=System;Installer; -EOF - -update-desktop-database /usr/share/applications || true - -# --- Kickstart ----------------------------------------------------------- - -tee /usr/share/anaconda/interactive-defaults.ks </dev/null || true + sed -i 's|systemctl --user start graphical-session\.target|systemctl --user start labwc-session.target|' "${AUTOSTART}" + echo "migriert: Session-Target in ${AUTOSTART} (Backup .bak)" + else + cp -n "${AUTOSTART}" "${AUTOSTART}.bak" 2>/dev/null || true + BLOCK="$(awk '/>>> fluffy-session-integration >>>/{f=1} f{print} /<<< fluffy-session-integration << "${AUTOSTART}.new" && mv "${AUTOSTART}.new" "${AUTOSTART}" + else + printf '\n%s\n' "${BLOCK}" >> "${AUTOSTART}" + fi + echo "migriert: Session-Integration in ${AUTOSTART} (Backup .bak)" + fi + fi +fi + # Migration: Thunar/Nemo -> Nautilus (Dateimanager-Wechsel). Ersetzt den # Standard-Dateimanager in bestehender mimeapps.list, legt kein Backup # nebenbei an falls bereits eines existiert (cp -n).