diff --git a/LFSPkgBuildScripts/system/coreutils/coreutils.LFSBuild b/LFSPkgBuildScripts/system/coreutils/coreutils.LFSBuild index bdb52888..d4be6334 100755 --- a/LFSPkgBuildScripts/system/coreutils/coreutils.LFSBuild +++ b/LFSPkgBuildScripts/system/coreutils/coreutils.LFSBuild @@ -34,7 +34,7 @@ pushd $COMPILEAT 2>/dev/null||true mv -v $PKG/usr/bin/chroot $PKG/usr/sbin mv -v $PKG/usr/share/man/man1/chroot.1 $PKG/usr/share/man/man8/chroot.8 sed -i 's/\"1\"/\"8\"/1' "$PKG/usr/share/man/man8/chroot.8" - mv -v $PKG/usr/bin/{head,nice,sleep,touch} $PKG/bin + mv -v $PKG/usr/bin/{head,nice,sleep,touch,test,[} $PKG/bin popd checketc "$PKG" diff --git a/LFSPkgBuildScripts/system/dbus/dbus.LFSBuild b/LFSPkgBuildScripts/system/dbus/dbus.LFSBuild index 017599bc..66875283 100755 --- a/LFSPkgBuildScripts/system/dbus/dbus.LFSBuild +++ b/LFSPkgBuildScripts/system/dbus/dbus.LFSBuild @@ -9,23 +9,36 @@ BUILD=${BUILD:-1} SECTION="SYSTEM" SUFFIX="LFSPKG" TARBALL="${TARNAME}-${VERSION}.tar.gz" -PKG="${OUTPUT}/${PKGNAME}" -DOWHAT=${1:-"build"} -CWD=$(pwd) -scriptLog "${PKGNAME}-${VERSION}" -gettar "http://dbus.freedesktop.org/releases/dbus/${TARBALL}" $SECTION +PKG="${OUTPUT}/${PKGNAME}" + +DOWHAT=${1:-"build"} rm -rf "$PKG" || true mkdir -p "$PKG" +CWD=$(pwd) +scriptLog "${PKGNAME}-${VERSION}" + +USESYSTEMD=${USESYSTEMD:-0} +if [ $USESYSTEMD -eq 0 ];then + SYSTEMDOPTS="--with-systemdtmpfilesdir= --with-systemdsystemunitdir= --with-system-pid-file=/run/dbus/pid --with-system-socket=/run/dbus/system_bus_socket" +fi pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" - CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-console-auth-dir=/run/console/ --disable-doxygen-docs --disable-xml-docs --without-systemdsystemunitdir --disable-systemd --disable-static --with-system-pid-file=/run/dbus/pid --with-system-socket=/run/dbus/system_bus_socket + CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static --with-console-auth-dir=/run/console --disable-doxygen-docs --disable-xml-docs --docdir=/usr/share/doc/${PKGNAME}-${VERSION} $SYSTEMDOPTS + make $MAKEFLAGS||make || exit 100 make install DESTDIR=$PKG || exit 100 - mkdir -vp $PKG/usr/share/doc/${PKGNAME}-${VERSION} $PKG/etc/${PKGNAME}-${VERSION} - mv -v $PKG/usr/share/doc/dbus $PKG/usr/share/doc/${PKGNAME}-${VERSION} + if [ $USESYSTEMD -eq 0 ];then + mkdir -vp $PKG/usr/share/doc/${PKGNAME}-${VERSION} $PKG/etc/${PKGNAME}-${VERSION} + mv -v $PKG/usr/share/doc/dbus $PKG/usr/share/doc/${PKGNAME}-${VERSION} + else + mkdir -vp ${PKG}/{lib,etc} ${PKG}/var/lib/dbus + mv -v ${PKG}/usr/lib/libdbus-1.so.* ${PKG}/lib + ln -sfv ../../lib/$(readlink ${PKG}/usr/lib/libdbus-1.so) ${PKG}/usr/lib/libdbus-1.so + ln -sfv ${PKG}/etc/machine-id ${PKG}/var/lib/dbus + fi popd checketc $PKG diff --git a/LFSPkgBuildScripts/system/dbus/preinstall b/LFSPkgBuildScripts/system/dbus/preinstall deleted file mode 100755 index a24bb9b3..00000000 --- a/LFSPkgBuildScripts/system/dbus/preinstall +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -e - -#©keithhedger Tue 10 Feb 20:22:57 GMT 2015 kdhedger68713@gmail.com - -. /usr/share/LFSPkg/LFSFunctions - -UIDGIDPAIR=$(findnextpair "system") -useradd -c "D-Bus Message Daemon User" -d /var/run/dbus -ru $UIDGIDPAIR -s /bin/false messagebus||true diff --git a/LFSPkgBuildScripts/system/man-db/man-db.LFSBuild b/LFSPkgBuildScripts/system/man-db/man-db.LFSBuild index bcca3019..1b4e2828 100755 --- a/LFSPkgBuildScripts/system/man-db/man-db.LFSBuild +++ b/LFSPkgBuildScripts/system/man-db/man-db.LFSBuild @@ -18,11 +18,17 @@ mkdir -p "$PKG" CWD=$(pwd) scriptLog "${PKGNAME}-${VERSION}" +USESYSTEMD=${USESYSTEMD:-0} + pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" - sed -i '/find/s@/usr@@' init/systemd/man-db.service.in - CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure --prefix=/usr --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --sysconfdir=/etc --disable-setuid --enable-cache-owner=bin --with-browser=/usr/bin/links --with-vgrind=/usr/bin/vgrind --with-grap=/usr/bin/grap --libdir=/usr/lib${LIBDIRSUFFIX} + if [ $USESYSTEMD -eq 0 ];then + SYSTEMDOPTS="--with-systemdtmpfilesdir= --with-systemdsystemunitdir=" + else + sed -i '/find/s@/usr@@' init/systemd/man-db.service.in + fi + CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure --prefix=/usr --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --sysconfdir=/etc --disable-setuid --enable-cache-owner=bin --with-browser=/usr/bin/links --with-vgrind=/usr/bin/vgrind --with-grap=/usr/bin/grap $SYSTEMDOPTS --libdir=/usr/lib${LIBDIRSUFFIX} make $MAKEFLAGS||make|| exit 100 make install DESTDIR=$PKG || exit 100 popd diff --git a/LFSPkgBuildScripts/system/openssl/openssl.LFSBuild b/LFSPkgBuildScripts/system/openssl/openssl.LFSBuild index 1ba9bc1b..a2024390 100755 --- a/LFSPkgBuildScripts/system/openssl/openssl.LFSBuild +++ b/LFSPkgBuildScripts/system/openssl/openssl.LFSBuild @@ -8,7 +8,7 @@ VERSION="1.1.1" BUILD=${BUILD:-1} SECTION="SYSTEM" SUFFIX="LFSPKG" -MINORSUFFIX="f" +MINORSUFFIX="c" TARBALL="${TARNAME}-${VERSION}${MINORSUFFIX}.tar.gz" PKG="${OUTPUT}/${PKGNAME}" DOWHAT=${1:-"build"} diff --git a/LFSPkgBuildScripts/system/procps-ng/procps-ng.LFSBuild b/LFSPkgBuildScripts/system/procps-ng/procps-ng.LFSBuild index 1bc4c64c..d2d3ba05 100755 --- a/LFSPkgBuildScripts/system/procps-ng/procps-ng.LFSBuild +++ b/LFSPkgBuildScripts/system/procps-ng/procps-ng.LFSBuild @@ -18,10 +18,15 @@ mkdir -p "$PKG" CWD=$(pwd) scriptLog "${PKGNAME}-${VERSION}" +USESYSTEMD=${USESYSTEMD:-1} +if [ $USESYSTEMD -eq 1 ];then + SYSTEMDOPTS="--with-systemd" +fi + pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" - ./configure --prefix=/usr --exec-prefix= --libdir=/usr/lib${LIBDIRSUFFIX} --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --disable-static --disable-kill + ./configure --prefix=/usr --exec-prefix= --libdir=/usr/lib${LIBDIRSUFFIX} --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --disable-static --disable-kill $SYSTEMDOPTS make $MAKEFLAGS||make|| exit make install DESTDIR="$PKG" || exit diff --git a/LFSPkgBuildScripts/system/system-meta/postinstall b/LFSPkgBuildScripts/system/system-meta/postinstall index 094f05a5..5f31c74e 100755 --- a/LFSPkgBuildScripts/system/system-meta/postinstall +++ b/LFSPkgBuildScripts/system/system-meta/postinstall @@ -2,14 +2,18 @@ #©keithhedger Tue 3 Feb 12:04:53 GMT 2015 kdhedger68713@gmail.com +. /usr/share/LFSPkg/LFSFunctions + passwd root -sed -i 's@/lib/systemd/systemd-udevd@/lib/udev/udevd@' "/etc/rc.d/init.d/udev" -sed -i 's@/bin/udevadm@/sbin/udevadm@g' "/etc/rc.d/init.d/udev" -sed -i 's@/bin/udevadm@/sbin/udevadm@g' "/etc/rc.d/init.d/udev_retry" -sed -i 's@/lib/udev/udevd@/sbin/udevd@g' "/etc/rc.d/init.d/udev" -/sbin/udevadm hwdb --update -chmod +x /lib/udev/init-net-rules.sh -/lib/udev/init-net-rules.sh - - +if [ $USESYSTEMD -eq 0 ];then + sed -i 's@/lib/systemd/systemd-udevd@/lib/udev/udevd@' "/etc/rc.d/init.d/udev" + sed -i 's@/bin/udevadm@/sbin/udevadm@g' "/etc/rc.d/init.d/udev" + sed -i 's@/bin/udevadm@/sbin/udevadm@g' "/etc/rc.d/init.d/udev_retry" + sed -i 's@/lib/udev/udevd@/sbin/udevd@g' "/etc/rc.d/init.d/udev" + /sbin/udevadm hwdb --update + chmod +x /lib/udev/init-net-rules.sh + /lib/udev/init-net-rules.sh +else + ln -s /dev/null /etc/systemd/network/99-default.link +fi \ No newline at end of file diff --git a/LFSPkgBuildScripts/system/system-meta/system-LFSInit-meta.LFSBuild b/LFSPkgBuildScripts/system/system-meta/system-LFSInit-meta.LFSBuild index 5698f839..59cc4aec 100755 --- a/LFSPkgBuildScripts/system/system-meta/system-LFSInit-meta.LFSBuild +++ b/LFSPkgBuildScripts/system/system-meta/system-LFSInit-meta.LFSBuild @@ -9,6 +9,7 @@ export CONFIGOPTIONS="--prefix=/usr --disable-debug" THISTTY=$(tty) export THISTTY export ANYVERSION=0 +export USESYSTEMD=0 DEPENDS="linuxheaders-5.2.8 Man-pages-5.02 diff --git a/LFSPkgBuildScripts/system/system-meta/system-pi-sysvinit-meta.LFSBuild b/LFSPkgBuildScripts/system/system-meta/system-pi-sysvinit-meta.LFSBuild index f59a2023..096b8da6 100755 --- a/LFSPkgBuildScripts/system/system-meta/system-pi-sysvinit-meta.LFSBuild +++ b/LFSPkgBuildScripts/system/system-meta/system-pi-sysvinit-meta.LFSBuild @@ -17,6 +17,7 @@ export SCRIPTLOG export MAKEFLAGS export NOLOADCONFIG=1 export ANYVERSION=1 +export USESYSTEMD=0 DEPENDS="pi-linuxheaders-4.19 Man-pages-5.02 diff --git a/LFSPkgBuildScripts/system/system-meta/system-systemd-meta.LFSBuild b/LFSPkgBuildScripts/system/system-meta/system-systemd-meta.LFSBuild index 21555162..5185f647 100755 --- a/LFSPkgBuildScripts/system/system-meta/system-systemd-meta.LFSBuild +++ b/LFSPkgBuildScripts/system/system-meta/system-systemd-meta.LFSBuild @@ -9,6 +9,9 @@ export CONFIGOPTIONS="--prefix=/usr --disable-debug" THISTTY=$(tty) export THISTTY export ANYVERSION=1 +export USESYSTEMD=1 +export LANG=en_GB.UTF-8 +export USESYSTEMD=1 DEPENDS="linuxheaders-5.2.8 Man-pages-5.02 @@ -75,16 +78,12 @@ Tar-1.32 Texinfo-6.6 Vim-8.1.1846 systemd-241 - +dbus-1.12.16 Procps-ng-3.3.15 Util-linux-2.34 E2fsprogs-1.45.3 -Sysklogd-1.5.1 -Sysvinit-2.95 Wget-1.20.3 unzip-6.0 -lfs-bootscripts-20190524 -eudev-3.2.8 Wget-1.20.3 unzip-6.0 GPM-1.20.7 diff --git a/LFSPkgBuildScripts/system/system-meta/system-sysvinit-meta.LFSBuild b/LFSPkgBuildScripts/system/system-meta/system-sysvinit-meta.LFSBuild index 29367956..9ecb7fc0 100755 --- a/LFSPkgBuildScripts/system/system-meta/system-sysvinit-meta.LFSBuild +++ b/LFSPkgBuildScripts/system/system-meta/system-sysvinit-meta.LFSBuild @@ -9,6 +9,7 @@ export CONFIGOPTIONS="--prefix=/usr --disable-debug" THISTTY=$(tty) export THISTTY export ANYVERSION=1 +export USESYSTEMD=0 DEPENDS="linuxheaders-5.2.8 Man-pages-5.02 diff --git a/LFSPkgBuildScripts/system/systemd/systemd.LFSBuild b/LFSPkgBuildScripts/system/systemd/systemd.LFSBuild index 25fed76b..2c11bfca 100755 --- a/LFSPkgBuildScripts/system/systemd/systemd.LFSBuild +++ b/LFSPkgBuildScripts/system/systemd/systemd.LFSBuild @@ -18,22 +18,24 @@ mkdir -p "$PKG" CWD=$(pwd) scriptLog "${PKGNAME}-${VERSION}" +LANG=${LANG:-"en_GB"} + pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" - patch -Np1 -i ../${PKGNAME}-${VERSION}-networkd_and_rdrand_fixes-1.patch + patch -Np1 -i ${SOURCEARCHIVES}/${SECTION}/${PKGNAME}-${VERSION}-networkd_and_rdrand_fixes-1.patch ln -sf /tools/bin/true /usr/bin/xsltproc for file in /tools/lib/lib{blkid,mount,uuid}.so* do ln -sf $file /usr/lib/ done - tar -xf ../systemd-man-pages-241.tar.xz + tar -xf ${SOURCEARCHIVES}/${SECTION}/${PKGNAME}-man-pages-${VERSION}.tar.xz sed -i 's/GROUP="render", //' rules/50-udev-default.rules.in mkdir -p build cd build - PKG_CONFIG_PATH="/usr/lib/pkgconfig:/tools/lib/pkgconfig" LANG=en_US.UTF-8 CFLAGS+="-Wno-format-overflow" meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no .. - LANG=en_US.UTF-8 ninja - LANG=en_US.UTF-8 DESTDIR=$PKG ninja install + PKG_CONFIG_PATH="/usr/lib/pkgconfig:/tools/lib/pkgconfig" CFLAGS+="-Wno-format-overflow" meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no .. + ninja + DESTDIR=$PKG ninja install popd checketc "$PKG" diff --git a/LFSPkgBuildScripts/system/util-linux/util-linux.LFSBuild b/LFSPkgBuildScripts/system/util-linux/util-linux.LFSBuild index 738d39e8..bbbad504 100755 --- a/LFSPkgBuildScripts/system/util-linux/util-linux.LFSBuild +++ b/LFSPkgBuildScripts/system/util-linux/util-linux.LFSBuild @@ -24,11 +24,18 @@ mkdir -p "$PKG" CWD=$(pwd) scriptLog "${PKGNAME}-${VERSION}" +USESYSTEMD=${USESYSTEMD:-0} + pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" + if [ $USESYSTEMD -eq 0 ];then + SYSTEMDOPTS=" --without-systemd --without-systemdsystemunitdir" + else + rm -vf /usr/include/{blkid,libmount,uuid}||true + fi mkdir -pv $PKG/var/lib/hwclock - CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --disable-chfn-chsh --disable-login --disable-nologin --disable-su --disable-setpriv --disable-runuser --disable-pylibmount --without-python --without-systemd --without-systemdsystemunitdir $BUILDSTATIC + CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --docdir=/usr/share/doc/${PKGNAME}-${VERSION} --disable-chfn-chsh --disable-login --disable-nologin --disable-su --disable-setpriv --disable-runuser --disable-pylibmount --without-python $SYSTEMDOPTS $BUILDSTATIC make $MAKEFLAGS||make|| exit 100 make install DESTDIR=$PKG || exit 100 if [ "X$ENABLESTATIC" != "X" ];then diff --git a/LFSScripts/BuildFileSystem-SystemD b/LFSScripts/BuildFileSystem-SystemD index ef02e56f..98d426a1 100755 --- a/LFSScripts/BuildFileSystem-SystemD +++ b/LFSScripts/BuildFileSystem-SystemD @@ -110,15 +110,17 @@ EOF chmod -v 664 var/log/lastlog chmod -v 600 var/log/btmp - mkdir -vp etc/sysconfig - cat > etc/sysconfig/ifconfig.eth0 << EOF -ONBOOT=yes -IFACE=eth0 -SERVICE=ipv4-static -IP=$IP -GATEWAY=$GATEWAY -PREFIX=24 -BROADCAST=${SUBNET} + + mkdir -vp etc/systemd/network + cat > etc/systemd/network/10-eth-static.network << "EOF" +[Match] +Name=eth0 + +[Network] +Address=$IP +Gateway=$GATEWAY +DNS=8.8.8.8 +Domains=$LFSNAME EOF cat > etc/resolv.conf << EOF @@ -138,22 +140,16 @@ $IP $LFSNAME $LFSNAME.local # End /etc/hosts (network card version) EOF - echo "HOSTNAME=$LFSNAME" > etc/sysconfig/network + echo "$LFSNAME" > etc/hostname - cat > etc/sysconfig/clock << "EOF" -# Begin /etc/sysconfig/clock - -UTC=1 - -# Set this to any options you might need to give to hwclock, -# such as machine hardware clock type for Alphas. -CLOCKPARAMS= - -# End /etc/sysconfig/clock + cat > etc/adjtime << "EOF" +0.0 0 0.0 +0 +LOCAL EOF - cat > etc/sysconfig/console << EOF -# Begin /etc/sysconfig/console + cat > etc/vconsole.conf << EOF +# Begin /etc/vconsole.conf KEYMAP=$KEYBOARD #FONT="lat2a-16 -m 8859-2" @@ -161,6 +157,9 @@ KEYMAP=$KEYBOARD # End /etc/sysconfig/console EOF + cat > etc/locale.conf << "EOF" +LANG=$LANGUAGE +EOF cat > etc/profile << EOF # Begin /etc/profile @@ -297,41 +296,13 @@ devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 # End /etc/fstab EOF - cat > etc/inittab << "EOF" -# Begin /etc/inittab - -id:3:initdefault: - -si::sysinit:/etc/rc.d/init.d/rc S - -l0:0:wait:/etc/rc.d/init.d/rc 0 -l1:S1:wait:/etc/rc.d/init.d/rc 1 -l2:2:wait:/etc/rc.d/init.d/rc 2 -l3:3:wait:/etc/rc.d/init.d/rc 3 -l4:4:wait:/etc/rc.d/init.d/rc 4 -l5:5:wait:/etc/rc.d/init.d/rc 5 -l6:6:wait:/etc/rc.d/init.d/rc 6 - -ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now - -su:S016:once:/sbin/sulogin - -1:2345:respawn:/sbin/agetty --noclear tty1 9600 -2:2345:respawn:/sbin/agetty tty2 9600 -3:2345:respawn:/sbin/agetty tty3 9600 -4:2345:respawn:/sbin/agetty tty4 9600 -5:2345:respawn:/sbin/agetty tty5 9600 -6:2345:respawn:/sbin/agetty tty6 9600 - -# End /etc/inittab -EOF - - echo $LFSVERSION > etc/lfs-release + echo $LFSVERSION > etc/os-release cat > etc/lsb-release << EOF -DISTRIB_ID="Linux From Scratch" -DISTRIB_RELEASE="$LFSVERSION" -DISTRIB_CODENAME="$LFSNAME" -DISTRIB_DESCRIPTION="Linux From Scratch" +NAME="Linux From Scratch" +VERSION="${LFSVERSION}-systemd" +ID=lfs +PRETTY_NAME="Linux From Scratch 9.0-systemd" +VERSION_CODENAME="$LFSNAME" EOF cat > etc/shells << EOF @@ -343,6 +314,14 @@ EOF # End /etc/shells EOF + mkdir -pv etc/systemd/system/getty@tty1.service.d + + cat > etc/systemd/system/getty@tty1.service.d/noclear.conf << EOF +[Service] +TTYVTDisallocate=no +EOF + ln -sfv /dev/null etc/systemd/system/tmp.mount + cat > etc/lfspkg.rc << EOF LFSVERSION=$LFSVERSION KERNELVERSION=$KERNELVERSION @@ -356,6 +335,7 @@ CONFIGOPTIONS="--disable-option-checking --prefix=/usr --sysconfdir=/etc --libex MESONCONFIGOPTIONS="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --libdir=/usr/lib\$LIBDIRSUFFIX --buildtype=release --default-library=shared" MAKEFLAGS=" -j4 " CHECKETC=0 +USESYSTEMD=1 EOF #Set the perms for $LFS will fail for any mounted network tha can't have their perms changed ( eg a samba mount ). diff --git a/LFSScripts/HowTo-SystemD b/LFSScripts/HowTo-SystemD index 55cb3b09..aaf02bb7 100644 --- a/LFSScripts/HowTo-SystemD +++ b/LFSScripts/HowTo-SystemD @@ -22,6 +22,7 @@ SOURCEARCHIVES=/LFSSourceArchives/$LFSVERSION BUILTPACKAGES=/LFSBuiltPackages/$LFSVERSION EXTFOLDER= KERNELVERSION=5.2.8 +USESYSTEMD=1 export LFS export LFSVERSION @@ -29,7 +30,7 @@ export SOURCEARCHIVES export BUILTPACKAGES export EXTFOLDER export KERNELVERSION - +export USESYSTEMD ###RECOMMENDED#### #or cd into the mounted partition wher you intend to build LFS: #LFS should point to your mounted LFS partition ( eg LFS=/mnt/LFS ). @@ -104,11 +105,11 @@ cd /LFSPkgBuildScripts/admin/LFSPkg BOOTSTRAP=1 ./LFSPkg.LFSBuild install #As part of the LFSSetUp script $LFS/root/.lfspkg.rc has been created to contain basic info needed by lfspkg, review and change if needed. -#Set $LFS/etc/lfspkg.rc or $LFS/root/.lfspkg.rc (preferred) variables, make sure the SOURCEARCHIVES points to the same place as $SOURCEARCHIVES from #SystemData.local as that's where the main LFS system source files are, you can do this either from in the chroot environment or from the host with root permissions. +#Set $LFS/etc/lfspkg.rc variables, make sure the SOURCEARCHIVES points to the same place as $SOURCEARCHIVES from #SystemData.local as that's where the main LFS system source files are, you can do this either from in the chroot environment or from the host with root permissions. #At this point wget/openssl is not installed so you will get a load of complaints from lfspkg, ignore them as lfspkg will be reinstalled later with the main system. -#You should run lfspkg --setup to create the lfspkg.rc file ( in ~ (/root) ) -#Rc files are sourced from /etc/lfspkg.rc then ~/.lfspkg.rc. +#You should run lfspkg --setup to create the lfspkg.rc file ( in /etc ) +#Rc files are sourced from /etc/lfspkg.rc #lfspkg --setup can be run again later if you need/want to change source/build folders etc. #For building the main system you should probably set the configure options config files in /etc and log options. lfspkg --setup @@ -144,16 +145,9 @@ Walk the dog #logout from temporary system: exit -9.2) -#lfspkg now creates an unprivileged user for certain actions eg extracting tarballs. -#$LFS/LFSPkgBuilds should now have the group set to lfspkguser, and perms set to 775, if you want your normal user to have access just add yourself to the lfspkguser group. -#You will have to re-own/set perms the various folders etc, so: -[sudo] chown -R $USER:lfspkguser $LFS/LFSPkgBuilds $LFS/LFSSourceArchives/$LFSVERSION $LFS/LFSBuiltPackages/$LFSVERSION -chmod -R 775 $LFS/LFSSourceArchives/$LFSVERSION $LFS/LFSBuiltPackages/$LFSVERSION - 10) #Remove tools folder link from host and if you want to save tools archive for futre use move/copy the ${LFS}/tools-${LFSVERSION}.tar.gz somewhere safe: -sudo rm /tools +[sudo] rm /tools #Remove the tools folder from your LFS install disk: [sudo] rm -rf $LFS/tools diff --git a/LFSScripts/LFSSetUp b/LFSScripts/LFSSetUp index 57527639..e8e410ec 100755 --- a/LFSScripts/LFSSetUp +++ b/LFSScripts/LFSSetUp @@ -50,6 +50,7 @@ case $PIBUILD in esac PIBUILD=0 +USESYSTEMD=0 #set variables if possible if [ -f ./SystemData.local ];then @@ -81,13 +82,16 @@ readWithDefault "LFSVERSION" "Enter LFS Version" LFSNAME=${LFSNAME:-"LFS"} readWithDefault "LFSNAME" "Enter Hostname" -#LFS init type eithe bbinit or sysvinit +#LFS init type either bbinit, sysvinit, sytemd or custom if [ $PIBUILD -eq 1 ];then INITTYPE=${INITTYPE:-"pi-sysvinit"} readWithDefault "INITTYPE" "Enter Init Type (LFSInit|bbinit|pi-sysvinit)" else INITTYPE=${INITTYPE:-"sysvinit"} readWithDefault "INITTYPE" "Enter Init Type (LFSInit|bbinit|sysvinit|systemd)" + if [ "$INITTYPE" = "systemd" ];then + USESYSTEMD=1 + fi fi #libdir suffix @@ -172,6 +176,7 @@ fi echo "LFSVERSION=$LFSVERSION" echo "LFSNAME=$LFSNAME" echo "INITTYPE=$INITTYPE" +echo "USESYSTEMD=$USESYSTEMD" echo "LIBDIRSUFFIX=$LIBDIRSUFFIX" echo "BUILDSCRIPTS=$BUILDSCRIPTS" @@ -225,6 +230,7 @@ LFSNAME=$LFSNAME LFSVERSION=$LFSVERSION KERNELVERSION=$KERNELVERSION INITTYPE=$INITTYPE +USESYSTEMD=$USESYSTEMD LIBDIRSUFFIX=$LIBDIRSUFFIX SOURCEARCHIVES=$SOURCEARCHIVES @@ -253,6 +259,9 @@ OUTPUT=$PKGARCHIVES SOURCEARCHIVES=$SOURCEARCHIVES BUILDSCRIPTS=$BUILDSCRIPTS COMPILEAT=$COMPILEAT +USESYSTEMD=$USESYSTEMD +PIBUILD=$PIBUILD +LANG=$LANGUAGE EOF sudo mv /tmp/lfspkg.rc $LFS/etc/ diff --git a/README.md b/README.md index f26030b7..a6827a0e 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,11 @@ See LFSScripts/How to for a simple step by step guide to installing a complete L This is version 9.0 of the book. -See the BuildScriptList.txt file for a complete list of build scripts, please feel free to submit new ones. \ No newline at end of file +See the BuildScriptList.txt file for a complete list of build scripts, please feel free to submit new ones. + +The How To's have now been split into three: +Normal syvv etc LFS -> HowTo +Raspberry Pi 4 -> HowTo-Pi4 +SystemD LFS -> HowTo-SystemD + +The Build tools scripts have likewise been changed.