You are not logged in.

#1 2004-12-25 11:27:55

vicious
Member
Registered: 2004-11-09
Posts: 113

Is my FAM setup ok?

I have just added "fam" to the list of deamons in rc.conf. This way nautilus (and probably some other apps) refreshes it's display when a directory is modified.

However, I'm not sure if it works alright. If I create a new file (with "echo > new_file"), then I must wait a few seconds until nautilus notices the change. Shouldn't it happen immediately? I have 2.6.8.1 kernel and it has the support for monitoring filesystem changes, so polling is not necessary. Is fam package built with all the necessary options? Or have I done something wrong when setting up nautilus or fam?

Offline

#2 2004-12-25 13:17:42

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Is my FAM setup ok?

It looks like FAM doesn't support dnotify by default, and that a seperate patch needs to be applied to enable it. Looking at the pkgbuild it doesn't seem to happen.

Offline

#3 2004-12-25 18:06:19

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: Is my FAM setup ok?

A bit off topic, but there is a setting in /etc/fam/fam.conf that should be increased to prevent fam from exiting.  'idle_timeout = 5' is the default, but it should be longer.

Offline

#4 2004-12-25 18:27:26

vicious
Member
Registered: 2004-11-09
Posts: 113

Re: Is my FAM setup ok?

I tried dnotify patch for fam and IT'S GREAT! I can't express how good it seems to work now.

Here's a modified PKGBUILD (sorry for missing MD5 checksums):

# $Id: PKGBUILD,v 1.10 2004/09/08 17:40:08 judd Exp $
# Maintainer: dorphell <dorphell@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=fam
pkgver=2.7.0
pkgrel=1
pkgdesc="File Alteration Monitor - used by KDE, GNOME and others"
depends=('portmap' 'gcc')
url="http://oss.sgi.com/projects/fam/"
backup=(etc/fam/fam.conf)
source=(ftp://oss.sgi.com/projects/fam/download/stable/$pkgname-$pkgver.tar.gz fam 
  http://www.linuxfromscratch.org/patches/blfs/5.1/fam-2.7.0-dnotify-1.patch)

build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 -i ../fam-2.7.0-dnotify-1.patch
  libtoolize --force
  aclocal
  automake --add-missing
  autoconf
  #patch -Np1 -i ../gcc340.patch
  ./configure --prefix=/usr --sysconfdir=/etc/fam
  make || return 1
  make DESTDIR=$startdir/pkg install
  install -D -m755 ../fam $startdir/pkg/etc/rc.d/fam
}

and modified script "fam" (installed in /etc/rc.d):

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/fam`
case "$1" in
  start)
    stat_busy "Starting File Alteration Monitor"
    if [ -z "$PID" ]; then 
       /usr/sbin/famd
    fi
    if [ ! -f /var/run/daemons/portmap ]; then
       stat_fail
       echo "ERROR: portmap is not running"
       exit 1
    fi
    if [ ! -z "$PID" -o $? -gt 0 ]; then
      stat_fail
    else
      add_daemon fam
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping File Alteration Monitor"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon fam
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac

The patch for gcc 3.4 is no longer needed because I upgraded fam to the version 2.7.0.
What's changed? 1) pkgver 2) added patch 3) runs autotools because configure.in is patched 4) the daemon is now called /usr/sbin/famd instead of /usr/bin/fam. I did it thanks to lfs info.
THIS SHOULD GO TO THE OFFICIAL PACKAGE. Although Arch usually doesn't patch working sources, this patch is so great that I think patching is fully justified.

By the way, you should enable portmap, fam, dbus and hal daemons in your rc.conf so that gnome has all its great features.

Offline

#5 2004-12-25 18:41:54

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Is my FAM setup ok?

If you didn't already, perhaps it's a good idea to send an email to dorphell or to post a message to the bugtracker, can't count on the maintainer to read this forum.

Offline

Board footer

Powered by FluxBB