tonfa@arakou tonfa $ sudo emerge iptables Calculating dependencies ...done! >>> emerge (1 of 1) net-firewall/iptables-1.2.9 to / >>> md5 src_uri ;-) iptables-1.2.9.tar.bz2 >>> Unpacking source... >>> Unpacking iptables-1.2.9.tar.bz2 to /var/tmp/portage/iptables-1.2.9/work tar: Removing leading `iptables-1.2.9/./' from member names * Applying various patches (bugfixes/updates)... * 01_all_grsecurity.patch.bz2... * Failed Patch: 01_all_grsecurity.patch.bz2! * * Include in your bugreport the contents of: * * /var/tmp/portage/iptables-1.2.9/temp/01_all_grsecurity.patch.bz2-20941.out !!! ERROR: net-firewall/iptables-1.2.9 failed. !!! Function epatch, Line 322, Exitcode 0 !!! Failed Patch: 01_all_grsecurity.patch.bz2! ------------------------------------------------------------------------- tonfa@arakou 1.2.9-files $ cat /var/tmp/portage/iptables-1.2.9/temp/01_all_grsecurity.patch.bz2-18789.out ***** 01_all_grsecurity.patch.bz2 ***** ======================================= PIPE_COMMAND: bzip2 -dc /usr/portage/net-firewall/iptables/files/1.2.9-files/01_all_grsecurity.patch.bz2 > /var/tmp/portage/iptables-1.2.9/temp/18789.patch PATCH COMMAND: patch -g0 -p0 < /var/tmp/portage/iptables-1.2.9/temp/18789.patch ======================================= can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:02.452734440 +0000 |+++ iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:11.846306400 +0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored patching file iptables-1.2.8/extensions/libipt_stealth.c ======================================= PIPE_COMMAND: bzip2 -dc /usr/portage/net-firewall/iptables/files/1.2.9-files/01_all_grsecurity.patch.bz2 > /var/tmp/portage/iptables-1.2.9/temp/18789.patch PATCH COMMAND: patch -g0 -p1 < /var/tmp/portage/iptables-1.2.9/temp/18789.patch ======================================= can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:02.452734440 +0000 |+++ iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:11.846306400 +0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored patching file extensions/libipt_stealth.c ======================================= PIPE_COMMAND: bzip2 -dc /usr/portage/net-firewall/iptables/files/1.2.9-files/01_all_grsecurity.patch.bz2 > /var/tmp/portage/iptables-1.2.9/temp/18789.patch PATCH COMMAND: patch -g0 -p2 < /var/tmp/portage/iptables-1.2.9/temp/18789.patch ======================================= can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:02.452734440 +0000 |+++ iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:11.846306400 +0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored patching file libipt_stealth.c ======================================= PIPE_COMMAND: bzip2 -dc /usr/portage/net-firewall/iptables/files/1.2.9-files/01_all_grsecurity.patch.bz2 > /var/tmp/portage/iptables-1.2.9/temp/18789.patch PATCH COMMAND: patch -g0 -p3 < /var/tmp/portage/iptables-1.2.9/temp/18789.patch ======================================= missing header for unified diff at line 3 of patch can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:02.452734440 +0000 |+++ iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:11.846306400 +0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 14 of patch can't find file to patch at input line 14 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.8/extensions/libipt_stealth.c 1969-12-31 19:00:00.000000000 -0500 |+++ iptables-1.2.8-new/extensions/libipt_stealth.c 2002-09-10 16:36:24.000000000 -0400 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored ======================================= PIPE_COMMAND: bzip2 -dc /usr/portage/net-firewall/iptables/files/1.2.9-files/01_all_grsecurity.patch.bz2 > /var/tmp/portage/iptables-1.2.9/temp/18789.patch PATCH COMMAND: patch -g0 -p4 < /var/tmp/portage/iptables-1.2.9/temp/18789.patch ======================================= missing header for unified diff at line 3 of patch can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:02.452734440 +0000 |+++ iptables-1.2.9/extensions/Makefile 2003-11-04 08:19:11.846306400 +0000 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 14 of patch can't find file to patch at input line 14 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- iptables-1.2.8/extensions/libipt_stealth.c 1969-12-31 19:00:00.000000000 -0500 |+++ iptables-1.2.8-new/extensions/libipt_stealth.c 2002-09-10 16:36:24.000000000 -0400 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored Reproducible: Always Steps to Reproduce: 1.emerge iptables 2. 3.
Created attachment 22947 [details, diff] quick fix for the iptables ebuild The problem is in the: > tar: Removing leading `iptables-1.2.9/./' from member names iptables-1.2.9.tar.bz2 was apparently rolled improperly. it just untars iptables into the directory its currently in, but yet it still creates the iptables-1.2.9 directory. So portage can "cd" into it. Then the patch failes because there is nothing in the directory. A quick fix would be to apply this patch to the ebuild.
The patch worked fine for me. Many thanks.
no problem, just doing what i can for the gentoo community :-)
Hi, The patch for some reason didn't apply on my version of the ebuild (some finnicky difference that patch didn't like). However, after manually editing the ebuild to put the changes, all is well.
The patch had no effect on my side: ld -shared -o extensions/libipt_NETLINK.so extensions/libipt_NETLINK_sh.o gcc -march=athlon-tbird -O3 -pipe -Iinclude -Wall -Wunused -I/usr/src/linux/include -DIPTABLES_VERSION=\"1.2.9\" -fPIC -o extensions/libipt_ROUTE_sh.o -c extensions/libipt_ROUTE.c distcc[2293] ERROR: compile on 192.168.55.2 failed extensions/libipt_ROUTE.c: In function `init': extensions/libipt_ROUTE.c:51: error: structure has no member named `flags' extensions/libipt_ROUTE.c: In function `parse': extensions/libipt_ROUTE.c:138: error: structure has no member named `flags' extensions/libipt_ROUTE.c:138: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function) extensions/libipt_ROUTE.c:138: error: (Each undeclared identifier is reported only once extensions/libipt_ROUTE.c:138: error: for each function it appears in.) extensions/libipt_ROUTE.c: In function `print': extensions/libipt_ROUTE.c:186: error: structure has no member named `flags' extensions/libipt_ROUTE.c:186: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function) extensions/libipt_ROUTE.c: In function `save': extensions/libipt_ROUTE.c:209: error: structure has no member named `flags' extensions/libipt_ROUTE.c:209: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function) make: *** [extensions/libipt_ROUTE_sh.o] Error 1 !!! ERROR: net-firewall/iptables-1.2.9 failed. !!! Function src_compile, Line 61, Exitcode 2 !!! (no error message)
Created attachment 23059 [details, diff] My patch against iptables 1.2.9 I tried the first patch posted here, but it did fail. Then I took a closer look at it and made my own patch for it :)
I have the same problem with tcpdump-3.8.1, it doesn't untar correctly. Looks like that adding -P option to tar should solve the problem but I don't knuw how to add this to the ebuild. Benoit
This is a tar bug, see #37132.
*** This bug has been marked as a duplicate of 37132 ***