diff --git a/distrobox-upgrade-all.service b/distrobox-upgrade-all.service new file mode 100644 index 0000000..73a0754 --- /dev/null +++ b/distrobox-upgrade-all.service @@ -0,0 +1,22 @@ +[Unit] +Description=Distrobox automatic update for %I +After=network.target +StartLimitIntervalSec=60 +StartLimitBurst=4 + +[Service] +ExecStart=/usr/bin/distrobox-upgrade --all +Restart=on-failure +RestartSec=1 +SuccessExitStatus=3 4 +RestartForceExitStatus=3 4 + +# Hardening +ProtectSystem=full +PrivateTmp=true +SystemCallArchitectures=native +MemoryDenyWriteExecute=true +NoNewPrivileges=true + +[Install] +WantedBy=default.target diff --git a/distrobox-upgrade-all.timer b/distrobox-upgrade-all.timer new file mode 100644 index 0000000..7034d3a --- /dev/null +++ b/distrobox-upgrade-all.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Daily update of all distroboxes +After=network.target local-fs.target + +[Timer] +OnCalendar=daily +AccuracySec=1m +RandomizedDelaySec=2h +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/gnome-branding-Aeon.changes b/gnome-branding-Aeon.changes index 16db365..7e2b8ff 100644 --- a/gnome-branding-Aeon.changes +++ b/gnome-branding-Aeon.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 5 14:54:57 UTC 2023 - Richard Brown + +- Add distrobox-upgrade-all timer and service +- 20231005 + ------------------------------------------------------------------- Sat Jun 17 12:41:44 UTC 2023 - Richard Brown diff --git a/gnome-branding-Aeon.spec b/gnome-branding-Aeon.spec index b754a04..4547ff0 100644 --- a/gnome-branding-Aeon.spec +++ b/gnome-branding-Aeon.spec @@ -29,10 +29,13 @@ Source3: aeon-firstboot.desktop Source4: aeon-firstboot Source5: 50-desktop.conf Source6: aeonwallpaper.png +Source7: distrobox-upgrade-all.service +Source8: distrobox-upgrade-all.timer BuildArch: noarch BuildRequires: flatpak BuildRequires: gio-branding-openSUSE BuildRequires: transactional-update +BuildRequires: systemd-rpm-macros Requires: flatpak Requires: gio-branding-openSUSE Requires: sound-theme-freedesktop @@ -41,7 +44,7 @@ Requires: zenity Obsoletes: gnome-branding-MicroOS Provides: gnome-branding-MicroOS Conflicts: plasma-branding-MicroOS -Version: 20230617 +Version: 20231005 Release: 0 %description @@ -56,6 +59,8 @@ cp -a %{SOURCE3} aeon-firstboot.desktop cp -a %{SOURCE4} aeon-firstboot cp -a %{SOURCE5} 50-desktop.conf cp -a %{SOURCE6} aeonwallpaper.png +cp -a %{SOURCE7} distrobox-upgrade-all.service +cp -a %{SOURCE8} distrobox-upgrade-all.timer %build @@ -73,7 +78,17 @@ install -m644 50-desktop.conf %{buildroot}%{_prefix}%{_sysconfdir}/transactional install -d %{buildroot}%{_datadir}/wallpapers install -m0644 aeonwallpaper.png %{buildroot}%{_datadir}/wallpapers/aeonwallpaper.png +%pre +%systemd_user_pre distrobox-upgrade-all.service +%systemd_user_pre distrobox-upgrade-all.timer + %post +%systemd_user_post distrobox-upgrade-all.service +%systemd_user_post distrobox-upgrade-all.timer + +%preun +%systemd_user_preun distrobox-upgrade-all.service +%systemd_user_preun distrobox-upgrade-all.timer %postun @@ -90,5 +105,7 @@ install -m0644 aeonwallpaper.png %{buildroot}%{_datadir}/wallpapers/aeonwallpape %{_prefix}%{_sysconfdir}/transactional-update.conf.d/50-desktop.conf %dir %{_datadir}/wallpapers %{_datadir}/wallpapers/aeonwallpaper.png +%{_userunitdir}/distrobox-upgrade-all.service +%{_userunitdir}/distrobox-upgrade-all.timer %changelog