rpms/coda/devel coda-6.9.3-client-fhs.patch, NONE, 1.1 coda-client.init, NONE, 1.1 coda.spec, 1.2, 1.3 venus.init, 1.1, NONE

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Tue May 20 19:38:48 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/coda/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22854

Modified Files:
	coda.spec 
Added Files:
	coda-6.9.3-client-fhs.patch coda-client.init 
Removed Files:
	venus.init 
Log Message:
* Tue May 20 2008 Hans de Goede <j.w.r.degoede at 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)    


coda-6.9.3-client-fhs.patch:

--- NEW FILE coda-6.9.3-client-fhs.patch ---
diff -up coda-6.9.3/coda-src/venus/venus.conf.ex~ coda-6.9.3/coda-src/venus/venus.conf.ex
--- coda-6.9.3/coda-src/venus/venus.conf.ex~	2008-05-20 14:07:04.000000000 +0200
+++ coda-6.9.3/coda-src/venus/venus.conf.ex	2008-05-20 14:07:04.000000000 +0200
@@ -57,7 +57,7 @@ cacheblocks=100000
 # Which file should receive venus's stderr output.
 # (default is /usr/coda/etc/console).
 #
-#errorlog=/usr/coda/etc/console
+errorlog=/var/log/coda/venus.err
 
 #
 # What is the uid of the primary user of this system. The primary user
@@ -79,36 +79,36 @@ cacheblocks=100000
 # have an existing filesystem, as you WILL lose all data during
 # initialization.
 #
-#rvm_log=/usr/coda/LOG
-#rvm_data=/usr/coda/DATA
+rvm_log=/var/lib/coda/LOG
+rvm_data=/var/lib/coda/DATA
 
 #
 # Where should venus keep it's pool of cached files.
 # (default is /usr/coda/venus.cache)
 #
-#cachedir=/usr/coda/venus.cache
+cachedir=/var/lib/coda/cache
 
 #
 # Where should venus store snapshots of the modification logs. This is
 # primarily to provide some safe fallback when venus dies or messes up
 # the CML during reintegration. (default is /usr/coda/spool)
 #
-#checkpointdir=/usr/coda/spool
+checkpointdir=/var/lib/coda/spool
 
 #
 # Where does venus store it's pidfile
 #
-#pid_file=/usr/coda/venus.cache/pid
+pid_file=/var/run/coda-client.pid
 
 #
 # What file does vutil use to control venus
 #
-#run_control_file=/usr/coda/venus.cache/VENUS_CTRL
+run_control_file=/var/run/coda-client.ctrl
 
 #
 # Venus log file
 #
-#logfile=/usr/coda/etc/venus.log
+logfile=/var/log/coda/venus.log
 
 #
 # Mariner socket,
@@ -116,7 +116,7 @@ cacheblocks=100000
 # codacon and spy use to talk to venus. On other platforms they will
 # connect to venus through tcp port 2430.
 #
-#marinersocket=/usr/coda/spool/mariner
+marinersocket=/var/run/coda-client.mariner
 
 #
 # Dont use RVM,


--- NEW FILE coda-client.init ---
#!/bin/sh

# chkconfig: 345 97 01
# description: The Coda cache manager.

# Source function library.
. /etc/rc.d/init.d/functions

exec=/usr/sbin/venus
prog=coda-client
config=/etc/coda/venus.conf
lockfile=/var/lock/subsys/$prog
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

# coda-client specific settings
pid_file=/var/run/coda-client.pid
mountpoint=/coda
# which can be overridden from venus.conf
[ -x /usr/sbin/codaconfedit ] && . `/usr/sbin/codaconfedit venus.conf`


start() {
    [ -x $exec ] || exit 5
    [ -f $config ] || exit 6
    echo -n $"Starting $prog: "

    echo -n "kernel "
    /sbin/modprobe coda
    /sbin/udevsettle

    echo -n "venus"
    /usr/sbin/vutil --swaplogs >/dev/null 2>&1
    daemon --pidfile=$pid_file "$exec >/dev/null 2>&1"
    retval=$?

    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc -p $pid_file $prog
    retval=$?
    echo
    if [ $retval -eq 0 ]; then
        msg=$"Unmounting $mountpoint:"
        echo -n "$msg"
        umount $mountpoint
        retval=$?
        [ $retval -eq 0 ] && success "$msg" || failure "$msg"
        echo
    fi
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

rh_status() {
    status -p $pid_file $prog
}

rh_status_q() {
    rh_status >/dev/null 2>&1
}


case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
# original venus script has a hardstop, not needed as killproc will wait
# for the process to die and if it doesn't switch to using kill -9 itself
    stop|hardstop)
        rh_status_q || exit 0
        $1
        ;;
    restart|reload|force-reload|condrestart|try-restart)
        echo $"$1 not available"
        exit 3
        ;;
    status)
        rh_status
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
        exit 2
esac
exit $?


Index: coda.spec
===================================================================
RCS file: /cvs/extras/rpms/coda/devel/coda.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- coda.spec	16 May 2008 22:10:30 -0000	1.2
+++ coda.spec	20 May 2008 19:37:56 -0000	1.3
@@ -1,17 +1,18 @@
 Name:           coda
 Version:        6.9.3
-Release:        1%{?dist}
+Release:        2%{?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}.tar.gz
-Source1:        venus.init
+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
 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
@@ -76,6 +77,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 
 %build
@@ -91,7 +93,7 @@
 # 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/venus
+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
@@ -100,12 +102,11 @@
 mkdir -p $RPM_BUILD_ROOT/coda
 touch $RPM_BUILD_ROOT/coda/NOT_REALLY_CODA
 
-# coda cache stuff for the client, hardcoded (all over the place) to ugly and
-# dangerous /usr/coda, thus symlink it to /var/lib/coda
+# coda cache/log dirs for the client
 mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda
-mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda/etc
-mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/coda/venus.cache
-ln -s ../%{_var}/lib/coda $RPM_BUILD_ROOT/usr/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
@@ -122,11 +123,11 @@
     mkdir /coda
     touch /coda/NOT_REALLY_CODA
 fi
-/sbin/chkconfig --add venus
+/sbin/chkconfig --add coda-client
 
 %preun client
 if [ $1 = 0 ]; then
-   /sbin/chkconfig --del venus
+   /sbin/chkconfig --del coda-client
 fi
 
 %post server
@@ -148,7 +149,7 @@
 %ghost %config(noreplace) %{_sysconfdir}/coda/venus.conf
 %config(noreplace) %{_sysconfdir}/coda/venus.conf.ex
 %config(noreplace) %{_sysconfdir}/coda/realms
-%{_sysconfdir}/rc.d/init.d/venus
+%{_sysconfdir}/rc.d/init.d/coda-client
 /usr/sbin/asrlauncher
 /usr/sbin/codaconfedit
 /usr/sbin/venus
@@ -194,9 +195,9 @@
 %ghost %dir /coda
 %ghost /coda/NOT_REALLY_CODA
 %dir %{_var}/lib/coda
-%dir %{_var}/lib/coda/etc
-%dir %{_var}/lib/coda/venus.cache
-/usr/coda
+%dir %{_var}/lib/coda/cache
+%dir %{_var}/lib/coda/spool
+%dir %{_var}/log/coda
 
 %files server
 %defattr(-,root,root,-)
@@ -285,5 +286,9 @@
 
 
 %changelog
+* Tue May 20 2008 Hans de Goede <j.w.r.degoede at 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 at hhs.nl> 6.9.3-1
 - Initial Fedora package


--- venus.init DELETED ---




More information about the fedora-extras-commits mailing list