rpms/distcc/devel distcc-2.18.3-avahi.patch, NONE, 1.1 distcc.spec, NONE, 1.1 distccd.init, NONE, 1.1 hosts.sample, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Denis Leroy (denis) fedora-extras-commits at redhat.com
Fri Mar 7 22:53:36 UTC 2008


Author: denis

Update of /cvs/pkgs/rpms/distcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23929/devel

Modified Files:
	.cvsignore sources 
Added Files:
	distcc-2.18.3-avahi.patch distcc.spec distccd.init 
	hosts.sample 
Log Message:
Initial import


distcc-2.18.3-avahi.patch:

--- NEW FILE distcc-2.18.3-avahi.patch ---
--- distcc-2.18.3/Makefile.in	2004-10-24 07:05:48.000000000 +0200
+++ distcc-2.18.3.lennart/Makefile.in	2007-12-30 16:05:58.000000000 +0100
@@ -180,6 +180,7 @@ distcc_obj = src/backoff.o						\
 	src/ssh.o src/state.o src/strip.o				\
 	src/timefile.o src/traceenv.o					\
 	src/where.o							\
+	@ZEROCONF_DISTCC_OBJS@						\
 	$(common_obj)
 
 distccd_obj = src/access.o						\
@@ -187,6 +188,7 @@ distccd_obj = src/access.o						\
 	src/ncpus.o							\
 	src/prefork.o							\
 	src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o	\
+	@ZEROCONF_DISTCCD_OBJS@						\
 	$(common_obj) @BUILD_POPT@
 
 # Objects that need to be linked in to build monitors
--- distcc-2.18.3/src/distcc.c	2004-10-02 02:47:07.000000000 +0200
+++ distcc-2.18.3.lennart/src/distcc.c	2007-12-30 13:55:27.000000000 +0100
@@ -83,6 +83,9 @@ static void dcc_show_usage(void)
 "   COMPILER                   defaults to \"cc\"\n"
 "   --help                     explain usage and exit\n"
 "   --version                  show version and exit\n"
+"   --show-hosts               show host list and exit\n"
+"   -j                         calculate the concurrency level from\n"
+"                              the host list.\n"
 "\n"
 "Environment variables:\n"
 "   See the manual page for a complete list.\n"
@@ -135,7 +138,46 @@ static void dcc_client_catch_signals(voi
     signal(SIGHUP, &dcc_client_signalled);
 }
 
+static void dcc_free_hostlist(struct dcc_hostdef *list) {
+    while (list) {
+        struct dcc_hostdef *l = list;
+        list = list->next;
+        dcc_free_hostdef(l);
+    }
+}
+
+static void dcc_show_hosts(void) {
+    struct dcc_hostdef *list, *l;
+    int nhosts;
+    
+    if (dcc_get_hostlist(&list, &nhosts) != 0) {
+        rs_log_crit("Failed to get host list");
+        return;
+    }
+
+    for (l = list; l; l = l->next)
+        printf("%s\n", l->hostdef_string);
+
+    dcc_free_hostlist(list);
+}
+
+static void dcc_concurrency_level(void) {
+    struct dcc_hostdef *list, *l;
+    int nhosts;
+    int nslots = 0;
+    
+    if (dcc_get_hostlist(&list, &nhosts) != 0) {
+        rs_log_crit("Failed to get host list");
+        return;
+    }
+
+    for (l = list; l; l = l->next)
+        nslots += l->n_slots;
 
+    dcc_free_hostlist(list);
+
+    printf("%i\n", nslots);
+}
 
 /**
  * distcc client entry point.
@@ -182,6 +224,18 @@ int main(int argc, char **argv)
             ret = 0;
             goto out;
         }
+
+        if (!strcmp(argv[1], "--show-hosts")) {
+            dcc_show_hosts();
+            ret = 0;
+            goto out;
+        }
+
+        if (!strcmp(argv[1], "-j")) {
+            dcc_concurrency_level();
+            ret = 0;
+            goto out;
+        }
         
         dcc_find_compiler(argv, &compiler_args);
         /* compiler_args is now respectively either "cc -c hello.c" or
--- distcc-2.18.3/src/distcc.h	2004-11-21 19:36:30.000000000 +0100
+++ distcc-2.18.3.lennart/src/distcc.h	2007-12-30 13:55:27.000000000 +0100
@@ -112,7 +112,7 @@ int dcc_parse_hosts_env(struct dcc_hostd
                         int *ret_nhosts);
 int dcc_parse_hosts(const char *where, const char *source_name,
                     struct dcc_hostdef **ret_list,
-                    int *ret_nhosts);
+                    int *ret_nhosts, struct dcc_hostdef **ret_prev);
 
 /* ncpu.c */
 int dcc_ncpus(int *);
@@ -226,6 +226,7 @@ int dcc_get_tempdir(const char **);
 int dcc_make_tmpnam(const char *, const char *suffix, char **);
 
 int dcc_mkdir(const char *path) WARN_UNUSED;
+int dcc_get_subdir(const char *name, char **path_ret) WARN_UNUSED;
 int dcc_get_lock_dir(char **path_ret) WARN_UNUSED;
 int dcc_get_state_dir(char **path_ret) WARN_UNUSED;
 int dcc_get_top_dir(char **path_ret) WARN_UNUSED;
--- distcc-2.18.3/src/dopt.c	2004-10-24 07:05:48.000000000 +0200
+++ distcc-2.18.3.lennart/src/dopt.c	2007-12-30 13:55:27.000000000 +0100
@@ -93,6 +93,10 @@ enum {
     opt_log_level
 };
 
+#ifdef HAVE_AVAHI
+/* Flag for enabling/disabling Zeroconf using Avahi */
+int opt_zeroconf = 0;
+#endif
 
 const struct poptOption options[] = {
     { "allow", 'a',      POPT_ARG_STRING, 0, 'a', 0, 0 },
@@ -115,6 +119,9 @@ const struct poptOption options[] = {
     { "verbose", 0,      POPT_ARG_NONE, 0, 'v', 0, 0 },
     { "version", 0,      POPT_ARG_NONE, 0, 'V', 0, 0 },
     { "wizard", 'W',     POPT_ARG_NONE, 0, 'W', 0, 0 },
+#ifdef HAVE_AVAHI    
+    { "zeroconf", 0,     POPT_ARG_NONE, &opt_zeroconf, 0, 0, 0 },
+#endif    
     { 0, 0, 0, 0, 0, 0, 0 }
 };
 
@@ -137,6 +144,9 @@ static void distccd_show_usage(void)
 "    -p, --port PORT            TCP port to listen on\n"
 "    --listen ADDRESS           IP address to listen on\n"
 "    -a, --allow IP[/BITS]      client address access control\n"
+#ifdef HAVE_AVAHI
+"    --zeroconf                 register via mDNS/DNS-SD\n"
+#endif
 "  Debug and trace:\n"
 "    --log-level=LEVEL          set detail level for log file\n"
 "      levels: critical, error, warning, notice, info, debug\n"
--- distcc-2.18.3/src/dopt.h	2004-07-30 03:12:13.000000000 +0200
+++ distcc-2.18.3.lennart/src/dopt.h	2007-12-30 13:55:27.000000000 +0100
@@ -38,3 +38,7 @@ extern int opt_log_stderr;
 extern int opt_lifetime;
 extern char *opt_listen_addr;
 extern int opt_niceness;
+
+#ifdef HAVE_AVAHI
+extern int opt_zeroconf;
+#endif
--- distcc-2.18.3/src/dparent.c	2004-10-24 07:05:48.000000000 +0200
+++ distcc-2.18.3.lennart/src/dparent.c	2007-12-30 13:55:27.000000000 +0100
@@ -70,6 +70,7 @@
 #include "types.h"
 #include "daemon.h"
 #include "netutil.h"
+#include "zeroconf.h"
 
 static void dcc_nofork_parent(int listen_fd) NORETURN;
 static void dcc_detach(void);
@@ -94,6 +95,9 @@ int dcc_standalone_server(void)
     int listen_fd;
     int n_cpus;
     int ret;
+#ifdef HAVE_AVAHI
+    void *avahi = NULL;
+#endif
 
     if ((ret = dcc_socket_listen(arg_port, &listen_fd, opt_listen_addr)) != 0)
         return ret;
@@ -131,6 +135,14 @@ int dcc_standalone_server(void)
     /* Don't catch signals until we've detached or created a process group. */
     dcc_daemon_catch_signals();
 
+#ifdef HAVE_AVAHI      
+    /* Zeroconf registration */
+    if (opt_zeroconf) {
+        if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus)))
+            return EXIT_CONNECT_FAILED;
+    }
+#endif
+        
     /* This is called in the master daemon, whether that is detached or
      * not.  */
     dcc_master_pid = getpid();
@@ -138,10 +150,21 @@ int dcc_standalone_server(void)
     if (opt_no_fork) {
         dcc_log_daemon_started("non-forking daemon");   
         dcc_nofork_parent(listen_fd);
+        ret = 0;
     } else {
[...11704 lines suppressed...]
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
 
-# This sed command replaces #undef with comments.  This is necessary, for
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
 _ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
   echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
   rm -f conftest.defines
   mv conftest.tail conftest.defines
 done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
+rm -f conftest.defines conftest.tail
 
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
 cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
   if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
       rm -f $ac_file
-      mv $tmp/config.h $ac_file
+      mv "$tmp/config.h" $ac_file
     fi
   else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
+    echo "/* $configure_input  */"
+    cat "$ac_result"
   fi
-done
-_ACEOF
+  rm -f "$tmp/out12"
+ ;;
+
+
+  esac
+
+done # for ac_tag
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
 { (exit 0); exit 0; }
 _ACEOF


--- NEW FILE distcc.spec ---

Name:       distcc
Version:    2.18.3
Release:    4%{?dist}
Summary:    Distributed C/C++ compilation
Group:      Development/Tools
License:    GPLv2+
URL:        http://distcc.samba.org/
Source0:    http://distcc.samba.org/ftp/distcc/distcc-%{version}.tar.bz2
Source1:    hosts.sample
Source2:    distccd.init
Patch0:     distcc-2.18.3-avahi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: popt-devel
BuildRequires: libgnomeui-devel
BuildRequires: pango-devel
BuildRequires: python
BuildRequires: desktop-file-utils
BuildRequires: avahi-devel


%description
distcc is a program to distribute compilation of C or C++ code across
several machines on a network. distcc should always generate the same
results as a local compile, is simple to install and use, and is often
two or more times faster than a local compile.


%package     server
Summary:    Server for distributed C/C++ compilation
Group:      Development/Tools
License:    GPLv2+

Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig


%description server
This package contains the compilation server needed to use %{name}.


%prep
%setup -q
%patch0 -p1 -b .avahi


%build
%configure --with-gnome --with-docdir=%{_datadir}/doc/%{name}-%{version}
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Move desktop file to right directory
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/*.desktop $RPM_BUILD_ROOT%{_datadir}/applications/
sed -i 's at Icon=@Icon=%{_datadir}/%{name}/@' $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop

# Install sample hosts file
install -Dm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/hosts

# Install sample distccd config file
install -Dm 0644 contrib/redhat/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/distccd

# Install distccd init file
install -Dm 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/distccd


%post
update-desktop-database &> /dev/null ||:


%post server
[ $1 -lt 2 ] && /sbin/chkconfig --add distccd ||:


%preun server
[ $1 -eq 0 ] && /sbin/chkconfig --del distccd ||:


%postun
update-desktop-database &> /dev/null ||:


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc %{_datadir}/doc/%{name}-%{version}
%{_bindir}/distcc
%{_bindir}/distccmon*
%{_mandir}/man1/distcc.*
%{_mandir}/man1/distccmon*
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/hosts


%files server
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/distccd
%{_sysconfdir}/init.d/*
%{_mandir}/man1/distccd*
%config(noreplace) %{_sysconfdir}/sysconfig/distccd


%changelog
* Fri Feb 22 2008 Denis Leroy <denis at poolshark.org> - 2.18.3-4
- Added Avahi support patch from Lennart

* Tue Feb 19 2008 Denis Leroy <denis at poolshark.org> - 2.18.3-3
- LSB header for init script

* Mon Feb 18 2008 Denis Leroy <denis at poolshark.org> - 2.18.3-2
- Fixed Source0 URL, fixed init script

* Mon Feb  4 2008 Denis Leroy <denis at poolshark.org> - 2.18.3-1
- First version



--- NEW FILE distccd.init ---
#!/bin/sh
#
# distccd - A distributed compilation server.
#
#
# chkconfig: - 80 20
# description: distccd - distcc distributed compilation server
#

### BEGIN INIT INFO
# Provides: distccd
# Required-Start: $network $syslog $local_fs
# Required-Stop: $network $syslog $local_fs
# Default-Stop: 0 1 2 6 
# Short-Description: Distributed C/C++ Compilation Server
# Description: distcc is a program to distribute compilation of C or C++
#              code across several machines on a network. distcc should
#              always generate the same results as a local compile, is
#              simple to install and use, and is often two or more times
#              faster than a local compile.
### END INIT INFO

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

exec="/usr/bin/distccd"
prog="distccd"

# Default variables
SYSCONFIG="/etc/sysconfig/distccd"
OPTIONS=""
USER="nobody"
DISTCCPATH="$PATH"

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
	[ -x $exec ] || exit 5
	[ -z "$OPTIONS" ] && exit 6
	echo -n $"Starting $prog: "
	DISTCCD_PATH="$DISTCCPATH" $prog --daemon --user "$USER" $OPTIONS && success || failure
	retval=$?
	echo
	[ $retval -eq 0 ] && touch $lockfile
	return $retval
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $prog
	retval=$?
	echo
	[ $retval -eq 0 ] && rm -f $lockfile
	return $retval
}

restart() {
	stop
	start
}

reload() {
    restart
}

force_reload() {
    restart
}

rh_status() {
    # run checks to determine if the service is running or use generic status
    status $prog
}

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

case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac
exit $?


--- NEW FILE hosts.sample ---
# The grammar of the host file is, informally:
#
#  DISTCC_HOSTS = HOSTSPEC ...
#  HOSTSPEC = LOCAL_HOST | SSH_HOST | TCP_HOST | OLDSTYLE_TCP_HOST
#  LOCAL_HOST = localhost[/LIMIT]
#  SSH_HOST = [USER]@HOSTID[/LIMIT][:COMMAND][OPTIONS]
#  TCP_HOST = HOSTID[:PORT][/LIMIT][OPTIONS]
#  OLDSTYLE_TCP_HOST = HOSTID[/LIMIT][:PORT][OPTIONS]
#  HOSTID = HOSTNAME | IPV4
#  OPTIONS = ,OPTION[OPTIONS]
#  OPTION = lzo


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/distcc/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	7 Mar 2008 21:44:16 -0000	1.1
+++ .cvsignore	7 Mar 2008 22:53:03 -0000	1.2
@@ -0,0 +1 @@
+distcc-2.18.3.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/distcc/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	7 Mar 2008 21:44:16 -0000	1.1
+++ sources	7 Mar 2008 22:53:03 -0000	1.2
@@ -0,0 +1 @@
+0d6b80a1efc3a3d816c4f4175f63eaa2  distcc-2.18.3.tar.bz2




More information about the fedora-extras-commits mailing list