Open Malix-Labs opened 4 months ago
This is starting to strongly get into my workflow, is there a way to break the automatic download script in some other ways?
Let me try to help.
By looking at your first screenshot, it seems you have classic Silverblue automatic updates configured. The second line of rpm-ostree status
will show something like AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 4min 22s ago
You might need to set AutomaticUpdatePolicy to none:
cat /usr/etc/rpm-ostreed.conf
, does the output look like this ?:
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# For option meanings, see rpm-ostreed.conf(5).
[Daemon] AutomaticUpdatePolicy=none
- Do `cat /etc/rpm-ostreed.conf`, is the output different ? Does it at least contain the line `AutomaticUpdatePolicy=stage` ?
- If yes then you have two options:
1. you can just do `sudo cp -f /usr/etc/rpm-ostreed.conf /etc/rpm-ostreed.conf` and overwrite it, that should get you the 'default' config
2. or do `sudo nano /etc/rpm-ostreed.conf` and change `AutomaticUpdatePolicy=stage` to `AutomaticUpdatePolicy=none` manually.
- Once that is done, do:
systemctl reload rpm-ostreed systemctl disable rpm-ostreed-automatic.timer --now
- Now if everything worked, the output of `rpm-ostree status` should no longer show something like `AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 4min 22s ago` and classic auto updates are therefore turned off.
Looking at the ujust script, disable does all of this, so you might also try running these too just to be sure:
sudo systemctl disable ublue-update.timer sudo systemctl disable --now flatpak-system-update.timer sudo systemctl disable --now rpm-ostreed-automatic.timer systemctl disable --now --user flatpak-user-update.timer
Reply from @lorduskordus :
Let me try to help ⋯
Sure, thanks @lorduskordus ! :heart:
⋯ Do
cat /usr/etc/rpm-ostreed.conf
, does the output look like this ? ⋯
malix@malix-pc ~> cat /usr/etc/rpm-ostreed.conf
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# For option meanings, see rpm-ostreed.conf(5).
[Daemon]
AutomaticUpdatePolicy=stage
#IdleExitTimeout=60
⋯ Do
cat /etc/rpm-ostreed.conf
, is the output different ? Does it at least contain the lineAutomaticUpdatePolicy=stage
? ⋯
malix@malix-pc ~> cat /etc/rpm-ostreed.conf
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# For option meanings, see rpm-ostreed.conf(5).
[Daemon]
AutomaticUpdatePolicy=stage
#IdleExitTimeout=60
The output is similar and both contain the line AutomaticUpdatePolicy=stage
⋯ do
sudo nano /etc/rpm-ostreed.conf
and changeAutomaticUpdatePolicy=stage
toAutomaticUpdatePolicy=none
manually ⋯
This is what I just did.
Should I also do this for /usr/etc/rpm-ostreed.conf
?
What's the difference between /etc/rpm-ostreed.conf
and /usr/etc/rpm-ostreed.conf
?
Now if everything worked, the output of rpm-ostree status should no longer show something like
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 4min 22s ago
and classic auto updates are therefore turned off
malix@malix-pc ~> rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
Digest: sha256:1ed65ccae6d651ee175e0dbff2e6a3f1bf12871f4e58a261cdb0e4346c4a3fc5
Version: 40.20240611.0 (2024-06-11T21:57:17Z)
LayeredPackages: google-chrome-stable
ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
Digest: sha256:1ed65ccae6d651ee175e0dbff2e6a3f1bf12871f4e58a261cdb0e4346c4a3fc5
Version: 40.20240611.0 (2024-06-11T21:57:17Z)
LayeredPackages: google-chrome-stable
Indeed
However, it seems that my ujust toggle-updates
script was in fact broken from the start, since now I can't enable the updates back
malix@malix-pc ~> ujust toggle-updates
Automatic updates are currently: Disabled
Enable or Disable automatic updates?
# I selected "enable"
Created symlink /etc/systemd/system/timers.target.wants/ublue-update.timer → /usr/lib/systemd/system/ublue-update.timer.
malix@malix-pc ~> rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
Digest: sha256:1ed65ccae6d651ee175e0dbff2e6a3f1bf12871f4e58a261cdb0e4346c4a3fc5
Version: 40.20240611.0 (2024-06-11T21:57:17Z)
LayeredPackages: google-chrome-stable
ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
Digest: sha256:1ed65ccae6d651ee175e0dbff2e6a3f1bf12871f4e58a261cdb0e4346c4a3fc5
Version: 40.20240611.0 (2024-06-11T21:57:17Z)
LayeredPackages: google-chrome-stable
malix@malix-pc ~> ujust --show toggle-updates
# Turn automatic updates on or off
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
CURRENT_STATE="Enabled"
fi
OPTION={{ ACTION }}
if [ "$OPTION" == "prompt" ]; then
echo "Automatic updates are currently: ${bold}${CURRENT_STATE}${normal}"
echo "Enable or Disable automatic updates?"
OPTION=$(ugum choose Enable Disable)
elif [ "$OPTION" == "help" ]; then
echo "Usage: ujust toggle-updates <option>"
echo " <option>: Specify the quick option - 'enable' or 'disable'"
echo " Use 'enable' to Enable automatic updates."
echo " Use 'disable' to Disable automatic updates."
exit 0
fi
if [ "${OPTION,,}" == "enable" ]; then
sudo systemctl enable ublue-update.timer
elif [ "${OPTION,,}" == "disable" ]; then
sudo systemctl disable ublue-update.timer
fi
Okay.. I have my own image based on uBlue main and thought you and I would have the exact same ujust script. I have the version from this repository, while Bluefin has its own for some reason. I also have AutomaticUpdatePolicy
set to none
(by default) and still get auto-updates, so in my case, ublue-update itself is responsible for system updates.
Bluefin's version only enables/disables the ublue-update.timer
(which starts the ublue-update.service
).
Since your output of /usr/etc/rpm-ostreed.conf
has AutomaticUpdatePolicy
set to stage
, I assume Bluefin's config uses the classic rpm-ostreed-automatic updates but don't see how disabling/enabling the ublue-update.timer
would also toggle that. Unless it's enough to have rpm-ostreed-automatic.timer
disabled and its state depends on the ublue-update.timer
state.
I think you should create the issue in Bluefin's repository.
I probably won't be able to help you further, but your system updates should be turned off.
In the meantime:
Classic rpm-ostreed-automatic updates
rpm-ostreed-automatic.timer
(while having AutomaticUpdatePolicy=stage) is enough to disable/enable automatic system updates, but if you want to enable them again, do the same thing, only set AutomaticUpdatePolicy
back to stage
.Difference between /usr/etc/
and /etc/
/usr/etc/
is a directory for 'default' image configuration/etc/
is a directory for overriding those defaults by the user/etc/
, it gets copied over from /usr/etc/
/usr/
, and you don't need to unless you're creating your own image.Comment from @lorduskordus :
⋯ I think you should create the issue in Bluefin's repository ⋯
I got the advice to open it here from @castrojo in the Universal Blue discourse Maybe it should be moved, indeed If that's true, maybe a member with triage (or above) permission can do it
Now that I looked at Bluefin's topgrade config, I think Bluefin's ublue-update does handle rpm-ostree itself and the only issue here is that the classic rpm-ostree updates are enabled, when they shouldn't be.
It's happening because the main image (that Bluefin is based on) pulls ublue-os/config, which contains the ublue-os-update-services package and main's post-install.sh script configures and enables it. This was used back when ublue-update didn't exist. The custom image module I'm using, that installs ublue-update removes this package.
Try running this to see if ublue-os-update-services
package is installed:
rpm -q ublue-os-update-services
As for whether ublue-update handles rpm-ostree, if you can, try running this (with auto-updates disabled & when you know a new image exists, new images are built daily at about 16:40 UTC)
systemctl start ublue-update.service
If I'm correct, it will update your system using rpm-ostree. You should see a new entry in rpm-ostree status
.
Bluefin's / Aurora's maintainers would either have to override remove the ublue-os-update-services package as well or remove it from main / config entirely.
However, it seems that my
ujust toggle-updates
script was in fact broken from the start, since now I can't enable the updates back
The line: AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 4min 22s ago
is only related to the classic rpm-ostree auto updates. If you run ujust toggle-updates
again, the CURRENT_STATE
informs you whether the ublue-update.timer is enabled. If it is, auto-updates are on.
Lastly, to be clear, if I am correct, then 'undoing the package' by disabling the classic rpm-ostree updates (AutomaticUpdatePolicy=none and disabling the service) + disabling the services handling Flatpak (All of them are listed at the end of my first comment) is everything you need to do and you can use the ujust toggle-updates
script.
Comment from @lorduskordus :
⋯ Try running this to see if
ublue-os-update-services
package is installed ⋯
malix@malix-pc ~> rpm -q ublue-os-update-services
package ublue-os-update-services is not installed
Yup, not installed
About the script, the updates apparently stopped, but the script still needs to be fixed
After the recent 3.0.0 update, I wanted to toggle the automatic updates again, Do you know how I could make it?
After the recent 3.0.0 update, I wanted to toggle the automatic updates again, Do you know how I could make it?
This for system updates (AutomaticUpdatePolicy=stage): https://docs.fedoraproject.org/en-US/iot/applying-updates-UG/#_automatic_updates
Everything else:
ujust toggle-updates
Edit: This is wrong, ujust toggle-updates
toggles ublue-update, which handles everything including system updates. The problem is that there is another tool in place that's also updating the system.
Thanks for the AutomaticUpdatePolicy
workaround
It would be nice if it could be added to ujust toggle-updates
I installed Bluefin in a VM yesterday to not pollute this issue with assumptions anymore.
Disabled classic automatic updates provided by Fedora
systemctl start ublue-update.service
manually after new image was released. It updated the system.That means ublue-update does handle rpm-ostree, so I guess I was right saying the classic automatic updates provided by Fedora should not be enabled. (Two tools handling system updates, disabling ublue-update doesnt stop the other tool, so system updates are still handled, hence why this issue was created.)
ujust toggle-updates
works just fine, all that's needed to do is not ship classic automatic updates by Fedora on by default. It is likely an oversight.
Before ublue-update is triggered:
ublue-update is running:
ublue-update finished:
@Malix-off Turn off the classic auto updates by Fedora
In /etc/rpm-ostreed.conf
set AutomaticUpdatePolicy=none
and do:
systemctl reload rpm-ostreed
systemctl disable rpm-ostreed-automatic.timer --now
Use ujust toggle-updates
normally, as ublue-update handles everything.
My updates are still being made automatically even after having it disabled since yesterday