123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785 |
- # Maintainer (arch): Christian Hesse <mail@eworm.de>
- # Maintainer: Luke Shumaker <lukeshu@parabola.nu>
- # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
- # Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
- # Contributor: bill-auger <bill-auger@programmer.net>
- # Tips for the maintainer (i.e.: future me?):
- #
- # - I check in the .SRCINFO file because it makes it easier to verify
- # that the metadata changes are what you expect.
- # - I use the `./srcinfo.sh` script to update .SRCINFO after
- # `libremakepkg`ing the package.
- # There are a lot of pkgnames in this file, whether in the pkgname=()
- # array, or in provides=(), conflicts=(), or replaces=(). Let's go
- # over where each comes from and what it means, for clarity.
- #
- # Inherited from Arch:
- # * systemd's current pkgname=():
- # - `systemd`: Duh
- # - `systemd-libs`: `libsystemd.so`, `libudev.so`, and the NSS modules
- # - `systemd-resolvconf`: resolvconf(1)
- # - `systemd-sysvcompat`: init(1), halt(8), poweroff(8), reboot(8), shutdown(8)
- # - `systemd-tests`: Installable tests (/usr/lib/systemd/tests/) for the
- # installed systemd
- # - `systemd-ukify`: ukify(1)
- # * historical systemd pkgname=() values:
- # - `udev`: existed as a split package 2012-02 to 2012-05, when it merged into
- # `systemd-tools`
- # - `systemd-tools`: existed as a split package 2012-02 to 2012-08, when it
- # merged into `systemd`
- # - `libsystemd`: the name of `systemd-libs` prior to 2019-02
- # * separate packages:
- # - `systemd-sysvcompat`: existed as a separate package (not a split package)
- # 2012-02 to 2012-06
- # - `nss-myhostname`: a separate that existed first in `extra` then in `core`,
- # 2012-02 to 2013-01, when it became part of systemd
- # - `sysvinit`: a separate package that existed in `core` until 2013-05
- # - `openresolv`: prior to 2018-06 this was Arch's only `resolvconf`
- # implementation, so most packages depended on it instead of the `resolvconf`
- # virtual package
- # * virtual packages:
- # - `resolvconf`: since 2018-06, resolvconf(1)
- #
- # From Parabola (mostly by the decision-making of lukeshu):
- # * systemd's current pkgname=():
- # - We further split `systemd` into:
- # + `systemd`: systemd itself
- # + `systemd-udev`: just udev
- # + `systemd-boot`: just bootctl and usr/lib/systemd/boot/
- # + `systemd-common`: files shared between `systemd` and `systemd-udev`
- # - We further split `systemd-libs` into a separate package for each
- # library and NSS module:
- # + `systemd-libsystemd`
- # + `systemd-libudev`
- # + `systemd-nss-systemd`
- # + `systemd-nss-myhostname`
- # + `systemd-nss-mymachines`
- # + `systemd-nss-resolve`
- # Separating libsystemd and libudev are obvious. I can make a good case for
- # separating nss-myhostname, because it's useful on nonsystemd boxes. But I
- # guess I (lukeshu) separated out the other NSS modules too just for
- # consistency with nss-myhostname? I'm sure I felt strongly about it at the
- # time.
- # * separate packages:
- # - `notsystemd-resolvconf`: existed 2018-07 to 2018-08, was identical to
- # `systemd-resolvconf`
- # * virtual packages:
- # - `init`: `/usr/bin/init`; invented by lukeshu in order to have mutual
- # provides/conflicts between `systemd-sysvcompat`, `sysvinit`, and
- # `openrc-init`.
- # - `libsystemd-standalone`: `libsystemd.so`; the pkgname has `-standalone`
- # appended because we inherited from Arch a different (historical) meaning of
- # what the `libsystemd` pkgname is.
- # - `libudev`: `libudev.so`
- # - `nss-systemd`: `libnss_systemd.so`
- # - `nss-myhostname`: `libnss_myhostname.so`
- # - `nss-mymachines`: `libnss_mymachines.so`
- # - `nss-resolve`: `libnss_resolve.so`
- pkgbase=systemd
- pkgname=('systemd'
- 'systemd-libs'
- 'systemd-resolvconf'
- 'systemd-sysvcompat'
- 'systemd-ukify')
- pkgname+=('systemd-common' 'systemd-udev' 'systemd-boot' 'systemd-tests')
- # We split Arch's systemd-libs into systemd-$X, for the following $X:
- _systemd_libs=('libsystemd' 'libudev' 'nss-systemd' 'nss-myhostname' 'nss-mymachines' 'nss-resolve')
- pkgname+=("${_systemd_libs[@]/#/systemd-}")
- _tag='255.6'
- # Upstream versioning is incompatible with pacman's version comparisons, one
- # way or another. So we replace dashes and tildes with the empty string to
- # make sure pacman's version comparing does the right thing for rc versions:
- pkgver="${_tag/[-~]/}"
- pkgrel=1
- pkgrel+=.parabola1
- arch=('x86_64')
- arch+=('i686' 'armv7h' 'ppc64le')
- license=('LGPL-2.1-or-later')
- url='https://www.github.com/systemd/systemd'
- makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
- 'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
- 'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
- 'python-jinja' 'python-lxml' 'quota-tools' 'shadow' 'git'
- 'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
- 'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync'
- 'bpf' 'libbpf' 'clang' 'llvm' 'curl' 'gnutls' 'python-pyelftools'
- 'libpwquality' 'qrencode' 'lib32-gcc-libs' 'python-pefile')
- makedepends=(${makedepends[*]/lib32-gcc-libs}) # only include lib32-gcc-libs on x86_64
- makedepends_x86_64=('lib32-gcc-libs')
- conflicts=("mkinitcpio<38-1")
- validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
- 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
- '9A774DB5DB996C154EBBFBFDA0099A18E29326E1' # Yu Watanabe <watanabe.yu+github@gmail.com>
- '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
- source=("git+https://github.com/systemd/systemd-stable#tag=v${_tag}?signed"
- "git+https://github.com/systemd/systemd#tag=v${_tag%.*}?signed"
- '0001-Use-Arch-Linux-device-access-groups.patch'
- '0001-FSDG-bootctl-Say-Systemd-Boot-Manager-instead-of-Lin.patch'
- '0002-FSDG-os-release-Default-PRETTY_NAME-to-GNU-Linux-ins.patch'
- '0003-FSDG-os-release-Default-NAME-to-GNU-Linux-instead-of.patch'
- '0004-FSDG-os-release-Default-ID-to-gnu-linux-instead-of-l.patch'
- '0005-FSDG-systemd-resolved-Fallback-hostname-to-gnu-linux.patch'
- '0006-FSDG-man-Mention-Parabola-instead-of-Arch.patch'
- '0007-FSDG-man-Refer-to-the-operating-system-as-GNU-Linux.patch'
- # bootloader files
- 'parabola.conf'
- 'loader.conf'
- 'splash-parabola.bmp'
- # pam configuration
- 'systemd-user.pam'
- # pacman / libalpm hooks
- 'systemd-hook'
- '20-systemd-sysusers.hook'
- '30-systemd-binfmt.hook'
- '30-systemd-catalog.hook'
- '30-systemd-daemon-reload-system.hook'
- '30-systemd-daemon-reload-user.hook'
- '30-systemd-hwdb.hook'
- '30-systemd-sysctl.hook'
- '30-systemd-tmpfiles.hook'
- '30-systemd-udev-reload.hook'
- '30-systemd-update.hook')
- sha512sums=('c1de1eb0d0ef6d8da81a105cdfcb86634bed6f46ab1038de9ab786fd85f59524e7eb30fe1d02dbf2c3b3a29dc66d04a102b2274a09ad3d2c18953c380099aa0e'
- 'd430427987309483c99062adb02741d25239ba5fbb97053ef817c0c5a0a935328af9c8b651de2b119b0e851dcf6623f01343859735ff81d7013ab0133e67c7ea'
- '3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e'
- 'b01d28646bca80c33192a10728218427b95246f904d921d00451bd32673f6352aefe6a8168942e796f4b7d1682921cc5c6adb895c9d9cdc0365606bfd4eca391'
- 'fb1f75ded29d635c9e746ce76a99ace4e79694eea6d6ec7e8a84d7700e92ee5698576b979e16d71316c3e9276f285e3db248f74e8e55a8cf719456f6abc362b1'
- '03df948013f353e3fb6db745a01520c2dc8278b823e57178aca1c59786b81dd8a2e10e7f603e33028e1e9084a753cb7a09ebd4b4291dbdda30a16eba39628866'
- '2e89361d6af47464b91a04dc4be7a941ff12894b56831702deb6063d8d386141ff04989d1ecb39dbc452d83caacd5830c8eb6b06350c4bee6ccd3383aa2b1c8f'
- '0b634f674468e6c859e7faff9bbf9d310a2c1feac2ceb4bfd5cb132e9b706f512908c1c905c72181395a5f0d0af40600e62ef46ce1ab534beb0b8d16aba0a2be'
- '819331360737c59bc6fa2ca681da16bdae599d83289d619da802c4ffff2fe3b72852b11d50caecc058c80022b6b5158c5309560670fa2c30c08e9bb14b7e0454'
- 'eb4ca9b4460f19ac93885d8e22ae4e844d0798918d692d84333e4f1b5ae6fa28a2443d156e31202c1c05f97c3f61531a8822f1b0e66ccc00e20743b871322aa8'
- '70b3f1d6aaa9cd4b6b34055a587554770c34194100b17b2ef3aaf4f16f68da0865f6b3ae443b3252d395e80efabd412b763259ffb76c902b60e23b6b522e3cc8'
- '6c6f579644ea2ebb6b46ee274ab15110718b0de40def8c30173ba8480b045d403f2aedd15b50ad9b96453f4ad56920d1350ff76563755bb9a80b10fa7f64f1d9'
- 'a50bc85061a9a16d776235099867bc1a17c17dddb74c1ecf5614c849735a9779c5e34e5ddca8ca6af4b59a40f57c08ecf219b98cab09476ddb0f110e6a35e45c'
- 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19'
- '3cb8f88c1bffc753d0c540be5d25a0fdb9224478cca64743b5663340f2f26b197775286e6e680228db54c614dcd11da1135e625674a622127681662bec4fa886'
- '299dcc7094ce53474521356647bdd2fb069731c08d14a872a425412fcd72da840727a23664b12d95465bf313e8e8297da31259508d1c62cc2dcea596160e21c5'
- '0d6bc3d928cfafe4e4e0bc04dbb95c5d2b078573e4f9e0576e7f53a8fab08a7077202f575d74a3960248c4904b5f7f0661bf17dbe163c524ab51dd30e3cb80f7'
- '2b50b25e8680878f7974fa9d519df7e141ca11c4bfe84a92a5d01bb193f034b1726ea05b3c0030bad1fbda8dbb78bf1dc7b73859053581b55ba813c39b27d9dc'
- 'a436d3f5126c6c0d6b58c6865e7bd38dbfbfb7babe017eeecb5e9d162c21902cbf4e0a68cf3ac2f99815106f9fa003b075bd2b4eb5d16333fa913df6e2f3e32a'
- '190112e38d5a5c0ca91b89cd58f95595262a551530a16546e1d84700fc9644aa2ca677953ffff655261e8a7bff6e6af4e431424df5f13c00bc90b77c421bc32d'
- 'a1661ab946c6cd7d3c6251a2a9fd68afe231db58ce33c92c42594aedb5629be8f299ba08a34713327b373a3badd1554a150343d8d3e5dfb102999c281bd49154'
- '9426829605bbb9e65002437e02ed54e35c20fdf94706770a3dc1049da634147906d6b98bf7f5e7516c84068396a12c6feaf72f92b51bdf19715e0f64620319de'
- 'da7a97d5d3701c70dd5388b0440da39006ee4991ce174777931fea2aa8c90846a622b2b911f02ae4d5fffb92680d9a7e211c308f0f99c04896278e2ee0d9a4dc'
- 'a50d202a9c2e91a4450b45c227b295e1840cc99a5e545715d69c8af789ea3dd95a03a30f050d52855cabdc9183d4688c1b534eaa755ebe93616f9d192a855ee3'
- '825b9dd0167c072ba62cabe0677e7cd20f2b4b850328022540f122689d8b25315005fa98ce867cf6e7460b2b26df16b88bb3b5c9ebf721746dce4e2271af7b97')
- _meson_version="${pkgver}-${pkgrel}"
- _meson_mode='release'
- _meson_compile=()
- _meson_install=()
- if ((_systemd_UPSTREAM)); then
- _meson_version="${pkgver}"
- _meson_mode='developer'
- pkgname+=('systemd-tests')
- makedepends+=('libarchive')
- optdepends_upstream=('libarchive: convert DDIs to tarballs')
- if ((_systemd_QUIET)); then
- _meson_install=('--quiet')
- else
- _meson_compile=('--verbose')
- fi
- fi
- _backports=(
- )
- _reverts=(
- )
- prepare() {
- cd "$pkgbase-stable"
- # add upstream repository for cherry-picking
- git remote add -f upstream ../systemd
- local _c _l
- for _c in "${_backports[@]}"; do
- if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
- git log --oneline "${_l}" "${_c}"
- git cherry-pick --mainline 1 --no-commit "${_c}"
- done
- for _c in "${_reverts[@]}"; do
- if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
- git log --oneline "${_l}" "${_c}"
- git revert --mainline 1 --no-commit "${_c}"
- done
- # Replace cdrom/dialout/tape groups with optical/uucp/storage
- patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
- # apply FSDG patches
- local _patch
- for _patch in "$srcdir"/????-FSDG-*.patch; do
- echo "applying $_patch"
- patch -Np1 -i "$_patch"
- done
- }
- build() {
- local _timeservers=({0..3}.arch.pool.ntp.org)
- local _nameservers=(
- # We use these public name services, ordered by their privacy policy (hopefully):
- # * Cloudflare (https://1.1.1.1/)
- # * Quad9 (https://www.quad9.net/)
- # * Google (https://developers.google.com/speed/public-dns/)
- '1.1.1.1#cloudflare-dns.com'
- '9.9.9.9#dns.quad9.net'
- '8.8.8.8#dns.google'
- '2606:4700:4700::1111#cloudflare-dns.com'
- '2620:fe::9#dns.quad9.net'
- '2001:4860:4860::8888#dns.google'
- )
- local _meson_options=(
- -Dversion-tag="${_meson_version}-parabola"
- -Dshared-lib-tag="${_meson_version}"
- -Dmode="${_meson_mode}"
- -Dapparmor=false
- -Dbootloader=true
- -Dxenctrl=false
- -Dbpf-framework=true
- -Dima=false
- -Dinstall-tests=true
- -Dlibidn2=true
- -Dlz4=true
- -Dman=true
- -Dnscd=false
- -Dselinux=false
- # We disable DNSSEC by default, it still causes trouble:
- # https://github.com/systemd/systemd/issues/10579
- -Ddbuspolicydir=/usr/share/dbus-1/system.d
- -Ddefault-dnssec=no
- -Ddefault-hierarchy=unified
- -Ddefault-kill-user-processes=false
- -Ddefault-locale='C.UTF-8'
- -Dlocalegen-path=/usr/bin/locale-gen
- -Ddns-over-tls=openssl
- -Dfallback-hostname='parabola'
- -Dnologin-path=/usr/bin/nologin
- -Dntp-servers="${_timeservers[*]}"
- -Ddns-servers="${_nameservers[*]}"
- -Drpmmacrosdir=no
- -Dsysvinit-path=
- -Dsysvrcnd-path=
- -Dsbat-distro='parabola'
- -Dsbat-distro-summary='Parabola GNU/Linux-libre'
- -Dsbat-distro-pkgname="${pkgname}"
- -Dsbat-distro-version="${pkgver}"
- -Dsbat-distro-url="https://www.parabola.nu/packages/libre/${CARCH}/${pkgname}/"
- )
- arch-meson "$pkgbase-stable" build "${_meson_options[@]}" $MESON_EXTRA_CONFIGURE_OPTIONS
- meson compile -C build "${_meson_compile[@]}"
- }
- check() {
- # FIXME: Tests fail on armv7h. I (lukeshu) am pretty sure it's all
- # related to running in qemu-user-static instead of on a native
- # kernel, but we should verify that.
- #
- # $ grep -e TIMEOUT -e FAIL systemd-255.6-1.parabola1-armv7h-check.log
- # 605/1252 systemd:network / test-network FAIL 0.20s killed by signal 6 SIGABRT
- # 788/1252 systemd:test / test-fd-util FAIL 0.18s killed by signal 6 SIGABRT
- # 794/1252 systemd:test / test-loopback FAIL 0.08s exit status 1
- # 799/1252 systemd:test / test-mount-util FAIL 0.21s killed by signal 6 SIGABRT
- # 804/1252 systemd:resolve / test-resolved-stream FAIL 5.20s killed by signal 6 SIGABRT
- # 808/1252 systemd:test / test-process-util FAIL 0.36s killed by signal 6 SIGABRT
- # 864/1252 systemd:libsystemd / test-netlink FAIL 0.10s killed by signal 6 SIGABRT
- # 950/1252 systemd:test / test-mountpoint-util FAIL 0.13s killed by signal 6 SIGABRT
- # 967/1252 systemd:test / test-raw-clone FAIL 0.12s killed by signal 6 SIGABRT
- # 1108/1252 systemd:core / test-path FAIL 30.17s exit status 1
- # 1133/1252 systemd:sysusers / test-sysusers TIMEOUT 30.18s killed by signal 15 SIGTERM
- # 1134/1252 systemd:systemctl / test-systemctl-enable TIMEOUT 30.22s killed by signal 15 SIGTERM
- # 1150/1252 systemd:network / test-network-generator-conversion TIMEOUT 30.17s killed by signal 15 SIGTERM
- # 1189/1252 systemd:kernel-install / test-kernel-install TIMEOUT 30.12s killed by signal 15 SIGTERM
- # 1252/1252 systemd:libsystemd / test-journal-verify TIMEOUT 90.08s killed by signal 15 SIGTERM
- if [[ $CARCH == armv7h ]]; then
- return
- fi
- meson test -C build --print-errorlogs
- }
- # How we use this function might seem like "overthinking it", and it
- # sorta is, but it's doing the (tedious, error-prone) comparisons that
- # I'd otherwise have to do manually when merging from Arch.
- _lib_deps() {
- # Resolve short names, to make calling code readable.
- # Where each .so file lives (relative to either $srcdir or $pkgdirbase).
- declare -A paths=(
- [libsystemd-shared]="systemd-common/usr/lib/systemd/libsystemd-shared-${pkgver}-${pkgrel}.so"
- [libsystemd]='systemd-libsystemd/usr/lib/libsystemd.so'
- [libudev]='systemd-libudev/usr/lib/libudev.so'
- [libnss_systemd]='systemd-nss-systemd/usr/lib/libnss_systemd.so.2'
- [libnss_myhostname]='systemd-nss-myhostname/usr/lib/libnss_myhostname.so.2'
- [libnss_mymachines]='systemd-nss-mymachines/usr/lib/libnss_mymachines.so.2'
- [libnss_resolve]='systemd-nss-resolve/usr/lib/libnss_resolve.so.2'
- )
- local libname srcfile pkgfile libfile txtfile mode
- for libname in "$@"; do
- # Save the raw list to a textfile so that `makepkg --printsrcinfo`
- # works.
- srcfile="${srcdir:-.}/${paths[$libname]}"
- pkgfile="${_existing_pkgdirbase:-${pkgdirbase:-.}}/${paths[$libname]}"
- txtfile="srcinfo-${libname}.txt"
- # mode is: 'gen', 'lib', 'txt', 'nop', or 'err:*'
- mode="err:TXTFILE:'${txtfile}', SRCFILE:'${srcfile}', and PKGFILE:'${pkgfile}' are all missing"
- if [[ -n "${_existing_pkgdirbase:-}" ]]; then
- if [[ -f "$srcfile" ]]; then
- libfile=$srcfile
- mode=gen
- elif [[ -f "$pkgfile" ]]; then
- libfile=$pkgfile
- mode=gen
- else
- mode="err:SRCFILE:'${srcfile}' and PKGFILE:'${pkgfile}' are both missing"
- fi
- elif [[ -f "$srcfile" ]]; then
- libfile=$srcfile
- mode=lib
- elif [[ -f "$pkg_libfile" ]]; then
- libfile=$pkgfile
- mode=lib
- elif [[ -f "$txtfile" ]]; then
- mode=txt
- elif [[ "${FUNCNAME[*]}" == *' lint_depends '* ]]; then
- mode=nop
- fi
- case "$mode" in
- gen) LC_ALL=C readelf -d "$libfile" | sed -nE 's/.* Shared library: \[(lib.*\.so)(\.[0-9.]+)?\]/\1/p' | tee "$txtfile";;
- lib) LC_ALL=C readelf -d "$libfile" | sed -nE 's/.* Shared library: \[(lib.*\.so)(\.[0-9.]+)?\]/\1/p';;
- txt) cat "$txtfile";;
- nop) true;;
- err:*) error '%s' "${mode#err:}";;
- esac
- done |
- # Add some redundant transitive dependencies, idk why, it's what
- # Arch does.
- sed -e 's/^libpam\.so$/libaudit.so\n&/' |
- # Refer to these by their just pkgname instead of .so, idk why,
- # it's what Arch does.
- sed -e 's/^lib[cm]\.so$/glibc/' \
- -e 's/^libgcc_s\.so$/gcc-libs/' \
- -e 's/^libgcrypt\.so$/libgcrypt/' \
- -e 's/^libip4tc\.so$/iptables/' \
- -e 's/^liblz4\.so$/lz4/' \
- -e 's/^liblzma\.so$/xz/' \
- -e 's/^libpam\.so$/pam/' \
- -e 's/^libzstd\.so$/zstd/' |
- # Refer to these by both their pkgname and .so, idk why, it's what
- # Arch does.
- sed -E \
- -e 's/^libcrypt\.so$/libxcrypt\n&/' \
- -e 's/^libcrypto\.so$/openssl\n&/' \
- -e 's/^lib(mount|libblkid)\.so$/util-linux\n&/' \
- -e 's/^lib(acl|audit|kmod)\.so$/\1\n&/' \
- -e 's/^(lib(cap|seccomp))\.so$/\1\n&/' |
- # Sort and de-duplicate.
- sort -u
- }
- _pick() {
- local p="$1" f d; shift
- for f; do
- d="$srcdir/$p/${f#$pkgdir/}"
- mkdir -p "$(dirname "$d")"
- mv "$f" "$d"
- rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
- done
- }
- package_systemd() {
- pkgdesc='system and service manager'
- license+=(
- 'CC0-1.0' # siphash # Parabola: ends up in systemd-common
- 'GPL-2.0-or-later' # udev # Parabola: ends up in systemd-udev
- 'MIT-0' # documentation and config files
- )
- depends=("systemd-libs=${pkgver}"
- 'acl' 'libacl.so' 'bash' 'cryptsetup' 'libcryptsetup.so' 'dbus'
- 'dbus-units' 'kbd' 'kmod' 'libkmod.so' 'hwdata' 'libcap' 'libcap.so'
- 'libgcrypt' 'libxcrypt' 'libcrypt.so' 'libidn2' 'lz4' 'pam'
- 'libelf' 'libseccomp' 'libseccomp.so' 'util-linux' 'libblkid.so'
- 'libmount.so' 'xz' 'pcre2' 'audit' 'libaudit.so'
- 'openssl' 'libcrypto.so' 'libssl.so')
- provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
- replaces=('nss-myhostname' 'systemd-tools' 'udev')
- conflicts=('nss-myhostname' 'systemd-tools' 'udev')
- optdepends=('libmicrohttpd: systemd-journal-gatewayd and systemd-journal-remote'
- 'quota-tools: kernel-level quota management'
- 'systemd-sysvcompat: symlink package to provide sysvinit binaries'
- 'systemd-ukify: combine kernel and initrd into a signed Unified Kernel Image'
- 'polkit: allow administration as unprivileged user'
- 'curl: systemd-journal-upload, machinectl pull-tar and pull-raw'
- 'gnutls: systemd-journal-gatewayd and systemd-journal-remote'
- 'qrencode: show QR codes'
- 'iptables: firewall features'
- 'libbpf: support BPF programs'
- 'libpwquality: check password quality'
- 'libfido2: unlocking LUKS2 volumes with FIDO2 token'
- 'libp11-kit: support PKCS#11'
- 'tpm2-tss: unlocking LUKS2 volumes with TPM2')
- optdepends+=("${_optdepends_upstream[@]}")
- backup=(etc/pam.d/systemd-user
- etc/systemd/coredump.conf
- etc/systemd/homed.conf
- etc/systemd/journald.conf
- etc/systemd/journal-remote.conf
- etc/systemd/journal-upload.conf
- etc/systemd/logind.conf
- etc/systemd/networkd.conf
- etc/systemd/oomd.conf
- etc/systemd/pstore.conf
- etc/systemd/resolved.conf
- etc/systemd/sleep.conf
- etc/systemd/system.conf
- etc/systemd/timesyncd.conf
- etc/systemd/user.conf
- etc/udev/iocost.conf
- etc/udev/udev.conf)
- install=systemd.install
- meson install -C build --destdir "$pkgdir" "${_meson_install[@]}"
- # split
- (
- cd "$pkgdir"
- # Parabola: Pull out `systemd-common`.
- _pick systemd-common usr/lib/systemd/"libsystemd-shared-${pkgver}-${pkgrel}.so"
- _pick systemd-libs usr/lib/lib{nss,systemd,udev}*.so*
- _pick systemd-libs usr/lib/pkgconfig
- _pick systemd-libs usr/include
- _pick systemd-libs usr/share/man/man3
- _pick systemd-libs usr/share/man/man8/{nss-,libnss_}*
- # Parabola: Further split `systemd-libs`
- (
- cd "$srcdir/systemd-libs"
- _pick systemd-libsystemd usr/include/systemd
- _pick systemd-libsystemd usr/lib/pkgconfig/libsystemd.pc
- _pick systemd-libsystemd usr/lib/libsystemd.so*
- _pick systemd_libsystemd usr/share/man/man3/{SD,sd,libsystemd}*
- _pick systemd-libudev usr/include/libudev.h
- _pick systemd-libudev usr/lib/pkgconfig/libudev.pc
- _pick systemd-libudev usr/lib/libudev.so*
- _pick systemd-libudev usr/share/man/man3/*udev*
- local nssmodule
- for nssmodule in systemd myhostname mymachines resolve; do
- _pick systemd-nss-$nssmodule usr/share/man/man8/nss-$nssmodule.8
- _pick systemd-nss-$nssmodule usr/share/man/man8/libnss_$nssmodule.*.8
- _pick systemd-nss-$nssmodule usr/lib/libnss_$nssmodule.so*
- done
- )
- # Verify that there's nothing left in `systemd-libs`.
- if ! rmdir "$srcdir/systemd-libs"; then
- error '%q should not longer exist\n' "$srcdir/systemd-libs"
- find "$srcdir/systemd-libs" -ls >&2
- return 1
- fi
- # Parabola: Pull out `systemd-udev`.
- # NB: Must do this *after* pulling out `systemd-libudev`.
- _pick systemd-udev etc/udev/
- _pick systemd-udev usr/lib/udev/
- while read -d '' -r file; do
- _pick systemd-udev "$file"
- done < <(find . \( -name '*udev*' -o -name '*hwdb*' \) -printf '%P\0')
- # Parabola: Pull out `systemd-boot`.
- _pick systemd-boot usr/bin/bootctl
- _pick systemd-boot usr/lib/systemd/boot/
- _pick systemd-boot usr/share/bash-completion/completions/bootctl
- _pick systemd-boot usr/share/zsh/site-functions/_bootctl
- _pick systemd-boot usr/share/man/man1/bootctl.1
- _pick systemd-boot usr/share/man/man5/loader.conf.5
- _pick systemd-boot usr/share/man/man7/sd-boot.7
- _pick systemd-boot usr/share/man/man7/systemd-boot.7
- # TODO: Consider also including integrations such as
- # systemd-boot-{random-seed,update}.service,
- # 90-loaderentry.install, or systemd-bless-boot.
- _pick systemd-ukify usr/bin/ukify
- _pick systemd-ukify usr/lib/systemd/ukify
- _pick systemd-ukify usr/share/man/man1/ukify.1
- # we move the ukify hook itself, but keep 90-uki-copy.install in place,
- # because there are other ways to generate UKIs w/o ukify, e.g. w/ mkinitcpio
- _pick systemd-ukify usr/lib/kernel/install.d/60-ukify.install
- _pick systemd-sysvcompat usr/share/man/man1/init.1
- _pick systemd-sysvcompat usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8
- _pick systemd-sysvcompat usr/bin/{halt,init,poweroff,reboot,shutdown}
- _pick systemd-resolvconf usr/share/man/man1/resolvconf.1
- _pick systemd-resolvconf usr/bin/resolvconf
- _pick systemd-tests usr/lib/systemd/tests
- )
- # Parabola: Split the package.
- # (the "eval"/"outputvar" parts are so that `makepkg --printsrcinfo` works)
- license=($(eval "printf '%s\n' \"\${${outputvar:-license}[@]}\"|grep -vFx -e CC0-1.0 -e GPL-2.0-or-later")) # the CC0 parts end up in systemd-common, the GPL2 parts end up in systemd-udev
- depends=($(eval "printf '%s\n' \"\${${outputvar:-depends}[@]}\"|grep -vFx -f <(_lib_deps libsystemd-shared)"))
- depends+=("systemd-common=$pkgver-$pkgrel" "systemd-boot=$pkgver" 'udev')
- provides=($(eval "printf '%s\n' \"\${${outputvar:-provides}[@]}\"|grep -v -e nss-myhostname -e ^udev="))
- replaces=($(eval "printf '%s\n' \"\${${outputvar:-replaces}[@]}\"|grep -v -e nss-myhostname -e ^udev"))
- conflicts=($(eval "printf '%s\n' \"\${${outputvar:-conflicts}[@]}\"|grep -v -e nss-myhostname -e ^udev"))
- backup=($(eval "printf '%s\n' \"\${${outputvar:-backup}[@]}\"|grep -v -e etc/udev"))
- # we'll create this on installation
- rmdir "$pkgdir"/var/log/journal/remote
- # avoid a potential conflict with [core]/filesystem
- rm "$pkgdir"/usr/share/factory/etc/{issue,nsswitch.conf}
- sed -i -e '/^C \/etc\/nsswitch\.conf/d' \
- -e '/^C \/etc\/issue/d' "$pkgdir"/usr/lib/tmpfiles.d/etc.conf
- # ship default policy to leave services disabled
- echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
- # The group 'systemd-journal' is allocated dynamically and may have varying
- # gid on different systems. Let's install with gid 0 (root), systemd-tmpfiles
- # will fix the permissions for us. (see /usr/lib/tmpfiles.d/systemd.conf)
- install -d -o root -g root -m 2755 "$pkgdir"/var/log/journal
- # Parabola: moved to package_systemd-boot()
- # add example bootctl configuration
- #install -D -m0644 parabola.conf "$pkgdir"/usr/share/systemd/bootctl/parabola.conf
- #install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
- #install -D -m0644 splash-parabola.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-parabola.bmp
- # pacman hooks
- #install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook Parabola: moved to package_systemd-common()
- install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *.hook
- rm -- "$pkgdir"/usr/share/libalpm/hooks/*{udev,hwdb}* # Parabola: we put these in our `systmed-udev` package
- # overwrite the systemd-user PAM configuration with our own
- install -D -m0644 systemd-user.pam "$pkgdir"/etc/pam.d/systemd-user
- }
- package_systemd-libs() {
- pkgdesc='systemd client libraries'
- depends=('glibc' 'gcc-libs' 'libcap' 'libgcrypt' 'lz4' 'xz' 'zstd')
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- 'MIT-0' # documentation
- )
- provides=('libsystemd' 'libsystemd.so' 'libudev.so')
- conflicts=('libsystemd')
- replaces=('libsystemd')
- # Parabola: First, sanity check that _lib_deps finds all of the
- # packages that are in Arch's depends=() list.
- diff -u /dev/null <(printf '%s\n' "${depends[@]}" | grep -vFx -f <(
- _lib_deps libsystemd libudev libnss_{systemd,myhostname,mymachines,resolve}))
- # Parabola: Split the package.
- pkgdesc+=' metapackage'
- depends=("${_systemd_libs[@]}")
- # (the "eval"/"outputvar" parts are so that `makepkg --printsrcinfo` works)
- provides=($(eval "printf '%s\n' \"\${${outputvar:-provides}[@]}\"|grep -v -e '\.so$'"))
- return
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-resolvconf() {
- pkgdesc='systemd resolvconf replacement (for use with systemd-resolved)'
- depends=("systemd=${pkgver}")
- provides=('openresolv' 'resolvconf')
- conflicts=('resolvconf')
- replaces+=('notsystemd-resolvconf') # notsystemd-resolvconf should have never existed
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-sysvcompat() {
- pkgdesc='sysvinit compat for systemd'
- conflicts=('sysvinit')
- depends=("systemd=${pkgver}")
- provides=('init')
- conflicts+=('init')
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-tests() {
- pkgdesc='systemd tests'
- depends=("systemd=${pkgver}")
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-ukify() {
- pkgdesc='Combine kernel and initrd into a signed Unified Kernel Image'
- provides=('ukify')
- depends=("systemd=${pkgver}" 'binutils' 'python-cryptography' 'python-pefile')
- optdepends=('python-pillow: Show the size of splash image'
- 'sbsigntools: Sign the embedded kernel')
- mv -v "$pkgname"/* "$pkgdir"
- }
- # vim:ft=sh syn=sh et sw=2:
- # Parabola: The remainder of the file is our additional split packages.
- package_systemd-common() {
- pkgdesc='systemd files shared between split packages'
- depends=($(_lib_deps libsystemd-shared))
- license+=(
- 'CC0-1.0' # siphash
- )
- mv -v "$pkgname"/* "$pkgdir"
- install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
- }
- package_systemd-udev() {
- pkgdesc='Userspace device file manager'
- license+=('GPL-2.0-or-later')
- depends=("systemd-common=$pkgver-$pkgrel" "systemd-libudev=$pkgver"
- 'hwdata' 'kmod' 'libkmod.so' 'util-linux' 'zlib')
- backup=(etc/udev/iocost.conf
- etc/udev/udev.conf)
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- # pacman hooks
- install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *{udev,hwdb}*.hook
- }
- package_systemd-boot() {
- pkgdesc='Simple UEFI boot manager'
- depends=("systemd-common=$pkgver-$pkgrel")
- mv -v "$pkgname"/* "$pkgdir"
- # add example bootctl configuration
- install -D -m0644 parabola.conf "$pkgdir"/usr/share/systemd/bootctl/parabola.conf
- install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
- install -D -m0644 splash-parabola.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-parabola.bmp
- }
- # TODO(lukeshu): I might have been over-zealous adding the licenses
- # for `siphash` and `src/basic/linux/*` to the following packages;
- # audit whether those packages actually include that code.
- package_systemd-libsystemd() {
- pkgdesc='systemd client library'
- depends=($(_lib_deps libsystemd))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- 'MIT-0' # documentation
- )
- provides=('libsystemd.so')
- provides+=("libsystemd-standalone=$pkgver")
- conflicts+=('libsystemd-standalone')
- replaces+=('libsystemd-standalone')
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-libudev() {
- pkgdesc='systemd library for enumerating and introspecting local devices'
- depends=($(_lib_deps libudev))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- )
- provides=('libudev.so')
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-nss-systemd() {
- pkgdesc='NSS module providing user and group resolution for dynamic users and groups'
- depends=($(_lib_deps libnss_systemd))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- )
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-nss-myhostname() {
- pkgdesc='NSS module providing hostname resolution for the locally configured system hostname'
- depends=($(_lib_deps libnss_myhostname))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- )
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-nss-mymachines() {
- pkgdesc='NSS module providing hostname resolution for local systemd-machined container instances'
- depends=($(_lib_deps libnss_mymachines))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- )
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- }
- package_systemd-nss-resolve() {
- pkgdesc='NSS module providing hostname resolution via systemd-resolved'
- depends=($(_lib_deps libnss_resolve))
- license+=(
- 'CC0-1.0' # siphash
- 'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
- )
- provides+=("${pkgname#systemd-}=$pkgver")
- conflicts+=("${pkgname#systemd-}")
- replaces+=("${pkgname#systemd-}")
- mv -v "$pkgname"/* "$pkgdir"
- }
|