This commit is contained in:
kevadesu 2025-01-26 22:10:02 +01:00
parent eedc86f124
commit 239d2a881f
4 changed files with 322 additions and 75 deletions

View file

@ -32,74 +32,74 @@ function einrichter.colours() {
Color_Off='\033[0m' # Text Reset Color_Off='\033[0m' # Text Reset
# Regular Colors # Regular Colors
Black='\033[0;30m' # Black export Black='\033[0;30m' # Black
Red='\033[0;31m' # Red export Red='\033[0;31m' # Red
Green='\033[0;32m' # Green export Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow export Yellow='\033[0;33m' # Yellow
Blue='\033[0;34m' # Blue export Blue='\033[0;34m' # Blue
Purple='\033[0;35m' # Purple export Purple='\033[0;35m' # Purple
Cyan='\033[0;36m' # Cyan export Cyan='\033[0;36m' # Cyan
White='\033[0;37m' # White export White='\033[0;37m' # White
# Bold # Bold
BBlack='\033[1;30m' # Black export BBlack='\033[1;30m' # Black
BRed='\033[1;31m' # Red export BRed='\033[1;31m' # Red
BGreen='\033[1;32m' # Green export BGreen='\033[1;32m' # Green
BYellow='\033[1;33m' # Yellow export BYellow='\033[1;33m' # Yellow
BBlue='\033[1;34m' # Blue export BBlue='\033[1;34m' # Blue
BPurple='\033[1;35m' # Purple export BPurple='\033[1;35m' # Purple
BCyan='\033[1;36m' # Cyan export BCyan='\033[1;36m' # Cyan
BWhite='\033[1;37m' # White export BWhite='\033[1;37m' # White
# Underline # Underline
UBlack='\033[4;30m' # Black export UBlack='\033[4;30m' # Black
URed='\033[4;31m' # Red export URed='\033[4;31m' # Red
UGreen='\033[4;32m' # Green export UGreen='\033[4;32m' # Green
UYellow='\033[4;33m' # Yellow export UYellow='\033[4;33m' # Yellow
UBlue='\033[4;34m' # Blue export UBlue='\033[4;34m' # Blue
UPurple='\033[4;35m' # Purple export UPurple='\033[4;35m' # Purple
UCyan='\033[4;36m' # Cyan export UCyan='\033[4;36m' # Cyan
UWhite='\033[4;37m' # White export UWhite='\033[4;37m' # White
# Background # Background
On_Black='\033[40m' # Black export On_Black='\033[40m' # Black
On_Red='\033[41m' # Red export On_Red='\033[41m' # Red
On_Green='\033[42m' # Green export On_Green='\033[42m' # Green
On_Yellow='\033[43m' # Yellow export On_Yellow='\033[43m' # Yellow
On_Blue='\033[44m' # Blue export On_Blue='\033[44m' # Blue
On_Purple='\033[45m' # Purple export On_Purple='\033[45m' # Purple
On_Cyan='\033[46m' # Cyan export On_Cyan='\033[46m' # Cyan
On_White='\033[47m' # White export On_White='\033[47m' # White
# High Intensity # High Intensity
IBlack='\033[0;90m' # Black export IBlack='\033[0;90m' # Black
IRed='\033[0;91m' # Red export IRed='\033[0;91m' # Red
IGreen='\033[0;92m' # Green export IGreen='\033[0;92m' # Green
IYellow='\033[0;93m' # Yellow export IYellow='\033[0;93m' # Yellow
IBlue='\033[0;94m' # Blue export IBlue='\033[0;94m' # Blue
IPurple='\033[0;95m' # Purple export IPurple='\033[0;95m' # Purple
ICyan='\033[0;96m' # Cyan export ICyan='\033[0;96m' # Cyan
IWhite='\033[0;97m' # White export IWhite='\033[0;97m' # White
# Bold High Intensity # Bold High Intensity
BIBlack='\033[1;90m' # Black export BIBlack='\033[1;90m' # Black
BIRed='\033[1;91m' # Red export BIRed='\033[1;91m' # Red
BIGreen='\033[1;92m' # Green export BIGreen='\033[1;92m' # Green
BIYellow='\033[1;93m' # Yellow export BIYellow='\033[1;93m' # Yellow
BIBlue='\033[1;94m' # Blue export BIBlue='\033[1;94m' # Blue
BIPurple='\033[1;95m' # Purple export BIPurple='\033[1;95m' # Purple
BICyan='\033[1;96m' # Cyan export BICyan='\033[1;96m' # Cyan
BIWhite='\033[1;97m' # White export BIWhite='\033[1;97m' # White
# High Intensity backgrounds # High Intensity backgrounds
On_IBlack='\033[0;100m' # Black export On_IBlack='\033[0;100m' # Black
On_IRed='\033[0;101m' # Red export On_IRed='\033[0;101m' # Red
On_IGreen='\033[0;102m' # Green export On_IGreen='\033[0;102m' # Green
On_IYellow='\033[0;103m' # Yellow export On_IYellow='\033[0;103m' # Yellow
On_IBlue='\033[0;104m' # Blue export On_IBlue='\033[0;104m' # Blue
On_IPurple='\033[0;105m' # Purple export On_IPurple='\033[0;105m' # Purple
On_ICyan='\033[0;106m' # Cyan export On_ICyan='\033[0;106m' # Cyan
On_IWhite='\033[0;107m' # White export On_IWhite='\033[0;107m' # White
echo "[i] The colour variables have been set." echo "[i] The colour variables have been set."
} }
@ -204,7 +204,7 @@ function einrichter.installer.chroot() {
mount -vt sysfs sysfs $LFS/sys mount -vt sysfs sysfs $LFS/sys
mount -vt tmpfs tmpfs $LFS/run mount -vt tmpfs tmpfs $LFS/run
if [ -h $LFS/dev/shm ]; then if [ -h $LFS/dev/shm ]; then
install -v -d -m 1777 $LFS$(realpath /dev/shm) install -v -d -m 1777 "$LFS$(realpath /dev/shm)"
else else
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi fi
@ -260,7 +260,7 @@ DESTROY THE ENTIRE HOST SYSTEM. YOU ARE WARNED."
} }
function einrichter.installer.bg() { function einrichter.installer.bg() {
echo "E"
} }
function einrichter.installer.fail() { function einrichter.installer.fail() {

View file

@ -3,7 +3,7 @@
main() { main() {
echo "Einrichter is designed to work as an install script where you can resume where you left off. Do NOT skip anything if you have not ran the step yet." echo "Einrichter is designed to work as an install script where you can resume where you left off. Do NOT skip anything if you have not ran the step yet."
read -p "Pending step: Setting up environment. Run, skip or quit?" OPT read -p "Pending step: Setting up environment. Run, skip or quit?" OPT
case in "$OPT" case "$OPT" in
R) R)
eal.setup.env eal.setup.env
;; ;;
@ -18,7 +18,7 @@ main() {
;; ;;
esac esac
read -p "Pending step: Setting up toolchain. Run, skip or quit?" OPT read -p "Pending step: Setting up toolchain. Run, skip or quit?" OPT
case in "$OPT" case "$OPT" in
R) R)
eal.setup.toolchain eal.setup.toolchain
;; ;;
@ -33,7 +33,7 @@ main() {
;; ;;
esac esac
read -p "Pending step: Installing cross toolchain and packages. Run, skip or quit?" OPT read -p "Pending step: Installing cross toolchain and packages. Run, skip or quit?" OPT
case in "$OPT" case "$OPT" in
R) R)
eal.install.cross-toolchain eal.install.cross-toolchain
;; ;;
@ -73,7 +73,7 @@ MAKEFLAGS=-j$(nproc)
export LFS LC_ALL LFS_TGT PATH CONFIG_SITE MAKEFLAGS export LFS LC_ALL LFS_TGT PATH CONFIG_SITE MAKEFLAGS
EOF EOF
source ~/.bash_profile source $HOME/.bash_profile
} }
function eal.notification.buildconf() { function eal.notification.buildconf() {

View file

@ -742,7 +742,7 @@ function eic.system.build.gcc() {
eic.system.build.gcc.ask() { eic.system.build.gcc.ask() {
read -p "Pending step: Running test suite. Run, skip or quit?" OPT read -p "Pending step: Running test suite. Run, skip or quit?" OPT
case in "$OPT" case "$OPT" in
R) R)
chown -R tester . chown -R tester .
su tester -c "PATH=$PATH make -k check" su tester -c "PATH=$PATH make -k check"
@ -837,7 +837,7 @@ function eic.system.build.continue() {
make make
eic.system.build.continue.gettext.ask() { eic.system.build.continue.gettext.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
make check > /eilogs/8.33-gettext-test.log make check > /eilogs/8.33-gettext-test.log
;; ;;
@ -862,7 +862,7 @@ function eic.system.build.continue() {
make make
eic.system.build.continue.bison.ask() { eic.system.build.continue.bison.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
make check > /eilogs/8.34-bison-test.log make check > /eilogs/8.34-bison-test.log
;; ;;
@ -897,7 +897,7 @@ function eic.system.build.continue() {
make make
eic.system.build.continue.bash.ask() { eic.system.build.continue.bash.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
chown -R tester . chown -R tester .
su -s /usr/bin/expect tester << "EOF" su -s /usr/bin/expect tester << "EOF"
@ -993,7 +993,7 @@ EOF
export BUILD_BZIP2=0 export BUILD_BZIP2=0
sh Configure -des \ sh Configure -des \
-D prefix=/usr \ -D prefix=/usr \
-D vendorprefix=/usr \ -D vendorprefix=/usr \
-D privlib=/usr/lib/perl5/5.40/core_perl \ -D privlib=/usr/lib/perl5/5.40/core_perl \
-D archlib=/usr/lib/perl5/5.40/core_perl \ -D archlib=/usr/lib/perl5/5.40/core_perl \
-D sitelib=/usr/lib/perl5/5.40/site_perl \ -D sitelib=/usr/lib/perl5/5.40/site_perl \
@ -1009,7 +1009,7 @@ EOF
make install make install
eic.system.build.continue.perl.ask() { eic.system.build.continue.perl.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
TEST_JOBS=$(nproc) make test_harness > /eilogs/8.43-perl-test.log TEST_JOBS=$(nproc) make test_harness > /eilogs/8.43-perl-test.log
;; ;;
@ -1056,7 +1056,7 @@ EOF
make make
eic.system.build.continue.autoconf.ask() { eic.system.build.continue.autoconf.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
make check > /eilogs/8.46-autoconf-test.log make check > /eilogs/8.46-autoconf-test.log
;; ;;
@ -1080,7 +1080,7 @@ EOF
make make
eic.system.build.continue.automake.ask() { eic.system.build.continue.automake.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
make -j$(($(nproc)>4?$(nproc):4)) check > /eilogs/8.47-automake-test.log make -j$(($(nproc)>4?$(nproc):4)) check > /eilogs/8.47-automake-test.log
;; ;;
@ -1162,7 +1162,7 @@ EOF
make make
eic.system.build.continue.python.ask() { eic.system.build.continue.python.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case in "$OPT" case "$OPT" in
R) R)
make test TESTOPTS="--timeout 120" > /eilogs/8.52-python-test.log make test TESTOPTS="--timeout 120" > /eilogs/8.52-python-test.log
;; ;;
@ -1257,7 +1257,7 @@ if ( j > 0 ) return j;\
make make
make install make install
popd popd
pushd gawk pushd gawk/
sed -i 's/extras//' Makefile.in sed -i 's/extras//' Makefile.in
./configure --prefix=/usr ./configure --prefix=/usr
rm -f /usr/bin/gawk-5.3.0 rm -f /usr/bin/gawk-5.3.0
@ -1266,4 +1266,250 @@ if ( j > 0 ) return j;\
mkdir -pv /usr/share/doc/gawk-5.3.0 mkdir -pv /usr/share/doc/gawk-5.3.0
cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.3.0 cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.3.0
popd popd
pushd findutils/
./configure --prefix=/usr --localstatedir=/var/lib/locate
make
make install
popd
tar -xvf groff-1.23.0.tar.gz;
mv groff-1.23.0 groff
pushd groff/
PAGE=A4 ./configure --prefix=/usr # European standard
make
make install
popd
tar -xvf grub-2.12.tar.xz;
mv grub-2.12 grub
pushd grub/
unset {C,CPP,CXX,LD}FLAGS
echo depends bli part_gpt > grub-core/extra_deps.lst
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-efiemu \
--disable-werror
make
make install
mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions
popd
pushd gzip/
./configure --prefix=/usr
make
make install
popd
tar -xvf iproute2-6.10.0.tar.xz;
mv iproute2-6.10.0 iproute2
pushd iproute/
sed -i /ARPD/d Makefile
rm -fv man/man8/arpd.8
make NETNS_RUN_DIR=/run/netns
make SBINDIR=/usr/sbin install
mkdir -pv /usr/share/doc/iproute2-6.10.0
cp -v COPYING README* /usr/share/doc/iproute2-6.10.0
popd
tar -xvf kbd-2.6.4.tar.xz;
mv kbd-2.6.4 kbd
pushd kbd/
patch -Np1 -i ../kbd-2.6.4-backspace-1.patch
sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
./configure --prefix=/usr --disable-vlock
make
make check
make install
cp -R -v docs/doc -T /usr/share/doc/kbd-2.6.4
popd
tar -xvf libpipeline-1.5.7.tar.gz;
mv libpipeline-1.5.7 libpipeline
pushd libpipeline/
./configure --prefix=/usr
make
make check
make install
popd
pushd make/
./configure --prefix=/usr
make
eic.system.build.continue.make.ask() {
read -p "Pending step: Running test suite. Run, skip or quit? (~3 SBUs)" OPT
case "$OPT" in
R)
chown -R tester .
su tester -c "PATH=$PATH make check" > /eilogs/8.69-make-test.log
;;
S)
echo "Step skipped."
;;
Q)
exit
;;
*)
echo "Unknown command. Repeating questions."
eic.system.build.continue.make.ask
;;
esac
}
eic.system.build.continue.make.ask
make install
popd
pushd patch/
./configure --prefix=/usr
make
make check
make install
popd
pushd tar/
FORCE_UNSAFE_CONFIGURE=1 \
./configure --prefix=/usr
make
make install
make -C doc install-html docdir=/usr/share/doc/tar-1.35
popd
pushd texinfo/
./configure --prefix=/usr
make
make check
make install
make TEXMF=/usr/share/texmf install-tex
popd
tar -xvf nano-8.1.tar.xz;
mv nano-8.1 nano
pushd nano/
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-utf8 \
--docdir=/usr/share/doc/nano-8.1
make
make install
install -v -m644 doc/{nano.html,sample.nanorc} /usr/share/doc/nano-8.1
popd
tar -xvf MarkupSafe-2.1.5.tar.gz;
mv MarkupSafe-2.1.5 MarkupSafe
pushd MarkupSafe/
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
pip3 install --no-index --no-user --find-links dist Markupsafe
popd
tar -xvf jinja2-3.1.4.tar.gz;
mv jinja2-3.1.4 jinja
pushd jinja/
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
pip3 install --no-index --no-user --find-links dist Jinja2
popd
tar -xvf systemd-256.4.tar.gz;
mv systemd-256.4 systemd
pushd systemd/
sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in
mkdir -p 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-256.4
ninja
echo 'NAME="TylkoLinux"' > /etc/os-release
ninja test
ninja install
tar -xf ../../systemd-man-pages-256.4.tar.xz \
--no-same-owner --strip-components=1 \
-C /usr/share/man
systemd-machine-id-setup
systemctl preset-all
popd
tar -xvf dbus-1.14.10.tar.xz;
mv dbus-1.14.10 dbus
pushd dbus/
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--runstatedir=/run \
--enable-user-session \
--disable-static \
--disable-doxygen-docs \
--disable-xml-docs \
--docdir=/usr/share/doc/dbus-1.14.10 \
--with-system-socket=/run/dbus/system_bus_socket
make
make check
make install
ln -sfv /etc/machine-id /var/lib/dbus
popd
tar -xvf man-db-2.12.1.tar.xz;
mv man-db-2.12.1 man-db
pushd man-db/
./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-2.12.1 \
--sysconfdir=/etc \
--disable-setuid \
--enable-cache-owner=bin \
--with-browser=/usr/bin/lynx \
--with-vgrind=/usr/bin/vgrind \
--with-grap=/usr/bin/grap
make
make check
make install
popd
tar -xvf procps-ng-4.0.4.tar.xz;
mv procps-ng-4.0.4 procps-ng
pushd procps-ng/
./configure --prefix=/usr \
--docdir=/usr/share/doc/procps-ng-4.0.4 \
--disable-static \
--disable-kill \
--with-systemd
make src_w_LDADD='$(LDADD) -lsystemd'
chown -R tester .
su tester -c "PATH=$PATH make check"
make install
popd
pushd util-linux/
./configure --bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-liblastlog2 \
--disable-static \
--without-python \
ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-2.40.2
make
make install
popd
tar -xvf e2fsprogs-1.47.1.tar.gz;
mv e2fsprogs-1.47.1 e2fsprogs
pushd e2fsprogs/
mkdir -v build
cd build
../configure --prefix=/usr \
--sysconfdir=/etc \
--enable-elf-shlibs \
--disable-libblkid \
--disable-libuuid \
--disable-uuidd \
--disable-fsck
make
make check
make install
} }

View file

@ -87,3 +87,4 @@ https://www.linuxfromscratch.org/patches/lfs/12.2/coreutils-9.5-i18n-2.patch
https://www.linuxfromscratch.org/patches/lfs/12.2/expect-5.45.4-gcc14-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/expect-5.45.4-gcc14-1.patch
https://www.linuxfromscratch.org/patches/lfs/12.2/glibc-2.40-fhs-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/glibc-2.40-fhs-1.patch
https://www.linuxfromscratch.org/patches/lfs/12.2/kbd-2.6.4-backspace-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/kbd-2.6.4-backspace-1.patch
https://www.nano-editor.org/dist/v8/nano-8.1.tar.xz