From: Heiko Z. <smi...@us...> - 2004-09-04 15:00:56
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18302/scripts Modified Files: Tag: rel-1-2-patches functions grsecurity linux patch-o-matic squid Log Message: - updated rsync to v2.6.2 - updated openldap to v2.2.15 - replace patch-o-matic with patch-o-matic-ng 20040823 - updated iptables to v1.2.11 - added missing squid configuration files - removed support for updating the Philips Webcam driver (development is now discontinued) - updated RFC2385 patch to correctly apply under kernel 2.4.27 - updated ebtables patch to v7 - updated gradm to v2.0.1 - updated grsecurity-2.0.1 to v2.4.27 - updated linux to v2.4.27 Index: patch-o-matic =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/patch-o-matic,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -u -d -r1.22 -r1.22.2.1 --- patch-o-matic 12 Apr 2004 21:27:15 -0000 1.22 +++ patch-o-matic 4 Sep 2004 15:00:16 -0000 1.22.2.1 @@ -28,94 +28,66 @@ echo "no extra patches" > $WORKDIR/netfilter.patches.lst if [ "$CONFIG_NF_PATCHES" = "y" ]; then export KERNEL_DIR=$KERNELDIR - NETFILTERDIR=$(find_src_dir iptables) - export NETFILTERDIR - - PATCHES=""; - EXCLUDE_PATCHES=""; - - # patchs to exclude, eg. because of creating troubles - # (none at the moment) - # eg. EXCLUDE_PATCHES="${EXCLUDE_PATCHES} dir/patchname.patch" - - [ "$CONFIG_NF_SUBMITTED" = "y" ] && \ - PATCHES="$PATCHES submitted" - - [ "$CONFIG_NF_PENDING" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && \ - PATCHES="$PATCHES pending" - - [ "$CONFIG_NF_OPTIMIZATION" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES optimizations" - - [ "$CONFIG_NF_BASE" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-base)" + IPTABLES_DIR=$(find_src_dir iptables) + export IPTABLES_DIR - [ "$CONFIG_NF_EXTRA" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-extra)" + # update the patch-o-matic.exclude file to make sure we have everything listed in there + for PDIR in $(ls -d -1 *); do + if [ -d "$PDIR" ]; then + SUITE=$(grep "Repository:" $PDIR/info 2> /dev/null ) + # remove whitespaces + SUITE=$(echo ${SUITE##*:} | tr -d "\t ") + if [ -n "$SUITE" ]; then + if [ -z "$(grep $SUITE/$PDIR\$ $MYDIR/config/patch-o-matic.exclude)" ]; then + echo "$SUITE/$PDIR" >> $MYDIR/config/patch-o-matic.exclude + fi + fi + fi + done # reformat to fit as commandline option to runme - EXCLUDE=""; for P in $EXCLUDE_PATCHES; do - EXCLUDE="$EXCLUDE --exclude $P"; done - - ## create a temp file were we store the output of patch-o-matic - ## [we do not have mktemp, so do it the simple unsecure way] - #TMPFILE=$(mktemp -q /tmp/${0##*/}.XXXXXX) - #if [ $? -ne 0 ]; then - # echo "$0: Can't create temp file, exiting..." - # exit 1 - #fi - TMPFILE=/tmp/${0##*/}.$$ - - # now apply all patches at once and take care - # to exclude troublesome patches - ./runme --batch $EXCLUDE $PATCHES >$TMPFILE 2>&1 + EXCLUDE="" + for P in $(grep -v "^#" $MYDIR/config/patch-o-matic.exclude ); do + #EXCLUDE="$EXCLUDE --exclude $P" + EXCLUDE="$EXCLUDE --exclude ${P##*/}" + done + + [ "$CONFIG_NF_UPDATES" = "y" ] && \ + yes "" | ./runme --batch updates - if ! grep -q "Kernel is now ready for compilation." $TMPFILE; then - echo "Patch-O-Matic failed applying the patches." 1>&2 - echo "See $TMPFILE for details" 1>&2 - exit 1 - fi + [ "$CONFIG_NF_PENDING" = "y" ] && \ + yes "" | ./runme --batch pending $EXCLUDE - cat $TMPFILE; rm -f $TMPFILE + [ "$CONFIG_NF_BASE" = "y" ] && \ + yes "" | ./runme --batch base $EXCLUDE - for CFG in $( grep tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - for CFG in $( grep tristate $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done + [ "$CONFIG_NF_EXTRA" = "y" ] && \ + yes "" | ./runme --batch extra $EXCLUDE + set_all_kernel_options net/ipv4/netfilter + set_all_kernel_options net/ipv6/netfilter + # settings didn't get applied, so let's do it here - set_kernel_option CONFIG_IP_NF_RAW m - set_kernel_option CONFIG_IP_NF_SET_MAX 256 + #set_kernel_option CONFIG_IP_NF_RAW m + #set_kernel_option CONFIG_IP_NF_SET_MAX 256 - echo "**** IPv4 ****" > $WORKDIR/netfilter.patches.lst - grep tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 2 >> $WORKDIR/netfilter.patches.lst pushd $KERNEL_DIR > /dev/null - echo "" >> $WORKDIR/netfilter.patches.lst - echo "**** IPv6 ****" >> $WORKDIR/netfilter.patches.lst - grep tristate $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 2 >> $WORKDIR/netfilter.patches.lst make oldconfig || exit 1 popd > /dev/null fi - cp $WORKDIR/netfilter.patches.lst $DL_DIR/docs ;; install ) - mkdir -p $DOCDIR/netfilter-patch-o-matic || exit 1 - for CFG in $(grep dep_tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2) - do - FILES=$(grep -rl $CFG * | grep patch.configure.help | sed -e s/patch.configure.help/patch.help/) - copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 - FILES=$(grep -rl $CFG * | grep patch.configure.help) - copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 - done + if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then + mkdir -p $DOCDIR/netfilter-patch-o-matic || exit 1 + for CFG in $(grep dep_tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2) + do + FILES=$(grep -rl $CFG * | grep patch.configure.help | sed -e s/patch.configure.help/patch.help/) + copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 + FILES=$(grep -rl $CFG * | grep patch.configure.help) + copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 + done + fi ;; * ) Index: squid =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/squid,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -u -d -r1.17.2.1 -r1.17.2.2 --- squid 11 Jun 2004 14:03:33 -0000 1.17.2.1 +++ squid 4 Sep 2004 15:00:16 -0000 1.17.2.2 @@ -60,7 +60,8 @@ mkdir -p $WORKDIR/tmp || exit 1 make install DESTDIR=$WORKDIR/tmp || exit 1 copy_docs $WORKDIR/tmp - cp $WORKDIR/tmp/etc/squid.conf $ETCDIR/etc/ || exit 1 + rm $WORKDIR/tmp/etc/*.default || exit 1 + cp $WORKDIR/tmp/etc/* $ETCDIR/etc/ || exit 1 rm -rf $WORKDIR/tmp/etc || exit 1 cp -dpR $WORKDIR/tmp/* $CDDIR/ || exit 1 rm -rf $WORKDIR/tmp || exit 1 Index: grsecurity =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/grsecurity,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -u -d -r1.20 -r1.20.2.1 --- grsecurity 23 Apr 2004 15:53:13 -0000 1.20 +++ grsecurity 4 Sep 2004 15:00:16 -0000 1.20.2.1 @@ -58,7 +58,7 @@ cd $GRADMDIR || exit 1 cp -dp $GRADMDIR/gradm $CDDIR/sbin || exit 1 mkdir -p $ETCDIR/etc/grsec || exit 1 - cp -dp acl $ETCDIR/etc/grsec/ || exit + cp -dp policy $ETCDIR/etc/grsec/ || exit mkdir -p $DOCDIR/grsecurity/ || exit 1 cp -dp $MYDIR/scripts/grsecurity $ETCDIR/etc/init.d || exit 1 Index: functions =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/functions,v retrieving revision 1.53 retrieving revision 1.53.2.1 diff -u -d -r1.53 -r1.53.2.1 --- functions 16 Mar 2004 15:29:13 -0000 1.53 +++ functions 4 Sep 2004 15:00:15 -0000 1.53.2.1 @@ -458,3 +458,42 @@ } +# go through all kernel config files in the specified directory (relative to the kernel path) and all subdirectories +# will set all 'tristate' to 'm' and all 'bool' to 'yes' +function set_all_kernel_options () { + if [ -d $KERNELDIR/$1 ]; then + if [ "$CONFIG_LINUX_VERSION" = "2.6" ]; then + for FILE in $( find $KERNELDIR/$1 -name Kconfig ); do + # anybody who know awk could probably shorten the next line quite a bit.... + # don't remove the 'sort' command, we use it to add a necessary newline before 'column' + for CFG in $( grep -s -v "^#" $FILE | grep ^config -A 1 | sed -e s/config/""/g | tr -d "\n" | sed -e s/--/"\n"/g | sort | column -t 2> /dev/null | fmt -u -s -w 9999 | cut -f -2 -d " " | sed -e s/" "/#/g ); do + CFGOPTION="CONFIG_"${CFG%%#*} + case ${CFG##*#} in + tristate) set_kernel_option $CFGOPTION m + ;; + bool) set_kernel_option $CFGOPTION y + ;; + *) + echo "ignoring unkown config type '${CFG##*#}' for '$CFGOPTION'" + #exit 1 + ;; + esac + done + done + fi + + if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then + for FILE in $( find $KERNELDIR/$1 -name Config.in ); do + for CFG in $( grep -s tristate $FILE | cut -d "'" -f 3 | cut -d " " -f 2 ); do + set_kernel_option $CFG m + done + for CFG in $( grep -s bool $FILE | cut -d "'" -f 3 | cut -d " " -f 2 ); do + set_kernel_option $CFG y + done + for CFG in $( grep -s "^ *int " $FILE | cut -d "'" -f 3 | cut -d " " -f 2,3 | sed 's/ /#/' ); do + set_kernel_option ${CFG%%#*} ${CFG##*#} + done + done + fi + fi +} Index: linux =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/linux,v retrieving revision 1.54 retrieving revision 1.54.2.1 diff -u -d -r1.54 -r1.54.2.1 --- linux 22 Mar 2004 02:23:18 -0000 1.54 +++ linux 4 Sep 2004 15:00:16 -0000 1.54.2.1 @@ -37,10 +37,6 @@ cat .config.add >> .config || exit 1 fi - if [ "$CONFIG_LINUX_UPDATE_PWC" = "y" ]; then - cp -vdpfR ../pwc-*/2.4.*/* drivers/usb/ || exit 1 - fi - make oldconfig make dep || exit 1 make $PMAKE bzImage || exit 1 |