OCaml 4.14.0 rebuild: ocaml-ctypes 0.20.1-1
[arch-packages.git] / systemd / repos / core-x86_64 / PKGBUILD
blob14dbba966e960d9572f10c3ba82660094ad8661b
1 # Maintainer: Christian Hesse <mail@eworm.de>
3 pkgbase=systemd
4 pkgname=('systemd' 'systemd-libs' 'systemd-resolvconf' 'systemd-sysvcompat')
5 _tag='069e2b0ddd3a1b5bcff48530be165c56117d7134' # git rev-parse v${_tag_name}
6 _tag_name=251.3
7 pkgver="${_tag_name/-/}"
8 pkgrel=1
9 arch=('x86_64')
10 url='https://www.github.com/systemd/systemd'
11 makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
12              'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
13              'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
14              'python-jinja' 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
15              'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
16              'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync')
17 options=('debug' 'strip')
18 validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4'  # Lennart Poettering <lennart@poettering.net>
19               'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E'  # Luca Boccassi <luca.boccassi@gmail.com>
20               '9A774DB5DB996C154EBBFBFDA0099A18E29326E1'  # Yu Watanabe <watanabe.yu+github@gmail.com>
21               '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew JÄ™drzejewski-Szmek <zbyszek@in.waw.pl>
22 source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
23         "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
24         '0001-Use-Arch-Linux-device-access-groups.patch'
25         'initcpio-hook-udev'
26         'initcpio-install-systemd'
27         'initcpio-install-udev'
28         'arch.conf'
29         'loader.conf'
30         'splash-arch.bmp'
31         'systemd-user.pam'
32         'systemd-hook'
33         '20-systemd-sysusers.hook'
34         '30-systemd-binfmt.hook'
35         '30-systemd-catalog.hook'
36         '30-systemd-daemon-reload.hook'
37         '30-systemd-hwdb.hook'
38         '30-systemd-sysctl.hook'
39         '30-systemd-tmpfiles.hook'
40         '30-systemd-udev-reload.hook'
41         '30-systemd-update.hook')
42 sha512sums=('SKIP'
43             'SKIP'
44             'cc0c2ffb5f7c3a7176cd68f3dddd85ca000dcc4cdf3044746a20147234adb6811800fd28a4713faa6a59bf8c02be9fd43c2d6aa6695fd1dbf03ae773a91d090c'
45             'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
46             'aeefb607471cffb5ed4c3d9f36dc0954a9a08cee4b7b4ff55468b561e089e3d8448398906a7df328049ba51b712e4d50698b96bc152bdb03a35ce39c3f51a7cb'
47             'a8c7e4a2cc9c9987e3c957a1fc3afe8281f2281fffd2e890913dcf00cf704024fb80d86cb75f9314b99b0e03bac275b22de93307bfc226d8be9435497e95b7e6'
48             '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
49             'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
50             '5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
51             'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19'
52             '217a9dc3f9d8cd0c9fee54f777396f5a270c2e8a30c572ce5f635165adadcec275af0dae1456019cedb9cc93b7cef0862e5070aeb99a19e496625200e8dfac93'
53             '299dcc7094ce53474521356647bdd2fb069731c08d14a872a425412fcd72da840727a23664b12d95465bf313e8e8297da31259508d1c62cc2dcea596160e21c5'
54             '0d6bc3d928cfafe4e4e0bc04dbb95c5d2b078573e4f9e0576e7f53a8fab08a7077202f575d74a3960248c4904b5f7f0661bf17dbe163c524ab51dd30e3cb80f7'
55             '2b50b25e8680878f7974fa9d519df7e141ca11c4bfe84a92a5d01bb193f034b1726ea05b3c0030bad1fbda8dbb78bf1dc7b73859053581b55ba813c39b27d9dc'
56             '63e55b3acd14bc54320b6f2310b43398651ad4e262d4f4a0135e05d34a993e56ed673cc46e57f15b418371df5c4cef6f54486db96325e4abb1d33fb1a3946254'
57             'a1661ab946c6cd7d3c6251a2a9fd68afe231db58ce33c92c42594aedb5629be8f299ba08a34713327b373a3badd1554a150343d8d3e5dfb102999c281bd49154'
58             '9426829605bbb9e65002437e02ed54e35c20fdf94706770a3dc1049da634147906d6b98bf7f5e7516c84068396a12c6feaf72f92b51bdf19715e0f64620319de'
59             'da7a97d5d3701c70dd5388b0440da39006ee4991ce174777931fea2aa8c90846a622b2b911f02ae4d5fffb92680d9a7e211c308f0f99c04896278e2ee0d9a4dc'
60             'a50d202a9c2e91a4450b45c227b295e1840cc99a5e545715d69c8af789ea3dd95a03a30f050d52855cabdc9183d4688c1b534eaa755ebe93616f9d192a855ee3'
61             '825b9dd0167c072ba62cabe0677e7cd20f2b4b850328022540f122689d8b25315005fa98ce867cf6e7460b2b26df16b88bb3b5c9ebf721746dce4e2271af7b97')
63 _backports=(
66 _reverts=(
69 prepare() {
70   cd "$pkgbase-stable"
72   # add upstream repository for cherry-picking
73   git remote add -f upstream ../systemd
75   local _c
76   for _c in "${_backports[@]}"; do
77     if [[ $_c == *..* ]]; then
78       git log --oneline --reverse "${_c}"
79     else
80       git log --oneline -1 "${_c}"
81     fi
82     git cherry-pick -n -m1 "${_c}"
83   done
84   for _c in "${_reverts[@]}"; do
85     git log --oneline -1 "${_c}"
86     git revert -n "${_c}"
87   done
89   # Replace cdrom/dialout/tape groups with optical/uucp/storage
90   patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
93 build() {
94   local _timeservers=({0..3}.arch.pool.ntp.org)
95   local _nameservers=(
96     # We use these public name services, ordered by their privacy policy (hopefully):
97     #  * Cloudflare (https://1.1.1.1/)
98     #  * Quad9 (https://www.quad9.net/)
99     #  * Google (https://developers.google.com/speed/public-dns/)
100     '1.1.1.1#cloudflare-dns.com'
101     '9.9.9.9#dns.quad9.net'
102     '8.8.8.8#dns.google'
103     '2606:4700:4700::1111#cloudflare-dns.com'
104     '2620:fe::9#dns.quad9.net'
105     '2001:4860:4860::8888#dns.google'
106   )
108   local _meson_options=(
109     # internal version comparison is incompatible with pacman:
110     #   249~rc1 < 249 < 249.1 < 249rc
111     -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-arch"
112     -Dshared-lib-tag="${pkgver}-${pkgrel}"
113     -Dmode=release
115     -Dgnu-efi=true
116     -Dima=false
117     -Dlibidn2=true
118     -Dlz4=true
119     -Dman=true
121     # We disable DNSSEC by default, it still causes trouble:
122     # https://github.com/systemd/systemd/issues/10579
123     
124     -Ddbuspolicydir=/usr/share/dbus-1/system.d
125     -Ddefault-dnssec=no
126     -Ddefault-hierarchy=unified
127     -Ddefault-kill-user-processes=false
128     -Ddefault-locale='C.UTF-8'
129     -Dlocalegen-path=/usr/bin/locale-gen
130     -Ddns-over-tls=openssl
131     -Dfallback-hostname='archlinux'
132     -Dnologin-path=/usr/bin/nologin
133     -Dntp-servers="${_timeservers[*]}"
134     -Ddns-servers="${_nameservers[*]}"
135     -Drpmmacrosdir=no
136     -Dsysvinit-path=
137     -Dsysvrcnd-path=
139     -Dsbat-distro='arch'
140     -Dsbat-distro-summary='Arch Linux'
141     -Dsbat-distro-pkgname="${pkgname}"
142     -Dsbat-distro-version="${pkgver}"
143     -Dsbat-distro-url="https://archlinux.org/packages/core/x86_64/${pkgname}/"
144   )
146   arch-meson "$pkgbase-stable" build "${_meson_options[@]}"
148   meson compile -C build
151 check() {
152   meson test -C build
155 package_systemd() {
156   pkgdesc='system and service manager'
157   license=('GPL2' 'LGPL2.1')
158   depends=('acl' 'libacl.so' 'bash' 'cryptsetup' 'libcryptsetup.so' 'dbus'
159            'iptables' 'kbd' 'kmod' 'libkmod.so' 'hwdata' 'libcap' 'libcap.so'
160            'libgcrypt' 'libxcrypt' 'libcrypt.so' 'systemd-libs' 'libidn2' 'lz4' 'pam'
161            'libelf' 'libseccomp' 'libseccomp.so' 'util-linux' 'libblkid.so'
162            'libmount.so' 'xz' 'pcre2' 'audit' 'libaudit.so' 'libp11-kit'
163            'libp11-kit.so' 'openssl')
164   provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
165   replaces=('nss-myhostname' 'systemd-tools' 'udev')
166   conflicts=('nss-myhostname' 'systemd-tools' 'udev')
167   optdepends=('libmicrohttpd: remote journald capabilities'
168               'quota-tools: kernel-level quota management'
169               'systemd-sysvcompat: symlink package to provide sysvinit binaries'
170               'polkit: allow administration as unprivileged user'
171               'curl: machinectl pull-tar and pull-raw'
172               'libfido2: unlocking LUKS2 volumes with FIDO2 token'
173               'tpm2-tss: unlocking LUKS2 volumes with TPM2')
174   backup=(etc/pam.d/systemd-user
175           etc/systemd/coredump.conf
176           etc/systemd/homed.conf
177           etc/systemd/journald.conf
178           etc/systemd/journal-remote.conf
179           etc/systemd/journal-upload.conf
180           etc/systemd/logind.conf
181           etc/systemd/networkd.conf
182           etc/systemd/oomd.conf
183           etc/systemd/pstore.conf
184           etc/systemd/resolved.conf
185           etc/systemd/sleep.conf
186           etc/systemd/system.conf
187           etc/systemd/timesyncd.conf
188           etc/systemd/user.conf
189           etc/udev/udev.conf)
190   install=systemd.install
192   DESTDIR="$pkgdir" meson install -C build
194   # we'll create this on installation
195   rmdir "$pkgdir"/var/log/journal/remote
197   # runtime libraries shipped with systemd-libs
198   install -d -m0755 systemd-libs
199   mv "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so* systemd-libs
201   # manpages shipped with systemd-sysvcompat
202   rm "$pkgdir"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8
204   # executable (symlinks) shipped with systemd-sysvcompat
205   rm "$pkgdir"/usr/bin/{halt,init,poweroff,reboot,shutdown}
207   # files shipped with systemd-resolvconf
208   rm "$pkgdir"/usr/{bin/resolvconf,share/man/man1/resolvconf.1}
210   # avoid a potential conflict with [core]/filesystem
211   rm "$pkgdir"/usr/share/factory/etc/{issue,nsswitch.conf}
212   sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
213     -e '/^C \/etc\/issue/d' "$pkgdir"/usr/lib/tmpfiles.d/etc.conf
215   # ship default policy to leave services disabled
216   echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
218   # add mkinitcpio hooks
219   install -D -m0644 initcpio-install-systemd "$pkgdir"/usr/lib/initcpio/install/systemd
220   install -D -m0644 initcpio-install-udev "$pkgdir"/usr/lib/initcpio/install/udev
221   install -D -m0644 initcpio-hook-udev "$pkgdir"/usr/lib/initcpio/hooks/udev
223   # The group 'systemd-journal' is allocated dynamically and may have varying
224   # gid on different systems. Let's install with gid 0 (root), systemd-tmpfiles
225   # will fix the permissions for us. (see /usr/lib/tmpfiles.d/systemd.conf)
226   install -d -o root -g root -m 2755 "$pkgdir"/var/log/journal
228   # match directory owner/group and mode from [extra]/polkit
229   install -d -o root -g 102 -m 0750 "$pkgdir"/usr/share/polkit-1/rules.d
231   # add example bootctl configuration
232   install -D -m0644 arch.conf "$pkgdir"/usr/share/systemd/bootctl/arch.conf
233   install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
234   install -D -m0644 splash-arch.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp
236   # pacman hooks
237   install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
238   install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *.hook
240   # overwrite the systemd-user PAM configuration with our own
241   install -D -m0644 systemd-user.pam "$pkgdir"/etc/pam.d/systemd-user
244 package_systemd-libs() {
245   pkgdesc='systemd client libraries'
246   depends=('glibc' 'libcap' 'libgcrypt' 'libp11-kit' 'lz4' 'xz' 'zstd')
247   license=('LGPL2.1')
248   provides=('libsystemd' 'libsystemd.so' 'libudev.so')
249   conflicts=('libsystemd')
250   replaces=('libsystemd')
252   install -d -m0755 "$pkgdir"/usr
253   mv systemd-libs "$pkgdir"/usr/lib
256 package_systemd-resolvconf() {
257   pkgdesc='systemd resolvconf replacement (for use with systemd-resolved)'
258   license=('LGPL2.1')
259   depends=('systemd')
260   provides=('openresolv' 'resolvconf')
261   conflicts=('openresolv')
263   install -d -m0755 "$pkgdir"/usr/bin
264   ln -s resolvectl "$pkgdir"/usr/bin/resolvconf
266   install -d -m0755 "$pkgdir"/usr/share/man/man1
267   ln -s resolvectl.1.gz "$pkgdir"/usr/share/man/man1/resolvconf.1.gz
270 package_systemd-sysvcompat() {
271   pkgdesc='sysvinit compat for systemd'
272   license=('GPL2')
273   conflicts=('sysvinit')
274   depends=('systemd')
276   install -D -m0644 -t "$pkgdir"/usr/share/man/man8 \
277     build/man/{halt,poweroff,reboot,shutdown}.8
279   install -d -m0755 "$pkgdir"/usr/bin
280   ln -s ../lib/systemd/systemd "$pkgdir"/usr/bin/init
281   for tool in halt poweroff reboot shutdown; do
282     ln -s systemctl "$pkgdir"/usr/bin/$tool
283   done
286 # vim:ft=sh syn=sh et sw=2: