]>
Commit | Line | Data |
---|---|---|
ece2866a ER |
1 | # TODO |
2 | # - integrate pld webapps framework | |
09abfc3c AM |
3 | %define ver 1.05 |
4 | %define subver RC1 | |
5 | Summary: Network monitoring program | |
47ba4d14 | 6 | Summary(pl.UTF-8): Program do monitorowania sieci |
09abfc3c AM |
7 | Name: demarc |
8 | Version: %{ver}.%{subver} | |
d57978aa | 9 | Release: 4 |
349f96ed | 10 | License: http://www.demarc.org/license/ (Free for non-commercial use) |
09abfc3c | 11 | Group: Networking |
349f96ed | 12 | Source0: http://www.demarc.org/downloads/demarc-105/%{name}-%{ver}-%{subver}.tar.gz |
85d00b83 | 13 | # Source0-md5: adf1550b8e7a4936c4b37ac214704f27 |
09abfc3c AM |
14 | Source1: %{name}-apache.conf |
15 | Source2: %{name}.init | |
48965869 | 16 | Source3: %{name}.cron |
09abfc3c | 17 | Patch0: %{name}-config.patch |
349f96ed | 18 | Patch1: %{name}-whois-fix.patch |
09abfc3c | 19 | URL: http://www.demarc.org/ |
d57978aa | 20 | BuildRequires: perl-Apache-DBI |
09abfc3c AM |
21 | BuildRequires: perl-CGI |
22 | BuildRequires: perl-DBI | |
09abfc3c | 23 | BuildRequires: perl-Digest-MD5 |
d57978aa | 24 | BuildRequires: perl-Msql-Mysql-modules |
25 | BuildRequires: perl-devel >= 1:5.6 | |
26 | BuildRequires: rpm-perlprov >= 4.1-13 | |
ea1a0c4b | 27 | BuildRequires: rpmbuild(macros) >= 1.228 |
0e9bdc22 | 28 | Requires(post,preun): /sbin/chkconfig |
ece2866a | 29 | Requires: crondaemon |
155879fb ER |
30 | Requires: rc-scripts |
31 | Requires: webserver = apache | |
09abfc3c AM |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
09abfc3c AM |
35 | %define _bindir %{_sbindir} |
36 | ||
37 | %description | |
38 | DEMARC is an all-inclusive network monitoring program that allows you | |
39 | to monitor an entire network of servers from one powerful web | |
40 | interface. | |
41 | ||
42 | Instead of having one program perform file integrity checks, another | |
43 | program monitoring the connectivity and health of your network, and | |
44 | yet another monitoring your network for intrusion detection attempts, | |
45 | DEMARC combines all three services into one powerful client/server | |
46 | program. Not only can you monitor the status of the different machines | |
47 | in your network, but you can also respond to changes in your network | |
48 | all from one centralized location. | |
49 | ||
0e51d86f JR |
50 | %description -l pl.UTF-8 |
51 | DEMARC to kompletny system monitorowania sieci pozwalający monitorować | |
52 | całą sieć serwerów z jednego interfejsu WWW. | |
09abfc3c | 53 | |
0e51d86f JR |
54 | Zamiast posiadać jeden program sprawdzający integralność plików, inny |
55 | program monitorujący połączenia i stan Twojej sieci, i jeszcze jeden | |
56 | program monitorujący sieć w celach detekcji intruzów wystarczy DEMARC | |
57 | łączący w sobie te trzy usługi w jednym programie klient/serwer. Nie | |
58 | tylko możesz monitorować stan różnych maszyn w Twojej sieci ale także | |
59 | możesz reagować na zmiany z jednej centralnej lokalizacji. | |
09abfc3c AM |
60 | |
61 | %package client | |
349f96ed | 62 | Summary: Network monitoring program - client |
47ba4d14 | 63 | Summary(pl.UTF-8): Program do monitorowania sieci - klient |
349f96ed | 64 | Group: Networking |
b4d6e872 | 65 | Requires: snort(mysql) >= 1.8.1 |
09abfc3c AM |
66 | |
67 | %description client | |
68 | DEMARC is an all-inclusive network monitoring program that allows you | |
69 | to monitor an entire network of servers from one powerful web | |
70 | interface. | |
71 | ||
349f96ed JB |
72 | This is client program which should be installed on all monitored |
73 | servers. | |
09abfc3c | 74 | |
0e51d86f JR |
75 | %description client -l pl.UTF-8 |
76 | DEMARC to kompletny system monitorowania sieci pozwalający monitorować | |
77 | całą sieć serwerów z jednego interfejsu WWW. | |
09abfc3c | 78 | |
0e51d86f | 79 | To jest program kliencki, który powinien być zainstalowany na |
349f96ed | 80 | wszystkich monitorowanych serwerach. |
09abfc3c AM |
81 | |
82 | %prep | |
83 | %setup -q -n %{name}-%{ver}-%{subver} | |
84 | %patch0 -p1 | |
349f96ed | 85 | %patch1 -p1 |
09abfc3c AM |
86 | |
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
bcbf829e PG |
89 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,demarcd,httpd} \ |
90 | $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/demarc/{images,cgi}} \ | |
91 | $RPM_BUILD_ROOT%{_var}/lib/demarcd | |
09abfc3c | 92 | |
ece2866a ER |
93 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf |
94 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/demarcd | |
95 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name} | |
96 | install -p bin/demarcd $RPM_BUILD_ROOT%{_sbindir} | |
97 | cp -p conf/* $RPM_BUILD_ROOT%{_sysconfdir}/demarcd | |
98 | cp -a cgi images $RPM_BUILD_ROOT%{_datadir}/demarc | |
99 | cp -p install/{c*,d*,p*} $RPM_BUILD_ROOT%{_datadir}/demarc | |
09abfc3c | 100 | |
09abfc3c AM |
101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
349f96ed | 105 | echo 'Remember to add "Include demarc.conf" to httpd.conf.' |
09abfc3c AM |
106 | |
107 | %post client | |
108 | if [ "$1" = "1" ] ; then | |
109 | touch /var/log/demarcd && chmod 750 /var/log/demarcd | |
110 | fi | |
111 | /sbin/chkconfig --add demarcd | |
ea1a0c4b ER |
112 | %service demarcd restart |
113 | %banner -e -o %{name} <<EOF | |
114 | ||
115 | Run "%{_sbindir}/demarcd -I" to install new snort sensor and then | |
116 | run "service demarcd start" to start demarcd daemon. | |
09abfc3c | 117 | |
ea1a0c4b ER |
118 | Note that in most cases there is no need to start "snort" as |
119 | separate daemon, so turn it off using "chkconfig snort off". | |
120 | EOF | |
09abfc3c AM |
121 | |
122 | %preun client | |
123 | if [ "$1" = "0" ] ; then | |
ea1a0c4b | 124 | %service demarcd stop |
09abfc3c AM |
125 | /sbin/chkconfig --del demarcd |
126 | fi | |
127 | ||
128 | %files | |
129 | %defattr(644,root,root,755) | |
72d59f4d | 130 | %doc install/{CHAN*,INS*,LIC*} |
09abfc3c AM |
131 | %dir %{_datadir}/demarc |
132 | %{_datadir}/demarc/create_mysql_demarc | |
133 | %{_datadir}/demarc/db_patch_queries | |
134 | %attr(755,root,root) %{_datadir}/demarc/*.pl | |
135 | ||
136 | %dir %{_datadir}/demarc/cgi | |
137 | %{_datadir}/demarc/cgi/StaticServices.pm | |
138 | %attr(640,root,http) %{_datadir}/demarc/cgi/DEMARC_config.pm | |
139 | %attr(755,root,root) %{_datadir}/demarc/cgi/demarc | |
140 | ||
141 | %dir %{_datadir}/demarc/cgi/templates | |
142 | %{_datadir}/demarc/cgi/templates/* | |
143 | ||
144 | %dir %{_datadir}/demarc/images | |
145 | %{_datadir}/demarc/images/* | |
146 | ||
b4d6e872 | 147 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/demarc.conf |
09abfc3c AM |
148 | |
149 | %files client | |
150 | %defattr(644,root,root,755) | |
151 | %attr(754,root,root) /etc/rc.d/init.d/demarcd | |
152 | %attr(755,root,root) %{_sbindir}/demarcd | |
155879fb ER |
153 | %attr(750,root,root) %dir %{_sysconfdir}/demarcd |
154 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/demarcd/*.conf | |
155 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/demarcd/*.cmds | |
eec3ead5 | 156 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name} |
860c2122 | 157 | %attr(750,root,root) %{_var}/lib/demarcd |