Subject: pax on Linux
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 08/21/2002 15:32:12
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I have a Debian GNU/Linux system, on which I use pkgsrc via
othersrc/boostrap-pkgsrc.  For the basic linux system only installed the
absolute bare minimum, and now I'm in the process of installing packages
via pkgsrc.  Yay. :)

Attached are patches that were necessary for me to install pax from
pkgtools/pkgsrc.  In addition, I had to copy over
/usr/share/groff/tmac.andoc/* from a NetBSD machine.

Note that pax is installed in /bin/pax, but /usr/pkgsrc/mk/defs.Linux.mk
sets it to ${ZOULARISBASE}/bin/pax -- this needs tweaking, obviously.

-Jan

-- 
Except most of the good bits were about frogs, I remember that.
You would not believe some of the things about frogs.

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pax.linux.diff"

? a.out
? patches/patch-ac
? patches/patch-ad
? patches/patch-ae
? patches/patch-af
? patches/patch-ag
? patches/patch-ah
? patches/patch-ai
? patches/patch-aj
? patches/patch-ak
? patches/patch-al
? patches/patch-am
? patches/patch-ao
? patches/patch-ap
? patches/patch-aq
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pax/distinfo,v
retrieving revision 1.1
diff -b -u -r1.1 distinfo
--- distinfo	2001/04/17 12:19:48	1.1
+++ distinfo	2002/08/21 19:05:11
@@ -2,5 +2,19 @@
 
 SHA1 (pax-19980903.tar.gz) = dbbc6672b86ec4d371cda997bf40e64aa6cab0d1
 Size (pax-19980903.tar.gz) = 107929 bytes
-SHA1 (patch-aa) = e9674773062b4a1460cbaae6a17470cae842d74d
-SHA1 (patch-ab) = bdce9379355a311753b9b18c3a711073fad7914d
+SHA1 (patch-aa) = 8a962043e9d6d276f4825b19777536ffcac3e7cc
+SHA1 (patch-ab) = 91769acd63abb536008adc15679521bbbd4b394d
+SHA1 (patch-ac) = 95dc91d8fde6015fbd90b121e2fea20442664476
+SHA1 (patch-ad) = 92b24ffa7b6658c91360a4236fb9662b4b40660d
+SHA1 (patch-ae) = f9986e09cc8abddeb196fe7b3ad3b9b14f75354d
+SHA1 (patch-af) = c184ff412edab7c5846a364e7b1e186cd2d8476d
+SHA1 (patch-ag) = 63d86e0a8bf631bb429fb1c63759f49d541513c7
+SHA1 (patch-ah) = c3910be2b2c432951e7f7fef30ca26397f890898
+SHA1 (patch-ai) = d1315ef5474384ebd9a1bd2679aa856ba428a235
+SHA1 (patch-aj) = d7d89b9dede9953a67cf8d63326e4011c2381f56
+SHA1 (patch-ak) = d2d7cdba4664d11c10f10978d331e40f7fead0c9
+SHA1 (patch-al) = d771a407dbd5c9efb2f8f50b7086383bd5b9d2a7
+SHA1 (patch-am) = f6e909711edfc6bdfb2d36cc9846b864a8fb9bbf
+SHA1 (patch-ao) = 3ee28b0664c88de3b1f6d4c475b7c8ddb0dca287
+SHA1 (patch-ap) = d2888dad422306330d06bfceb2e8f42a1b8316f3
+SHA1 (patch-aq) = 88162c10e10ee63c1f80611cbef0cf8584059d9e
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pax/patches/patch-aa,v
retrieving revision 1.2
diff -b -u -r1.2 patch-aa
--- patches/patch-aa	2000/01/10 01:03:35	1.2
+++ patches/patch-aa	2002/08/21 19:05:11
@@ -1,10 +1,19 @@
-$NetBSD: patch-aa,v 1.2 2000/01/10 01:03:35 wiz Exp $
+$NetBSD:$
 
-Needed for 1.3
+--- tar.c.orig	Tue Aug 11 07:04:26 1998
++++ tar.c	Wed Aug 21 14:19:50 2002
+@@ -42,8 +42,10 @@
+ #if 0
+ static char sccsid[] = "@(#)tar.c	8.2 (Berkeley) 4/18/94";
+ #else
++#ifndef __linux__
+ __RCSID("$NetBSD: tar.c,v 1.11 1998/08/10 22:35:02 tv Exp $");
+ #endif
++#endif
+ #endif /* not lint */
 
---- tar.c.BAK	Fri Apr 23 15:27:46 1999
-+++ tar.c	Fri Apr 23 15:31:40 1999
-@@ -63,6 +63,8 @@
+ #include <sys/types.h>
+@@ -63,6 +65,8 @@
  #include "extern.h"
  #include "tar.h"
  
@@ -13,3 +22,17 @@
  /*
   * Routines for reading, writing and header identify of various versions of tar
   */
+@@ -1115,8 +1119,13 @@
+ 	    ul_oct((u_long)arcn->sb.st_gid, hd->gid, sizeof(hd->gid), 3) ||
+ 	    ul_oct((u_long)arcn->sb.st_mtime,hd->mtime,sizeof(hd->mtime),3))
+ 		goto out;
++#ifdef netbsd
+ 	user = user_from_uid(arcn->sb.st_uid, 1);
+ 	group = group_from_gid(arcn->sb.st_gid, 1);
++#else
++	user = getpwuid(arcn->sb.st_uid) ? getpwuid(arcn->sb.st_uid)->pw_name : NULL;
++	group = getgrgid(arcn->sb.st_gid) ? getgrgid(arcn->sb.st_gid)->gr_name : NULL;
++#endif
+ 	zf_strncpy(hd->uname, user ? user : "", sizeof(hd->uname));
+ 	zf_strncpy(hd->gname, group ? group : "", sizeof(hd->gname));
+ 
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pax/patches/patch-ab,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ab
--- patches/patch-ab	1999/04/23 13:47:44	1.2
+++ patches/patch-ab	2002/08/21 19:05:11
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 1999/04/23 13:47:44 hubertf Exp $
+$NetBSD:$
 
---- ../pwcache.c	Fri Apr 23 15:46:31 1999
-+++ pwcache.c	Fri Apr 23 15:54:27 1999
-@@ -46,7 +46,7 @@
+--- pwcache.c.orig	Wed Aug 21 14:28:15 2002
++++ pwcache.c	Wed Aug 21 14:30:21 2002
+@@ -45,7 +45,7 @@
  #endif
  #endif /* not lint */
  
@@ -11,7 +11,7 @@
  
  #include <sys/types.h>
  #include <sys/param.h>
-@@ -79,12 +79,13 @@
+@@ -78,12 +78,13 @@
  static UIDC **usrtb = NULL;	/* user name to uid cache */
  static GIDC **grptb = NULL;	/* group name to gid cache */
  
@@ -26,7 +26,7 @@
  static u_int
  st_hash(name, len, tabsz)
  	const char *name;
-@@ -100,6 +101,7 @@
+@@ -99,6 +100,7 @@
  
  	return (key % tabsz);
  }
@@ -34,7 +34,7 @@
  
  /*
   * uidtb_start
-@@ -213,6 +215,7 @@
+@@ -212,6 +214,7 @@
  	return (0);
  }
  
@@ -42,7 +42,7 @@
  /*
   * user_from_uid()
   *	caches the name (if any) for the uid. If noname clear, we always return the
-@@ -292,7 +295,9 @@
+@@ -291,7 +294,9 @@
  	}
  	return (ptr->name);
  }
@@ -52,7 +52,17 @@
  /*
   * group_from_gid()
   *	caches the name (if any) for the gid. If noname clear, we always return the
-@@ -372,6 +377,7 @@
+@@ -335,7 +340,9 @@
+ 	 * No entry for this gid, we will add it
+ 	 */
+ 	if (!gropn) {
++#ifndef __linux__
+ 		setgroupent(1);
++#endif
+ 		++gropn;
+ 	}
+ 
+@@ -371,6 +378,7 @@
  	}
  	return (ptr->name);
  }
@@ -60,7 +70,7 @@
  
  /*
   * uid_from_user()
-@@ -406,7 +412,7 @@
+@@ -405,7 +413,7 @@
  	 * look up in hash table, if found and valid return the uid,
  	 * if found and invalid, return a -1
  	 */
@@ -69,7 +79,17 @@
  	ptr = *pptr;
  
  	if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) {
-@@ -478,7 +484,7 @@
+@@ -416,7 +424,9 @@
+ 	}
+ 
+ 	if (!pwopn) {
++#ifndef __linux__
+ 		setpassent(1);
++#endif
+ 		++pwopn;
+ 	}
+ 
+@@ -477,7 +487,7 @@
  	 * look up in hash table, if found and valid return the uid,
  	 * if found and invalid, return a -1
  	 */
@@ -78,3 +98,13 @@
  	ptr = *pptr;
  
  	if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) {
+@@ -488,7 +498,9 @@
+ 	}
+ 
+ 	if (!gropn) {
++#ifndef __linux__
+ 		setgroupent(1);
++#endif
+ 		++gropn;
+ 	}
+ 

--ikeVEW9yuYc//A+q
Content-Type: application/x-tar-gz
Content-Disposition: attachment; filename="pax.linux.patches.tar.gz"
Content-Transfer-Encoding: base64

H4sIAH3kYz0AA+0ca3PbRi5fpV+Buo0rWbTEl55u0jiOm/rGdjK2c7226WhoaSWzpkgeH36k
zX8/YJcv0ZLltJI8VxMzFuUlFovFLrDALlauEQwumN9w6bltGM9WALIiyy1dfyYLyD9Vud16
JrebGv41Na2J+Gpbbz8DeRXM5CH0A8MDeOY5TnAf3vUFY9Y6GFovfHPMgtenb3rflMvb29uA
sqgP6o5njktnIYPdcAyKAnK7J+s9tQVKt9sp12o1gVf6iQ05iqqAoveUbq8pg4oDWn71CrZ1
VepADT8VGV69KsPX5gjkMqC4A3MAgwuUuj8Y+Obw19/gBWy8qnxdFVQ7dRUqr5l3ySx2WwW9
oXQaXX1jB0kwy2flGlKyh2wE/b5l2uFNv1/Gryd7pwdvKhtxfwSH0hUodewA8d2QOw1kRVV7
WrMnqxBcwf6NC99sVDlle2iOkLR4Rv9DYwtsJwBsJoCtRhmoF/bACocMvvNv/UZw6zK/fvGS
d7ilSS2otZrYbdHfCHOD3QTMs+sXG9lC4o9KqDtxmXs9MFAb64ONcq2MjZcBtuDECQPTZj6M
HA88ZgxNeyzBtWdi6RgMewgXWMg8MIfMDszRLTgjuDI80wl9uGKebzq2T2XYIhFscGYVRSFG
a/jsSorGOS4BQmj1nUFQqYR9y7HHVcMb2Nsv/fO6H/TH5lCCi+H2S/7FNz8xZ1SJ/q9KoFXh
zz8XU5kE5oRJVE18y9DhBVVJq1aRTGnsBA5g53f4iNOA2yw494f4LvSxvy+AHv2R50z6oTms
ZBsJiUOFRrY09pzQRWT+FNjjHPY4xq5FMyxuYMwC93oG7Sp8P//d9kv3um8bEwY9OP5weIhk
UyZYMPZmNB8RnP0OBezlCMbztPRp1PcDzx64t1yCIaFJXDBIkT96sLExNVocp8plk6s9FrUF
s99Hzzv1x0n98mNbrwL+LrjT6//5KtpYsP7rarMdr/8tRZPF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