rpms/dwatch/F-7 dwatch-Makefile.patch, NONE, 1.1 dwatch-manpage.patch, NONE, 1.1 dwatch.5, NONE, 1.1 dwatch.conf, NONE, 1.1 dwatch.cron, NONE, 1.1 dwatch.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Bernard Johnson (bjohnson) fedora-extras-commits at redhat.com
Tue May 29 21:59:30 UTC 2007


Author: bjohnson

Update of /cvs/pkgs/rpms/dwatch/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30786/F-7

Modified Files:
	.cvsignore sources 
Added Files:
	dwatch-Makefile.patch dwatch-manpage.patch dwatch.5 
	dwatch.conf dwatch.cron dwatch.spec 
Log Message:
branch from -devel


dwatch-Makefile.patch:

--- NEW FILE dwatch-Makefile.patch ---
--- dwatch-0.1.1/Makefile.orig	2001-09-23 15:03:28.000000000 -0600
+++ dwatch-0.1.1/Makefile	2007-05-23 14:36:55.000000000 -0600
@@ -6,8 +6,8 @@
 CC = gcc
 
 # Try this first
-CFLAGS = `./guess --cflags`
-LDFLAGS = `./guess --libs`
+#CFLAGS += $(CFLAGS)
+#LDFLAGS += $(LDFLAGS)
 
 # This ps works for Linux and Solaris, at least
 PS = "/bin/ps -ef"
@@ -19,11 +19,11 @@
 #CFLAGS = -Wall -g
 #LDFLAGS = -lnsl -lsocket
 
-PREFIX = /usr/local
+PREFIX = /usr
 BINDIR = $(PREFIX)/bin
-MANDIR = $(PREFIX)/man
+MANDIR = $(PREFIX)/share/man
 MAN1DIR = $(MANDIR)/man1
-ETCDIR = $(PREFIX)/etc
+ETCDIR = /etc
 DOCS = README ChangeLog COPYING dwatch.1 dwatch.conf
 
 all: dwatch
@@ -40,12 +40,12 @@
 	rm -rf $(THIS)
 
 install: dwatch
-	cp dwatch $(BINDIR)
-	cp dwatch.1 $(MAN1DIR)
+	cp dwatch $(DESTDIR)/$(BINDIR)
+	cp dwatch.1 $(DESTDIR)/$(MAN1DIR)
 
 uninstall:
-	rm -f $(BINDIR)/dwatch
-	rm -f $(MAN1DIR)/dwatch.1
+	rm -f $(DESTDIR)/$(BINDIR)/dwatch
+	rm -f $(DESTDIR)/$(MAN1DIR)/dwatch.1
 
 clean:
 	rm -f *.o dwatch *~

dwatch-manpage.patch:

--- NEW FILE dwatch-manpage.patch ---
--- dwatch-0.1.1/dwatch.1.orig	2001-09-23 15:03:28.000000000 -0600
+++ dwatch-0.1.1/dwatch.1	2007-05-23 22:35:26.000000000 -0600
@@ -20,7 +20,7 @@
 .SH OPTIONS
 .TP
 -d
-Debugging (repeat -d for more).
+Print debug output.
 .TP
 -v
 Verbose, i.e. print actions on stdout. Useful when running from cron.
@@ -29,7 +29,7 @@
 Read configuration from the specified file.
 
 .SH SEE ALSO
-pen(1)
+dwatch.conf(5)
 
 .SH AUTHOR
 Copyright (C) 2001 Ulric Eriksson, <ulric at siag.nu>.


--- NEW FILE dwatch.5 ---
.TH DWATCH.CONF 5 LOCAL

.SH NAME
dwatch.conf

.SH DESCRIPTION
.I Dwatch.conf
controls the behavior of the dwatch program.  The configuration file consists
of three columns: directive, argument, and command.

The directive is either the letter P or T.  P is for watching a process and T
is for watching a TCP port.

The argument is either the process name to look for or the host:port to attempt
connecting to.  This must be enclosed in double quotes.

The command is what should be run in the event that the process or listener
specified in the argument is no longer present.

.SH EXAMPLE
.nf
# restart a failed program
P "myprog" /etc/init.d/myprog start
.PP
# restart a listener that has died
T "localhost:8893" /etc/init.d/mylistener start
.fi

Note that the argument is enclosed in double quotes.

.SH SEE ALSO
dwatch(1)

.SH AUTHOR
Copyright (C) 2001 Ulric Eriksson, <ulric at siag.nu>.



--- NEW FILE dwatch.conf ---
# Sample dwatch.conf
#
# directive	argument	command
#P		"pen siag:80"	/usr/local/bin/pen siag:80 siag-eth0-0:80 siag-eth0-1:80
#T		"siag:80"	/usr/local/bin/pen siag:80 siag-eth0-0:80 siag-eth0-1:80
#P		"inetd"		/usr/sbin/inetd
#T		"localhost:ssh"	/usr/local/sbin/sshd


--- NEW FILE dwatch.cron ---
# dwatch - daemon watcher
0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/bin/dwatch &> /dev/null


--- NEW FILE dwatch.spec ---
Name:           dwatch
Version:        0.1.1
Release:        2%{?dist}
Summary:        A program that watches over other programs

Group:          Applications/System
License:        GPL
URL:            http://siag.nu/dwatch/
Source0:        ftp://siag.nu/pub/dwatch/dwatch-0.1.1.tar.gz
Source1:        dwatch.cron
Source2:        dwatch.conf
Source3:        dwatch.5
Patch0:         dwatch-Makefile.patch
Patch1:         dwatch-manpage.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:       vixie-cron

%description
Dwatch (Daemon Watch) is a program that watches over other programs and
performs actions based on conditions specified in a configuration file. See
dwatch.conf for an example of what the file might look like.

Dwatch is meant to be run from cron at regular intervals.

%prep
%setup -q

%patch0 -p1 -b .Makefile
%patch1 -p1 -b .manpage

%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{_bindir}
install -d $RPM_BUILD_ROOT/%{_mandir}/man{1,5}
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d
make install DESTDIR=$RPM_BUILD_ROOT

install -p -m 0644 %SOURCE1 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dwatch
install -p -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/
install -p -m 0644 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man5/dwatch.5

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man?/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
%doc ChangeLog COPYING README



%changelog
* Thu May 24 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.1.1-2
- fix dwatch.5 man page to use double quotes around argument

* Wed May 23 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.1.1-1
- initial release


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/dwatch/F-7/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	29 May 2007 15:40:19 -0000	1.1
+++ .cvsignore	29 May 2007 21:58:55 -0000	1.2
@@ -0,0 +1 @@
+dwatch-0.1.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/dwatch/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	29 May 2007 15:40:19 -0000	1.1
+++ sources	29 May 2007 21:58:55 -0000	1.2
@@ -0,0 +1 @@
+25c06240cb5ab8126badc8a78dcd2b79  dwatch-0.1.1.tar.gz




More information about the fedora-extras-commits mailing list