Tue Jan 27 15:21:52 2015 UTC ()
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
(hauke)
diff -r1.21 -r1.22 pkgsrc/net/coda/Makefile
diff -r1.4 -r1.5 pkgsrc/net/coda/PLIST
diff -r1.10 -r1.11 pkgsrc/net/coda/distinfo
diff -r1.6 -r0 pkgsrc/net/coda/patches/patch-ac
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_kerndep_coda.h
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_librepair_repio.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_resolution_rescoord.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_venus_Makefile.in
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_venus_fso_dir.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_venus_venus.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_venus_vproc_vfscalls.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_venus_worker.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_vice_Makefile.in
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_vice_codaproc2.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_volutil_vol-ancient.cc
diff -r0 -r1.1 pkgsrc/net/coda/patches/patch-coda-src_volutil_vol-dump.cc
diff -r0 -r1.3 pkgsrc/net/coda/patches/patch-coda-src_kerndep_pioctl.h
diff -r0 -r1.3 pkgsrc/net/coda/patches/patch-coda-src_venus_venusrecov.cc
--- pkgsrc/net/coda/Makefile 2015/01/04 03:44:00 1.21
+++ pkgsrc/net/coda/Makefile 2015/01/27 15:21:52 1.22
| @@ -1,33 +1,59 @@ | | | @@ -1,33 +1,59 @@ |
1 | # $NetBSD: Makefile,v 1.21 2015/01/04 03:44:00 dholland Exp $ | | 1 | # $NetBSD: Makefile,v 1.22 2015/01/27 15:21:52 hauke Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | DISTNAME= coda-6.9.5 | | 4 | DISTNAME= coda-6.9.5 |
5 | PKGREVISION= 7 | | 5 | PKGREVISION= 8 |
6 | CATEGORIES= net | | 6 | CATEGORIES= net |
7 | MASTER_SITES= http://www.coda.cs.cmu.edu/pub/coda/src/ | | 7 | MASTER_SITES= http://www.coda.cs.cmu.edu/pub/coda/src/ |
8 | | | 8 | |
9 | MAINTAINER= gdt@NetBSD.org | | 9 | MAINTAINER= gdt@NetBSD.org |
10 | HOMEPAGE= http://www.coda.cs.cmu.edu/ | | 10 | HOMEPAGE= http://www.coda.cs.cmu.edu/ |
11 | COMMENT= Coda distributed fileystem | | 11 | COMMENT= Coda distributed fileystem |
12 | | | 12 | |
13 | LICENSE= gnu-gpl-v2 | | 13 | LICENSE= gnu-gpl-v2 |
14 | | | 14 | |
15 | # No kernel support for the coda fs | | 15 | # No kernel support for the coda fs |
16 | NOT_FOR_PLATFORM+= DragonFly-*-* | | 16 | NOT_FOR_PLATFORM+= DragonFly-*-* |
17 | | | 17 | |
18 | # See http://coda.wikidev.net/Quick_Client_Action for hints on how | | 18 | # See http://coda.wikidev.net/Quick_Client_Action for hints on how |
19 | # to configure venus. | | 19 | # to configure venus. |
20 | | | 20 | |
21 | USE_TOOLS+= gmake pkg-config perl perl:run | | 21 | PKG_SYSCONFSUBDIR= coda |
22 | GNU_CONFIGURE= yes | | 22 | |
23 | USE_LANGUAGES= c c++ | | 23 | #SMF_INSTANCES= TODO |
24 | REPLACE_PERL= coda-src/scripts/tape.pl coda-src/scripts/volmunge | | 24 | |
| | | 25 | EGDIR= ${PREFIX}/share/examples/coda |
| | | 26 | CONF_FILES+= ${EGDIR}/server.conf ${PKG_SYSCONFDIR}/server.conf |
| | | 27 | CONF_FILES+= ${EGDIR}/venus.conf ${PKG_SYSCONFDIR}/venus.conf |
| | | 28 | CONF_FILES+= ${EGDIR}/realms ${PKG_SYSCONFDIR}/realms |
| | | 29 | |
| | | 30 | INSTALLATION_DIRS+= ${EGDIR} |
| | | 31 | |
| | | 32 | USE_TOOLS+= gmake pkg-config perl perl:run |
| | | 33 | GNU_CONFIGURE= yes |
| | | 34 | USE_LANGUAGES= c c++ |
| | | 35 | REPLACE_PERL= coda-src/scripts/tape.pl coda-src/scripts/volmunge |
| | | 36 | |
| | | 37 | # Sources use both in equal share |
| | | 38 | CFLAGS.SunOS+= -Du_int32_t=uint32_t |
| | | 39 | CFLAGS.SunOS+= -Du_int16_t=uint16_t |
| | | 40 | CFLAGS.SunOS+= -Du_int8_t=uint8_t |
| | | 41 | # Use the value from <netdb.h> |
| | | 42 | CFLAGS.SunOS+= -DMAXHOSTNAMELEN=256 |
| | | 43 | |
| | | 44 | post-install: |
| | | 45 | ${INSTALL_DATA} ${WRKSRC}/coda-src/vice/server.conf.ex \ |
| | | 46 | ${DESTDIR}${EGDIR}/server.conf |
| | | 47 | ${INSTALL_DATA} ${WRKSRC}/coda-src/venus/venus.conf.ex \ |
| | | 48 | ${DESTDIR}${EGDIR}/venus.conf |
| | | 49 | ${INSTALL_DATA} ${WRKSRC}/coda-src/venus/realms \ |
| | | 50 | ${DESTDIR}${EGDIR}/realms |
25 | | | 51 | |
26 | .include "../../devel/lwp/buildlink3.mk" | | 52 | .include "../../devel/lwp/buildlink3.mk" |
27 | .include "../../devel/rpc2/buildlink3.mk" | | 53 | .include "../../devel/rpc2/buildlink3.mk" |
28 | .include "../../devel/rvm/buildlink3.mk" | | 54 | .include "../../devel/rvm/buildlink3.mk" |
29 | .include "../../mk/readline.buildlink3.mk" | | 55 | .include "../../mk/readline.buildlink3.mk" |
30 | .include "../../mk/curses.buildlink3.mk" | | 56 | .include "../../mk/curses.buildlink3.mk" |
31 | .include "../../lang/python/application.mk" | | 57 | .include "../../lang/python/application.mk" |
32 | | | 58 | |
33 | .include "../../mk/bsd.pkg.mk" | | 59 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/net/coda/PLIST 2009/06/14 18:09:24 1.4
+++ pkgsrc/net/coda/PLIST 2015/01/27 15:21:52 1.5
| @@ -1,42 +1,39 @@ | | | @@ -1,42 +1,39 @@ |
1 | @comment $NetBSD: PLIST,v 1.4 2009/06/14 18:09:24 joerg Exp $ | | 1 | @comment $NetBSD: PLIST,v 1.5 2015/01/27 15:21:52 hauke Exp $ |
2 | bin/au | | 2 | bin/au |
3 | bin/cfs | | 3 | bin/cfs |
4 | bin/clog | | 4 | bin/clog |
5 | bin/cmon | | 5 | bin/cmon |
6 | bin/coda_replay | | 6 | bin/coda_replay |
7 | bin/codacon | | 7 | bin/codacon |
8 | bin/cpasswd | | 8 | bin/cpasswd |
9 | bin/ctokens | | 9 | bin/ctokens |
10 | bin/cunlog | | 10 | bin/cunlog |
11 | bin/filerepair | | 11 | bin/filerepair |
12 | bin/gcodacon | | 12 | bin/gcodacon |
13 | bin/getvolinfo | | 13 | bin/getvolinfo |
14 | bin/hoard | | 14 | bin/hoard |
15 | bin/mkcodabf | | 15 | bin/mkcodabf |
16 | bin/mklka | | 16 | bin/mklka |
17 | bin/parser | | 17 | bin/parser |
18 | bin/reinit | | 18 | bin/reinit |
19 | bin/removeinc | | 19 | bin/removeinc |
20 | bin/repair | | 20 | bin/repair |
21 | bin/rpc2ping | | 21 | bin/rpc2ping |
22 | bin/rvmsizer | | 22 | bin/rvmsizer |
23 | bin/smon2 | | 23 | bin/smon2 |
24 | bin/spy | | 24 | bin/spy |
25 | bin/xaskuser | | 25 | bin/xaskuser |
26 | bin/xfrepair | | 26 | bin/xfrepair |
27 | etc/coda/realms | | | |
28 | etc/coda/server.conf.ex | | | |
29 | etc/coda/venus.conf.ex | | | |
30 | man/man1/au.1 | | 27 | man/man1/au.1 |
31 | man/man1/cfs.1 | | 28 | man/man1/cfs.1 |
32 | man/man1/clog.1 | | 29 | man/man1/clog.1 |
33 | man/man1/cmon.1 | | 30 | man/man1/cmon.1 |
34 | man/man1/coda_replay.1 | | 31 | man/man1/coda_replay.1 |
35 | man/man1/cpasswd.1 | | 32 | man/man1/cpasswd.1 |
36 | man/man1/ctokens.1 | | 33 | man/man1/ctokens.1 |
37 | man/man1/cunlog.1 | | 34 | man/man1/cunlog.1 |
38 | man/man1/hoard.1 | | 35 | man/man1/hoard.1 |
39 | man/man1/mkcodabf.1 | | 36 | man/man1/mkcodabf.1 |
40 | man/man1/repair.1 | | 37 | man/man1/repair.1 |
41 | man/man1/spy.1 | | 38 | man/man1/spy.1 |
42 | man/man5/backuplogs.5 | | 39 | man/man5/backuplogs.5 |
| @@ -97,13 +94,16 @@ sbin/updateclnt | | | @@ -97,13 +94,16 @@ sbin/updateclnt |
97 | sbin/updatefetch | | 94 | sbin/updatefetch |
98 | sbin/updatesrv | | 95 | sbin/updatesrv |
99 | sbin/venus | | 96 | sbin/venus |
100 | sbin/venus-setup | | 97 | sbin/venus-setup |
101 | sbin/vice-killvolumes | | 98 | sbin/vice-killvolumes |
102 | sbin/vice-setup | | 99 | sbin/vice-setup |
103 | sbin/vice-setup-rvm | | 100 | sbin/vice-setup-rvm |
104 | sbin/vice-setup-scm | | 101 | sbin/vice-setup-scm |
105 | sbin/vice-setup-srvdir | | 102 | sbin/vice-setup-srvdir |
106 | sbin/vice-setup-user | | 103 | sbin/vice-setup-user |
107 | sbin/volmunge | | 104 | sbin/volmunge |
108 | sbin/volutil | | 105 | sbin/volutil |
109 | sbin/vutil | | 106 | sbin/vutil |
| | | 107 | share/examples/coda/realms |
| | | 108 | share/examples/coda/server.conf |
| | | 109 | share/examples/coda/venus.conf |
--- pkgsrc/net/coda/distinfo 2012/08/03 10:32:54 1.10
+++ pkgsrc/net/coda/distinfo 2015/01/27 15:21:52 1.11
| @@ -1,8 +1,21 @@ | | | @@ -1,8 +1,21 @@ |
1 | $NetBSD: distinfo,v 1.10 2012/08/03 10:32:54 marino Exp $ | | 1 | $NetBSD: distinfo,v 1.11 2015/01/27 15:21:52 hauke Exp $ |
2 | | | 2 | |
3 | SHA1 (coda-6.9.5.tar.gz) = 248af27c506f5c3be4c4e53f821c9c904580fe60 | | 3 | SHA1 (coda-6.9.5.tar.gz) = 248af27c506f5c3be4c4e53f821c9c904580fe60 |
4 | RMD160 (coda-6.9.5.tar.gz) = 9ef0643aacc7d1352ef253af00d4c7e6ad9e1f78 | | 4 | RMD160 (coda-6.9.5.tar.gz) = 9ef0643aacc7d1352ef253af00d4c7e6ad9e1f78 |
5 | Size (coda-6.9.5.tar.gz) = 1723098 bytes | | 5 | Size (coda-6.9.5.tar.gz) = 1723098 bytes |
6 | SHA1 (patch-ac) = b9f9fd68c633e09717252562b06238b87df1a6b7 | | | |
7 | SHA1 (patch-ad) = adfee7c5d7de913ee3b898a13bf7acfeac52b765 | | 6 | SHA1 (patch-ad) = adfee7c5d7de913ee3b898a13bf7acfeac52b765 |
8 | SHA1 (patch-coda-src_dir_dirbody.c) = 3e3524a4a03ce359956ae00d9b24d1aa3292c752 | | 7 | SHA1 (patch-coda-src_dir_dirbody.c) = 3e3524a4a03ce359956ae00d9b24d1aa3292c752 |
| | | 8 | SHA1 (patch-coda-src_kerndep_coda.h) = 14af6b7554ce36c55f426ab62630df629c2df6db |
| | | 9 | SHA1 (patch-coda-src_kerndep_pioctl.h) = 1eae6d05b461f6e235d8f290ef41c10877f59650 |
| | | 10 | SHA1 (patch-coda-src_librepair_repio.cc) = 3a79f16fb51bdeb76ccceb095f1409bec4bf098f |
| | | 11 | SHA1 (patch-coda-src_resolution_rescoord.cc) = a885ced4a7bcfe38b14a0891d0ce84cc9c53ef19 |
| | | 12 | SHA1 (patch-coda-src_venus_Makefile.in) = ecfb5d2d8bf806dddaf360f2b36d12b871e9f0e2 |
| | | 13 | SHA1 (patch-coda-src_venus_fso_dir.cc) = 3e02f3bdb02639a82db1be9c138267431d36697c |
| | | 14 | SHA1 (patch-coda-src_venus_venus.cc) = 93c115fb8a8b22df3fdb166162410c67820dcb4c |
| | | 15 | SHA1 (patch-coda-src_venus_venusrecov.cc) = 089b6c5db50a78b7df9ca5c504628dacb3c550f9 |
| | | 16 | SHA1 (patch-coda-src_venus_vproc_vfscalls.cc) = da71de1648e09aefdd442c4ab3cb2463aad6d397 |
| | | 17 | SHA1 (patch-coda-src_venus_worker.cc) = d8308eea23d0583528e2e4b11b5ad6076e986410 |
| | | 18 | SHA1 (patch-coda-src_vice_Makefile.in) = 07744dcc45c269ecfe1f4c4feba37e7b7047c00b |
| | | 19 | SHA1 (patch-coda-src_vice_codaproc2.cc) = 81dfacf9a0cda4bd8f891fbf0dacf0001a46bd02 |
| | | 20 | SHA1 (patch-coda-src_volutil_vol-ancient.cc) = e69f3e492aa78cbf5c4dbd34c15424ee7ebd150c |
| | | 21 | SHA1 (patch-coda-src_volutil_vol-dump.cc) = 6405a0be3edeb1f1cdb74d705c0fcccae1a8cefc |
$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 */
$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);
$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>.
--- coda-src/resolution/rescoord.cc.orig 2006-11-02 19:46:35.000000000 +0000
+++ coda-src/resolution/rescoord.cc
@@ -32,6 +32,7 @@ extern "C" {
#include <sys/types.h>
#include "coda_assert.h"
#include <stdio.h>
+#include <fcntl.h>
#include <struct.h>
#include <lwp/lwp.h>
#include <rpc2/rpc2.h>
$NetBSD: patch-coda-src_venus_Makefile.in,v 1.1 2015/01/27 15:21:52 hauke Exp $
Leave it to the CONF_FILES framework to install config files.
--- coda-src/venus/Makefile.in.orig 2010-03-29 19:14:02.000000000 +0000
+++ coda-src/venus/Makefile.in
@@ -294,7 +294,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@BUILD_CLIENT_TRUE@dist_man_MANS = venus.8 vutil.8
-@BUILD_CLIENT_TRUE@dist_sysconf_DATA = venus.conf.ex realms
+@BUILD_CLIENT_TRUE@dist_sysconf_DATA =
venus_SOURCES = binding.cc binding.h comm.cc comm.h comm_daemon.cc daemon.cc \
fso.h fso0.cc fso1.cc fso_cachefile.cc fso_cfscalls0.cc fso_cfscalls1.cc \
fso_cfscalls2.cc fso_daemon.cc fso_dir.cc hdb.cc hdb.h hdb_daemon.cc \
$NetBSD: patch-coda-src_venus_fso_dir.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <fcntl.h>.
--- ./coda-src/venus/fso_dir.cc.orig 2010-03-23 18:10:43.000000000 +0000
+++ ./coda-src/venus/fso_dir.cc
@@ -35,6 +35,7 @@ extern "C" {
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include <errno.h>
#include "coda_string.h"
#include <unistd.h>
$NetBSD: patch-coda-src_venus_venus.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <fcntl.h>.
--- ./coda-src/venus/venus.cc.orig 2009-02-13 20:51:05.000000000 +0000
+++ ./coda-src/venus/venus.cc
@@ -27,6 +27,7 @@ extern "C" {
#include <sys/file.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/param.h>
$NetBSD: patch-coda-src_venus_vproc_vfscalls.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
The .vtype struct field is not declared for SunOS.
--- ./coda-src/venus/vproc_vfscalls.cc.orig 2009-02-13 20:50:21.000000000 +0000
+++ ./coda-src/venus/vproc_vfscalls.cc
@@ -124,7 +124,9 @@ void vproc::vget(struct venus_cnode *vpp
worker *w = (worker *)this;
union outputArgs *out = (union outputArgs *)w->msg->msg_buf;
out->coda_vget.Fid = *VenusToKernelFid(&cfidp->cfid_fid);
+#ifdef CDT_UNKNOWN
out->coda_vget.vtype = CDT_UNKNOWN;
+#endif
w->Return(w->msg, sizeof(struct coda_vget_out));
}
$NetBSD: patch-coda-src_venus_worker.cc,v 1.1 2015/01/27 15:21:52 hauke 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.
gcc 4.7 on SunOS insists on de-'const'ifying venusRoot.
--- 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__) && __NetBSD_Version__ >= 499002400 /* 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)
@@ -492,7 +500,8 @@ child_done:
mnttab = fopen(MNTTAB, "a+");
if (mnttab != NULL) {
mt.mnt_special = "CODA";
- mt.mnt_mountp = venusRoot;
+ /* XXX */
+ mt.mnt_mountp = (char *)venusRoot;
mt.mnt_fstype = "CODA";
mt.mnt_mntopts = "rw";
mt.mnt_time = tm;
$NetBSD: patch-coda-src_vice_Makefile.in,v 1.1 2015/01/27 15:21:52 hauke Exp $
Leave it to the CONF_FILES framework to install config files.
--- coda-src/vice/Makefile.in.orig 2010-03-29 19:14:02.000000000 +0000
+++ coda-src/vice/Makefile.in
@@ -303,7 +303,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@BUILD_SERVER_TRUE@noinst_LTLIBRARIES = libviceerror.la
@BUILD_SERVER_TRUE@dist_man_MANS = codasrv.8 servers.5
-@BUILD_SERVER_TRUE@dist_sysconf_DATA = server.conf.ex
+@BUILD_SERVER_TRUE@dist_sysconf_DATA =
libviceerror_la_SOURCES = ViceErrorMsg.c
codasrv_SOURCES = srv.cc srvproc.cc srvproc2.cc coppend.cc coppend.h \
codaproc.cc codaproc.h codaproc2.cc clientproc.cc vicecb.cc \
$NetBSD: patch-coda-src_vice_codaproc2.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <limits.h>.
--- coda-src/vice/codaproc2.cc.orig 2009-07-27 20:43:23.000000000 +0000
+++ coda-src/vice/codaproc2.cc
@@ -35,6 +35,7 @@ extern "C" {
#endif
#include <sys/types.h>
+#include <limits.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/file.h>
$NetBSD: patch-coda-src_volutil_vol-ancient.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <limits.h>.
--- coda-src/volutil/vol-ancient.cc.orig 2006-05-27 16:03:34.000000000 +0000
+++ coda-src/volutil/vol-ancient.cc
@@ -21,6 +21,7 @@ extern "C" {
#endif
#include <sys/types.h>
+#include <limits.h>
#include <errno.h>
#include <lwp/lwp.h>
$NetBSD: patch-coda-src_volutil_vol-dump.cc,v 1.1 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <limits.h>.
--- coda-src/volutil/vol-dump.cc.orig 2008-08-08 19:09:39.000000000 +0000
+++ coda-src/volutil/vol-dump.cc
@@ -50,6 +50,7 @@ extern "C" {
#include <errno.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <limits.h>
#include <sys/file.h>
#include <netinet/in.h>
$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
$NetBSD: patch-coda-src_venus_venusrecov.cc,v 1.3 2015/01/27 15:21:52 hauke Exp $
SunOS does not implicitly include <limits.h>.
--- ./coda-src/venus/venusrecov.cc.orig 2008-10-06 16:52:18.000000000 +0000
+++ ./coda-src/venus/venusrecov.cc
@@ -35,6 +35,7 @@ extern "C" {
#include <stdio.h>
#include "coda_string.h"
#include <sys/param.h>
+#include <limits.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/wait.h>