new blfs: sys-apps/systemd-257.8
This commit is contained in:
174
sys-apps/systemd-257.8.PKGBUILD
Normal file
174
sys-apps/systemd-257.8.PKGBUILD
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
pkgname="systemd"
|
||||||
|
pkgver=257.8
|
||||||
|
pkgdesc="system and service manager"
|
||||||
|
homepage="https://www.freedesktop.org/wiki/Software/systemd/"
|
||||||
|
license=("LGPL-2.1-or-laterC" "C0-1.0" "GPL-2.0-or-later" "MIT-0")
|
||||||
|
dependences=(
|
||||||
|
sys-libs/pam
|
||||||
|
sys-fs/btrfs-progs
|
||||||
|
dev-libs/libgcrypt
|
||||||
|
sys-libs/libseccomp
|
||||||
|
app-misc/make-ca
|
||||||
|
dev-libs/pcre2
|
||||||
|
net-misc/rsync
|
||||||
|
dev-debug/valgrind
|
||||||
|
app-shells/zsh
|
||||||
|
dev-python/lxml
|
||||||
|
)
|
||||||
|
_systemdhooks=("20-systemd-sysusers.HOOK"
|
||||||
|
"21-systemd-tmpfiles.HOOK"
|
||||||
|
"25-systemd-binfmt.HOOK"
|
||||||
|
"25-systemd-catalog.HOOK"
|
||||||
|
"25-systemd-hwdb.HOOK"
|
||||||
|
"30-systemd-daemon-reload-system.HOOK"
|
||||||
|
"30-systemd-daemon-reload-user.HOOK"
|
||||||
|
"35-systemd-udev-reload.HOOK"
|
||||||
|
"35-systemd-update.HOOK"
|
||||||
|
)
|
||||||
|
_systemdhookmu5sums=("a566b0107a97b603a7ee48e28fb59817"
|
||||||
|
"5bb19c1c2964721cf41258990501404e"
|
||||||
|
"8f6cabd1b4e96a1c11c2feb0989ddfd6"
|
||||||
|
"d49449a2435dc635a39cd46316c271a7"
|
||||||
|
"34b38916bf4111fc0b40fdcded1d3a93"
|
||||||
|
"49ffd7e5c810f8b3cf14fb9535d6a4c5"
|
||||||
|
"e38543ca711f6ff063174b82afe3cbb3"
|
||||||
|
"db079083de34b7e3201d8e9b6a3900ab"
|
||||||
|
"7b34445517de5da3ef1db422e4b80f8c"
|
||||||
|
)
|
||||||
|
sources=("${pkgname}-${pkgver}.tar.gz"
|
||||||
|
${_systemdhooks[@]}
|
||||||
|
)
|
||||||
|
urls=("https://github.com/systemd/systemd/archive/v${pkgver}/${sources[0]}"
|
||||||
|
${_systemdhooks[@]}
|
||||||
|
)
|
||||||
|
md5sums=("25fe5d328e22641254761f1baa74cee0"
|
||||||
|
${_systemdhookmu5sums[@]}
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||||
|
sed -e 's/GROUP="render"/GROUP="video"/' \
|
||||||
|
-e 's/GROUP="sgx", //' \
|
||||||
|
-i rules.d/50-udev-default.rules.in
|
||||||
|
}
|
||||||
|
|
||||||
|
src_build() {
|
||||||
|
local _meson_options=(
|
||||||
|
--prefix=/usr
|
||||||
|
--libdir=/usr/lib
|
||||||
|
--buildtype=release
|
||||||
|
-Dvcs-tag=false
|
||||||
|
-Dsysvinit-path=
|
||||||
|
-Dsysvrcnd-path=
|
||||||
|
-Dapparmor=disabled
|
||||||
|
-Dfirstboot=false
|
||||||
|
-Dinstall-tests=false
|
||||||
|
-Dldconfig=false
|
||||||
|
-Dsysusers=true
|
||||||
|
-Drpmmacrosdir=no
|
||||||
|
-Dhomed=disabled
|
||||||
|
-Duserdb=false
|
||||||
|
-Dman=enabled
|
||||||
|
-Dmode=release
|
||||||
|
-Dpam=enabled
|
||||||
|
-Dpamconfdir=/etc/pam.d
|
||||||
|
-Ddev-kvm-mode=0660
|
||||||
|
-Dnobody-group=nogroup
|
||||||
|
-Dsysupdate=disabled
|
||||||
|
-Dbashcompletiondir=no
|
||||||
|
|
||||||
|
-Dacl=enabled
|
||||||
|
-Ddns-over-tls=openssl
|
||||||
|
-Dgcrypt=enabled
|
||||||
|
-Dopenssl=enabled
|
||||||
|
-Dcryptolib=openssl
|
||||||
|
-Dpcre2=enabled
|
||||||
|
-Dpolkit=enabled
|
||||||
|
-Dkmod=enabled
|
||||||
|
-Dlz4=enabled
|
||||||
|
-Dzstd=enabled
|
||||||
|
-Dseccomp=enabled
|
||||||
|
-Daudit=disabled
|
||||||
|
-Dbootloader=disabled
|
||||||
|
-Dbpf-framework=disabled
|
||||||
|
-Dvmlinux-h=disabled
|
||||||
|
-Dlibcryptsetup=disabled
|
||||||
|
-Dlibcurl=disabled
|
||||||
|
-Dlibfido2=disabled
|
||||||
|
-Dgnutls=disabled
|
||||||
|
-Dmicrohttpd=disabled
|
||||||
|
-Didn=false
|
||||||
|
-Dlibidn2=disabled
|
||||||
|
-Dimportd=disabled
|
||||||
|
-Dlibiptc=disabled
|
||||||
|
-Dp11kit=disabled
|
||||||
|
-Dpwquality=disabled
|
||||||
|
-Dqrencode=disabled
|
||||||
|
-Dtpm2=disabled
|
||||||
|
-Dukify=disabled
|
||||||
|
-Dkernel-install=false
|
||||||
|
|
||||||
|
-Ddefault-kill-user-processes=false
|
||||||
|
-Ddefault-locale='C.UTF-8'
|
||||||
|
-Ddefault-dnssec=no
|
||||||
|
-Ddefault-dns-over-tls=no
|
||||||
|
-Dcreate-log-dirs=false
|
||||||
|
-Dsbat-distro='lfs'
|
||||||
|
-Dsbat-distro-summary='Linux from Scratch'
|
||||||
|
-Dsbat-distro-pkgname="${pkgname}"
|
||||||
|
-Dsbat-distro-version="${pkgver}"
|
||||||
|
-Ddocdir=/usr/share/doc/systemd-${pkgver}
|
||||||
|
)
|
||||||
|
|
||||||
|
meson setup build "${_meson_options[@]}"
|
||||||
|
|
||||||
|
meson compile -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
src_check() {
|
||||||
|
# unset these, from Gentoo
|
||||||
|
unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
|
||||||
|
chown -R leaf .
|
||||||
|
su leaf -c "PATH=$PATH \
|
||||||
|
LANG=C.UTF-8 LC_ALL=C.UTF-8 LC_CTYPE=C.UTF-8 \
|
||||||
|
meson test -C build --print-errorlogs"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
meson install -C build --no-rebuild --destdir "$pkgdir" --quiet
|
||||||
|
for _systemdhook in ${_systemdhooks[@]}; do
|
||||||
|
leaf_install_hook ${filedir}/${_systemdhook}
|
||||||
|
done
|
||||||
|
install -d -v -m755 ${pkgdir}/usr/share/man
|
||||||
|
}
|
||||||
|
|
||||||
|
# from Arch
|
||||||
|
skip_chrooted() {
|
||||||
|
if systemd-detect-virt --chroot; then
|
||||||
|
echo >&2 " Skipped: Running in chroot."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# from Arch
|
||||||
|
systemd_live() {
|
||||||
|
skip_chrooted
|
||||||
|
|
||||||
|
if ! systemd-notify --booted; then
|
||||||
|
echo >&2 " Skipped: Current root is not booted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_postinstall() {
|
||||||
|
systemd_live
|
||||||
|
|
||||||
|
systemd-sysusers
|
||||||
|
|
||||||
|
# follow Arch
|
||||||
|
# enable some services by default, but don't track them
|
||||||
|
systemctl enable \
|
||||||
|
getty@tty1.service \
|
||||||
|
systemd-userdbd.socket
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:ft=sh syn=sh et sw=2:
|
||||||
6
sys-apps/systemd-257.8/20-systemd-sysusers.HOOK
Normal file
6
sys-apps/systemd-257.8/20-systemd-sysusers.HOOK
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
target=(/usr/lib/sysusers.d/*.conf)
|
||||||
|
triggers=("install")
|
||||||
|
operation() {
|
||||||
|
/usr/bin/systemd-sysusers
|
||||||
|
}
|
||||||
|
|
||||||
5
sys-apps/systemd-257.8/21-systemd-tmpfiles.HOOK
Normal file
5
sys-apps/systemd-257.8/21-systemd-tmpfiles.HOOK
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
target=(/usr/lib/tmpfiles.d/*.conf)
|
||||||
|
triggers=("install")
|
||||||
|
operation() {
|
||||||
|
/usr/bin/systemd-tmpfiles --create
|
||||||
|
}
|
||||||
14
sys-apps/systemd-257.8/25-systemd-binfmt.HOOK
Normal file
14
sys-apps/systemd-257.8/25-systemd-binfmt.HOOK
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
target=(/usr/lib/binfmt.d/*.conf)
|
||||||
|
triggers=("install")
|
||||||
|
operation(){
|
||||||
|
if systemd-detect-virt --chroot; then
|
||||||
|
echo >&2 " Skipped: Running in chroot."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! systemd-notify --booted; then
|
||||||
|
echo >&2 " Skipped: Current root is not booted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/lib/systemd/systemd-binfmt
|
||||||
|
}
|
||||||
5
sys-apps/systemd-257.8/25-systemd-catalog.HOOK
Normal file
5
sys-apps/systemd-257.8/25-systemd-catalog.HOOK
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
target=(/usr/lib/systemd/catalog/*)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation() {
|
||||||
|
/usr/bin/journalctl --update-catalog
|
||||||
|
}
|
||||||
5
sys-apps/systemd-257.8/25-systemd-hwdb.HOOK
Normal file
5
sys-apps/systemd-257.8/25-systemd-hwdb.HOOK
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
target=(/usr/lib/udev/hwdb.d/*)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation() {
|
||||||
|
/usr/bin/systemd-hwdb --usr update
|
||||||
|
}
|
||||||
14
sys-apps/systemd-257.8/30-systemd-daemon-reload-system.HOOK
Normal file
14
sys-apps/systemd-257.8/30-systemd-daemon-reload-system.HOOK
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
target=(/usr/lib/systemd/system/*)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation(){
|
||||||
|
if systemd-detect-virt --chroot; then
|
||||||
|
echo >&2 " Skipped: Running in chroot."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! systemd-notify --booted; then
|
||||||
|
echo >&2 " Skipped: Current root is not booted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/bin/systemctl --system daemon-reload
|
||||||
|
}
|
||||||
14
sys-apps/systemd-257.8/30-systemd-daemon-reload-user.HOOK
Normal file
14
sys-apps/systemd-257.8/30-systemd-daemon-reload-user.HOOK
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
target=(/usr/lib/systemd/user/*)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation(){
|
||||||
|
if systemd-detect-virt --chroot; then
|
||||||
|
echo >&2 " Skipped: Running in chroot."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! systemd-notify --booted; then
|
||||||
|
echo >&2 " Skipped: Current root is not booted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/bin/systemctl reload 'user@*.service'
|
||||||
|
}
|
||||||
23
sys-apps/systemd-257.8/35-systemd-udev-reload.HOOK
Normal file
23
sys-apps/systemd-257.8/35-systemd-udev-reload.HOOK
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
target=(/usr/lib/udev/rules.d/*)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation() {
|
||||||
|
if systemd-detect-virt --chroot; then
|
||||||
|
echo >&2 " Skipped: Running in chroot."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! systemd-notify --booted; then
|
||||||
|
echo >&2 " Skipped: Current root is not booted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -S /run/udev/control ]; then
|
||||||
|
echo >&2 " Skipped: Device manager is not running."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/bin/udevadm control --reload
|
||||||
|
if [ ! -e /etc/systemd/do-not-udevadm-trigger-on-update ]; then
|
||||||
|
/usr/bin/udevadm trigger -c change
|
||||||
|
/usr/bin/udevadm settle
|
||||||
|
fi
|
||||||
|
}
|
||||||
5
sys-apps/systemd-257.8/35-systemd-update.HOOK
Normal file
5
sys-apps/systemd-257.8/35-systemd-update.HOOK
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
target=(/usr/)
|
||||||
|
triggers=("install" "remove")
|
||||||
|
operation() {
|
||||||
|
touch -c /usr
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user