Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2001 12:47:42 -0400 (EDT)
From:      marcus@marcuscom.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/30319: [MAINTAINER UPDATE] Update net/netatalk to 1.5pre7
Message-ID:  <200109041647.f84GlgQ93280@shumai.marcuscom.com>

next in thread | raw e-mail | index | archive | help

>Number:         30319
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] Update net/netatalk to 1.5pre7
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 04 09:50:06 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Joe Marcus Clarke
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
MarcusCom, In.c
>Environment:
System: FreeBSD shumai.marcuscom.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sun May 6 01:46:59 EDT 2001 root@shumai.marcuscom.com:/usr/src/sys/compile/SHUMAI i386


	
>Description:
	These patches upgrade net/netatalk from 1.5pre6 to 1.5pre7.
>How-To-Repeat:
	
>Fix:

*DELETED FILES:
 files/patch-config.h.in
 files/patch-configure
 files/patch-netatalk.pamd

diff -ruN netatalk.orig/Makefile netatalk/Makefile
--- netatalk.orig/Makefile	Tue Sep  4 12:41:37 2001
+++ netatalk/Makefile	Sun Sep  2 16:31:23 2001
@@ -6,40 +6,54 @@
 #
 
 PORTNAME=	netatalk
-PORTVERSION=	1.5p6
-PORTREVISION=	1
+PORTVERSION=	1.5p7
 CATEGORIES=	net print
 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	netatalk
-DISTNAME=	netatalk-1.5pre6
+DISTNAME=	netatalk-1.5pre7
 
 MAINTAINER=	marcus@marcuscom.com
 
+.if defined(WITH_CNID)
+LIB_DEPENDS=	db3.2:${PORTSDIR}/databases/db3
+.endif
 .if !exists(/usr/include/tcpd.h)
-LIB_DEPENDS=	wrap.7:${PORTSDIR}/security/tcp_wrapper
+LIB_DEPENDS+=	wrap.7:${PORTSDIR}/security/tcp_wrapper
 .endif
 
 CONFIGURE_ARGS+=	--with-tcp-wrappers \
-			--enable-lastdid
-# CONFIGURE_ARGS+=	--disable-admin-group
-# CONFIGURE_ARGS+=	--disable-ddp
-# CONFIGURE_ARGS+=	--with-shadow
-.if defined(NETATALK_WITH_PAM)
-CONFIGURE_ARGS+=	--with-pam # broken
+			--with-pkgconfdir=${PREFIX}/etc
+.if defined(WITH_PAM)
 PLIST_SUB+=             NETATALKPAM=""
 .else
+CONFIGURE_ARGS+=		--without-pam
 PLIST_SUB+=             NETATALKPAM="@comment "
 .endif
-GNU_CONFIGURE=	yes
+.if defined(WITH_CNID)
+# Configure EXPERIMENTAL CNID DID support.  This is an attmept to make
+# DIDs more persistent by using a Berkeley database to store the DID values.
+# This should hopefully allow aliases to work between restarts of afpd.
+# This has been tested on MacOS 9.2.1.  I have not gotten working on OS X.
+CONFIGURE_ARGS+=		--enable-cnid-db \
+						--with-db3=/usr/local
+.else
+# This method of DID calculation is not persistent, but has been tested to
+# work with MacOS X (10.0.4) as well as MacOS 7-9.2.1.
+CONFIGURE_ARGS+=		--with-did=last
+.endif
+USE_AUTOCONF=	yes
+USE_LIBTOOL=	yes
+LIBTOOLFILES=   configure
 USE_GMAKE=	yes
 FILES=		AppleVolumes.default AppleVolumes.system afpd.conf \
-		atalkd.conf netatalk.conf netatalk.pamd papd.conf
+		atalkd.conf papd.conf
 LINKS=		unbin unhex unsingle hqx2bin single2bin macbinary \
 		binheader nadheader
 MAN1=		achfile.1 aecho.1 afile.1 afppasswd.1 getzones.1 \
 		megatron.1 nbp.1 pap.1 psorder.1 hqx2bin.1 macbinary.1 \
 		nbplkup.1 nbprgstr.1 nbpunrgstr.1 papstatus.1 \
-		single2bin.1 unbin.1 unhex.1 unsingle.1
+		single2bin.1 unbin.1 unhex.1 unsingle.1 acleandir.1 \
+		netatalk-config.1 timeout.1
 MAN3=		atalk_aton.3 nbp_name.3
 MAN4=		atalk.4
 MAN5=		AppleVolumes.default.5 afpd.conf.5 atalkd.conf.5 \
@@ -51,7 +65,9 @@
 		> ${WRKSRC}/netatalk.sh
 
 post-install:
-	@${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh
+	@${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh \
+		${PREFIX}/etc/netatalk.pamd.dist ${PREFIX}/bin/test_parse_mtab \
+		${PREFIX}/bin/afpd-mtab.pl ${PREFIX}/etc/netatalk.conf.dist
 	${INSTALL_SCRIPT} ${WRKSRC}/netatalk.sh ${PREFIX}/etc/rc.d/netatalk.sh
 	${INSTALL_SCRIPT} ${WRKSRC}/contrib/macusers/macusers \
 		${PREFIX}/bin/macusers
@@ -62,5 +78,9 @@
 .for i in ${LINKS}
 	( cd ${PREFIX}/bin && ${LN} -sf megatron ${i} )
 .endfor
+
+.if defined(WITH_PAM)
+	@${CAT} ${PKGMESSAGE}
+.endif
 
 .include <bsd.port.mk>
diff -ruN netatalk.orig/distinfo netatalk/distinfo
--- netatalk.orig/distinfo	Tue Sep  4 12:41:37 2001
+++ netatalk/distinfo	Tue Aug 28 14:08:51 2001
@@ -1 +1 @@
-MD5 (netatalk-1.5pre6.tar.gz) = fdeb528ba0bbe4c2083a06ea2fffb773
+MD5 (netatalk-1.5pre7.tar.gz) = d8f93cd5a634497e1cdbe9f78c4f7240
diff -ruN netatalk.orig/files/patch-Makefile.in netatalk/files/patch-Makefile.in
--- netatalk.orig/files/patch-Makefile.in	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-Makefile.in	Thu Aug 30 12:03:40 2001
@@ -1,54 +1,18 @@
---- config/Makefile.in.orig	Thu Apr 12 15:27:32 2001
-+++ config/Makefile.in	Fri May 11 07:01:47 2001
-@@ -129,11 +129,11 @@
- 	$(mkinstalldirs) $(DESTDIR)$(configdir)
- 	@list='$(config_DATA)'; for p in $$list; do \
+--- config/Makefile.in.orig	Thu Aug 30 12:02:31 2001
++++ config/Makefile.in	Thu Aug 30 12:03:21 2001
+@@ -136,11 +136,11 @@
+ 	$(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
+ 	@list='$(pkgconf_DATA)'; for p in $$list; do \
  	  if test -f $(srcdir)/$$p; then \
--	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p"; \
--	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p; \
-+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p.dist"; \
-+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p.dist; \
+-	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p"; \
+-	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p; \
++	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p.dist"; \
++	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p.dist; \
  	  else if test -f $$p; then \
--	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p"; \
--	    $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p; \
-+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p.dist"; \
-+	    $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p.dist; \
+-	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p"; \
+-	    $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p; \
++	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p.dist"; \
++	    $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p.dist; \
  	  fi; fi; \
  	done
  
-@@ -145,16 +145,6 @@
- 
- install-pamDATA: $(pam_DATA)
- 	@$(NORMAL_INSTALL)
--	$(mkinstalldirs) $(DESTDIR)$(pamdir)
--	@list='$(pam_DATA)'; for p in $$list; do \
--	  if test -f $(srcdir)/$$p; then \
--	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pamdir)/$$p"; \
--	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pamdir)/$$p; \
--	  else if test -f $$p; then \
--	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pamdir)/$$p"; \
--	    $(INSTALL_DATA) $$p $(DESTDIR)$(pamdir)/$$p; \
--	  fi; fi; \
--	done
- 
- uninstall-pamDATA:
- 	@$(NORMAL_UNINSTALL)
-@@ -209,7 +199,7 @@
- install-strip:
- 	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
- installdirs:
--	$(mkinstalldirs)  $(DESTDIR)$(configdir) $(DESTDIR)$(pamdir)
-+	$(mkinstalldirs)  $(DESTDIR)$(configdir)
- 
- 
- mostlyclean-generic:
-@@ -258,9 +248,6 @@
- 
- @USE_PAM_TRUE@netatalk:
- @USE_PAM_TRUE@	cp -f $(PAMD) netatalk
--
--@USE_PAM_TRUE@install-data-local: netatalk
--@USE_PAM_TRUE@	$(INSTALL) netatalk $(DESTDIR)$(pamdir)/
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff -ruN netatalk.orig/files/patch-aa netatalk/files/patch-aa
--- netatalk.orig/files/patch-aa	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-aa	Sun Sep  2 03:19:43 2001
@@ -0,0 +1,177 @@
+--- libatalk/cnid/cnid_add.c.orig	Thu Aug 16 10:30:29 2001
++++ libatalk/cnid/cnid_add.c	Sun Sep  2 03:15:54 2001
+@@ -13,6 +13,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -41,23 +42,27 @@
+ {
+   DBT altkey, altdata;
+   DB_TXN *tid;
++  /* We create rc here because using rc is bad.  Why?  Well, if you 
++   * use rc once, then call another function which resets it, you're
++   * screwed. */
++  int rc = 0;
+ 
+   memset(&altkey, 0, sizeof(altkey));
+   memset(&altdata, 0, sizeof(altdata));
+   
+ retry:
+-  if ((errno = txn_begin(db->dbenv, ptid, &tid,0))) {
+-    return errno;
++  if ((rc = txn_begin(db->dbenv, ptid, &tid,0))) {
++    return rc;
+   }
+ 
+   /* main database */
+-  if ((errno = db->db_cnid->put(db->db_cnid, tid,
++  if ((rc = db->db_cnid->put(db->db_cnid, tid,
+ 			        key, data, DB_NOOVERWRITE))) {
+     txn_abort(tid);
+-    if (errno == DB_LOCK_DEADLOCK)
++    if (rc == DB_LOCK_DEADLOCK)
+       goto retry;
+ 
+-    return errno;
++    return rc;
+   }
+ 
+   /* dev/ino database */
+@@ -65,25 +70,25 @@
+   altkey.size = CNID_DEVINO_LEN;
+   altdata.data = key->data;
+   altdata.size = key->size;
+-  if ((errno = db->db_devino->put(db->db_devino, tid,
++  if ((rc = db->db_devino->put(db->db_devino, tid,
+ 				  &altkey, &altdata, 0))) {
+     txn_abort(tid);
+-    if (errno == DB_LOCK_DEADLOCK)
++    if (rc == DB_LOCK_DEADLOCK)
+       goto retry;
+ 
+-    return errno;
++    return rc;
+   }
+ 
+   /* did/name database */
+   altkey.data = (char *) data->data + CNID_DEVINO_LEN;
+   altkey.size = data->size - CNID_DEVINO_LEN;
+-  if ((errno = db->db_didname->put(db->db_didname, tid,
++  if ((rc = db->db_didname->put(db->db_didname, tid,
+ 				   &altkey, &altdata, 0))) {
+     txn_abort(tid);
+-    if (errno == DB_LOCK_DEADLOCK)
++    if (rc == DB_LOCK_DEADLOCK)
+       goto retry;
+ 
+-    return errno;
++    return rc;
+   }
+ 
+   return txn_commit(tid, 0);
+@@ -100,6 +105,7 @@
+   DBT rootinfo_key, rootinfo_data;
+   DB_TXN *tid;
+   cnid_t id, save;
++  int rc = 0;
+ 
+   int debug = 0;
+ 
+@@ -137,8 +143,8 @@
+    * cnid's to the database. */
+   if (ntohl(hint) >= CNID_START) {
+     /* if the key doesn't exist, add it in. don't fiddle with nextID. */
+-    errno = add_cnid(db, NULL, &key, &data);
+-    switch (errno) {
++    rc = add_cnid(db, NULL, &key, &data);
++    switch (rc) {
+     case DB_KEYEXIST: /* need to use RootInfo after all. */
+       break;
+     default:
+@@ -153,14 +159,14 @@
+ 
+   /* Abort and retry the modification. */
+   if (0) {
+-retry:    if ((errno = txn_abort(tid)) != 0)
+-              syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", errno);
++retry:    if ((rc = txn_abort(tid)) != 0)
++              syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", rc);
+           /* FALLTHROUGH */
+   }
+ 
+   /* Begin the transaction. */
+-  if ((errno = txn_begin(db->dbenv, NULL, &tid, 0)) != 0) {
+-    syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", errno);
++  if ((rc = txn_begin(db->dbenv, NULL, &tid, 0)) != 0) {
++    syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", rc);
+     goto cleanup_err;
+   }
+ 
+@@ -172,7 +178,7 @@
+   rootinfo_key.size = ROOTINFO_KEYLEN;
+ 
+   /* Get the key. */
+-  switch (errno = db->db_didname->get(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
++  switch (rc = db->db_didname->get(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
+   case DB_LOCK_DEADLOCK:
+           goto retry;
+   case 0:
+@@ -186,7 +192,7 @@
+             syslog(LOG_ERR, "cnid_add: using CNID_START for did %d, name %s as %d", did, name, hint);
+           break;
+   default:
+-          syslog(LOG_ERR, "cnid_add: unable to lookup rootinfo (%d)", errno);
++          syslog(LOG_ERR, "cnid_add: unable to lookup rootinfo (%d)", rc);
+ 		  goto cleanup_abort;
+  }
+ 
+@@ -194,12 +200,12 @@
+    * wrap-around. NOTE: i do it this way so that we can go back and
+    * fill in holes. */
+   save = id = ntohl(hint);
+-  while ((errno = add_cnid(db, tid, &key, &data))) {
++  while ((rc = add_cnid(db, tid, &key, &data))) {
+     /* don't use any of the special CNIDs */
+     if (++id < CNID_START)
+       id = CNID_START;
+ 
+-    if ((errno != DB_KEYEXIST) || (save == id)) {
++    if ((rc != DB_KEYEXIST) || (save == id)) {
+       syslog(LOG_ERR, "cnid_add: unable to add CNID(%x)", hint);
+       hint = 0;
+       goto cleanup_abort;
+@@ -211,21 +217,21 @@
+   rootinfo_data.data = &hint;
+   rootinfo_data.size = sizeof(hint);
+ 
+-  switch (errno = db->db_didname->put(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
++  switch (rc = db->db_didname->put(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
+   case DB_LOCK_DEADLOCK:
+           goto retry;
+   case 0:
+           break;
+   default:
+-          syslog(LOG_ERR, "cnid_add: unable to update rootinfo (%d)", errno);
++          syslog(LOG_ERR, "cnid_add: unable to update rootinfo (%d)", rc);
+           goto cleanup_abort;
+   }
+ 
+ 
+ cleanup_commit:
+   /* The transaction finished, commit it. */
+-  if ((errno = txn_commit(tid, 0)) != 0) {
+-    syslog(LOG_ERR, "cnid_add: txn_commit failed (%d)", errno);
++  if ((rc = txn_commit(tid, 0)) != 0) {
++    syslog(LOG_ERR, "cnid_add: txn_commit failed (%d)", rc);
+     goto cleanup_err;
+   }
+ 
+@@ -239,3 +245,4 @@
+ cleanup_err:
+   return 0;
+ }
++#endif /* CNID_DB */
diff -ruN netatalk.orig/files/patch-ab netatalk/files/patch-ab
--- netatalk.orig/files/patch-ab	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ab	Fri Aug 31 13:34:11 2001
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_close.c.orig	Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_close.c	Wed Aug 29 15:48:45 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+@@ -69,3 +70,4 @@
+ 
+   free(db);
+ }
++#endif /* CNID_DB */
+
diff -ruN netatalk.orig/files/patch-ac netatalk/files/patch-ac
--- netatalk.orig/files/patch-ac	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ac	Fri Aug 31 13:34:34 2001
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_delete.c.orig	Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_delete.c	Wed Aug 29 15:49:49 2001
+@@ -11,6 +11,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -111,3 +112,4 @@
+   syslog(LOG_ERR, "cnid_del: unable to delete CNID(%x)", id);
+   return errno;
+ }
++#endif /* CNID_DB */
+
diff -ruN netatalk.orig/files/patch-ad netatalk/files/patch-ad
--- netatalk.orig/files/patch-ad	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ad	Fri Aug 31 13:34:56 2001
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_get.c.orig	Wed Aug 15 12:16:25 2001
++++ libatalk/cnid/cnid_get.c	Wed Aug 29 15:49:52 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -57,3 +58,4 @@
+   memcpy(&id, data.data, sizeof(id));
+   return id;
+ }
++#endif /* CNID_DB */
+
diff -ruN netatalk.orig/files/patch-ae netatalk/files/patch-ae
--- netatalk.orig/files/patch-ae	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ae	Fri Aug 31 13:35:17 2001
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_lookup.c.orig	Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_lookup.c	Wed Aug 29 15:49:55 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -115,3 +116,4 @@
+     syslog(LOG_ERR, "cnid_lookup: looked up did %d, name %s as %d (needed update)", did, name, id);
+   return id;
+ }
++#endif /* CNID_DB */
+
diff -ruN netatalk.orig/files/patch-af netatalk/files/patch-af
--- netatalk.orig/files/patch-af	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-af	Fri Aug 31 13:35:41 2001
@@ -1,12 +1,18 @@
-*** etc/atalkd/rtmp.c.orig	Wed Feb 25 18:28:16 1998
---- etc/atalkd/rtmp.c	Wed Feb 25 18:28:29 1998
-***************
-*** 7,12 ****
---- 7,13 ----
-  #include <sys/types.h>
-  #include <sys/socket.h>
-  #include <sys/ioctl.h>
-+ #include <sys/time.h>
-  #include <net/if.h>
-  #include <net/route.h>
-  #include <netatalk/endian.h>
+--- libatalk/cnid/cnid_nextid.c.orig	Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_nextid.c	Wed Aug 29 15:50:04 2001
+@@ -7,6 +7,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <db.h>
+ 
+ #include <atalk/adouble.h>
+@@ -29,5 +30,6 @@
+   memcpy(&id, ad_entry(&db->rootinfo, ADEID_DID), sizeof(id));
+   return id;
+ }
++#endif /* CNID_DB */
+ #endif
+ 
+
diff -ruN netatalk.orig/files/patch-ag netatalk/files/patch-ag
--- netatalk.orig/files/patch-ag	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ag	Sun Sep  2 03:19:55 2001
@@ -0,0 +1,50 @@
+--- libatalk/cnid/cnid_open.c.orig	Thu Aug 16 10:30:29 2001
++++ libatalk/cnid/cnid_open.c	Sun Sep  2 03:13:49 2001
+@@ -37,6 +37,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -83,7 +84,7 @@
+ #define DBVERSION        DBVERSION1
+ 
+ #define DBOPTIONS    (DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | \
+-DB_INIT_LOG | DB_INIT_TXN | DB_TXN_NOSYNC | DB_RECOVER)
++DB_INIT_LOG | DB_INIT_TXN | DB_RECOVER)
+ 
+ #define MAXITER     0xFFFF /* maximum number of simultaneously open CNID
+ 			    * databases. */
+@@ -100,7 +101,7 @@
+ 
+ /* sort did's and then names. this is for unix paths.
+  * i.e., did/unixname lookups. */
+-static int compare_unix(const DBT *a, const DBT *b)
++static int compare_unix(DB* db, const DBT *a, const DBT *b)
+ {
+   u_int8_t *sa, *sb;
+   int len, ret;
+@@ -214,6 +215,8 @@
+     goto fail_lock;
+   }
+ 
++  /* Check to see if a DBENV already exists.  If it does, join it. */
++  if (db->dbenv->open(db->dbenv, path, DB_JOINENV, 0666)) {
+   if (db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666)) {
+ 
+     /* try with a shared memory pool */
+@@ -229,6 +232,7 @@
+     open_flag = DB_RDONLY;
+     syslog(LOG_INFO, "cnid_open: read-only CNID database");
+   }
++  }
+ 
+   /* did/name reverse mapping. we use a btree for this one. */
+   if (db_create(&db->db_didname, db->dbenv, 0))
+@@ -358,3 +362,4 @@
+   free(db);
+   return NULL;
+ }
++#endif /* CNID_DB */
diff -ruN netatalk.orig/files/patch-ah netatalk/files/patch-ah
--- netatalk.orig/files/patch-ah	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ah	Fri Aug 31 13:36:22 2001
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_resolve.c.orig	Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_resolve.c	Wed Aug 29 15:50:34 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -48,3 +49,4 @@
+   memcpy(id, (char *) data.data + CNID_DEVINO_LEN, sizeof(*id));
+   return (char *) data.data + CNID_HEADER_LEN;
+ }
++#endif /* CNID_DB */
+
diff -ruN netatalk.orig/files/patch-ai netatalk/files/patch-ai
--- netatalk.orig/files/patch-ai	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-ai	Fri Aug 31 13:36:48 2001
@@ -0,0 +1,15 @@
+--- libatalk/cnid/cnid_update.c.orig	Fri Aug 17 00:30:30 2001
++++ libatalk/cnid/cnid_update.c	Wed Aug 29 15:50:39 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -136,3 +137,4 @@
+   syslog(LOG_ERR, "cnid_update: can't update CNID(%x)", id);
+   return -1;
+ }
++#endif /* CNID_DB */
diff -ruN netatalk.orig/files/patch-config.h.in netatalk/files/patch-config.h.in
--- netatalk.orig/files/patch-config.h.in	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-config.h.in	Wed Dec 31 19:00:00 1969
@@ -1,11 +0,0 @@
---- config.h.in.orig	Thu Apr 12 15:27:26 2001
-+++ config.h.in	Fri May 18 08:13:50 2001
-@@ -84,7 +84,7 @@
- #undef HAVE_GCC_MEMCPY_BUG
- #undef MACOSX_SERVER
- #undef NEED_QUOTACTL_WRAPPER
--#undef NO_CRYPT_H
-+#define NO_CRYPT_H
- #undef NO_DDP
- #undef NO_DLFCN_H
- #undef NO_STRUCT_TM_GMTOFF
diff -ruN netatalk.orig/files/patch-configure netatalk/files/patch-configure
--- netatalk.orig/files/patch-configure	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-configure	Wed Dec 31 19:00:00 1969
@@ -1,20 +0,0 @@
---- configure.orig	Thu Apr 12 15:27:42 2001
-+++ configure	Fri May 18 08:13:51 2001
-@@ -4906,6 +4906,7 @@
- 
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+if test "${with_pam+set}" = set; then
-   echo "$ac_t""yes" 1>&6
-   cat >> confdefs.h <<\EOF
- #define USE_PAM 1
-@@ -4914,6 +4915,9 @@
- 	LIBS="$LIBS -lpam"
- 	compile_pam=yes
- 
-+else
-+  echo "$ac_t""no" 1>&6
-+fi
- else
-   echo "$ac_t""no" 1>&6
- fi
diff -ruN netatalk.orig/files/patch-configure.in netatalk/files/patch-configure.in
--- netatalk.orig/files/patch-configure.in	Wed Dec 31 19:00:00 1969
+++ netatalk/files/patch-configure.in	Sat Sep  1 19:34:24 2001
@@ -0,0 +1,25 @@
+--- configure.in.orig	Sat Sep  1 19:32:49 2001
++++ configure.in	Sat Sep  1 19:34:07 2001
+@@ -262,18 +262,18 @@
+ db3_found=no
+ for db3dir in "" $trydb3dir /usr /usr /usr/local ; do
+ 	if test -f "$db3dir/include/db3/db.h" ; then
+-		LDFLAGS="$LDFLAGS -L$db3dir/lib -L$db3dir"
+-		CFLAGS="$CFLAGS -I$db3dir/include"
++		LDFLAGS="$LDFLAGS -L$db3dir/lib"
++		CFLAGS="$CFLAGS -I$db3dir/include/db3"
+ 
+ 		dnl If we require DB3, die if we don't have it
+ 		if test "x$db3_required" != "xno"; then
+-			AC_CHECK_LIB(db, main,
++			AC_CHECK_LIB(db3, main,
+ 				dnl AC_MSG_RESULT([enabling db3 support])
+ 				db3_found=yes
+ 				dnl -- also enable CNID DB when this is found
+ 				AC_DEFINE(CNID_DB, 1)
+ 				AC_MSG_RESULT([using persistent cnid database per volume])
+-				LIBS="$LIBS -ldb",
++				LIBS="$LIBS -ldb3",
+ 				dnl Not Found
+ 				AC_MSG_ERROR([Berkeley DB3 library not found!])
+ 			)
diff -ruN netatalk.orig/files/patch-macusers netatalk/files/patch-macusers
--- netatalk.orig/files/patch-macusers	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-macusers	Wed Aug 29 12:24:58 2001
@@ -1,59 +1,38 @@
---- contrib/macusers/macusers.orig	Fri May 18 14:09:26 2001
-+++ contrib/macusers/macusers	Fri May 18 14:08:28 2001
-@@ -1,52 +1,92 @@
+--- contrib/macusers/macusers.orig	Wed Aug 29 12:20:32 2001
++++ contrib/macusers/macusers	Sun Jun 17 01:47:44 2001
+@@ -1,8 +1,8 @@
  #!/usr/bin/perl
+-# $Id: macusers,v 1.4 2001/06/29 14:14:46 rufustfirefly Exp $
  
-+use strict;
+ use strict;
+-use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT $LSOF);
 +use Socket;
 +use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT_NO $ASIP_PORT $LSOF);
-+
+ 
  # Written for linux; may have to be modified for your brand of Unix.
  
--$MAC_PROCESS="afpd";
--$PS_STR="-ef";
--$ASIP_PORT="afpovertcp";
-+# Support for FreeBSD added by Joe Clarke <marcus@marcuscom.com>.
-+# Support could probably be extended for *BSD, but I do not have Net or
-+# OpenBSD machines to test with.  Code has also been cleaned up and made
-+# to compile under strict.
-+#
-+# The new lsof call should also be quicker as it does not involve a 
-+# second pipeline.
-+#
-+# Support has also been added for 16 character usernames.
-+
-+$MAC_PROCESS = "afpd";
-+if ( $^O eq "freebsd" ) {
-+        $PS_STR    = "-awwxouser,pid,ppid,start,command";
-+        $MATCH_STR = '(\w+)\s+(\d+)\s+(\d+)\s+([\d\w:]+)';
-+}
-+else {
-+        $PS_STR    = "-ef";
-+        $MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
-+}
+@@ -25,10 +25,11 @@
+         $PS_STR    = "-ef";
+         $MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
+ }
+-$ASIP_PORT = "afpovertcp";
 +$ASIP_PORT    = "afpovertcp";
 +$ASIP_PORT_NO = 548;
  
  # Change to 0 if you don't have lsof
--$LSOF=1;
+-$LSOF = 1;
 +$LSOF = 0;
-+my %mac = ();
-+
-+if ( $LSOF == 1 ) {
-+        open( LSOF, "lsof -i :$ASIP_PORT |" );
-+
-+        while (<LSOF>) {
-+                next if ( $_ !~ /$ASIP_PORT/ );
-+                $_ =~ /\w+\s+(\d+).*->([\w\.-]+).*/;
-+                my ( $pid, $host );
-+                $pid = $1;
-+                $host = $2;
-+                ($host) = ( $host =~ /(^[\w\d\-]+)/ );
-+                $mac{$pid} = $host;
-+        }
+ my %mac = ();
+ 
+ if ( $LSOF == 1 ) {
+@@ -43,8 +44,25 @@
+                 ($host) = ( $host =~ /(^[\w\d\-]+)/ );
+                 $mac{$pid} = $host;
+         }
+-
 +        print
 +"PID      UID      Username         Name                 Logintime Mac\n";
-+        close(LSOF);
+         close(LSOF);
 +}
 +elsif ( $^O eq "freebsd" ) {
 +        open( SOCKSTAT, "sockstat -4 | grep $MAC_PROCESS | grep -v grep |" );
@@ -70,69 +49,6 @@
 +                ($host) = ( $host =~ /(^[\w\d\-]+)/ );
 +                $mac{$pid} = $host;
 +        }
-+        print
-+"PID      UID      Username         Name                 Logintime Mac\n";
-+}
-+else {
-+        print
-+          "PID      UID      Username         Name                 Logintime\n";
-+}
-+
-+open( PS, "ps $PS_STR |" ) || die "Unable to open a pipe to ``ps''";
- 
--if ($LSOF == 1 )
--{
--  open(LSOF,"lsof -i | grep $ASIP_PORT |");
--
--  while(<LSOF>)
--  {
--    if ($_ !~ /$ASIP_PORT/)
--    {
--      next;
--    }
--    $_=~/\w+\s+(\d+).*->([\w-]+).*/;
--    $pid=$1; $host=$2;
--    $mac{$pid}=$host;
--  }
--
--  close(LSOF);
--  print "PID      UID      Usercode Name                 Logintime Mac\n";
--}
--else
--{
--  print "PID      UID      Usercode Name                 Logintime\n";
--}
--
--open(PS," ps $PS_STR |") || die "cannot do ps";
--
--while(<PS>)
--{
--  if ($_ !~ /$MAC_PROCESS/ )
--  {
--    next;
--  }
--  $_=~ /\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)/;
--  $user=$1; $pid=$2; $ppid=$3; $time=$4;
--  if ($ppid != 1)
--  {
--    ($t,$t,$uid,$t,$t,$t,$name,$t,$t)=getpwnam($user);
--    printf "%-8d %-8d %-8s %-20s %-9s %s\n",$pid,$uid,$user,$name,$time,$mac{$pid};
--  }
-+while (<PS>) {
-+        next if ( $_ !~ /$MAC_PROCESS/ );
-+        my ( $user, $pid, $ppid, $time, $name, $uid, $t );
-+        $_ =~ /$MATCH_STR/;
-+        $user = $1;
-+        $pid  = $2;
-+        $ppid = $3;
-+        $time = $4;
-+
-+        if ( $ppid != 1 ) {
-+                ( $t, $t, $uid, $t, $t, $t, $name, $t, $t ) = getpwnam($user);
-+                printf "%-8d %-8d %-16s %-20s %-9s %s\n", $pid, $uid, $user,
-+                  $name, $time, $mac{$pid};
-+        }
+         print
+ "PID      UID      Username         Name                 Logintime Mac\n";
  }
- 
--close(PS);  
-+close(PS);
diff -ruN netatalk.orig/files/patch-netatalk.pamd netatalk/files/patch-netatalk.pamd
--- netatalk.orig/files/patch-netatalk.pamd	Tue Sep  4 12:41:37 2001
+++ netatalk/files/patch-netatalk.pamd	Wed Dec 31 19:00:00 1969
@@ -1,13 +0,0 @@
---- config/netatalk.pamd.orig	Tue Jul 25 23:08:59 2000
-+++ config/netatalk.pamd	Fri May 18 08:13:51 2001
-@@ -1,6 +1,5 @@
- #%PAM-1.0
--auth       required	/lib/security/pam_pwdb.so shadow
--account    required	/lib/security/pam_pwdb.so 
--#password   required	/lib/security/pam_cracklib.so
--#password   required	/lib/security/pam_pwdb.so shadow use_authtok
--session    required	/lib/security/pam_pwdb.so 
-+auth       required	pam_unix.so
-+account    required	pam_unix.so
-+password   required	pam_unix.so
-+session    required	pam_unix.so
diff -ruN netatalk.orig/pkg-message netatalk/pkg-message
--- netatalk.orig/pkg-message	Wed Dec 31 19:00:00 1969
+++ netatalk/pkg-message	Thu Aug 30 12:39:49 2001
@@ -0,0 +1,8 @@
+###
+You need to edit /etc/pam.conf to add support for netatalk.  To do so, add the 
+following three lines to this file:
+
+netatalk auth    required    pam_unix.so         try_first_pass
+netatalk account required    pam_unix.so         try_first_pass
+netatalk session required    pam_permit.so
+###
diff -ruN netatalk.orig/pkg-plist netatalk/pkg-plist
--- netatalk.orig/pkg-plist	Tue Sep  4 12:41:37 2001
+++ netatalk/pkg-plist	Thu Aug 30 12:48:59 2001
@@ -32,6 +32,7 @@
 bin/nbprgstr
 bin/nbpunrgstr
 bin/netatalk-config
+bin/netatalkshorternamelinks.pl
 bin/pap
 bin/papstatus
 bin/parsecode
@@ -74,27 +75,34 @@
 @unexec if cmp -s %D/etc/atalkd.conf %D/etc/atalkd.conf.dist; then rm -f %D/etc/atalkd.conf; fi
 etc/atalkd.conf.dist
 @exec [ ! -f %B/atalkd.conf ] && cp %B/%f %B/atalkd.conf
-@unexec if cmp -s %D/etc/netatalk.conf %D/etc/netatalk.conf.dist; then rm -f %D/etc/netatalk.conf; fi
-etc/netatalk.conf.dist
-@exec [ ! -f %B/netatalk.conf ] && cp %B/%f %B/netatalk.conf
-@unexec if cmp -s %D/etc/netatalk.pamd %D/etc/netatalk.pamd.dist; then rm -f %D/etc/netatalk.pamd; fi
-etc/netatalk.pamd.dist
-@exec [ ! -f %B/netatalk.pamd ] && cp %B/%f %B/netatalk.pamd
 @unexec if cmp -s %D/etc/papd.conf %D/etc/papd.conf.dist; then rm -f %D/etc/papd.conf; fi
 etc/papd.conf.dist
 @exec [ ! -f %B/papd.conf ] && cp %B/%f %B/papd.conf
 etc/nls/maccode.437
 etc/nls/maccode.850
 etc/nls/maccode.iso8859-1
+etc/nls/maccode.iso8859-1.adapted
 etc/rc.d/netatalk.sh
 etc/uams/uams_clrtxt.so
 etc/uams/uams_dhx.so
 %%NETATALKPAM%%etc/uams/uams_dhx_pam.so
+%%NETATALKPAM%%etc/uams/uams_dhx_pam.a
+%%NETATALKPAM%%etc/uams/uams_dhx_pam.la
 etc/uams/uams_dhx_passwd.so
+etc/uams/uams_dhx_passwd.a
+etc/uams/uams_dhx_passwd.la
 etc/uams/uams_guest.so
+etc/uams/uams_guest.a
+etc/uams/uams_guest.la
 %%NETATALKPAM%%etc/uams/uams_pam.so
+%%NETATALKPAM%%etc/uams/uams_pam.a
+%%NETATALKPAM%%etc/uams/uams_pam.la
 etc/uams/uams_passwd.so
+etc/uams/uams_passwd.a
+etc/uams/uams_passwd.la
 etc/uams/uams_randnum.so
+etc/uams/uams_randnum.a
+etc/uams/uams_randnum.la
 @dirrm etc/nls
 @dirrm etc/uams
 include/atalk/adouble.h
@@ -133,3 +141,4 @@
 lib/libatalk.a
 lib/libatalk.la
 share/aclocal/netatalk.m4
+share/netatalk/pagecount.ps
	
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109041647.f84GlgQ93280>