1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

meson: use jinja2 for rules.d templates

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-05-16 15:51:17 +02:00 committed by Yu Watanabe
parent 195a8a9327
commit 8feaea5e3d
5 changed files with 18 additions and 18 deletions

View File

@ -853,6 +853,7 @@ substs.set('DEV_KVM_MODE', dev_kvm_mode)
conf.set10('DEV_KVM_UACCESS', dev_kvm_mode != '0666')
group_render_mode = get_option('group-render-mode')
substs.set('GROUP_RENDER_MODE', group_render_mode)
conf.set_quoted('GROUP_RENDER_MODE', group_render_mode)
conf.set10('GROUP_RENDER_UACCESS', group_render_mode != '0666')
kill_user_processes = get_option('default-kill-user-processes')

View File

@ -36,8 +36,8 @@ SUBSYSTEM=="dvb", GROUP="video"
SUBSYSTEM=="media", GROUP="video"
SUBSYSTEM=="cec", GROUP="video"
SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="@GROUP_RENDER_MODE@"
SUBSYSTEM=="kfd", GROUP="render", MODE="@GROUP_RENDER_MODE@"
SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="{{GROUP_RENDER_MODE}}"
SUBSYSTEM=="kfd", GROUP="render", MODE="{{GROUP_RENDER_MODE}}"
SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
@ -89,14 +89,14 @@ KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
# The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=kvm"
KERNEL=="kvm", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=kvm"
KERNEL=="vfio", MODE="0666", OPTIONS+="static_node=vfio/vfio"
KERNEL=="vsock", MODE="0666"
KERNEL=="vhost-vsock", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-vsock"
KERNEL=="vhost-vsock", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=vhost-vsock"
KERNEL=="vhost-net", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-net"
KERNEL=="vhost-net", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=vhost-net"
KERNEL=="udmabuf", GROUP="kvm"

View File

@ -12,6 +12,6 @@ IMPORT{builtin}="btrfs ready $devnode"
ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0"
# reconsider pending devices in case when multidevice volume awaits
ENV{ID_BTRFS_READY}=="1", RUN+="@rootbindir@/udevadm trigger -s block -p ID_BTRFS_READY=0"
ENV{ID_BTRFS_READY}=="1", RUN+="{{ROOTBINDIR}}/udevadm trigger -s block -p ID_BTRFS_READY=0"
LABEL="btrfs_end"

View File

@ -57,7 +57,7 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:
SUBSYSTEM=="udc", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="usb-gadget.target"
# Apply sysctl variables to network devices (and only to those) as they appear.
ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name"
ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="{{ROOTLIBEXECDIR}}/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name"
# Pull in backlight save/restore for all backlight devices and
# keyboard backlights

View File

@ -42,18 +42,17 @@ install_data(rules,
all_rules = rules
rules_in = '''
50-udev-default.rules
64-btrfs.rules
99-systemd.rules
'''.split()
rules_in = ['50-udev-default.rules',
'64-btrfs.rules',
'99-systemd.rules']
foreach file : rules_in
gen = configure_file(
all_rules += custom_target(
file,
input : file + '.in',
output: file,
configuration : substs)
install_data(gen,
command : [meson_render_jinja2, config_h, '@INPUT@'],
capture : true,
install : true,
install_dir : udevrulesdir)
all_rules += gen
endforeach