1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Artix): Artoo <artoo@artixlinux.org>
# Contributor (Artix): Christian Hesse <mail@eworm.de>
# Contributor (Artix): Dave Reisner <dreisner@archlinux.org>
# Contributor (Artix): Tom Gundersen <teg@jklm.no>
_pkgbase=systemd-stable
pkgbase=udev
pkgname=('udev' 'libudev' 'esysusers' 'etmpfiles')
pkgdesc='Userspace device file manager'
_tag='95d0353dad616c275fda9b123ba9660e16b20d0a' # git rev-parse v${_tag_name}
_tag_name=250.2
pkgver="${_tag_name/-/}"
pkgrel=1
arch=('x86_64')
arch+=('i686' 'armv7h')
url='https://www.github.com/systemd/systemd'
license=('GPL2' 'LGPL2.1')
makedepends=('acl' 'libacl.so' 'kmod' 'libkmod.so' 'util-linux' 'libblkid.so'
'hwdata' 'libcap' 'libcap.so' 'kbd' 'gperf' 'intltool' 'git'
'meson' 'docbook-xsl' 'rsync' 'python-jinja')
options=('strip')
validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
'5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
_commit=29cd296aa4635fe6f7b53bda2f2cb1648bdc0782
source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
"git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
'0001-Use-Arch-Linux-device-access-groups.patch'
initcpio-{hook,install}-udev
git+https://gitea.artixlinux.org/artix/alpm-hooks.git#commit=$_commit)
sha512sums=('SKIP'
'SKIP'
'10f3b477527ec263cc6465c84d94416e356435930edc9e26844a0fd4f71e87a27fa0f91ce24b43a22cacdd2ead5e760e9d607369bc537a8da8d34021302a89a1'
'32606b42856b5f3ea7f485143e532671f58986237e14c58ea5ab17383dc39a375cb6c738c8a2db9e4a8c8be88ea44a876d6bbed129cb2f5c9aa3f8228b04d927'
'38eed28d42ac8f70bc8d1058ace35f137f7f5c972442ee14b98c2146202e0615aa584304edbd59e8608d1b6bec3cb391fc69b25393740f6eabd8fc5ad3bde64f'
'SKIP')
_backports=(
)
_reverts=(
)
prepare() {
cd "$_pkgbase"
# add upstream repository for cherry-picking
git remote add -f upstream ../systemd
local _c
for _c in "${_backports[@]}"; do
git log --oneline -1 "${_c}"
git cherry-pick -n "${_c}"
done
for _c in "${_reverts[@]}"; do
git log --oneline -1 "${_c}"
git revert -n "${_c}"
done
# Replace cdrom/dialout/tape groups with optical/uucp/storage
patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
}
_get_libudev() {
echo "$(readlink build/libudev.so.1)"
}
_inst_bin() {
local bin="$1"
install -Dm755 build/systemd-"$bin".standalone "${pkgdir}"/usr/bin/"$bin"
install -d "${pkgdir}"/usr/lib/"$bin".d
install -d "${pkgdir}"/usr/share/{doc/"${pkgname}",man/man{5,8}}
install -m644 build/man/"$bin".d.5 "${pkgdir}"/usr/share/man/man5/
install -m644 build/man/systemd-"$bin".8 "${pkgdir}"/usr/share/man/man8/"$bin".8
install -m644 "$_pkgbase"/LICENSE.* "${pkgdir}"/usr/share/doc/"${pkgname}"
}
build() {
local _meson_options=()
_meson_options+=(
-Dversion-tag="${_tag_name/-/\~}-${pkgrel}-parabola"
-Dmode=release
-Dstandalone-binaries=true
-Dsysusers=true
-Dtmpfiles=true
-Dadm-group=true
-Dwheel-group=true
-Dgshadow=true
-Dhwdb=true
-Dblkid=true
-Dman=false
-Dtests=false
-Ddns-servers=''
-Dntp-servers=''
-Defi=false
-Dlink-udev-shared=false
-Dlibidn2=false
-Dlibidn=false
-Dlibcryptsetup=false
-Didn=false
-Dgcrypt=false
-Dlibiptc=false
-Dlz4=false
-Dp11kit=false
-Dseccomp=false
-Dxz=false
-Dtimesyncd=false
-Dnss-systemd=false
-Dnss-resolve=false
-Dnss-mymachines=false
-Dnss-myhostname=false
-Dnetworkd=false
-Dmachined=false
-Dtimedated=false
-Dkernel-install=false
-Dresolve=false
-Dxdg-autostart=false
)
arch-meson "$_pkgbase" build "${_meson_options[@]}"
local _udev=() _man=() _ebin=()
_udev+=(
$(_get_libudev)
src/libudev/libudev.pc
udevadm
src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,dmi_memory_id,scsi_id,v4l_id}
src/udev/udev.pc
rules.d/{50-udev-default.rules,64-btrfs.rules}
hwdb.d/60-autosuspend-chromiumos.hwdb
)
_ebin+=(
systemd-{sysusers,tmpfiles}.standalone
sysusers.d/basic.conf
tmpfiles.d/{etc,static-nodes-permissions,var}.conf
)
_man+=(
man/{sysusers,tmpfiles}.d.5
man/systemd-{sysusers,tmpfiles}.8
man/{libudev.3,udev.conf.5,hwdb.7,udev.7,udevadm.8}
)
ninja -C build "${_udev[@]}" "${_ebin[@]}" "${_man[@]}"
}
package_udev() {
pkgdesc='Userspace device file manager'
depends=('acl' 'libacl.so' 'kmod' 'libkmod.so'
'util-linux' 'libblkid.so' 'libudev' 'hwdata' 'kbd')
provides=("udev=$pkgver" 'eudev')
replaces=('eudev')
install -d "${pkgdir}"/etc/udev/{hwdb,rules}.d
mv -v "$_pkgbase"/src/udev/udev.conf "${pkgdir}"/etc/udev
install -d "${pkgdir}"/usr/bin
mv -v build/udevadm "${pkgdir}"/usr/bin/udevadm
ln -sfv udevadm "${pkgdir}"/usr/bin/udevd
install -d "${pkgdir}"/usr/{share,lib}/pkgconfig
mv -v build/src/libudev/libudev.pc "${pkgdir}"/usr/lib/pkgconfig
mv -v build/src/udev/udev.pc "${pkgdir}"/usr/share/pkgconfig
install -d "${pkgdir}"/usr/lib/udev
mv -v build/src/udev/{*_id,mtd_probe} "${pkgdir}"/usr/lib/udev
mv -v build/hwdb.d "${pkgdir}"/usr/lib/udev/
mv -v "$_pkgbase"/hwdb.d/{*.hwdb,README} "${pkgdir}"/usr/lib/udev/hwdb.d/
mv -v build/rules.d "${pkgdir}"/usr/lib/udev/
mv -v "$_pkgbase"/rules.d/{*.rules,README} "${pkgdir}"/usr/lib/udev/rules.d/
install -d "${pkgdir}"/usr/include
mv -v "$_pkgbase"/src/libudev/libudev.h "${pkgdir}"/usr/include
install -d "${pkgdir}"/usr/share/man/man{3,5,7,8}
mv -v build/man/libudev.3 "${pkgdir}"/usr/share/man/man3/
mv -v build/man/udev.conf.5 "${pkgdir}"/usr/share/man/man5/
mv -v build/man/udev.7 "${pkgdir}"/usr/share/man/man7/
mv -v build/man/udevadm.8 "${pkgdir}"/usr/share/man/man8/
install -d "${pkgdir}"/usr/share/doc/"${pkgname}"
install -m644 "$_pkgbase"/LICENSE.* "${pkgdir}"/usr/share/doc/"${pkgname}"
# initcpio
install -D -m0644 initcpio-install-udev "${pkgdir}"/usr/lib/initcpio/install/udev
install -D -m0644 initcpio-hook-udev "${pkgdir}"/usr/lib/initcpio/hooks/udev
# pacman hooks
make -C alpm-hooks DESTDIR="${pkgdir}" install_udev
}
package_libudev() {
pkgdesc='udev library for enumerating and introspecting local devices'
depends=('gcc-libs')
provides=('libudev.so' 'libeudev')
replaces=('libeudev')
install -d "${pkgdir}"/usr/lib
mv -v build/{libudev.so{,.1},$(_get_libudev)} "${pkgdir}"/usr/lib/
}
package_esysusers() {
pkgdesc='the sysusers.d binary'
groups=('base-devel')
depends=('gcc-libs' 'libxcrypt')
_inst_bin sysusers
mv -v build/sysusers.d/basic.conf "${pkgdir}"/usr/lib/sysusers.d
mv -v "$_pkgbase"/sysusers.d/README "${pkgdir}"/usr/lib/sysusers.d
# pacman hooks
make -C alpm-hooks DESTDIR="${pkgdir}" install_sysusers
}
package_etmpfiles() {
pkgdesc='the tmpfiles.d binary'
groups=('base-devel')
depends=('acl' 'libacl.so' 'libcap' 'libcap.so')
_inst_bin tmpfiles
install -d "${pkgdir}"/etc/tmpfiles.d
mv -v build/tmpfiles.d "${pkgdir}"/usr/lib/
mv -v "$_pkgbase"/tmpfiles.d/{{tmp,home,x11}.conf,README} "${pkgdir}"/usr/lib/tmpfiles.d
# pacman hooks
make -C alpm-hooks DESTDIR="${pkgdir}" install_tmpfiles
}
|