FreeBSD Bugzilla – Attachment 42990 Details for
Bug 66894
New port: Fileschanged - FAM client (supersedes ports/66810)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 8.19 KB, created by
Konstantin Reznichenko
on 2004-05-19 17:20:19 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
Konstantin Reznichenko
Created:
2004-05-19 17:20:19 UTC
Size:
8.19 KB
patch
obsolete
># 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 ># fileschanged/files/patch-opts.c ># fileschanged/files/patch-opts.h ># fileschanged/pkg-message ># >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@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@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 Wed May 19 18:30:04 2004 >X@@ -12,6 +12,30 @@ >X #include "opts.h" >X #include "listdirs.h" >X extern struct arguments_t arguments; >X+#if defined(__FreeBSD__) >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+#endif >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 Wed May 19 18:30:54 2004 >X@@ -2,7 +2,9 @@ >X #include <stdio.h> >X #include <string.h> >X #include <stdlib.h> >X+#if !defined(__FreeBSD__) >X #include <sys/select.h> >X+#endif >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 Wed May 19 18:27:04 2004 >X@@ -7,6 +7,10 @@ >X #include "node.h" >X #include "opts.h" >X #include "wl.h" >X+#if defined(__FreeBSD__) >X+#include "libgen.h" >X+#endif >X+ >X extern struct arguments_t arguments; >X struct handler_t handlers[FC_HANDLER_MAX]= >X { >X@@ -180,13 +184,22 @@ >X } >X void show_event(enum handler_enum_t id, char *filename) >X { >X+ if (arguments.fileschanged.exec_command == NULL) >X+ { >X if (arguments.fileschanged.showaction) >X { >X fprintf(stdout, "%s ", handlers[id].name); >X } >X fprintf(stdout, "%s\n",filename); >X fflush(stdout); >X- return; >X+ } >X+ else >X+ { >X+ if(!fork()) { >X+ execlp(arguments.fileschanged.exec_command, >arguments.fileschanged.exec_command, handlers[id].name, filename, NULL); >X+ } >X+ } >X+ return; >X } >X int handle_created_file(FAMConnection *c, void *list, enum handler_enum_t >id, char *filename) >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 >echo x - fileschanged/files/patch-opts.c >sed 's/^X//' >fileschanged/files/patch-opts.c << >'END-of-fileschanged/files/patch-opts.c' >X--- src/opts.c.orig Mon Feb 23 02:17:30 2004 >X+++ src/opts.c Wed May 19 17:37:09 2004 >X@@ -19,6 +19,7 @@ >X const char filelist_option_explanation[]="Monitor the list of filenames >inside FILE"; >X const char filechangetimeout_option_explanation[]="Delay showing changed >files for N seconds (Def=2)"; >X const char showaction_option_explanation[]="Also display action when >displaying altered files"; >X+const char execcmd_option_explanation[]="Execute COMMAND when file altered >(COMMAND action filename)"; >X >X struct arguments_t arguments; >X static struct argp_option options[] = >X@@ -34,6 +35,7 @@ >X {"filelist", 'l',"FILENAME",0, filelist_option_explanation, 3}, >X {"timeout", 't',"N",0, filechangetimeout_option_explanation, 4}, >X {"prepend-action", 'p',0,0, showaction_option_explanation, 5}, >X+ {"execcmd", 'x',"COMMAND",0, execcmd_option_explanation, 6}, >X { 0 } >X }; >X >X@@ -93,6 +95,9 @@ >X arguments->fileschanged.filechangetimeout=atoi(arg); >X if (arguments->fileschanged.filechangetimeout<=1) >X arguments->fileschanged.filechangetimeout=-1; >X+ break; >X+ case 'x': >X+ arguments->fileschanged.exec_command=strdup(arg); >X break; >X case ARGP_KEY_INIT: >X free_arguments(); >END-of-fileschanged/files/patch-opts.c >echo x - fileschanged/files/patch-opts.h >sed 's/^X//' >fileschanged/files/patch-opts.h << >'END-of-fileschanged/files/patch-opts.h' >X--- src/opts.h.orig Mon Feb 23 02:17:30 2004 >X+++ src/opts.h Wed May 19 18:42:44 2004 >X@@ -17,6 +17,7 @@ >X int filestomonitor; >X int filechangetimeout; >X int showaction; >X+ char *exec_command; >X }; >X struct arguments_t { >X char **args; >END-of-fileschanged/files/patch-opts.h >echo x - fileschanged/pkg-message >sed 's/^X//' >fileschanged/pkg-message << 'END-of-fileschanged/pkg-message' >X************************************************************************ >X >X For correct work of FILESCHANGED, you must configure File Alteration >X Monitor (/usr/ports/devel/fam) >X >X Read /usr/ports/devel/fam/pkg-message or run: >X pkg_info -Dx fam | more >X >X************************************************************************ >END-of-fileschanged/pkg-message >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 66894
: 42990