--- toast-linux 2004/09/20 03:41:33 1.119 +++ toast-linux 2004/09/20 06:31:34 1.120 @@ -45,13 +45,13 @@ for(values(%text)) { s/\n\n$/\n/; + s/!VERSION!/$version/g; } for($text{"Makefile"}) { s/^ /\t/mg; s/!GENBY!/$genby/g; - s/!VERSION!/$version/g; s/!CONFIGURE!/$configure/g; s/!PREFIX!/$prefix/g; } @@ -887,6 +887,9 @@ mount -a ifconfig lo 127.0.0.1 hostname localhost +network +wget http://toastball.net/toast-linux-tmp/configure +sh configure !VERSION! --- FILE root/etc/init.d/rc.stop --- #!/bin/sh @@ -897,7 +900,7 @@ --- FILE root/etc/init.d/rc.main --- #!/bin/sh -run +[ -x /sbin/run ] && run sh --login --- FILE root/sbin/network --- @@ -1010,195 +1013,6 @@ exit 0 ---- FILE root/sbin/timeout --- -#!/bin/sh - -seconds="$1" -if [ -z "$seconds" -o "$seconds" -le 0 ]; then - echo "usage: $0 <seconds>" >&2 - exit 1 -fi - -save="`stty -g`" -key="" -while [ "$seconds" -gt 0 -a -z "$key" ]; do - echo -ne '\r'"$seconds " - stty raw -echo time 10 min 0 || exit $? - key="`dd bs=1 count=1 2>/dev/null`" - stty "$save" - let seconds="$seconds - 1" -done -echo -ne '\r \r' -[ -z "$key" ] - ---- FILE root/sbin/task --- -#!/bin/sh - -start="`date +'%s'`" - -[ -z "$LINES" ] && LINES=50 -[ -z "$COLUMNS" ] && COLUMNS=80 - -if [ "$1" = "init" ]; then - [ -n "$TASK_INIT" ] && exit 0 - shift - echo -ne '\33[9;0]' - for i in `seq 1 $LINES`; do echo; done - TASK_INIT=1 exec "$@" -fi - -estimate="$1" -name="$2" -shift 2 - -dir="/var/run/task" -list="$dir/LIST" -file="$dir/$name" - -if [ -n "$TASK_INIT" ]; then - [ -r "$file" ] && exit 0 - mkdir -p "$dir" - echo "$name $estimate" >> $list - : > "$file" - exit 0 -fi - -[ -s "$file" ] && exit 0 - -hms() -{ - local h m s - case "$1" in - [0-9]*) - let h="$1/3600" - let m="($1/60)%60" - let s="$1%60" - printf "%d:%02d:%02d\n" "$h" "$m" "$s" - ;; - *) - echo "?:??:??" - ;; - esac -} -out="" -p() { out="$out$*"; } -firstline=4 -line="" -etotal=0 -atotal=0 -esofar=0 -asofar=0 -let margin="$COLUMNS-1" -while read n e; do - line="$line $n" - if echo "$line" | egrep -q ".{$margin}"; then - let firstline="1+$firstline" - p '\33[K\12' - line=" $n" - fi - p '\33[0;44m ' - if [ "$name" = "$n" ]; then - p '\33[0;1m' - esofar="$etotal" - asofar="$atotal" - fi - let etotal="$etotal+$e" - [ -s "$dir/$n" ] && read a < "$dir/$n" && let atotal="$atotal+$a" - p "$n" - p '\33[0;44m' -done < "$list" -remain="" -this="" -let percent="$esofar*100/$etotal" -if [ "$percent" -gt 0 -a "$esofar" -gt 0 -a "$asofar" -gt 0 ]; then - let remain="($etotal-$esofar)*$asofar/$esofar" - let this="$estimate*$asofar/$esofar" -fi -out='\33[s\33[H\33[0;1;42m'"`hms $asofar` elapsed / $percent% complete = `hms $remain` left ($name: `hms $this`)"'\33[K\12'"$out" -p '\33[K\12\16\33[1;33;43m' -let bar="$esofar*$COLUMNS/$etotal" -while [ "$bar" -gt 0 ]; do - p '0' - let bar="$bar-1" -done -p '\17\33[K\33[m\33['"$firstline"'r\33[u' -echo -ne "$out" - -if ! "$@"; then - echo -ne '\33[s\33[r\33[u' - exit 1 -fi -let elapsed="`date +'%s'`-$start" -echo "$elapsed" > $file - ---- FILE root/sbin/setup --- -#!/bin/sh -e - -target="/mnt/root" - -mount "$target" - -if [ "`cd /$target; echo *`" != "lost+found" ]; then - echo "unexpected filesystem contents: $target" >&2 - exit 1 -fi - -copy="dev etc lib" -for i in /bin/* /sbin/*; do - ls -l "$i" | grep -q 'busybox$' && copy="$copy $i" -done -(cd / && tar c $copy) | (cd "$target" && tar x) - -relrootdir="/toast/pkg/busybox/vunknown/1/root" -rootdir="$target/$relrootdir" -mkdir -p "$rootdir" -for i in bin sbin lib; do - mv "$target/$i" "$rootdir/$i" - mkdir -p "$target/usr/$i" - ln -s "usr/$i" "$target/$i" -done -touch "$rootdir/../build.log" -for i in `cd "$rootdir" && find *`; do - ln -s "$relrootdir/$i" "$target/$i" -done - -for i in boot etc/dhcpc mnt/boot mnt/floppy mnt/cdrom proc root sys tmp usr/man var/empty var/lock var/run var/log var/spool/mail; do - mkdir -p "$target/$i" -done -chmod 1777 "$target/tmp" - -for i in boot proc sys; do mount "$target/$i"; done - -ln -s "../usr/share/zoneinfo/`cat /etc/TZ`" "$target/etc/localtime" -for i in inittab rc devfsd.conf protocols services rpc fdprm sgml xml; 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" -ln -s bash "$target/bin/sh.off" -rm "$target/bin/sh" - -for i in `cd "$target/etc" && echo *.hd`; do - mv "$target/etc/$i" "$target/etc/`basename $i .hd`" -done - -chmod go-w "$target/dev" -chmod -R go-w "$target/etc" 2>/dev/null || true # ignore broken symlinks - -[ -z "$USERS" ] && USERS=user -USERS="`echo \"$USERS\" | sed -e 's/[^a-z0-9]/ /g; s/^ *//; s/ *$//'`" -uid=500 -for i in $USERS; do - echo "$i:x:$uid:$uid:$i:/home/$i:/bin/zsh" >> "$target/etc/passwd" - echo "$i:x:$uid:" >> "$target/etc/group" - [ -r "$target/etc/user" ] || echo $i > "$target/etc/user" - mkdir -p "$target/home/$i" - chown $uid.$uid "$target/home/$i" - let uid="1+$uid" -done - --- FILE root/sbin/devices --- #!/bin/sh @@ -1233,800 +1047,6 @@ [ -p /dev/initctl ] || mknod /dev/initctl p chmod 666 /dev/null - ---- FILE root/sbin/swap --- -#!/bin/sh - -# If available memory is less than "goalmegs" megabytes, create and activate -# a swap volume to bring it up to that amount. -# TODO: combine this with the /sbin/partition script. -# BUG: the permanent fstab isn't getting updated - -goalmegs=512 -vgname=toast -lvname=swap -lvpath="/dev/$vgname/$lvname" - -read caption number units < /proc/meminfo -if [ "$caption $units" != "MemTotal: kB" ]; then - echo "Error parsing /proc/meminfo: $caption $number $units" >2 - exit 1 -fi -let goalk="1024*$goalmegs" -[ "$number" -ge "$goalk" ] && exit 0 -let lvk="$goalk-$number" - -set -e - -lvcreate -L "$lvk"k -n "$lvname" "$vgname" -mkswap "$lvpath" -echo "$lvpath swap swap defaults 0 0" >> /etc/fstab -swapon -a - ---- FILE root/sbin/partition --- -#!/bin/sh - -if [ "$*" != "foo" ]; then - set -e - echo "" - echo "Examining disks:" - $0 foo > /tmp/partition.tmp - grep '^# ' /tmp/partition.tmp - echo "Preparing to write new disk partitions as described above." - echo "Press any key to abort." - timeout 20 - sh -ex /tmp/partition.tmp - rm /tmp/partition.tmp - exit 0 -fi - -# Environment variables: -# DISKS -# DESTROY - -# Number of partitions to create on each disk. -# Each partition will be an LVM2 physical volume (PE). -# We split each disk into multiple partitions/PEs because there is no way -# to resize a PE once it has been created. It would be very difficult -# to make room for another OS later on if we used only one PV per disk. -# Linux only allocates 15 minor numbers for SCSI disk partitions; -# if 1 is primary, 2 is extended, and 5-15 are logical, then there is a -# maximum of 12 usable partitions per disk. -slices=8 - -# LVM2 physical extent (PE) size, in megabytes. This must be a power of two! -# Once the volume group (VG) has been created, its PE size can't be changed. -# The maximum logical volume (LV) size for the VG is about 64k times PE size. -# A PE size of 32 MB gets you a maximum LV size of 2 terabytes, which is -# the maximum allowed, so there is no point in using a value larger than 32. -# Each partition must be large enough to fit at least one PE (plus overhead), -# or it won't be very useful. -# Since each PV stores data in multiples of the PE size, smaller values might -# waste a bit less space, especially on smaller drives. -pemegs=16 - -# Number of megabytes to allocate to the /boot logical volume. -# /boot needs to be on a separate LV because current versions of lilo -# seem to panic if the LV spans multiple PVs (even if they're on the -# same disk!), so we need a special LV that is explicitly restricted to -# one PV. -bootmegs=128 - -# Percentage of the total space in the volume group to allocate to the -# root logical volume we'll be creating. -# Remaining space in the VG will be used for /boot, swap (if any), -# by snapshots (for fsck or backups) and/or any other logical volumes -# the user might decide to create later. -lvpercent=80 - -# Volume group name. If we want to be able to coexist peacefully with an -# existing Linux setup that also uses LVM, this shouldn't conflict with any -# existing volume group names. -vgname="toast" - -# Temporary file used to store munged parted output. -tmpfile=/tmp/parted.munge.$$ - -error() -{ - echo "$*" >&2 - rm -f "$tmpfile" - exit 1 -} - -valid_disk_name() -{ - case "$1" in - */*) return 1 ;; - *[0-9]) return 1 ;; - [hs]d[a-z]*) return 0 ;; - *) return 1 ;; - esac -} - -# get/validate list of disks -if [ -n "$DISKS" ]; then - for disk in $DISKS; do - valid_disk_name "$disk" || error "bad disk name: $disk" - done -else - while read major minor blocks name rest; do - valid_disk_name "$name" && DISKS="$DISKS $name" - done < /proc/partitions - [ -z "$DISKS" ] && error "no disks found" -fi - -# create/check block device nodes for all disks -for disk in $DISKS; do - path="/dev/$disk" - [ -b "$path" ] || error "not a block device: $path" - [ -r "$path" ] || error "can't read disk: $disk" - [ -w "$path" ] || error "can't write disk: $disk" -done - -# create partitions -pvpaths="" -let pecount=0 -for disk in $DISKS; do - path="/dev/$disk" - parted="parted -s $path --" - diskmajor="" - diskminor="" - totalm="" - totalk="" - overwrite="" - lastminor=0 - extminor=0 - labeltype="" - primary1exists="" - primary2exists="" - primary3exists="" - primary4exists="" - - case "$disk" in - h*) maxminor=63 ;; # IDE - s*) maxminor=15 ;; # SCSI - *) error "assertion failed: $disk" - esac - - while read major minor blocks name rest; do - if [ "$name" = "$disk" ]; then - diskmajor="$major" - diskminor="$minor" - let totalm="$blocks/1024" - let totalk="($blocks%1024)*1000/1024" - case "$totalk" in - [0-9]) totalk="00$totalk" ;; - [1-9][0-9]) totalk="0$totalk" ;; - [1-9][0-9][0-9]) ;; - *) error "assertion failed: disk=$disk blocks=$blocks k=$totalk" - esac - fi - done < /proc/partitions - - [ -z "$totalm" ] && error "assertion failed: disk=$disk totalm=$totalm" - [ -z "$totalk" ] && error "assertion failed: disk=$disk totalk=$totalk" - [ -z "$diskmajor" ] && error "assertion failed: no major for disk=$disk" - [ -z "$diskminor" ] && error "assertion failed: no minor for disk=$disk" - - sum=bf619eac0cdf3f68d496ea9344137e8b # md5sum of 512 zero bytes - - if [ "$DESTROY" = "yes" ]; then - echo "# Entire disk $disk will be overwritten unconditionally." - overwrite="yes" - elif dd if="$path" bs=512 count=1 2>/dev/null | md5sum | grep -q "$sum"; then - echo "# Disk $disk appears to be empty; entire disk will be overwritten." - overwrite="yes" - else - echo "# Contents of disk $disk may be accidentally destroyed." - # TODO: tell user what partitions will go on this disk, if any - $parted print | sed -e 's/0\.000-//; s/\./ /g' > "$tmpfile" - while read one two three four five six rest; do - if [ "$one $two $three" = "Disk geometry for" ]; then - totalm="$five" - totalk="$six" - fi - [ "$one $two $three" = "Disk label type:" ] && labeltype="$one" - case "$one" in - [0-9]*) - [ "$one" -gt "$lastminor" ] && lastminor="$one" - [ "$six" = "extended" ] && extminor="$one" - [ "$six" = "primary" ] && eval "primary${one}exists=yes" - ;; - esac - done < "$tmpfile" - rm -f "$tmpfile" - fi - - freeslot=0 - for slot in 4 3 2; do - eval "[ -n \$primary{$slot}used ]" && freeslot="$slot" - done - - if [ -n "$overwrite" ]; then - lastminor=0 - extminor=0 - labeltype="msdos" - echo "dd if=/dev/zero of=$path bs=512 count=1" - echo "$parted mklabel $labeltype" - fi - - if [ "$labeltype" = "msdos" ] && [ "$extminor" -gt 0 -o "$freeslot" -gt 0 ]; then - let slicemegs="$totalm/$slices" - [ "$slicemegs" -le "$pemegs" ] && slicemegs=$totalm - let splitmegs="$slicemegs*2" - lastm=0 - lastk=000 - { - if [ -z "$overwrite" ]; then - $parted print | grep "^[0-9]" | cut -c 3- | sort -n | sed -e 's/\./ /g' - fi - echo "$totalm $totalk END END END END END" - } > "$tmpfile" - while read startm startk endm endk type fs flags; do - let gapmegs="($startm$startk-$lastm$lastk)/1000" - create=yes - while [ "$gapmegs" -gt "$pemegs" -a "$lastminor" -lt "$maxminor" -a -n "$create" ]; do - if [ "$gapmegs" -gt "$splitmegs" ]; then - let newendm="$lastm+$slicemegs" - newendk="$lastk" - let gapmegs="$gapmegs-$slicemegs" - else - newendm="$startm" - newendk="$startk" - gapmegs="0" - fi - let newminor="1+$lastminor" - if [ "$newminor" -eq 1 ]; then - newtype="primary" - else - newtype="logical" - [ "$newminor" -le 4 ] && newminor=5 - if [ "$extminor" -eq 0 ]; then - extminor="$freeslot" - echo "$parted mkpart extended $lastm.$lastk -0" - echo "$parted set $extminor lba on" - fi - fi - echo "$parted mkpart $newtype ext2 $lastm.$lastk $newendm.$newendk" - echo "$parted set $newminor lvm on" - pvpaths="$pvpaths $path$newminor" - let newpecount="($newendm$newendk-$lastm$lastk)/($pemegs*1000)" - let pecount="$pecount+$newpecount" - lastm="$newendm" - lastk="$newendk" - lastminor="$newminor" - done - lastm="$endm" - lastk="$endk" - done < "$tmpfile" - rm -f "$tmpfile" - fi -done - -# create an ext3 filesystem on the new partitions -[ -z "$pvpaths" -o "$pecount" -eq 0 ] && error "no room for new partitions" -let lvextents="$pecount*$lvpercent/100" -echo "devices" -for pvpath in $pvpaths; do - echo "dd if=/dev/zero of=$pvpath bs=512 count=10" -done -echo "pvcreate -fy -M2 $pvpaths" -echo "vgcreate -s $pemegs $vgname $pvpaths" -echo "lvcreate -L "$bootmegs"m -n boot $vgname" # TODO: restrict to first PV -echo "lvcreate -l $lvextents -n root $vgname" -echo "vgchange -ay $vgname" -for lvname in boot root; do - lvpath="/dev/$vgname/$lvname" - echo "parted -s $lvpath -- mklabel loop" - echo "parted -s $lvpath -- mkpartfs primary ext2 0 -0" - echo "tune2fs -j $lvpath" -done - ---- FILE root/sbin/bootable --- -#!/bin/sh -e -[ -d /mnt/root/proc/1 ] || ! echo "/mnt/root/proc not mounted?" -[ -d /mnt/root/sys/class ] || ! echo "/mnt/root/sys not mounted?" -rm -f /mnt/root/dev/dm-[0-9]* -chroot /mnt/root vgscan -chroot /mnt/root sh -c 'cp /usr/boot/* /boot/' -[ -b /dev/hda ] || chroot /mnt/root perl -p -i -e 's/hda/sda/' /etc/lilo.conf -exec chroot /mnt/root lilo "$@" - ---- FILE root/sbin/toast --- -#!/bin/sh -[ -z "$TOAST_ARMDIR" ] && export TOAST_ARMDIR=/usr -ls /mnt/root/lib/ld-uClibc.so.0 >/dev/null 2>&1 && export TOAST_PRELOAD=false -exec chroot /mnt/root /bin/toast "$@" - ---- FILE root/sbin/utoast --- -#!/bin/sh - -# utoast - minimal toast replacement script for toast linux toaststrap process - -# paths to use: -chrootdir=/mnt/root -relstoredir=/toast -relarmdir=/usr -storedir="$chrootdir""$relstoredir" -armdir="$chrootdir""$relarmdir" - -# functions - -announce() -{ - echo "$*" -} - -explain() -{ - echo "# $*" -} - -error() -{ - [ -n "$*" ] && echo "utoast: $*" >&2 - echo "utoast: aborting" >&2 - exit 1 -} - -# parse command line - -name="$1" -shift -version="$1" -shift -# remaining args are urls -[ -n "$*" ] || error "usage: $0 name version url..." - -# add - -namedir="$storedir/pkg/$name" -verdir="$namedir/v$version" -[ -d "$verdir" ] && error "$name version $version has already been added" - -announce mkdir -p "$namedir" -mkdir -p "$namedir" || error -announce mkdir "$verdir" -mkdir "$verdir" || error - -urlfile="$verdir/url" -urlfiletmp="$urlfile.tmp" -explain "creating $urlfile.tmp" -for url in "$@"; do - echo "$url" >> "$urlfiletmp" || error -done - -announce mv "$urlfiletmp" "$urlfile" -mv "$urlfiletmp" "$urlfile" || error - -# get - -archivedir="$verdir/archive" -archivedirtmp="$archivedir.tmp" -announce mkdir "$archivedirtmp" -mkdir "$archivedirtmp" || error - -for url in "$@"; do - announce "(cd $archivedirtmp && wget $url)" - (cd "$archivedirtmp" && wget "$url") || error -done - -announce mv "$archivedirtmp" "$archivedir" -mv "$archivedirtmp" "$archivedir" || error - -# build - -build=1 -builddir="$verdir/$build" -relbuilddir="$relstoredir/pkg/$name/v$version/$build" -srcdir="$builddir/src" -relsrcdir="$relbuilddir/src" -rootdir="$builddir/root" -relrootdir="$relbuilddir/root" - -announce mkdir "$builddir" -mkdir "$builddir" || error - -buildlog="$builddir/build.log" -brokenlog="$builddir/broken.log" -explain "redirecting to $brokenlog" -{ - explain "utoast building $name version $version" - announce date - date - announce uname -a - uname -a - announce env - env - announce cat "$urlfile" - cat "$urlfile" - announce md5sum "$archivedir"/* - md5sum "$archivedir"/* - - # extract - - announce mkdir "$srcdir" - mkdir "$srcdir" || error - for archive in "$archivedir"/*; do - explain "extracting $archive" - case "$archive" in - *.deb) dpkg-deb -x "$archive" "$srcdir" || error;; - *.tar.gz) (cd "$srcdir" && tar xzf "$archive") || error;; - *.tar.bz2) (cd "$srcdir" && tar xjf "$archive") || error;; - *) error "don't know how to extract: $archive";; - esac - done - - # compile - - isbin=false - for subdir in usr bin etc lib sbin; do - [ -d "$srcdir/$subdir" ] && isbin=true - done - for file in "$srcdir"/*; do - [ ! -d $file ] && isbin=false - done - - if $isbin; then - announce mv "$srcdir" "$rootdir" - mv "$srcdir" "$rootdir" || error - - # terrible hack: create "gcc" symlink for debian gcc-2.95 binary - if [ ! -x "$rootdir/usr/bin/gcc" ]; then - for gcc in $rootdir/usr/bin/gcc-*; do - if [ -x "$gcc" ]; then - announce ln -sf `basename $gcc` "$rootdir/usr/bin/gcc" - ln -sf `basename $gcc` "$rootdir/usr/bin/gcc" - fi - done - fi - - # terrible hack: create "sh" symlink for bash-minimal binary - if [ ! -x "$rootdir/bin/sh" ]; then - for bash in $rootdir/bin/bash*; do - if [ -x "$bash" ]; then - announce ln -sf `basename $bash` "$rootdir/bin/sh" - ln -sf `basename $bash` "$rootdir/bin/sh" - fi - done - fi - else - # configure - - makedir="$srcdir" - relmakedir="$relsrcdir" - subdir=`cd $makedir && echo *` - if [ -d "$makedir/$subdir" ]; then - makedir="$makedir/$subdir" - relmakedir="$relmakedir/$subdir" - fi - - unconfigured=true - for confprog in configure.gnu configure; do - if $unconfigured && [ -x "$makedir/$confprog" ]; then - announce chroot "$chrootdir" sh -c "cd $relmakedir && ./$confprog --prefix=$relarmdir" - chroot "$chrootdir" sh -c "cd $relmakedir && ./$confprog --prefix=$relarmdir" || error - unconfigured=false - fi - done - $unconfigured && error "can't figure out how to configure" - - # prepare rootdir - - announce mkdir "$rootdir" - mkdir "$rootdir" || error - - # make all install - - if [ -r "$makedir/build.sh" ]; then - # bootstrap GNU make itself; work around apparent make 3.80 build.sh bug - announce "sed -e 's/\@REMOTE\@/stub/' < $makedir/build.sh > $makedir/build.sh.patched" - sed -e 's/\@REMOTE\@/stub/' < "$makedir/build.sh" > "$makedir/build.sh.patched" || error - announce chroot "$chrootdir" sh -c "cd $relmakedir && sh build.sh.patched" - chroot "$chrootdir" sh -c "cd $relmakedir && sh build.sh.patched" || error - announce PATH="$PATH:$relmakedir" chroot "$chrootdir" make -C "$relmakedir" install DESTDIR="$relrootdir" - PATH="$PATH:$relmakedir" chroot "$chrootdir" make -C "$relmakedir" install DESTDIR="$relrootdir" || error - else - announce chroot "$chrootdir" make -C "$relmakedir" all install DESTDIR="$relrootdir" - chroot "$chrootdir" make -C "$relmakedir" all install DESTDIR="$relrootdir" || error - fi - - # fix rootdir - - announce chmod -R -w "$rootdir" - chmod -R -w "$rootdir" || error - - # autoclean - - announce rm -fr "$srcdir" - rm -fr "$srcdir" || error - fi -} 2>&1 | tee "$brokenlog" | sed 's/^/ /' || error - -[ -d "$rootdir" ] || error - -announce mv "$brokenlog" "$buildlog" -mv "$brokenlog" "$buildlog" || error - -# arm - -displace() -{ - if ls "$1" >/dev/null 2>&1; then - displace "$1.off" - announce mv "$1" "$1.off" - mv "$1" "$1.off" || error - fi -} - -(cd "$rootdir" && find .) | while read -r rel; do - rootfile="$rootdir/$rel" - relrootfile="$relrootdir/$rel" - armfile="$armdir/$rel" - - if [ -d "$rootfile" ]; then - if [ ! -d "$armfile" ]; then - announce mkdir "$armfile" - mkdir "$armfile" || error - fi - else - [ -d "$armfile" ] && error "$armfile is a directory but $rootfile isn't" - displace "$armfile" - announce ln -s "$relrootfile" "$armfile" - ln -s "$relrootfile" "$armfile" || error - fi -done - ---- FILE root/sbin/utoastdeb --- -#!/bin/sh -urls="" -url_base="http://http.us.debian.org/debian/pool/main/" -deb() -{ - echo "Locating Debian package $1/$2." - filename=`wget -O- "$url_base$1/" | sed -e 's/"/\n/g' | grep "^$2"'.*_i386.deb$' | tail -1` - if [ -z "$filename" ]; then - echo "Unable to locate Debian package $1/$2." >&2 - exit 1 - fi - urls="$urls $url_base$1/$filename" -} -deb g/glibc libc6_2.3.2.ds1 -deb g/glibc libc6-dev_2.3.2.ds1 -deb l/linux-kernel-headers linux-kernel-headers_2.5.999 -deb b/binutils binutils_2.15 -deb g/gcc-3.4 gcc-3.4_3.4 -deb g/gcc-3.4 cpp-3.4_3.4 -deb g/gcc-3.4 libgcc1 -deb p/perl perl-base_5.8 -deb b/bash bash-minimal_3.0 -exec utoast bin 0 $urls - ---- FILE root/sbin/add --- -#!/bin/sh -e -sed 's/\#.*//' << 'EOF' | grep . | while read x; do toast add $x; done - -# oddball essentials: - -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://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://sources.redhat.com/ml/bug-glibc/2003-10/msg00101/sscanf.c.diff -# 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 - -[ 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 ] - -lilo/22.5.9-devmapper: [ http://lilo.go.dyndns.org/pub/linux/lilo/obsolete/lilo-22.5.9.tar.gz http://www.saout.de/misc/lilo-22.5.9-devmapper.patch ] - -genext2fs/1.3-7.1: [ 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-7.1.diff.gz ] - -# other required packages: -http://toastball.net/toast/init/ -http://toastball.net/toast/login/ -http://www.cpan.org/src/5.0/perl-5.8.5.tar.gz -http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.4.1.tar.gz -http://www.phystech.com/ftp/dhcpcd-1.3.22-pl4.tar.gz -http://www.sethwklein.net/projects/iana-etc/downloads/iana-etc-0.99.tar.bz2 -http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.60.tar.bz2 -ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.85.tar.gz -http://www.zsh.org/pub/old/zsh-4.2.0.tar.bz2 # "old" URL less likely to change -http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2 -http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz -http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 -http://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 -http://ftp.gnu.org/gnu/diffutils/diffutils-2.8.1.tar.gz -http://ftp.gnu.org/gnu/gawk/gawk-3.1.3.tar.bz2 -http://ftp.gnu.org/gnu/gcc/gcc-3.3.2/gcc-3.3.2.tar.bz2 -http://ftp.gnu.org/gnu/gcc/gcc-3.3.2/gcc-core-3.3.2.tar.bz2 -http://ftp.gnu.org/gnu/gettext/gettext-0.14.1.tar.gz -http://ftp.gnu.org/gnu/grep/grep-2.5.tar.bz2 -http://ftp.gnu.org/gnu/gzip/gzip-1.2.4a.tar.gz -http://ftp.gnu.org/gnu/ncurses/ncurses-5.4.tar.gz -http://ftp.gnu.org/gnu/patch/patch-2.5.4.tar.gz -http://ftp.gnu.org/gnu/readline/readline-4.3.tar.gz -http://ftp.gnu.org/gnu/sed/sed-4.0.9.tar.gz -http://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz -http://kernel.org/pub/linux/daemons/devfsd/devfsd-v1.3.25.tar.bz2 -http://kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.0.tar.bz2 -http://kernel.org/pub/linux/utils/util-linux/util-linux-2.11z.tar.bz2 -http://mirrors.kernel.org/sources.redhat.com/bzip2/v102/bzip2-1.0.2.tar.gz -http://mirrors.kernel.org/sources.redhat.com/dm/device-mapper.1.00.19.tgz -http://mirrors.kernel.org/sources.redhat.com/lvm2/LVM2.2.00.22.tgz -http://download.sourceforge.net/e2fsprogs/e2fsprogs-1.34.tar.gz -http://download.sourceforge.net/nasm/nasm-0.98.38.tar.bz2 - -# ftp.info-zip.org seems to be down today (8/31/04): -ftp://ftp.icce.rug.nl/infozip/src/unzip542.tar.gz -ftp://ftp.icce.rug.nl/infozip/src/zip23.tar.gz - -# tricky optional packages: -[ http://download.sourceforge.net/ghostscript/ghostscript-8.14.tar.gz http://download.sourceforge.net/gs-fonts/ghostscript-fonts-std-8.11.tar.gz ] # what happened here? shouldn't fonts be 8.14 too? -[ http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-1.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-2.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-3.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-4.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-5.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-6.tgz http://ftp.xfree86.org/pub/XFree86/4.4.0/source/XFree86-4.4.0-src-7.tgz ] -http://download.sourceforge.net/sourceforge/lex/flex-2.5.27.tar.bz2 # flex 2.5.31 is broken and can't build XFree86 4.4.0, for instance -http://download.sourceforge.net/freetype/freetype-2.1.5.tar.bz2 # 2.1.7 seems to cause include problems with xft 2.1.2 - -# Gnome and KDE: -http://ftp.gnome.org/pub/GNOME/desktop/2.6/2.6.2/sources/ -http://ibiblio.org/pub/mirrors/kde/stable/3.3/src/ - -# additional GNOMEy-looking stuff -http://freedesktop.org/Software/icon-theme/releases/hicolor-icon-theme-0.5.tar.gz -http://freedesktop.org/Software/shared-mime-info/shared-mime-info-0.14.tar.gz -http://freedesktop.org/~fontconfig/release/fontconfig-2.2.93.tar.gz -http://freedesktop.org/~fontconfig/release/xft-2.1.2.tar.gz -http://freedesktop.org/~xlibs/release/render-0.8.tar.gz -http://freedesktop.org/~xlibs/release/xrender-0.8.3.tar.gz -http://ftp.gnome.org/pub/GNOME/sources/gal/2.1/gal-2.1.7.tar.bz2 -http://ftp.gnome.org/pub/GNOME/sources/libcroco/0.5/libcroco-0.5.0.tar.bz2 -http://ftp.gnome.org/pub/GNOME/sources/libgsf/1.8/libgsf-1.8.2.tar.bz2 - -# everything else: -ftp://ftp.astron.com/pub/file/file-4.07.tar.gz -ftp://ftp.berlios.de/pub/cdrecord/cdrtools-2.00.3.tar.gz -ftp://ftp.bitwizard.nl/mtr/mtr-0.58.tar.gz -ftp://ftp.chiark.greenend.org.uk/users/ian/adns/adns-1.1.tar.gz -ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-4.5.tar.bz2 -ftp://ftp.figlet.org/pub/figlet/program/unix/figlet221.tar.gz -ftp://ftp.foolabs.com/pub/xpdf/t1lib-1.3.tar.gz -ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.00.tar.gz -ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.2.4.tar.bz2 -ftp://ftp.gw.com/mirrors/pub/unix/file/file-4.09.tar.gz -ftp://ftp.isc.org/isc/bind9/9.2.3/bind-9.2.3.tar.gz -ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.10.tar.bz2 -ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-1.7.tar.gz -ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz -ftp://ftp.vim.org/pub/vim/unix/vim-6.2.tar.bz2 -ftp://ftp.win.tue.nl/pub/linux-local/utils/kbd/kbd-1.12.tar.gz -ftp://oss.sgi.com/projects/fam/download/fam-2.6.10.tar.gz -http://alioth.debian.org/download.php/123/minicom-2.1.tar.gz -http://caml.inria.fr/distrib/ocaml-3.06/ocaml-3.06.tar.gz -http://curl.haxx.se/download/curl-7.11.1.tar.bz2 -http://developer.kde.org/~sewardj/valgrind-2.0.0.tar.bz2 -http://dl.maptools.org/dl/libtiff/tiff-v3.6.1.tar.gz -http://download.insecure.org/nmap/dist/nmap-3.50.tar.bz2 -http://download.ofb.net/gale/gale-0.99fruit.tar.bz2 -http://download.sourceforge.net/lame/lame-3.96.tar.gz -http://download.sourceforge.net/lesstif/lesstif-0.93.94.tar.bz2 -http://download.sourceforge.net/libmng/libmng-1.0.6.tar.gz -http://download.sourceforge.net/netpbm/netpbm-10.19.tgz -http://download.sourceforge.net/png-mng/libpng-1.2.5.tar.bz2 -http://download.sourceforge.net/romfs/genromfs-0.5.1.tar.gz -http://download.sourceforge.net/smartsuite/smartsuite-2.1.tar.gz -http://download.sourceforge.net/strace/strace-4.4.98.tar.bz2 -http://download.sourceforge.net/xine/xine-lib-1-rc3c.tar.gz -http://download.sourceforge.net/xine/xine-ui-0.99.1.tar.gz -http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.gz -http://ftp.gnu.org/gnu/automake/automake-1.8.2.tar.gz -http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz -http://ftp.gnu.org/gnu/bison/bison-1.875.tar.bz2 -http://ftp.gnu.org/gnu/cpio/cpio-2.5.tar.gz -http://ftp.gnu.org/gnu/ed/ed-0.2.tar.gz -http://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz -http://ftp.gnu.org/gnu/gmp/gmp-4.1.2.tar.bz2 -http://ftp.gnu.org/gnu/groff/groff-1.19.tar.gz -http://ftp.gnu.org/gnu/inetutils/inetutils-1.4.2.tar.gz -http://ftp.gnu.org/gnu/libtool/libtool-1.5.2.tar.gz -http://ftp.gnu.org/gnu/m4/m4-1.4.tar.gz -http://ftp.gnu.org/gnu/miscfiles/miscfiles-1.3.tar.gz -http://ftp.gnu.org/gnu/parted/parted-1.6.6.tar.gz -http://ftp.gnu.org/gnu/texinfo/texinfo-4.6.tar.gz -http://ftp.gnu.org/gnu/units/units-1.80.tar.gz -http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/0.8/firefox-source-0.8.tar.bz2 -http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.6/src/mozilla-source-1.6.tar.bz2 -http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-3.3.1.tar.bz2 -http://ftp.xfree86.org/pub/XFree86/4.4.0/source/doctools-1.3.2.tgz -http://kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.2.tar.bz2 -http://kernel.org/pub/linux/docs/manpages/man-pages-1.65.tar.bz2 -http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-2.08.tar.bz2 -http://kernel.org/pub/linux/utils/man/man-1.5m2.tar.bz2 -http://kernel.org/pub/software/utils/pciutils/pciutils-2.1.11.tar.bz2 -ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.1.4.tar.gz -http://mtools.linux.lu/mtools-3.9.9.tar.bz2 -http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-Parser-2.34.tar.gz -http://subversion.tigris.org/tarballs/subversion-1.0.1.tar.bz2 -http://tug.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/tetex-src-2.0.2.tar.gz -http://www.alsa-project.org/alsa/ftp/lib/alsa-lib-1.0.3a.tar.bz2 -http://www.alsa-project.org/alsa/ftp/tools/alsa-tools-1.0.3.tar.bz2 -http://www.alsa-project.org/alsa/ftp/utils/alsa-utils-1.0.3.tar.bz2 -http://www.apache.org/dist/httpd/httpd-2.0.50.tar.gz -http://www.cs.purdue.edu/homes/trinkle/RCS/rcs-5.7.tar.Z -http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.0.tar.gz -http://www.greenwoodsoftware.com/less/less-381.tar.gz -http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc6.2.tar.gz -http://www.libpng.org/pub/png/src/zlib-1.2.1.tar.gz -http://www.libsdl.org/release/SDL-1.2.7.tar.gz -http://www.openssl.org/source/openssl-0.9.7d.tar.gz -http://www.procmail.org/procmail-3.22.tar.gz -http://www.python.org/ftp/python/2.3.3/Python-2.3.3.tar.bz2 -http://www.sleepycat.com/update/snapshot/db-4.2.52.tar.gz -http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz -http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz -http://www.xiph.org/paranoia/download/cdparanoia-III-alpha9.8.src.tgz -http://www.xmms.org/files/1.2.x/xmms-1.2.10.tar.bz2 - -EOF - ---- FILE root/sbin/run --- -#!/bin/sh -e -t() { while [ -n "$1" ]; do task "$1" "$2" toast arm "$2"; shift 2; done; } -task init "$0" -task 2 network network -task 123 partition partition -task 1 swap swap -task 1 setup setup -task 89 bin utoastdeb -task 54 make utoast make 3.80 http://ftp.gnu.org/gnu/make/make-3.80.tar.bz2 -task 4 toast utoast toast 1.344 http://toastball.net/toast/toast-1.344.tar.gz -task 0 add add -t 88 gawk 267 coreutils 849 perl 755 gcc-core 537 binutils 5476 glibc -task 1200 rebuild toast rebuild make toast gawk coreutils perl -t 6076 gcc 175 bash 55 sed 54 grep 9 gzip 75 tar 67 wget -task 37 remove toast remove bin busybox gcc-core -t 66 diffutils 16 bzip2 70 util-linux 25 module-init-tools 322 ncurses 485 gettext 60 readline 37 procps 22 patch 25 findutils 16 sysvinit 8 sysklogd 1871 linux 22 device-mapper 84 lvm2 16 bin86 64 nasm 27 lilo 327 e2fsprogs 7 devfsd 6 genext2fs 18 toastinit 1 toastlogin 4 iana-etc 238 zsh 34 net-tools 20 dhcpcd -task 7 bootable bootable - -[ -n "$MINIMAL" ] && exit 0 - -t 17 zlib -task 500 openssl sh -c 'toast arm openssl && toast rebuild wget' -t 192 openssh 192 vim 131 inetutils 50 less 98 parted 221 groff 13 man 30 man-pages 93 texinfo 172 cpio 14 hdparm 21 m4 76 bison 389 flex 22 autoconf 19 automake 57 file 76 libtool 38 kbd 19 ed - -# [ -z "$EXTRAS" ] && exit 0 - -t 1004 tetex 571 python 407 db 54 gdbm 353 bind 19 autofs 182 curl 13 figlet 55 file 53 adns 76 gc 5 genromfs 327 gmp 490 httpd 15 ltrace 51 strace 61 minicom 23 bc 24 miscfiles 74 mtools 24 mtr 187 gnupg 0 mutt 207 nmap 180 ntp 423 ocaml 12 pciutils 0 postfix 38 procmail 127 proftpd 50 rcs 1000 samba 9 smartsuite 94 valgrind 98 zip 107 unzip 57 popt 44 pcre 835 subversion 235 cdrtools 38 libogg 128 libvorbis 163 lame 57 jpeg 57 libpng 64 tiff 327 netpbm -(export LDFLAGS=-ldl; t 152 gale) -# t 0 libmng 0 unison 0 syslinux 0 units 0 ghostscript 0 cvs - -# [ "$EXTRAS" = "X" ] || exit 0 - -t 5679 XFree86 102 doctools 410 fvwm 32 lua 140 ion 551 xscreensaver 35 xdaliclock 176 alsa-lib -# t 0 alsa-tools -t 36 alsa-utils 128 freetype 66 fam -# t 0 t1lib -t 134 xpdf 488 lesstif 334 sdl 1470 xine-lib 237 xine-ui 35 cdparanoia -t 99 pkgconfig 117 audiofile 437 libxml2 181 libxslt -t 0 gtk-doc 0 glib 0 libIDL 0 ORBit2 0 XML-Parser 0 intltool 0 libbonobo 0 fontconfig 0 render 0 xrender 0 xft 0 pango 0 atk 0 shared-mime-data -RUN_QUERY_LOADER_TEST=true t 0 gtk+ -t 0 mozilla 0 GConf 0 gnome-mime-data 0 gnome-vfs 0 esound 0 libgnome 0 libart 0 libglade 0 libgnomecanvas 0 libbonoboui 0 hicolor-icon-theme 0 gnome-icon-theme 0 gnome-keyring 0 libgnomeui 0 startup-notification 0 gtk-engines 0 gnome-themes 0 scrollkeeper 0 gnome-desktop 0 libwnck 0 gnome-panel 0 gnome-session 0 vte 0 gnome-terminal 0 libgtop 0 gail 0 gnome-applets 0 metacity 0 libgsf 0 libcroco 0 librsvg 0 eel 0 nautilus 0 control-center 0 libgtkhtml 0 yelp 0 bug-buddy 0 libgnomeprint 0 libgnomeprintui 0 gtksourceview 0 gedit 0 eog 0 ggv 0 file-roller 0 gconf-editor 0 gnome-utils 0 gal 0 gnome-system-monitor 0 gstreamer 0 gst-plugins 0 gnome-media 0 gnome-netstatus 0 gcalctool 0 gpdf 0 gucharmap 0 nautilus-cd-burner 0 zenity 0 gnome-speech 0 at-spi 0 gnome-mag 0 gnopernicus 0 gok 0 epiphany 0 gnomemeeting 0 gnome-games 0 gnome2-user-docs 0 dasher 0 gdm 0 libgail-gnome 0 libxklavier 0 nautilus-media -t 0 qt 0 arts 0 kdelibs 0 kdebase 0 kde-i18n 0 kdeaccessibility 0 kdeadmin 0 kdeartwork 0 kdebindings 0 kdeedu 0 kdegames 0 kdegraphics 0 kdemultimedia 0 kdenetwork 0 kdepim 0 kdesdk 0 kdetoys 0 kdeutils 0 kdevelop 0 quanta 0 kdeaddons -t 0 firefox 0 xmms 0 gimp 0 gkrellm - ---- FILE root/sbin/respin --- -#!/bin/sh -e -echo "This script destroys both the hard disk partition table and the floppy." -echo "Press any key to abort." -timeout 10 -wget -O /dev/fd0 http://toastball.net/toast-linux-tmp/floppy.img -dd if=/dev/zero of=/dev/hda bs=512 count=1 -sync -reboot -sleep 20 -echo b > /proc/sysrq-trigger --- FILE linux-config --- #