Subject: pkg/20799: upgrade pkgsrc/archivers/gcpio
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 03/18/2003 22:40:52
>Number:         20799
>Category:       pkg
>Synopsis:       upgrade pkgsrc/archivers/gcpio to 2.5
>Confidential:   yes
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 18 22:41:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
gcpio doesn't build under Linux. This patch adds fixes for building and
upgrades it to newer version.

By the way: what should provide mt and rmt commands?
(Just archivers/star?)
>How-To-Repeat:
	
>Fix:

diff -urN gcpio242/DESCR gcpio/DESCR
--- gcpio242/DESCR	Wed Oct 31 12:24:22 2001
+++ gcpio/DESCR	Sat Mar 15 00:16:40 2003
@@ -1,3 +1,7 @@
-GNU cpio, originally shipped as NetBSD's "cpio" up to version 1.3, is a
-full-featured cpio command that can access remote and local magnetic tapes,
-and both tar and cpio format archives in files or on tapes.
+GNU cpio is a full-featured cpio command that can access remote and
+local magnetic tapes, and both tar and cpio format archives in files or
+on tapes.
+
+This package does not include the mt (control magnetic tape drive
+operation) or rmt commands.
+
diff -urN gcpio242/Makefile gcpio/Makefile
--- gcpio242/Makefile	Fri Mar 14 23:12:18 2003
+++ gcpio/Makefile	Tue Mar 18 22:28:33 2003
@@ -1,8 +1,11 @@
-# $NetBSD: Makefile,v 1.14 2002/08/25 21:49:04 jlam Exp $
+# $NetBSD: Makefile,v 1.15 2003/03/16 00:17:23 wiz Exp $
 #
 
-DISTNAME=       cpio-2.4.2
-PKGNAME=	gcpio-2.4.2
+# XXX patch-aa stops build and install of mt and rmt tools
+# XXX what should provide them?
+
+DISTNAME=       cpio-2.5
+PKGNAME=	g${DISTNAME}
 CATEGORIES=	archivers
 MASTER_SITES=   ${MASTER_SITE_GNU:=cpio/}
 
@@ -12,9 +15,13 @@
 
 USE_BUILDLINK2=	yes
 GNU_CONFIGURE=	yes
-LIBS+=		-lgnumalloc
 
 .include "../../mk/bsd.prefs.mk"
+
+# this malloc is already part of glibc
+.if ${OPSYS} != "Linux"
+LIBS+=		-lgnumalloc
+.endif
 
 .if defined(GNU_PROGRAM_PREFIX)
 CONFIGURE_ARGS+=	--program-prefix=${GNU_PROGRAM_PREFIX}
diff -urN gcpio242/PLIST gcpio/PLIST
--- gcpio242/PLIST	Fri Mar 14 23:12:47 2003
+++ gcpio/PLIST	Tue Mar 18 22:30:24 2003
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2002/02/18 15:14:00 seb Exp $
+@comment $NetBSD: PLIST,v 1.3 2003/03/16 00:17:23 wiz Exp $
 bin/${GNU_PROGRAM_PREFIX}cpio
 @unexec ${INSTALL_INFO} --delete --info-dir=%D/info %D/info/cpio.info
 info/cpio.info
 @exec ${INSTALL_INFO} --info-dir=%D/info %D/info/cpio.info
-man/man1/${GNU_PROGRAM_PREFIX}cpio.1.gz
+man/man1/${GNU_PROGRAM_PREFIX}cpio.1
diff -urN gcpio242/distinfo gcpio/distinfo
--- gcpio242/distinfo	Fri Mar 14 23:19:42 2003
+++ gcpio/distinfo	Tue Mar 18 22:30:53 2003
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.3 2001/07/15 11:34:38 jlam Exp $
+$NetBSD: distinfo,v 1.4 2003/03/16 00:17:23 wiz Exp $
 
-SHA1 (cpio-2.4.2.tar.gz) = 88e557b2e14ad7b575554473e4ef4624a993b71f
-Size (cpio-2.4.2.tar.gz) = 185281 bytes
-SHA1 (patch-aa) = cc8a08755e2c2d8007e91ee4006c52c6cb684235
+SHA1 (cpio-2.5.tar.gz) = d5908ee20484f092e591a430620feec33060528c
+Size (cpio-2.5.tar.gz) = 185480 bytes
+SHA1 (patch-aa) = 4fef661609129255640f781ba11c911494f6bdfc
 SHA1 (patch-ab) = bbbe14be76c2c81ad00588c3436a61fd0a13e778
-SHA1 (patch-ac) = 372b5fe8bb22a609c22089c78f67387e66436372
+SHA1 (patch-ac) = 404dcc134a0c8b9007a3efdc8caf6b36efcf125b
+SHA1 (patch-ad) = 274ad531419a788ebbb04bca9062566283c5123c
+SHA1 (patch-ae) = f09a1b905e8b66a908cc2b9a41069a44aba36992
+SHA1 (patch-af) = 51fb7df5d18859f1af4ce42be663f701628445c0
diff -urN gcpio242/patches/patch-aa gcpio/patches/patch-aa
--- gcpio242/patches/patch-aa	Fri Mar 14 23:18:25 2003
+++ gcpio/patches/patch-aa	Tue Mar 18 22:31:15 2003
@@ -1,5 +1,5 @@
---- Makefile.in.orig	Wed Dec 20 08:28:30 1995
-+++ Makefile.in	Sat Dec 28 14:25:53 2002
+--- Makefile.in.orig	Wed Jun 12 21:19:58 2002
++++ Makefile.in	Fri Mar 14 23:48:52 2003
 @@ -66,9 +66,9 @@
  exec_prefix = @exec_prefix@
  
@@ -12,6 +12,15 @@
  
  
  # Where to install the cpio and mt executables.
+@@ -101,7 +101,7 @@
+ SRCS = copyin.c copyout.c copypass.c defer.c dstring.c global.c \
+ main.c tar.c util.c error.c getopt.c getopt1.c filemode.c version.c \
+ rtapelib.c dirname.c idcache.c makepath.c xmalloc.c stripslash.c \
+-userspec.c xstrdup.c bcopy.c fnmatch.c mkdir.c strdup.c
++userspec.c xstrdup.c bcopy.c fnmatch.c mkdir.c
+ OBJS = copyin.o copyout.o copypass.o defer.o dstring.o global.o \
+ main.o tar.o util.o error.o getopt.o getopt1.o filemode.o version.o \
+ $(RTAPELIB) dirname.o idcache.o makepath.o xmalloc.o stripslash.o \
 @@ -117,17 +117,14 @@
  configure configure.in mkinstalldirs install-sh $(MT_SRCS) rmt.c tcexparg.c \
  alloca.c cpio.texi cpio.info texinfo.tex
diff -urN gcpio242/patches/patch-ac gcpio/patches/patch-ac
--- gcpio242/patches/patch-ac	Fri Aug  7 04:21:56 1998
+++ gcpio/patches/patch-ac	Fri Mar 14 23:45:29 2003
@@ -8,14 +8,3 @@
  #endif
 -int lstat ();
 -int stat ();
---- main.c.orig	Wed Nov 30 19:24:21 1994
-+++ main.c	Thu Mar  5 13:22:28 1998
-@@ -492,7 +492,7 @@
-   bzero (zeros_512, 512);
- }
- 
--void
-+int
- main (argc, argv)
-      int argc;
-      char *argv[];
diff -urN gcpio242/patches/patch-ad gcpio/patches/patch-ad
--- gcpio242/patches/patch-ad	Wed Dec 31 16:00:00 1969
+++ gcpio/patches/patch-ad	Sat Mar 15 00:04:51 2003
@@ -0,0 +1,11 @@
+--- error.c.orig	Fri Mar 14 23:57:13 2003
++++ error.c	Sat Mar 15 00:01:09 2003
+@@ -68,7 +68,7 @@
+ private_strerror (errnum)
+      int errnum;
+ {
+-  extern char *sys_errlist[];
++/*  extern char *sys_errlist[]; */
+   extern int sys_nerr;
+ 
+   if (errnum > 0 && errnum <= sys_nerr)
diff -urN gcpio242/patches/patch-ae gcpio/patches/patch-ae
--- gcpio242/patches/patch-ae	Wed Dec 31 16:00:00 1969
+++ gcpio/patches/patch-ae	Sat Mar 15 00:06:06 2003
@@ -0,0 +1,13 @@
+--- mkdir.c.orig	Sat Dec 28 14:10:36 2002
++++ mkdir.c	Sat Dec 28 14:15:13 2002
+@@ -51,8 +51,8 @@
+ 
+ int
+ mkdir (dpath, dmode)
+-     char *dpath;
+-     int dmode;
++     const char *dpath;
++     unsigned int dmode;
+ {
+   int cpid, status;
+   struct stat statbuf;
diff -urN gcpio242/patches/patch-af gcpio/patches/patch-af
--- gcpio242/patches/patch-af	Wed Dec 31 16:00:00 1969
+++ gcpio/patches/patch-af	Sat Mar 15 00:07:09 2003
@@ -0,0 +1,15 @@
+--- strdup.c.orig	Sat Dec 28 14:17:03 2002
++++ strdup.c	Sat Dec 28 14:16:41 2002
+@@ -27,6 +27,7 @@
+ char *strcpy ();
+ #endif
+ 
++#if 0
+ /* Return a newly allocated copy of STR,
+    or 0 if out of memory. */
+ 
+@@ -41,3 +42,4 @@
+     strcpy (newstr, str);
+   return newstr;
+ }
++#endif
>Release-Note:
>Audit-Trail:
>Unformatted: