149 lines
4.5 KiB
Bash
149 lines
4.5 KiB
Bash
# Adapted from the Arch Linux systemd build script.
|
|
# Maintainer: Jack L. Frost <fbt@fleshless.org>
|
|
|
|
pkgbase=systemd-libs
|
|
pkgname=('systemd-libs-systemd' 'systemd-libs-udev')
|
|
_tag='472b4e59c3c095248b316ccceac5565fcaae9d3a' # git rev-parse v${pkgver}
|
|
_tag_name=252.1
|
|
pkgver="${_tag_name/-/}"
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
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-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
|
|
'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
|
|
'bash-completion' 'p11-kit' 'python-jinja')
|
|
options=('strip')
|
|
#validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
|
|
# '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
|
source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}"
|
|
"git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}"
|
|
'0001-Use-Arch-Linux-device-access-groups.patch')
|
|
|
|
_backports=(
|
|
# boot: Fix error message
|
|
'6ee4aa22140dd8d51b1a18882eb4220629b8dd8f'
|
|
# boot: Several fixes
|
|
'b7b327f856b3782f28be561d612d66ff406c7789~1..967a868563996e928f1fade5bcafc82a7219742b'
|
|
|
|
# tpm2-util: force default TCTI to be "device" with parameter "/dev/tpmrm0"
|
|
'34906680afe60d724ea435b79b9b830a4bf2e7e9'
|
|
# tpm2: add some extra validation of device string before using it
|
|
'50a085143fa8f5dd6b6b3cef8a6ea2ec7c53ed0d'
|
|
)
|
|
|
|
_reverts=(
|
|
)
|
|
|
|
prepare() {
|
|
cd "systemd-stable"
|
|
|
|
# add upstream repository for cherry-picking
|
|
git remote add -f upstream ../systemd
|
|
|
|
local _c
|
|
for _c in "${_backports[@]}"; do
|
|
if [[ $_c == *..* ]]; then
|
|
git log --oneline --reverse "${_c}"
|
|
else
|
|
git log --oneline -1 "${_c}"
|
|
fi
|
|
git cherry-pick -n -m1 "${_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
|
|
}
|
|
|
|
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 without filtering (https://www.quad9.net/)
|
|
# * Google (https://developers.google.com/speed/public-dns/)
|
|
1.1.1.1
|
|
9.9.9.10
|
|
8.8.8.8
|
|
2606:4700:4700::1111
|
|
2620:fe::10
|
|
2001:4860:4860::8888
|
|
)
|
|
|
|
local _meson_options=(
|
|
-Dversion-tag="${pkgver}-${pkgrel}-arch"
|
|
-Dmode=release
|
|
|
|
-Dgnu-efi=true
|
|
-Dima=false
|
|
-Dlibidn2=true
|
|
-Dlz4=true
|
|
-Dman=true
|
|
|
|
# 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=hybrid
|
|
-Ddefault-kill-user-processes=false
|
|
-Ddefault-locale=C
|
|
-Ddns-over-tls=openssl
|
|
-Dfallback-hostname='archlinux'
|
|
-Dnologin-path=/usr/bin/nologin
|
|
-Dntp-servers="${_timeservers[*]}"
|
|
-Ddns-servers="${_nameservers[*]}"
|
|
-Drpmmacrosdir=no
|
|
-Dsysvinit-path=
|
|
-Dsysvrcnd-path=
|
|
)
|
|
|
|
arch-meson "systemd-stable" build "${_meson_options[@]}"
|
|
|
|
ninja -C build
|
|
}
|
|
|
|
#check() { meson test -C build; }
|
|
|
|
package_systemd-libs-systemd() {
|
|
pkgdesc='systemd client libraries'
|
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz' 'zstd')
|
|
license=('LGPL2.1')
|
|
provides=('libsystemd' 'libsystemd.so' 'systemd-libs')
|
|
conflicts=('libsystemd')
|
|
replaces=('libsystemd')
|
|
|
|
DESTDIR="$srcdir/full-install" meson install -C build
|
|
|
|
install -d -m0755 "$pkgdir"/usr/lib
|
|
cp --archive "$srcdir/full-install/usr/lib/"lib{nss,systemd}*.so* "$pkgdir/usr/lib/"
|
|
|
|
install -d -m0755 "$pkgdir"/usr/lib/include
|
|
cp --archive "$srcdir/full-install/usr/include/systemd" "$pkgdir/usr/include/"
|
|
}
|
|
|
|
package_systemd-libs-udev() {
|
|
pkgdesc="udev client libraries"
|
|
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
|
license=('LGPL2.1')
|
|
provides=('libudev' 'libudev.so')
|
|
|
|
# udev libs
|
|
install -d -m0755 "$pkgdir"/usr/lib
|
|
cp --archive "$srcdir/full-install/usr/lib/"libudev* "$pkgdir/usr/lib/"
|
|
|
|
install -d -m0755 "$pkgdir"/usr/include
|
|
cp --archive "$srcdir/full-install/usr/include/libudev.h" "$pkgdir/usr/include/"
|
|
}
|
|
|
|
sha1sums=('SKIP'
|
|
'SKIP'
|
|
'0486ab66087de95ac304d6f599d914172d740a7c')
|