Skip to content

Commit

Permalink
chore: switch from ublue-update to uupd as default automatic updater
Browse files Browse the repository at this point in the history
This should remove all references to ublue-updater and it's files from the system

We need to be very cautious about this PR since it might break automatic updates for people. And that would suck very much.
  • Loading branch information
tulilirockz committed Jan 11, 2025
1 parent fad728f commit 8b2264d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 41 deletions.
6 changes: 0 additions & 6 deletions build_files/base/05-override-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,9 @@ echo 'eval "$(starship init bash)"' >> /etc/bashrc
# Topgrade Install
pip install --prefix=/usr topgrade

# Install ublue-update -- breaks with packages.json due to missing topgrade
rpm-ostree install ublue-update

# Consolidate Just Files
find /tmp/just -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just

# Move over ublue-update config
mv -f /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml

# Register Fonts
fc-cache -f /usr/share/fonts/ubuntu
fc-cache -f /usr/share/fonts/inter
Expand Down
2 changes: 1 addition & 1 deletion build_files/base/17-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ systemctl enable rpm-ostree-countme.service
systemctl enable tailscaled.service
systemctl enable dconf-update.service
systemctl --global enable ublue-flatpak-manager.service
systemctl enable ublue-update.timer
systemctl enable uupd.timer
systemctl enable ublue-system-setup.service
systemctl enable ublue-guest-user.service
systemctl enable brew-setup.service
Expand Down
1 change: 0 additions & 1 deletion build_files/shared/build-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mkdir -p /var/lib/alternatives
# Copy Files to Container
cp -r /ctx/just /tmp/just
cp /ctx/packages.json /tmp/packages.json
cp /ctx/system_files/shared/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml
rsync -rvK /ctx/system_files/shared/ /
rsync -rvK /ctx/system_files/"${BASE_IMAGE_NAME}"/ /
echo "::endgroup::"
Expand Down
1 change: 1 addition & 0 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"tailscale",
"tmux",
"usbmuxd",
"uupd",
"wireguard-tools",
"xprop",
"wl-clipboard",
Expand Down
7 changes: 0 additions & 7 deletions system_files/shared/etc/ublue-update/ublue-update.toml

This file was deleted.

10 changes: 4 additions & 6 deletions system_files/shared/usr/share/ublue-os/just/10-update.just
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ alias upgrade := update
# Update system, flatpaks, and containers all at once
update:
#!/usr/bin/bash
TOPGRADE_CONFIG="/usr/share/ublue-os/topgrade"
/usr/bin/grep "^LockLayering=true" /etc/rpm-ostreed.conf &>/dev/null && TOPGRADE_CONFIG="${TOPGRADE_CONFIG}-bootc"
/usr/bin/topgrade --config "${TOPGRADE_CONFIG}.toml" --keep
pkexec uupd --log-level debug

alias auto-update := toggle-updates

Expand All @@ -16,7 +14,7 @@ toggle-updates ACTION="prompt":
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
CURRENT_STATE="Disabled"
if systemctl is-enabled ublue-update.timer | grep -q enabled; then
if systemctl is-enabled uupd.timer | grep -q enabled; then
CURRENT_STATE="Enabled"
fi
OPTION={{ ACTION }}
Expand All @@ -32,9 +30,9 @@ toggle-updates ACTION="prompt":
exit 0
fi
if [ "${OPTION,,}" == "enable" ]; then
sudo systemctl enable ublue-update.timer
sudo systemctl enable uupd.timer
elif [ "${OPTION,,}" == "disable" ]; then
sudo systemctl disable ublue-update.timer
sudo systemctl disable uupd.timer
fi

alias changelog := changelogs
Expand Down
10 changes: 0 additions & 10 deletions system_files/shared/usr/share/ublue-os/topgrade-bootc.toml

This file was deleted.

10 changes: 0 additions & 10 deletions system_files/shared/usr/share/ublue-os/topgrade.toml

This file was deleted.

0 comments on commit 8b2264d

Please sign in to comment.