Author: smoe-guest Date: 2008-08-17 18:05:22 +0000 (Sun, 17 Aug 2008) New Revision: 2417
Added: trunk/community/infrastructure/livecd/hooks/ trunk/community/infrastructure/livecd/hooks/01_remove_gnustep.sh trunk/community/infrastructure/livecd/hooks/10_remove_considerably_exotic_tools.sh trunk/community/infrastructure/livecd/hooks/9999_apt-get_autoremove.sh Modified: trunk/community/infrastructure/livecd/debian-med.conf.template trunk/community/infrastructure/livecd/prepare_debian-med_usbstick.sh Log: Round of updates. Modified: trunk/community/infrastructure/livecd/debian-med.conf.template =================================================================== --- trunk/community/infrastructure/livecd/debian-med.conf.template 2008-08-17 14:46:47 UTC (rev 2416) +++ trunk/community/infrastructure/livecd/debian-med.conf.template 2008-08-17 18:05:22 UTC (rev 2417) @@ -10,7 +10,7 @@ # Specify additional servers to download packages from, comma-separated # if there are multiple ones -unofficialServers="http://pc02.inb.uni-luebeck.de:8080/~moeller/debian/unstable" +#unofficialServers="http://pc02.inb.uni-luebeck.de:8080/~moeller/debian/unstable" # What Debian distribution should be taken? #distribution="sarge" @@ -28,3 +28,6 @@ # what selection of extraneous packages should be considered? extraneous="tomcat5.5" + +# what set of scripts shall be executed after the preparation of the chroot? +hooks="01_remove_gnustep.sh 10_remove_considerably_exotic_tools.sh 9999_apt-get_autoremove.sh" Added: trunk/community/infrastructure/livecd/hooks/01_remove_gnustep.sh =================================================================== --- trunk/community/infrastructure/livecd/hooks/01_remove_gnustep.sh (rev 0) +++ trunk/community/infrastructure/livecd/hooks/01_remove_gnustep.sh 2008-08-17 18:05:22 UTC (rev 2417) @@ -0,0 +1,4 @@ +#!/bin/sh + +echo Executing hooks $0 +(echo Y; echo Y) | aptitude --full-resolver purge gnustep-base-runtime gnustep-common gnustep-gpbs gnustep-base-common adun.app Added: trunk/community/infrastructure/livecd/hooks/10_remove_considerably_exotic_tools.sh =================================================================== --- trunk/community/infrastructure/livecd/hooks/10_remove_considerably_exotic_tools.sh (rev 0) +++ trunk/community/infrastructure/livecd/hooks/10_remove_considerably_exotic_tools.sh 2008-08-17 18:05:22 UTC (rev 2417) @@ -0,0 +1,4 @@ +#!/bin/sh + +echo Executing hooks $0 +dpkg --purge garlic Added: trunk/community/infrastructure/livecd/hooks/9999_apt-get_autoremove.sh =================================================================== --- trunk/community/infrastructure/livecd/hooks/9999_apt-get_autoremove.sh (rev 0) +++ trunk/community/infrastructure/livecd/hooks/9999_apt-get_autoremove.sh 2008-08-17 18:05:22 UTC (rev 2417) @@ -0,0 +1,4 @@ +#!/bin/sh + +echo Executing hooks $0 +echo Y | apt-get autoremove Modified: trunk/community/infrastructure/livecd/prepare_debian-med_usbstick.sh =================================================================== --- trunk/community/infrastructure/livecd/prepare_debian-med_usbstick.sh 2008-08-17 14:46:47 UTC (rev 2416) +++ trunk/community/infrastructure/livecd/prepare_debian-med_usbstick.sh 2008-08-17 18:05:22 UTC (rev 2417) @@ -1,9 +1,16 @@ #!/bin/bash -d=`dirname $0` +# Copyright (C) Steffen Moeller <[EMAIL PROTECTED]> set -e +# To ensure that we all understand each other's error messages +# on the mailing lists +export LANG=C + +d=`dirname $0` + + if [ ! -r $d/debian-med.conf ]; then echo "Falling back to debian-med.conf.template" cp $d/debian-med.conf.template $d/debian-med.conf @@ -23,8 +30,9 @@ country=".$country" fi -command="lh_config --binary-images usb-hdd --packages-list kde-core " -command="$command --packages 'linux-image-686 initramfs-tools med-bio med-bio-dev $nonfree $experimental $extraneous'" +command="lh_config --binary-images usb-hdd" +#command="$command --sections main contrib non-free" +command="$command --packages-list kde-core " command="$command --mirror-bootstrap=http://ftp$country.debian.org/debian" if [ -z "$distribution" ]; then @@ -34,34 +42,79 @@ fi command="$command --losetup losetup.orig" -if [ -z "$architecture" ]; then - echo "architecture not explicitly set." -else - command="$command --architecture $architecture" +#if [ -z "$architecture" ]; then +# echo "architecture not explicitly set." +#else +# command="$command --architecture $architecture" +#fi + +if ! $command; then + echo "lh_config was not successful." + exit -1 fi -$command +if [ ! -d config/chroot_local-packageslists ]; then + echo "Could not configure the list of packages at 'config/chroot_local-packageslists'." + exit -1 +fi +echo "gnuplot med-bio med-bio-dev $nonfree $experimental $extraneous" | tr " " "\n" > config/chroot_local-packageslists/mypackages -if [ false -a -n "$unofficialServers" ]; then +if [ -n "$unofficialServers" ]; then rm -rf config/chroot_sources/sources.list.bootstrap rm -rf config/chroot_sources/sources.list.binary - for server in `echo $unofficialServers|tr "," "\n"`; do + for server in `echo $unofficialServers|tr "," "\n"` + do l="deb $server ./" - echo $l >> config/chroot_sources/sources.list.bootstrap - echo $l >> config/chroot_sources/sources.list.binary + #echo $l >> config/chroot_sources/sources.list.bootstrap + #echo $l >> config/chroot_sources/sources.list.binary done fi -lh_build && echo lh_build completed successfully \ - || (echo lh_build did not complete nicely; exit -1) -lh_binary && echo lh_binary completed successfully \ - || ( -cat <<EOINFO -lh_binary did not complete nicely. Please check: + +# Putting shell scripts at the right position to further amend the setup + +if [ -z "$hooks" ]; then + echo "No hooks defined, skipping." +else + if [ ! -d "$d/hooks" ]; then + echo "Could not find directiory '$d/hooks'." + exit -1 + fi + + dd="$d/config/chroot_local-hooks" + if [ ! -d "$dd" ]; then + echo "Could not find destination directory for hooks that is expected at '$dd'." + exit -1 + fi + + for h in `echo $hooks| tr " " "\n"`; do + if [ ! -r "$d/hooks/$h" ]; then + echo "Hook '$h' not found in '$d/hooks'." + exit -1 + fi + cp $d/hooks/$h $dd + done +fi + + +# Continuation of the build process + +if lh_build; then + echo lh_build completed successfully +else + echo lh_build did not complete nicely + exit -1 +fi + +if lh_binary; then + echo lh_binary completed successfully +else + cat <<EOINFO +lh_binary did not complete nicely. If the error message is not sufficiently informative, then please check: * loop-aes-modules-2.6-amd64 is installed and functional with your current kernel. Do a 'lh_clean --binary' and run `basename $0|tr -d '\n'` again. EOINFO - exit -1 -) + exit -1 +fi _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/debian-med-commit
