ports/66815: New port: fileschanged (FAM client)

Konstantin Reznichenko kot at premierbank.dp.ua
Tue May 18 14:30:46 UTC 2004


>Number:         66815
>Category:       ports
>Synopsis:       New port: fileschanged (FAM client)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 18 07:30:20 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Konstantin Reznichenko
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
PREMIERBANK
>Environment:
System: FreeBSD satellite.pb.dp.ua 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Tue
May 27 15:04:45 EEST 2003
kot at satellite.pb.dp.ua:/usr/src/sys/compile/SATELLITE i386

>Description:
    The fileschanged utility is a client to the FAM (File Alteration
Monitor)
    server that is now available in some distributions. Here's how the
fileschanged
    FAM client works: you give it some filenames on the command line and
then it
    monitors those files for changes. When it discovers that a file has
changed
    (or has been altered), it displays the filename on the standard-output.

>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:
#
# fileschanged
# fileschanged/Makefile
# fileschanged/distinfo
# fileschanged/pkg-descr
# fileschanged/pkg-plist
# fileschanged/files
# fileschanged/files/patch-filelist.c
# fileschanged/files/patch-monitor.c
# fileschanged/files/patch-handlers.c
# fileschanged/files/patch-configure
#
echo c - fileschanged
mkdir -p fileschanged > /dev/null 2>&1
echo x - fileschanged/Makefile
sed 's/^X//' >fileschanged/Makefile << 'END-of-fileschanged/Makefile'
X# New ports collection makefile for: fileschanged
X# Date created:   18 May 2004
X# Whom:    Konstantin Reznichenko <kot at premierbank.dp.ua>
X#
X# $FreeBSD$
X#
X
XPORTNAME= fileschanged
XPORTVERSION= 0.6.0
XCATEGORIES= sysutils
XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= ${PORTNAME}
X
XMAINTAINER= kot at premierbank.dp.ua
XCOMMENT= Fileschanged is utility that reports when files have been altered
X
XLIB_DEPENDS= fam.0:${PORTSDIR}/devel/fam
XBUILD_DEPENDS=
${LOCALBASE}/include/argp.h:${PORTSDIR}/devel/argp-standalone
X
XGNU_CONFIGURE= yes
XUSE_GMAKE= yes
X
XMAN1=  fileschanged.1
X
X.include <bsd.port.mk>
END-of-fileschanged/Makefile
echo x - fileschanged/distinfo
sed 's/^X//' >fileschanged/distinfo << 'END-of-fileschanged/distinfo'
XMD5 (fileschanged-0.6.0.tar.gz) = 78f652c17190017080eb985804d62013
END-of-fileschanged/distinfo
echo x - fileschanged/pkg-descr
sed 's/^X//' >fileschanged/pkg-descr << 'END-of-fileschanged/pkg-descr'
XThe fileschanged utility is a client to the FAM (File Alteration Monitor)
Xserver that is now available in some distributions. Here's how the
fileschanged
XFAM client works: you give it some filenames on the command line and then
it
Xmonitors those files for changes. When it discovers that a file has changed
X(or has been altered), it displays the filename on the standard-output.
X
XWWW: http://fileschanged.sourceforge.net/
END-of-fileschanged/pkg-descr
echo x - fileschanged/pkg-plist
sed 's/^X//' >fileschanged/pkg-plist << 'END-of-fileschanged/pkg-plist'
Xbin/fileschanged
X%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
X%%PORTDOCS%%%%DOCSDIR%%/COPYING
X%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/NEWS
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/fileschanged.lsm
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-fileschanged/pkg-plist
echo c - fileschanged/files
mkdir -p fileschanged/files > /dev/null 2>&1
echo x - fileschanged/files/patch-filelist.c
sed 's/^X//' >fileschanged/files/patch-filelist.c <<
'END-of-fileschanged/files/patch-filelist.c'
X--- src/filelist.c.orig Mon Feb 23 02:17:30 2004
X+++ src/filelist.c Tue May 18 12:28:34 2004
X@@ -12,6 +12,28 @@
X #include "opts.h"
X #include "listdirs.h"
X extern struct arguments_t arguments;
X+ssize_t getline(char **lineptr, size_t *n, FILE *stream)
X+{
X+ char *line;
X+ size_t len;
X+
X+ line = fgetln(stream, &len);
X+ if (!line)
X+  return -1;
X+ if (len >= *n) {
X+  char *tmp;
X+
X+  /* XXX some realloc() implementations don't set errno */
X+  tmp = realloc(*lineptr, len + 1);
X+  if (!tmp)
X+   return -1;
X+  *lineptr = tmp;
X+  *n = len + 1;
X+ }
X+ memcpy(*lineptr, line, len);
X+ (*lineptr)[len] = 0;
X+ return len;
X+}
X int for_every_filename(int (*for_every_file)(int (*)(void *, char *), void
*list), int (*add_it_to_the)(void *list, char *filename), void *list)
X {
X  for_every_file(add_it_to_the, list);
END-of-fileschanged/files/patch-filelist.c
echo x - fileschanged/files/patch-monitor.c
sed 's/^X//' >fileschanged/files/patch-monitor.c <<
'END-of-fileschanged/files/patch-monitor.c'
X--- src/monitor.c.orig Mon Feb 23 02:17:30 2004
X+++ src/monitor.c Tue May 18 12:32:17 2004
X@@ -2,7 +2,6 @@
X #include <stdio.h>
X #include <string.h>
X #include <stdlib.h>
X-#include <sys/select.h>
X #include <sys/types.h>
X #include <sys/stat.h>
X #include <time.h>
END-of-fileschanged/files/patch-monitor.c
echo x - fileschanged/files/patch-handlers.c
sed 's/^X//' >fileschanged/files/patch-handlers.c <<
'END-of-fileschanged/files/patch-handlers.c'
X--- src/handlers.c.orig Mon Feb 23 02:42:46 2004
X+++ src/handlers.c Tue May 18 10:16:13 2004
X@@ -7,6 +7,7 @@
X #include "node.h"
X #include "opts.h"
X #include "wl.h"
X+#include "libgen.h"
X extern struct arguments_t arguments;
X struct handler_t handlers[FC_HANDLER_MAX]=
X {
END-of-fileschanged/files/patch-handlers.c
echo x - fileschanged/files/patch-configure
sed 's/^X//' >fileschanged/files/patch-configure <<
'END-of-fileschanged/files/patch-configure'
X--- configure.orig Mon Feb 23 02:18:08 2004
X+++ configure Tue May 18 15:08:38 2004
X@@ -341,7 +341,7 @@
X bindir='${exec_prefix}/bin'
X sbindir='${exec_prefix}/sbin'
X libexecdir='${exec_prefix}/libexec'
X-datadir='${prefix}/share'
X+datadir='${prefix}/share/doc'
X sysconfdir='${prefix}/etc'
X sharedstatedir='${prefix}/com'
X localstatedir='${prefix}/var'
X@@ -2918,7 +2918,7 @@
X #define HAVE_LIBFAM 1
X _ACEOF
X
X-  LIBS="-lfam $LIBS"
X+  LIBS="-lfam -largp $LIBS"
X
X else
X   echo "You need to install the FAM development package"; exit 1
END-of-fileschanged/files/patch-configure
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list