1 # Maintainer: Christian Hesse <mail@eworm.de>
9 _tag='884b34747beaab5909cd65f36ff48afc86377d48' # git rev-parse v${_tag_name}
11 pkgver="${_tag_name/-/}"
14 url='https://www.github.com/systemd/systemd'
15 makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
16 'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
17 'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
18 'python-jinja' 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
19 'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
20 'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync'
21 'bpf' 'libbpf' 'clang' 'llvm' 'curl' 'gnutls')
23 validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
24 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
25 '9A774DB5DB996C154EBBFBFDA0099A18E29326E1' # Yu Watanabe <watanabe.yu+github@gmail.com>
26 '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
27 source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
28 "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
29 '0001-Use-Arch-Linux-device-access-groups.patch'
31 'initcpio-install-systemd'
32 'initcpio-install-udev'
38 '20-systemd-sysusers.hook'
39 '30-systemd-binfmt.hook'
40 '30-systemd-catalog.hook'
41 '30-systemd-daemon-reload.hook'
42 '30-systemd-hwdb.hook'
43 '30-systemd-sysctl.hook'
44 '30-systemd-tmpfiles.hook'
45 '30-systemd-udev-reload.hook'
46 '30-systemd-update.hook')
49 '3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e'
50 '4a6cd0cf6764863985dc5ad774d7c93b574645a05b3295f989342951d43c71696d069641592e37eeadb6d6f0531576de96b6392224452f15cd9f056fae038f8e'
51 '12f3c011a0164d28b092722639fff92c663c18b032d421695b0a72dbf123dd0908e3822087766ee922e131c02126f67ba2e1983c5cc244f5c4884dfed8605d00'
52 'a8c7e4a2cc9c9987e3c957a1fc3afe8281f2281fffd2e890913dcf00cf704024fb80d86cb75f9314b99b0e03bac275b22de93307bfc226d8be9435497e95b7e6'
53 '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
54 'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
55 '5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
56 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19'
57 'a481662fa406f46f69d721fa47c12b1a9ed9b8bc219205e2a156f27bdc9f353f3ec97753717452f603500e3bdf6062335190797512e4f29c1526c35297abe37b'
58 '299dcc7094ce53474521356647bdd2fb069731c08d14a872a425412fcd72da840727a23664b12d95465bf313e8e8297da31259508d1c62cc2dcea596160e21c5'
59 '0d6bc3d928cfafe4e4e0bc04dbb95c5d2b078573e4f9e0576e7f53a8fab08a7077202f575d74a3960248c4904b5f7f0661bf17dbe163c524ab51dd30e3cb80f7'
60 '2b50b25e8680878f7974fa9d519df7e141ca11c4bfe84a92a5d01bb193f034b1726ea05b3c0030bad1fbda8dbb78bf1dc7b73859053581b55ba813c39b27d9dc'
61 '63e55b3acd14bc54320b6f2310b43398651ad4e262d4f4a0135e05d34a993e56ed673cc46e57f15b418371df5c4cef6f54486db96325e4abb1d33fb1a3946254'
62 'a1661ab946c6cd7d3c6251a2a9fd68afe231db58ce33c92c42594aedb5629be8f299ba08a34713327b373a3badd1554a150343d8d3e5dfb102999c281bd49154'
63 '9426829605bbb9e65002437e02ed54e35c20fdf94706770a3dc1049da634147906d6b98bf7f5e7516c84068396a12c6feaf72f92b51bdf19715e0f64620319de'
64 'da7a97d5d3701c70dd5388b0440da39006ee4991ce174777931fea2aa8c90846a622b2b911f02ae4d5fffb92680d9a7e211c308f0f99c04896278e2ee0d9a4dc'
65 'a50d202a9c2e91a4450b45c227b295e1840cc99a5e545715d69c8af789ea3dd95a03a30f050d52855cabdc9183d4688c1b534eaa755ebe93616f9d192a855ee3'
66 '825b9dd0167c072ba62cabe0677e7cd20f2b4b850328022540f122689d8b25315005fa98ce867cf6e7460b2b26df16b88bb3b5c9ebf721746dce4e2271af7b97')
77 # add upstream repository for cherry-picking
78 git remote add -f upstream ../systemd
81 for _c in "${_backports[@]}"; do
82 if [[ $_c == *..* ]]; then
83 git log --oneline --reverse "${_c}"
85 git log --oneline -1 "${_c}"
87 git cherry-pick -n -m1 "${_c}"
89 for _c in "${_reverts[@]}"; do
90 git log --oneline -1 "${_c}"
94 # Replace cdrom/dialout/tape groups with optical/uucp/storage
95 patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
99 local _timeservers=({0..3}.arch.pool.ntp.org)
101 # We use these public name services, ordered by their privacy policy (hopefully):
102 # * Cloudflare (https://1.1.1.1/)
103 # * Quad9 (https://www.quad9.net/)
104 # * Google (https://developers.google.com/speed/public-dns/)
105 '1.1.1.1#cloudflare-dns.com'
106 '9.9.9.9#dns.quad9.net'
108 '2606:4700:4700::1111#cloudflare-dns.com'
109 '2620:fe::9#dns.quad9.net'
110 '2001:4860:4860::8888#dns.google'
113 local _meson_options=(
114 # internal version comparison is incompatible with pacman:
115 # 249~rc1 < 249 < 249.1 < 249rc
116 -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-arch"
117 -Dshared-lib-tag="${pkgver}-${pkgrel}"
127 # We disable DNSSEC by default, it still causes trouble:
128 # https://github.com/systemd/systemd/issues/10579
130 -Ddbuspolicydir=/usr/share/dbus-1/system.d
132 -Ddefault-hierarchy=unified
133 -Ddefault-kill-user-processes=false
134 -Ddefault-locale='C.UTF-8'
135 -Dlocalegen-path=/usr/bin/locale-gen
136 -Ddns-over-tls=openssl
137 -Dfallback-hostname='archlinux'
138 -Dnologin-path=/usr/bin/nologin
139 -Dntp-servers="${_timeservers[*]}"
140 -Ddns-servers="${_nameservers[*]}"
146 -Dsbat-distro-summary='Arch Linux'
147 -Dsbat-distro-pkgname="${pkgname}"
148 -Dsbat-distro-version="${pkgver}"
149 -Dsbat-distro-url="https://archlinux.org/packages/core/x86_64/${pkgname}/"
152 arch-meson "$pkgbase-stable" build "${_meson_options[@]}"
154 meson compile -C build
162 pkgdesc='system and service manager'
163 license=('GPL2' 'LGPL2.1')
164 depends=('acl' 'libacl.so' 'bash' 'cryptsetup' 'libcryptsetup.so' 'dbus'
165 'iptables' 'kbd' 'kmod' 'libkmod.so' 'hwdata' 'libcap' 'libcap.so'
166 'libgcrypt' 'libxcrypt' 'libcrypt.so' 'systemd-libs' 'libidn2' 'lz4' 'pam'
167 'libelf' 'libseccomp' 'libseccomp.so' 'util-linux' 'libblkid.so'
168 'libmount.so' 'xz' 'pcre2' 'audit' 'libaudit.so'
169 'openssl' 'libcrypto.so' 'libssl.so')
170 provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
171 replaces=('nss-myhostname' 'systemd-tools' 'udev')
172 conflicts=('nss-myhostname' 'systemd-tools' 'udev')
173 optdepends=('libmicrohttpd: systemd-journal-gatewayd and systemd-journal-remote'
174 'quota-tools: kernel-level quota management'
175 'systemd-sysvcompat: symlink package to provide sysvinit binaries'
176 'systemd-ukify: combine kernel and initrd into a signed Unified Kernel Image'
177 'polkit: allow administration as unprivileged user'
178 'python: Unified Kernel Image with ukify'
179 'curl: systemd-journal-upload, machinectl pull-tar and pull-raw'
180 'gnutls: systemd-journal-gatewayd and systemd-journal-remote'
181 'libbpf: support BPF programs'
182 'libfido2: unlocking LUKS2 volumes with FIDO2 token'
183 'libp11-kit: support PKCS#11'
184 'tpm2-tss: unlocking LUKS2 volumes with TPM2')
185 backup=(etc/pam.d/systemd-user
186 etc/systemd/coredump.conf
187 etc/systemd/homed.conf
188 etc/systemd/journald.conf
189 etc/systemd/journal-remote.conf
190 etc/systemd/journal-upload.conf
191 etc/systemd/logind.conf
192 etc/systemd/networkd.conf
193 etc/systemd/oomd.conf
194 etc/systemd/pstore.conf
195 etc/systemd/resolved.conf
196 etc/systemd/sleep.conf
197 etc/systemd/system.conf
198 etc/systemd/timesyncd.conf
199 etc/systemd/user.conf
201 install=systemd.install
203 meson install -C build --destdir "$pkgdir"
205 # we'll create this on installation
206 rmdir "$pkgdir"/var/log/journal/remote
208 # runtime libraries shipped with systemd-libs
209 install -d -m0755 systemd-libs/lib/
210 mv "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so* systemd-libs/lib/
211 mv "$pkgdir"/usr/lib/pkgconfig systemd-libs/lib/pkgconfig
212 mv "$pkgdir"/usr/include systemd-libs/include
213 mv "$pkgdir"/usr/share/man/man3 systemd-libs/man3
215 # ukify shipped in separate package
216 install -d -m0755 systemd-ukify/{systemd,man1}
217 mv "$pkgdir"/usr/lib/systemd/ukify systemd-ukify/systemd/
218 mv "$pkgdir"/usr/share/man/man1/ukify.1 systemd-ukify/man1/
220 # manpages shipped with systemd-sysvcompat
221 rm "$pkgdir"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8
223 # executable (symlinks) shipped with systemd-sysvcompat
224 rm "$pkgdir"/usr/bin/{halt,init,poweroff,reboot,shutdown}
226 # files shipped with systemd-resolvconf
227 rm "$pkgdir"/usr/{bin/resolvconf,share/man/man1/resolvconf.1}
229 # avoid a potential conflict with [core]/filesystem
230 rm "$pkgdir"/usr/share/factory/etc/{issue,nsswitch.conf}
231 sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
232 -e '/^C \/etc\/issue/d' "$pkgdir"/usr/lib/tmpfiles.d/etc.conf
234 # ship default policy to leave services disabled
235 echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
237 # add mkinitcpio hooks
238 install -D -m0644 initcpio-install-systemd "$pkgdir"/usr/lib/initcpio/install/systemd
239 install -D -m0644 initcpio-install-udev "$pkgdir"/usr/lib/initcpio/install/udev
240 install -D -m0644 initcpio-hook-udev "$pkgdir"/usr/lib/initcpio/hooks/udev
242 # The group 'systemd-journal' is allocated dynamically and may have varying
243 # gid on different systems. Let's install with gid 0 (root), systemd-tmpfiles
244 # will fix the permissions for us. (see /usr/lib/tmpfiles.d/systemd.conf)
245 install -d -o root -g root -m 2755 "$pkgdir"/var/log/journal
247 # match directory owner/group and mode from [extra]/polkit
248 install -d -o root -g 102 -m 0750 "$pkgdir"/usr/share/polkit-1/rules.d
250 # add example bootctl configuration
251 install -D -m0644 arch.conf "$pkgdir"/usr/share/systemd/bootctl/arch.conf
252 install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
253 install -D -m0644 splash-arch.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp
256 install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
257 install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *.hook
259 # overwrite the systemd-user PAM configuration with our own
260 install -D -m0644 systemd-user.pam "$pkgdir"/etc/pam.d/systemd-user
263 package_systemd-libs() {
264 pkgdesc='systemd client libraries'
265 depends=('glibc' 'gcc-libs' 'libcap' 'libgcrypt' 'lz4' 'xz' 'zstd')
267 provides=('libsystemd' 'libsystemd.so' 'libudev.so')
268 conflicts=('libsystemd')
269 replaces=('libsystemd')
271 install -d -m0755 "$pkgdir"/usr/share/man
272 mv systemd-libs/lib "$pkgdir"/usr/lib
273 mv systemd-libs/include "$pkgdir"/usr/include
274 mv systemd-libs/man3 "$pkgdir"/usr/share/man/man3
277 package_systemd-resolvconf() {
278 pkgdesc='systemd resolvconf replacement (for use with systemd-resolved)'
281 provides=('openresolv' 'resolvconf')
282 conflicts=('openresolv')
284 install -d -m0755 "$pkgdir"/usr/bin
285 ln -s resolvectl "$pkgdir"/usr/bin/resolvconf
287 install -d -m0755 "$pkgdir"/usr/share/man/man1
288 ln -s resolvectl.1.gz "$pkgdir"/usr/share/man/man1/resolvconf.1.gz
291 package_systemd-sysvcompat() {
292 pkgdesc='sysvinit compat for systemd'
294 conflicts=('sysvinit')
297 install -D -m0644 -t "$pkgdir"/usr/share/man/man8 \
298 build/man/{halt,poweroff,reboot,shutdown}.8
300 install -d -m0755 "$pkgdir"/usr/bin
301 ln -s ../lib/systemd/systemd "$pkgdir"/usr/bin/init
302 for tool in halt poweroff reboot shutdown; do
303 ln -s systemctl "$pkgdir"/usr/bin/$tool
307 package_systemd-ukify() {
308 pkgdesc='Combine kernel and initrd into a signed Unified Kernel Image'
311 depends=('binutils' 'python-pefile' 'systemd')
312 optdepends=('python-pillow: Show the size of splash image'
313 'sbsigntools: Sign the embedded kernel')
315 install -d -m0755 "$pkgdir"/usr/{lib,share/man}
316 mv systemd-ukify/systemd "$pkgdir"/usr/lib/systemd
317 mv systemd-ukify/man1 "$pkgdir"/usr/share/man/man1
320 # vim:ft=sh syn=sh et sw=2: