mirror of
https://github.com/kevadesu/TylkoLinux.git
synced 2025-07-24 12:59:34 +02:00
Updated in-LFS script
This commit is contained in:
parent
621cfaad0c
commit
680ebdd6a9
4 changed files with 59 additions and 16 deletions
|
@ -166,6 +166,8 @@ function einrichter.installer.SafeUser() {
|
|||
echo -e "${BBlue}[i] ${Blue}Assign the lfs user a password.${Color_Off}"
|
||||
passwd lfs
|
||||
echo -e "${BBlue}[i] ${Blue}Granting the lfs user full access to all directories...${Color_Off}"
|
||||
chown -v lfs $LFS
|
||||
chown -vR lfs $LFS/sources
|
||||
chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
|
||||
case $(uname -m) in
|
||||
x86_64) chown -v lfs $LFS/lib64 ;;
|
||||
|
@ -185,6 +187,7 @@ function einrichter.installer.SafeUser() {
|
|||
esac
|
||||
echo -e "${BBlue}[i] ${Blue}Attempting login as lfs...${Color_Off}"
|
||||
echo -e "${BBlue}[i] ${Blue}You are about to switch to the LFS user. When you log in, run the Einrichter-as-LFS.sh script located in your home directory by typing \"./Einrichter-as-LFS.sh\".${Color_Off}"
|
||||
echo -e "${BBlue}[i] ${Blue}From here on, you no longer need the installer to log in to the lfs user. In the future, just run \"su - lfs\", either in Einrichter or in shell. Only run this again if you want to re-own everything under the lfs user.${Color_Off}"
|
||||
su - lfs
|
||||
einrichter.installer.SafeUser.End
|
||||
}
|
||||
|
|
|
@ -54,15 +54,15 @@ main() {
|
|||
function eal.setup.env() {
|
||||
echo "The installer is about to begin setting up the environment. Please wait..."
|
||||
sleep 2
|
||||
|
||||
read -p "[i] Specify the path to the target LFS installation: " LFS
|
||||
cat > ~/.bash_profile << "EOF"
|
||||
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
|
||||
EOF
|
||||
|
||||
cat > ~/.bashrc << "EOF"
|
||||
echo -e "
|
||||
set +h
|
||||
umask 022
|
||||
LFS=/mnt/lfs
|
||||
LFS=${LFS}
|
||||
LC_ALL=POSIX
|
||||
LFS_TGT=$(uname -m)-lfs-linux-gnu
|
||||
PATH=/usr/bin
|
||||
|
@ -71,9 +71,9 @@ PATH=$LFS/tools/bin:$PATH
|
|||
CONFIG_SITE=$LFS/usr/share/config.site
|
||||
MAKEFLAGS=-j$(nproc)
|
||||
export LFS LC_ALL LFS_TGT PATH CONFIG_SITE MAKEFLAGS
|
||||
EOF
|
||||
" > ~/.bashrc
|
||||
|
||||
source $HOME/.bash_profile
|
||||
source $HOME/.bash_profile
|
||||
}
|
||||
|
||||
function eal.notification.buildconf() {
|
||||
|
@ -120,6 +120,7 @@ function eal.install.cross-toolchain() {
|
|||
make
|
||||
eal.notification.installing
|
||||
make install
|
||||
cd $LFS
|
||||
eal.notification.extracting
|
||||
pushd $LFS/sources/
|
||||
pushd $LFS/sources/gcc/
|
||||
|
@ -277,7 +278,7 @@ function eal.install.cross-toolchain() {
|
|||
-i $LFS/usr/include/curses.h
|
||||
popd
|
||||
EIR_PKG=bash
|
||||
pushd $LFS/soruces/bash
|
||||
pushd $LFS/sources/bash
|
||||
eal.notification.buildconf
|
||||
./configure --prefix=/usr \
|
||||
--build=$(sh support/config.guess) \
|
||||
|
|
|
@ -2632,6 +2632,7 @@ EOF
|
|||
install -d /var/lock/rpm
|
||||
rpm --initdb --root=/
|
||||
pip3 install rpm
|
||||
mkdir /etc/yum.repos.d
|
||||
popd
|
||||
}
|
||||
|
||||
|
@ -2825,6 +2826,18 @@ function eic.dnf4.install.DONOTUSE() {
|
|||
|
||||
function eic.tdnf.install() {
|
||||
pushd /sources/
|
||||
echo "[?] Is RPM installed? Because if not, the packages will NOT install!"
|
||||
read -p "[Y]es, it is. [N]o, it isn't." opt
|
||||
case "$opt" in
|
||||
Y|y|Yes|yes|YES)
|
||||
echo "[i] Checking...."
|
||||
rpm --version || eic.error RPM_NOT_INSTALLED
|
||||
;;
|
||||
*)
|
||||
echo "[i] Install RPM first, by running eic.rpm.install. The script will kick you out now. Rerun me!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
git clone https://github.com/openSUSE/libsolv.git
|
||||
pushd libsolv/
|
||||
git checkout tags/0.7.31
|
||||
|
@ -2836,10 +2849,22 @@ function eic.tdnf.install() {
|
|||
popd
|
||||
git clone https://github.com/kevadesu/tdnf
|
||||
pushd tdnf/
|
||||
git checkout stable-3.5
|
||||
mkdir build && cd build
|
||||
git checkout stable-3.5 &&
|
||||
mkdir build
|
||||
cd build
|
||||
CFLAGS="-I/usr/include/rpm -I/usr/include/solv" LDFLAGS="-L/usr/lib -lsolv -lsolvext -lrpm" cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DRPM_INCLUDE_DIR=/usr/include/rpm -DRPM_LIBRARY=/usr/lib/librpm.so -DLIBSOLV_LIBRARY=/usr/lib/libsolv.so -DLIBSOLVEXT_LIBRARY=/usr/lib/libsolvext.so -DLIBSOLV_INCLUDE_DIR=/usr/include/solv -DDISABLE_SHARED=ON -DENABLE_STATIC=ON &&
|
||||
make
|
||||
make &&
|
||||
make install &&
|
||||
cat > /etc/tdnf/tdnf.conf << EOF
|
||||
[main]
|
||||
gpgcheck=1
|
||||
installonly_limit=3
|
||||
clean_requirements_on_remove=0
|
||||
repodir=/etc/yum.repos.d
|
||||
cachedir=/var/cache/tdnf
|
||||
distroverpkg=os-release
|
||||
EOF
|
||||
|
||||
popd
|
||||
popd
|
||||
}
|
||||
|
@ -2848,16 +2873,18 @@ function eic.signoff() {
|
|||
echo 12.2-systemd-tylux > /etc/lfs-release
|
||||
cat > /etc/lsb-release << "EOF"
|
||||
DISTRIB_ID="TylkoLinux"
|
||||
DISTRIB_RELEASE="25.01"
|
||||
DISTRIB_CODENAME="snyx"
|
||||
DISTRIB_DESCRIPTION="TylkoLinux Snyx"
|
||||
DISTRIB_RELEASE="25.02"
|
||||
DISTRIB_CODENAME="delirium"
|
||||
DISTRIB_DESCRIPTION="TylkoLinux Delirium"
|
||||
EOF
|
||||
cat > /etc/os-release << "EOF"
|
||||
NAME="TylkoLinux"
|
||||
VERSION="25.01"
|
||||
VERSION="25.02 (Delirium)"
|
||||
VERSION_ID="25.02"
|
||||
ID=tylux
|
||||
PRETTY_NAME="TylkoLinux 25.01 Snyx (LFS 12.2-systemd)"
|
||||
VERSION_CODENAME="snyx"
|
||||
PRETTY_NAME="TylkoLinux 25.02 Delirium (LFS 12.2-systemd)"
|
||||
ANSI_COLOR="0;35"
|
||||
VERSION_CODENAME="delirium"
|
||||
HOME_URL="https://github.com/kevadesu/TylkoLinux"
|
||||
EOF
|
||||
}
|
||||
|
@ -2868,10 +2895,14 @@ function eic.error() {
|
|||
D404_SRC)
|
||||
echo "[!] Directory /sources/ does NOT exist!"
|
||||
;;
|
||||
RPM_NOT_INSTALLED)
|
||||
echo "[!] RPM...is not installed."
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "[!] We were unable to determine the error."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
||||
main
|
8
add/fs/etc/os-release
Normal file
8
add/fs/etc/os-release
Normal file
|
@ -0,0 +1,8 @@
|
|||
NAME="TylkoLinux"
|
||||
VERSION="25.02 (Delirium)"
|
||||
VERSION_ID="25.02"
|
||||
ID=tylux
|
||||
PRETTY_NAME="TylkoLinux 25.02 Delirium (LFS 12.2-systemd)"
|
||||
ANSI_COLOR="0;35"
|
||||
VERSION_CODENAME="delirium"
|
||||
HOME_URL="https://github.com/kevadesu/TylkoLinux"
|
Loading…
Add table
Add a link
Reference in a new issue