Skip to content

Instantly share code, notes, and snippets.

@ianmiell
Last active August 29, 2015 14:12
Show Gist options
  • Save ianmiell/4fa6e0a7c940c659aa79 to your computer and use it in GitHub Desktop.
Save ianmiell/4fa6e0a7c940c659aa79 to your computer and use it in GitHub Desktop.
Commands To Get From debian:jessie to an Automated Linux From Scratch Artifact
export SHUTIT_BACKUP_PS1_real_user_prompt=$PS1 && PS1='SHUTIT_REAL_USER#ZHfHa955>' && unset PROMPT_COMMAND && stty cols 320
export SHUTIT_BACKUP_PS1_pre_build=$PS1 && PS1='SHUTIT_PRE_BUILD#Qjv4HMML>' && unset PROMPT_COMMAND && stty cols 320
cat /etc/issue | grep -i "red hat" | wc -l
cat /etc/issue | grep -i "shutit" | wc -l
cat /etc/issue | grep -i "fedora" | wc -l
cat /etc/issue | grep -i "centos" | wc -l
cat /etc/issue | grep -i "steamos" | wc -l
cat /etc/issue | grep -i "ubuntu" | wc -l
cat /etc/issue | grep -i "debian" | wc -l
apt-get update
apt-get install -y -qq lsb-release
lsb_release -a
export SHUTIT_BACKUP_PS1_root_prompt=$PS1 && PS1='SHUTIT_ROOT#uO6Dv83E>' && unset PROMPT_COMMAND && stty cols 320
mkdir -p /root/shutit_build/rothko_imiell_1420488047.48.482573
dpkg -l | awk '{print $2}' | grep "^firefox$" | wc -l
su - root
export SHUTIT_BACKUP_PS1_faVAZm8T=$PS1 && PS1='SHUTIT_shutit.tk.setup#pbUqRUPJ>' && unset PROMPT_COMMAND && stty cols 320
exit
su - root
export SHUTIT_BACKUP_PS1_4vmf9jEu=$PS1 && PS1='SHUTIT_shutit.tk.alfs.alfs#ml5BM4aR>' && unset PROMPT_COMMAND && stty cols 320
exit
su - root
export SHUTIT_BACKUP_PS1_j89yry80=$PS1 && PS1='SHUTIT_shutit.tk.setup#LxViCtsK>' && unset PROMPT_COMMAND && stty cols 320
touch ~/.bashrc
sed -i 's/.*HISTSIZE=[0-9]*$//' ~/.bashrc
sed -i 's/.*HISTSIZE=[0-9]*$//' /etc/bash.bashrc
sed -i 's/.*HISTSIZE=[0-9]*$//' /etc/profile
grep -w "^export HISTSIZE=99999999$" ${HOME}/.bashrc > /tmp/v5pP2PMV
cat /tmp/v5pP2PMV | wc -l
cat >> ${HOME}/.bashrc <<< 'export HISTSIZE=99999999'
rm -f /tmp/v5pP2PMV
grep -w "^export HISTSIZE=99999999$" /etc/bash.bashrc > /tmp/Kt1k1ty6
cat /tmp/Kt1k1ty6 | wc -l
cat >> /etc/bash.bashrc <<< 'export HISTSIZE=99999999'
rm -f /tmp/Kt1k1ty6
grep -w "^export HISTSIZE=99999999$" /etc/profile > /tmp/E9lb4dXA
cat /tmp/E9lb4dXA | wc -l
cat >> /etc/profile <<< 'export HISTSIZE=99999999'
rm -f /tmp/E9lb4dXA
grep -w "^export HISTCONTROL=ignorespace:cmdhist$" ${HOME}/.bashrc > /tmp/iCEzofoS
cat /tmp/iCEzofoS | wc -l
cat >> ${HOME}/.bashrc <<< 'export HISTCONTROL=ignorespace:cmdhist'
rm -f /tmp/iCEzofoS
grep -w "^export HISTCONTROL=ignorespace:cmdhist$" /etc/bash.bashrc > /tmp/r0YLgpxO
cat /tmp/r0YLgpxO | wc -l
cat >> /etc/bash.bashrc <<< 'export HISTCONTROL=ignorespace:cmdhist'
rm -f /tmp/r0YLgpxO
grep -w "^export HISTCONTROL=ignorespace:cmdhist$" /etc/profile > /tmp/Yx6Ntxi2
cat /tmp/Yx6Ntxi2 | wc -l
cat >> /etc/profile <<< 'export HISTCONTROL=ignorespace:cmdhist'
rm -f /tmp/Yx6Ntxi2
grep -w "^export DEBIAN_FRONTEND=noninteractive$" ${HOME}/.bashrc > /tmp/bPYWsM7r
cat /tmp/bPYWsM7r | wc -l
cat >> ${HOME}/.bashrc <<< 'export DEBIAN_FRONTEND=noninteractive'
rm -f /tmp/bPYWsM7r
grep -w "^export DEBIAN_FRONTEND=noninteractive$" /etc/bash.bashrc > /tmp/fMiIAZjI
cat /tmp/fMiIAZjI | wc -l
cat >> /etc/bash.bashrc <<< 'export DEBIAN_FRONTEND=noninteractive'
rm -f /tmp/fMiIAZjI
grep -w "^export DEBIAN_FRONTEND=noninteractive$" /etc/profile > /tmp/EtztCF5V
cat /tmp/EtztCF5V | wc -l
cat >> /etc/profile <<< 'export DEBIAN_FRONTEND=noninteractive'
rm -f /tmp/EtztCF5V
apt-get update
apt-get install -y -qq lsb-release
lsb_release -a
dpkg-divert --local --rename --add /sbin/initctl
ln -f -s /bin/true /sbin/initctl
mkdir -p /root/shutit_build/module_record/shutit.tk.setup && touch /root/shutit_build/module_record/shutit.tk.setup/built && rm -f /root/shutit_build/module_record/shutit.tk.setup/removed
exit
su - root
export SHUTIT_BACKUP_PS1_lViq7hQk=$PS1 && PS1='SHUTIT_shutit.tk.alfs.alfs#JTtyLEtn>' && unset PROMPT_COMMAND && stty cols 320
apt-get install -y -qq build-essential bison subversion wget curl texinfo libxml2 gawk patch sudo ncurses-dev libxml2-utils libxml2-dev locales tidy docbook-xml udev
apt-get install -y -qq vim strace xterm
echo "LANG=en_US.UTF-8" > /etc/default/locale
echo "LC_MESSAGES=POSIX" >> /etc/default/locale
echo "LANGUAGE=en" >> /etc/default/locale
locale-gen en_US.UTF-8
export LANG=en_GB.UTF-8
mkdir -p /mnt/build_dir
cd /mnt/build_dir
mkdir -p /mnt/build_dir/xslt
cd /mnt/build_dir/xslt
curl -L http://xmlsoft.org/sources/libxslt-1.1.28.tar.gz | tar -zxf -
cd libxslt-*
./configure --prefix=/usr --disable-static
make
make install
rm -rf /mnt/build_dir/xslt
groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs
cd /mnt/build_dir
apt-get install -y -qq passwd
passwd lfs
2mvjsthr
2mvjsthr
echo "lfs ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
svn co svn://svn.linuxfromscratch.org/ALFS/jhalfs/trunk jhalfs-trunk
cd jhalfs-trunk
mkdir -p /mnt/build_dir/src_archive
make config
1
n
y
1
y
y
y
y
n
y
y
y
n
y
y
/blfs_root
blfs-xml
/var/lib/jhalfs/BLFS
y
/mnt/build_dir/src_archive
y
y
n
n
n
n
y
C
n
2
n
sed -i '313,320s/.*//' jhalfs
sed -i '94,104s/.*//' jhalfs
./jhalfs run
su - lfs
export SHUTIT_BACKUP_PS1_EGOg0DnW=$PS1 && PS1='SHUTIT_TMP#xzV6qVJE>' && unset PROMPT_COMMAND && stty cols 320
cd /mnt/build_dir/jhalfs
make
sudo sed -i '4s/.*/cp $PKGDIR\/gettext-runtime\/intl\/plural.c $PKGDIR\/gettext-runtime\/intl\/pluralx.c/' /mnt/build_dir/jhalfs/lfs-commands/chapter05/052-gettext
make
exit
echo "ShutIt Distro 0.1" > /mnt/build_dir/etc/issue
echo "export HISTCONTROL=ignorespace:cmdhist" >> /mnt/build_dir/root/.bashrc
echo "export HISTSIZE=99999999" >> /mnt/build_dir/root/.bashrc
echo 'export HISTTIMEFORMAT="%s "' >> /mnt/build_dir/root/.bashrc
echo "shopt -s histappend" >> /mnt/build_dir/root/.bashrc
mkdir -p /opt/alfs_build
mv /mnt/build_dir/sources /opt/alfs_build
mv /mnt/build_dir/tools /opt/alfs_build
mv /mnt/build_dir/src_archive /opt/alfs_build
mv /mnt/build_dir/jhalfs* /opt/alfs_build
mv /mnt/build_dir/blfs_root /opt/alfs_build
cd /mnt/build_dir
tar -cf - . | xz - > /artifacts/lfs.tar.xz
mkdir -p /root/shutit_build/module_record/shutit.tk.alfs.alfs && touch /root/shutit_build/module_record/shutit.tk.alfs.alfs/built && rm -f /root/shutit_build/module_record/shutit.tk.alfs.alfs/removed
exit
su - root
export SHUTIT_BACKUP_PS1_tNsnWx6b=$PS1 && PS1='SHUTIT_shutit.tk.alfs.alfs#eZsXbJRj>' && unset PROMPT_COMMAND && stty cols 320
exit
su - root
export SHUTIT_BACKUP_PS1_9oDHzmyk=$PS1 && PS1='SHUTIT_shutit.tk.setup#oj6Ki6Os>' && unset PROMPT_COMMAND && stty cols 320
exit
su - root
export SHUTIT_BACKUP_PS1_Wmro0onq=$PS1 && PS1='SHUTIT_shutit.tk.alfs.alfs#hPRA3wPa>' && unset PROMPT_COMMAND && stty cols 320
exit
su - root
export SHUTIT_BACKUP_PS1_idbekSAZ=$PS1 && PS1='SHUTIT_shutit.tk.setup#Jfp4HIA9>' && unset PROMPT_COMMAND && stty cols 320
exit
mkdir -p /root/shutit_build/rothko_imiell_1420488047.48.482573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment