Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------- DESKTOP MODIFICATIONS --------------#

[org.gnome.shell]
favorite-apps = ['com.fyralabs.Readymade.desktop', 'org.mozilla.firefox.desktop', 'org.mozilla.Thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'io.github.kolunmi.Bazaar.desktop', 'org.gnome.Software.desktop', 'code.desktop']
favorite-apps = ['org.mozilla.firefox.desktop', 'org.mozilla.Thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'io.github.kolunmi.Bazaar.desktop', 'org.gnome.Software.desktop', 'code.desktop']
enabled-extensions = ['appindicatorsupport@rgcjonas.gmail.com', 'bazaar-integration@kolunmi.github.io', 'blur-my-shell@aunetx', 'dash-to-dock@micxgx.gmail.com', 'gradia-integration@alexandervanhee.github.io', 'gsconnect@andyholmes.github.io', 'logomenu@aryan_k']

[org.gnome.desktop.background]
Expand Down
6 changes: 3 additions & 3 deletions system_files/bluefin/usr/share/ublue-os/just/system.just
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ toggle-devmode:
set -e
IMAGE_INFO_FILE="${IMAGE_INFO_FILE:-/usr/share/ublue-os/image-info.json}"
IMAGE_NAME="$(jq -rc '."image-name"' "${IMAGE_INFO_FILE}")"
IMAGE_REF="$(jq -rc '."image-ref"' "${IMAGE_INFO_FILE}" | sed "s/.*ghcr/ghcr/")"
CURRENT_IMAGE="${IMAGE_REF}:$(jq -rc '."image-tag"' "${IMAGE_INFO_FILE}")"
IMAGE_BASE_NAME="$(cut -f1 -d\- <<< "${IMAGE_NAME}")"
# Use the booted deployment reference so stable-daily images get the correct tag
# Strip transport prefix (ostree-image-signed:docker://, ostree-unverified-registry:, etc.)
CURRENT_IMAGE="$(rpm-ostree status -b --json | jq -rc '.deployments[0]."container-image-reference"' | sed -E 's|^.*://||; s|^[a-z-]+:||')"
Comment on lines +23 to +25
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify robust pipeline/error handling exists in toggle-devmode
file="system_files/bluefin/usr/share/ublue-os/just/system.just"
rg -n -C2 'toggle-devmode:|set -e|set -o pipefail|CURRENT_IMAGE=.*rpm-ostree status -b --json|jq -[a-z]*e' "$file"

Repository: projectbluefin/common

Length of output: 705


🏁 Script executed:

#!/bin/bash
set -euo pipefail
file="system_files/bluefin/usr/share/ublue-os/just/system.just"

# Show the toggle-devmode block around the CURRENT_IMAGE line.
nl -ba "$file" | sed -n '10,80p'

# Find all usages of CURRENT_IMAGE in the file to see whether "null"/empty is handled.
rg -n "CURRENT_IMAGE" "$file"

Repository: projectbluefin/common

Length of output: 108


🏁 Script executed:

#!/bin/bash
set -euo pipefail
file="system_files/bluefin/usr/share/ublue-os/just/system.just"

# Show the toggle-devmode block around the CURRENT_IMAGE line.
cat -n "$file" | sed -n '10,90p'

# Find all usages of CURRENT_IMAGE in the file.
rg -n "CURRENT_IMAGE" "$file"

Repository: projectbluefin/common

Length of output: 4299


Harden toggle-devmode image parsing: enable pipefail and make jq fail on missing/null container-image-reference.

  • toggle-devmode uses set -e but no set -o pipefail, so failures in rpm-ostree/jq won’t reliably stop the pipeline; set +e is then enabled immediately after, allowing a bad CURRENT_IMAGE to flow into bootc switch.
  • jq -rc won’t fail when .deployments[0]."container-image-reference" is null/missing, which can yield null/empty and produce an incorrect NEW_IMAGE.
Suggested fix
 toggle-devmode:
     #!/usr/bin/env bash
     set -e
+    set -o pipefail
@@
-    CURRENT_IMAGE="$(rpm-ostree status -b --json | jq -rc '.deployments[0]."container-image-reference"' | sed -E 's|^.*://||; s|^[a-z-]+:||')"
+    CURRENT_IMAGE="$(rpm-ostree status -b --json | jq -er '.deployments[0]."container-image-reference"' | sed -E 's|^.*://||; s|^[a-z-]+:||')"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@system_files/bluefin/usr/share/ublue-os/just/system.just` around lines 23 -
25, Enable strict pipe failure and make jq error on missing/null image: in the
toggle-devmode block add set -o pipefail alongside set -e, change the jq
invocation that populates CURRENT_IMAGE to use jq -er so it returns non-zero on
missing/null (.deployments[0]."container-image-reference"), and after command
assignation validate that CURRENT_IMAGE is non-empty (exit with error/log)
before proceeding to any bootc/boot switch calls; reference CURRENT_IMAGE,
rpm-ostree, jq and the existing set -e/set +e toggles when locating the code to
modify.

set +e

if grep -q -E -e "dx$" <<< "${IMAGE_NAME}" ; then
Expand Down Expand Up @@ -100,4 +101,3 @@ alias rollback-helper := rebase-helper
[group('System')]
rebase-helper:
@/usr/bin/ublue-rollback-helper

12 changes: 11 additions & 1 deletion system_files/shared/usr/share/ublue-os/just/apps.just
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,18 @@ install-opentabletdriver:
| tar --strip-components=1 -xvzf - -C "${OTD_TMPDIR}"

# https://opentabletdriver.net/Wiki/Documentation/RequiredPermissions
# Clean up any old conflicting rule files before installing new ones
for old_rule in /etc/udev/rules.d/9{0,9}-opentabletdriver.rules; do
[ -f "${old_rule}" ] && sudo rm -f "${old_rule}"
done

sudo cp "${OTD_TMPDIR}/etc/udev/rules.d/70-opentabletdriver.rules" /etc/udev/rules.d/71-opentabletdriver.rules
echo -ne "blacklist hid_uclogic\nblacklist wacom\n" | sudo tee /etc/modprobe.d/blacklist-opentabletdriver.conf
# Load uinput and unload conflicting kernel drivers immediately (takes effect without reboot)
sudo modprobe uinput
sudo rmmod wacom hid_uclogic 2>/dev/null || true
sudo udevadm control --reload-rules
sudo udevadm trigger
rm -rf "${OTD_TMPDIR}"

flatpak --system install -y flathub net.opentabletdriver.OpenTabletDriver
Expand All @@ -43,7 +53,7 @@ install-opentabletdriver:
systemctl enable --user --now opentabletdriver.service
elif [ "${EXIT_CODE}" == 1 ] ; then
echo "Uninstalling OpenTabletDriver..."
sudo rm -f /etc/modprobe.d/blacklist-opentabletdriver.rules /etc/udev/rules.d/71-opentabletdriver.rules
sudo rm -f /etc/modprobe.d/blacklist-opentabletdriver.conf /etc/udev/rules.d/71-opentabletdriver.rules
flatpak --system remove -y flathub net.opentabletdriver.OpenTabletDriver
fi

Expand Down
6 changes: 3 additions & 3 deletions system_files/shared/usr/share/ublue-os/just/default.just
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ clean-system:

flatpak uninstall --unused
rpm-ostree cleanup -bm
if [ -x /home/linuxbrew/.linuxbrew/bin/brew ]; then
brew autoremove
brew cleanup
if [ -x /var/home/linuxbrew/.linuxbrew/bin/brew ]; then
/var/home/linuxbrew/.linuxbrew/bin/brew autoremove
/var/home/linuxbrew/.linuxbrew/bin/brew cleanup
fi

# Show all messages from this boot
Expand Down
Loading