mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 12:54:58 +00:00
trivial: Add a new configuration option systemd_unit_user
This option will control what user the fwupd-refresh.service unit uses.
This commit is contained in:
parent
0c9ac226c9
commit
5d22db02ec
@ -7,7 +7,7 @@ After=network.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
CacheDirectory=fwupdmgr
|
CacheDirectory=fwupdmgr
|
||||||
StandardError=null
|
StandardError=null
|
||||||
DynamicUser=yes
|
@user@
|
||||||
RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_INET AF_INET6
|
RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_INET AF_INET6
|
||||||
SystemCallFilter=~@mount
|
SystemCallFilter=~@mount
|
||||||
ProtectKernelModules=yes
|
ProtectKernelModules=yes
|
||||||
|
@ -14,6 +14,17 @@ con2.set('bindir', bindir)
|
|||||||
con2.set('motd_fullpath', motd_fullpath)
|
con2.set('motd_fullpath', motd_fullpath)
|
||||||
|
|
||||||
if libsystemd.found()
|
if libsystemd.found()
|
||||||
|
if get_option('systemd_unit_user') == ''
|
||||||
|
con2.set('user', 'DynamicUser=yes')
|
||||||
|
else
|
||||||
|
dynamic_options = [
|
||||||
|
'ProtectSystem=strict',
|
||||||
|
'ProtectHome=read-only',
|
||||||
|
'User=' + get_option('systemd_unit_user')
|
||||||
|
]
|
||||||
|
con2.set('user','\n'.join(dynamic_options))
|
||||||
|
endif
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'fwupd-refresh.service.in',
|
input : 'fwupd-refresh.service.in',
|
||||||
output : 'fwupd-refresh.service',
|
output : 'fwupd-refresh.service',
|
||||||
|
@ -53,6 +53,7 @@ option('plugin_powerd', type : 'feature', description : 'support for powerd', de
|
|||||||
option('qubes', type : 'boolean', value : false, description : 'build packages for Qubes OS')
|
option('qubes', type : 'boolean', value : false, description : 'build packages for Qubes OS')
|
||||||
option('supported_build', type : 'feature', description: 'distribution package with upstream support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
option('supported_build', type : 'feature', description: 'distribution package with upstream support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
||||||
option('systemd', type : 'feature', description : 'systemd support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
option('systemd', type : 'feature', description : 'systemd support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
||||||
|
option('systemd_unit_user', type : 'string', description : 'User account to use for fwupd-refresh.service (empty for DynamicUser)')
|
||||||
option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
|
option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
|
||||||
option('elogind', type : 'feature', description : 'elogind support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
option('elogind', type : 'feature', description : 'elogind support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
||||||
option('tests', type : 'boolean', value : true, description : 'enable tests')
|
option('tests', type : 'boolean', value : true, description : 'enable tests')
|
||||||
|
Loading…
Reference in New Issue
Block a user