Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36810 - cannot emerge iptables: "Failed Patch: 01_all_grsecurity.patch.bz2"
Summary: cannot emerge iptables: "Failed Patch: 01_all_grsecurity.patch.bz2"
Status: RESOLVED DUPLICATE of bug 37132
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-30 06:57 UTC by Benoit Boissinot
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
quick fix for the iptables ebuild (iptables-1.2.9.ebuild.patch,262 bytes, patch)
2004-01-01 06:50 UTC, Daniel Fullmer
Details | Diff
My patch against iptables 1.2.9 (iptables-1.2.9.ebuild.patch-by-rene,287 bytes, patch)
2004-01-03 04:40 UTC, Rene Androsch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Boissinot 2003-12-30 06:57:07 UTC
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.
Comment 1 Daniel Fullmer 2004-01-01 06:50:35 UTC
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.
Comment 2 Benoit Boissinot 2004-01-01 07:03:34 UTC
The patch worked fine for me.

Many thanks.
Comment 3 Daniel Fullmer 2004-01-01 07:42:28 UTC
no problem, just doing what i can for the gentoo community :-)
Comment 4 Stuart Longland (RETIRED) gentoo-dev 2004-01-02 07:08:58 UTC
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.
Comment 5 Jelle Kalf 2004-01-02 23:40:11 UTC
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)
Comment 6 Rene Androsch 2004-01-03 04:40:18 UTC
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 :)
Comment 7 Benoit Boissinot 2004-01-03 10:18:42 UTC
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
Comment 8 Daniel Ahlberg (RETIRED) gentoo-dev 2004-01-03 12:32:21 UTC
This is a tar bug, see #37132.
Comment 9 Daniel Ahlberg (RETIRED) gentoo-dev 2004-01-04 03:58:58 UTC

*** This bug has been marked as a duplicate of 37132 ***