File: watchcatd.spec

package info (click to toggle)
watchcatd 1.2.1-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 248 kB
  • ctags: 188
  • sloc: ansic: 1,784; sh: 73; makefile: 59; perl: 46
file content (113 lines) | stat: -rw-r--r-- 3,168 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# $Id: watchcatd.spec 2831 2009-02-13 21:02:56Z andre.dig $

%define name    watchcatd
%define version 1.2.1
%define release 1mdv

Summary:        Software watchdog, but less drastic than the usual solutions
Name:           %name
Version:        %version
Release:        %release
License:        GPL
Group:          System/Servers
URL:            http://oss.digirati.com.br/watchcatd/

# Please add comment with the right url/downloadpage.
Source0:        %name-%version.tar.bz2

BuildRoot:      %_tmppath/%name-buildroot
PreReq:         rpm-helper

%description
watchcatd is a software service that monitors processes. A bug or
malicious attacks to machine can lock up a process, leading to a
deadlock or an unexpected condition. If a monitored process locks
up, it is killed. 

On an alternate setup, watchcatd can be configured to work as a
timer.

%prep
%setup -q

%build
export CFLAGS="%{optflags}"
export PREFIX="/usr"
%make

%install
%__rm -rf %buildroot
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_libdir}/watchcatd
install -d %{buildroot}%{_sysconfdir}/init.d
install -d %{buildroot}%{_mandir}/man{5,8}
install -d %{buildroot}%{_docdir}/watchcatd
install -m0750 catmaster %{buildroot}%{_libdir}/watchcatd
install -m0750 catslave %{buildroot}%{_libdir}/watchcatd
install -m0700 wcatstat %{buildroot}%{_sbindir}/wcatstat
install -m0700 watchcatd.init %{buildroot}%{_sysconfdir}/init.d/watchcatd
install -m0600 watchcatd.prod.conf %{buildroot}%{_sysconfdir}/watchcatd.conf
install -m0644 watchcatd.8 %{buildroot}%{_mandir}/man8/
install -m0644 watchcatd.conf.5 %{buildroot}%{_mandir}/man5/

%pre
%_pre_useradd watchcat /var/lib/watchcat /sbin/nologin
install -m0700 -d /var/lib/watchcat
chown root:root /var/lib/watchcat

%post
%_post_service watchcatd

%preun
%_preun_service watchcatd

%postun
if [ "$1" = "0" ]; then
  %_postun_userdel watchcat
  %__rm -rf /var/lib/watchcat
fi

%clean
%__rm -rf %buildroot

%files
%defattr(-,root,root)
%{_sbindir}/wcatstat
%{_libdir}/watchcatd/catmaster
%{_libdir}/watchcatd/catslave
%config(noreplace) %{_sysconfdir}/init.d/watchcatd
%config(noreplace) %{_sysconfdir}/watchcatd.conf
%{_mandir}/man8/%name.8*
%{_mandir}/man5/%name.conf.5*
%doc COPYRIGHT ChangeLog TODO

%changelog
* Fri Feb  13 2009 Andre Nathan <andre@digirati.com.br> 1.2.1-1mdv
- Version 1.2.1.

* Wed Aug  27 2008 Andre Nathan <andre@digirati.com.br> 1.2-1mdk
- Version 1.2.

* Mon Apr  30 2004 Andre Nathan <andre@digirati.com.br> 1.1-3mdk
- %_preun_service shall be executed during upgrades.

* Mon Apr  19 2004 Andre Nathan <andre@digirati.com.br> 1.1-2mdk
- Fix some bugs.

* Fri Apr  09 2004 Andre Nathan <andre@digirati.com.br> 1.1-1mdk
- Watchcatd 1.1

* Thu Feb  05 2004 Andre Nathan <andre@digirati.com.br> 1.0-2
- Export CFLAGS before building;
- Fix typo in changelog.

* Mon Feb  02 2004 Michel Machado <michel@digirati.com.br> 1.0-1
- Adjust version and watchcat user;
- Restrict mode access for files;
- Add COPYRIGHT.

* Wed Jan  21 2004 Andre Nathan <andre@digirati.com.br> 0.0-2
- Add watchcatd user and macros for turning the service on.

* Wed Jan  14 2004 Andre Nathan <andre@digirati.com.br> 0.0-1
- First version.