Add a systemd preset file for fwupd-refresh.service

Makes `fwupd-refresh.service` strictly opt-in.

Some distros are defaulting to all systemd services on and causing
more refreshes than desirable by default, especially when using
both `gnome-software` and `fwupd-refresh.service`
This commit is contained in:
Mario Limonciello 2019-10-20 13:30:51 -05:00 committed by Mario Limonciello
parent 66dd3a02cb
commit 0b9bfec150
5 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ usr/lib/*/fwupdoffline
usr/lib/*/fwupdtool
usr/share/man/man1/*
lib/systemd/system/*
lib/systemd/system-preset/*
lib/systemd/system-shutdown/*
var/lib/fwupd
lib/udev/rules.d/*

View File

@ -287,6 +287,7 @@ rm ${RPM_BUILD_ROOT}%{_sbindir}/flashrom
%{_unitdir}/fwupd.service
%{_unitdir}/fwupd-refresh.service
%{_unitdir}/fwupd-refresh.timer
%{_presetdir}/fwupd-refresh.preset
%{_unitdir}/system-update.target.wants/
%dir %{_localstatedir}/lib/fwupd
%dir %{_datadir}/fwupd/quirks.d

View File

@ -0,0 +1 @@
disable fwupd-refresh.service

View File

@ -11,6 +11,8 @@ con2.set('motd_fullpath', motd_fullpath)
if get_option('systemd')
install_data(['fwupd-refresh.timer'],
install_dir: systemdunitdir)
install_data(['fwupd-refresh.preset'],
install_dir: systemdsystempresetdir)
dynamic_options = []
if systemd.version().version_compare('>= 243')

View File

@ -306,6 +306,7 @@ if build_standalone and get_option('systemd')
if systemdunitdir == '' and get_option('systemd')
systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
endif
systemdsystempresetdir = systemd.get_pkgconfig_variable('systemdsystempresetdir')
endif
if build_standalone and get_option('elogind')