changed philosophy from taking everything from ublue to using it as base solely

This commit is contained in:
humocs-man
2026-03-08 14:53:38 +01:00
parent 16bff87c5c
commit a42f7292d6
4 changed files with 308 additions and 61 deletions
-20
View File
@@ -23,8 +23,6 @@
#
# 1. Context Stage (ctx) - Combines resources from:
# - Local build scripts and custom files
# - @projectbluefin/common - Desktop configuration shared with Aurora
# - @ublue-os/brew - Homebrew integration
#
# 2. Base Image Options:
# - `ghcr.io/ublue-os/silverblue-main:latest` (Fedora and GNOME)
@@ -39,13 +37,6 @@ FROM scratch AS ctx
COPY build /build
COPY custom /custom
# Copy from OCI containers to distinct subdirectories to avoid conflicts
# Note: Renovate can automatically update these :latest tags to SHA-256 digests for reproducibility
COPY --from=ghcr.io/projectbluefin/common:latest /system_files /oci/common
COPY --from=ghcr.io/ublue-os/brew:latest /system_files /oci/brew
# Base Image - GNOME included
#FROM ghcr.io/ublue-os/silverblue-main:latest
## Alternative base images, no desktop included (uncomment to use):
FROM ghcr.io/ublue-os/base-main:latest
@@ -65,16 +56,6 @@ FROM ghcr.io/ublue-os/base-main:latest
# RUN rm /opt && mkdir /opt
### MODIFICATIONS
## Make modifications desired in your image and install packages by modifying the build scripts.
## The following RUN directive mounts the ctx stage which includes:
## - Local build scripts from /build
## - Local custom files from /custom
## - Files from @projectbluefin/common at /oci/common
## - Files from @projectbluefin/branding at /oci/branding
## - Files from @ublue-os/artwork at /oci/artwork
## - Files from @ublue-os/brew at /oci/brew
## Scripts are run in numerical order (10-build.sh, 20-example.sh, etc.)
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
@@ -83,7 +64,6 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build/10-build.sh
COPY files/ /
RUN systemctl preset-all
### LINTING
## Verify final image and contents are correct.
-40
View File
@@ -13,24 +13,6 @@ source /ctx/build/copr-helpers.sh
# Enable nullglob for all glob operations to prevent failures on empty matches
shopt -s nullglob
echo "::group:: Apply Bluefin common system files"
cp -a /ctx/oci/common/. /
echo "::endgroup::"
echo "::group:: Remove Bluefin GNOME branding"
rm -rf /usr/share/backgrounds/bluefin
rm -rf /usr/share/gnome-shell
rm -rf /usr/share/themes/Bluefin*
rm -rf /usr/share/icons/Bluefin*
rm -rf /usr/share/ublue-os/gnome
rm -f /usr/share/glib-2.0/schemas/*bluefin*.gschema.override
echo "::endgroup::"
echo "::group:: Apply Brew integration"
# Bringt Brew-User, PATH, systemd-Units, Brew-Bundle-Mechanik
cp -a /ctx/oci/brew/. /
echo "::endgroup::"
echo "::group:: Install Packages"
# flatpak und just sind im base-main vorhanden, aber wir ergänzen deine Tools
dnf5 install -y \
@@ -49,28 +31,6 @@ dnf5 install -y \
usbredir
echo "::endgroup::"
echo "::group:: Remove Firefox Systempackage"
dnf5 remove -y \
firefox \
firefox-langpacks\* \
htop \
nvtop
echo "::endgroup::"
echo "::group:: Copy Custom Files"
# Brewfiles → werden durch Brew-Bundle.service verarbeitet
mkdir -p /usr/share/ublue-os/homebrew/
cp /ctx/custom/brew/*.Brewfile /usr/share/ublue-os/homebrew/
# Just-Rezepte → werden durch just automatisch gefunden
find /ctx/custom/ujust -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; \
>> /usr/share/ublue-os/just/60-custom.just
# Flatpak-Preinstall-Skripte → werden durch flatpak-preinstall.service ausgeführt
mkdir -p /etc/flatpak/preinstall.d/
cp /ctx/custom/flatpaks/*.preinstall /usr/share/flatpak/preinstall.d/
echo "::endgroup::"
echo "::group:: Installing COSMIC"
copr_install_isolated "ryanabx/cosmic-epoch" \
cosmic-desktop
+299
View File
@@ -0,0 +1,299 @@
#!/usr/bin/env bash
set -euo pipefail
DIALOG=dialog
HEIGHT=20
WIDTH=74
LOG="/var/log/firstboot-setup.log"
WIZARD_DONE="$HOME/.config/cosmic/firstboot.done"
# ----------------------------
# Run only once
# ----------------------------
if [[ -f "$WIZARD_DONE" ]]; then
exit 0
fi
exec > >(tee -a "$LOG") 2>&1
abort() {
clear
echo "Setup abgebrochen."
exit 1
}
ensure_flathub() {
flatpak remote-list --columns=name 2>/dev/null | grep -qx flathub || \
flatpak remote-add --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
}
install_brew_and_setup_path() {
if ! command -v brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
local BREW_PREFIX="/home/linuxbrew/.linuxbrew"
local BREW_BIN="$BREW_PREFIX/bin/brew"
[[ -x "$BREW_BIN" ]] || BREW_BIN="$(command -v brew)"
eval "$("$BREW_BIN" shellenv)"
for rc in "$HOME/.bashrc" "$HOME/.zshrc"; do
[[ -f "$rc" ]] || continue
grep -q 'brew shellenv' "$rc" || {
echo "" >> "$rc"
echo "# Homebrew" >> "$rc"
echo "eval \"\$($BREW_BIN shellenv)\"" >> "$rc"
}
done
}
# ----------------------------
# Welcome
# ----------------------------
$DIALOG --title "Willkommen bei COSMIC" --msgbox \
"Dieser Assistent erleichtert dir den Einstieg,
indem er eine Auswahl gängiger Anwendungen anbietet.
Wichtig:
• Alle hier angebotenen Anwendungen können
jederzeit auch über den COSMICShop installiert
oder entfernt werden.
• Der Wizard ist optional und kann komplett
übersprungen werden.
• Er deckt nur eine Auswahl verbreiteter
Anwendungen ab nicht alles.
Nach Abschluss wird dieser Assistent
nicht erneut angezeigt." \
$HEIGHT $WIDTH || abort
# ----------------------------
# Selections
# ----------------------------
BROWSERS=()
OFFICE=()
GRAPHICS=()
MEDIA=()
AV=()
GAMES=()
MAIL=()
DEV=()
SYSTEM=()
# ----------------------------
# Browser
# ----------------------------
BROWSERS=($($DIALOG --title "Browser" --checklist \
"Webbrowser werden für viele Aufgaben benötigt
(z.B. Dokumentation, WebApps, LoginFlows)." \
$HEIGHT $WIDTH 5 \
"firefox" "Mozilla Firefox (empfohlen)" ON \
"chromium" "Chromium (OpenSource Basis)" OFF \
"brave" "Brave (datenschutzorientiert)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Office
# ----------------------------
OFFICE=($($DIALOG --title "Office & Dokumente" --checklist \
"Anwendungen für Dokumente, PDFs und Büroarbeit:" \
$HEIGHT $WIDTH 7 \
"libreoffice" "LibreOffice (OfficeSuite)" ON \
"onlyoffice" "OnlyOffice (MSOffice‑ähnlich)" OFF \
"collabora" "Collabora Office (LibreOfficebasiert)" OFF \
"papers" "Papers (PDFViewer)" ON \
"simplescan" "Simple Scan (ScannerAnwendung)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Graphics
# ----------------------------
GRAPHICS=($($DIALOG --title "Grafik & Kreativ" --checklist \
"Bildbearbeitung, Illustration und Vektorgrafik:" \
$HEIGHT $WIDTH 5 \
"gimp" "GIMP (Bildbearbeitung)" OFF \
"krita" "Krita (Zeichnen & Illustration)" OFF \
"inkscape" "Inkscape (Vektorgrafiken & SVG)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Media
# ----------------------------
MEDIA=($($DIALOG --title "Medien & Unterhaltung" --checklist \
"Wiedergabe von Audio und Video:" \
$HEIGHT $WIDTH 4 \
"vlc" "VLC Media Player" ON \
"spotify" "Spotify Client" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Audio / Video Editing
# ----------------------------
AV=($($DIALOG --title "Audio & VideoBearbeitung" --checklist \
"Erstellung und Bearbeitung von Audio und Videoinhalten:" \
$HEIGHT $WIDTH 6 \
"shotcut" "Shotcut (einfacher VideoEditor)" OFF \
"kdenlive" "Kdenlive (leistungsfähiger VideoEditor)" OFF \
"audacity" "Audacity (AudioBearbeitung)" OFF \
"ardour" "Ardour (professionelle AudioProduktion)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Games
# ----------------------------
GAMES=($($DIALOG --title "Spiele" --checklist \
"Plattformen für PCSpiele.
Hinweis:
• Für Steam und Lutris ist ein Benutzerkonto erforderlich.
• Es werden keine Spiele automatisch installiert." \
$HEIGHT $WIDTH 4 \
"steam" "Steam (ValvePlattform)" OFF \
"lutris" "Lutris (MultiPlattformLauncher)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Mail
# ----------------------------
MAIL=($($DIALOG --title "EMail" --checklist \
"DesktopEMailProgramme für IMAP/POPKonten:" \
$HEIGHT $WIDTH 5 \
"thunderbird" "Thunderbird (vollständiger StandardClient)" ON \
"geary" "Geary (einfacher, moderner MailClient)" OFF \
"evolution" "Evolution (Business & ExchangeClient)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Development
# ----------------------------
DEV=($($DIALOG --title "Entwicklung" --checklist \
"Werkzeuge für SoftwareEntwicklung:" \
$HEIGHT $WIDTH 4 \
"vscode" "Visual Studio Code" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# System Tools
# ----------------------------
SYSTEM=($($DIALOG --title "SystemWerkzeuge" --checklist \
"Hilfsprogramme für SystemKonfiguration:" \
$HEIGHT $WIDTH 4 \
"flatseal" "Flatseal (FlatpakRechte verwalten)" OFF \
2>&1 >/dev/tty)) || abort
# ----------------------------
# Homebrew
# ----------------------------
USE_BREW=$($DIALOG --title "Homebrew (optional)" --yesno \
"Homebrew ist ein zusätzlicher Paketmanager
für Entwickler und CLIWerkzeuge.
• Installation im Benutzerverzeichnis
• Keine Änderung am Basissystem
• Komplett optional" \
$HEIGHT $WIDTH && echo yes || echo no)
# ----------------------------
# Summary
# ----------------------------
SUMMARY="Browser: ${BROWSERS[*]:-keine}
Office: ${OFFICE[*]:-keine}
Grafik: ${GRAPHICS[*]:-keine}
Medien: ${MEDIA[*]:-keine}
Audio/Video: ${AV[*]:-keine}
Spiele: ${GAMES[*]:-keine}
EMail: ${MAIL[*]:-keine}
Entwicklung: ${DEV[*]:-keine}
System: ${SYSTEM[*]:-keine}
Homebrew: $USE_BREW"
$DIALOG --title "Zusammenfassung" --yesno \
"Bitte bestätige die Installation:\n\n$SUMMARY" \
$HEIGHT $WIDTH || abort
# ----------------------------
# Installation
# ----------------------------
ensure_flathub
(
echo "10"; echo "# Installiere Browser..."
for b in "${BROWSERS[@]}"; do
case "$b" in
firefox) flatpak install -y flathub org.mozilla.firefox ;;
chromium) flatpak install -y flathub org.chromium.Chromium ;;
brave) flatpak install -y flathub com.brave.Browser ;;
esac
done
echo "25"; echo "# Installiere Office..."
[[ " ${OFFICE[*]} " == *" libreoffice "* ]] && flatpak install -y flathub org.libreoffice.LibreOffice
[[ " ${OFFICE[*]} " == *" onlyoffice "* ]] && flatpak install -y flathub org.onlyoffice.desktopeditors
[[ " ${OFFICE[*]} " == *" collabora "* ]] && flatpak install -y flathub com.collabora.CollaboraOffice
[[ " ${OFFICE[*]} " == *" papers "* ]] && flatpak install -y flathub org.gnome.Papers
[[ " ${OFFICE[*]} " == *" simplescan "* ]] && flatpak install -y flathub org.gnome.SimpleScan
echo "40"; echo "# Installiere GrafikTools..."
[[ " ${GRAPHICS[*]} " == *" gimp "* ]] && flatpak install -y flathub org.gimp.GIMP
[[ " ${GRAPHICS[*]} " == *" krita "* ]] && flatpak install -y flathub org.kde.krita
[[ " ${GRAPHICS[*]} " == *" inkscape "* ]] && flatpak install -y flathub org.inkscape.Inkscape
echo "55"; echo "# Installiere Medien..."
[[ " ${MEDIA[*]} " == *" vlc "* ]] && flatpak install -y flathub org.videolan.VLC
[[ " ${MEDIA[*]} " == *" spotify "* ]] && flatpak install -y flathub com.spotify.Client
echo "70"; echo "# Installiere Audio/VideoTools..."
[[ " ${AV[*]} " == *" shotcut "* ]] && flatpak install -y flathub org.shotcut.Shotcut
[[ " ${AV[*]} " == *" kdenlive "* ]] && flatpak install -y flathub org.kde.kdenlive
[[ " ${AV[*]} " == *" audacity "* ]] && flatpak install -y flathub org.audacityteam.Audacity
[[ " ${AV[*]} " == *" ardour "* ]] && flatpak install -y flathub org.ardour.Ardour
echo "85"; echo "# Installiere SpielePlattformen..."
[[ " ${GAMES[*]} " == *" steam "* ]] && flatpak install -y flathub com.valvesoftware.Steam
[[ " ${GAMES[*]} " == *" lutris "* ]] && flatpak install -y flathub net.lutris.Lutris
echo "90"; echo "# Installiere EMailClients..."
[[ " ${MAIL[*]} " == *" thunderbird "* ]] && flatpak install -y flathub org.mozilla.Thunderbird
[[ " ${MAIL[*]} " == *" geary "* ]] && flatpak install -y flathub org.gnome.Geary
[[ " ${MAIL[*]} " == *" evolution "* ]] && flatpak install -y flathub org.gnome.Evolution
echo "95"; echo "# Installiere Entwicklung..."
[[ " ${DEV[*]} " == *" vscode "* ]] && flatpak install -y flathub com.visualstudio.code
echo "97"; echo "# Installiere SystemTools..."
[[ " ${SYSTEM[*]} " == *" flatseal "* ]] && flatpak install -y flathub com.github.tchx84.Flatseal
echo "98"; echo "# Homebrew..."
[[ "$USE_BREW" == yes ]] && install_brew_and_setup_path
echo "100"; echo "# Fertig."
) | $DIALOG --title "Installation läuft" --gauge \
"Bitte warten..." \
$HEIGHT $WIDTH 0
# ----------------------------
# Mark wizard as done
# ----------------------------
mkdir -p "$(dirname "$WIZARD_DONE")"
touch "$WIZARD_DONE"
$DIALOG --title "Fertig" --msgbox \
"Die Einrichtung ist abgeschlossen.
Weitere Anwendungen kannst du jederzeit
über den COSMICShop installieren.
Updates:
• Installierte Anwendungen werden über den COSMICShop aktualisiert.
• HomebrewPakete können mit folgendem Befehl aktualisiert werden:
>>>>> brew update && brew upgrade <<<<<
Der SetupWizard wird nicht erneut gestartet." \
$HEIGHT $WIDTH
clear
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=COSMIC First Boot Setup
Exec=/usr/libexec/cosmic/firstboot-setup.sh
OnlyShowIn=COSMIC;
X-GNOME-Autostart-enabled=true
NoDisplay=true