Subject: port-i386/32867: pkgsrc/wip/jdk14 patch fails
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <brchuck@hotmail.com>
List: netbsd-bugs
Date: 02/18/2006 15:10:00
>Number:         32867
>Category:       port-i386
>Synopsis:       pkgsrc/wip/jdk14 patch fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 18 15:10:00 +0000 2006
>Originator:     Charles Zmudzinski
>Release:        3.0_STABLE
>Organization:
>Environment:
NetBSD ave 3.0_STABLE NetBSD 3.0_STABLE (MYGENERIC) #0: Sat Feb 4 14:22:38 EST 2006 chuckz@ave:/home/chuckz/obj/home/chuckz/netbsd-3/src/sys/arch/i386/compile/MYGENERIC/i386
>Description:
pkgsrc Environment:

pkgsrc-wip snapshot of Feb 17, 2006.
pkgsrc-2005Q4
NetBSD-3.0_STABLE/i386

Run make patch in wip/jdk14, and here is the output I got at the patch stage:

===> Patching for jdk14-1.4.2.8
cd /home/chuckz/obj/pkgsrc/wip/jdk14/work && /usr/bin/patch -p0 -E -s <jdk14.patches
3 out of 3 hunks failed--saving rejects to deploy/make/plugin/java/FileList.gmk.rej
3 out of 11 hunks failed--saving rejects to deploy/src/plugin/src/share/classes/sun/plugin/liveconnect/SecureInvocation.java.rej
*** Error code 6

Stop.
make: stopped in /home/chuckz/obj/pkgsrc/wip/jdk14
*** Error code 1

Examining the original FileList.gmk file and the corresponding patch in the patchfile I notced the MSDOS CR's were present in the original files, but not in the patchfile.
>How-To-Repeat:
make patch for pkgsrc/wip/jdk14
>Fix:
Add the -a option to the unzip command during the extract phase:

I did it with the following patch to wip/jdk14/Makefile:

--- wip/jdk14/Makefile	2006-02-07 05:36:37.000000000 -0500
+++ wip/jdk14/Makefile	2006-02-18 09:10:58.000000000 -0500
@@ -29,7 +29,7 @@
 USE_PKGINSTALL=		yes
 USE_TOOLS+=		gmake m4
 USE_LANGUAGES=		c c++
-EXTRACT_CMD_OPTS.zip=	-q
+EXTRACT_CMD_OPTS.zip=	-a -q
 WRKSRC=			${WRKDIR}
 PLIST_SRC=      	PLIST.common