Date: Mon, 19 Mar 2001 12:29:29 -0600 (CST) From: ishmael27@home.com To: FreeBSD-gnats-submit@freebsd.org Subject: ports/25926: New port: fam-2.6.4 Message-ID: <200103191829.f2JITTK84099@babylon.merseine.nu>
next in thread | raw e-mail | index | archive | help
>Number: 25926 >Category: ports >Synopsis: New port: fam-2.6.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 19 10:30:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Jeremy Norris >Release: FreeBSD 4.3-BETA i386 >Organization: >Environment: System: FreeBSD babylon.merseine.nu 4.3-BETA FreeBSD 4.3-BETA #0: Tue Mar 6 20:09:07 CST 2001 ishmael@babylon.merseine.nu:/usr/obj/usr/src/sys/BABYLON i386 >Description: New port for fam-2.6.4 Fam is the File Alteration Mointor, an rpc service from SGI. I am unsure what category it should go in (devel or sysutils?) David Rufion (daverufino@btinternet.com) should be credited for developing the patch necessary to build this under FreeBSD. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # fam # fam/Makefile # fam/pkg-descr # fam/pkg-plist # fam/pkg-comment # fam/files # fam/files/patch-freebsd # fam/files/patch-Makefile.am # fam/files/fam.sh.sample # fam/distinfo # fam/pkg-message # echo c - fam mkdir -p fam > /dev/null 2>&1 echo x - fam/Makefile sed 's/^X//' >fam/Makefile << 'END-of-fam/Makefile' X# ports collection makefile for: fam X# Date created: 20 February 2001 X# Whom: Jeremy Norris <ishmael27@home.com> X# X# $FreeBSD$ X# X XPORTNAME= fam XPORTVERSION= 2.6.4 XCATEGORIES= devel XMASTER_SITES= ftp://oss.sgi.com/projects/fam/download/ XDISTNAME= ${PORTNAME}-oss-${PORTVERSION} X XMAINTAINER= ishmael27@home.com X XUSE_AUTOMAKE= yes XUSE_LIBTOOL= yes XUSE_GMAKE= yes XPATCH_STRIP= -p1 XINSTALLS_SHLIB= yes X XMAN1= fam.1m XMAN3= fam.3x X Xpost-install: X @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/fam.sh.sample ${PREFIX}/etc/rc.d/fam.sh.sample X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-fam/Makefile echo x - fam/pkg-descr sed 's/^X//' >fam/pkg-descr << 'END-of-fam/pkg-descr' XFAM, the File Alteration Monitor, provides an API which applications can use Xto be notified when specific files or directories are changed. X XWWW: http://oss.sgi.com/projects/fam/ END-of-fam/pkg-descr echo x - fam/pkg-plist sed 's/^X//' >fam/pkg-plist << 'END-of-fam/pkg-plist' Xbin/fam Xetc/fam.conf Xinclude/fam.h Xlib/fam/editconf.perl Xlib/libfam.a Xlib/libfam.so Xlib/libfam.so.0 X@dirrm lib/fam END-of-fam/pkg-plist echo x - fam/pkg-comment sed 's/^X//' >fam/pkg-comment << 'END-of-fam/pkg-comment' XA file alteration monitor END-of-fam/pkg-comment echo c - fam/files mkdir -p fam/files > /dev/null 2>&1 echo x - fam/files/patch-freebsd sed 's/^X//' >fam/files/patch-freebsd << 'END-of-fam/files/patch-freebsd' Xdiff -urN fam-oss-2.6.4/config.h.in fam-oss-2.6.4-freebsd/config.h.in X--- fam-oss-2.6.4/config.h.in Sat May 20 05:50:17 2000 X+++ fam-oss-2.6.4-freebsd/config.h.in Sun Mar 18 00:02:38 2001 X@@ -12,6 +12,8 @@ X /* Define if the system has imon and IMONIOC_ ioctl flags. */ X #undef HAVE_IMON X X+#undef HAVE_MNTENT_H X+ X /* Define if the system has the struct revokdi and the IMONIOC_REVOKDI X ** ioctl flag. (IRIX 5.3 doesn't.) X */ Xdiff -urN fam-oss-2.6.4/configure.in fam-oss-2.6.4-freebsd/configure.in X--- fam-oss-2.6.4/configure.in Sat May 20 06:23:17 2000 X+++ fam-oss-2.6.4-freebsd/configure.in Sun Mar 18 00:36:29 2001 X@@ -95,6 +95,8 @@ X dnl AC_HEADER_SYS_WAIT X dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h) X X+AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H)) X+ X dnl X dnl See if imon is available; if so, is it IRIX or Linux? X dnl X@@ -299,10 +301,10 @@ X dnl If we don't have MNTTYPE_NFS , we croak. X dnl X X-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h)) X-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2)) X-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3)) X-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS)) X+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h)) X+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2)) X+dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3)) X+dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS)) X X dnl X dnl Test for bindresvport() prototype. Xdiff -urN fam-oss-2.6.4/fam/Client.h fam-oss-2.6.4-freebsd/fam/Client.h X--- fam-oss-2.6.4/fam/Client.h Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/Client.h Sat Mar 17 00:14:35 2001 X@@ -23,6 +23,7 @@ X #ifndef Client_included X #define Client_included X X+#include <sys/types.h> X #include <netinet/in.h> // for in_addr X X #include "Activity.h" Xdiff -urN fam-oss-2.6.4/fam/FileSystem.c++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++ X--- fam-oss-2.6.4/fam/FileSystem.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/FileSystem.c++ Sat Mar 17 13:18:10 2001 X@@ -22,7 +22,7 @@ X X #include "FileSystem.h" X X-#include <mntent.h> X+#include "mntent.h" X #include <string.h> X X #include "Event.h" Xdiff -urN fam-oss-2.6.4/fam/FileSystemTable.c++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++ X--- fam-oss-2.6.4/fam/FileSystemTable.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/FileSystemTable.c++ Sat Mar 17 23:44:17 2001 X@@ -21,9 +21,10 @@ X // Temple Place - Suite 330, Boston MA 02111-1307, USA. X X #include <stddef.h> X+#include <stdio.h> X #include "FileSystemTable.h" X X-#include <mntent.h> X+#include "mntent.h" X #include <stdlib.h> X #include <string.h> X X@@ -255,7 +256,10 @@ X // create_fs_by_name initializes our "root" member variable. X if (!fs_by_name) X { create_fs_by_name(); X+#if !defined(__FreeBSD__) X+ /* there is no mtab "file" in freebsd! */ X mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL); X+#endif X } X X cr.become_user(); Xdiff -urN fam-oss-2.6.4/fam/IMon.c++ fam-oss-2.6.4-freebsd/fam/IMon.c++ X--- fam-oss-2.6.4/fam/IMon.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/IMon.c++ Sat Mar 17 14:06:17 2001 X@@ -34,7 +34,9 @@ X #endif X #endif X X-#include <sys/sysmacros.h> X+#if !defined(__FreeBSD__) X+# include <sys/sysmacros.h> X+#endif X #include <unistd.h> X X #include "Interest.h" Xdiff -urN fam-oss-2.6.4/fam/Interest.c++ fam-oss-2.6.4-freebsd/fam/Interest.c++ X--- fam-oss-2.6.4/fam/Interest.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/Interest.c++ Sat Mar 17 14:06:37 2001 X@@ -25,7 +25,9 @@ X #include <string.h> X #include <errno.h> X #include <sys/param.h> X-#include <sys/sysmacros.h> X+#if !defined(__FreeBSD__) X+# include <sys/sysmacros.h> X+#endif X X #ifdef HAVE_IRIX_XTAB_VERIFICATION X #include <stdio.h> Xdiff -urN fam-oss-2.6.4/fam/InternalClient.c++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++ X--- fam-oss-2.6.4/fam/InternalClient.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/InternalClient.c++ Sat Mar 17 23:20:15 2001 X@@ -35,8 +35,8 @@ X { X assert(filename); X assert(h); X- assert(filename[0] == '/'); X Log::debug("%s watching %s", name(), filename); X+ assert(filename[0] == '/'); X interest = new File(filename, this, Request(0), Cred::SuperUser); X } X Xdiff -urN fam-oss-2.6.4/fam/Listener.c++ fam-oss-2.6.4-freebsd/fam/Listener.c++ X--- fam-oss-2.6.4/fam/Listener.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/Listener.c++ Sat Mar 17 14:12:57 2001 X@@ -22,6 +22,8 @@ X X #include "Listener.h" X X+#include <stdio.h> X+#include <stdlib.h> X #include <assert.h> X #include <fcntl.h> X #include <sys/types.h> X@@ -202,7 +204,11 @@ X // requested user and pass the name back to the client. X X char *tmpfile = tempnam("/tmp", ".fam"); X+#if defined(__FreeBSD__) X+ sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" }; X+#else X sockaddr_un sun = { AF_UNIX, "" }; X+#endif X if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1)) X { X Log::error("tmpnam() too long for sun_path (%d >= %d)!", X@@ -235,7 +241,7 @@ X return; X } X X- if (chown(sun.sun_path, uid, -1) != 0) X+ if (chown(sun.sun_path, uid, (gid_t)-1) != 0) X { Log::perror("localclient chown"); X close(client_sock); X return; X@@ -271,7 +277,11 @@ X X // Get the new socket. X X+#if defined(__FreeBSD__) X+ struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" }; X+#else X struct sockaddr_un sun = { AF_UNIX, "" }; X+#endif X CONFIG_SOCKLEN_T sunlen = sizeof(sun); X int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen); X if (client_fd < 0) X@@ -333,7 +343,11 @@ X void X Listener::dirty_ugly_hack() X { X+#if defined(__FreeBSD__) X+ static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" }; X+#else X static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" }; X+#endif X X int sock = socket(PF_UNIX, SOCK_STREAM, 0); X if (sock < 0) Xdiff -urN fam-oss-2.6.4/fam/Log.c++ fam-oss-2.6.4-freebsd/fam/Log.c++ X--- fam-oss-2.6.4/fam/Log.c++ Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/Log.c++ Sat Mar 17 14:14:31 2001 X@@ -28,6 +28,8 @@ X #include <stdlib.h> X #include <string.h> X #include <syslog.h> X+#include <sys/time.h> X+#include <sys/types.h> X #include <sys/resource.h> X #include <sys/stat.h> X #include <unistd.h> Xdiff -urN fam-oss-2.6.4/fam/Makefile.am fam-oss-2.6.4-freebsd/fam/Makefile.am X--- fam-oss-2.6.4/fam/Makefile.am Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/fam/Makefile.am Sat Mar 17 18:12:17 2001 X@@ -72,6 +72,7 @@ X main.c++ \ X timeval.c++ \ X timeval.h \ X+ mntent_compat.c++ \ X @IMON_FUNCS@.c++ X X EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++ Xdiff -urN fam-oss-2.6.4/fam/Scheduler.h fam-oss-2.6.4-freebsd/fam/Scheduler.h X--- fam-oss-2.6.4/fam/Scheduler.h Sat May 20 05:46:32 2000 X+++ fam-oss-2.6.4-freebsd/fam/Scheduler.h Sat Mar 17 00:14:04 2001 X@@ -24,6 +24,7 @@ X #define Scheduler_included X X #include <sys/time.h> X+#include <string.h> X X #include "Boolean.h" X Xdiff -urN fam-oss-2.6.4/fam/StringTable.h fam-oss-2.6.4-freebsd/fam/StringTable.h X--- fam-oss-2.6.4/fam/StringTable.h Sat May 20 05:46:32 2000 X+++ fam-oss-2.6.4-freebsd/fam/StringTable.h Sat Mar 17 18:05:38 2001 X@@ -25,6 +25,7 @@ X X #include <assert.h> X #include <string.h> X+#include "mntent.h" X X // A StringTable maps C strings onto values. It is a cheap O(n) X // implementation, suitable only for small tables that are Xdiff -urN fam-oss-2.6.4/fam/mntent.h fam-oss-2.6.4-freebsd/fam/mntent.h X--- fam-oss-2.6.4/fam/mntent.h Thu Jan 1 01:00:00 1970 X+++ fam-oss-2.6.4-freebsd/fam/mntent.h Sat Mar 17 18:11:08 2001 X@@ -0,0 +1,56 @@ X+/* X+ * mntent X+ * mntent.h - compatability header for FreeBSD X+ * X+ * Copyright (c) 2001 David Rufino <daverufino@btinternet.com> X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#if defined(HAVE_MNTENT_H) X+#include <mntent.h> X+#else X+#ifndef _MNTENT_H X+#define _MNTENT_H X+#include <stdio.h> X+ X+#define MOUNTED "dummy" X+ X+#define MNTTYPE_NFS "nfs" X+ X+struct mntent { X+ char *mnt_fsname; X+ char *mnt_dir; X+ char *mnt_type; X+ char *mnt_opts; X+ int mnt_freq; X+ int mnt_passno; X+}; X+ X+#define setmntent(x,y) ((FILE *)0x1) X+struct mntent *getmntent __P ((FILE *fp)); X+char *hasmntopt __P ((const struct mntent *mnt, const char *option)); X+#define endmntent(x) ((int)1) X+ X+#endif /* _MNTENT_H */ X+#endif /* HAVE_MNTENT_H */ Xdiff -urN fam-oss-2.6.4/fam/mntent_compat.c++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++ X--- fam-oss-2.6.4/fam/mntent_compat.c++ Thu Jan 1 01:00:00 1970 X+++ fam-oss-2.6.4-freebsd/fam/mntent_compat.c++ Sat Mar 17 23:48:07 2001 X@@ -0,0 +1,151 @@ X+/* X+ * Copyright (c) 1980, 1989, 1993, 1994 X+ * The Regents of the University of California. All rights reserved. X+ * Copyright (c) 2001 X+ * David Rufino <daverufino@btinternet.com> X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * 3. All advertising materials mentioning features or use of this software X+ * must display the following acknowledgement: X+ * This product includes software developed by the University of X+ * California, Berkeley and its contributors. X+ * 4. Neither the name of the University nor the names of its contributors X+ * may be used to endorse or promote products derived from this software X+ * without specific prior written permission. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+/* most of this was ripped from the mount(3) source */ X+ X+#include "config.h" X+#include "mntent.h" X+#if !defined(HAVE_MNTENT_H) X+#include <stdlib.h> X+#include <string.h> X+#include <sys/param.h> X+#include <sys/ucred.h> X+#include <sys/mount.h> X+ X+static int pos = -1; X+static int mntsize = -1; X+static struct mntent _mntent; X+ X+char * X+hasmntopt (const struct mntent *mnt, const char *option) X+{ X+ int found; X+ char *opt, *optbuf; X+ X+ optbuf = strdup(mnt->mnt_opts); X+ found = 0; X+ for (opt = optbuf; (opt = strtok(opt, " ")) != NULL; opt = NULL) { X+ if (!strcasecmp(opt, option)) { X+ opt = opt - optbuf + mnt->mnt_opts; X+ free (optbuf); X+ return (opt); X+ } X+ } X+ free (optbuf); X+ return (NULL); X+} X+ X+static char * X+catopt (char *s0, const char *s1) X+{ X+ size_t i; X+ char *cp; X+ X+ if (s1 == NULL || *s1 == '\0') X+ return s0; X+ if (s0 && *s0) { X+ i = strlen(s0) + strlen(s1) + 1 + 1; X+ if ((cp = (char *)malloc(i)) == NULL) X+ return (NULL); X+ (void)snprintf(cp, i, "%s %s", s0, s1); X+ } else X+ cp = strdup(s1); X+ X+ if (s0) X+ free(s0); X+ return (cp); X+} X+ X+ X+static char * X+flags2opts (int flags) X+{ X+ char *res; X+ res = NULL; X+ res = catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw"); X+ if (flags & MNT_SYNCHRONOUS) res = catopt(res, "sync"); X+ if (flags & MNT_NOEXEC) res = catopt(res, "noexec"); X+ if (flags & MNT_NOSUID) res = catopt(res, "nosuid"); X+ if (flags & MNT_NODEV) res = catopt(res, "nodev"); X+ if (flags & MNT_UNION) res = catopt(res, "union"); X+ if (flags & MNT_ASYNC) res = catopt(res, "async"); X+ if (flags & MNT_NOATIME) res = catopt(res, "noatime"); X+ if (flags & MNT_NOCLUSTERR) res = catopt(res, "noclusterr"); X+ if (flags & MNT_NOCLUSTERW) res = catopt(res, "noclusterw"); X+ if (flags & MNT_NOSYMFOLLOW) res = catopt(res, "nosymfollow"); X+ if (flags & MNT_SUIDDIR) res = catopt(res, "suiddir"); X+ X+ return res; X+} X+ X+static struct mntent * X+statfs_to_mntent (struct statfs *mntbuf) X+{ X+ static char opts_buf[40], *tmp; X+ X+ _mntent.mnt_fsname = mntbuf->f_mntfromname; X+ _mntent.mnt_dir = mntbuf->f_mntonname; X+ _mntent.mnt_type = mntbuf->f_fstypename; X+ tmp = flags2opts (mntbuf->f_flags); X+ if (tmp) { X+ opts_buf[sizeof(opts_buf)-1] = '\0'; X+ strncpy (opts_buf, tmp, sizeof(opts_buf)-1); X+ free (tmp); X+ } else { X+ *opts_buf = '\0'; X+ } X+ _mntent.mnt_opts = opts_buf; X+ _mntent.mnt_freq = _mntent.mnt_passno = 0; X+ return (&_mntent); X+} X+ X+struct mntent * X+getmntent (FILE *fp) X+{ X+ struct statfs *mntbuf; X+ X+ if (pos == -1 || mntsize == -1) X+ mntsize = getmntinfo (&mntbuf, MNT_NOWAIT); X+ X+ ++pos; X+ if (pos == mntsize) { X+ pos = mntsize = -1; X+ return (NULL); X+ } X+ X+ return (statfs_to_mntent (&mntbuf[pos])); X+} X+ X+#endif /* HAVE_MNTENT_H */ Xdiff -urN fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4-freebsd/libfam/Client.c++ X--- fam-oss-2.6.4/libfam/Client.c++ Sat May 20 05:46:32 2000 X+++ fam-oss-2.6.4-freebsd/libfam/Client.c++ Sat Mar 17 00:12:01 2001 X@@ -20,6 +20,7 @@ X // with this program; if not, write the Free Software Foundation, Inc., 59 X // Temple Place - Suite 330, Boston MA 02111-1307, USA. X X+#include <stdio.h> X #include <stdlib.h> X #include <unistd.h> X #include <netinet/in.h> Xdiff -urN fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4-freebsd/libfam/fam.c++ X--- fam-oss-2.6.4/libfam/fam.c++ Sat May 20 05:46:32 2000 X+++ fam-oss-2.6.4-freebsd/libfam/fam.c++ Sat Mar 17 00:12:43 2001 X@@ -21,6 +21,7 @@ X // Temple Place - Suite 330, Boston MA 02111-1307, USA. X X #include <sys/types.h> X+#include <rpc/rpc.h> X #include <sys/time.h> X #include <unistd.h> X #include <stdlib.h> Xdiff -urN fam-oss-2.6.4/test/test.c++ fam-oss-2.6.4-freebsd/test/test.c++ X--- fam-oss-2.6.4/test/test.c++ Sat May 20 05:46:32 2000 X+++ fam-oss-2.6.4-freebsd/test/test.c++ Sat Mar 17 18:39:23 2001 X@@ -1,6 +1,7 @@ X #include <sys/types.h> X #include <sys/time.h> X #include <stdio.h> X+#include <string.h> X #include <unistd.h> X #include <signal.h> X #include <errno.h> X--- fam-oss-2.6.4/acconfig.h Sat May 20 05:46:31 2000 X+++ fam-oss-2.6.4-freebsd/acconfig.h Sun Mar 18 00:40:47 2001 X@@ -44,6 +44,8 @@ X ** Otherwise, we'll use MNTTYPE_NFS. */ X #undef HAVE_FSID_NFS2 X X+#undef HAVE_MNTENT_H X+ X /* Define if we have MNTTYPE_NFS2 */ X #define HAVE_MNTTYPE_NFS2 0 X END-of-fam/files/patch-freebsd echo x - fam/files/patch-Makefile.am sed 's/^X//' >fam/files/patch-Makefile.am << 'END-of-fam/files/patch-Makefile.am' X--- Makefile.am.orig Fri May 19 23:46:31 2000 X+++ Makefile.am Mon Mar 19 11:51:05 2001 X@@ -7,30 +7,3 @@ X rpm: dist X @cd build && $(MAKE) $(AM_MAKEFLAGS) rpm X X-# We proceed even if these commands fail because this might be an install X-# into $DESTDIR by a non-root user. X-install-exec-hook: X- -@if test "no$(LDCONFIG)" != "no"; then \ X-## echo "Adding $(libdir) to ld.so.conf..."; \ X- $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \ X- exec $(LDCONFIG); \ X- fi X-## @echo "Adding fam to rpc..." X- -@$(EDITCONF) rpc add 391002 "sgi_fam 391002" X-## @echo "Adding fam to inetd.conf..." X- -@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \ X- "# fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \ X- "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam" X- @echo "Restarting inetd..." X- -@killall -HUP inetd X- X-# We don't remove $(libdir) from ld.so.conf here because we don't have X-# a way to tell whether we're the ones who added it, and other things X-# probably use it as well. X-uninstall-local: X-## @echo "Removing fam from rpc..." X- -@$(EDITCONF) rpc remove 391002 X-## @echo "Removing fam from inetd.conf..." X- -@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b' X- @echo "Restarting inetd..." X- -@killall -HUP inetd END-of-fam/files/patch-Makefile.am echo x - fam/files/fam.sh.sample sed 's/^X//' >fam/files/fam.sh.sample << 'END-of-fam/files/fam.sh.sample' X#!/bin/sh X Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then X echo "$0: Cannot determine the PREFIX" >&2 X exit 1 Xfi X Xcase "$1" in Xstart) X [ -x ${PREFIX}/bin/fam ] && ( ${PREFIX}/bin/fam & ) && echo -n ' fam' X ;; Xstop) X killall fam && echo -n ' fam' X ;; X*) X echo "Usage: `basename $0` {start|stop}" >&2 X ;; Xesac X Xexit 0 END-of-fam/files/fam.sh.sample echo x - fam/distinfo sed 's/^X//' >fam/distinfo << 'END-of-fam/distinfo' XMD5 (fam-oss-2.6.4.tar.gz) = d060919b3d9ede61a8b68eae1ded53ce END-of-fam/distinfo echo x - fam/pkg-message sed 's/^X//' >fam/pkg-message << 'END-of-fam/pkg-message' X************************************************************************ X XIn order to run this port, please add the following line to /etc/rpc if Xit is not already there: X Xsgi_fam 391002 X X************************************************************************ END-of-fam/pkg-message exit >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?200103191829.f2JITTK84099>