All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Josefsson <gandalf@wlug.westbo.se>
To: Netfilter-devel <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@gnumonks.org>
Subject: [PATCH] runme patch for 2.5
Date: 10 Oct 2002 16:33:15 +0200	[thread overview]
Message-ID: <1034260395.25142.13.camel@tux> (raw)

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi there,

Here's a small patch that will make patch-o-matic work with kernel 2.5
There's been some configurationchanges (Documentation/Configure.help
doesn't exist anymore)

This patch will make 'runme' incompatible with kernel 2.4 so use it only
with 2.5 kernels.

-- 
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.

[-- Attachment #2: runme-2.5-patch --]
[-- Type: text/plain, Size: 5021 bytes --]

--- patch-o-matic/runme-2.4	2002-10-05 03:14:47.000000000 +0200
+++ patch-o-matic/runme	2002-10-05 02:22:38.000000000 +0200
@@ -52,7 +52,7 @@
 	dd if=/dev/urandom bs=32 count=1 2>/dev/null | od -x -w32 -A n | tr -d ' '
 }
 
-# Too many rejects from trying to patch Configure.help and Config.in.
+# Too many rejects from trying to patch Config.help and Config.in.
 # So we use special format: First line specifies entry we want to
 # follow, and rest of file is pasted in under that.
 
@@ -123,10 +123,10 @@
 apply_config_help_change()
 {
     PRIOR="`head -1 $1`"
-    LINE=`fgrep -x -n "$PRIOR" $2/Configure.help | cut -d: -f1 | head -1`
+    LINE=`fgrep -x -n "$PRIOR" $2/Config.help | cut -d: -f1 | head -1`
     if [ -z "$LINE" ] || [ "$LINE" -eq 0 ]
     then
-	echo Could not find place to slot in Configure.help entry >&2
+	echo Could not find place to slot in Config.help entry >&2
 	return 1
     fi
 
@@ -135,13 +135,13 @@
         # Reverse "patch"
 
         NUMLINES1=`sed -n \$= $1`
-        NUMLINES2=`sed -n \$= $2/Configure.help`
+        NUMLINES2=`sed -n \$= $2/Config.help`
         BEGIN=2
 
-        LINES=`fgrep -nx "\`sed -n 2p $1\`" $2/Configure.help | cut -d: -f1`
+        LINES=`fgrep -nx "\`sed -n 2p $1\`" $2/Config.help | cut -d: -f1`
         if [ -z "$LINES" ]
         then
-	    echo Configure.help text not found >&2
+	    echo Config.help text not found >&2
             return 1
         fi
 
@@ -152,7 +152,7 @@
             TESTLINE=$BEGIN
             # Be paranoid and check for match on all lines
             while `let "$TESTLINE <= $NUMLINES1"`; do
-                NOMATCH=`awk "NR==$x + $TESTLINE - $BEGIN" $2/Configure.help|\
+                NOMATCH=`awk "NR==$x + $TESTLINE - $BEGIN" $2/Config.help|\
                         fgrep -xcv "\`sed -n -e ${TESTLINE}p $1\`"`;
 
                 if [ $NOMATCH -ne 0 ]; then continue 2; fi
@@ -165,42 +165,42 @@
         done; # for
 
         if [ ! "$MATCHES" ]; then
-            echo Configure.help text not found >&2
+            echo Config.help text not found >&2
             return 1
         fi;
 
         for x in $MATCHES; do
-#            if (head -`expr $x - 1` $2/Configure.help && \
-#                tail -n +`expr $x + $NUMLINES1` $2/Configure.help) > $2/Configure.help.tmp
-	    if (awk "NR==1,NR==$x - 1" $2/Configure.help && \
-                awk "NR==$x + $NUMLINES1,NR=0" $2/Configure.help) > $2/Configure.help.tmp
+#            if (head -`expr $x - 1` $2/Config.help && \
+#                tail -n +`expr $x + $NUMLINES1` $2/Config.help) > $2/Config.help.tmp
+	    if (awk "NR==1,NR==$x - 1" $2/Config.help && \
+                awk "NR==$x + $NUMLINES1,NR=0" $2/Config.help) > $2/Config.help.tmp
             then
-                mv $2/Configure.help.tmp $2/Configure.help
+                mv $2/Config.help.tmp $2/Config.help
             else
-                echo Could not update Configure.help >&2
-                rm -f $2/Configure.help.tmp
+                echo Could not update Config.help >&2
+                rm -f $2/Config.help.tmp
                 return 1
             fi
         done
-        echo "   Configure.help updated"
+        echo "   Config.help updated"
         return 0
     fi
 
     #Apply "Patch"
 
-    rm -f $2/Configure.help.tmp
+    rm -f $2/Config.help.tmp
     # Use awk to force newline if last line of $1 has only spaces
     # Necessary to properly remove inserted text if patch is reversed
-    if (awk "NR==1,NR==$LINE-2" $2/Configure.help && awk "NR==2,NR==0" $1 && echo && \
-        awk "NR==$LINE-1,NR==0" $2/Configure.help) > $2/Configure.help.tmp
+    if (awk "NR==1,NR==$LINE-2" $2/Config.help && awk "NR==2,NR==0" $1 && echo && \
+        awk "NR==$LINE-1,NR==0" $2/Config.help) > $2/Config.help.tmp
     then
-	mv $2/Configure.help.tmp $2/Configure.help
+	mv $2/Config.help.tmp $2/Config.help
     else
-	echo Could not slot in Configure.help entry >&2
-	rm -f $2/Configure.help.tmp
+	echo Could not slot in Config.help entry >&2
+	rm -f $2/Config.help.tmp
 	return 1
     fi
-    echo "   Placed new Configure.help entry"
+    echo "   Placed new Config.help entry"
     return 0
 }
 
@@ -336,7 +336,7 @@
     echo Testing patch $1...
 
     if apply_config_in_changes $1 $KTMPDIR/net/$2/netfilter &&
-	apply_config_help_changes $1 $KTMPDIR/Documentation &&
+	apply_config_help_changes $1 $KTMPDIR/net/$2/netfilter &&
 	apply_makefile_changes $1 $KTMPDIR/net/$2/netfilter &&
 	apply_conntrack_h_changes $1 $KTMPDIR/include/linux/netfilter_$2
     then :
@@ -461,7 +461,7 @@
         fi
     fi
     apply_config_in_changes $1 $KERNEL_DIR/net/$2/netfilter/
-    apply_config_help_changes $1 $KERNEL_DIR/Documentation/
+    apply_config_help_changes $1 $KERNEL_DIR/net/$2/netfilter/
     apply_makefile_changes $1 $KERNEL_DIR/net/$2/netfilter/
     apply_conntrack_h_changes $1 $KERNEL_DIR/include/linux/netfilter_$2
 }

             reply	other threads:[~2002-10-10 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 14:33 Martin Josefsson [this message]
2002-10-10 14:49 ` http://www.freeprotocols.org Jim Fleming
2002-10-13 21:15 ` [PATCH] runme patch for 2.5 William Stearns
2002-10-14 13:30   ` Martin Josefsson
2002-10-29 16:37   ` William Stearns
2002-11-12 19:50     ` Martin Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1034260395.25142.13.camel@tux \
    --to=gandalf@wlug.westbo.se \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.