mirror of
https://github.com/KDE/kde-linux.git
synced 2025-12-24 00:18:23 -05:00
Add udev rules from sane package
The whole package is overkill; literally all we need are the udev rules. So just add them specifically. Resolves #250
This commit is contained in:
15
REUSE.toml
15
REUSE.toml
@@ -29,3 +29,18 @@ SPDX-License-Identifier = "CC0-1.0"
|
||||
path="mkosi.extra/usr/lib/udev/rules.d/60-usb-dirty-pages-udev.rules"
|
||||
SPDX-FileCopyrightText = "2023 Bruno Gonçalves <www.biglinux.com.br>"
|
||||
SPDX-License-Identifier = "GPL-3.0-or-later"
|
||||
|
||||
[[annotations]]
|
||||
path="mkosi.extra/usr/lib/udev/rules.d/65-sane.rules"
|
||||
SPDX-FileCopyrightText = "none"
|
||||
SPDX-License-Identifier = "GPL-2.0-only"
|
||||
|
||||
[[annotations]]
|
||||
path="mkosi.extra/usr/lib/udev/rules.d/66-saned.rules"
|
||||
SPDX-FileCopyrightText = "none"
|
||||
SPDX-License-Identifier = "GPL-2.0-only"
|
||||
|
||||
[[annotations]]
|
||||
path="mkosi.extra/usr/lib/udev/hwdb.d/20-sane.hwdb"
|
||||
SPDX-FileCopyrightText = "none"
|
||||
SPDX-License-Identifier = "GPL-2.0-only"
|
||||
|
||||
7176
mkosi.extra/usr/lib/udev/hwdb.d/20-sane.hwdb
Normal file
7176
mkosi.extra/usr/lib/udev/hwdb.d/20-sane.hwdb
Normal file
File diff suppressed because it is too large
Load Diff
149
mkosi.extra/usr/lib/udev/rules.d/65-sane.rules
Normal file
149
mkosi.extra/usr/lib/udev/rules.d/65-sane.rules
Normal file
@@ -0,0 +1,149 @@
|
||||
# This file was generated from description files (*.desc)
|
||||
# by sane-desc 3.6 from sane-backends 1.4.0
|
||||
#
|
||||
# udev rules file for supported USB and SCSI devices
|
||||
#
|
||||
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
|
||||
#
|
||||
# The SCSI device support is very basic and includes only
|
||||
# scanners that mark themselves as type "scanner" or
|
||||
# SCSI-scanners from HP and other vendors that are entitled "processor"
|
||||
# but are treated accordingly.
|
||||
#
|
||||
# If your SCSI scanner isn't listed below, you can add it to a new rules
|
||||
# file under /etc/udev/rules.d/.
|
||||
#
|
||||
# If your scanner is supported by some external backend (brother, epkowa,
|
||||
# hpaio, etc) please ask the author of the backend to provide proper
|
||||
# device detection support for your OS
|
||||
#
|
||||
# If the scanner is supported by sane-backends, please mail the entry to
|
||||
# the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
|
||||
#
|
||||
ACTION=="remove", GOTO="libsane_rules_end"
|
||||
|
||||
# The following rule will disable USB autosuspend for the device
|
||||
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"
|
||||
|
||||
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
|
||||
GOTO="libsane_rules_end"
|
||||
|
||||
LABEL="libsane_scsi_rules_begin"
|
||||
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"
|
||||
|
||||
# Generic: SCSI device type 6 indicates a scanner
|
||||
ATTRS{type}=="6", ENV{libsane_matched}="yes"
|
||||
|
||||
# Some scanners advertise themselves as SCSI device type 3
|
||||
|
||||
# Wildcard: for some Epson SCSI scanners
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Expression 800 | Epson Expression 800
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Perfection 1640SU | Epson Perfection 1640SU PHOTO
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1640", ENV{libsane_matched}="yes"
|
||||
|
||||
# Epson Perfection 636 | Epson Perfection 636S
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet 4p
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet IIc
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet IIp
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet IIcx
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet 4c
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet 5p
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet 6200C
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"
|
||||
|
||||
# Hewlett-Packard ScanJet 6300C
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"
|
||||
|
||||
|
||||
LABEL="libsane_rules_end"
|
||||
# This file was generated from description files (*.desc)
|
||||
# by sane-desc 3.6 from sane-backends 1.4.0
|
||||
#
|
||||
# udev rules file for supported USB and SCSI devices
|
||||
#
|
||||
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
|
||||
#
|
||||
# The SCSI device support is very basic and includes only
|
||||
# scanners that mark themselves as type "scanner" or
|
||||
# SCSI-scanners from HP and other vendors that are entitled "processor"
|
||||
# but are treated accordingly.
|
||||
#
|
||||
# If your SCSI scanner isn't listed below, you can add it to a new rules
|
||||
# file under /etc/udev/rules.d/.
|
||||
#
|
||||
# If your scanner is supported by some external backend (brother, epkowa,
|
||||
# hpaio, etc) please ask the author of the backend to provide proper
|
||||
# device detection support for your OS
|
||||
#
|
||||
# If the scanner is supported by sane-backends, please mail the entry to
|
||||
# the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
|
||||
#
|
||||
ACTION=="remove", GOTO="libsane_rules_end"
|
||||
|
||||
# The following rule will disable USB autosuspend for the device
|
||||
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"
|
||||
|
||||
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
|
||||
GOTO="libsane_rules_end"
|
||||
|
||||
LABEL="libsane_scsi_rules_begin"
|
||||
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"
|
||||
|
||||
# Generic: SCSI device type 6 indicates a scanner
|
||||
ATTRS{type}=="6", ENV{libsane_matched}="yes"
|
||||
|
||||
# Some scanners advertise themselves as SCSI device type 3
|
||||
|
||||
# Wildcard: for some Epson SCSI scanners
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON Expression 800
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON GT-9700F | EPSON Perfection 2450 PHOTO
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON GT-9800F | EPSON Perfection 3200 PHOTO
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON GT-X900 | EPSON Perfection V700 Photo | EPSON Perfection V750 Photo
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON Perfection 1200S
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"
|
||||
|
||||
# EPSON Perfection 636S
|
||||
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"
|
||||
|
||||
|
||||
LABEL="libsane_rules_end"
|
||||
2
mkosi.extra/usr/lib/udev/rules.d/66-saned.rules
Normal file
2
mkosi.extra/usr/lib/udev/rules.d/66-saned.rules
Normal file
@@ -0,0 +1,2 @@
|
||||
# udev rule for saned (SANE scanning daemon) to be able to write on usb port
|
||||
ENV{libsane_matched}=="yes", ENV{DEVNAME}!="", RUN+="/usr/bin/setfacl -m g:saned:rw $env{DEVNAME}"
|
||||
Reference in New Issue
Block a user