From: <ale...@us...> - 2004-01-04 23:51:55
|
Update of /cvsroot/morphix/morph-scripts In directory sc8-pr-cvs1:/tmp/cvs-serv18003 Modified Files: baselist debwrap Log Message: working further on autobuilding of basemodules Index: baselist =================================================================== RCS file: /cvsroot/morphix/morph-scripts/baselist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** baselist 7 Dec 2003 23:17:22 -0000 1.1 --- baselist 4 Jan 2004 23:51:51 -0000 1.2 *************** *** 3,80 **** # deb http://developer.linuxtag.net/knoppix ./ # ! hwdata-knoppix ! hwsetup ! kudzu-knoppix ! kdbconfig ! REMOVE exim4 ! REMOVE exim4-base ! REMOVE at ! REMOVE mailx ! REMOVE logrotate ! REMOVE cron ! REMOVE ipchains ! REMOVE iptables ! REMOVE cpio ! REMOVE groff-base ! REMOVE klogd ! REMOVE sysklogd ! REMOVE lilo ! REMOVE syslinux ! REMOVE vim ! REMOVE libident ! REMOVE gcc-3.2-base ! REMOVE tasksel ! REMOVE ppp ! REMOVE pppoeconf ! REMOVE pppoe ! REMOVE pppconfig ! REMOVE fdutils ! REMOVE apt-utils ! REMOVE netkit-inetd ! REMOVE netbase ! REMOVE info ! REMOVE manpages ! REMOVE ed ! REMOVE nvi ! REMOVE libgnutls7 ! REMOVE liblockfile1 ! REMOVE whiptail ! REMOVE gettext-base ! REMOVE tcpd ! REMOVE libwrap0 ! REMOVE ncurses-base ! REMOVE ncurses-bin ! REMOVE libwrap0 ! REMOVE libgdbm3 ! REMOVE slang1 ! REMOVE libgpmg1 ! REMOVE liblzo1 ! REMOVE libpcap0.7 ! REMOVE libopencdk8 ! REMOVE libpcre3 ! REMOVE libtasn1-0 ! REMOVE libtextwrap1 ! REMOVE libdb2 ! REMOVE diff # can't apt-get anything without apt, PONR! ! REMOVE apt ! EXEC mknod dev/cloop b 240 0 ! EXEC mknod dev/cloop1 b 240 1 ! EXEC mknod dev/nvidia0 c 195 0 ! EXEC mknod dev/nvidia1 c 195 1 ! EXEC mknod dev/nvidia2 c 195 2 ! EXEC mknod dev/nvidia3 c 195 3 ! EXEC mknod dev/nvidia4 c 195 4 ! EXEC mknod dev/nvidia5 c 195 5 ! EXEC mknod dev/nvidia6 c 195 6 ! EXEC mknod dev/nvidia7 c 195 7 ! EXEC mknod dev/nvidiactl c 195 255 ! EXEC rm -r usr/share/doc ! EXEC rm -r usr/share/locale ! EXEC rm -r usr/share/zoneinfo ! EXEC rm -r usr/share/unidata ! EXEC rm -r usr/share/man ! EXEC rm -r var/lib/apt ! EXEC rm var/lib/dpkg/available-old ! EXEC rm var/lib/dpkg/status-old ! EXEC rm -r var/cache/* \ No newline at end of file --- 3,93 ---- # deb http://developer.linuxtag.net/knoppix ./ # ! apt-get update ! apt-get -f install ! apt-get --yes install hwdata-knoppix ! apt-get --yes hwsetup ! apt-get --yes kudzu-knoppix ! apt-get --yes kdbconfig ! apt-get --yes --purge remove exim4 ! apt-get --yes --purge remove exim4-base ! apt-get --yes --purge remove at ! apt-get --yes --purge remove mailx ! apt-get --yes --purge remove logrotate ! apt-get --yes --purge remove cron ! apt-get --yes --purge remove ipchains ! apt-get --yes --purge remove iptables ! apt-get --yes --purge remove cpio ! apt-get --yes --purge remove groff-base ! apt-get --yes --purge remove klogd ! apt-get --yes --purge remove sysklogd ! apt-get --yes --purge remove lilo ! apt-get --yes --purge remove syslinux ! apt-get --yes --purge remove vim ! apt-get --yes --purge remove libident ! apt-get --yes --purge remove gcc-3.2-base ! apt-get --yes --purge remove tasksel ! apt-get --yes --purge remove ppp ! apt-get --yes --purge remove pppoeconf ! apt-get --yes --purge remove pppoe ! apt-get --yes --purge remove pppconfig ! apt-get --yes --purge remove fdutils ! apt-get --yes --purge remove apt-utils ! apt-get --yes --purge remove netkit-inetd ! apt-get --yes --purge remove netbase ! apt-get --yes --purge remove info ! apt-get --yes --purge remove manpages ! apt-get --yes --purge remove ed ! apt-get --yes --purge remove nvi ! apt-get --yes --purge remove libgnutls7 ! apt-get --yes --purge remove liblockfile1 ! apt-get --yes --purge remove whiptail ! apt-get --yes --purge remove gettext-base ! apt-get --yes --purge remove tcpd ! apt-get --yes --purge remove libwrap0 ! apt-get --yes --purge remove ncurses-base ! apt-get --yes --purge remove ncurses-bin ! apt-get --yes --purge remove libwrap0 ! apt-get --yes --purge remove libgdbm3 ! apt-get --yes --purge remove slang1 ! apt-get --yes --purge remove libgpmg1 ! apt-get --yes --purge remove liblzo1 ! apt-get --yes --purge remove libpcap0.7 ! apt-get --yes --purge remove libopencdk8 ! apt-get --yes --purge remove libpcre3 ! apt-get --yes --purge remove libtasn1-0 ! apt-get --yes --purge remove libtextwrap1 ! apt-get --yes --purge remove libdb2 ! apt-get --yes --purge remove diff ! apt-get clean # can't apt-get anything without apt, PONR! ! # apt-get --yes --purge remove apt ! # making nvidia and cloop devicenodes ! mknod dev/cloop b 240 0 ! mknod dev/cloop1 b 240 1 ! mknod dev/nvidia0 c 195 0 ! mknod dev/nvidia1 c 195 1 ! mknod dev/nvidia2 c 195 2 ! mknod dev/nvidia3 c 195 3 ! mknod dev/nvidia4 c 195 4 ! mknod dev/nvidia5 c 195 5 ! mknod dev/nvidia6 c 195 6 ! mknod dev/nvidia7 c 195 7 ! mknod dev/nvidiactl c 195 255 ! # libGL patch ! mkdir usr/lib/backup ! mv usr/lib/libGL.* usr/lib/backup ! mkdir usr/X11R6/lib/backup ! mv usr/X11R6/lib/libGL.* usr/X11R6/lib/backup/ ! mkdir usr/X11R6/lib/modules/extensions/backup ! mv usr/X11R6/lib/modules/extensions/libGLcore.a usr/X11R6/lib/modules/extensions/backup/ ! mv usr/X11R6/lib/modules/extensions/libglx.a usr/X11R6/lib/modules/extensions/backup/ ! # removing redundant files for basemodule ! rm -r usr/share/doc ! rm -r usr/share/locale ! rm -r usr/share/zoneinfo ! rm -r usr/share/unidata ! rm -r usr/share/man ! rm -r var/lib/apt ! rm var/lib/dpkg/available-old ! rm var/lib/dpkg/status-old ! rm -r var/cache/* \ No newline at end of file Index: debwrap =================================================================== RCS file: /cvsroot/morphix/morph-scripts/debwrap,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debwrap 7 Dec 2003 23:17:22 -0000 1.2 --- debwrap 4 Jan 2004 23:51:52 -0000 1.3 *************** *** 13,31 **** echo "Usage:" echo ! echo "debwrap -d /file/newdir [SUITE [ MIRROR] ]" ! echo " - debootstrap new directory, apply changes for mainmodule, don't build one" ! echo "debwrap -c /file/newdir MainModule-fubar.mod [SUITE [ MIRROR] ]" ! echo " - same as '-d', but also create a mainmodule from the directory" echo ! echo "debwrap -dl /file/newdir /file/packagelist [SUITE [ MIRROR] ]" ! echo " - same as '-d', but apt-get every file in the package list" echo " (newline seperated list of debian packages)" ! echo "debwrap -cl /file/packagelist /file/newdir MainModule-fubar.mod [SUITE [ MIRROR] ]" ! echo " - '-dl' and '-c' combined, you get the drill" echo ! echo "debwrap -dls /file/newdir /file/packagelist [SUITE [ MIRROR] ]" ! echo " - same as '-dl', but also copies your /etc/apt/sources.list over" ! echo "debwrap -cls /file/packagelist /file/newdir MainModule-fubar.mod [SUITE [ MIRROR] ]" ! echo " - guess :)" } --- 13,30 ---- echo "Usage:" echo ! echo "debwrap -d DIRECTORY [SUITE [ MIRROR] ]" ! echo " debootstrap new directory, apply changes for mainmodule, don't build one" ! echo "debwrap -c DIRECTORY MODULE [SUITE [ MIRROR] ]" ! echo " same as '-d', but also create a mainmodule from the directory" echo ! echo "debwrap -dl DIRECTORY PACKAGELIST [SUITE [ MIRROR] ]" ! echo " same as '-d', but apt-get every file in the package list using the hosts /etc/apt/sources.list" echo " (newline seperated list of debian packages)" ! echo "debwrap -cl DIRECTORY PACKAGELIST MODULE [SUITE [ MIRROR] ]" ! echo " '-dl' and '-c' combined, you get the drill" echo ! echo "debwrap -de DIRECTORY SHELLSCRIPT [SUITE [ MIRROR] ]" ! echo " same as '-dl', but instead executes the shellscript in the new filesystem" ! echo "debwrap -ce DIRECTORY SHELLSCRIPT MODULE [SUITE [ MIRROR] ]" } *************** *** 42,48 **** $1 != "-dl" && $1 != "-cl" && ! $1 != "-dls" && ! $1 != "-cls" && ! $1 != "-apt-get-list" ]] then --- 41,48 ---- $1 != "-dl" && $1 != "-cl" && ! $1 != "-de" && ! $1 != "-ce" && ! $1 != "-apt-get-list" && ! $1 != "-exe-shellscript" ]] then *************** *** 52,55 **** --- 52,63 ---- MYNAME=$0 + run_chrooted_exe() { + cp $MYNAME $1/debwrap + cp $2 $1/exescript + chroot $1/ sh ./debwrap -exe-shellscript ./exescript + rm $1/exescript + rm $1/debwrap + } + run_chrooted_apt() { cp $MYNAME $1/debwrap *************** *** 105,120 **** } - libX_patch() { - mkdir usr/lib/backup - mv usr/lib/libGL.* usr/lib/backup - - mkdir usr/X11R6/lib/backup - mv usr/X11R6/lib/libGL.* usr/X11R6/lib/backup/ - - mkdir usr/X11R6/lib/modules/extensions/backup - mv usr/X11R6/lib/modules/extensions/libGLcore.a usr/X11R6/lib/modules/extensions/backup/ - mv usr/X11R6/lib/modules/extensions/libglx.a usr/X11R6/lib/modules/extensions/backup/ - } - add_sources() { cp /etc/apt/sources.list $1/etc/apt/sources.list --- 113,116 ---- *************** *** 134,137 **** --- 130,138 ---- # flag file-list # we could use some kind of xml file to add/remove packages... + if [[ $1 == "-exe-shellscript" && $2 != "" ]] + then + sh $2 + fi + if [[ $1 == "-apt-get-list" && $2 != "" ]] then *************** *** 142,154 **** then echo - elif [[ $line == EXEC* ]] - then - line=${line:4} - `$line` - elif [[ $line == REMOVE* ]] - then - line=${line:6} - apt-get --yes remove $line - dpkg --force-all --purge $line else apt-get --yes install $line --- 143,146 ---- *************** *** 156,162 **** done < $2 apt-get clean - libX_patch fi # flag directory modulename.mod [suite [ mirror ]] if [[ $1 == "-c" && $2 != "" && $3 != "" ]] --- 148,155 ---- done < $2 apt-get clean fi + # should use the normal means of taking arguments here... + # flag directory modulename.mod [suite [ mirror ]] if [[ $1 == "-c" && $2 != "" && $3 != "" ]] *************** *** 170,173 **** --- 163,167 ---- then do_debootstrap $2 $4 $5 + add_sources $2 run_chrooted_apt $2 $3 fi *************** *** 177,198 **** then do_debootstrap $2 $5 $6 run_chrooted_apt $2 $3 build_module $2 $4 fi ! # flag directory packagelist [suite [ mirror ]] ! if [[ $1 == "-dls" && $2 != "" && $3 != "" ]] then do_debootstrap $2 $4 $5 add_sources $2 ! run_chrooted_apt $2 $3 fi ! # flag directory packagelist modulename.mod [suite [ mirror ]] ! if [[ $1 == "-cls" && $2 != "" && $3 != "" && $4 != "" ]] then do_debootstrap $2 $5 $6 add_sources $2 ! run_chrooted_apt $2 $3 build_module $2 $4 fi --- 171,193 ---- then do_debootstrap $2 $5 $6 + add_sources $2 run_chrooted_apt $2 $3 build_module $2 $4 fi ! # flag directory script [suite [ mirror ]] ! if [[ $1 == "-de" && $2 != "" && $3 != "" ]] then do_debootstrap $2 $4 $5 add_sources $2 ! run_chrooted_exe $2 $3 fi ! # flag directory script modulename.mod [suite [ mirror ]] ! if [[ $1 == "-ce" && $2 != "" && $3 != "" && $4 != "" ]] then do_debootstrap $2 $5 $6 add_sources $2 ! run_chrooted_exe $2 $3 build_module $2 $4 fi |