archrelease: copy trunk to extra-x86_64
[arch-packages.git] / systemd / repos / core-x86_64 / 0001-Use-Arch-Linux-device-access-groups.patch
blobd884865752099eaf422eda78b13ba851236bf40d
1 From 0e8c18bc2639da328274d02d9222ee2c1f6bf696 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
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 cdrom → optical
10 dialout → uucp
11 tape → storage
12 ---
13 meson.build | 6 +++---
14 meson_options.txt | 12 ++++++------
15 rules.d/50-udev-default.rules.in | 14 +++++++-------
16 sysusers.d/basic.conf.in | 6 +++---
17 4 files changed, 19 insertions(+), 19 deletions(-)
19 diff --git a/meson.build b/meson.build
20 index 76ad51d3fb..5cf679b088 100644
21 --- a/meson.build
22 +++ b/meson.build
23 @@ -915,19 +915,19 @@ conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
24 static_ugids = []
25 foreach option : ['adm-gid',
26 'audio-gid',
27 - 'cdrom-gid',
28 - 'dialout-gid',
29 'disk-gid',
30 'input-gid',
31 'kmem-gid',
32 'kvm-gid',
33 'lp-gid',
34 + 'optical-gid',
35 'render-gid',
36 'sgx-gid',
37 - 'tape-gid',
38 + 'storage-gid',
39 'tty-gid',
40 'users-gid',
41 'utmp-gid',
42 + 'uucp-gid',
43 'video-gid',
44 'wheel-gid',
45 'systemd-journal-gid',
46 diff --git a/meson_options.txt b/meson_options.txt
47 index 814f340840..253a77ecb3 100644
48 --- a/meson_options.txt
49 +++ b/meson_options.txt
50 @@ -257,10 +257,6 @@ option('adm-gid', type : 'integer', value : 0,
51 description : 'soft-static allocation for the "adm" group')
52 option('audio-gid', type : 'integer', value : 0,
53 description : 'soft-static allocation for the "audio" group')
54 -option('cdrom-gid', type : 'integer', value : 0,
55 - description : 'soft-static allocation for the "cdrom" group')
56 -option('dialout-gid', type : 'integer', value : 0,
57 - description : 'soft-static allocation for the "dialout" group')
58 option('disk-gid', type : 'integer', value : 0,
59 description : 'soft-static allocation for the "disk" group')
60 option('input-gid', type : 'integer', value : 0,
61 @@ -271,18 +267,22 @@ option('kvm-gid', type : 'integer', value : 0,
62 description : 'soft-static allocation for the "kvm" group')
63 option('lp-gid', type : 'integer', value : 0,
64 description : 'soft-static allocation for the "lp" group')
65 +option('optical-gid', type : 'integer', value : '0',
66 + description : 'soft-static allocation for the "optical" group')
67 option('render-gid', type : 'integer', value : 0,
68 description : 'soft-static allocation for the "render" group')
69 option('sgx-gid', type : 'integer', value : 0,
70 description : 'soft-static allocation for the "sgx" group')
71 -option('tape-gid', type : 'integer', value : 0,
72 - description : 'soft-static allocation for the "tape" group')
73 +option('storage-gid', type : 'integer', value : '0',
74 + description : 'soft-static allocation for the "storage" group')
75 option('tty-gid', type : 'integer', value : 5,
76 description : 'the numeric GID of the "tty" group')
77 option('users-gid', type : 'integer', value : 0,
78 description : 'soft-static allocation for the "users" group')
79 option('utmp-gid', type : 'integer', value : 0,
80 description : 'soft-static allocation for the "utmp" group')
81 +option('uucp-gid', type : 'integer', value : '0',
82 + description : 'soft-static allocation for the "uucp" group')
83 option('video-gid', type : 'integer', value : 0,
84 description : 'soft-static allocation for the "video" group')
85 option('wheel-gid', type : 'integer', value : 0,
86 diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
87 index 843bdaf9ce..a192f091df 100644
88 --- a/rules.d/50-udev-default.rules.in
89 +++ b/rules.d/50-udev-default.rules.in
90 @@ -26,7 +26,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
91 SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
92 SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
93 SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
94 -KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
95 +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
97 SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
99 @@ -72,13 +72,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp"
100 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
102 SUBSYSTEM=="block", GROUP="disk"
103 -SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
104 -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
105 -KERNEL=="sch[0-9]*", GROUP="cdrom"
106 -KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
107 -KERNEL=="pktcdvd", GROUP="cdrom"
108 +SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical"
109 +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical"
110 +KERNEL=="sch[0-9]*", GROUP="optical"
111 +KERNEL=="pktcdvd[0-9]*", GROUP="optical"
112 +KERNEL=="pktcdvd", GROUP="optical"
114 -SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
115 +SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage"
116 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
117 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
118 KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
119 diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in
120 index a602b872e4..8d38febb6a 100644
121 --- a/sysusers.d/basic.conf.in
122 +++ b/sysusers.d/basic.conf.in
123 @@ -23,17 +23,17 @@ g utmp {{UTMP_GID }} - -
125 # Physical and virtual hardware access groups
126 g audio {{AUDIO_GID }} - -
127 -g cdrom {{CDROM_GID }} - -
128 -g dialout {{DIALOUT_GID}} - -
129 g disk {{DISK_GID }} - -
130 g input {{INPUT_GID }} - -
131 g kmem {{KMEM_GID }} - -
132 g kvm {{KVM_GID }} - -
133 g lp {{LP_GID }} - -
134 +g optical {{OPTICAL_GID}} - -
135 g render {{RENDER_GID }} - -
136 g sgx {{SGX_GID }} - -
137 -g tape {{TAPE_GID }} - -
138 +g storage {{STORAGE_GID}} - -
139 g tty {{TTY_GID }} - -
140 +g uucp {{UUCP_GID }} - -
141 g video {{VIDEO_GID }} - -
143 # Default group for normal users
145 From 9e2987a7b4d09d7b554141e9ef2c911cb3fda570 Mon Sep 17 00:00:00 2001
146 From: Christian Hesse <mail@eworm.de>
147 Date: Mon, 27 Dec 2021 23:32:42 +0100
148 Subject: [PATCH] generate tmpfiles.d/legacy.conf
151 tmpfiles.d/legacy.conf.in | 3 ---
152 tmpfiles.d/meson.build | 2 +-
153 2 files changed, 1 insertion(+), 4 deletions(-)
155 diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
156 index 4f2c0d7c43..62e2ae0986 100644
157 --- a/tmpfiles.d/legacy.conf.in
158 +++ b/tmpfiles.d/legacy.conf.in
159 @@ -12,9 +12,6 @@
161 d /run/lock 0755 root root -
162 L /var/lock - - - - ../run/lock
163 -{% if CREATE_LOG_DIRS %}
164 -L /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
165 -{% endif %}
167 # /run/lock/subsys is used for serializing SysV service execution, and
168 # hence without use on SysV-less systems.
169 diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
170 index ca1abbf3fe..25e2b53402 100644
171 --- a/tmpfiles.d/meson.build
172 +++ b/tmpfiles.d/meson.build
173 @@ -29,7 +29,7 @@ foreach pair : files
174 endforeach
176 in_files = [['etc.conf', ''],
177 - ['legacy.conf', 'HAVE_SYSV_COMPAT'],
178 + ['legacy.conf', ''],
179 ['static-nodes-permissions.conf', ''],
180 ['systemd.conf', ''],
181 ['var.conf', ''],