diff --git a/.gitignore b/.gitignore index 8703795..ec8134b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ cosign.key cosign.private /Containerfile +/Containerfile.* diff --git a/files/scripts/packages.sh b/files/scripts/packages.sh new file mode 100644 index 0000000..b86db40 --- /dev/null +++ b/files/scripts/packages.sh @@ -0,0 +1,57 @@ +#!/usr/bin/bash + +set -ouex pipefail + +BLUEFIN_IMAGE_NAME=$([ "$BASE_IMAGE_NAME" == "bazzite-gnome" ] && echo "silverblue" || echo "kinoite") + +# build list of all packages requested for inclusion +INCLUDED_PACKAGES=($(jq -r "[(.all.include | (select(.all != null).all)[]), \ + (.all.include | (select(.\"$BASE_IMAGE_NAME\" != null).\"$BASE_IMAGE_NAME\")[]), \ + (.all.include | (select(.dx != null).dx)[]), \ + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (select(.all != null).all)[]), \ + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (select(.\"$BASE_IMAGE_NAME\" != null).\"$BASE_IMAGE_NAME\")[]), + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (select(.dx != null).dx)[])] \ + | sort | unique[]" ../bluefin/packages.json)) + +# build list of all packages requested for exclusion +EXCLUDED_PACKAGES=($(jq -r "[(.all.exclude | (select(.all != null).all)[]), \ + (.all.exclude | (select(.\"$BASE_IMAGE_NAME\" != null).\"$BASE_IMAGE_NAME\")[]), \ + (.all.exclude | (select(.dx != null).dx)[]), \ + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (select(.all != null).all)[]), \ + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (select(.\"$BASE_IMAGE_NAME\" != null).\"$BASE_IMAGE_NAME\")[]), + (select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (select(.dx != null).dx)[])] \ + | sort | unique[]" ../bluefin/packages.json)) + +# store a list of RPMs installed on the image +INSTALLED_EXCLUDED_PACKAGES=() + +# ensure exclusion list only contains packages already present on image +if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then + INSTALLED_EXCLUDED_PACKAGES=($(rpm -qa --queryformat='%{NAME} ' ${EXCLUDED_PACKAGES[@]})) +fi + +# simple case to install where no packages need excluding +if [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#INSTALLED_EXCLUDED_PACKAGES[@]}" -eq 0 ]]; then + rpm-ostree install \ + ${INCLUDED_PACKAGES[@]} + +# install/excluded packages both at same time +elif [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#INSTALLED_EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then + rpm-ostree override remove \ + ${INSTALLED_EXCLUDED_PACKAGES[@]} \ + $(printf -- "--install=%s " ${INCLUDED_PACKAGES[@]}) +else + echo "No packages to install." +fi + +# check if any excluded packages are still present +# (this can happen if an included package pulls in a dependency) +if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then + INSTALLED_EXCLUDED_PACKAGES=($(rpm -qa --queryformat='%{NAME} ' ${EXCLUDED_PACKAGES[@]})) +fi + +# remove any excluded packages which are still present on image +if [[ "${#INSTALLED_EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then + rpm-ostree override remove \ + ${INSTALLED_EXCLUDED_PACKAGES[@]} +fi diff --git a/recipes/bazzite-dx.yml b/recipes/bazzite-dx.yml index 2b98469..139256d 100755 --- a/recipes/bazzite-dx.yml +++ b/recipes/bazzite-dx.yml @@ -14,14 +14,10 @@ modules: files: - source: bluefin/system_files/shared/usr/bin destination: /usr/bin - - source: bluefin/system_files/shared/usr/etc - destination: /usr/etc - source: bluefin/system_files/shared/usr/libexec destination: /usr/libexec - source: bluefin/system_files/shared/usr/lib/tmpfiles.d destination: /usr/lib/tmpfiles.d - - source: bluefin/system_files/shared/usr/share/ublue-os/bluefin - destination: /usr/share/ublue-os/bluefin - source: bluefin/system_files/shared/usr/share/ublue-os/bluefin-cli destination: /usr/share/ublue-os/bluefin-cli - source: bluefin/system_files/shared/usr/share/ublue-os/homebrew @@ -32,10 +28,6 @@ modules: destination: /usr/share/ublue-os/ublue-os.jsonc - source: bluefin/system_files/kinoite/usr/bin destination: /usr/bin - - source: bluefin/system_files/kinoite/usr/etc/flatpak - destination: /usr/etc/flatpak - - source: bluefin/system_files/kinoite/usr/etc/profile.d/ksshaskpass.sh - destination: /usr/etc/profile.d - source: bluefin/system_files/kinoite/usr/share/applications destination: /usr/share/applications - source: bluefin/system_files/kinoite/usr/share/kglobalaccel @@ -53,13 +45,14 @@ modules: # Install KDE Packages - type: rpm-ostree install: - - skanpage - - libadwaita-qt5 - - libadwaita-qt6 - kde-runtime-docs - kdenetwork-filesharing - # - kdeplasma-addons Already included in Bazzite + # - kdeplasma-addons # Already included in bazzite + - kdialog + - libadwaita-qt5 + - libadwaita-qt6 - plasma-wallpapers-dynamic + - skanpage remove: - krfb - krfb-libs diff --git a/recipes/bazzite-gnome-dx.yml b/recipes/bazzite-gnome-dx.yml index 27be363..9f345a4 100755 --- a/recipes/bazzite-gnome-dx.yml +++ b/recipes/bazzite-gnome-dx.yml @@ -10,26 +10,24 @@ image-version: latest # latest is also supported if you want new updates ASAP # module configuration, executed in order # you can include multiple instances of the same module modules: + - type: containerfile + snippets: + - ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-bazzite-gnome}" + - type: files files: - source: bluefin/system_files/shared/usr/bin destination: /usr/bin - - source: bluefin/system_files/shared/usr/etc - destination: /usr/etc - source: bluefin/system_files/shared/usr/libexec destination: /usr/libexec - source: bluefin/system_files/shared/usr/lib/tmpfiles.d destination: /usr/lib/tmpfiles.d - - source: bluefin/system_files/shared/usr/share/ublue-os/bluefin - destination: /usr/share/ublue-os/bluefin - source: bluefin/system_files/shared/usr/share/ublue-os/bluefin-cli destination: /usr/share/ublue-os/bluefin-cli - source: bluefin/system_files/shared/usr/share/ublue-os/homebrew destination: /usr/share/ublue-os/homebrew - source: bluefin/system_files/shared/usr/share/ublue-os/quadlets destination: /usr/share/ublue-os/quadlets - - source: bluefin/system_files/silverblue/usr/etc/flatpak - destination: /usr/etc/flatpak # Avoid Bluefin branding # - source: bluefin/system_files/silverblue/usr/share: # destination: /usr/share @@ -44,19 +42,24 @@ modules: # Install GNOME packages - type: rpm-ostree install: - - simple-scan + - cryfs - gnome-shell-extension-appindicator - gnome-shell-extension-blur-my-shell - # - gnome-shell-extension-caffeine # Already in Bazzite + # - gnome-shell-extension-caffeine - gnome-shell-extension-dash-to-dock - # - gnome-shell-extension-gsconnect # Already in Bazzite - - libgda-sqlite + # - gnome-shell-extension-gsconnect + # - gnome-shell-extension-logo-menu + - gnome-shell-extension-search-light + - gnome-shell-extension-tailscale-gnome-qs - libgda + - libgda-sqlite - libratbag-ratbagd - nautilus-gsconnect + - nautilus-open-any-terminal - openssh-askpass + - simple-scan - yaru-theme - - nautilus-open-any-terminal + - zenity remove: - gnome-extensions-app - gnome-software-rpm-ostree diff --git a/recipes/common_recipe.yml b/recipes/common_recipe.yml index 3d0f3b2..0b73c6e 100755 --- a/recipes/common_recipe.yml +++ b/recipes/common_recipe.yml @@ -14,6 +14,7 @@ modules: - type: script scripts: - copr-repos.sh + # - packages.sh # Install packages from Bluefin and Bluefin DX - type: rpm-ostree @@ -25,28 +26,43 @@ modules: - https://copr.fedorainfracloud.org/coprs/karmab/kcli/repo/fedora-%OS_VERSION%/karmab-kcli-fedora-%OS_VERSION%.repo - https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-%OS_VERSION%/atim-ubuntu-fonts-fedora-%OS_VERSION%.repo - https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-%OS_VERSION%/hikariknight-looking-glass-kvmfr-fedora-%OS_VERSION%.repo + - https://copr.fedorainfracloud.org/coprs/ganto/umoci/repo/fedora-%OS_VERSION%/ganto-umoci-fedora-%OS_VERSION%.repo install: # Base Bluefin packages + - adcli - bash-color-prompt - bcache-tools + - borgbackup + - bootc - evtest - epson-inkjet-printer-escpr - epson-inkjet-printer-escpr2 - fastfetch - fish - firewall-config + - foo2zjs + - freeipa-client + - fuse-encfs - gcc + - git-credential-libsecret - glow - gum - hplip + - krb5-workstation - ifuse + - input-leap - input-remapper + - jetbrains-mono-fonts-all - libimobiledevice - libxcrypt-compat + - libsss_autofs - lm_sensors - make + - mesa-libGLU - nerd-fonts + - oddjob-mkhomedir + - opendyslexic-fonts - playerctl - printer-driver-brlaser - pulseaudio-utils @@ -58,21 +74,32 @@ modules: - samba-winbind-clients - samba-winbind-modules - samba + - setools-console + - solaar + - sssd-ad + - sssd-ipa + - sssd-krb5 + - sssd-nfs-idmap - stress-ng + - tailscale - tmux - usbmuxd - wireguard-tools + - xprop - wl-clipboard - zsh # DX Bluefin packages - adobe-source-code-pro-fonts - android-tools + - bcc + - bpftop + - bpftrace - cascadia-code-fonts + - cockpit-bridge - cockpit-machines - cockpit-networkmanager - cockpit-ostree - - cockpit-pcp - cockpit-podman - cockpit-selinux - cockpit-storaged @@ -94,13 +121,13 @@ modules: - incus - incus-agent - iotop - - jetbrains-mono-fonts-all # - kcli - libvirt + - libvirt-nss - lxc - - lxd-agent - - lxd - mozilla-fira-mono-fonts + - nicstat + - numactl - p7zip-plugins - p7zip - podman-compose @@ -117,21 +144,28 @@ modules: - qemu-user-binfmt - qemu-user-static - qemu - # - rocm-hip Already included in Bazzite + # - rocm-hip # - rocm-opencl + - rocm-smi + - sysprof + - tiptop + - trace-cmd - ubuntu-family-fonts - udica + - umoci - virt-manager - virt-viewer + - virt-v2v + - ydotool # Install Starhip and activate RPM Fusion repos - type: script snippets: - "find ${CONFIG_DIRECTORY}/bluefin/build_files -type f -exec chmod +x {} \\;" # Make bluefin scripts executable scripts: - - ../bluefin/build_files/shared/image-info.sh + - ../bluefin/build_files/image-info.sh - fetch-install.sh - - ../bluefin/build_files/base/fetch-quadlets.sh + - ../bluefin/build_files/fetch-quadlets.sh # alternatives cannot create symlinks on its own during a container build - type: script