fix: fix lfs/systemd

This commit is contained in:
2025-12-25 15:32:10 -05:00
parent 313d443ad9
commit 2ed5376a3d
3 changed files with 23 additions and 6 deletions

View File

@@ -6,19 +6,21 @@ license=("LGPL-2.1-or-laterC" "C0-1.0" "GPL-2.0-or-later" "MIT-0")
sources=("${pkgname}-${pkgver}.tar.gz" sources=("${pkgname}-${pkgver}.tar.gz"
"${pkgname}-man-pages-${pkgver}.tar.xz" "${pkgname}-man-pages-${pkgver}.tar.xz"
"30-systemd-daemon-reload-system.HOOK" "30-systemd-daemon-reload-system.HOOK"
"30-systemd-daemon-reload-user.HOOK"
) )
urls=("https://github.com/systemd/systemd/archive/v${pkgver}/${sources[0]}" urls=("https://github.com/systemd/systemd/archive/v${pkgver}/${sources[0]}"
"https://anduin.linuxfromscratch.org/LFS/${sources[1]}" "https://anduin.linuxfromscratch.org/LFS/${sources[1]}"
"30-systemd-daemon-reload-system.HOOK" "30-systemd-daemon-reload-system.HOOK"
"30-systemd-daemon-reload-user.HOOK"
) )
md5sums=("25fe5d328e22641254761f1baa74cee0" md5sums=("25fe5d328e22641254761f1baa74cee0"
"a44063e2ec0cf4adfd2ed5c9e9e095c5" "a44063e2ec0cf4adfd2ed5c9e9e095c5"
"4074a547dcc72dcde3196face4df5a97" "49ffd7e5c810f8b3cf14fb9535d6a4c5"
"e38543ca711f6ff063174b82afe3cbb3"
) )
src_prepare() { src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1 tar -xf ${distdir}/${sources[0]} --strip-components=1
cp ${distdir}/${sources[2]} ./
sed -e 's/GROUP="render"/GROUP="video"/' \ sed -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' \ -e 's/GROUP="sgx", //' \
-i rules.d/50-udev-default.rules.in -i rules.d/50-udev-default.rules.in
@@ -56,18 +58,19 @@ src_build() {
} }
src_check() { src_check() {
pushd build pushd build &&
if [[ ! -f /etc/os-release ]]; then if [[ ! -f /etc/os-release ]]; then
echo 'NAME="Linux From Scratch"' > /etc/os-release echo 'NAME="Linux From Scratch"' > /etc/os-release
fi fi
ninja test ninja test &&
popd popd
} }
src_install() { src_install() {
pushd build pushd build
DESTDIR=$pkgdir ninja install DESTDIR=$pkgdir ninja install
leaf_install_hook ../${sources[2]} leaf_install_hook ${filedir}/${sources[2]}
leaf_install_hook ${filedir}/${sources[3]}
install -d -v -m755 ${pkgdir}/usr/share/man install -d -v -m755 ${pkgdir}/usr/share/man
tar -xf ${distdir}/${sources[1]} \ tar -xf ${distdir}/${sources[1]} \
--no-same-owner --strip-components=1 \ --no-same-owner --strip-components=1 \

View File

@@ -1,4 +1,4 @@
target=(/usr/lib/sysusers.d/*.conf) target=(/usr/lib/systemd/system/*)
triggers=("install" "remove") triggers=("install" "remove")
operation(){ operation(){
if systemd-detect-virt --chroot; then if systemd-detect-virt --chroot; then

View 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'
}