From 1304b8f7f8fc86691e995533ea9440e4ae6c2d73 Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Sun, 26 Jul 2026 17:33:30 +0200 Subject: [PATCH] feat: add ZFS deprecation notifier (#2613) * feat: add ZFS deprecation notifier This will spawn a one-time notification that has to be dismissed by the user if ZFS is being used. xref: https://github.com/ublue-os/aurora/issues/1765 resolves: https://github.com/ublue-os/aurora/issues/2210 * fix typo * be more explicit in msg Co-authored-by: Adam Fidel * run it always every week The chance that people will see it are way bigger this way. * only actually enable on systems that have ship zfs --------- Co-authored-by: Adam Fidel --- build_files/base/17-cleanup.sh | 5 +++++ .../usr/bin/aurora-zfs-deprecation-notifier | 11 +++++++++++ .../aurora-zfs-deprecation-notifier.service | 15 +++++++++++++++ .../system/aurora-zfs-deprecation-notifier.timer | 11 +++++++++++ 4 files changed, 42 insertions(+) create mode 100755 system_files/shared/usr/bin/aurora-zfs-deprecation-notifier create mode 100644 system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.service create mode 100644 system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.timer diff --git a/build_files/base/17-cleanup.sh b/build_files/base/17-cleanup.sh index 9ac168d7..3f59233d 100755 --- a/build_files/base/17-cleanup.sh +++ b/build_files/base/17-cleanup.sh @@ -43,6 +43,11 @@ systemctl enable uupd.timer # Disable the old update timer systemctl disable rpm-ostreed-automatic.timer +# TODO: Remove with F45 release +if [[ "${AKMODS_FLAVOR}" =~ coreos ]]; then + systemctl enable aurora-zfs-deprecation-notifier.timer +fi + # Hide Desktop Files. Hidden removes mime associations for file in htop nvtop; do if [[ -f "/usr/share/applications/${file}.desktop" ]]; then diff --git a/system_files/shared/usr/bin/aurora-zfs-deprecation-notifier b/system_files/shared/usr/bin/aurora-zfs-deprecation-notifier new file mode 100755 index 00000000..a742b45c --- /dev/null +++ b/system_files/shared/usr/bin/aurora-zfs-deprecation-notifier @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +NOTIFICATION="/usr/bin/notify-send --app-name=Aurora --icon distributor-logo --urgency critical 'ZFS support is ending in October 2026' 'An attached drive contains a ZFS pool. Please see https://github.com/ublue-os/aurora/issues/1765 for more info.'" + +USERS="$(loginctl list-users --no-legend | awk '$1 != 0 {print $2}')" + +for username in ${USERS}; do + machinectl shell "${username}@.host" /usr/bin/bash -c "${NOTIFICATION}" +done diff --git a/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.service b/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.service new file mode 100644 index 00000000..21597cc5 --- /dev/null +++ b/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.service @@ -0,0 +1,15 @@ +[Unit] +Description=Aurora ZFS Deprecation Notifier +Documentation=https://github.com/ublue-os/aurora/issues/1765 +After=local-fs.target +Wants=local-fs.target +ConditionPathIsReadWrite=/etc +ConditionPathExists=/usr/bin/zfs + +[Service] +Type=oneshot +ExecCondition=/usr/bin/bash -c "/usr/bin/lsblk -o FSTYPE | /usr/bin/grep -q ^zfs" +ExecStart=/usr/bin/aurora-zfs-deprecation-notifier + +[Install] +WantedBy=graphical.target diff --git a/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.timer b/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.timer new file mode 100644 index 00000000..78f5c28b --- /dev/null +++ b/system_files/shared/usr/lib/systemd/system/aurora-zfs-deprecation-notifier.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Run aurora-zfs-deprecation-notifier 20 mins after boot + +[Timer] +OnBootSec=20min +Unit=aurora-zfs-deprecation-notifier.service +OnUnitActiveSec=1w +Persistent=true + +[Install] +WantedBy=timers.target