Blob Blame History Raw
%define rcver rc2

Name:           coda
Version:        6.9.4
Release:        0.3.%{rcver}%{?dist}
Summary:        Coda distributed file system
Group:          System Environment/Daemons
License:        GPLv2
URL:            http://www.coda.cs.cmu.edu/
Source0:        ftp://ftp.coda.cs.cmu.edu/pub/coda/src/%{name}-%{version}~%{rcver}.tar.gz
Source1:        coda-client.init
Source2:        codasrv.init
Source3:        auth2.init
Source4:        update.init
Patch0:         coda-6.9.3-codasrv-sigterm.patch
Patch1:         coda-6.9.3-sudo.patch
Patch2:         coda-6.9.3-client-fhs.patch
Patch3:		coda-6.9.4-rc2-no-default-krb.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  lwp-devel rpc2-devel rvm-devel rvm-tools readline-devel
BuildRequires:  fltk-devel fltk-fluid flex bison python perl krb5-devel
BuildRequires:	e2fsprogs-devel
Requires:	krb5-libs

# For /etc/rc.d/init.d so that configure can detect we have RH style init
BuildRequires:  chkconfig

%description
Source package for the Coda file system.  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:          System Environment/Daemons
Requires(post): chkconfig
Requires(preun): chkconfig

%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.


%package server
Summary:        Coda server
Group:          System Environment/Daemons
Requires:       rvm-tools
Requires(post): chkconfig
Requires(preun): chkconfig

%description server
This package contains the fileserver for the Coda file system, as well
as the volume utilities.


%package backup
Summary:        Coda backup coordinator
Group:          System Environment/Daemons

%description backup
This package contains the backup software for the Coda file system, as
well as the volume utilities.


%package vcodacon
Summary:        Coda graphical console
Group:          System Environment/Daemons
Requires:       coda-client = %{version}-%{release}

%description vcodacon
This package contains vcodacon, a graphical console for the Coda file
system client.


%prep
%setup -q -n %{name}-%{version}~%{rcver}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1


%build
# note: remove the -I and -l here when upstream releases fix for krb5 building
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -I/usr/include/et"
export LIBS="-lkrb5 -lcom_err -lstdc++"
%configure --with-vcodacon --with-krb5
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

# remove upstream provided init scripts and replace with our own LSB compliant
# ones
rm $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/*.init
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/coda-client
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/codasrv
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/auth2
install -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/update

# coda mount point for the client
mkdir -p $RPM_BUILD_ROOT/coda
touch $RPM_BUILD_ROOT/coda/NOT_REALLY_CODA

# coda cache/log dirs for the client
mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda
mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda/cache
mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda/spool
mkdir -p $RPM_BUILD_ROOT/%{_var}/log/coda

# for %%ghost
touch $RPM_BUILD_ROOT%{_sysconfdir}/coda/{venus,server}.conf


%clean
rm -rf $RPM_BUILD_ROOT


%post client
# not pretty, but we cannot simply put /coda in our files-list because then
# rpm will fail when updating coda-client when coda is mounted
if [ ! -e /coda ]; then
    mkdir /coda
    touch /coda/NOT_REALLY_CODA
fi
/sbin/chkconfig --add coda-client

%preun client
if [ $1 = 0 ]; then
   /sbin/chkconfig --del coda-client
fi

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

%preun server
if [ $1 = 0 ]; then
   /sbin/chkconfig --del update
   /sbin/chkconfig --del auth2
   /sbin/chkconfig --del codasrv
fi

%files client
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog LICENSE NEWS
%dir %{_sysconfdir}/coda
%ghost %config(noreplace) %{_sysconfdir}/coda/venus.conf
%config(noreplace) %{_sysconfdir}/coda/venus.conf.ex
%config(noreplace) %{_sysconfdir}/coda/realms
%{_sysconfdir}/rc.d/init.d/coda-client
/usr/sbin/asrlauncher
/usr/sbin/codaconfedit
/usr/sbin/venus
/usr/sbin/venus-setup
/usr/sbin/volmunge
/usr/sbin/vutil
/usr/bin/au
/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/gcodacon
/usr/bin/hoard
/usr/bin/mkcodabf
/usr/bin/mklka
/usr/bin/parser
/usr/bin/removeinc
/usr/bin/repair
/usr/bin/coda_replay
/usr/bin/spy
/usr/bin/xaskuser
/usr/bin/xfrepair
/usr/share/man/man1/au.1.gz
/usr/share/man/man1/cfs.1.gz
/usr/share/man/man1/clog.1.gz
/usr/share/man/man1/cmon.1.gz
/usr/share/man/man1/coda_replay.1.gz
/usr/share/man/man1/cpasswd.1.gz
/usr/share/man/man1/ctokens.1.gz
/usr/share/man/man1/cunlog.1.gz
/usr/share/man/man1/hoard.1.gz
/usr/share/man/man1/mkcodabf.1.gz
/usr/share/man/man1/repair.1.gz
/usr/share/man/man1/spy.1.gz
/usr/share/man/man8/venus.8.gz
/usr/share/man/man8/venus-setup.8.gz
/usr/share/man/man8/volmunge.8.gz
/usr/share/man/man8/vutil.8.gz
%ghost %dir /coda
%ghost /coda/NOT_REALLY_CODA
%dir %{_var}/lib/coda
%dir %{_var}/lib/coda/cache
%dir %{_var}/lib/coda/spool
%dir %{_var}/log/coda

%files server
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog LICENSE NEWS
%dir %{_sysconfdir}/coda
%ghost %config(noreplace) %{_sysconfdir}/coda/server.conf
%config(noreplace) %{_sysconfdir}/coda/server.conf.ex
%{_sysconfdir}/rc.d/init.d/codasrv
%{_sysconfdir}/rc.d/init.d/auth2
%{_sysconfdir}/rc.d/init.d/update
/usr/sbin/auth2
/usr/sbin/bldvldb.sh
/usr/sbin/coda-server-logrotate
/usr/sbin/codaconfedit
/usr/sbin/codadump2tar
/usr/sbin/codasrv
/usr/sbin/codastart
/usr/sbin/createvol_rep
/usr/sbin/initpw
/usr/sbin/inoder
/usr/sbin/norton
/usr/sbin/norton-reinit
/usr/sbin/parserecdump
/usr/sbin/partial-reinit.sh
/usr/sbin/pdbtool
/usr/sbin/printvrdb
/usr/sbin/purgevol_rep
/usr/sbin/startserver
/usr/sbin/tokentool
/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/volutil
/usr/bin/getvolinfo
/usr/bin/reinit
/usr/bin/rpc2ping
/usr/bin/rvmsizer
/usr/bin/smon2
/usr/share/man/man5/maxgroupid.5.gz
/usr/share/man/man5/passwd.coda.5.gz
/usr/share/man/man5/servers.5.gz
/usr/share/man/man5/vicetab.5.gz
/usr/share/man/man5/volumelist.5.gz
/usr/share/man/man5/vrdb.5.gz
/usr/share/man/man8/auth2.8.gz
/usr/share/man/man8/bldvldb.sh.8.gz
/usr/share/man/man8/codasrv.8.gz
/usr/share/man/man8/createvol_rep.8.gz
/usr/share/man/man8/initpw.8.gz
/usr/share/man/man8/norton.8.gz
/usr/share/man/man8/pdbtool.8.gz
/usr/share/man/man8/purgevol_rep.8.gz
/usr/share/man/man8/startserver.8.gz
/usr/share/man/man8/updateclnt.8.gz
/usr/share/man/man8/updatesrv.8.gz
/usr/share/man/man8/vice-setup.8.gz
/usr/share/man/man8/volutil.8.gz

%files backup
%defattr(-,root,root,-)
/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
/usr/share/man/man5/backuplogs.5.gz
/usr/share/man/man5/dumpfile.5.gz
/usr/share/man/man5/dumplist.5.gz
/usr/share/man/man8/backup.8.gz
/usr/share/man/man8/merge.8.gz
/usr/share/man/man8/readdump.8.gz

%files vcodacon
%defattr(-,root,root,-)
/usr/bin/vcodacon


%changelog
* Sun Sep 14 2008 Adam Goode <adam@spicenitz.org> - 6.9.4-0.3.rc2
- Do not change the default behavior of clog when building with krb5
  (rh 462179)

* Tue Sep 09 2008 Neil Horman <nhorman@redhat.com> 6.9.4-0.2.rc2
- Enabling krb5 support (bz 461041)

* Thu May 29 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 6.9.4-0.1.rc2
- Update to 6.9.4~rc2 (bz 448749)

* Tue May 20 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 6.9.3-2
- Make coda-client package put everything in FHS locations like Debian does,
  rename coda-client initscript / service from venus to coda-client (rh 446653)

* Mon May 12 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 6.9.3-1
- Initial Fedora package