marcel liker | 16 Jun 14:53
Picon
Favicon

Compile python bindings only

Hi,
how can I compile python26 gamin bindings on Centos? I downloaded gamin sources and was looking for a python only make target but can't find one.

Reason for this is the fact that Centos 5 supplies python2.6, however, gamin package comes with gamin python2.4 bindings where python2.4 is the default version of python on Centos/Redhat 5.

Gamin python bindings are required by Bcfg2 which runs with python26.

Thanks,
Marcel


_______________________________________________
gamin-list mailing list
gamin-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gamin-list
Rolf Anderegg | 28 Mar 20:25
Picon

bug: gamin exception: disconnected

Hello,

I have found a bug which occurs when I shutdown all my WatchMonitors (exception
during raising of disconnected exception). The following path solves this.

Best regards,

Rolf Anderegg
--- /usr/lib/pymodules/python2.6/gamin.py.orig  2011-03-28 16:34:51.862301001 +0200
+++ /usr/lib/pymodules/python2.6/gamin.py       2011-03-28 16:35:33.694301001 +0200
@@ -142,7 +142,7 @@
     def __del__ (self):
         self.disconnect()

-    def __raise_disconnected():
+    def __raise_disconnected(self):
        raise(GaminException("Already disconnected"))

     def _debug_object(self, value, callback, data = None):
_______________________________________________
gamin-list mailing list
gamin-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gamin-list
Balajee | 14 Mar 08:16
Picon

Building Gamin 0.1.9 on OSX

I am trying to get gamin to build on OSX. On searching the mail archives 
I found that patches to build on OSX as described in:
http://mail.gnome.org/archives/gamin-list/2007-May/msg00002.html
have been applied in 0.1.9 as stated in:
http://mail.gnome.org/archives/gamin-list/2007-July/msg00005.html

However, I am unable to build on OSX (10.6.6)
The following is a transcript of the configure script's output and make 
output.
Can someone please take a look and see what is going wrong?

NightWing:gamin-0.1.9 balajeerc$ ls
AUTHORS        NEWS        config.sub    gamin.spec.in    python
COPYING        README        configure    install-sh    server
ChangeLog    TODO        configure.in    lib        tests
Copyright    acinclude.m4    depcomp        libgamin
INSTALL        aclocal.m4    doc        ltmain.sh
Makefile.am    config.guess    gamin.pc.in    missing
Makefile.in    config.h.in    gamin.spec    mkinstalldirs
NightWing:gamin-0.1.9 balajeerc$ mkdir build
NightWing:gamin-0.1.9 balajeerc$ ./configure
checking build system type... i686-apple-darwin10.6.0
checking host system type... i686-apple-darwin10.6.0
checking target system type... i686-apple-darwin10.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for egrep... grep -E
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) 
is GNU ld... no
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to 
reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
rm: conftest.dSYM: is a directory
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from gcc object... rm: 
conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
checking if gcc supports -fno-rtti -fno-exceptions... rm: conftest.dSYM: 
is a directory
no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... rm: conftest.dSYM: is a 
directory
yes
checking if gcc static flag -static works... rm: conftest.dSYM: is a 
directory
no
checking if gcc supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the gcc linker 
(/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
checking for ld used by g++... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) 
is GNU ld... no
checking whether the g++ linker 
(/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... rm: conftest.dSYM: is a 
directory
yes
checking if g++ static flag -static works... rm: conftest.dSYM: is a 
directory
no
checking if g++ supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the g++ linker 
(/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for ANSI C header files... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking gtk-doc version >= 1.0... yes
checking for usleep... yes
checking for setsid... yes
checking for setenv... yes
checking for putenv... yes
checking for getlogin_r... yes
checking for nanoseconds field of struct stat.st_mtim... no
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for DAEMON... yes
checking for LIBGAMIN... yes
checking for TEST... yes
checking for kevent... yes
checking sys/event.h usability... yes
checking sys/event.h presence... yes
checking for sys/event.h... yes
Enabling multithreaded support
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_mutexattr_settype in -lpthread... yes
checking for ISO C99 varargs macros in C... yes
checking for GNUC varargs macros... yes
checking for struct cmsgcred... no
checking abstract socket namespace... no
checking for python... /usr/bin/python
Found Python version 2.6
checking for more compiler warnings... yes
checking whether gcc understands -Wno-sign-compare... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating libgamin/Makefile
config.status: creating server/Makefile
config.status: creating tests/Makefile
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating doc/Makefile
config.status: creating gamin.pc
config.status: creating gamin.spec
config.status: creating config.h
config.status: executing depfiles commands

gamin-0.1.9:

         prefix:                   /usr/local
         source code location:     .
         compiler:                 gcc
         compiler flags:            -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g

     backends:                 polling, kqueue
     build documentation:      no
     debug support:            yes

NightWing:gamin-0.1.9 balajeerc$ make
make  all-recursive
Making all in lib
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I../lib 
-DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts -Wmissing-declarations 
-Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare 
-g  -MT gam_event.o -MD -MP -MF ".deps/gam_event.Tpo" -c -o gam_event.o 
gam_event.c; \
     then mv -f ".deps/gam_event.Tpo" ".deps/gam_event.Po"; else rm -f 
".deps/gam_event.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I../lib 
-DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts -Wmissing-declarations 
-Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare 
-g  -MT gam_error.o -MD -MP -MF ".deps/gam_error.Tpo" -c -o gam_error.o 
gam_error.c; \
     then mv -f ".deps/gam_error.Tpo" ".deps/gam_error.Po"; else rm -f 
".deps/gam_error.Tpo"; exit 1; fi
rm -f libgamin_shared.a
ar cru libgamin_shared.a gam_event.o gam_error.o
ranlib libgamin_shared.a
Making all in libgamin
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I..  -I.. -I../lib -DBINDIR=\""/usr/local/libexec"\" 
-DBUILDDIR=\"".."\" -DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g  -MT gam_api.lo -MD -MP -MF 
".deps/gam_api.Tpo" -c -o gam_api.lo gam_api.c; \
     then mv -f ".deps/gam_api.Tpo" ".deps/gam_api.Plo"; else rm -f 
".deps/gam_api.Tpo"; exit 1; fi
mkdir .libs
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_api.lo -MD 
-MP -MF .deps/gam_api.Tpo -c gam_api.c  -fno-common -DPIC -o .libs/gam_api.o
gam_api.c: In function 'gamin_get_user_name':
gam_api.c:123: warning: implicit declaration of function 'strncpy'
gam_api.c:123: warning: incompatible implicit declaration of built-in 
function 'strncpy'
gam_api.c: In function 'gamin_get_socket_path':
gam_api.c:164: warning: implicit declaration of function 'strdup'
gam_api.c:164: warning: incompatible implicit declaration of built-in 
function 'strdup'
gam_api.c: In function 'gamin_get_socket_dir':
gam_api.c:191: warning: incompatible implicit declaration of built-in 
function 'strdup'
gam_api.c: In function 'gamin_connect_unix_socket':
gam_api.c:366: warning: implicit declaration of function 'memset'
gam_api.c:366: warning: incompatible implicit declaration of built-in 
function 'memset'
gam_api.c:380: warning: incompatible implicit declaration of built-in 
function 'strncpy'
gam_api.c: In function 'gamin_write_byte':
gam_api.c:541: warning: implicit declaration of function 'strerror'
gam_api.c:541: warning: nested extern declaration of 'strerror'
gam_api.c: In function 'gamin_send_request':
gam_api.c:591: warning: implicit declaration of function 'strlen'
gam_api.c:591: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c:603: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c:627: warning: implicit declaration of function 'memcpy'
gam_api.c:627: warning: incompatible implicit declaration of built-in 
function 'memcpy'
gam_api.c: In function 'gamin_check_cred':
gam_api.c:680: warning: incompatible implicit declaration of built-in 
function 'memset'
gam_api.c: In function 'gamin_resend_request':
gam_api.c:844: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c:856: warning: incompatible implicit declaration of built-in 
function 'memcpy'
gam_api.c: In function 'FAMMonitorDirectory':
gam_api.c:1082: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c: In function 'FAMMonitorDirectory2':
gam_api.c:1124: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c: In function 'FAMMonitorFile':
gam_api.c:1166: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c: In function 'FAMMonitorFile2':
gam_api.c:1206: warning: incompatible implicit declaration of built-in 
function 'strlen'
gam_api.c: At top level:
gam_api.c:41: warning: 'FAMError' defined but not used
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_api.lo -MD 
-MP -MF .deps/gam_api.Tpo -c gam_api.c -o gam_api.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I..  -I.. -I../lib -DBINDIR=\""/usr/local/libexec"\" 
-DBUILDDIR=\"".."\" -DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g  -MT gam_data.lo -MD -MP -MF 
".deps/gam_data.Tpo" -c -o gam_data.lo gam_data.c; \
     then mv -f ".deps/gam_data.Tpo" ".deps/gam_data.Plo"; else rm -f 
".deps/gam_data.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_data.lo -MD 
-MP -MF .deps/gam_data.Tpo -c gam_data.c  -fno-common -DPIC -o 
.libs/gam_data.o
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_data.lo -MD 
-MP -MF .deps/gam_data.Tpo -c gam_data.c -o gam_data.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I..  -I.. -I../lib -DBINDIR=\""/usr/local/libexec"\" 
-DBUILDDIR=\"".."\" -DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g  -MT gam_fork.lo -MD -MP -MF 
".deps/gam_fork.Tpo" -c -o gam_fork.lo gam_fork.c; \
     then mv -f ".deps/gam_fork.Tpo" ".deps/gam_fork.Plo"; else rm -f 
".deps/gam_fork.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_fork.lo -MD 
-MP -MF .deps/gam_fork.Tpo -c gam_fork.c  -fno-common -DPIC -o 
.libs/gam_fork.o
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_fork.lo -MD 
-MP -MF .deps/gam_fork.Tpo -c gam_fork.c -o gam_fork.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I..  -I.. -I../lib -DBINDIR=\""/usr/local/libexec"\" 
-DBUILDDIR=\"".."\" -DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g  -MT gam_error.lo -MD -MP -MF 
".deps/gam_error.Tpo" -c -o gam_error.lo gam_error.c; \
     then mv -f ".deps/gam_error.Tpo" ".deps/gam_error.Plo"; else rm -f 
".deps/gam_error.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_error.lo 
-MD -MP -MF .deps/gam_error.Tpo -c gam_error.c  -fno-common -DPIC -o 
.libs/gam_error.o
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_error.lo 
-MD -MP -MF .deps/gam_error.Tpo -c gam_error.c -o gam_error.o >/dev/null 
2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I..  -I.. -I../lib -DBINDIR=\""/usr/local/libexec"\" 
-DBUILDDIR=\"".."\" -DGAM_DEBUG_ENABLED    -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g  -MT gam_event.lo -MD -MP -MF 
".deps/gam_event.Tpo" -c -o gam_event.lo gam_event.c; \
     then mv -f ".deps/gam_event.Tpo" ".deps/gam_event.Plo"; else rm -f 
".deps/gam_event.Tpo"; exit 1; fi
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_event.lo 
-MD -MP -MF .deps/gam_event.Tpo -c gam_event.c  -fno-common -DPIC -o 
.libs/gam_event.o
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib 
-DBINDIR=\"/usr/local/libexec\" -DBUILDDIR=\"..\" -DGAM_DEBUG_ENABLED 
-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wsign-compare -Wno-sign-compare -g -MT gam_event.lo 
-MD -MP -MF .deps/gam_event.Tpo -c gam_event.c -o gam_event.o >/dev/null 
2>&1
/bin/sh ../libtool --tag=CC --mode=link gcc  -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wsign-compare -Wno-sign-compare -g    -o libgamin-1.la -rpath 
/usr/local/lib -Wl,--version-script=./gamin_sym.version -version-info 
1:9:1 -lpthread gam_api.lo gam_data.lo gam_fork.lo gam_error.lo 
gam_event.lo
gcc -dynamiclib ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o 
.libs/libgamin-1.0.1.9.dylib  .libs/gam_api.o .libs/gam_data.o 
.libs/gam_fork.o .libs/gam_error.o .libs/gam_event.o  -lpthread  
-Wl,--version-script=./gamin_sym.version -install_name  
/usr/local/lib/libgamin-1.0.dylib -Wl,-compatibility_version -Wl,2 
-Wl,-current_version -Wl,2.9
ld: unknown option: --version-script=./gamin_sym.version
collect2: ld returned 1 exit status
make[2]: *** [libgamin-1.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
NightWing:gamin-0.1.9 balajeerc$
Stef Bon | 30 Apr 22:36
Picon

Question about gamin.

Hello,

I'm working on a fuse module, and want to make it inotify aware.

Now I know about gamin. I'm building my won desktop with
LinuxFromScratch, and gamin
is always a part of the build.

But what does gamin excactly?

Inotify request go via the kernel. Does gamin replace these calls?

Or is it an extra layer around the inotify syscalls/structure, to
provide an seemless interface
with filesystems that do not provide inotify (remote fs's for example)

Stef
PS I've sent this message before, but somehowe that's lost.
tony.chamberlain | 1 Jul 17:53

Deactivating gamin (gam_server)

Is there any way to turn off gam_server?  It often uses 100% of the
CPU.  The info on the web page didn't really say.  Also I could not find
any gaminrc files, nor could I uninstall it because too much was
dependant on it, which seemed unrelated.

Thanks
Tony
Mark - Syminet | 13 Jun 12:13

imapd: Failed to connect to socket /tmp/fam--


Hi, I'm probably posting to the wrong place but wanted to throw this
out there:

Ubuntu server ships courier-imap compiled with "Realtime Folder  
Updates":
http://www.courier-mta.org/imapd.html

This requires that either Gamin or FAM be installed, and by default
Ubuntu is shipping with Gamin as a dependency for courier-imap.

But our server has virtual email account setup (done via web control  
panel -
they are not real users mapped in /etc/passwd but rather in the MySQL  
DB).

I found that the new courier-imap shipping with Gamin is  taking 7-10
seconds to switch to even empty mailfolders while logging this each  
time:

Courier: imapd: Failed to connect to socket /tmp/fam--

...so I'm thinking this is a Gamin issue?  It seems to be timing out -  
is there
some sort of config setting that can be put into /etc/gaminrc to make  
this
timeout instantly?

Best

Mark
Can | 25 Feb 09:16
Gravatar

move event

Hi,

I'm new to gamin and now exploring its capabilities. I noticed that I
can't raise a 'moved' event. I browsed to code a bit, and I have the
feeling that it's not supported. Tests in the source code don't have a
case either. What is the status of the moved event? If it's supported,
can you help me with an example?

Thanks,

--
Can Bican
Stuart Shelton | 20 Feb 12:17

Patch to fix gamin-0.1.10 IRIX/MIPSpro compiler quirk


Without modification, gamin-0.1.10 fails to build with errors such as:

cc-3316 cc: ERROR File = gam_connection.c, Line = 524
   The expression must be a pointer to a complete object type.

           memmove(&conn->request, (void *)req + req->len, 
conn->request_len);
                                   ^

1 error detected in the compilation of "gam_connection.c".

... in a couple of files.

The attached patch fixes the problem - but probably needs a sanity-check 
to ensure that I've not inadvertently changed the sense of either 
problematic statement?

Cheers,

Stuart
--- ./server/gam_channel.c.dist	2009-02-05 10:17:12.212499400 +0000
+++ ./server/gam_channel.c	2009-02-05 10:33:57.965238760 +0000
@@ -825,6 +825,7 @@ gam_client_conn_write(GIOChannel * sourc
 {
     int written;
     int remaining;
+    int tmp;

     /**
      * Todo: check if write will block, or use non-blocking options
@@ -848,7 +849,8 @@ gam_client_conn_write(GIOChannel * sourc
 	    return (FALSE);
 	}

-	data += written;
+	tmp = (int)data + written;
+  data = (gpointer)tmp;
 	remaining -= written;
     } while (remaining > 0);

--- ./server/gam_connection.c.dist	2009-02-05 10:37:26.300740920 +0000
+++ ./server/gam_connection.c	2009-02-05 10:42:13.393285360 +0000
@@ -451,6 +451,7 @@ int
 gam_connection_data(GamConnDataPtr conn, int len)
 {
     GAMPacketPtr req;
+    GAMPacketPtr tmp;

     g_assert(conn);
     g_assert(len >= 0);
@@ -521,7 +522,8 @@ gam_connection_data(GamConnDataPtr conn,
 #if defined(__i386__) || defined(__x86_64__)
 	req = (void *) req + req->len;
 #else
-        memmove(&conn->request, (void *)req + req->len, conn->request_len);
+        tmp = req + req->len;
+        memmove(&conn->request, (void *)tmp, conn->request_len);
 #endif
     }

_______________________________________________
Gamin-list mailing list
Gamin-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gamin-list
Kedar Sovani | 6 Jan 12:02
Favicon

[PATCH] gamin: Detect that we are running on Linux in case of linux-gnueabi.

In case of building on ARM EABI, the triplet is something like:
armv5tel-redhat-linux-gnueabi. 

Declare HAVE_LINUX in case of linux-gnueabi as well. 

Please consider for inclusion.

Signed-off-by: Kedar Sovani <kedars <at> marvell.com>

diff -urp gamin-0.1.9.orig/configure.in gamin-0.1.9/configure.in
--- gamin-0.1.9.orig/configure.in	2007-07-27 10:20:20.000000000 -0400
+++ gamin-0.1.9/configure.in	2008-12-17 01:03:47.000000000 -0500
@@ -150,6 +150,10 @@ dnl check what OS we're on
 if test x$target_os = xlinux-gnu; then
 	AC_DEFINE([HAVE_LINUX],[],[Whether we are using linux or not])
 fi
+#AM_CONDITIONAL(HAVE_LINUX, test x$target_os = xlinux-gnueabi)
+if test x$target_os = xlinux-gnueabi; then
+	AC_DEFINE([HAVE_LINUX],[],[Whether we are using linux or not])
+fi

 AC_ARG_ENABLE(kernel,
 	AC_HELP_STRING([--disable-kernel], [Use polling regardless of what kernel-level systems are available]),
Jean-Michel Beuken | 9 Dec 22:49
Picon
Favicon

make check

Hello,

I have downloaded the last version of  gamin-0.1.9

I have compiled under CentOS 5.1 with gcc432 ( AMD Opteron)  and Python 
2.4.3 is installed

./configure and make seems OK

but "make check" produces some errors... (see below)

is it important ?

thanks in advances...

regards

jmb

--------------- make check -------
[root <at> chum gamin-0.1.9]# make check
Making check in lib
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/lib'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/lib'
Making check in libgamin
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/libgamin'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/libgamin'
Making check in server
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/server'
make  check-am
make[2]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/server'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/server'
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/server'
Making check in python
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/python'
Making check in tests
make[2]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/python/tests'
make  check-local
make[3]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/python/tests'
basic.py
basic2.py
basic3.py
basic4.py
-- basic4.py
Got callback: /usr/local/src/TOOLS/gamin-0.1.9/python/tests/temp_dir, 8
Got callback: a, 8
Got callback: /usr/local/src/TOOLS/gamin-0.1.9/python/tests/temp_dir, 9
Error: top monitor got 3 events insteads of 4
basic5.py
-- basic5.py
Error: top monitor got 3 events insteads of 4
basic6.py
-- basic6.py
Error: top monitor got 2 events insteads of 3
bigfile.py
-- bigfile.py
Error: top monitor got 2 events insteads of 3
noexists.py
-- noexists.py
error : created event expected
dnotify.py
dnotify2.py
dnotify3.py
-- dnotify3.py
Error: monitor got 2 events insteads of 2
dnotify4.py
-- dnotify4.py
Error got event 2 expected 8
dnotify5.py
-- dnotify5.py
Error: monitor got 3 events insteads of 4
dnotify6.py
-- dnotify6.py
Error: monitor got 3 events insteads of 4
dnotify7.py
-- dnotify7.py
Error: file monitor got 3 events insteads of 4
Error: dir monitor got 4 events insteads of 4
dnotify8.py
-- dnotify8.py
Error: monitor got 4 events insteads of 5
dnotify9.py
-- dnotify9.py
Error: monitor got 3 events insteads of 4
dnotify10.py
-- dnotify10.py
Error: monitor got 3 events insteads of 4
dnotify11.py
-- dnotify11.py
Error: monitor got 4 events insteads of 5
dnotify12.py
-- dnotify12.py
Error: monitor got 2 events insteads of 4
dnotify13.py
-- dnotify13.py
Error got event 1 expected 5
Error got event 2 expected 1
Error: monitor got 2 events insteads of 4
dnotify15.py
flood.py
flood2.py
-- flood2.py
Error: event flow didn't worked properly, gor 30 events
flood3.py
flood4.py
-- flood4.py
Error: event flow didn't worked properly, gor 152 events
level.py
-- level.py
Error: sub monitor got 2 events insteads of 3
multiple.py
-- multiple.py
Error: monitor 0 got 2 out of 4 events
multiple2.py
-- multiple2.py
Error: monitor 0 got 2 out of 4 events
multiple3.py
-- multiple3.py
Error: monitor 0 got 2 events, expecting 3
Error: monitor 1 got 3 events, expecting 4
Error: monitor 2 got 4 events, expecting 5
nokernel.py
readonly.py
Traceback (most recent call last):
  File "/usr/local/src/TOOLS/gamin-0.1.9/python/gamin.py", line 109, in 
_internal_callback
    self.callback (path, event)
  File "./readonly.py", line 16, in callback
    if expect[top] != event:
IndexError: list index out of range
-- readonly.py
Error got event 8 expected 9
make[3]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/python/tests'
make[2]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/python/tests'
make[2]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/python'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/python'
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/python'
Making check in tests
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/tests'
make  check-local
make[2]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/tests'
running test 10
running test 11
running test 1
running test 2
running test 3
running test 4
running test 5
running test 6
running test 7
running test 8
running test 9
*** ../tests/result/9    2007-07-04 15:36:49.000000000 +0200
--- result.9    2008-12-09 21:23:14.000000000 +0100
***************
*** 4,12 ****
  1: /tmp/test_gamin Exists: NULL
  1: /tmp/test_gamin EndExist: NULL
  mkfile /tmp/test_gamin/foo
! 1: /tmp/test_gamin Changed: NULL
! append /tmp/test_gamin/foo
! rmfile /tmp/test_gamin/foo
! 1: /tmp/test_gamin Changed: NULL
! disconnected
! rmdir /tmp/test_gamin
--- 4,7 ----
  1: /tmp/test_gamin Exists: NULL
  1: /tmp/test_gamin EndExist: NULL
  mkfile /tmp/test_gamin/foo
! expect line 8: got 0 of 1 expected events
make[2]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/tests'
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/tests'
Making check in doc
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9/doc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9/doc'
make[1]: Entering directory `/usr/local/src/TOOLS/gamin-0.1.9'
make[1]: Leaving directory `/usr/local/src/TOOLS/gamin-0.1.9'
Wijnand Modderman | 13 Aug 16:38

Regarding absolute paths

Hello,

I found out about Gamin when I was looking for a library that could  
handle inotify hooks in Python.

Gamin is working nicely, and reports changes in the directory  
structure quite fast. However, it seems to pass both absolute and  
relative paths as a feedback in the callback events. Is there any way  
to alter this behavior? Or is there any "best practice" to reconstruct  
the absolute path from the relative paths given?

Example:

 >>> import gamin
 >>> def callback(path, event):
...	print path, event
 >>> monitor = gamin.WatchMonitor()
 >>> monitor.watch_directory('/tmp/test', callback)

[... now in another shell, I create /tmp/test/foo ...]

 >>> monitor.handle_events()
 >>> monitor.stop_watch('/tmp/test')

This results in:

     bar 5

While I would like to find out that this was "/tmp/test/foo". In the  
full project I am registering about 5000 paths to monitor.

Regards,

Wijnand Modderman

  [_][O][_]                Wijnand "maze" Modderman
  [_][_][O]     HAR2009 - Help making it happen and volunteer!
  [O][O][O]  http://wiki.har2009.org/index.php?title=Participation

Gmane