diff --git a/build/ublue-os-just/10-update.just b/build/ublue-os-just/10-update.just index ddf2145a..a0afb903 100644 --- a/build/ublue-os-just/10-update.just +++ b/build/ublue-os-just/10-update.just @@ -11,3 +11,13 @@ update-firmware: fwupdmgr refresh fwupdmgr get-updates fwupdmgr update + +# Disable all auto-update timers +disable-updates: + sudo systemctl disable --now flatpak-system-update.timer rpm-ostreed-automatic.timer + systemctl disable --now --user flatpak-user-update.timer + +# Enable all auto-update timers +enable-updates: + sudo systemctl enable --now flatpak-system-update.timer rpm-ostreed-automatic.timer + systemctl enable --now --user flatpak-user-update.timer \ No newline at end of file diff --git a/build/ublue-os-just/ublue-os-just.spec b/build/ublue-os-just/ublue-os-just.spec index db271afc..179e3a29 100644 --- a/build/ublue-os-just/ublue-os-just.spec +++ b/build/ublue-os-just/ublue-os-just.spec @@ -1,7 +1,7 @@ Name: ublue-os-just Packager: ublue-os Vendor: ublue-os -Version: 0.4 +Version: 0.6 Release: 1%{?dist} Summary: ublue-os just integration License: MIT @@ -45,6 +45,9 @@ done %attr(0644,root,root) %{_datadir}/%{VENDOR}/justfile %changelog +* Mon Oct 2 2023 ArtikusHG <24320212+ArtikusHG@users.noreply.github.com> - 0.6 +- Add commands to disable and enable automatic updates to 60-updates.just + * Sat Sep 23 2023 Kyle Gospodnetich - 0.5 - Remove fish shell support diff --git a/files/usr/etc/systemd/system/rpm-ostreed-automatic.service.d/override.conf b/files/usr/etc/systemd/system/rpm-ostreed-automatic.service.d/override.conf index 0a38143e..9750cbb5 100644 --- a/files/usr/etc/systemd/system/rpm-ostreed-automatic.service.d/override.conf +++ b/files/usr/etc/systemd/system/rpm-ostreed-automatic.service.d/override.conf @@ -1,3 +1,6 @@ [Unit] Wants=network-online.target After=network-online.target + +[Service] +ExecCondition=/bin/bash -c '[[ "$(busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Metered | cut -c 3-)" == @(2|4) ]]' diff --git a/files/usr/lib/systemd/system/flatpak-system-update.service b/files/usr/lib/systemd/system/flatpak-system-update.service index 0c7e4ecf..6e2940ea 100644 --- a/files/usr/lib/systemd/system/flatpak-system-update.service +++ b/files/usr/lib/systemd/system/flatpak-system-update.service @@ -6,4 +6,5 @@ After=network-online.target [Service] Type=oneshot +ExecCondition=/bin/bash -c '[[ "$(busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Metered | cut -c 3-)" == @(2|4) ]]' ExecStart=/usr/bin/flatpak --system uninstall --unused -y --noninteractive ; /usr/bin/flatpak --system update -y --noninteractive ; /usr/bin/flatpak --system repair diff --git a/files/usr/lib/systemd/user/flatpak-user-update.service b/files/usr/lib/systemd/user/flatpak-user-update.service index 2c98c52f..95866d93 100644 --- a/files/usr/lib/systemd/user/flatpak-user-update.service +++ b/files/usr/lib/systemd/user/flatpak-user-update.service @@ -6,4 +6,5 @@ After=network-online.target [Service] Type=oneshot +ExecCondition=/bin/bash -c '[[ "$(busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Metered | cut -c 3-)" == @(2|4) ]]' ExecStart=/usr/bin/flatpak --user uninstall --unused -y --noninteractive ; /usr/bin/flatpak --user update -y --noninteractive ; /usr/bin/flatpak --user repair diff --git a/rpmspec/ublue-os-update-services.spec b/rpmspec/ublue-os-update-services.spec index 69361b39..f50be6f5 100644 --- a/rpmspec/ublue-os-update-services.spec +++ b/rpmspec/ublue-os-update-services.spec @@ -1,7 +1,7 @@ Name: ublue-os-update-services Packager: ublue-os Vendor: ublue-os -Version: 0.7 +Version: 0.8 Release: 1%{?dist} Summary: Automatic updates for rpm-ostree and flatpak License: MIT @@ -65,6 +65,9 @@ tar xf %{SOURCE0} -C %{buildroot} --strip-components=2 --exclude etc/rpm-ostreed %changelog +* Mon Oct 2 2023 ArtikusHG <24320212+ArtikusHG@users.noreply.github.com> - 0.8 +- Add metered connection check to system and flatpak update services + * Sat Aug 12 2023 Benjamin Sherman - 0.7 - Add randmized delay to update timers, and always run flatpak updates on boot