--- toast-linux 2004/04/16 00:26:54 1.23 +++ toast-linux 2004/04/16 22:19:15 1.24 @@ -834,7 +834,7 @@ ::sysinit:/etc/init.d/rc.start ::respawn:-/bin/sh ::ctrlaltdel:/sbin/reboot -::shutdown:/etc/rc.stop +::shutdown:/etc/init.d/rc.stop --- FILE root/etc/init.d/rc.start --- #!/bin/sh -e @@ -992,6 +992,7 @@ tfile="$dir/total" cfile="$dir/current" lfile="$dir/list" +log="$dir/log" ndir="$dir/names" ddir="$dir/done" @@ -1027,6 +1028,7 @@ echo -en '\33[0;44m ' [ "$name" = "$i" ] && echo -en '\33[0;1m' echo -n "$i" + echo -en '\33[0;44m ' done < "$lfile" echo -e '\33[K' @@ -1039,7 +1041,14 @@ done echo -ne '\33[0;41m\33[K\33[m\33['"$firstline;$lastline"'r\33['"$lastline"'H' -"$@" || exit $? +start="`date +'%s'`" +if ! "$@"; then + status="$?" + echo -ne '\33[s\33[r\33[u' + exit "$status" +fi +let elapsed="`date +'%s'`-$start" +echo "$name $elapsed" >> $log : > "$dfile" let current="$current+$cost" @@ -1088,6 +1097,7 @@ for i in inittab rc devfsd.conf protocols services rpc fdprm; do ln -sf "../usr/etc/$i" "$target/etc/$i" done +rm -fr "$target/etc/init.d" ln -s . "$target/usr/usr" ln -s gcc "$target/bin/cc" ln -s vim "$target/bin/vi.off" @@ -1098,7 +1108,8 @@ mv "$target/etc/$i" "$target/etc/`basename $i .hd`" done -# TODO: adjust permissions +chmod go-w "$target/dev" +chmod -R ro-w "$target/etc" --- FILE root/sbin/devices --- #!/bin/sh @@ -1422,12 +1433,12 @@ echo "tune2fs -j $lvpath" done ---- FILE root/sbin/lilo --- +--- FILE root/sbin/finish --- #!/bin/sh -e [ -d /mnt/root/proc/1 ] || !echo "/mnt/root/proc not mounted?" rm -f /mnt/root/dev/dm-[0-9]* chroot /mnt/root vgscan -cp /mnt/root/usr/boot/* /mnt/root/boot/ +chroot /mnt/root sh -c 'cp /usr/boot/* /boot/' exec chroot /mnt/root lilo "$@" --- FILE root/sbin/toast --- @@ -1667,7 +1678,21 @@ --- FILE root/sbin/utoastdeb --- #!/bin/sh -exec utoast "deb-$1" "$3" "http://http.us.debian.org/debian/pool/main/$4/$2_$3_i386.deb" +urls="" +deb() +{ + urls="$urls http://http.us.debian.org/debian/pool/main/$1_i386.deb" +} +deb g/glibc/libc6_2.3.2.ds1-11 +deb g/glibc/libc6-dev_2.3.2.ds1-11 +deb l/linux-kernel-headers/linux-kernel-headers_2.5.999-test7-bk-15 +deb b/binutils/binutils_2.14.90.0.7-6 +deb g/gcc-3.3/gcc-3.3_3.3.3-6 +deb g/gcc-3.3/cpp-3.3_3.3.3-6 +deb p/perl/perl-base_5.8.3-3 +deb n/ncurses/libncurses5_5.4-3 +deb b/bash/bash_2.05b-14 +exec utoast bin 0 $urls --- FILE root/sbin/run --- #!/bin/sh -e @@ -1682,71 +1707,26 @@ task 1 partition partition task 1 swap swap task 1 setup setup - -# Step 1: Download the minimum required binary packages. -# These are all stolen from Debian testing. -# I'm including a perl binary here because perl refuses to build without comm, -# busybox doesn't seem to include comm, and I'd just as soon avoid trying to -# build real source packages with utoast. -# Including bash because hardly anything will build with busybox ash alone. -# Including ncurses only because the bash binary requires it. - -task 1 glibc0 utoastdeb glibc libc6 2.3.2.ds1-11 g/glibc -task 1 headers utoastdeb headers libc6-dev 2.3.2.ds1-11 g/glibc -task 1 kheaders utoastdeb kheaders linux-kernel-headers 2.5.999-test7-bk-15 l/linux-kernel-headers -task 1 binutils0 utoastdeb binutils binutils 2.14.90.0.7-6 b/binutils -task 1 gcc0 utoastdeb gcc gcc-3.3 3.3.3-6 g/gcc-3.3 -task 1 cpp utoastdeb cpp cpp-3.3 3.3.3-6 g/gcc-3.3 -task 1 perl0 utoastdeb perl perl-base 5.8.3-3 p/perl -task 1 ncurses0 utoastdeb ncurses libncurses5 5.4-3 n/ncurses # required by bash -task 1 bash0 utoastdeb bash bash 2.05b-14 b/bash - -# Step 2: Install toast, so we can use it to install everything else. -# Note that utoast currently needs make in order to install toast. - -task 1 make1 utoast make 3.80 http://ftp.gnu.org/gnu/make/make-3.80.tar.bz2 -task 1 toast1 utoast toast 1.320 http://toastball.net/toast/toast-1.320.tar.gz - -# Step 3: Replace all binary packages from step 1 with source packages. -# Everything compiled from source prior to this point will need to be rebuilt -# against the new libc before we get rid of the old one. -# Everything compiled from source during this step prior to the new gcc and -# binutils should be rebuilt with the new tools before the end of this step. -# We need to rebuild toast itself in order to install the man page correctly. -# Note that we install kernel headers from 2.4 with glibc because some programs -# (notably LILO) won't compile against the headers in 2.6. What a mess. - -task 1 gawk1 toast arm http://ftp.gnu.org/gnu/gawk/gawk-3.1.3.tar.bz2 -task 1 coreutils1 toast arm http://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 -task 1 gcc1 toast arm http://ftp.gnu.org/gnu/gcc/gcc-3.3.2/gcc-3.3.2.tar.bz2 -task 1 clean1 toast remove deb-gcc deb-cpp -task 1 perl1 toast arm http://www.cpan.org/src/5.0/perl-5.8.2.tar.gz -task 1 clean2 toast remove deb-perl -task 1 glibc1 toast arm glibc/2.3.2: [ http://ftp.gnu.org/gnu/glibc/glibc-2.3.2.tar.bz2 http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.2.tar.bz2 http://kernel.org/pub/linux/kernel/v2.4/linux-2.4.25.tar.bz2 http://toastball.net/toast-linux-tmp/glibc-2.3.2-gcc-2.3.x.patch ] +task 1 bin utoastdeb +task 1 make utoast make 3.80 http://ftp.gnu.org/gnu/make/make-3.80.tar.bz2 +task 1 toast utoast toast 1.320 http://toastball.net/toast/toast-1.320.tar.gz +task 1 gawk toast arm http://ftp.gnu.org/gnu/gawk/gawk-3.1.3.tar.bz2 +task 1 coreutils toast arm http://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 +task 1 perl toast arm http://www.cpan.org/src/5.0/perl-5.8.3.tar.gz +task 1 binutils toast arm http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 +task 1 gcc toast arm http://ftp.gnu.org/gnu/gcc/gcc-3.3.2/gcc-core-3.3.2.tar.bz2 +task 1 glibc toast arm glibc/2.3.2: [ http://ftp.gnu.org/gnu/glibc/glibc-2.3.2.tar.bz2 http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.2.tar.bz2 http://kernel.org/pub/linux/kernel/v2.4/linux-2.4.25.tar.bz2 http://toastball.net/toast-linux-tmp/glibc-2.3.2-gcc-2.3.x.patch ] # http://www.rocklinux.net/sources/package/base/glibc23/gcc33-hotfix.patch -# http://www.pengutronix.de/software/ptxdist/patches-0.5.0/glibc-2.3.2/generic/generic-sscanf.diff # http://nl.lunar-linux.org/lunar/patches/glibc-2.3.2-newstyle.patch # http://www.mozilla.org/projects/minimo/toolchain/glibc-2.3.2.diff # http://www.linuxfromscratch.org/patches/lfs/5.0/glibc-2.3.2-sscanf-1.patch # http://www.muth.org/Robert/Patch/glibc-2.3.2.patch -# http://mirror.gentoo.ru/pub/mirror/gentoo-portage/sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch # http://sources.redhat.com/ml/bug-glibc/2003-10/msg00101/sscanf.c.diff -task 1 clean3 toast remove deb-headers deb-kheaders -task 1 binutils1 toast arm http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 -task 1 clean4 toast remove deb-binutils +# http://mirror.gentoo.ru/pub/mirror/gentoo-portage/sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch +# http://www.pengutronix.de/software/ptxdist/patches-0.5.0/glibc-2.3.2/generic/generic-sscanf.diff task 1 bash toast arm http://ftp.gnu.org/gnu/bash/bash-2.05b.tar.gz -task 1 glibc toast rebuild glibc -task 1 gcc toast rebuild gcc -task 1 binutils toast rebuild binutils -task 1 coreutils toast rebuild coreutils -task 1 make toast rebuild make -task 1 gawk toast rebuild gawk -task 1 toast toast rebuild toast -task 1 perl toast rebuild perl -task 1 clean4 toast remove deb-ncurses deb-glibc deb-bash - -# Step 4: Replace busybox with full GNU/Linux tools. - +task 1 rebuild toast rebuild make toast gawk coreutils binutils gcc-core perl +task 1 remove toast remove bin busybox task 1 sed toast arm http://ftp.gnu.org/gnu/sed/sed-4.0.9.tar.gz task 1 util-linux toast arm http://kernel.org/pub/linux/utils/util-linux/util-linux-2.11z.tar.bz2 task 1 module-init-tools toast arm http://kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.0.tar.bz2 @@ -1764,17 +1744,9 @@ task 1 udhcp toast arm http://udhcp.busybox.net/source/udhcp-0.9.8.tar.gz task 1 diffutils toast arm http://ftp.gnu.org/gnu/diffutils/diffutils-2.8.1.tar.gz task 1 vim toast arm ftp://ftp.vim.org/pub/vim/unix/vim-6.2.tar.bz2 -task 1 clean5 toast remove busybox - -# Some of these packages can't be installed until busybox is gone because -# they require the LD_PRELOAD hack in order to install correctly: - task 1 bzip2 toast arm http://mirrors.kernel.org/sources.redhat.com/bzip2/v102/bzip2-1.0.2.tar.gz task 1 sysklogd toast arm http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.4.1.tar.gz task 1 net-tools toast arm http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.60.tar.bz2 - -# Step 5: Install what we will need in order to make the system usable. - task 1 linux toast arm [ http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.5.tar.bz2 http://toastball.net/toast-linux-tmp/linux-2.6.5-config.tar.gz ] task 1 device-mapper toast arm ftp://ftp.sistina.com/pub/LVM2/device-mapper/device-mapper.1.00.07.tgz task 1 lvm2 toast arm ftp://ftp.sistina.com/pub/LVM2/tools/LVM2.2.00.08.tgz @@ -1785,11 +1757,8 @@ task 1 e2fsprogs toast arm http://unc.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.34.tar.gz task 1 devfsd toast arm http://kernel.org/pub/linux/daemons/devfsd/devfsd-v1.3.25.tar.bz2 task 1 genext2fs toast arm genext2fs/1.3-4: [ http://http.us.debian.org/debian/pool/main/g/genext2fs/genext2fs_1.3.orig.tar.gz http://http.us.debian.org/debian/pool/main/g/genext2fs/genext2fs_1.3-4.diff.gz ] -task 1 toastinit toast arm http://toastball.net/toast-linux-tmp/toastinit-1.3.tar.gz +task 1 toastinit toast arm http://toastball.net/toast-linux-tmp/toastinit-1.5.tar.gz task 1 toastlogin toast arm http://toastball.net/toast-linux-tmp/toastlogin-1.8.tar.gz - -# Step 6: Bring the new system roughly up to par with Linux From Scratch. - task 1 man-pages toast arm http://kernel.org/pub/linux/docs/manpages/man-pages-1.65.tar.bz2 task 1 zlib toast arm http://www.libpng.org/pub/png/src/zlib-1.2.1.tar.gz task 1 m4 toast arm http://ftp.gnu.org/gnu/m4/m4-1.4.tar.gz @@ -1806,19 +1775,12 @@ task 1 kbd toast arm ftp://ftp.win.tue.nl/pub/linux-local/utils/kbd/kbd-1.12.tar.gz task 1 man toast arm http://kernel.org/pub/linux/utils/man/man-1.5m2.tar.bz2 task 1 iana-etc toast arm http://www.sethwklein.net/projects/iana-etc/downloads/iana-etc-0.99.tar.bz2 - -# Step 7: Install other essential packages. - task 1 zsh toast arm http://archive.progeny.com/zsh/zsh-4.2.0.tar.bz2 task 1 readline toast arm http://ftp.gnu.org/gnu/readline/readline-4.3.tar.gz task 1 parted toast arm http://ftp.gnu.org/gnu/parted/parted-1.6.6.tar.gz +task 1 finish finish -task 1 runlilo lilo - -# TODO: -# openssh -# reorder and/or rebuild packages to take full advantage of optional libraries -# garnome2toast +# TODO: reorder/rebuild pkgs to take full advantage of optional libraries etc. --- FILE root/sbin/respin --- #!/bin/sh -e