pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/coda Builds and installs on Solaris. The changes:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f9802823a196
branches:  trunk
changeset: 645360:f9802823a196
user:      hauke <hauke%pkgsrc.org@localhost>
date:      Tue Jan 27 15:21:52 2015 +0000

description:
Builds and installs on Solaris. The changes:

o various explicit #includes
o sources use {u_,u}int*_t in equal share, so just build with -D
o providing Solaris' MAXHOSTNAMELEN with -D avoids patching half a dozen files
o misc. build fixes

Use pkgsrc CONF_FILES framework
Make pkglint happy

TODO: Test on Solaris, SMF config files for venus and server

diffstat:

 net/coda/Makefile                                       |   38 ++++-
 net/coda/PLIST                                          |    8 +-
 net/coda/distinfo                                       |   17 ++-
 net/coda/patches/patch-ac                               |   28 ----
 net/coda/patches/patch-coda-src_kerndep_coda.h          |   23 +++
 net/coda/patches/patch-coda-src_kerndep_pioctl.h        |   15 ++
 net/coda/patches/patch-coda-src_librepair_repio.cc      |  103 ++++++++++++++++
 net/coda/patches/patch-coda-src_resolution_rescoord.cc  |   14 ++
 net/coda/patches/patch-coda-src_venus_Makefile.in       |   15 ++
 net/coda/patches/patch-coda-src_venus_fso_dir.cc        |   14 ++
 net/coda/patches/patch-coda-src_venus_venus.cc          |   14 ++
 net/coda/patches/patch-coda-src_venus_venusrecov.cc     |   14 ++
 net/coda/patches/patch-coda-src_venus_vproc_vfscalls.cc |   16 ++
 net/coda/patches/patch-coda-src_venus_worker.cc         |   40 ++++++
 net/coda/patches/patch-coda-src_vice_Makefile.in        |   15 ++
 net/coda/patches/patch-coda-src_vice_codaproc2.cc       |   14 ++
 net/coda/patches/patch-coda-src_volutil_vol-ancient.cc  |   14 ++
 net/coda/patches/patch-coda-src_volutil_vol-dump.cc     |   14 ++
 18 files changed, 376 insertions(+), 40 deletions(-)

diffs (truncated from 521 to 300 lines):

diff -r d839e61c1eaa -r f9802823a196 net/coda/Makefile
--- a/net/coda/Makefile Tue Jan 27 14:52:56 2015 +0000
+++ b/net/coda/Makefile Tue Jan 27 15:21:52 2015 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2015/01/04 03:44:00 dholland Exp $
+# $NetBSD: Makefile,v 1.22 2015/01/27 15:21:52 hauke Exp $
 #
 
 DISTNAME=      coda-6.9.5
-PKGREVISION=   7
+PKGREVISION=   8
 CATEGORIES=    net
 MASTER_SITES=  http://www.coda.cs.cmu.edu/pub/coda/src/
 
@@ -18,10 +18,36 @@
 # See http://coda.wikidev.net/Quick_Client_Action for hints on how
 # to configure venus.
 
-USE_TOOLS+=    gmake pkg-config perl perl:run
-GNU_CONFIGURE= yes
-USE_LANGUAGES= c c++
-REPLACE_PERL=  coda-src/scripts/tape.pl coda-src/scripts/volmunge
+PKG_SYSCONFSUBDIR=     coda
+
+#SMF_INSTANCES=                TODO
+
+EGDIR=                 ${PREFIX}/share/examples/coda
+CONF_FILES+=           ${EGDIR}/server.conf    ${PKG_SYSCONFDIR}/server.conf
+CONF_FILES+=           ${EGDIR}/venus.conf     ${PKG_SYSCONFDIR}/venus.conf
+CONF_FILES+=           ${EGDIR}/realms         ${PKG_SYSCONFDIR}/realms
+
+INSTALLATION_DIRS+=    ${EGDIR}
+
+USE_TOOLS+=            gmake pkg-config perl perl:run
+GNU_CONFIGURE=         yes
+USE_LANGUAGES=         c c++
+REPLACE_PERL=          coda-src/scripts/tape.pl coda-src/scripts/volmunge
+
+# Sources use both in equal share 
+CFLAGS.SunOS+=         -Du_int32_t=uint32_t
+CFLAGS.SunOS+=         -Du_int16_t=uint16_t
+CFLAGS.SunOS+=         -Du_int8_t=uint8_t
+# Use the value from <netdb.h>
+CFLAGS.SunOS+=         -DMAXHOSTNAMELEN=256
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/coda-src/vice/server.conf.ex \
+                 ${DESTDIR}${EGDIR}/server.conf
+       ${INSTALL_DATA} ${WRKSRC}/coda-src/venus/venus.conf.ex \
+                 ${DESTDIR}${EGDIR}/venus.conf
+       ${INSTALL_DATA} ${WRKSRC}/coda-src/venus/realms \
+                 ${DESTDIR}${EGDIR}/realms
 
 .include "../../devel/lwp/buildlink3.mk"
 .include "../../devel/rpc2/buildlink3.mk"
diff -r d839e61c1eaa -r f9802823a196 net/coda/PLIST
--- a/net/coda/PLIST    Tue Jan 27 14:52:56 2015 +0000
+++ b/net/coda/PLIST    Tue Jan 27 15:21:52 2015 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:09:24 joerg Exp $
+@comment $NetBSD: PLIST,v 1.5 2015/01/27 15:21:52 hauke Exp $
 bin/au
 bin/cfs
 bin/clog
@@ -24,9 +24,6 @@
 bin/spy
 bin/xaskuser
 bin/xfrepair
-etc/coda/realms
-etc/coda/server.conf.ex
-etc/coda/venus.conf.ex
 man/man1/au.1
 man/man1/cfs.1
 man/man1/clog.1
@@ -107,3 +104,6 @@
 sbin/volmunge
 sbin/volutil
 sbin/vutil
+share/examples/coda/realms
+share/examples/coda/server.conf
+share/examples/coda/venus.conf
diff -r d839e61c1eaa -r f9802823a196 net/coda/distinfo
--- a/net/coda/distinfo Tue Jan 27 14:52:56 2015 +0000
+++ b/net/coda/distinfo Tue Jan 27 15:21:52 2015 +0000
@@ -1,8 +1,21 @@
-$NetBSD: distinfo,v 1.10 2012/08/03 10:32:54 marino Exp $
+$NetBSD: distinfo,v 1.11 2015/01/27 15:21:52 hauke Exp $
 
 SHA1 (coda-6.9.5.tar.gz) = 248af27c506f5c3be4c4e53f821c9c904580fe60
 RMD160 (coda-6.9.5.tar.gz) = 9ef0643aacc7d1352ef253af00d4c7e6ad9e1f78
 Size (coda-6.9.5.tar.gz) = 1723098 bytes
-SHA1 (patch-ac) = b9f9fd68c633e09717252562b06238b87df1a6b7
 SHA1 (patch-ad) = adfee7c5d7de913ee3b898a13bf7acfeac52b765
 SHA1 (patch-coda-src_dir_dirbody.c) = 3e3524a4a03ce359956ae00d9b24d1aa3292c752
+SHA1 (patch-coda-src_kerndep_coda.h) = 14af6b7554ce36c55f426ab62630df629c2df6db
+SHA1 (patch-coda-src_kerndep_pioctl.h) = 1eae6d05b461f6e235d8f290ef41c10877f59650
+SHA1 (patch-coda-src_librepair_repio.cc) = 3a79f16fb51bdeb76ccceb095f1409bec4bf098f
+SHA1 (patch-coda-src_resolution_rescoord.cc) = a885ced4a7bcfe38b14a0891d0ce84cc9c53ef19
+SHA1 (patch-coda-src_venus_Makefile.in) = ecfb5d2d8bf806dddaf360f2b36d12b871e9f0e2
+SHA1 (patch-coda-src_venus_fso_dir.cc) = 3e02f3bdb02639a82db1be9c138267431d36697c
+SHA1 (patch-coda-src_venus_venus.cc) = 93c115fb8a8b22df3fdb166162410c67820dcb4c
+SHA1 (patch-coda-src_venus_venusrecov.cc) = 089b6c5db50a78b7df9ca5c504628dacb3c550f9
+SHA1 (patch-coda-src_venus_vproc_vfscalls.cc) = da71de1648e09aefdd442c4ab3cb2463aad6d397
+SHA1 (patch-coda-src_venus_worker.cc) = d8308eea23d0583528e2e4b11b5ad6076e986410
+SHA1 (patch-coda-src_vice_Makefile.in) = 07744dcc45c269ecfe1f4c4feba37e7b7047c00b
+SHA1 (patch-coda-src_vice_codaproc2.cc) = 81dfacf9a0cda4bd8f891fbf0dacf0001a46bd02
+SHA1 (patch-coda-src_volutil_vol-ancient.cc) = e69f3e492aa78cbf5c4dbd34c15424ee7ebd150c
+SHA1 (patch-coda-src_volutil_vol-dump.cc) = 6405a0be3edeb1f1cdb74d705c0fcccae1a8cefc
diff -r d839e61c1eaa -r f9802823a196 net/coda/patches/patch-ac
--- a/net/coda/patches/patch-ac Tue Jan 27 14:52:56 2015 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-$NetBSD: patch-ac,v 1.6 2012/08/03 10:32:55 marino Exp $
-
-Added experimental code to support mounting on NetBSD >= 4.99.24. The
-magic value of 256 is taken from coda_vfsops in coda_vfsops.c.
-
---- coda-src/venus/worker.cc.orig      2008-10-06 16:52:22.000000000 +0000
-+++ coda-src/venus/worker.cc
-@@ -403,11 +403,19 @@ void VFSMount()
-           error = nmount(md, 6, 0);
-       }
- #endif
--                      
-+
-+#if defined(__NetBSD__) && defined(__NetBSD_Prereq__) && __NetBSD_Prereq__(4,99,24)
-+      if (error < 0)
-+          error = mount("coda", venusRoot, 0, (void *)kernDevice, 256);
-+      if (error < 0)
-+          error = mount("cfs", venusRoot, 0, (void *)kernDevice, 256);
-+#else
-       if (error < 0)
-           error = mount("coda", venusRoot, 0, kernDevice);
-       if (error < 0)
-           error = mount("cfs", venusRoot, 0, kernDevice);
-+#endif
-+
- #if defined(__FreeBSD__) && !defined(__FreeBSD_version)
- #define MOUNT_CFS 19
-       if (error < 0)
diff -r d839e61c1eaa -r f9802823a196 net/coda/patches/patch-coda-src_kerndep_coda.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/coda/patches/patch-coda-src_kerndep_coda.h    Tue Jan 27 15:21:52 2015 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-coda-src_kerndep_coda.h,v 1.1 2015/01/27 15:21:52 hauke Exp $
+
+SunOS defines int*_t, but not u_int*_t.
+    
+--- ./coda-src/kerndep/coda.h.orig     2007-08-01 18:32:36.000000000 +0000
++++ ./coda-src/kerndep/coda.h
+@@ -112,11 +112,14 @@ typedef unsigned long long u_quad_t;
+ #endif
+ 
+ /* Solaris Definitions */
+-#if defined(sun)
++#if defined(__sun) && defined(__SVR4)
+ #include <sys/types.h>
+ #include <sys/time.h>
++typedef unsigned char     u_int8_t;
++typedef unsigned short           u_int16_t;
++typedef unsigned int     u_int32_t;
+ typedef unsigned long long u_quad_t;
+-#undef __BIT_TYPES_DEFINED__
++#define __BIT_TYPES_DEFINED__
+ #endif
+ 
+ /* Mac OS X / Darwin */
diff -r d839e61c1eaa -r f9802823a196 net/coda/patches/patch-coda-src_kerndep_pioctl.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/coda/patches/patch-coda-src_kerndep_pioctl.h  Tue Jan 27 15:21:52 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-coda-src_kerndep_pioctl.h,v 1.3 2015/01/27 15:21:52 hauke Exp $
+
+SunOS wants missing _IOC* defines, too.
+    
+--- coda-src/kerndep/pioctl.h.orig     2006-11-03 15:58:08.000000000 +0000
++++ coda-src/kerndep/pioctl.h
+@@ -81,7 +81,7 @@ int pioctl(const char *path, unsigned lo
+ /* unpacking macros */
+ #ifndef _IOC_NR
+ 
+-#if defined(__NetBSD__) || defined(__FreeBSD__)
++#if defined(__NetBSD__) || defined(__FreeBSD__) || (defined (__sun) && defined(__SVR4))
+ #define _IOC_TYPEMASK 0xff
+ #define _IOC_TYPESHIFT        8
+ #define _IOC_NRMASK   0xff
diff -r d839e61c1eaa -r f9802823a196 net/coda/patches/patch-coda-src_librepair_repio.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/coda/patches/patch-coda-src_librepair_repio.cc        Tue Jan 27 15:21:52 2015 +0000
@@ -0,0 +1,103 @@
+$NetBSD: patch-coda-src_librepair_repio.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
+
+SunOS has ERR #defined somewhere, rename goto label
+
+--- ./coda-src/librepair/repio.cc.orig 2007-12-17 17:20:11.000000000 +0000
++++ ./coda-src/librepair/repio.cc
+@@ -179,7 +179,7 @@ int repair_getdfile(char *fname, int inf
+ 
+     if (replicaList == NULL) {
+       sprintf(errmsg, "repair_getdfile: bad replicaList ptr!");
+-      goto ERR;
++      goto Error;
+     }
+ 
+     if (fname == NULL) ff = fdopen(infd, "r");
+@@ -195,14 +195,14 @@ int repair_getdfile(char *fname, int inf
+     fread(&x, sizeof(int), 1, ff);
+     if (ferror(ff) || feof(ff)) {
+       sprintf(errmsg, "repair_getdfile: replicaCount parsing failed!");
+-      goto ERR;
++      goto Error;
+     }
+     *replicaCount = ntohl(x);
+ 
+     *replicaList = (struct listhdr *) calloc(*replicaCount, sizeof(struct listhdr));
+     if (*replicaList == NULL) {
+       sprintf(errmsg, "repair_getdfile: replicaList allocation failed!\n\telements= %x\tx= %d\tsizeof(struct listhdr)= %d\n", *replicaCount, x, sizeof(struct listhdr));
+-      goto ERR;
++      goto Error;
+     }
+ 
+     perror("repair_getdfile: list created");
+@@ -211,14 +211,14 @@ int repair_getdfile(char *fname, int inf
+       fread(&x, sizeof(int), 1, ff);
+       if (ferror(ff) || feof(ff)) {
+         sprintf(errmsg, "repair_getdfile: fread failed!");
+-        goto ERR;
++        goto Error;
+       }
+       (*replicaList)[i].replicaFid.Volume  = ntohl(x);
+ 
+       fread(&x, sizeof(int), 1, ff);
+       if (ferror(ff) || feof(ff)) {
+         sprintf(errmsg, "repair_getdfile: fread failed!");
+-        goto ERR;
++        goto Error;
+       }
+ 
+       (*replicaList)[i].repairCount  = ntohl(x);      
+@@ -232,7 +232,7 @@ int repair_getdfile(char *fname, int inf
+                                        sizeof(struct repair));
+           if (!r) {
+             sprintf(errmsg, "repair_getdfile: repair calloc failed!\n\tcount = %d\tsize = %d\n\n", (*replicaList)[i].repairCount, sizeof(struct repair));
+-            goto ERR;
++            goto Error;
+           }
+           (*replicaList)[i].repairList = r;
+       }
+@@ -245,7 +245,7 @@ int repair_getdfile(char *fname, int inf
+           fread(&x, sizeof(int), 1, ff);
+           if (ferror(ff) || feof(ff)) {
+             sprintf(errmsg, "repair_getdfile: fread failed!\n");
+-            goto ERR;
++            goto Error;
+           }
+           r[j].opcode = ntohl(x);
+ 
+@@ -253,7 +253,7 @@ int repair_getdfile(char *fname, int inf
+           fgets(s, MAXNAMELEN, ff);
+           if (ferror(ff) || feof(ff)) {
+             sprintf(errmsg, "repair_getdfile: fread failed!\n");
+-            goto ERR;
++            goto Error;
+           }
+           *(s + strlen(s) - 1) = 0;  /* nuke the '\n' left behind by fgets() */
+ 
+@@ -261,7 +261,7 @@ int repair_getdfile(char *fname, int inf
+           fgets(s, MAXNAMELEN, ff);
+           if (ferror(ff) || feof(ff)) {
+             sprintf(errmsg, "repair_getdfile: fread failed!\n");
+-            goto ERR;
++            goto Error;
+           }
+           *(s + strlen(s) - 1) = 0;  /* nuke the '\n' left behind by fgets() */
+ 
+@@ -269,7 +269,7 @@ int repair_getdfile(char *fname, int inf
+               fread(&x, sizeof(int), 1, ff);
+               if (ferror(ff) || feof(ff)) {
+                 sprintf(errmsg, "repair_getdfile: fread failed!\n");
+-                goto ERR;
++                goto Error;
+               }
+               r[j].parms[k] = ntohl(x);
+           }
+@@ -283,7 +283,7 @@ int repair_getdfile(char *fname, int inf
+ 
+     return(0);
+ 
+- ERR: /* Error exit */
++ Error: /* Error exit */
+     perror(errmsg);
+     if(fname != NULL)
+       fclose(ff);
diff -r d839e61c1eaa -r f9802823a196 net/coda/patches/patch-coda-src_resolution_rescoord.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/coda/patches/patch-coda-src_resolution_rescoord.cc    Tue Jan 27 15:21:52 2015 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-coda-src_resolution_rescoord.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
+
+SunOS does not implicitly include <fcntl.h>.



Home | Main Index | Thread Index | Old Index