Skip to content

Commit

Permalink
trivial: debian: set up fwupd-refresh.service/fwupd-refresh.timer
Browse files Browse the repository at this point in the history
Create a dedicated user account for these to use, and set the preset
to leave it as enabled by default.

Fixes: #3037
  • Loading branch information
superm1 committed Apr 25, 2022
1 parent 0cc310a commit e90b04d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions contrib/debian/fwupd.postinst
Expand Up @@ -48,3 +48,10 @@ for dir in /var/cache/fwupdate /var/lib/fwupdate; do
rmdir --ignore-fail-on-non-empty $dir || true
fi
done

#create a user for fwupd-refresh.service/fwupd-refresh.timer
adduser --quiet --system --group --no-create-home --home /run/systemd \
--gecos "fwupd-refresh user" fwupd-refresh
if [ -d /run/systemd/system ]; then
systemctl reload dbus || true
fi
5 changes: 4 additions & 1 deletion contrib/debian/rules
Expand Up @@ -49,7 +49,7 @@ ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
CONFARGS += -Dplugin_logitech_bulkcontroller=disabled
endif

CONFARGS += -Dplugin_dummy=true -Dplugin_powerd=disabled -Ddocs=gtkdoc -Dsupported_build=enabled -Dplugin_modem_manager=enabled
CONFARGS += -Dplugin_dummy=true -Dplugin_powerd=disabled -Ddocs=gtkdoc -Dsupported_build=enabled -Dplugin_modem_manager=enabled -Dsystemd_unit_user=fwupd-refresh

%:
dh $@ --with gir
Expand All @@ -76,6 +76,9 @@ override_dh_install:
rm -f debian/fwupd/usr/lib/*/fwupd-plugins-*/libfu_plugin_invalid.so
rm -f debian/fwupd/etc/fwupd/remotes.d/fwupd-tests.conf

#enable fwupd-refresh.service by default (we have a dedicated user)
rm -f debian/fwupd/lib/systemd/system-preset/fwupd-refresh.preset

override_dh_strip_nondeterminism:
dh_strip_nondeterminism -Xfirmware-example.xml.gz

Expand Down

0 comments on commit e90b04d

Please sign in to comment.