lfs-buildscripts/CH8Build/CH08.74-systemd.sh

74 lines
1.5 KiB
Bash
Raw Normal View History

2024-10-07 09:35:03 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 09:50:04 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-07 09:35:03 +08:00
[ -d systemd-${systemd_version} ] && rm -rf systemd-${systemd_version}
tar -zxf ${systemd_tarball}
cd systemd-${systemd_version}
sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
mkdir build && cd build
meson setup .. \
--prefix=/usr \
--buildtype=release \
-D default-dnssec=no \
-D firstboot=false \
-D install-tests=false \
-D ldconfig=false \
-D sysusers=false \
-D rpmmacrosdir=no \
-D homed=disabled \
-D userdb=false \
-D man=disabled \
-D mode=release \
-D pamconfdir=no \
-D dev-kvm-mode=0660 \
-D nobody-group=nogroup \
-D sysupdate=disabled \
-D ukify=disabled \
-D docdir=/usr/share/doc/systemd-${systemd_version}
ninja
if [ $? -ne 0 ]; then
myfail "Failed building systemd"
fi
echo 'NAME="Linux From Scratch"' > /etc/os-release
2024-10-09 09:50:04 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running systemd ninja test"
ninja test > ${GLSOURCES}/systemd.check.log 2>&1
fi
2024-10-07 09:35:03 +08:00
ninja install
if [ $? -ne 0 ]; then
myfail "Failed installing systemd"
fi
tar -xf ../../${systemd_man_tarball} \
--no-same-owner --strip-components=1 \
-C /usr/share/man
systemd-machine-id-setup
systemctl preset-all
2024-10-08 14:49:09 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf systemd-${systemd_version}
popd