build fails to patch properly emerge libpcap apcupsd mm-sources Calculating dependencies ...done! >>> emerge (1 of 3) net-libs/libpcap-0.8.1 to / >>> Downloading http://gentoo.oregonstate.edu/distfiles/libpcap-0.8.1.tar.gz --06:18:06-- http://gentoo.oregonstate.edu/distfiles/libpcap-0.8.1.tar.gz => `/usr/portage/distfiles/libpcap-0.8.1.tar.gz' Resolving gentoo.oregonstate.edu... 128.193.0.3 Connecting to gentoo.oregonstate.edu[128.193.0.3]:80... connected. HTTP request sent, awaiting response... 404 Not Found 06:18:06 ERROR 404: Not Found. >>> Downloading http://distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/libpcap-0.8.1.tar.gz --06:18:06-- http://distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/libpcap-0.8.1.tar.gz => `/usr/portage/distfiles/libpcap-0.8.1.tar.gz' Resolving distro.ibiblio.org... 152.2.210.109 Connecting to distro.ibiblio.org[152.2.210.109]:80... connected. HTTP request sent, awaiting response... 404 Not Found 06:18:07 ERROR 404: Not Found. >>> Downloading http://www.tcpdump.org/release/libpcap-0.8.1.tar.gz --06:18:07-- http://www.tcpdump.org/release/libpcap-0.8.1.tar.gz => `/usr/portage/distfiles/libpcap-0.8.1.tar.gz' Resolving www.tcpdump.org... 205.150.200.186 Connecting to www.tcpdump.org[205.150.200.186]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 283,567 [application/x-tar] 100%[====================================>] 283,567 36.42K/s ETA 00:00 06:18:15 (40.02 KB/s) - `/usr/portage/distfiles/libpcap-0.8.1.tar.gz' saved [283567/283567] >>> md5 src_uri ;-) libpcap-0.8.1.tar.gz eutils flag-o-matic >>> Unpacking source... >>> Unpacking libpcap-0.8.1.tar.gz to /mnt/bigdisk1/tmp/portage/libpcap-0.8.1/work tar: Removing leading `libpcap-0.8.1/./' from member names * Applying libpcap-0.8.1-fPIC.patch... * Failed Patch: libpcap-0.8.1-fPIC.patch! * * Include in your bugreport the contents of: * * /mnt/bigdisk1/tmp/portage/libpcap-0.8.1/temp/libpcap-0.8.1-fPIC.patch-11852.out !!! ERROR: net-libs/libpcap-0.8.1 failed. !!! Function epatch, Line 322, Exitcode 0 !!! Failed Patch: libpcap-0.8.1-fPIC.patch!
Please post /mnt/bigdisk1/tmp/portage/libpcap-0.8.1/temp/libpcap-0.8.1-fPIC.patch-11852.out and emerge info
Created attachment 23062 [details] libpcap-0.8.1-fPIC.patch-11852.out the error report
emerge info Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.0-mm1) ================================================================= System uname: 2.6.0-mm1 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache cvs sandbox userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/bigdisk1/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acpi acpi4linux alsa apm arts avi berkdb bonobo cdr crypt cups dvd dvdr encode esd foomaticdb gb gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imagemagick imlib jack java javascript jpeg kde libg++ libgda libwww mad mikmod motif mozilla mpeg ncurses nls ofx oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline scanner sdl slang spell ssl svga tcpd transcode truetype usb v4l x86 xinerama xml xml2 xmms xv zlib"
I've comitted a possible fix. If you want you can try and change the fPIC patch removing /tmp/ from the first line (so the file is the same as the +++ line)
It seem to be a problem with the package libpcap itself. tar showed up a message to remove the leading /libpcap-0.8.1/./ from the files when extracting them. The result is, that all files of the package aren't extracted into $PORTAGE_TMPDIR/portage/libpcap-0.8.1/work/libpcap-0.8.1/ but $PORTAGE_TMPDIR/portage/libpcap-0.8.1/work/ . This explains why the patch is unable to find the Makefile.in. I've unpacked and repacked the libpcap-0.8.1.tar.gz, refreshed the digest and did the changes to the patch like Daniel Ahlberg suggested in his posting above. This works for me :)
I've posted a bugreport on the tcpdump-workers mailing list to fix the problem with the tarball... let's see what happens... we cannot redistribute the repackaged tarball, since the MD5 will differ from the official one on www.tcpdump.org bye
Created attachment 23116 [details] libpcap-0.8.1-r1.ebuild For the impatient I've butchered the ebuild to make this work for now .. I have not checked portage for a fix recently so one may be out there already.
As long as this is not fixed in portage, you should mask this one (still buggy on my side).
A better butchering of the ebuild is to use tar xvzPf rather than unpack. The -P option to tar tells it not to strip ^.*\./ from the paths of the files it extracts.
*** This bug has been marked as a duplicate of 37132 ***