All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runme patch for 2.5
@ 2002-10-10 14:33 Martin Josefsson
  2002-10-10 14:49 ` http://www.freeprotocols.org Jim Fleming
  2002-10-13 21:15 ` [PATCH] runme patch for 2.5 William Stearns
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Josefsson @ 2002-10-10 14:33 UTC (permalink / raw)
  To: Netfilter-devel; +Cc: Harald Welte

[-- 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
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* http://www.freeprotocols.org
  2002-10-10 14:33 [PATCH] runme patch for 2.5 Martin Josefsson
@ 2002-10-10 14:49 ` Jim Fleming
  2002-10-13 21:15 ` [PATCH] runme patch for 2.5 William Stearns
  1 sibling, 0 replies; 6+ messages in thread
From: Jim Fleming @ 2002-10-10 14:49 UTC (permalink / raw)
  To: Netfilter-devel

http://www1.ietf.org/mail-archive/ietf/Current/msg17839.html
From: "Bill Cunningham" <billcu@citynet.net>
Linus,
    "...I curious as to whether or not you're a member of the IETF..."
===================================

Linux has code in the kernel to block easy access to all values in the TOS field.
It can be easily changed, but one has to wonder why it is there.

As for...
http://www.freeprotocols.org
in the words of Larry Wall (Perl)...
"Sometimes it is important to own something, in order to have the rights to freely give it away."

http://interviews.slashdot.org/article.pl?sid=02/10/09/
"I suppose I wish I had decided on a larger address space than 32 bits! "


Jim Fleming
2002:[IPv4]:000X:03DB:...IPv8 is closer than you think...IPv16 is even closer...
http://www.ietf.com
http://www.iana.org/assignments/ipv4-address-space
http://www.ntia.doc.gov/ntiahome/domainname/130dftmail/unir.txt
http://ipv8.dyndns.tv
http://ipv8.dyns.cx
http://ipv8.no-ip.com
http://ipv8.no-ip.biz
http://ipv8.no-ip.info
http://ipv8.myip.us
http://ipv8.dyn.ee
http://ipv8.community.net.au

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] runme patch for 2.5
  2002-10-10 14:33 [PATCH] runme patch for 2.5 Martin Josefsson
  2002-10-10 14:49 ` http://www.freeprotocols.org Jim Fleming
@ 2002-10-13 21:15 ` William Stearns
  2002-10-14 13:30   ` Martin Josefsson
  2002-10-29 16:37   ` William Stearns
  1 sibling, 2 replies; 6+ messages in thread
From: William Stearns @ 2002-10-13 21:15 UTC (permalink / raw)
  To: Martin Josefsson; +Cc: Netfilter-devel, Harald Welte

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1291 bytes --]

Good evening, Martin, Harald, all,

On 10 Oct 2002, Martin Josefsson wrote:

> 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.

	Many thanks, Martin, for the work.
	I've attached a patch, based on Martin's approach, that detects 
whether Config.help or Configure.help is in use and automatically uses 
what it finds.
	The second parameter to apply_config_help_change(s) has been 
changed to the file to use rather than the directory in which Config*.help 
lives.
	The patched runme successfully finds help files in 2.4.19 and 
2.5.42-ac1.  Please let me know if there are problems with it.
	Cheers,
	- Bill

---------------------------------------------------------------------------
	"I would give up my right arm before I'd give up my netfilter
firewall."
	-- Chris Brenton
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com).  Mason, Buildkernel, named2hosts, 
and ipfwadm2ipchains are at:                        http://www.stearns.org
--------------------------------------------------------------------------

[-- Attachment #2: patch-o-matic-20021012.runme24and25 --]
[-- Type: TEXT/PLAIN, Size: 5733 bytes --]

diff -uNr patch-o-matic-20021012.orig.runme24/runme patch-o-matic-20021012/runme
--- patch-o-matic-20021012.orig.runme24/runme	Thu Aug  8 09:42:03 2002
+++ patch-o-matic-20021012/runme	Sun Oct 13 16:51:09 2002
@@ -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 Configure.help/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.
 
@@ -119,14 +119,19 @@
     return 0
 }
 
-# Args: configure.help file, Documentation dir.
+# Args: configure.help file, Documentation file to which to add it.
 apply_config_help_change()
 {
+    if [ "$2" = '/dev/null' ]; then
+        #return 0	#Use this one if you don't care that the config*.help file is not getting updated
+        return 1	#Fail
+    fi
+    BASEFILE=`basename $2`	#Configure.help or Config.help
     PRIOR="`head -1 $1`"
-    LINE=`fgrep -x -n "$PRIOR" $2/Configure.help | cut -d: -f1 | head -1`
+    LINE=`fgrep -x -n "$PRIOR" $2 | 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 $BASEFILE entry >&2
 	return 1
     fi
 
@@ -135,13 +140,13 @@
         # Reverse "patch"
 
         NUMLINES1=`sed -n \$= $1`
-        NUMLINES2=`sed -n \$= $2/Configure.help`
+        NUMLINES2=`sed -n \$= $2`
         BEGIN=2
 
-        LINES=`fgrep -nx "\`sed -n 2p $1\`" $2/Configure.help | cut -d: -f1`
+        LINES=`fgrep -nx "\`sed -n 2p $1\`" $2 | cut -d: -f1`
         if [ -z "$LINES" ]
         then
-	    echo Configure.help text not found >&2
+	    echo $BASEFILE text not found >&2
             return 1
         fi
 
@@ -152,7 +157,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|\
                         fgrep -xcv "\`sed -n -e ${TESTLINE}p $1\`"`;
 
                 if [ $NOMATCH -ne 0 ]; then continue 2; fi
@@ -165,42 +170,42 @@
         done; # for
 
         if [ ! "$MATCHES" ]; then
-            echo Configure.help text not found >&2
+            echo $BASEFILE 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 && \
+#                tail -n +`expr $x + $NUMLINES1` $2) > $2.tmp
+	    if (awk "NR==1,NR==$x - 1" $2 && \
+                awk "NR==$x + $NUMLINES1,NR=0" $2) > $2.tmp
             then
-                mv $2/Configure.help.tmp $2/Configure.help
+                mv $2.tmp $2
             else
-                echo Could not update Configure.help >&2
-                rm -f $2/Configure.help.tmp
+                echo Could not update $BASEFILE >&2
+                rm -f $2.tmp
                 return 1
             fi
         done
-        echo "   Configure.help updated"
+        echo "   $BASEFILE updated"
         return 0
     fi
 
     #Apply "Patch"
 
-    rm -f $2/Configure.help.tmp
+    rm -f $2.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 && awk "NR==2,NR==0" $1 && echo && \
+        awk "NR==$LINE-1,NR==0" $2) > $2.tmp
     then
-	mv $2/Configure.help.tmp $2/Configure.help
+	mv $2.tmp $2
     else
-	echo Could not slot in Configure.help entry >&2
-	rm -f $2/Configure.help.tmp
+	echo Could not slot in $BASEFILE entry >&2
+	rm -f $2.tmp
 	return 1
     fi
-    echo "   Placed new Configure.help entry"
+    echo "   Placed new $BASEFILE entry"
     return 0
 }
 
@@ -335,8 +340,19 @@
 
     echo Testing patch $1...
 
+    if [ -f "$KTMPDIR/net/$2/netfilter/Config.help" ]; then
+    	DOCUMENTATIONFILE="$KTMPDIR/net/$2/netfilter/Config.help"
+    elif [ -f "$KTMPDIR/Documentation/Configure.help" ]; then
+        DOCUMENTATIONFILE="$KTMPDIR/Documentation/Configure.help"
+    else
+        echo Warning - no help text file could be found in either >&2
+        echo $KTMPDIR/net/$2/netfilter/Config.help >&2
+        echo or $KTMPDIR/Documentation/Configure.help >&2
+	DOCUMENTATIONFILE=/dev/null
+    fi
+
     if apply_config_in_changes $1 $KTMPDIR/net/$2/netfilter &&
-	apply_config_help_changes $1 $KTMPDIR/Documentation &&
+	apply_config_help_changes $1 $DOCUMENTATIONFILE &&
 	apply_makefile_changes $1 $KTMPDIR/net/$2/netfilter &&
 	apply_conntrack_h_changes $1 $KTMPDIR/include/linux/netfilter_$2
     then :
@@ -461,7 +477,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 $DOCUMENTATIONFILE
     apply_makefile_changes $1 $KERNEL_DIR/net/$2/netfilter/
     apply_conntrack_h_changes $1 $KERNEL_DIR/include/linux/netfilter_$2
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] runme patch for 2.5
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Josefsson @ 2002-10-14 13:30 UTC (permalink / raw)
  To: William Stearns; +Cc: Netfilter-devel, Harald Welte

On Sun, 2002-10-13 at 23:15, William Stearns wrote:
> Good evening, Martin, Harald, all,
> 
> On 10 Oct 2002, Martin Josefsson wrote:
> 
> > 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.
> 
> 	Many thanks, Martin, for the work.
> 	I've attached a patch, based on Martin's approach, that detects 
> whether Config.help or Configure.help is in use and automatically uses 
> what it finds.
> 	The second parameter to apply_config_help_change(s) has been 
> changed to the file to use rather than the directory in which Config*.help 
> lives.
> 	The patched runme successfully finds help files in 2.4.19 and 
> 2.5.42-ac1.  Please let me know if there are problems with it.

I think this looks ok but I havn't tested it yet. As long as p-o-m is
compatible with both 2.4 and 2.5 this would be a nice thing to include.
(and the same runme could be used for both 2.4 and 2.5 p-o-m when they
are split)

-- 
/Martin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] runme patch for 2.5
  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
  1 sibling, 1 reply; 6+ messages in thread
From: William Stearns @ 2002-10-29 16:37 UTC (permalink / raw)
  To: Harald Welte; +Cc: Netfilter-devel, Martin Josefsson

Good day, all,

On Sun, 13 Oct 2002, William Stearns wrote:

> On 10 Oct 2002, Martin Josefsson wrote:
> 
> > 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.
> 
> 	Many thanks, Martin, for the work.
> 	I've attached a patch, based on Martin's approach, that detects 
> whether Config.help or Configure.help is in use and automatically uses 
> what it finds.
> 	The second parameter to apply_config_help_change(s) has been 
> changed to the file to use rather than the directory in which Config*.help 
> lives.
> 	The patched runme successfully finds help files in 2.4.19 and 
> 2.5.42-ac1.  Please let me know if there are problems with it.

	Harald, do you have any concerns about the patch?  (Not resent in 
this mail, though I'd be happy to).
	Cheers,
	- Bill

---------------------------------------------------------------------------
	"1-800-psych: hello, welcome to the psychiatric hotline.  If you
are obsessive-compulsive, please press 1 repeatedly."
(Courtesy of Martin F Krafft <madduck@madduck.net>)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com).  Mason, Buildkernel, named2hosts, 
and ipfwadm2ipchains are at:                        http://www.stearns.org
--------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] runme patch for 2.5
  2002-10-29 16:37   ` William Stearns
@ 2002-11-12 19:50     ` Martin Josefsson
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Josefsson @ 2002-11-12 19:50 UTC (permalink / raw)
  To: William Stearns; +Cc: Harald Welte, Netfilter-devel

On Tue, 2002-10-29 at 17:37, William Stearns wrote:

> 	Harald, do you have any concerns about the patch?  (Not resent in 
> this mail, though I'd be happy to).

I don't know if Harald told you but he applied your patch and I finally
got around to building a new kernel here. I found a small problem with
your patch and I corrected the runme in cvs.

my changes to runme:
http://cvs.netfilter.org/cgi-bin/cvsweb/netfilter/patch-o-matic/runme?r1=1.29&r2=1.30&f=u

Harald, I know I wasn't supposed to touch runme in cvs but I couldn't
help myself when I found the problem :)
The same problem exists in patch-o-matic_2.5/runme which I don't have
permission to alter, same patch works there as they were identical.

cd patch-o-matic_2.5 ; wget -qO - "$url" | patch -p2


I havn't looked at the new configurationsystem in 2.5, will that make
our stuff in patch-o-matic incompatible?
 
-- 
/Martin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-12 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-10 14:33 [PATCH] runme patch for 2.5 Martin Josefsson
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

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.