Skip to contentSkip to conversation

fix bug in convert2pomng.sh

PATCH In review Sven Schuster 2 participants 3 messages Feb 18, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix bug in convert2pomng.sh

Hi Harald, hi Netfilter-devel-list,

attached you find a patch against convert2pomng.sh.
The original version didn't create additional .ladd files if there where more than one entries to add. For example with the nfnetlink-ctnetlink patch there were the files

nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-2
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-3
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-3
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-4
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-5
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-6
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-7
nfnetlink-ctnetlink-0.13.patch.ip_conntrack.h-8

But because of an error in the script each part was created as

ip_conntrack.h.ladd

and so just the last part (...-8) went into pom-ng.

I tested this one and it worked, the parts were correctly created as

ip_conntrack.h.ladd
ip_conntrack.h.ladd_2
...

I hope the fix is fine (and a diff for patch -p0 too :-)! If it is, wouldn't most patches from pom need to be converted to pom-ng again??

BTW, I'm currently about to port the nfnetlink-ctnetlink patch to 2.6 (which actually brought my attention to this bug), is anyone else working on this??

Regards

Sven

convert2pomng.sh renamed from convert2pomng.sh.orig +3 -3
@@ -31,19 +31,19 @@
 done
 
 for f in $PREFIX.makefile*; do
-	postfix=${f##$PREFIX.makefile} | sed -e s/-/_/
+	postfix=$(echo "${f##$PREFIX.makefile}" | sed -e s/-/_/)
 	newfile=$DESTDIR/linux/net/ipv4/netfilter/Makefile.ladd$postfix
 	cp $f $newfile
 done
 
 for f in $PREFIX.config.in*; do
-	postfix=${f##$PREFIX.config.in} | sed -e s/-/_/
+	postfix=$(echo "${f##$PREFIX.config.in}" | sed -e s/-/_/)
 	newfile=$DESTDIR/linux/net/ipv4/netfilter/Config.in.ladd$postfix
 	cp $f $newfile
 done
 
 for f in $PREFIX.ip_conntrack.h*; do
-	postfix=${f##$PREFIX.ip_conntrack.h} | sed -e s/-/_/
+	postfix=$(echo "${f##$PREFIX.ip_conntrack.h}" | sed -e s/-/_/)
 	newfile=$DESTDIR/linux/include/linux/netfilter_ipv4/ip_conntrack.h.ladd$postfix
 	cp $f $newfile
 done
Signature · 2 lines
Linux zion 2.6.3-rc2 #2 Fri Feb 13 00:07:44 CET 2004 i686 athlon i386 GNU/Linux
 11:14:59  up 1 day, 10:47,  4 users,  load average: 0.04, 0.04, 0.00
#1 lore raw
Quoted 9 lines · Sven Schuster

Hi Harald, hi Netfilter-devel-list,

attached you find a patch against convert2pomng.sh.
The original version didn't create additional .ladd files if there where more than one entries to add. For example with the nfnetlink-ctnetlink patch there were the files

Quoted 5 lines

But because of an error in the script each part was created as

ip_conntrack.h.ladd

and so just the last part (...-8) went into pom-ng.

:( I'm sorry.

Quoted 1 line

I hope the fix is fine (and a diff for patch -p0 too :-)!

Seems fine. 'patch -p1' is usual, but that's not too imporant.

Quoted 2 lines

If it is, wouldn't most patches from pom need to be converted to pom-ng again??

Unfortunately yes. Would you (or anybody else) be willing to do this in a local tree, make a diff, review it and finally submit it to me? I'd rather not spend more time with this stuff at the moment, pom-ng has already taken too much time in the past.

Quoted 3 lines

BTW, I'm currently about to port the nfnetlink-ctnetlink patch to 2.6 (which actually brought my attention to this bug), is anyone else working on this??

No. I'm now working on finalizing the specification for the pkttnetlink message format (which has implications on nfnetlink). Once this is done, we can consider the nfnetlink message format stable and submit for kernel inclusion (2.6.x). Your port would be very welcome.

Quoted 2 lines

Regards
Sven

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw

Hello Harald,

On Wed, Feb 18, 2004 at 06:23:24PM +0100, Harald Welte told us:

Quoted 8 lines
Quoted 3 lines

If it is, wouldn't most patches from pom need to be converted to pom-ng again??

Unfortunately yes. Would you (or anybody else) be willing to do this in a local tree, make a diff, review it and finally submit it to me? I'd rather not spend more time with this stuff at the moment, pom-ng has already taken too much time in the past.

I can and will happily do that when I have some more free time which will be at the latest next week when I have a few days of vacation.

Quoted 10 lines
Quoted 4 lines

BTW, I'm currently about to port the nfnetlink-ctnetlink patch to 2.6 (which actually brought my attention to this bug), is anyone else working on this??

No. I'm now working on finalizing the specification for the pkttnetlink message format (which has implications on nfnetlink). Once this is done, we can consider the nfnetlink message format stable and submit for kernel inclusion (2.6.x). Your port would be very welcome.

Ok. I'll submit a patch when I've finished it and it works!

Regards

Sven

Signature · 2 lines
Linux zion 2.6.3-rc2 #2 Fri Feb 13 00:07:44 CET 2004 i686 athlon i386 GNU/Linux
 20:19:33  up 1 day, 19:52,  3 users,  load average: 0.00, 0.01, 0.00