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