OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 31-Dec-2005 17:21:17 Branch: HEAD Handle: 2005123116211700 Added files: openpkg-src/unfsd fsl.unfsd rc.unfsd unfsd.exports unfsd.patch unfsd.spec Log: new package: unfsd 0.9.13 (User-space NFSv3 Server) Summary: Revision Changes Path 1.1 +16 -0 openpkg-src/unfsd/fsl.unfsd 1.1 +63 -0 openpkg-src/unfsd/rc.unfsd 1.1 +6 -0 openpkg-src/unfsd/unfsd.exports 1.1 +46 -0 openpkg-src/unfsd/unfsd.patch 1.1 +146 -0 openpkg-src/unfsd/unfsd.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/unfsd/fsl.unfsd ============================================================================ $ cvs diff -u -r0 -r1.1 fsl.unfsd --- /dev/null 2005-12-31 17:21:01 +0100 +++ fsl.unfsd 2005-12-31 17:21:17 +0100 @@ -0,0 +1,16 @@ +## +## fsl.unfsd -- OSSP fsl configuration +## + +ident .*(unfsd)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/unfsd/unfsd.log", + perm=0664 + ) + } +}; + @@ . patch -p0 <<'@@ .' Index: openpkg-src/unfsd/rc.unfsd ============================================================================ $ cvs diff -u -r0 -r1.1 rc.unfsd --- /dev/null 2005-12-31 17:21:01 +0100 +++ rc.unfsd 2005-12-31 17:21:17 +0100 @@ -0,0 +1,63 @@ [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc +## +## rc.unfsd -- Run-Commands +## + +%config + unfsd_enable="$openpkg_rc_def" + unfsd_bind="127.0.0.1" + unfsd_flags="" + unfsd_log_prolog="true" + unfsd_log_epilog="true" + unfsd_log_numfiles="10" + unfsd_log_minsize="1M" + unfsd_log_complevel="9" + +%common + unfsd_pidfile="@l_prefix@/var/unfsd/unfsd.pid" + unfsd_logfile="@l_prefix@/var/unfsd/unfsd.log" + unfsd_signal () { + [ -f $unfsd_pidfile ] && kill -$1 `cat $unfsd_pidfile` + } + +%status -u @l_susr@ -o + unfsd_usable="unknown" + unfsd_active="no" + rcService unfsd enable yes && \ + unfsd_signal 0 && unfsd_active="yes" + echo "unfsd_enable=\"$unfsd_enable\"" + echo "unfsd_usable=\"$unfsd_usable\"" + echo "unfsd_active=\"$unfsd_active\"" + +%start -u @l_susr@ + rcService unfsd enable yes || exit 0 + rcService unfsd active yes && exit 0 + ( nohup @l_prefix@/sbin/unfsd \ + -d -l ${unfsd_bind} \ + -e @l_prefix@/etc/unfsd/unfsd.exports \ + ${unfsd_flags} \ + </dev/null >/dev/null 2>&1 & + echo $! >$unfsd_pidfile + ) >/dev/null 2>&1 + +%stop -u @l_susr@ + rcService unfsd enable yes || exit 0 + rcService unfsd active no && exit 0 + unfsd_signal TERM + sleep 2 + rm -f $unfsd_pidfile >/dev/null 2>&1 || true + +%restart -u @l_susr@ + rcService unfsd enable yes || exit 0 + rcService unfsd active no && exit 0 + rc unfsd stop start + +%daily -u @l_susr@ + rcService unfsd enable yes || exit 0 + shtool rotate -f \ + -n ${unfsd_log_numfiles} -s ${unfsd_log_minsize} -d \ + -z ${unfsd_log_complevel} -m 664 -o @l_susr@ -g @l_mgrp@ \ + -P "${unfsd_log_prolog}" \ + -E "${unfsd_log_epilog}; rc unfsd restart" \ + $unfsd_logfile + @@ . patch -p0 <<'@@ .' Index: openpkg-src/unfsd/unfsd.exports ============================================================================ $ cvs diff -u -r0 -r1.1 unfsd.exports --- /dev/null 2005-12-31 17:21:01 +0100 +++ unfsd.exports 2005-12-31 17:21:17 +0100 @@ -0,0 +1,6 @@ +## +## unfsd.exports -- UNFS Daemon Filesystem Exports +## + [EMAIL PROTECTED]@/pub 127.0.0.1/8 (ro) + @@ . patch -p0 <<'@@ .' Index: openpkg-src/unfsd/unfsd.patch ============================================================================ $ cvs diff -u -r0 -r1.1 unfsd.patch --- /dev/null 2005-12-31 17:21:01 +0100 +++ unfsd.patch 2005-12-31 17:21:17 +0100 @@ -0,0 +1,46 @@ +Index: Extras/cluster.c +--- Extras/cluster.c.orig 2004-12-29 21:06:37 +0100 ++++ Extras/cluster.c 2005-12-31 17:13:12 +0100 +@@ -13,6 +13,7 @@ + #include <sys/stat.h> + #include <sys/socket.h> + #include <rpc/rpc.h> ++#include <stdio.h> + #include <dirent.h> + #include <errno.h> + #include <libgen.h> +Index: Makefile.in +--- Makefile.in.orig 2005-01-08 11:44:01 +0100 ++++ Makefile.in 2005-12-31 17:12:23 +0100 +@@ -11,7 +11,7 @@ + md5.o mount.o nfs.o password.o readdir.o user.o xdr.o + CONFOBJ = Config/lib.a + EXTRAOBJ = @EXTRAOBJ@ +-LDFLAGS = @LDFLAGS@ @LIBS@@LEXLIB@ ++LDFLAGS = @LDFLAGS@ @LEXLIB@ @LIBS@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +Index: configure +--- configure.orig 2005-09-09 19:58:56 +0200 ++++ configure 2005-12-31 17:12:23 +0100 +@@ -5132,7 +5132,7 @@ + else + { { echo "$as_me:$LINENO: error: *** Cannot find librpcsoc. Install package SUNWscpu. ***" >&5 + echo "$as_me: error: *** Cannot find librpcsoc. Install package SUNWscpu. ***" >&2;} +- { (exit 1); exit 1; }; } ++ } + + fi + +@@ -5148,10 +5148,6 @@ + + + +- if test "$GCC" = "yes" +- then +- CFLAGS="$CFLAGS -Wall -W" +- fi + + # Check whether --enable-cluster or --disable-cluster was given. + if test "${enable_cluster+set}" = set; then @@ . patch -p0 <<'@@ .' Index: openpkg-src/unfsd/unfsd.spec ============================================================================ $ cvs diff -u -r0 -r1.1 unfsd.spec --- /dev/null 2005-12-31 17:21:01 +0100 +++ unfsd.spec 2005-12-31 17:21:17 +0100 @@ -0,0 +1,146 @@ +## +## unfsd.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/> +## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: unfsd +Summary: User-space NFSv3 Server +URL: http://unfs3.sourceforge.net/ +Vendor: Pascal Schmidt +Packager: OpenPKG +Distribution: OpenPKG +Class: EVAL +Group: Filesystem +License: GPL +Version: 0.9.13 +Release: 20051231 + +# package options +%option with_fsl yes + +# list of sources +Source0: http://switch.dl.sourceforge.net/sourceforge/unfs3/unfs3-%{version}.tar.gz +Source1: rc.unfsd +Source2: fsl.unfsd +Source3: unfsd.exports +Patch0: unfsd.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, bison, flex +PreReq: OpenPKG, openpkg >= 20040130 +%if "%{with_fsl}" == "yes" +BuildPreReq: fsl >= 1.2.0 +PreReq: fsl >= 1.2.0 +%endif +AutoReq: no +AutoReqProv: no + +%description + UNFS3 is a user-space implementation of the NFSv3 server + specification. It provides a daemon for the MOUNT and NFS protocols, + which are used by NFS clients for accessing files on the server. + +%track + prog unfsd = { + version = %{version} + url = http://prdownloads.sourceforge.net/unfs3/ + regex = unfs3-(__VER__)\.tar\.gz + } + +%prep + %setup -q -n unfs3-%{version} + %patch -p0 + +%build + # configure program + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ + LIBS="%{l_fsl_libs}" \ + ./configure \ + --prefix=%{l_prefix} \ + --enable-cluster + + # build program + %{l_make} %{l_mflags} + +%install + # install program + rm -rf $RPM_BUILD_ROOT + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + + # strip down installation + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + + # install configuration file + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/unfsd + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE unfsd.exports} $RPM_BUILD_ROOT%{l_prefix}/etc/unfsd/ + + # install OSSP fsl configuration + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE fsl.unfsd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ + + # install run-command script + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE rc.unfsd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + + # create run-time directory + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/unfsd + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%not %dir %{l_prefix}/etc/fsl' \ + '%config %{l_prefix}/etc/fsl/*' \ + '%config %{l_prefix}/etc/unfsd/*' + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + +%post + # after upgrade, restart service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} unfsd status 2>/dev/null` + [ ".$unfsd_active" = .yes ] && %{l_rc} unfsd restart + exit 0 + +%preun + # before erase, stop service and remove log files + [ $1 -eq 0 ] || exit 0 + %{l_rc} unfsd stop 2>/dev/null + rm -f $RPM_INSTALL_PREFIX/var/unfsd/unfsd.log* >/dev/null 2>&1 || true + rm -f $RPM_INSTALL_PREFIX/var/unfsd/unfsd.pid >/dev/null 2>&1 || true + exit 0 + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org