From 9b71388967be528d9e501b571f96c64e6cd7b369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 23 Aug 2023 12:07:12 +0200 Subject: [PATCH] Enable fwupd refresh timer on Fedora 39 See: https://fedoraproject.org/wiki/Changes/EnableFwupdRefreshByDefault Fixes: https://github.com/coreos/fedora-coreos-tracker/issues/1512 --- manifests/enable-fwupd-refresh-timer.yaml | 2 ++ manifests/fedora-coreos.yaml | 3 +++ overlay.d/18fwupd-refresh-timer/statoverride | 2 ++ .../50-fwupd-refresh-timer.preset | 2 ++ tests/kola/files/fwupd-refresh-timer | 22 +++++++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 manifests/enable-fwupd-refresh-timer.yaml create mode 100644 overlay.d/18fwupd-refresh-timer/statoverride create mode 100644 overlay.d/18fwupd-refresh-timer/usr/lib/systemd/system-preset/50-fwupd-refresh-timer.preset create mode 100755 tests/kola/files/fwupd-refresh-timer diff --git a/manifests/enable-fwupd-refresh-timer.yaml b/manifests/enable-fwupd-refresh-timer.yaml new file mode 100644 index 0000000000..79cd710aa5 --- /dev/null +++ b/manifests/enable-fwupd-refresh-timer.yaml @@ -0,0 +1,2 @@ +ostree-layers: + - overlay/18fwupd-refresh-timer diff --git a/manifests/fedora-coreos.yaml b/manifests/fedora-coreos.yaml index a30e010858..dab61b0f0a 100644 --- a/manifests/fedora-coreos.yaml +++ b/manifests/fedora-coreos.yaml @@ -46,6 +46,9 @@ conditional-include: # Modularity is going away in F39+ so we'll only include # the fedora-repos-modular package in <39. include: fedora-modularity.yaml + - if: releasever >= 39 + # https://fedoraproject.org/wiki/Changes/EnableFwupdRefreshByDefault + include: enable-fwupd-refresh-timer.yaml ostree-layers: - overlay/15fcos diff --git a/overlay.d/18fwupd-refresh-timer/statoverride b/overlay.d/18fwupd-refresh-timer/statoverride new file mode 100644 index 0000000000..27a95affe2 --- /dev/null +++ b/overlay.d/18fwupd-refresh-timer/statoverride @@ -0,0 +1,2 @@ +# Config file for overriding permission bits on overlay files/dirs +# Format: = diff --git a/overlay.d/18fwupd-refresh-timer/usr/lib/systemd/system-preset/50-fwupd-refresh-timer.preset b/overlay.d/18fwupd-refresh-timer/usr/lib/systemd/system-preset/50-fwupd-refresh-timer.preset new file mode 100644 index 0000000000..1635615a8e --- /dev/null +++ b/overlay.d/18fwupd-refresh-timer/usr/lib/systemd/system-preset/50-fwupd-refresh-timer.preset @@ -0,0 +1,2 @@ +# https://fedoraproject.org/wiki/Changes/EnableFwupdRefreshByDefault +enable fwupd-refresh.timer diff --git a/tests/kola/files/fwupd-refresh-timer b/tests/kola/files/fwupd-refresh-timer new file mode 100755 index 0000000000..9988d46480 --- /dev/null +++ b/tests/kola/files/fwupd-refresh-timer @@ -0,0 +1,22 @@ +#!/bin/bash +## kola: +## exclusive: false +## description: Verify fwupd-refresh.timer is enabled. +## tags: "platform-independent" + +set -xeuo pipefail + +# shellcheck disable=SC1091 +. "$KOLA_EXT_DATA/commonlib.sh" + +if verlt "$(get_fedora_ver)" 39; then + ok "Skipping fwupd-refresh.timer test" +fi + +# shellcheck disable=SC2043 +for unit in fwupd-refresh.timer; do + if ! systemctl is-enabled ${unit} 1>/dev/null; then + fatal "Unit ${unit} should be enabled" + fi + ok "Unit ${unit} is enabled as expected" +done