Build an iso with all your deb favorite package and you personnal files in it. With dependencies.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

66 lines
1.7 KiB

#!/usr/bin/env bash
cp --verbose --recursive "${HOME}"/lfs_archives_13_0 "${HOME}"/myfiles/
cat > "${HOME}"/myfiles/lfs-postinstall.sh <<"EOPF"
#!/usr/bin/env bash
if ! dpkg -l |grep local-apt-repository
then
echo "ERROR: execute local-apt-repository.sh first"
fi
if ! mount |grep cdrom
then
mount /dev/sr0
fi
if ! mount |grep cdrom
then
echo "ERROR: insert cdrom"
exit 1
fi
cat > /etc/sudoers.d/lfs <<"EOF"
lfs ALL = NOPASSWD: /usr/bin/chown * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/bin/mount * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/bin/install * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/sbin/chroot /mnt/lfs*
EOF
apt --yes install texinfo m4 bison gawk make patch python3 xz-utils gcc g++ build-essential
mv --verbose /etc/bash.bashrc /etc/bash.bashrc.NOUSE
pushd /bin || return 1
if [[ $(readlink sh) =~ ^dash$ ]]
then
rm --verbose sh
ln --symbolic --verbose bash sh
fi
popd || return 1
cat > /home/lfs/.lfsbuild_config <<"EOCF"
# build directory
LFS=/mnt/lfs
# location of local package sources
LFS_PACKAGE_DIR=/media/cdrom0/lfs_archives_13_0
# Number of processors to use
LFS_NPROC=1
# Bypass step by step validation until a breakpoint
LFS_BREAKPOINT=110300
# strip binaries or not
LFS_STRIP_BINARIES=true
# bypass network config validation by taking network config from host
LFS_NETWORKSAMEASHOST=true
# bypass network configuration for full offline build
LFS_NETWORKOFFLINE=true
# bypass linux config validation by taking linux config from repository
LFS_LINUXCONFIGPROVIDED=true
EOCF
chown lfs:lfs /home/lfs/.lfsbuild_config
find /media/cdrom/lfs_archives_13_0/ -name "cclfs*.tar.gz" -exec tar --extract --gunzip --file={} --directory=/home/lfs/ \;
EOPF