-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi:

I have modified the CODA SPEC to build CODA RPMS from CVS sources 
(2003-01-19). I have also made a minor bug-fix in the SPEC and another in the 
sources (attached to the message). I have only tested the SPEC in a Red Hat 
Linux 8.0. I hope that somebody can find them useful.

Greets.
- -- 
+----------
| Rafael Jesus Alcantara Perez.
| Email: mailto:[EMAIL PROTECTED]
| Registered Linux User: #45989
| PGP: http://pgp.rediris.es:11371/pks/lookup?op=index&search=0x97A85043
+---------------------
"For every complex problem there is a solution that is concise, clear, simple, 
and wrong."
(H. L. Mencken)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+KyspVE976peoUEMRAuIxAJ95/ne1K72f/TnetT9F/tX2wmcvFgCdGRwJ
8s/afNSVBoSMmP9J+UFYHcU=
=he7o
-----END PGP SIGNATURE-----
diff -uNr coda-20030119-orig/coda-src/auth2/auser.c coda-20030119/coda-src/auth2/auser.c
--- coda-20030119-orig/coda-src/auth2/auser.c	2003-01-08 18:15:08.000000000 +0100
+++ coda-20030119/coda-src/auth2/auser.c	2003-01-19 18:59:46.000000000 +0100
@@ -305,6 +305,7 @@
 		   RPC2_Handle *RPCid, const int interactive)
 {
 	struct coda_addrinfo *AuthHost, *srvs;
+        long rc;
 	int bound = RPC2_FAIL;
 
 	/* fill in the host array */
%define version 20030119
Summary: Coda distributed filesystem
Name: coda
Version: %{version}
Release: 1
Source: coda-%{version}.tar.gz
Patch0: patch-fix-1.diff
Requires: bc
Copyright: GPL
BuildRoot: /usr/src/redhat/BUILD/coda-build
BuildRequires: db4-devel libtermcap-devel lwp-devel ncurses-devel rpc2-devel rvm-devel
Group: Networking/Daemons
%description
Source package for the Coda filesystem.  Three packages are provided by
this rpm: the client and server and the backup components. Separately
you must install a kernel module, or have a Coda enabled kernel, and 
you should get the Coda documentation package.


%package client
Summary: Coda client
Group: Networking/Daemons
%description client
This package contains the main client program, the cachemanager Venus.
Also included are the binaries for the cfs, utilities for logging, ACL
manipulation etc, the hoarding tools for use with laptops and repair
tools for fixing conflicts. Finally there is the cmon and codacon
console utilities to monitor Coda's activities. You need a Coda
kernel-module for your kernel version, or Coda in your kernel, to have
a complete coda client.  Make sure to select the correct C library
version.

%package server
Summary: Coda server
Group: Networking/Daemons
%description server
This package contains the fileserver codasrv for the coda filesystem,
as well as the volume utilities.  For highest performance you will
need a modified kernel with inode system calls.

%package backup
Summary: Coda backup coordinator
Group: Networking/Daemons
%description backup
This package contains the backup software for the coda filesystem, as
well as the volume utilities.

%changelog
* Sun Jan 19 2003 Rafael Jesus Alcantara Perez <[EMAIL PROTECTED]>
- Initial attempt for making the RPM packages from CVS with KERBEROS support.
- Added a patch for fixing a missing variable declaration.
* Sun Jun 21 1998 Peter Braam <[EMAIL PROTECTED]>
- get rid of the kernel package. This needs interaction during the build.
- no more separate libc, glibc packages
* Tue Dec 30 1997 Peter Braam <[EMAIL PROTECTED]>
- several changes: documentation separate
- use variables: =`uname -r`, 5.3.20=coda version
* Mon Jun 02 1997 Peter Braam <[EMAIL PROTECTED]>
- small changes to Elliots improvements.
- some of his ideas are now in the scripts
* Wed May 28 1997 Elliot Lee <[EMAIL PROTECTED]>
- Based upon 4.0.3-1 spec file.
- Changed to BuildRoot
- Do as much as possible at build time instead of in %post
- Added initscript for venus
        
%prep
%setup -n coda-%{version}
%patch -p1

%build
chown -R root.bin $RPM_BUILD_DIR/coda-%{version}
rm -rf $RPM_BUILD_DIR/obj-%{version}
mkdir $RPM_BUILD_DIR/obj-%{version}
cd $RPM_BUILD_DIR/obj-%{version}
(cd $RPM_BUILD_DIR/coda-%{version}/; ./bootstrap.sh)
$RPM_BUILD_DIR/coda-%{version}/configure --prefix=/usr \
  --with-crypto \
  --with-krb4-includes=/usr/kerberos/include/kerberosIV \
  --with-krb4-libraries=/usr/kerberos/lib \
  --with-krb5-includes=/usr/kerberos/include \
  --with-krb5-libraries=/usr/kerberos/lib
make

%install
cd $RPM_BUILD_DIR/obj-%{version}
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/coda/venus.cache $RPM_BUILD_ROOT/dev \
         $RPM_BUILD_ROOT/usr/coda/etc \
         $RPM_BUILD_ROOT/coda $RPM_BUILD_ROOT/etc/rc.d/init.d\
         $RPM_BUILD_ROOT/usr/lib/coda $RPM_BUILD_ROOT/etc/rc.d/init.d

make prefix=$RPM_BUILD_ROOT/usr client-install
make prefix=$RPM_BUILD_ROOT/usr server-install

touch $RPM_BUILD_ROOT/coda/NOT_REALLY_CODA


# for non debuging versions
if [ X1 != X1 ]; then
   strip $RPM_BUILD_ROOT/usr/bin/* $RPM_BUILD_ROOT/vice/bin/* 
$RPM_BUILD_ROOT/usr/sbin/* || :
fi

chown -R root.root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/obj-%{version}

%pre client
grep "^coda" /proc/mounts > /dev/null 2>&1
if [ $? = 0 ]; then
        echo "*** Coda is mounted: cannot install ***"
        exit 1
else
        exit 0
fi

%preun client
grep "^coda" /proc/mounts > /dev/null 2>&1
if [ $? = 0 ]; then
        echo "*** Coda is mounted: cannot uninstall ***"
        exit 1
else
        exit 0
fi
/sbin/chkconfig --del venus.init
        
%preun server
/sbin/chkconfig --del update.init
/sbin/chkconfig --del auth2.init
/sbin/chkconfig --del codasrv.init

%post client
if [ -e /usr/coda/venus.cache/pid ]; then 
    rm -f /usr/coda/venus.cache/pid
fi
if [ ! -e /etc/coda/venus.conf ]; then 
        /usr/sbin/venus-setup testserver.coda.cs.cmu.edu 100000
fi
if [ ! -e /dev/cfs0 ]; then 
        /bin/mknod /dev/cfs0 c 67 0
fi
/sbin/chkconfig --add venus.init

%post server
/sbin/chkconfig --add update.init
/sbin/chkconfig --add auth2.init
/sbin/chkconfig --add codasrv.init


%files client
%dir /usr/coda
%dir /usr/coda/etc
%dir /usr/coda/venus.cache
%dir /coda
%verify() /coda/NOT_REALLY_CODA
/etc/coda/venus.conf.ex
/etc/coda/sidekick.intr.ex
/etc/rc.d/init.d/venus.init
/usr/sbin/au
/usr/sbin/sidekick
/usr/sbin/codaconfedit
/usr/sbin/coda-setup-ports
/usr/sbin/venus
/usr/sbin/venus-setup
/usr/sbin/volmunge
/usr/sbin/vutil
/usr/bin/cfs
/usr/bin/clog
/usr/bin/cmon
/usr/bin/codacon
/usr/bin/cpasswd
/usr/bin/ctokens
/usr/bin/cunlog
/usr/bin/filerepair
/usr/bin/hoard
/usr/bin/parser
/usr/bin/removeinc
/usr/bin/repair
/usr/bin/coda_replay
/usr/bin/spy
/usr/bin/xaskuser
/usr/bin/xfrepair

%files server   
/etc/coda/server.conf.ex
/usr/sbin/auth2
/usr/sbin/bldvldb.sh
/usr/sbin/codaconfedit
/usr/sbin/codasrv
/usr/sbin/createvol_rep
/usr/sbin/initpw
/usr/sbin/inoder
/usr/sbin/parserecdump
/usr/sbin/partial-reinit.sh
/usr/sbin/pdbtool
/usr/sbin/printvrdb
/usr/sbin/purgevol
/usr/sbin/purgevol_rep
/usr/sbin/pwdtopdbtool.py
/usr/sbin/rpc2portmap
/usr/sbin/startserver
/usr/sbin/updatesrv
/usr/sbin/updateclnt
/usr/sbin/updatefetch
/usr/sbin/vice-killvolumes
/usr/sbin/vice-setup
/usr/sbin/vice-setup-rvm
/usr/sbin/vice-setup-srvdir
/usr/sbin/vice-setup-user
/usr/sbin/vice-setup-scm
/usr/sbin/coda-setup-ports
/usr/sbin/volutil
/usr/bin/getvolinfo
/usr/bin/norton
/usr/bin/norton-reinit
/usr/bin/reinit
/usr/bin/rpc2ping
/usr/bin/smon2
/etc/rc.d/init.d/codasrv.init
/etc/rc.d/init.d/auth2.init
/etc/rc.d/init.d/update.init

%files backup
/usr/sbin/auth2
/usr/sbin/backup
/usr/sbin/backup.sh
/usr/sbin/merge
/usr/sbin/readdump
/usr/sbin/tape.pl
/usr/sbin/updateclnt
/usr/sbin/updatefetch
/usr/sbin/volutil

Reply via email to