Jonathan Chong wrote:
Thanks to everyone and good morning. It's freezing here in London!
Freezing hier in Nieuwveen too, 300 (?) km east-noreast of you.
[...]
Tony
I downloaded 2.7.0 from another website - had to do some digging
though before I finally found a link that didn't link back to SGI's
website!
Downloaded these two files:
fam-2.7.0.tar.gz
fam-2.7.0-dnotify-1.patch
The patch is new on me, I got it from www.linuxfromscratch.org ...
I usally build rpms from source by doing this:
rpmbuild -ta source_dir
But doing that on the 2.7.0 folder gives me these errors:
error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)
I suspect I am missing the spec file you mentioned earlier ...
Ok, there wasn't a spec file, so I attach one that works, sorry.
- copy the spec file to your rpm SPECS dir;
- copy your fam-2.7.0.tar.gz and fam-2.7.0-dnotify-1.patch to your rpm
SOURCES dir;
- cd to the SPECS dir and edit the spec file so that at the top it has
"Source: http://oss.sgi.com/projects/fam/download/fam-2.7.0.tar.gz"
instead of fam-latest.tar.gz - it doesn't matter what the url says;
- do 'rpmbuild -bb fam.spec' in the SPECS dir and you should have 2
working fam rpms in RPMS/i386. You don't have to install the devel one
Caveat: I have RHAS4, so what I have of autoconf and automake is
reasonably up to date. The build needs both, up to date. I also had to
do a forced 'rpm -e' on gamin, which gets installed by default on RHAS4.
Good luck!
--Tonni
--
Tony Earnshaw
Email: [EMAIL PROTECTED]
Summary: fam 2.7.0
Name: fam
Version: 2.7.0
Release: 2
Packager: Tony Earnshaw <[EMAIL PROTECTED]>
Vendor: Translucent Systems BV
License: SGI OSS
Group: Network System Environment/Daemons
Provides: fam
Requires: gcc, autoconf, automake, rpm >= 4
Source: http://oss.sgi.com/projects/fam/download/fam-latest.tar.gz
Patch1: fam-2.7.0-dnotify-1.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
fam is a server that tracks changes to the filesystem and relays these
changes to interested applications. Applications such as fm(1G) and
mailbox(1) present an up-to-date view of the filesystem. In the absence
of fam, these applications and others like them are forced to poll the
filesystem to detect changes. fam is more efficient.
%define _man_dir %{_prefix}/man
%define _sh_man_dir %{_prefix}/share/man
%define _doc_dir %{_prefix}/share/doc/%{name}-base-%{version}
%package base
Summary: Base fam daemon, conf and documentation
Group: Network System Environment/Daemons
%description base
fam is a server that tracks changes to the filesystem and relays these
changes to interested applications. Applications such as fm(1G) and
mailbox(1) present an up-to-date view of the filesystem. In the absence
of fam, these applications and others like them are forced to poll the
filesystem to detect changes. fam is more efficient.
%package devel
Summary: Development header and docs for fam
Group: Network System Environment/Daemons
Requires: base
%description devel
Development header and docs for the SGI fam daemon
%prep
%setup -q
%patch1 -p1 -b .orig
%build
set -x
umask 022
chmod a+w configure
CXXFLAGS="-Wno-deprecated" \
./configure \
--prefix=/
make
%install
rm -fr $RPM_BUILD_ROOT
%makeinstall
%{__mkdir_p}
$RPM_BUILD_ROOT{%_sysconfdir,%_sbindir,%_includedir,%_libdir,%_man_dir/man3,%_man_dir/man5,%_man_dir/man8}
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/conf/fam.conf
$RPM_BUILD_ROOT%{_sysconfdir}
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/include/fam.h
$RPM_BUILD_ROOT%{_includedir}
cp -pr $RPM_BUILD_DIR/%{name}-%{version}/lib/.libs/* $RPM_BUILD_ROOT%{_libdir}
pushd $RPM_BUILD_ROOT%{_libdir}
ln -s libfam.0.0.0 libfam.so.0
popd
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.3
$RPM_BUILD_ROOT%_man_dir/man3
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.5
$RPM_BUILD_ROOT%_man_dir/man5
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.8
$RPM_BUILD_ROOT%_man_dir/man8
%{__install} -m 755 $RPM_BUILD_DIR/%{name}-%{version}/src/famd
$RPM_BUILD_ROOT%{_sbindir}
cat $RPM_BUILD_ROOT%_man_dir/man5/famd.conf.5 | sed -s
's|\/usr\/local\/etc|\/etc|' > /var/tmp/famd.conf.5; mv /var/tmp/famd.conf.5
$RPM_BUILD_ROOT%_man_dir/man5
cat $RPM_BUILD_ROOT%_man_dir/man8/famd.8 | sed -s 's|\/usr\/local\/etc|\/etc|'
> /var/tmp/famd.8; mv /var/tmp/famd.8 $RPM_BUILD_ROOT%_man_dir/man8
%files base
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO
%{_sbindir}/famd
%{_libdir}/*
%{_sysconfdir}/fam.conf
%_man_dir/man5/*
%_man_dir/man8/*
%_sh_man_dir/man5/*
%_sh_man_dir/man8/*
%files devel
%defattr(-,root,root)
%{_includedir}/fam.h
%_man_dir/man3/*
%_sh_man_dir/man3/*
%post base
ldconfig
cat <<EOF>>%{_doc_dir}/INSTALL
---------------------------------
The default way of running famd is by using xinetd. To enable this, cd
/etc/xinetd.d and edit fam. Replace "disable = yes" with "disable = no"
and 'kill -HUP \`cat /var/run/xinetd.pid\`'
If you'd rather that famd runs as a standalone daemon, start it by doing
'/usr/sbin/famd -T 0 &' (that's -T null). To enable famd on system startup,
instead (you obviously can't have both) you'll have to have a script in
/etc/rc.d/init.d that does this. An example, /etc/rc.d/init.d/famd, that
does this might look like:
#!/bin/sh
#
# This is a sample /etc/init.d file for famd
#
# chkconfig: 2345 80 30
# description: famd server
#
#
. /etc/init.d/functions
case "\$1" in
start)
daemon /usr/sbin/famd -T 0 &
echo"";echo -n "Starting famd daemon";echo""
;;
stop)
# Stop famd
echo"";echo "Stopping famd daemon"
daemon kill \`cat /var/run/famd.pid\`
;;
restart)
\$0 stop
\$0 start
;;
esac
exit 0
Do 'chkconfig famd on' and start and stop it with
'service famd start|stop|restart'
EOF
if ! grep fam /etc/rpc > /dev/null 2>&1; then
echo "fam 391002 famd # File Alteration Monitor" >>
/etc/rpc
fi
if [ ! -f "/etc/xinetd.d/fam" ]; then
cat << EOF > /etc/xinetd.d/fam
{
type = RPC UNLISTED
socket_type = stream
user = root
group = nobody
server = /usr/sbin/famd
wait = yes
protocol = tcp
rpc_version = 2
rpc_number = 391002
disable = yes
}
EOF
fi
%clean
rm -rf $RPM_BUILD_ROOT %{_tmppath}/rpm-tmp*
%changelog
* Thu Dec 29 2005 Tony Earnshaw <[EMAIL PROTECTED]>
- fam-2.7.0-dnotify-1.patch, thanks Jonathan Chong <[EMAIL PROTECTED]>
and of course Jim Gifford (jim at linuxfromscratch dot org), whose patch it is
* Thu Jun 23 2005 Tony Earnshaw <[EMAIL PROTECTED]> 2.7.0-1
- Initial package