Skip to content

Commit

Permalink
chore(aurora, removal): remove aurora from the build system (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz authored Dec 8, 2024
1 parent 0c40000 commit a3c2b03
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 172 deletions.
18 changes: 3 additions & 15 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,7 @@ build image="bluefin" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="
image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }})

# Base Image
if [[ "${image}" =~ bluefin ]]; then
base_image_name="silverblue"
elif [[ "${image}" =~ aurora ]]; then
base_image_name="kinoite"
fi
base_image_name="silverblue"

# Target
if [[ "${image}" =~ dx ]]; then
Expand Down Expand Up @@ -315,11 +311,7 @@ rechunk image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0":

# Cleanup Space during Github Action
if [[ "{{ ghcr }}" == "1" ]]; then
if [[ "${image_name}" =~ bluefin ]]; then
base_image_name=silverblue-main
elif [[ "${image_name}" =~ aurora ]]; then
base_image_name=kinoite-main
fi
base_image_name=silverblue-main
if [[ "${tag}" =~ stable ]]; then
tag="stable-daily"
fi
Expand Down Expand Up @@ -570,11 +562,7 @@ build-iso image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0":
iso_build_args+=(IMAGE_TAG="${tag}")
iso_build_args+=(ISO_NAME="/github/workspace/${build_dir}/${image_name}-${tag}.iso")
iso_build_args+=(SECURE_BOOT_KEY_URL="https://github.com/ublue-os/akmods/raw/main/certs/public_key.der")
if [[ "${image_name}" =~ bluefin ]]; then
iso_build_args+=(VARIANT="Silverblue")
else
iso_build_args+=(VARIANT="Kinoite")
fi
iso_build_args+=(VARIANT="Silverblue")
iso_build_args+=(VERSION="${FEDORA_VERSION}")
iso_build_args+=(WEB_UI="false")

Expand Down
6 changes: 0 additions & 6 deletions build_files/base/00-image-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ CODE_NAME="Archaeopteryx"
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME"

# Aurora
if [[ "${BASE_IMAGE_NAME}" =~ kinoite ]]; then
IMAGE_PRETTY_NAME="Aurora"
HOME_URL="https://getaurora.dev/"
fi

# Image Flavor
image_flavor="main"
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
Expand Down
11 changes: 0 additions & 11 deletions build_files/base/01-build-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ for repo in "${repos[@]}"; do
fi
done

if grep -q "kinoite" <<<"${BASE_IMAGE_NAME}"; then
rpm-ostree override replace \
--experimental \
--from repo=updates \
qt6-qtbase \
qt6-qtbase-common \
qt6-qtbase-mysql \
qt6-qtbase-gui ||
true
fi

rpm-ostree override replace \
--experimental \
--from repo=updates \
Expand Down
21 changes: 4 additions & 17 deletions build_files/base/05-override-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@
set -eoux pipefail

# Patched shells
if [[ "${BASE_IMAGE_NAME}" =~ silverblue ]]; then
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
gnome-shell
elif [[ "${BASE_IMAGE_NAME}" =~ kinoite ]]; then
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
kf6-kio-doc \
kf6-kio-widgets-libs \
kf6-kio-core-libs \
kf6-kio-widgets \
kf6-kio-file-widgets \
kf6-kio-core \
kf6-kio-gui
fi
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
gnome-shell

# GNOME Triple Buffering
if [[ "${BASE_IMAGE_NAME}" =~ silverblue && "${FEDORA_MAJOR_VERSION}" -lt "41" ]]; then
Expand Down
135 changes: 41 additions & 94 deletions build_files/base/07-base-image-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,52 @@

set -ouex pipefail

if [[ "${BASE_IMAGE_NAME}" = "kinoite" ]]; then
# Branding for flatpak manager
sed -i 's/Bluefin/Aurora/' /usr/libexec/ublue-flatpak-manager

# Restore x11 for Nvidia Images
if [[ "${FEDORA_MAJOR_VERSION}" -eq "40" ]]; then
rpm-ostree install plasma-workspace-x11
fi

# Branding for Images
ln -sf ../places/distributor-logo.svg /usr/share/icons/hicolor/scalable/apps/start-here.svg
ln -sf /usr/share/wallpapers/aurora-wallpaper-1/contents/images/15392x8616.jpg /usr/share/backgrounds/default.png
ln -sf /usr/share/wallpapers/aurora-wallpaper-1/contents/images/15392x8616.jpg /usr/share/backgrounds/default-dark.png
ln -sf aurora.xml /usr/share/backgrounds/default.xml

# Favorites in Kickoff
sed -i '/<entry name="launchers" type="StringList">/,/<\/entry>/ s/<default>[^<]*<\/default>/<default>preferred:\/\/browser,applications:org.gnome.Ptyxis.desktop,applications:org.kde.discover.desktop,preferred:\/\/filemanager<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
sed -i '/<entry name="favorites" type="StringList">/,/<\/entry>/ s/<default>[^<]*<\/default>/<default>preferred:\/\/browser,systemsettings.desktop,org.kde.dolphin.desktop,org.kde.kate.desktop,org.gnome.Ptyxis.desktop,org.kde.discover.desktop<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml

# Ptyxis Terminal
sed -i 's@\[Desktop Action new-window\]@\[Desktop Action new-window\]\nX-KDE-Shortcuts=Ctrl+Alt+T@g' /usr/share/applications/org.gnome.Ptyxis.desktop
sed -i 's@Exec=ptyxis@Exec=kde-ptyxis@g' /usr/share/applications/org.gnome.Ptyxis.desktop
sed -i 's@Keywords=@Keywords=konsole;console;@g' /usr/share/applications/org.gnome.Ptyxis.desktop
cp /usr/share/applications/org.gnome.Ptyxis.desktop /usr/share/kglobalaccel/org.gnome.Ptyxis.desktop
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.kde.konsole.desktop

# Rebrand to Aurora
sed -i 's@Bluefin@Aurora@g' /usr/share/applications/system-update.desktop
sed -i 's@Bluefin@Aurora@g' /usr/share/ublue-os/motd/tips/10-tips.md
sed -i 's@Bluefin@Aurora@g' /usr/libexec/ublue-flatpak-manager

rm -f /etc/profile.d/gnome-ssh-askpass.{csh,sh} # This shouldn't be pulled in
rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop
systemctl enable kde-sysmonitor-workaround.service

# Get Default Font since font fallback doesn't work
curl --retry 3 --output-dir /tmp -LO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FiraCode.zip
mkdir -p /usr/share/fonts/fira-nf
unzip /tmp/FiraCode.zip -d /usr/share/fonts/fira-nf
fc-cache -f /usr/share/fonts/fira-nf

# Test aurora gschema override for errors. If there are no errors, proceed with compiling aurora gschema, which includes setting overrides.
mkdir -p /tmp/aurora-schema-test
find /usr/share/glib-2.0/schemas/ -type f ! -name "*.gschema.override" -exec cp {} /tmp/aurora-schema-test/ \;
cp /usr/share/glib-2.0/schemas/zz0-aurora-modifications.gschema.override /tmp/aurora-schema-test/
echo "Running error test for aurora gschema override. Aborting if failed."
glib-compile-schemas --strict /tmp/aurora-schema-test
echo "Compiling gschema to include aurora setting overrides"
glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null

elif [[ "${BASE_IMAGE_NAME}" = "silverblue" ]]; then

# Remove desktop entries
if [[ -f /usr/share/applications/gnome-system-monitor.desktop ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nHidden=true@g' /usr/share/applications/gnome-system-monitor.desktop
fi
if [[ -f /usr/share/applications/org.gnome.SystemMonitor.desktop ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nHidden=true@g' /usr/share/applications/org.gnome.SystemMonitor.desktop
fi
# Remove desktop entries
if [[ -f /usr/share/applications/gnome-system-monitor.desktop ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nHidden=true@g' /usr/share/applications/gnome-system-monitor.desktop
fi
if [[ -f /usr/share/applications/org.gnome.SystemMonitor.desktop ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nHidden=true@g' /usr/share/applications/org.gnome.SystemMonitor.desktop
fi

# Add Mutter experimental-features
MUTTER_EXP_FEATS="'scale-monitor-framebuffer', 'xwayland-native-scaling'"
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
MUTTER_EXP_FEATS="'kms-modifiers', ${MUTTER_EXP_FEATS}"
fi
tee /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override << EOF
# Add Mutter experimental-features
MUTTER_EXP_FEATS="'scale-monitor-framebuffer', 'xwayland-native-scaling'"
if [[ "${IMAGE_NAME}" =~ nvidia ]]; then
MUTTER_EXP_FEATS="'kms-modifiers', ${MUTTER_EXP_FEATS}"
fi
tee /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override << EOF
[org.gnome.mutter]
experimental-features=[${MUTTER_EXP_FEATS}]
EOF

# GNOME Terminal is replaced with Ptyxis in F41+
# Make schema valid on GNOME <47 which do not contain the accent-color key or xwayland-native-scaling mutter feature
if [[ "${FEDORA_MAJOR_VERSION}" -lt "41" ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.gnome.Terminal.desktop
sed -i 's@accent-color="slate"@@g' /usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override
sed -i 's@'", "\''xwayland-native-scaling'\''@@g' /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override
fi

# Create symlinks from old to new wallpaper names for backwards compatibility
ln -s "/usr/share/backgrounds/bluefin/01-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-winter-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/04-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-spring-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/08-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-summer-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/11-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-autumn-dynamic.xml"
ln -s "/usr/share/backgrounds/xe_clouds.jxl" "/usr/share/backgrounds/xe_clouds.jpeg"
ln -s "/usr/share/backgrounds/xe_foothills.jxl" "/usr/share/backgrounds/xe_foothills.jpeg"
ln -s "/usr/share/backgrounds/xe_space_needle.jxl" "/usr/share/backgrounds/xe_space_needle.jpeg"
ln -s "/usr/share/backgrounds/xe_sunset.jxl" "/usr/share/backgrounds/xe_sunset.jpeg"

# Test bluefin gschema override for errors. If there are no errors, proceed with compiling bluefin gschema, which includes setting overrides.
mkdir -p /tmp/bluefin-schema-test
find /usr/share/glib-2.0/schemas/ -type f ! -name "*.gschema.override" -exec cp {} /tmp/bluefin-schema-test/ \;
cp /usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override /tmp/bluefin-schema-test/
cp /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override /tmp/bluefin-schema-test/
echo "Running error test for bluefin gschema override. Aborting if failed."
# We should ideally refactor this to handle multiple GNOME version schemas better
glib-compile-schemas --strict /tmp/bluefin-schema-test
echo "Compiling gschema to include bluefin setting overrides"
glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null
# GNOME Terminal is replaced with Ptyxis in F41+
# Make schema valid on GNOME <47 which do not contain the accent-color key or xwayland-native-scaling mutter feature
if [[ "${FEDORA_MAJOR_VERSION}" -lt "41" ]]; then
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.gnome.Terminal.desktop
sed -i 's@accent-color="slate"@@g' /usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override
sed -i 's@'", "\''xwayland-native-scaling'\''@@g' /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override
fi

# Create symlinks from old to new wallpaper names for backwards compatibility
ln -s "/usr/share/backgrounds/bluefin/01-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-winter-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/04-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-spring-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/08-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-summer-dynamic.xml"
ln -s "/usr/share/backgrounds/bluefin/11-bluefin.xml" "/usr/share/backgrounds/bluefin/bluefin-autumn-dynamic.xml"
ln -s "/usr/share/backgrounds/xe_clouds.jxl" "/usr/share/backgrounds/xe_clouds.jpeg"
ln -s "/usr/share/backgrounds/xe_foothills.jxl" "/usr/share/backgrounds/xe_foothills.jpeg"
ln -s "/usr/share/backgrounds/xe_space_needle.jxl" "/usr/share/backgrounds/xe_space_needle.jpeg"
ln -s "/usr/share/backgrounds/xe_sunset.jxl" "/usr/share/backgrounds/xe_sunset.jpeg"

# Test bluefin gschema override for errors. If there are no errors, proceed with compiling bluefin gschema, which includes setting overrides.
mkdir -p /tmp/bluefin-schema-test
find /usr/share/glib-2.0/schemas/ -type f ! -name "*.gschema.override" -exec cp {} /tmp/bluefin-schema-test/ \;
cp /usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override /tmp/bluefin-schema-test/
cp /usr/share/glib-2.0/schemas/zz1-bluefin-modifications-mutter-exp-feats.gschema.override /tmp/bluefin-schema-test/
echo "Running error test for bluefin gschema override. Aborting if failed."
# We should ideally refactor this to handle multiple GNOME version schemas better
glib-compile-schemas --strict /tmp/bluefin-schema-test
echo "Compiling gschema to include bluefin setting overrides"
glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null

# Watermark for Plymouth
cp /usr/share/plymouth/themes/spinner/{"$BASE_IMAGE_NAME"-,}watermark.png
cp /usr/share/plymouth/themes/spinner/{silverblue-,}watermark.png
7 changes: 1 addition & 6 deletions build_files/shared/build-dx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ sysctl -p
/ctx/build_files/dx/04-override-install-dx.sh

# Branding Changes
if test "$BASE_IMAGE_NAME" = "silverblue"; then
sed -i '/^PRETTY_NAME/s/Bluefin/Bluefin-dx/' /usr/lib/os-release
elif test "$BASE_IMAGE_NAME" = "kinoite"; then
sed -i '/^PRETTY_NAME/s/Aurora/Aurora-dx/' /usr/lib/os-release
sed -i 's/Aurora/Aurora-DX/' /usr/share/kde-settings/kde-profile/default/xdg/kcm-about-distrorc
fi
sed -i '/^PRETTY_NAME/s/Bluefin/Bluefin-dx/' /usr/lib/os-release

# Systemd and Disable Repos
/ctx/build_files/dx/09-cleanup-dx.sh
Expand Down
23 changes: 0 additions & 23 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@
"zenity"

],
"kinoite": [
"kde-runtime-docs",
"kdenetwork-filesharing",
"kdeplasma-addons",
"kdialog",
"libadwaita-qt5",
"libadwaita-qt6",
"plasma-wallpapers-dynamic",
"skanpage"
],
"dx": [
"adobe-source-code-pro-fonts",
"android-tools",
Expand Down Expand Up @@ -179,11 +169,6 @@
"gnome-software-rpm-ostree",
"gnome-terminal-nautilus"
],
"kinoite": [
"krfb",
"krfb-libs",
"plasma-welcome"
],
"dx": []
}
},
Expand All @@ -201,7 +186,6 @@
"exclude": {
"all": [],
"silverblue": [],
"kinoite": [],
"dx": []
}
},
Expand All @@ -210,18 +194,11 @@
"all": [
"google-noto-fonts-all"
],
"kinoite": [
"ptyxis"
],
"silverblue": []
},
"exclude": {
"all": [],
"silverblue": [],
"kinoite": [
"plasma-welcome",
"plasma-welcome-fedora"
],
"dx": []
}
}
Expand Down

0 comments on commit a3c2b03

Please sign in to comment.