diff --git a/meson.build b/meson.build index 214096b726..ed0e46d493 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in index 3304e32bb6..18a3cf46bf 100644 --- a/rules.d/50-udev-default.rules.in +++ b/rules.d/50-udev-default.rules.in @@ -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" diff --git a/rules.d/64-btrfs.rules.in b/rules.d/64-btrfs.rules.in index aad29afb8b..df6e12a5dd 100644 --- a/rules.d/64-btrfs.rules.in +++ b/rules.d/64-btrfs.rules.in @@ -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" diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in index be972f90fb..25b8a590a6 100644 --- a/rules.d/99-systemd.rules.in +++ b/rules.d/99-systemd.rules.in @@ -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 diff --git a/rules.d/meson.build b/rules.d/meson.build index 4bbba09fd5..598649a562 100644 --- a/rules.d/meson.build +++ b/rules.d/meson.build @@ -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, - install_dir : udevrulesdir) - all_rules += gen + output: file, + command : [meson_render_jinja2, config_h, '@INPUT@'], + capture : true, + install : true, + install_dir : udevrulesdir) endforeach