Date: Sun, 2 Mar 2003 21:11:00 +1100 (EST) From: Tim Robbins <tim@robbins.dropbear.id.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/48830: [PATCH] Unbreak build of net/coda5_server on 5.0 Message-ID: <200303021011.h22AB0Hu005232@dilbert.robbins.dropbear.id.au>
next in thread | raw e-mail | index | archive | help
>Number: 48830 >Category: ports >Synopsis: [PATCH] Unbreak build of net/coda5_server on 5.0 >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Mar 02 02:20:12 PST 2003 >Closed-Date: >Last-Modified: >Originator: Tim Robbins >Release: FreeBSD 5.0-RELEASE i386 >Organization: The FreeBSD Project >Environment: System: FreeBSD 5.0-RELEASE >Description: The net/coda5_server port does not build and is marked broken in the Makefile. >How-To-Repeat: Obvious. >Fix: Patch provided: o Separate username and group with ":" instead of "." for chown. o Pass time_t * to ctime() instead of whatever type struct timeval's tv_sec member happens to be. o Don't redefine fixed-width integer types (int8_t etc.); they are provided by the system headers now. o Remove BROKEN from Makefile, it builts and works properly now. o Remove MAINTAINER from Makefile, port has been broken for at least a year, probably two. This patch may also fix net/coda5_client because they share the same Makefile. Otherwise, the patches from the net/coda5_server/files directory should be copied into net/coda5_client/files. The MAINTAINER line from net/coda5_client/Makefile should also be removed. diff -ruN coda5_server.orig/Makefile coda5_server/Makefile --- coda5_server.orig/Makefile Sat Feb 22 00:14:37 2003 +++ coda5_server/Makefile Sun Mar 2 20:58:52 2003 @@ -13,7 +13,6 @@ PKGNAMESUFFIX= -${CODA_SUITE} DISTNAME= coda-${PORTVERSION} -MAINTAINER?= coda@cs.cmu.edu COMMENT?= Server programs for a replicated high-performance network file system LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm \ @@ -32,9 +31,5 @@ CODA_VERSION?= 5.3.19 .include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 500037 -BROKEN= "Does not build" -.endif .include <bsd.port.post.mk> diff -ruN coda5_server.orig/files/patch-aa coda5_server/files/patch-aa --- coda5_server.orig/files/patch-aa Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-aa Sun Mar 2 18:05:44 2003 @@ -0,0 +1,36 @@ +--- coda-src/update/updatesrv.cc.orig Sun Mar 2 17:55:46 2003 ++++ coda-src/update/updatesrv.cc Sun Mar 2 17:57:50 2003 +@@ -184,6 +184,7 @@ + long portmapid; + struct stat statbuf; + char *miscdir; ++ time_t tim; + + /* process the command line arguments */ + for (i = 1; i < argc; i++) { +@@ -305,7 +306,7 @@ + } + gettimeofday(&tp, &tsp); + LogMsg(0, SrvDebugLevel, stdout, +- "Update Server started %s", ctime(&tp.tv_sec)); ++ "Update Server started %s", ctime(&(tim = tp.tv_sec))); + + CODA_ASSERT(LWP_WaitProcess((char *)&parentPid) == LWP_SUCCESS); + +@@ -455,6 +456,7 @@ + char name[MAXPATHLEN]; /* area to hold the name */ + struct stat buff; /* buffer for stat */ + int len; ++ time_t tim; + + rc = 0; + +@@ -518,7 +520,7 @@ + *CurrentUsecs = tp.tv_usec; + LogMsg(2, SrvDebugLevel, stdout, + "UpdateFetch returns %s newtime is %d at %s", +- ViceErrorMsg((int)rc), *NewTime, ctime(&tp.tv_sec)); ++ ViceErrorMsg((int)rc), *NewTime, ctime(&(tim = tp.tv_sec))); + return(rc); + } + diff -ruN coda5_server.orig/files/patch-ab coda5_server/files/patch-ab --- coda5_server.orig/files/patch-ab Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-ab Sun Mar 2 18:05:58 2003 @@ -0,0 +1,39 @@ +--- coda-src/update/updateclnt.cc.orig Sun Mar 2 17:58:32 2003 ++++ coda-src/update/updateclnt.cc Sun Mar 2 17:59:25 2003 +@@ -152,6 +152,7 @@ + int i, rc; + int len; + char errmsg[MAXPATHLEN]; ++ time_t tim; + + *host = '\0'; + +@@ -226,7 +227,7 @@ + gettimeofday(&tp, &tsp); + LogMsg(0, SrvDebugLevel, stdout, + "Update Client pid = %d started at %s", +- getpid(), ctime(&tp.tv_sec)); ++ getpid(), ctime(&(tim = tp.tv_sec))); + + time.tv_sec = waitinterval; + time.tv_usec = 0; +@@ -688,16 +689,17 @@ + { + struct timeval tv; + struct timezone tz; ++ time_t tim; + + if(rename("UpdateLog","UpdateLog.old")) { + LogMsg(0, SrvDebugLevel, stdout, "Rename for UpdateLog failed with a %s\n", ViceErrorMsg(errno)); + } + else { + gettimeofday(&tv, &tz); +- LogMsg(0, SrvDebugLevel, stdout, "Moving UpdateLog to UpdateLog.old at %s", ctime(&tv.tv_sec)); ++ LogMsg(0, SrvDebugLevel, stdout, "Moving UpdateLog to UpdateLog.old at %s", ctime(&(tim = tv.tv_sec))); + freopen("UpdateLog","a+",stdout); + freopen("UpdateLog","a+",stderr); +- LogMsg(0, SrvDebugLevel, stdout, "New UpdateLog started at %s", ctime(&tv.tv_sec)); ++ LogMsg(0, SrvDebugLevel, stdout, "New UpdateLog started at %s", ctime(&(tim = tv.tv_sec))); + } + } + diff -ruN coda5_server.orig/files/patch-ac coda5_server/files/patch-ac --- coda5_server.orig/files/patch-ac Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-ac Sun Mar 2 18:06:16 2003 @@ -0,0 +1,20 @@ +--- coda-src/venus/fso_cachefile.cc.orig Sun Mar 2 17:32:28 2003 ++++ coda-src/venus/fso_cachefile.cc Sun Mar 2 17:33:30 2003 +@@ -132,7 +132,7 @@ + /* Must be called from within a transaction! Assume caller has done + RVMLIB_REC_OBJECT() */ + +-void CacheFile::Create(int newlength = 0) ++void CacheFile::Create(int newlength) + { + LOG(10, ("CacheFile::Create: %s, %d\n", name, newlength)); + +@@ -183,7 +183,7 @@ + return 0; + } + +-int CacheFile::Copy(char *destname, ino_t *ino, int recovering = 0) ++int CacheFile::Copy(char *destname, ino_t *ino, int recovering) + { + LOG(10, ("CacheFile::Copy: from %s, %d, %d/%d, to %s\n", + name, inode, validdata, length, destname)); diff -ruN coda5_server.orig/files/patch-ad coda5_server/files/patch-ad --- coda5_server.orig/files/patch-ad Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-ad Sun Mar 2 18:06:30 2003 @@ -0,0 +1,13 @@ +--- coda-src/venus/vproc.cc.orig Sun Mar 2 17:42:30 2003 ++++ coda-src/venus/vproc.cc Sun Mar 2 17:43:34 2003 +@@ -784,8 +784,10 @@ + #if !defined(NetBSD1_3) && !defined(__NetBSD_Version__) + sp->st_lspare = 0; + #endif ++#if __FreeBSD_version < 5 + sp->st_qspare[0] = 0; + sp->st_qspare[1] = 0; ++#endif + #endif /* __BSD44__ */ + } + diff -ruN coda5_server.orig/files/patch-ae coda5_server/files/patch-ae --- coda5_server.orig/files/patch-ae Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-ae Sun Mar 2 18:06:59 2003 @@ -0,0 +1,16 @@ +--- coda-src/vice/srv.cc.orig Sun Mar 2 17:49:12 2003 ++++ coda-src/vice/srv.cc Sun Mar 2 17:54:40 2003 +@@ -1270,8 +1270,13 @@ + char buf[100], buf2[100]; /* can't believe there will be more logs! */ + struct dirent **namelist = NULL; + ++#if __FreeBSD__ >= 5 ++ count = scandir(".", &namelist, (int (*)(dirent *)) xselect, ++ (int (*)(const void *, const void *)) compar); ++#else + count = scandir(".", &namelist, (int (*)(const dirent *)) xselect, + (int (*)(const void *, const void *)) compar); ++#endif + /* It is safe now to blindly rename */ + for (i = 0; i < count; i++) { + sprintf(buf, "SrvLog-%d", count-i); diff -ruN coda5_server.orig/files/patch-af coda5_server/files/patch-af --- coda5_server.orig/files/patch-af Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-af Sun Mar 2 18:07:16 2003 @@ -0,0 +1,14 @@ +--- tools/our-install.orig Sun Mar 2 17:18:33 2003 ++++ tools/our-install Sun Mar 2 17:21:13 2003 +@@ -11,8 +11,10 @@ + PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb + export PATH + +-if [ $SYS = NetBSD -o $SYS = FreeBSD -o $SYS = OpenBSD ] ; then ++if [ $SYS = NetBSD -o $SYS = OpenBSD ] ; then + OWNGRP=root.wheel ++elif [ $SYS = FreeBSD ] ; then ++OWNGRP=root:wheel + else + OWNGRP=root:root + fi diff -ruN coda5_server.orig/files/patch-ag coda5_server/files/patch-ag --- coda5_server.orig/files/patch-ag Thu Jan 1 10:00:00 1970 +++ coda5_server/files/patch-ag Sun Mar 2 18:12:23 2003 @@ -0,0 +1,13 @@ +--- lib-src/kernel-includes/coda.h.orig Sun Mar 2 18:11:14 2003 ++++ lib-src/kernel-includes/coda.h Sun Mar 2 18:11:58 2003 +@@ -125,6 +125,10 @@ + #define __BIT_TYPES_DEFINED__ + #endif + ++#if __FreeBSD__ >= 5 ++#define __BIT_TYPES_DEFINED__ ++#endif ++ + #ifndef __BIT_TYPES_DEFINED__ + #define __BIT_TYPES_DEFINED__ + typedef signed char int8_t; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303021011.h22AB0Hu005232>