1 From f7d07e298c819a81eab965efbdbf53a2ce67fc0e Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3 Date: Tue, 6 Mar 2018 23:39:47 +0100
4 Subject: [PATCH] Use Arch Linux' device access groups
10 meson.build | 6 +++---
11 meson_options.txt | 12 ++++++------
12 rules.d/50-udev-default.rules.in | 14 +++++++-------
13 sysusers.d/basic.conf.in | 6 +++---
14 4 files changed, 19 insertions(+), 19 deletions(-)
16 diff --git a/meson.build b/meson.build
17 index 32e5413a62..f781e06fed 100644
20 @@ -796,19 +796,19 @@ conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
22 foreach option : ['adm-gid',
42 'systemd-journal-gid',
43 diff --git a/meson_options.txt b/meson_options.txt
44 index 5048de755d..676e5e2e0d 100644
45 --- a/meson_options.txt
46 +++ b/meson_options.txt
47 @@ -235,10 +235,6 @@ option('adm-gid', type : 'integer', value : '-1',
48 description : 'soft-static allocation for the "adm" group')
49 option('audio-gid', type : 'integer', value : '-1',
50 description : 'soft-static allocation for the "audio" group')
51 -option('cdrom-gid', type : 'integer', value : '-1',
52 - description : 'soft-static allocation for the "cdrom" group')
53 -option('dialout-gid', type : 'integer', value : '-1',
54 - description : 'soft-static allocation for the "dialout" group')
55 option('disk-gid', type : 'integer', value : '-1',
56 description : 'soft-static allocation for the "disk" group')
57 option('input-gid', type : 'integer', value : '-1',
58 @@ -249,18 +245,22 @@ option('kvm-gid', type : 'integer', value : '-1',
59 description : 'soft-static allocation for the "kvm" group')
60 option('lp-gid', type : 'integer', value : '-1',
61 description : 'soft-static allocation for the "lp" group')
62 +option('optical-gid', type : 'integer', value : '-1',
63 + description : 'soft-static allocation for the "optical" group')
64 option('render-gid', type : 'integer', value : '-1',
65 description : 'soft-static allocation for the "render" group')
66 option('sgx-gid', type : 'integer', value : '-1',
67 description : 'soft-static allocation for the "sgx" group')
68 -option('tape-gid', type : 'integer', value : '-1',
69 - description : 'soft-static allocation for the "tape" group')
70 +option('storage-gid', type : 'integer', value : '-1',
71 + description : 'soft-static allocation for the "storage" group')
72 option('tty-gid', type : 'integer', value : 5,
73 description : 'the numeric GID of the "tty" group')
74 option('users-gid', type : 'integer', value : '-1',
75 description : 'soft-static allocation for the "users" group')
76 option('utmp-gid', type : 'integer', value : '-1',
77 description : 'soft-static allocation for the "utmp" group')
78 +option('uucp-gid', type : 'integer', value : '-1',
79 + description : 'soft-static allocation for the "uucp" group')
80 option('video-gid', type : 'integer', value : '-1',
81 description : 'soft-static allocation for the "video" group')
82 option('wheel-gid', type : 'integer', value : '-1',
83 diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
84 index 18a3cf46bf..f3c440fd89 100644
85 --- a/rules.d/50-udev-default.rules.in
86 +++ b/rules.d/50-udev-default.rules.in
87 @@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
88 SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
89 SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
90 SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
91 -KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
92 +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
94 SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
96 @@ -67,13 +67,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp"
97 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
99 SUBSYSTEM=="block", GROUP="disk"
100 -SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
101 -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
102 -KERNEL=="sch[0-9]*", GROUP="cdrom"
103 -KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
104 -KERNEL=="pktcdvd", GROUP="cdrom"
105 +SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical"
106 +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical"
107 +KERNEL=="sch[0-9]*", GROUP="optical"
108 +KERNEL=="pktcdvd[0-9]*", GROUP="optical"
109 +KERNEL=="pktcdvd", GROUP="optical"
111 -SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
112 +SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage"
113 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
114 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
115 KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
116 diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in
117 index 8cc1a7cad2..21bb6d8948 100644
118 --- a/sysusers.d/basic.conf.in
119 +++ b/sysusers.d/basic.conf.in
120 @@ -22,17 +22,17 @@ g utmp {{UTMP_GID }} - -
122 # Physical and virtual hardware access groups
123 g audio {{AUDIO_GID }} - -
124 -g cdrom {{CDROM_GID }} - -
125 -g dialout {{DIALOUT_GID}} - -
126 g disk {{DISK_GID }} - -
127 g input {{INPUT_GID }} - -
128 g kmem {{KMEM_GID }} - -
129 g kvm {{KVM_GID }} - -
131 +g optical {{OPTICAL_GID}} - -
132 g render {{RENDER_GID }} - -
133 g sgx {{SGX_GID }} - -
134 -g tape {{TAPE_GID }} - -
135 +g storage {{STORAGE_GID}} - -
136 g tty {{TTY_GID }} - -
137 +g uucp {{UUCP_GID }} - -
138 g video {{VIDEO_GID }} - -
140 # Default group for normal users
141 From 14de5ced41edc9fa8e380330c03adc89ef257fbc Mon Sep 17 00:00:00 2001
142 From: Christian Hesse <mail@eworm.de>
143 Date: Mon, 27 Dec 2021 23:32:42 +0100
144 Subject: [PATCH] generate tmpfiles.d/legacy.conf
146 tmpfiles.d/legacy.conf.in | 3 ---
147 tmpfiles.d/meson.build | 2 +-
148 2 files changed, 1 insertion(+), 4 deletions(-)
150 diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
151 index 4f2c0d7c43..62e2ae0986 100644
152 --- a/tmpfiles.d/legacy.conf.in
153 +++ b/tmpfiles.d/legacy.conf.in
156 d /run/lock 0755 root root -
157 L /var/lock - - - - ../run/lock
158 -{% if CREATE_LOG_DIRS %}
159 -L /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
162 # /run/lock/subsys is used for serializing SysV service execution, and
163 # hence without use on SysV-less systems.
164 diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
165 index b8d3919025..000bd0bd22 100644
166 --- a/tmpfiles.d/meson.build
167 +++ b/tmpfiles.d/meson.build
168 @@ -27,7 +27,7 @@ foreach pair : files
171 in_files = [['etc.conf', ''],
172 - ['legacy.conf', 'HAVE_SYSV_COMPAT'],
173 + ['legacy.conf', ''],
174 ['static-nodes-permissions.conf', ''],
175 ['systemd.conf', ''],