diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-05 11:42:24 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-05 11:51:44 +0200 |
commit | 155078c835a00fed264a7b36b06f709d9b57cb1b (patch) | |
tree | 4d1d4183b184d7af0554adf4faf45250ee18eea6 /src/login | |
parent | 4a5f779f0ecda6e247c9f80812cdfe517b162cf1 (diff) | |
download | systemd-155078c835a00fed264a7b36b06f709d9b57cb1b.tar.gz |
meson: move udev rules to rules.d/
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/70-power-switch.rules | 15 | ||||
-rw-r--r-- | src/login/70-uaccess.rules.in | 99 | ||||
-rw-r--r-- | src/login/71-seat.rules.in | 81 | ||||
-rw-r--r-- | src/login/73-seat-late.rules.in | 20 | ||||
-rw-r--r-- | src/login/meson.build | 37 |
5 files changed, 16 insertions, 236 deletions
diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules deleted file mode 100644 index 3fb954a4f0..0000000000 --- a/src/login/70-power-switch.rules +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -ACTION=="remove", GOTO="power_switch_end" - -SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_SWITCH}=="1", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEY}=="1", TAG+="power-switch" - -LABEL="power_switch_end" diff --git a/src/login/70-uaccess.rules.in b/src/login/70-uaccess.rules.in deleted file mode 100644 index a3301be1bc..0000000000 --- a/src/login/70-uaccess.rules.in +++ /dev/null @@ -1,99 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -ACTION=="remove", GOTO="uaccess_end" -ENV{MAJOR}=="", GOTO="uaccess_end" - -# PTP/MTP protocol devices, cameras, portable media players -SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess" - -# Digicams with proprietary protocol -ENV{ID_GPHOTO2}=="?*", TAG+="uaccess" - -# SCSI and USB scanners -ENV{libsane_matched}=="yes", TAG+="uaccess" - -# HPLIP devices (necessary for ink level check and HP tool maintenance) -ENV{ID_HPLIP}=="1", TAG+="uaccess" - -# optical drives -SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="uaccess" -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", TAG+="uaccess" - -# Sound devices -SUBSYSTEM=="sound", TAG+="uaccess", \ - OPTIONS+="static_node=snd/timer", OPTIONS+="static_node=snd/seq" - -# Webcams, frame grabber, TV cards -SUBSYSTEM=="video4linux", TAG+="uaccess" -SUBSYSTEM=="dvb", TAG+="uaccess" -SUBSYSTEM=="media", TAG+="uaccess" - -# industrial cameras, some webcams, camcorders, set-top boxes, TV sets, audio devices, and more -SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess" -SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", TAG+="uaccess" -SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", TAG+="uaccess" - -# DRI video devices -SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess" -{% if GROUP_RENDER_UACCESS %} -# DRI render nodes -SUBSYSTEM=="drm", KERNEL=="renderD*", TAG+="uaccess" -{% endif %} -{% if DEV_KVM_UACCESS %} -# KVM -SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess" -{% endif %} - -# smart-card readers -ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess" - -# (USB) authentication devices -ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess" - -# PDA devices -ENV{ID_PDA}=="?*", TAG+="uaccess" - -# Programmable remote control -ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess" - -# joysticks -SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess" - -# color measurement devices -ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess" - -# DDC/CI device, usually high-end monitors such as the DreamColor -ENV{DDC_DEVICE}=="?*", TAG+="uaccess" - -# media player raw devices (for user-mode drivers, Android SDK, etc.) -SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess" - -# software-defined radio communication devices -ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess" - -# 3D printers, CNC machines, laser cutters, 3D scanners, etc. -ENV{ID_MAKER_TOOL}=="?*", TAG+="uaccess" - -# Protocol analyzers -ENV{ID_SIGNAL_ANALYZER}=="?*", ENV{DEVTYPE}=="usb_device", TAG+="uaccess" - -# rfkill / radio killswitches -KERNEL=="rfkill", SUBSYSTEM=="misc", TAG+="uaccess" - -# AV production controllers -# Most of these devices use HID for the knobs, faders, buttons, encoders, and jog wheels. -SUBSYSTEM=="hidraw", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess" - -# Some devices use vendor defined protocols on USB Bulk endpoints for controllers. -# Other devices transfer graphics to screens on the device through USB Bulk endpoints. -# This also allows accessing HID devices with the libusb backend of hidapi. -SUBSYSTEM=="usb", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess" - -LABEL="uaccess_end" diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in deleted file mode 100644 index 25e4ee7e58..0000000000 --- a/src/login/71-seat.rules.in +++ /dev/null @@ -1,81 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -ACTION=="remove", GOTO="seat_end" - -TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat" -SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat" -SUBSYSTEM=="input", KERNEL=="input*", TAG+="seat" -SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat" - -# Assign keyboard and LCD backlights to the seat -SUBSYSTEM=="leds", TAG+="seat" -SUBSYSTEM=="backlight", TAG+="seat" - -# Allow efifb / uvesafb to be a master if KMS is disabled -SUBSYSTEM=="graphics", KERNEL=="fb[0-9]", IMPORT{cmdline}="nomodeset", TAG+="master-of-seat" - -# Allow any PCI graphics device to be a master and synthesize a seat if KMS -# is disabled and the kernel doesn't have a driver that would work with this device. -SUBSYSTEM=="pci", ENV{ID_PCI_CLASS_FROM_DATABASE}=="Display controller", \ - ENV{DRIVER}=="", IMPORT{cmdline}="nomodeset", TAG+="seat", TAG+="master-of-seat" - -# Synthesize a seat for graphic devices without DRM and that fall back to fb -# device instead. Such HWs are listed in hwdb. -SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", ATTRS{modalias}=="?*", IMPORT{builtin}="hwdb fb:$attr{modalias}" -ENV{ID_TAG_MASTER_OF_SEAT}=="1", TAG+="master-of-seat" - -SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat" - -# Allow individual USB ports to be assigned to a seat -SUBSYSTEM=="usb", ATTR{bDeviceClass}=="00", TAG+="seat" - -# Allow USB hubs (and all downstream ports) to be assigned to a seat -SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat" - -# 'Plugable' USB hub, sound, network, graphics adapter -SUBSYSTEM=="usb", ATTR{idVendor}=="2230", ATTR{idProduct}=="000[13]", ENV{ID_AUTOSEAT}="1" - -# qemu (version 2.4+) has a PCI-PCI bridge (-device pci-bridge-seat) to group -# devices belonging to one seat. See: -# http://git.qemu.org/?p=qemu.git;a=blob;f=docs/multiseat.txt -SUBSYSTEM=="pci", ATTR{vendor}=="0x1b36", ATTR{device}=="0x000a", TAG+="seat", ENV{ID_AUTOSEAT}="1" - -# Mimo 720, with integrated USB hub, displaylink graphics, and e2i -# touchscreen. This device carries no proper VID/PID in the USB hub, -# but it does carry good ID data in the graphics component, hence we -# check it from the parent. There's a bit of a race here however, -# given that the child devices might not exist yet at the time this -# rule is executed. To work around this we'll trigger the parent from -# the child if we notice that the parent wasn't recognized yet. - -# Match parent -{% raw -%} -SUBSYSTEM=="usb", ATTR{idVendor}=="058f", ATTR{idProduct}=="6254", \ - ATTR{%k.2/idVendor}=="17e9", ATTR{%k.2/idProduct}=="401a", ATTR{%k.2/product}=="mimo inc", \ - ENV{ID_AUTOSEAT}="1", ENV{ID_AVOID_LOOP}="1" -{% endraw %} - -# Match child, look for parent's ID_AVOID_LOOP -SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="401a", ATTR{product}=="mimo inc", \ - ATTR{../idVendor}=="058f", ATTR{../idProduct}=="6254", \ - IMPORT{parent}="ID_AVOID_LOOP" - -# Match child, retrigger parent -SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="401a", ATTR{product}=="mimo inc", \ - ATTR{../idVendor}=="058f", ATTR{../idProduct}=="6254", \ - ENV{ID_AVOID_LOOP}=="", \ - RUN+="{{ROOTBINDIR}}/udevadm trigger --parent-match=%p/.." - -TAG=="seat", ENV{ID_PATH}=="", IMPORT{builtin}="path_id" -TAG=="seat", ENV{ID_FOR_SEAT}=="", ENV{ID_PATH_TAG}!="", ENV{ID_FOR_SEAT}="$env{SUBSYSTEM}-$env{ID_PATH_TAG}" - -SUBSYSTEM=="input", ATTR{name}=="Wiebetech LLC Wiebetech", RUN+="{{ROOTBINDIR}}/loginctl lock-sessions" - -LABEL="seat_end" diff --git a/src/login/73-seat-late.rules.in b/src/login/73-seat-late.rules.in deleted file mode 100644 index 7cda2b08ce..0000000000 --- a/src/login/73-seat-late.rules.in +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -ACTION=="remove", GOTO="seat_late_end" - -ENV{ID_SEAT}=="", ENV{ID_AUTOSEAT}=="1", ENV{ID_FOR_SEAT}!="", ENV{ID_SEAT}="seat-$env{ID_FOR_SEAT}" -ENV{ID_SEAT}=="", IMPORT{parent}="ID_SEAT" - -ENV{ID_SEAT}!="", TAG+="$env{ID_SEAT}" -{% if HAVE_ACL %} -TAG=="uaccess", ENV{MAJOR}!="", RUN{builtin}+="uaccess" -{% endif %} - -LABEL="seat_late_end" diff --git a/src/login/meson.build b/src/login/meson.build index bd350569d5..8be238254a 100644 --- a/src/login/meson.build +++ b/src/login/meson.build @@ -65,25 +65,22 @@ pam_systemd_sym = 'src/login/pam_systemd.sym' pam_systemd_c = files('pam_systemd.c') enable_logind = conf.get('ENABLE_LOGIND') == 1 -in_files = [ - ['logind.conf', pkgsysconfdir, enable_logind and install_sysconfdir_samples], - ['70-uaccess.rules', udevrulesdir, enable_logind and conf.get('HAVE_ACL') == 1], - ['71-seat.rules', udevrulesdir, enable_logind], - ['73-seat-late.rules', udevrulesdir, enable_logind], - ['systemd-user', pamconfdir, enable_logind]] - -foreach tuple : in_files - file = tuple[0] - dir = tuple[1] - install = (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no') - custom_target( - file, - input : file + '.in', - output: file, - command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], - install : tuple[2] and install, - install_dir : dir) -endforeach + +custom_target( + 'logind.conf', + input : 'logind.conf.in', + output : 'logind.conf', + command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], + install : enable_logind and install_sysconfdir_samples and pkgsysconfdir != 'no', + install_dir : pkgsysconfdir) + +custom_target( + 'systemd-user', + input : 'systemd-user.in', + output : 'systemd-user', + command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], + install : enable_logind and pamconfdir != 'no', + install_dir : pamconfdir) if enable_logind install_data('org.freedesktop.login1.conf', @@ -92,8 +89,6 @@ if enable_logind install_dir : dbussystemservicedir) install_data('org.freedesktop.login1.policy', install_dir : polkitpolicydir) - install_data('70-power-switch.rules', - install_dir : udevrulesdir) endif ############################################################ |