summaryrefslogtreecommitdiff
path: root/sysutils/fam
diff options
context:
space:
mode:
authorrh <rh@pkgsrc.org>2002-05-12 10:25:47 +0000
committerrh <rh@pkgsrc.org>2002-05-12 10:25:47 +0000
commit0396cbc12855611b17646507e70fff82c4516fb6 (patch)
tree9dbe647cebed12d5d1d9c6d7944e4841f00401bd /sysutils/fam
parent2b325a79cdaf328d6dc59b3ba290496e59192841 (diff)
downloadpkgsrc-0396cbc12855611b17646507e70fff82c4516fb6.tar.gz
Initial import of fam-2.6.7, a file alteration monitor.
Diffstat (limited to 'sysutils/fam')
-rw-r--r--sysutils/fam/DESCR19
-rw-r--r--sysutils/fam/Makefile24
-rw-r--r--sysutils/fam/PLIST13
-rw-r--r--sysutils/fam/distinfo27
-rw-r--r--sysutils/fam/patches/patch-aa13
-rw-r--r--sysutils/fam/patches/patch-ab13
-rw-r--r--sysutils/fam/patches/patch-ac28
-rw-r--r--sysutils/fam/patches/patch-ad12
-rw-r--r--sysutils/fam/patches/patch-ae13
-rw-r--r--sysutils/fam/patches/patch-af30
-rw-r--r--sysutils/fam/patches/patch-ag23
-rw-r--r--sysutils/fam/patches/patch-ah15
-rw-r--r--sysutils/fam/patches/patch-ai14
-rw-r--r--sysutils/fam/patches/patch-aj66
-rw-r--r--sysutils/fam/patches/patch-ak13
-rw-r--r--sysutils/fam/patches/patch-al12
-rw-r--r--sysutils/fam/patches/patch-am12
-rw-r--r--sysutils/fam/patches/patch-an12
-rw-r--r--sysutils/fam/patches/patch-ao61
-rw-r--r--sysutils/fam/patches/patch-ap179
-rw-r--r--sysutils/fam/patches/patch-aq12
-rw-r--r--sysutils/fam/patches/patch-ar12
-rw-r--r--sysutils/fam/patches/patch-as12
-rw-r--r--sysutils/fam/patches/patch-at35
-rw-r--r--sysutils/fam/patches/patch-au35
-rw-r--r--sysutils/fam/patches/patch-av30
-rw-r--r--sysutils/fam/patches/patch-aw22
27 files changed, 757 insertions, 0 deletions
diff --git a/sysutils/fam/DESCR b/sysutils/fam/DESCR
new file mode 100644
index 00000000000..71542380423
--- /dev/null
+++ b/sysutils/fam/DESCR
@@ -0,0 +1,19 @@
+ FAM, the File Alteration Monitor, provides an API which applications
+can use to be notified when specific files or directories are changed.
+
+ FAM comes in two parts: fam, the daemon which listens for requests and
+delivers notification, and libfam, a library which client applications can
+use to communicate with fam.
+
+ If the monitored files are mounted from a remote host, the local FAM
+will attempt to contact FAM on the remote host, and will pass the requests
+on to the remote FAM.
+
+ FAM can also notify its clients when a file starts and stops execution.
+(The IRIX Interactive Desktop uses this to change a program's icon while
+it's running, for example.)
+
+ FAM was originally written for IRIX in 1989 by Bruce Karsh, and was
+rewritten in 1995 by Bob Miller. This open-source release of FAM builds
+and runs on NetBSD, FreeBSD, Linux, and IRIX, and is the same FAM that
+will be included with IRIX 6.5.8.
diff --git a/sysutils/fam/Makefile b/sysutils/fam/Makefile
new file mode 100644
index 00000000000..51bf4f9dbfd
--- /dev/null
+++ b/sysutils/fam/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/05/12 10:25:47 rh Exp $
+#
+
+DISTNAME= fam-2.6.7
+CATEGORIES= sysutils devel
+MASTER_SITES= ftp://oss.sgi.com/projects/fam/download/stable/ \
+ ftp://ftp.tuwien.ac.at/opsys/linux/gentoo/distfiles/ \
+ http://gd.tuwien.ac.at/opsys/linux/gentoo/distfiles/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://oss.sgi.com/projects/fam/
+COMMENT= File Alteration Monitor
+
+BUILD_DEPENDS+= autoconf>=2.13:../../devel/autoconf
+
+USE_GMAKE= YES
+USE_LIBTOOL= YES
+GNU_CONFIGURE= YES
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
+
+pre-configure:
+ cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/fam/PLIST b/sysutils/fam/PLIST
new file mode 100644
index 00000000000..5758147f293
--- /dev/null
+++ b/sysutils/fam/PLIST
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/05/12 10:25:47 rh Exp $
+bin/fam
+etc/fam.conf.sample
+include/fam.h
+lib/fam/editconf.perl
+lib/libfam.a
+lib/libfam.la
+lib/libfam.so
+lib/libfam.so.0
+lib/libfam.so.0.0
+man/man1/fam.1
+man/man3/fam.3
+@dirrm lib/fam
diff --git a/sysutils/fam/distinfo b/sysutils/fam/distinfo
new file mode 100644
index 00000000000..af1430e982c
--- /dev/null
+++ b/sysutils/fam/distinfo
@@ -0,0 +1,27 @@
+
+
+SHA1 (fam-2.6.7.tar.gz) = ca03cb4120e3cc7f6bb08c8183b358e240bd5d36
+Size (fam-2.6.7.tar.gz) = 241203 bytes
+SHA1 (patch-aa) = 6aa9a0ecda1d51ffa3e4ac2a45c02a9e629bb8bd
+SHA1 (patch-ab) = 60897dc25f7e18f584cba0c6d22538b1d0b11ecf
+SHA1 (patch-ac) = 5e76e34ebb14e9db2c76f5bdcbfd31cb70991d70
+SHA1 (patch-ad) = 5c8434bf36074b8ef6e1d5e022328bbeb6f35511
+SHA1 (patch-ae) = e07e52e8011e2f22e0391d33764a223e6ac769a4
+SHA1 (patch-af) = c982b3e2ada3274881990c5ea183ca692ff543fe
+SHA1 (patch-ag) = b2834bf82652eed34bfd231f9fc6c8cda018f893
+SHA1 (patch-ah) = 264fcf1d3c46c232b1cca81a21b5dd327a87619e
+SHA1 (patch-ai) = 62e013a8559aa5207085d80ed0bb77e005a4788e
+SHA1 (patch-aj) = 432912b52892927b5c23e44a3963b9c460646ae0
+SHA1 (patch-ak) = ca3c9b967d3ca159aab18353bcbb3d813665b5ec
+SHA1 (patch-al) = dee33dd3c235be568b35a57a34f6ca703bc8f411
+SHA1 (patch-am) = 59cb46a411a50adb9b0f61e48726a43408c1b701
+SHA1 (patch-an) = 8416a0de32fec6cbf615083d44fd0b5add5cd8e3
+SHA1 (patch-ao) = aa9e0cd237460004d4e1f89a3f4bced11ee620b7
+SHA1 (patch-ap) = 75ca4b6a32f1c3ed1a085457b4de9bb228242fad
+SHA1 (patch-aq) = 7bc20e2053a4922e6848c2e7fc35d7327710423a
+SHA1 (patch-ar) = f7f68cb96333d0a5b2b653cd1fa36a73ac7a3a9d
+SHA1 (patch-as) = d589cf64cf0548a5f79a3dfa1bc530823d2d4eb8
+SHA1 (patch-at) = 83f5680d43ad0e06e5eca517cbba2d0866ae42bc
+SHA1 (patch-au) = 10d6ce9a3c37ff986c8ff8b786b33d7714d8f904
+SHA1 (patch-av) = 18a90c53d641305ef02f71bf443c84d50a2c3fff
+SHA1 (patch-aw) = a6b75b6c2b85d1b8247cee16fd23fbaffa346c05
diff --git a/sysutils/fam/patches/patch-aa b/sysutils/fam/patches/patch-aa
new file mode 100644
index 00000000000..98b5ffa1121
--- /dev/null
+++ b/sysutils/fam/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/05/12 10:25:47 rh Exp $
+
+--- acconfig.h.orig Tue Dec 18 11:03:36 2001
++++ acconfig.h
+@@ -47,6 +47,8 @@
+ ** Otherwise, we'll use MNTTYPE_NFS. */
+ #undef HAVE_FSID_NFS2
+
++#undef HAVE_MNTENT_H
++
+ /* Define if we have MNTTYPE_NFS2 */
+ #define HAVE_MNTTYPE_NFS2 0
+
diff --git a/sysutils/fam/patches/patch-ab b/sysutils/fam/patches/patch-ab
new file mode 100644
index 00000000000..9cbdd501358
--- /dev/null
+++ b/sysutils/fam/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- config.h.in.orig Fri Dec 21 10:00:06 2001
++++ config.h.in
+@@ -12,6 +12,8 @@
+ /* Define if the system has imon and IMONIOC_ ioctl flags. */
+ #undef HAVE_IMON
+
++#undef HAVE_MNTENT_H
++
+ /* Define if the system has the struct revokdi and the IMONIOC_REVOKDI
+ ** ioctl flag. (IRIX 5.3 doesn't.)
+ */
diff --git a/sysutils/fam/patches/patch-ac b/sysutils/fam/patches/patch-ac
new file mode 100644
index 00000000000..6c81b67b825
--- /dev/null
+++ b/sysutils/fam/patches/patch-ac
@@ -0,0 +1,28 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- configure.in.orig Fri Dec 21 08:18:48 2001
++++ configure.in
+@@ -95,6 +95,8 @@
+ dnl AC_HEADER_SYS_WAIT
+ dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
+
++AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
++
+ dnl
+ dnl See if imon is available; if so, is it IRIX or Linux?
+ dnl
+@@ -310,10 +312,10 @@
+ dnl If we don't have MNTTYPE_NFS , we croak.
+ dnl
+
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
+-FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
+-FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
++dnl FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
+
+ dnl
+ dnl Test for bindresvport() prototype.
diff --git a/sysutils/fam/patches/patch-ad b/sysutils/fam/patches/patch-ad
new file mode 100644
index 00000000000..4b79be34485
--- /dev/null
+++ b/sysutils/fam/patches/patch-ad
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Client.h.orig Tue Dec 18 11:03:36 2001
++++ fam/Client.h
+@@ -23,6 +23,7 @@
+ #ifndef Client_included
+ #define Client_included
+
++#include <sys/types.h>
+ #include <netinet/in.h> // for in_addr
+
+ #include "Activity.h"
diff --git a/sysutils/fam/patches/patch-ae b/sysutils/fam/patches/patch-ae
new file mode 100644
index 00000000000..1f6d56e7fe5
--- /dev/null
+++ b/sysutils/fam/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/FileSystem.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/FileSystem.c++
+@@ -22,7 +22,7 @@
+
+ #include "FileSystem.h"
+
+-#include <mntent.h>
++#include "mntent.h"
+ #include <string.h>
+
+ #include "Event.h"
diff --git a/sysutils/fam/patches/patch-af b/sysutils/fam/patches/patch-af
new file mode 100644
index 00000000000..0697d150ec8
--- /dev/null
+++ b/sysutils/fam/patches/patch-af
@@ -0,0 +1,30 @@
+$NetBSD: patch-af,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/FileSystemTable.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/FileSystemTable.c++
+@@ -21,11 +21,13 @@
+ // Temple Place - Suite 330, Boston MA 02111-1307, USA.
+
+ #include <stddef.h>
++#include <stdio.h>
+ #include "FileSystemTable.h"
+
+-#include <mntent.h>
++#include "mntent.h"
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/param.h>
+
+ #if HAVE_STATVFS
+ #include <sys/statvfs.h>
+@@ -255,7 +257,10 @@
+ // create_fs_by_name initializes our "root" member variable.
+ if (!fs_by_name)
+ { create_fs_by_name();
++#if !defined(BSD)
++ /* there is no mtab "file" in BSD */
+ mtab_watcher = new InternalClient(mtab_name, mtab_event_handler, NULL);
++#endif
+ }
+
+ cr.become_user();
diff --git a/sysutils/fam/patches/patch-ag b/sysutils/fam/patches/patch-ag
new file mode 100644
index 00000000000..fcce18cb060
--- /dev/null
+++ b/sysutils/fam/patches/patch-ag
@@ -0,0 +1,23 @@
+$NetBSD: patch-ag,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/IMon.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/IMon.c++
+@@ -25,6 +25,7 @@
+ #include <assert.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <sys/param.h>
+
+ #if HAVE_IMON
+ #ifdef __sgi
+@@ -34,7 +35,9 @@
+ #endif
+ #endif
+
+-#include <sys/sysmacros.h>
++#if !defined(BSD)
++# include <sys/sysmacros.h>
++#endif
+ #include <unistd.h>
+
+ #include "Interest.h"
diff --git a/sysutils/fam/patches/patch-ah b/sysutils/fam/patches/patch-ah
new file mode 100644
index 00000000000..297d98d8368
--- /dev/null
+++ b/sysutils/fam/patches/patch-ah
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Interest.c++.orig Thu Dec 20 08:59:20 2001
++++ fam/Interest.c++
+@@ -25,7 +25,9 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/param.h>
+-#include <sys/sysmacros.h>
++#if !defined(BSD)
++# include <sys/sysmacros.h>
++#endif
+
+ #ifdef HAVE_IRIX_XTAB_VERIFICATION
+ #include <stdio.h>
diff --git a/sysutils/fam/patches/patch-ai b/sysutils/fam/patches/patch-ai
new file mode 100644
index 00000000000..e5e528aab1e
--- /dev/null
+++ b/sysutils/fam/patches/patch-ai
@@ -0,0 +1,14 @@
+$NetBSD: patch-ai,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/InternalClient.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/InternalClient.c++
+@@ -35,8 +35,8 @@
+ {
+ assert(filename);
+ assert(h);
+- assert(filename[0] == '/');
+ Log::debug("%s watching %s", name(), filename);
++ assert(filename[0] == '/');
+ interest = new File(filename, this, Request(0), Cred::SuperUser);
+ }
+
diff --git a/sysutils/fam/patches/patch-aj b/sysutils/fam/patches/patch-aj
new file mode 100644
index 00000000000..5d8d02c029e
--- /dev/null
+++ b/sysutils/fam/patches/patch-aj
@@ -0,0 +1,66 @@
+$NetBSD: patch-aj,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Listener.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/Listener.c++
+@@ -22,6 +22,8 @@
+
+ #include "Listener.h"
+
++#include <stdio.h>
++#include <stdlib.h>
+ #include <assert.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -32,6 +34,7 @@
+ #include <rpc/clnt.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
++#include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ #include <unistd.h>
+@@ -205,7 +208,11 @@
+ unsetenv("TMPDIR");
+
+ char *tmpfile = tempnam("/tmp", ".fam");
++#if (defined(BSD) && BSD >= 199306)
++ sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
++#else
+ sockaddr_un sun = { AF_UNIX, "" };
++#endif
+ if(strlen(tmpfile) >= (sizeof(sun.sun_path) - 1))
+ {
+ Log::error("tmpnam() too long for sun_path (%d >= %d)!",
+@@ -239,7 +246,7 @@
+ return;
+ }
+
+- if (chown(sun.sun_path, uid, -1) != 0)
++ if (chown(sun.sun_path, uid, (gid_t)-1) != 0)
+ { Log::perror("localclient chown");
+ close(client_sock);
+ return;
+@@ -275,7 +282,11 @@
+
+ // Get the new socket.
+
++#if (defined(BSD) && BSD >= 199306)
++ struct sockaddr_un sun = { sizeof(sockaddr_un), AF_UNIX, "" };
++#else
+ struct sockaddr_un sun = { AF_UNIX, "" };
++#endif
+ CONFIG_SOCKLEN_T sunlen = sizeof(sun);
+ int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen);
+ if (client_fd < 0)
+@@ -337,7 +348,11 @@
+ void
+ Listener::dirty_ugly_hack()
+ {
++#if (defined(BSD) && BSD >= 199306)
++ static sockaddr_un sun = { sizeof (sockaddr_un), AF_UNIX, "/tmp/.fam_socket" };
++#else
+ static sockaddr_un sun = { AF_UNIX, "/tmp/.fam_socket" };
++#endif
+
+ int sock = socket(PF_UNIX, SOCK_STREAM, 0);
+ if (sock < 0)
diff --git a/sysutils/fam/patches/patch-ak b/sysutils/fam/patches/patch-ak
new file mode 100644
index 00000000000..3e4e92ca708
--- /dev/null
+++ b/sysutils/fam/patches/patch-ak
@@ -0,0 +1,13 @@
+$NetBSD: patch-ak,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Log.c++.orig Tue Dec 18 11:03:37 2001
++++ fam/Log.c++
+@@ -28,6 +28,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <sys/time.h>
++#include <sys/types.h>
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
diff --git a/sysutils/fam/patches/patch-al b/sysutils/fam/patches/patch-al
new file mode 100644
index 00000000000..c7b5ed3e98c
--- /dev/null
+++ b/sysutils/fam/patches/patch-al
@@ -0,0 +1,12 @@
+$NetBSD: patch-al,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Makefile.am.orig Tue Dec 18 11:03:37 2001
++++ fam/Makefile.am
+@@ -72,6 +72,7 @@
+ main.c++ \
+ timeval.c++ \
+ timeval.h \
++ mntent_compat.c++ \
+ @IMON_FUNCS@.c++
+
+ EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
diff --git a/sysutils/fam/patches/patch-am b/sysutils/fam/patches/patch-am
new file mode 100644
index 00000000000..dad15743a6b
--- /dev/null
+++ b/sysutils/fam/patches/patch-am
@@ -0,0 +1,12 @@
+$NetBSD: patch-am,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Scheduler.h.orig Tue Dec 18 11:03:37 2001
++++ fam/Scheduler.h
+@@ -24,6 +24,7 @@
+ #define Scheduler_included
+
+ #include <sys/time.h>
++#include <string.h>
+
+ #include "Boolean.h"
+
diff --git a/sysutils/fam/patches/patch-an b/sysutils/fam/patches/patch-an
new file mode 100644
index 00000000000..da9632a5abb
--- /dev/null
+++ b/sysutils/fam/patches/patch-an
@@ -0,0 +1,12 @@
+$NetBSD: patch-an,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/StringTable.h.orig Tue Dec 18 11:03:37 2001
++++ fam/StringTable.h
+@@ -25,6 +25,7 @@
+
+ #include <assert.h>
+ #include <string.h>
++#include "mntent.h"
+
+ // A StringTable maps C strings onto values. It is a cheap O(n)
+ // implementation, suitable only for small tables that are
diff --git a/sysutils/fam/patches/patch-ao b/sysutils/fam/patches/patch-ao
new file mode 100644
index 00000000000..be547485627
--- /dev/null
+++ b/sysutils/fam/patches/patch-ao
@@ -0,0 +1,61 @@
+$NetBSD: patch-ao,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/mntent.h.orig Sun May 12 19:15:01 2002
++++ fam/mntent.h
+@@ -0,0 +1,56 @@
++/*
++ * mntent
++ * mntent.h - compatability header for BSD
++ *
++ * Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#if defined(HAVE_MNTENT_H)
++#include <mntent.h>
++#else
++#ifndef _MNTENT_H
++#define _MNTENT_H
++#include <stdio.h>
++
++#define MOUNTED "dummy"
++
++#define MNTTYPE_NFS "nfs"
++
++struct mntent {
++ char *mnt_fsname;
++ char *mnt_dir;
++ char *mnt_type;
++ char *mnt_opts;
++ int mnt_freq;
++ int mnt_passno;
++};
++
++#define setmntent(x,y) ((FILE *)0x1)
++struct mntent *getmntent __P ((FILE *fp));
++char *hasmntopt __P ((const struct mntent *mnt, const char *option));
++#define endmntent(x) ((int)1)
++
++#endif /* _MNTENT_H */
++#endif /* HAVE_MNTENT_H */
diff --git a/sysutils/fam/patches/patch-ap b/sysutils/fam/patches/patch-ap
new file mode 100644
index 00000000000..ba929575674
--- /dev/null
+++ b/sysutils/fam/patches/patch-ap
@@ -0,0 +1,179 @@
+$NetBSD: patch-ap,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/mntent_compat.c++.orig Sun May 12 19:37:49 2002
++++ fam/mntent_compat.c++
+@@ -0,0 +1,174 @@
++/*
++ * Copyright (c) 1980, 1989, 1993, 1994
++ * The Regents of the University of California. All rights reserved.
++ * Copyright (c) 2001
++ * David Rufino <daverufino@btinternet.com>
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. All advertising materials mentioning features or use of this software
++ * must display the following acknowledgement:
++ * This product includes software developed by the University of
++ * California, Berkeley and its contributors.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++/* most of this was ripped from the mount(3) source */
++
++#include "config.h"
++#include "mntent.h"
++#if !defined(HAVE_MNTENT_H)
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++
++static int pos = -1;
++static int mntsize = -1;
++static struct mntent _mntent;
++
++char *
++hasmntopt (const struct mntent *mnt, const char *option)
++{
++ int found;
++ char *opt, *optbuf;
++
++ optbuf = strdup(mnt->mnt_opts);
++ found = 0;
++ for (opt = optbuf; (opt = strtok(opt, " ")) != NULL; opt = NULL) {
++ if (!strcasecmp(opt, option)) {
++ opt = opt - optbuf + mnt->mnt_opts;
++ free (optbuf);
++ return (opt);
++ }
++ }
++ free (optbuf);
++ return (NULL);
++}
++
++static char *
++catopt (char *s0, const char *s1)
++{
++ size_t i;
++ char *cp;
++
++ if (s1 == NULL || *s1 == '\0')
++ return s0;
++ if (s0 && *s0) {
++ i = strlen(s0) + strlen(s1) + 1 + 1;
++ if ((cp = (char *)malloc(i)) == NULL)
++ return (NULL);
++ (void)snprintf(cp, i, "%s %s", s0, s1);
++ } else
++ cp = strdup(s1);
++
++ if (s0)
++ free(s0);
++ return (cp);
++}
++
++
++static char *
++flags2opts (int flags)
++{
++ char *res;
++ res = NULL;
++ res = catopt(res, (flags & MNT_RDONLY) ? "ro" : "rw");
++ if (flags & MNT_SYNCHRONOUS) res = catopt(res, "sync");
++ if (flags & MNT_NOEXEC) res = catopt(res, "noexec");
++ if (flags & MNT_NOSUID) res = catopt(res, "nosuid");
++ if (flags & MNT_NODEV) res = catopt(res, "nodev");
++ if (flags & MNT_UNION) res = catopt(res, "union");
++ if (flags & MNT_ASYNC) res = catopt(res, "async");
++ if (flags & MNT_NOATIME) res = catopt(res, "noatime");
++#ifdef MNT_NOCLUSTERR
++ if (flags & MNT_NOCLUSTERR) res = catopt(res, "noclusterr");
++#endif
++#ifdef MNT_NOCLUSTERW
++ if (flags & MNT_NOCLUSTERW) res = catopt(res, "noclusterw");
++#endif
++#ifdef MNT_NOSYMFOLLOW
++ if (flags & MNT_NOSYMFOLLOW) res = catopt(res, "nosymfollow");
++#endif
++#ifdef MNT_SUIDDIR
++ if (flags & MNT_SUIDDIR) res = catopt(res, "suiddir");
++#endif
++#ifdef MNT_NOCOREDUMP
++ if (flags & MNT_NOCOREDUMP) res = catopt(res, "nocoredump");
++#endif
++#ifdef MNT_IGNORE
++ if (flags & MNT_IGNORE) res = catopt(res, "hidden");
++#endif
++#ifdef MNT_SYMPERM
++ if (flags & MNT_SYMPERM) res = catopt(res, "symperm");
++#endif
++#ifdef MNT_NODEVMTIME
++ if (flags & MNT_NODEVMTIME) res = catopt(res, "nodevmtime");
++#endif
++#ifdef MNT_SOFTDEP
++ if (flags & MNT_SOFTDEP) res = catopt(res, "softdep");
++#endif
++
++ return res;
++}
++
++static struct mntent *
++statfs_to_mntent (struct statfs *mntbuf)
++{
++ static char opts_buf[40], *tmp;
++
++ _mntent.mnt_fsname = mntbuf->f_mntfromname;
++ _mntent.mnt_dir = mntbuf->f_mntonname;
++ _mntent.mnt_type = mntbuf->f_fstypename;
++ tmp = flags2opts (mntbuf->f_flags);
++ if (tmp) {
++ opts_buf[sizeof(opts_buf)-1] = '\0';
++ strncpy (opts_buf, tmp, sizeof(opts_buf)-1);
++ free (tmp);
++ } else {
++ *opts_buf = '\0';
++ }
++ _mntent.mnt_opts = opts_buf;
++ _mntent.mnt_freq = _mntent.mnt_passno = 0;
++ return (&_mntent);
++}
++
++struct mntent *
++getmntent (FILE *fp)
++{
++ struct statfs *mntbuf;
++
++ if (pos == -1 || mntsize == -1)
++ mntsize = getmntinfo (&mntbuf, MNT_NOWAIT);
++
++ ++pos;
++ if (pos == mntsize) {
++ pos = mntsize = -1;
++ return (NULL);
++ }
++
++ return (statfs_to_mntent (&mntbuf[pos]));
++}
++
++#endif /* HAVE_MNTENT_H */
diff --git a/sysutils/fam/patches/patch-aq b/sysutils/fam/patches/patch-aq
new file mode 100644
index 00000000000..50ef8b1d543
--- /dev/null
+++ b/sysutils/fam/patches/patch-aq
@@ -0,0 +1,12 @@
+$NetBSD: patch-aq,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- libfam/Client.c++.orig Tue Dec 18 11:03:38 2001
++++ libfam/Client.c++
+@@ -20,6 +20,7 @@
+ // with this program; if not, write the Free Software Foundation, Inc., 59
+ // Temple Place - Suite 330, Boston MA 02111-1307, USA.
+
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <netinet/in.h>
diff --git a/sysutils/fam/patches/patch-ar b/sysutils/fam/patches/patch-ar
new file mode 100644
index 00000000000..e418270de31
--- /dev/null
+++ b/sysutils/fam/patches/patch-ar
@@ -0,0 +1,12 @@
+$NetBSD: patch-ar,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- libfam/fam.c++.orig Tue Dec 18 11:03:38 2001
++++ libfam/fam.c++
+@@ -21,6 +21,7 @@
+ // Temple Place - Suite 330, Boston MA 02111-1307, USA.
+
+ #include <sys/types.h>
++#include <rpc/rpc.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff --git a/sysutils/fam/patches/patch-as b/sysutils/fam/patches/patch-as
new file mode 100644
index 00000000000..ccff09833e4
--- /dev/null
+++ b/sysutils/fam/patches/patch-as
@@ -0,0 +1,12 @@
+$NetBSD: patch-as,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- test/test.c++.orig Wed Dec 19 19:08:48 2001
++++ test/test.c++
+@@ -1,6 +1,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <signal.h>
diff --git a/sysutils/fam/patches/patch-at b/sysutils/fam/patches/patch-at
new file mode 100644
index 00000000000..b84eb52f205
--- /dev/null
+++ b/sysutils/fam/patches/patch-at
@@ -0,0 +1,35 @@
+$NetBSD: patch-at,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- Makefile.am.orig Tue Dec 18 11:03:36 2001
++++ Makefile.am
+@@ -7,30 +7,3 @@
+ rpm: dist
+ @cd build && $(MAKE) $(AM_MAKEFLAGS) rpm
+
+-# We proceed even if these commands fail because this might be an install
+-# into $DESTDIR by a non-root user.
+-install-exec-hook:
+- -@if test "no$(LDCONFIG)" != "no"; then \
+-## echo "Adding $(libdir) to ld.so.conf..."; \
+- $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
+- exec $(LDCONFIG); \
+- fi
+-## @echo "Adding fam to rpc..."
+- -@$(EDITCONF) rpc add 391002 "sgi_fam 391002"
+-## @echo "Adding fam to inetd.conf..."
+- -@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
+- "# fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
+- "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
+- @echo "Restarting inetd..."
+- -@killall -HUP inetd
+-
+-# We don't remove $(libdir) from ld.so.conf here because we don't have
+-# a way to tell whether we're the ones who added it, and other things
+-# probably use it as well.
+-uninstall-local:
+-## @echo "Removing fam from rpc..."
+- -@$(EDITCONF) rpc remove 391002
+-## @echo "Removing fam from inetd.conf..."
+- -@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
+- @echo "Restarting inetd..."
+- -@killall -HUP inetd
diff --git a/sysutils/fam/patches/patch-au b/sysutils/fam/patches/patch-au
new file mode 100644
index 00000000000..b512fa47678
--- /dev/null
+++ b/sysutils/fam/patches/patch-au
@@ -0,0 +1,35 @@
+$NetBSD: patch-au,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- fam/Makefile.in.orig Fri Dec 21 10:00:16 2001
++++ fam/Makefile.in
+@@ -99,7 +99,7 @@
+ bin_PROGRAMS = fam
+ sysconf_DATA = fam.conf
+
+-fam_SOURCES = Activity.c++ Activity.h Client.c++ Client.h ClientConnection.c++ ClientConnection.h ClientInterest.c++ ClientInterest.h Cred.c++ Cred.h DirEntry.c++ DirEntry.h Directory.c++ Directory.h DirectoryScanner.c++ DirectoryScanner.h Event.c++ Event.h File.c++ File.h FileSystem.c++ FileSystem.h FileSystemTable.c++ FileSystemTable.h IMon.c++ IMon.h Interest.c++ Interest.h InternalClient.c++ InternalClient.h Listener.c++ Listener.h LocalClient.c++ LocalClient.h LocalFileSystem.c++ LocalFileSystem.h Log.c++ Log.h MxClient.c++ MxClient.h NFSFileSystem.c++ NFSFileSystem.h NetConnection.c++ NetConnection.h Pollster.c++ Pollster.h Request.h RequestMap.h RPC_TCP_Connector.c++ RPC_TCP_Connector.h Scanner.c++ Scanner.h Scheduler.c++ Scheduler.h ServerConnection.c++ ServerConnection.h ServerHost.c++ ServerHost.h ServerHostRef.c++ ServerHostRef.h Set.h SmallTable.h StringTable.h TCP_Client.c++ TCP_Client.h main.c++ timeval.c++ timeval.h @IMON_FUNCS@.c++
++fam_SOURCES = Activity.c++ Activity.h Client.c++ Client.h ClientConnection.c++ ClientConnection.h ClientInterest.c++ ClientInterest.h Cred.c++ Cred.h DirEntry.c++ DirEntry.h Directory.c++ Directory.h DirectoryScanner.c++ DirectoryScanner.h Event.c++ Event.h File.c++ File.h FileSystem.c++ FileSystem.h FileSystemTable.c++ FileSystemTable.h IMon.c++ IMon.h Interest.c++ Interest.h InternalClient.c++ InternalClient.h Listener.c++ Listener.h LocalClient.c++ LocalClient.h LocalFileSystem.c++ LocalFileSystem.h Log.c++ Log.h MxClient.c++ MxClient.h NFSFileSystem.c++ NFSFileSystem.h NetConnection.c++ NetConnection.h Pollster.c++ Pollster.h Request.h RequestMap.h RPC_TCP_Connector.c++ RPC_TCP_Connector.h Scanner.c++ Scanner.h Scheduler.c++ Scheduler.h ServerConnection.c++ ServerConnection.h ServerHost.c++ ServerHost.h ServerHostRef.c++ ServerHostRef.h Set.h SmallTable.h StringTable.h TCP_Client.c++ TCP_Client.h main.c++ timeval.c++ timeval.h mntent_compat.c++ @IMON_FUNCS@.c++
+
+
+ EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
+@@ -123,7 +123,7 @@
+ Listener.o LocalClient.o LocalFileSystem.o Log.o MxClient.o \
+ NFSFileSystem.o NetConnection.o Pollster.o RPC_TCP_Connector.o \
+ Scanner.o Scheduler.o ServerConnection.o ServerHost.o ServerHostRef.o \
+-TCP_Client.o main.o timeval.o @IMON_FUNCS@.o
++TCP_Client.o main.o timeval.o mntent_compat.o @IMON_FUNCS@.o
+ fam_DEPENDENCIES = $(top_srcdir)/support/libsupport.a
+ fam_LDFLAGS =
+ CXXFLAGS = @CXXFLAGS@
+@@ -237,10 +237,10 @@
+ @list='$(sysconf_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
+- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
++ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p.sample; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
+- $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
++ $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p.sample; \
+ fi; fi; \
+ done
+
diff --git a/sysutils/fam/patches/patch-av b/sysutils/fam/patches/patch-av
new file mode 100644
index 00000000000..6acade39b54
--- /dev/null
+++ b/sysutils/fam/patches/patch-av
@@ -0,0 +1,30 @@
+$NetBSD: patch-av,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- Makefile.in.orig Sun May 12 19:27:47 2002
++++ Makefile.in
+@@ -388,25 +388,8 @@
+ # We proceed even if these commands fail because this might be an install
+ # into $DESTDIR by a non-root user.
+ install-exec-hook:
+- -@if test "no$(LDCONFIG)" != "no"; then \
+- $(EDITCONF) ld.so.conf add $(DESTDIR)$(libdir) $(DESTDIR)$(libdir); \
+- exec $(LDCONFIG); \
+- fi
+- -@$(EDITCONF) rpc add 391002 "sgi_fam 391002"
+- -@$(EDITCONF) inetd.conf add '\b(fam|FAM)\b' \
+- "# fam, the File Alteration Monitor, http://oss.sgi.com/projects/fam/" \
+- "sgi_fam/1-2 stream rpc/tcp wait root $(DESTDIR)$(bindir)/fam fam"
+- @echo "Restarting inetd..."
+- -@killall -HUP inetd
+
+-# We don't remove $(libdir) from ld.so.conf here because we don't have
+-# a way to tell whether we're the ones who added it, and other things
+-# probably use it as well.
+ uninstall-local:
+- -@$(EDITCONF) rpc remove 391002
+- -@$(EDITCONF) inetd.conf remove '\b(fam|FAM)\b'
+- @echo "Restarting inetd..."
+- -@killall -HUP inetd
+
+ # 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 --git a/sysutils/fam/patches/patch-aw b/sysutils/fam/patches/patch-aw
new file mode 100644
index 00000000000..33b84686939
--- /dev/null
+++ b/sysutils/fam/patches/patch-aw
@@ -0,0 +1,22 @@
+$NetBSD: patch-aw,v 1.1.1.1 2002/05/12 10:25:48 rh Exp $
+
+--- man/Makefile.in.orig Sun May 12 20:01:26 2002
++++ man/Makefile.in
+@@ -124,7 +124,7 @@
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
++ ext=1 ; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+@@ -157,7 +157,7 @@
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
++ ext=3 ; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \