Skip to content

Commit

Permalink
Updates to fix issues with 3.7.0 bluefin release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparkrai committed Oct 28, 2024
1 parent d101dd6 commit 0ca9084
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cosign.key
cosign.private
/Containerfile
/Containerfile.*
57 changes: 57 additions & 0 deletions files/scripts/packages.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 5 additions & 12 deletions recipes/bazzite-dx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
25 changes: 14 additions & 11 deletions recipes/bazzite-gnome-dx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
48 changes: 41 additions & 7 deletions recipes/common_recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ modules:
- type: script
scripts:
- copr-repos.sh
# - packages.sh

# Install packages from Bluefin and Bluefin DX
- type: rpm-ostree
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0ca9084

Please sign in to comment.