413ba59b42
Package builder / BuildPackage (push) Successful in 24m33s
Signed-off-by: fbt <fbt@fleshless.org>
258 lines
9.7 KiB
Bash
258 lines
9.7 KiB
Bash
# Maintainer: Jack L. Frost <fbt@fleshless.org>
|
|
# Modified from the upstream Arch system PKGBUILD
|
|
|
|
pkgbase=systemd-libs
|
|
pkgname=( 'systemd-libs-systemd' 'systemd-libs-udev' 'systemd-utils-udev' 'systemd-utils-tmpfiles' )
|
|
# Upstream versioning is incompatible with pacman's version comparisons, one
|
|
# way or another. We use proper version for pacman here (no dash for rc
|
|
# release!), and change in source array below.
|
|
pkgver=261
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
license=('LGPL-2.1-or-later')
|
|
url='https://www.github.com/systemd/systemd'
|
|
makedepends=('acl' 'apparmor' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
|
|
'intltool' 'iptables' 'kmod' 'libarchive' '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' 'linux-headers')
|
|
conflicts=("mkinitcpio<38-1")
|
|
# For pacman's version comparisons $pkgver is missing the dash that would be
|
|
# in an upstream rc version so add it back when fetching the tag from github.
|
|
source=("git+https://github.com/systemd/systemd#tag=v${pkgver/rc/-rc}?signed"
|
|
'0001-Use-Arch-Linux-device-access-groups.patch'
|
|
'systemd-hook'
|
|
'25-systemd-hwdb.hook'
|
|
'35-systemd-udev-reload.hook')
|
|
|
|
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>
|
|
|
|
_meson_version="${pkgver}-${pkgrel}"
|
|
_systemd_src_dir=systemd
|
|
|
|
if ((_systemd_UPSTREAM)); then
|
|
_meson_version="${pkgver}"
|
|
fi
|
|
|
|
# Some heuristics to detect that we are building on OBS, with no network access. Skip
|
|
# git verification, and use the OBS-provided tarball instead. The sources will be
|
|
# unpacked by OBS in $package-$version/
|
|
if [ -f /.build/build.dist ] && [ -d /usr/src/packages/SOURCES ] && [ -d /usr/src/packages/BUILD ] && [ -d /usr/src/packages/OTHER ]; then
|
|
source[0]="$(find . -name "${pkgbase}-${pkgver}.tar.*" -print -quit)"
|
|
sha512sums[0]='SKIP'
|
|
_systemd_src_dir="${pkgbase}-${pkgver}"
|
|
fi
|
|
|
|
_backports=(
|
|
)
|
|
|
|
_reverts=(
|
|
)
|
|
|
|
prepare() {
|
|
cd "${_systemd_src_dir}"
|
|
|
|
# return if not a git repository
|
|
if ! git status >/dev/null 2>&1; then
|
|
return
|
|
fi
|
|
|
|
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
|
|
}
|
|
|
|
build() {
|
|
local _timeservers=({0..3}.arch.pool.ntp.org)
|
|
local _nameservers=(
|
|
# We use these public name services, ordered by their privacy policy (hopefully):
|
|
# * Quad9 (https://quad9.net/privacy/policy/)
|
|
'9.9.9.9#dns.quad9.net'
|
|
'2620:fe::9#dns.quad9.net'
|
|
# * Cloudflare (https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/)
|
|
'1.1.1.1#cloudflare-dns.com'
|
|
'2606:4700:4700::1111#cloudflare-dns.com'
|
|
# * Google (https://developers.google.com/speed/public-dns/privacy)
|
|
'8.8.8.8#dns.google'
|
|
'2001:4860:4860::8888#dns.google'
|
|
# You do not agree? Fine, change it in your local configuration.
|
|
)
|
|
|
|
local _meson_options=(
|
|
-Dversion-tag="${_meson_version}-arch"
|
|
-Dvcs-tag=false
|
|
-Dshared-lib-tag="${_meson_version}"
|
|
-Dmode=release
|
|
|
|
-Dapparmor=enabled
|
|
-Dbootloader=enabled
|
|
-Dxenctrl=disabled
|
|
-Dbpf-framework=enabled
|
|
-Dima=false
|
|
-Dinstall-tests=true
|
|
-Dlibidn2=enabled
|
|
-Dlz4=enabled
|
|
-Dman=enabled
|
|
-Dselinux=disabled
|
|
-Dsshdprivsepdir=/usr/share/empty.sshd
|
|
-Dsysupdated=enabled
|
|
-Dvmlinux-h=provided
|
|
-Dvmlinux-h-path=/usr/src/linux/vmlinux.h
|
|
|
|
-Dcompat-sysv-interfaces=false
|
|
-Ddbuspolicydir=/usr/share/dbus-1/system.d
|
|
-Ddefault-dnssec=no
|
|
-Ddefault-kill-user-processes=false
|
|
-Ddefault-locale='C.UTF-8'
|
|
-Dlocalegen-path=/usr/bin/locale-gen
|
|
-Ddns-over-tls=openssl
|
|
-Dfallback-hostname='archlinux'
|
|
-Dnologin-path=/usr/bin/nologin
|
|
-Dntp-servers="${_timeservers[*]}"
|
|
-Ddns-servers="${_nameservers[*]}"
|
|
-Drpmmacrosdir=no
|
|
|
|
-Dsbat-distro='arch'
|
|
-Dsbat-distro-summary='Arch Linux'
|
|
-Dsbat-distro-pkgname="${pkgname}"
|
|
-Dsbat-distro-version="${pkgver}"
|
|
-Dsbat-distro-url="https://archlinux.org/packages/core/x86_64/${pkgname}/"
|
|
)
|
|
|
|
arch-meson "${_systemd_src_dir}" build "${_meson_options[@]}" $MESON_EXTRA_CONFIGURE_OPTIONS
|
|
|
|
meson compile -C build
|
|
}
|
|
|
|
package_systemd-libs-systemd() {
|
|
pkgdesc='systemd client libraries'
|
|
depends=('glibc' 'libgcc' 'libgcc_s.so' 'libgcrypt' 'lz4' 'xz' 'zstd')
|
|
license+=(
|
|
'CC0-1.0' # siphash
|
|
'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
|
|
)
|
|
provides=('libsystemd' 'libsystemd.so')
|
|
conflicts=('libsystemd')
|
|
replaces=('libsystemd')
|
|
|
|
meson install -C build --no-rebuild --destdir "${srcdir}/pkg" --quiet
|
|
|
|
# We don't need the whole thing
|
|
install -d -m0755 systemd-libs/lib/systemd
|
|
mv "${srcdir}/pkg"/usr/lib/lib{nss,systemd,udev}*.so* systemd-libs/lib/
|
|
mv "${srcdir}/pkg"/usr/lib/systemd/libsystemd*.so systemd-libs/lib/systemd/
|
|
mv "${srcdir}/pkg"/usr/lib/{security,cryptsetup} systemd-libs/lib/
|
|
mv "${srcdir}/pkg"/usr/lib/pkgconfig systemd-libs/lib/pkgconfig
|
|
mv "${srcdir}/pkg"/usr/include systemd-libs/include
|
|
|
|
install -d -m0755 "$pkgdir/usr/share/man"
|
|
install -d -m0755 "$pkgdir/usr/lib"
|
|
install -d -m0755 "$pkgdir/usr/include"
|
|
|
|
mv systemd-libs/lib/lib{nss,systemd}*.so* "$pkgdir/usr/lib/"
|
|
mv systemd-libs/include/systemd "$pkgdir/usr/include/systemd"
|
|
mv systemd-libs/lib/systemd "$pkgdir/usr/lib/"
|
|
}
|
|
|
|
package_systemd-libs-udev() {
|
|
pkgdesc='systemd client libraries, udev'
|
|
depends=('glibc' 'libgcc' 'libgcc_s.so' 'libgcrypt' 'lz4' 'xz' 'zstd')
|
|
license+=(
|
|
'CC0-1.0' # siphash
|
|
'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
|
|
)
|
|
provides=('libudev.so')
|
|
|
|
install -d -m0755 "$pkgdir/usr/lib/pkgconfig"
|
|
install -d -m0755 "$pkgdir/usr/include"
|
|
|
|
mv systemd-libs/lib/libudev*.so* "$pkgdir/usr/lib"
|
|
mv systemd-libs/lib/pkgconfig/libudev.pc "$pkgdir/usr/lib/pkgconfig/libudev.pc"
|
|
mv systemd-libs/include/libudev.h "$pkgdir/usr/include/libudev.h"
|
|
}
|
|
|
|
package_systemd-utils-udev() {
|
|
pkgdesc='systemd-udev, separated'
|
|
depends=("systemd-libs-udev=${pkgver}"
|
|
'acl' 'bash' 'cryptsetup' 'dbus'
|
|
'dbus-units' 'kbd' 'kmod' 'hwdata'
|
|
'libgcrypt' 'libxcrypt' 'libidn2' 'lz4' 'pam'
|
|
'libelf' 'libseccomp' 'util-linux' 'xz' 'pcre2' 'audit'
|
|
'openssl')
|
|
license+=(
|
|
'CC0-1.0' # siphash
|
|
'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
|
|
)
|
|
provides=('udev')
|
|
|
|
install -d -m0755 "$pkgdir/etc"
|
|
install -d -m0755 "$pkgdir/usr/bin"
|
|
install -d -m0755 "$pkgdir/usr/lib/systemd/network"
|
|
install -d -m0755 "$pkgdir/usr/share/man/man"{5,7,8}
|
|
|
|
install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
|
|
install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks 25-systemd-hwdb.hook 35-systemd-udev-reload.hook
|
|
|
|
mv "${srcdir}/pkg/etc/udev" "$pkgdir/etc/"
|
|
mv "${srcdir}/pkg/usr/bin/"{systemd-hwdb,udevadm} "$pkgdir/usr/bin/"
|
|
mv "${srcdir}/pkg/usr/lib/systemd/systemd-udevd" "$pkgdir/usr/lib/systemd/"
|
|
mv "${srcdir}/pkg/usr/lib/systemd/network/99-default.link" "$pkgdir/usr/lib/systemd/network/"
|
|
mv "${srcdir}/pkg/usr/lib/udev" "$pkgdir/usr/lib/"
|
|
|
|
# man
|
|
mv "${srcdir}/pkg/usr/share/man/man5/"udev* "$pkgdir/usr/share/man/man5/"
|
|
mv "${srcdir}/pkg/usr/share/man/man7/udev.7" "$pkgdir/usr/share/man/man7/"
|
|
mv "${srcdir}/pkg/usr/share/man/man8/udevadm.8" "$pkgdir/usr/share/man/man8/"
|
|
}
|
|
|
|
package_systemd-utils-tmpfiles() {
|
|
pkgdesc='systemd-tmpfiles, separated'
|
|
depends=("systemd-libs-udev=${pkgver}"
|
|
'acl' 'bash' 'cryptsetup' 'dbus'
|
|
'dbus-units' 'kbd' 'kmod' 'hwdata'
|
|
'libgcrypt' 'libxcrypt' 'libidn2' 'lz4' 'pam'
|
|
'libelf' 'libseccomp' 'util-linux' 'xz' 'pcre2' 'audit'
|
|
'openssl')
|
|
license+=(
|
|
'CC0-1.0' # siphash
|
|
'GPL-2.0-or-later WITH Linux-syscall-note' # src/basic/linux/*
|
|
)
|
|
provides=('systemd-tmpfiles')
|
|
|
|
install -d -m0755 "$pkgdir/usr/bin"
|
|
install -d -m0755 "$pkgdir/usr/lib/tmpfiles.d"
|
|
install -d -m0755 "$pkgdir/usr/share/man/man"{5,8}
|
|
|
|
mv "${srcdir}/pkg/usr/bin/systemd-tmpfiles" "$pkgdir/usr/bin/"
|
|
mv "${srcdir}/pkg/usr/lib/tmpfiles.d/"{etc,home,static-nodes-permissions,var}.conf "$pkgdir/usr/lib/tmpfiles.d/"
|
|
|
|
# man
|
|
mv "${srcdir}/pkg/usr/share/man/man5/tmpfiles.d.5" "$pkgdir/usr/share/man/man5/"
|
|
mv "${srcdir}/pkg/usr/share/man/man8/systemd-tmpfiles.8" "$pkgdir/usr/share/man/man8/"
|
|
}
|
|
|
|
sha1sums=('fd318e4ce1abdf6fe35572df5431022e4a9952fd'
|
|
'43246abd17d48c734328daef3d47ed16fa6ffbd4'
|
|
'7fca8ce1bac13467919ceedc29a9da649d570e5e'
|
|
'3d44701e7bc3a886d9734a98671c376ec928db0e'
|
|
'0c6af3f4bf18c6de5c429b9b676c30fdffc2fb6b')
|
|
|
|
# vim:ft=sh syn=sh et sw=2:
|