1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 # Maintainer: Tom Gundersen <teg@jklm.no>
6 pkgname=('systemd' 'systemd-libs' 'systemd-resolvconf' 'systemd-sysvcompat')
7 _tag='f223664ddf5cad0db04732985ee58006bc3916e4' # git rev-parse v${_tag_name}
9 pkgver="${_tag_name/-/}"
12 url='https://www.github.com/systemd/systemd'
13 makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
14 'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
15 'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
16 'python-jinja' 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
17 'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
18 'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync')
20 validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
21 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
22 '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
23 source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
24 "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
25 '0001-Use-Arch-Linux-device-access-groups.patch'
26 '0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch'
28 'initcpio-install-systemd'
29 'initcpio-install-udev'
35 '20-systemd-sysusers.hook'
36 '30-systemd-binfmt.hook'
37 '30-systemd-catalog.hook'
38 '30-systemd-daemon-reload.hook'
39 '30-systemd-hwdb.hook'
40 '30-systemd-sysctl.hook'
41 '30-systemd-tmpfiles.hook'
42 '30-systemd-udev-reload.hook'
43 '30-systemd-update.hook')
46 '10f3b477527ec263cc6465c84d94416e356435930edc9e26844a0fd4f71e87a27fa0f91ce24b43a22cacdd2ead5e760e9d607369bc537a8da8d34021302a89a1'
47 '34541f1967536524329867f9f341f8d9250d9d771c60dc3e6a22ccb82fc01f103cfd3f9903329777591ccbecd2446622a5d6b3804fa0411482b85c70593ee8ad'
48 'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
49 '5479c8ef963ff247381392907c13308b4ae3a9383c867bd4c8a318b159f23acdb4be5f4ddae0dab4665f4927d3f30166077b1d3aaa2cde6bf53d023b7abb939c'
50 'a8c7e4a2cc9c9987e3c957a1fc3afe8281f2281fffd2e890913dcf00cf704024fb80d86cb75f9314b99b0e03bac275b22de93307bfc226d8be9435497e95b7e6'
51 '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
52 'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
53 '5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
54 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19'
55 '217a9dc3f9d8cd0c9fee54f777396f5a270c2e8a30c572ce5f635165adadcec275af0dae1456019cedb9cc93b7cef0862e5070aeb99a19e496625200e8dfac93'
56 '299dcc7094ce53474521356647bdd2fb069731c08d14a872a425412fcd72da840727a23664b12d95465bf313e8e8297da31259508d1c62cc2dcea596160e21c5'
57 '0d6bc3d928cfafe4e4e0bc04dbb95c5d2b078573e4f9e0576e7f53a8fab08a7077202f575d74a3960248c4904b5f7f0661bf17dbe163c524ab51dd30e3cb80f7'
58 '2b50b25e8680878f7974fa9d519df7e141ca11c4bfe84a92a5d01bb193f034b1726ea05b3c0030bad1fbda8dbb78bf1dc7b73859053581b55ba813c39b27d9dc'
59 '63e55b3acd14bc54320b6f2310b43398651ad4e262d4f4a0135e05d34a993e56ed673cc46e57f15b418371df5c4cef6f54486db96325e4abb1d33fb1a3946254'
60 'a1661ab946c6cd7d3c6251a2a9fd68afe231db58ce33c92c42594aedb5629be8f299ba08a34713327b373a3badd1554a150343d8d3e5dfb102999c281bd49154'
61 '9426829605bbb9e65002437e02ed54e35c20fdf94706770a3dc1049da634147906d6b98bf7f5e7516c84068396a12c6feaf72f92b51bdf19715e0f64620319de'
62 'da7a97d5d3701c70dd5388b0440da39006ee4991ce174777931fea2aa8c90846a622b2b911f02ae4d5fffb92680d9a7e211c308f0f99c04896278e2ee0d9a4dc'
63 'a50d202a9c2e91a4450b45c227b295e1840cc99a5e545715d69c8af789ea3dd95a03a30f050d52855cabdc9183d4688c1b534eaa755ebe93616f9d192a855ee3'
64 '825b9dd0167c072ba62cabe0677e7cd20f2b4b850328022540f122689d8b25315005fa98ce867cf6e7460b2b26df16b88bb3b5c9ebf721746dce4e2271af7b97')
75 # add upstream repository for cherry-picking
76 git remote add -f upstream ../systemd
79 for _c in "${_backports[@]}"; do
80 git log --oneline -1 "${_c}"
81 git cherry-pick -n "${_c}"
83 for _c in "${_reverts[@]}"; do
84 git log --oneline -1 "${_c}"
88 # Replace cdrom/dialout/tape groups with optical/uucp/storage
89 patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
91 # https://bugs.archlinux.org/task/70264
92 # https://github.com/systemd/systemd/issues/19191
93 patch -Np1 -i ../0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
97 local _timeservers=({0..3}.arch.pool.ntp.org)
99 # We use these public name services, ordered by their
100 # privacy policy (hopefully):
101 # * Cloudflare (https://1.1.1.1/)
102 # * Quad9 without filtering (https://www.quad9.net/)
103 # * Google (https://developers.google.com/speed/public-dns/)
104 1.1.1.1#cloudflare-dns.com
105 9.9.9.10#dns.quad9.net
107 2606:4700:4700::1111#cloudflare-dns.com
108 2620:fe::10#dns.quad9.net
109 2001:4860:4860::8888#dns.google
112 local _meson_options=(
113 # internal version comparison is incompatible with pacman:
114 # 249~rc1 < 249 < 249.1 < 249rc
115 -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-arch"
124 # We disable DNSSEC by default, it still causes trouble:
125 # https://github.com/systemd/systemd/issues/10579
127 -Ddbuspolicydir=/usr/share/dbus-1/system.d
129 -Ddefault-hierarchy=unified
130 -Ddefault-kill-user-processes=false
132 -Dlocalegen-path=/usr/bin/locale-gen
133 -Ddns-over-tls=openssl
134 -Dfallback-hostname='archlinux'
135 -Dnologin-path=/usr/bin/nologin
136 -Dntp-servers="${_timeservers[*]}"
137 -Ddns-servers="${_nameservers[*]}"
143 -Dsbat-distro-summary='Arch Linux'
144 -Dsbat-distro-pkgname="${pkgname}"
145 -Dsbat-distro-version="${pkgver}"
146 -Dsbat-distro-url="https://archlinux.org/packages/core/x86_64/${pkgname}/"
149 arch-meson "$pkgbase-stable" build "${_meson_options[@]}"
159 pkgdesc='system and service manager'
160 license=('GPL2' 'LGPL2.1')
161 depends=('acl' 'libacl.so' 'bash' 'cryptsetup' 'libcryptsetup.so' 'dbus'
162 'iptables' 'kbd' 'kmod' 'libkmod.so' 'hwids' 'libcap' 'libcap.so'
163 'libgcrypt' 'libxcrypt' 'libcrypt.so' 'systemd-libs' 'libidn2' 'lz4' 'pam'
164 'libelf' 'libseccomp' 'libseccomp.so' 'util-linux' 'libblkid.so'
165 'libmount.so' 'xz' 'pcre2' 'audit' 'libaudit.so' 'libp11-kit'
166 'libp11-kit.so' 'openssl')
167 provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
168 replaces=('nss-myhostname' 'systemd-tools' 'udev')
169 conflicts=('nss-myhostname' 'systemd-tools' 'udev')
170 optdepends=('libmicrohttpd: remote journald capabilities'
171 'quota-tools: kernel-level quota management'
172 'systemd-sysvcompat: symlink package to provide sysvinit binaries'
173 'polkit: allow administration as unprivileged user'
174 'curl: machinectl pull-tar and pull-raw'
175 'libfido2: unlocking LUKS2 volumes with FIDO2 token'
176 'tpm2-tss: unlocking LUKS2 volumes with TPM2')
177 backup=(etc/pam.d/systemd-user
178 etc/systemd/coredump.conf
179 etc/systemd/homed.conf
180 etc/systemd/journald.conf
181 etc/systemd/journal-remote.conf
182 etc/systemd/journal-upload.conf
183 etc/systemd/logind.conf
184 etc/systemd/networkd.conf
185 etc/systemd/oomd.conf
186 etc/systemd/pstore.conf
187 etc/systemd/resolved.conf
188 etc/systemd/sleep.conf
189 etc/systemd/system.conf
190 etc/systemd/timesyncd.conf
191 etc/systemd/user.conf
193 install=systemd.install
195 DESTDIR="$pkgdir" meson install -C build
197 # we'll create this on installation
198 rmdir "$pkgdir"/var/log/journal/remote
200 # runtime libraries shipped with systemd-libs
201 install -d -m0755 systemd-libs
202 mv "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so* systemd-libs
204 # manpages shipped with systemd-sysvcompat
205 rm "$pkgdir"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8
207 # executable (symlinks) shipped with systemd-sysvcompat
208 rm "$pkgdir"/usr/bin/{halt,init,poweroff,reboot,shutdown}
210 # files shipped with systemd-resolvconf
211 rm "$pkgdir"/usr/{bin/resolvconf,share/man/man1/resolvconf.1}
213 # avoid a potential conflict with [core]/filesystem
214 rm "$pkgdir"/usr/share/factory/etc/{issue,nsswitch.conf}
215 sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
216 -e '/^C \/etc\/issue/d' "$pkgdir"/usr/lib/tmpfiles.d/etc.conf
218 # add back tmpfiles.d/legacy.conf, normally omitted without sysv-compat
219 install -m0644 $pkgbase-stable/tmpfiles.d/legacy.conf "$pkgdir"/usr/lib/tmpfiles.d
221 # ship default policy to leave services disabled
222 echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
224 # add mkinitcpio hooks
225 install -D -m0644 initcpio-install-systemd "$pkgdir"/usr/lib/initcpio/install/systemd
226 install -D -m0644 initcpio-install-udev "$pkgdir"/usr/lib/initcpio/install/udev
227 install -D -m0644 initcpio-hook-udev "$pkgdir"/usr/lib/initcpio/hooks/udev
229 # The group 'systemd-journal' is allocated dynamically and may have varying
230 # gid on different systems. Let's install with gid 0 (root), systemd-tmpfiles
231 # will fix the permissions for us. (see /usr/lib/tmpfiles.d/systemd.conf)
232 install -d -o root -g root -m 2755 "$pkgdir"/var/log/journal
234 # match directory owner/group and mode from [extra]/polkit
235 install -d -o root -g 102 -m 0750 "$pkgdir"/usr/share/polkit-1/rules.d
237 # add example bootctl configuration
238 install -D -m0644 arch.conf "$pkgdir"/usr/share/systemd/bootctl/arch.conf
239 install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
240 install -D -m0644 splash-arch.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp
243 install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
244 install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *.hook
246 # overwrite the systemd-user PAM configuration with our own
247 install -D -m0644 systemd-user.pam "$pkgdir"/etc/pam.d/systemd-user
250 package_systemd-libs() {
251 pkgdesc='systemd client libraries'
252 depends=('glibc' 'libcap' 'libgcrypt' 'libp11-kit' 'lz4' 'xz' 'zstd')
254 provides=('libsystemd' 'libsystemd.so' 'libudev.so')
255 conflicts=('libsystemd')
256 replaces=('libsystemd')
258 install -d -m0755 "$pkgdir"/usr
259 mv systemd-libs "$pkgdir"/usr/lib
262 package_systemd-resolvconf() {
263 pkgdesc='systemd resolvconf replacement (for use with systemd-resolved)'
266 provides=('openresolv' 'resolvconf')
267 conflicts=('openresolv')
269 install -d -m0755 "$pkgdir"/usr/bin
270 ln -s resolvectl "$pkgdir"/usr/bin/resolvconf
272 install -d -m0755 "$pkgdir"/usr/share/man/man1
273 ln -s resolvectl.1.gz "$pkgdir"/usr/share/man/man1/resolvconf.1.gz
276 package_systemd-sysvcompat() {
277 pkgdesc='sysvinit compat for systemd'
279 conflicts=('sysvinit')
282 install -D -m0644 -t "$pkgdir"/usr/share/man/man8 \
283 build/man/{halt,poweroff,reboot,shutdown}.8
285 install -d -m0755 "$pkgdir"/usr/bin
286 ln -s ../lib/systemd/systemd "$pkgdir"/usr/bin/init
287 for tool in halt poweroff reboot shutdown; do
288 ln -s systemctl "$pkgdir"/usr/bin/$tool
292 # vim:ft=sh syn=sh et sw=2: