[packagers] Proposed patch for snortalog specfile

Dean Takemori deant at hawaii.rr.com
Fri Sep 22 12:01:31 CEST 2006


This is a patch against the test .spec file for snortalog at
http://dag.wieers.com/packages/snortalog/snortalog.spec
It is specific to snortalog version 2.3.0.  It will not work
for snortalog v2.4.0.

I'm not sure if the .spec is optimal.  I've only done some
basic testing of the installation, but the build, install and
testing works for me on a CentOS release 4.3 (Final)/AthlonXP
box.

-dean takemori

--- snortalog.spec	2004-12-05 12:17:44.000000000 -1000
+++ snortalog-2.3-proposed.spec	2006-09-21 23:46:03.000000000 -1000
@@ -7,10 +7,11 @@
Summary: Snort log analyzer
Name: snortalog
Version: 2.3.0
-Release: 1
+Release: 1.rf
License: GPL
Group: Applications/Internet
URL: http://jeremy.chartier.free.fr/snortalog/
+BuildArch: noarch
Packager: Dag Wieers <dag at wieers.com>
Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
@@ -18,15 +19,17 @@
Source: http://jeremy.chartier.free.fr/snortalog/snortalog_v% 
{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+AutoReqProv: no
BuildRequires: perl
-Requires: perl
+Requires: perl perl(Env) perl(File::Path) perl(Getopt::Long) perl 
(Socket) perl(Term::ANSIColor) perl(Time::localtime)
+
%description
-SnortALog is a powerfull perl script that summarizes snort logs making
+SnortALog is a powerful perl script that summarizes snort logs making
it easy to view any attacks against your network.
SnortALog works with all versions of SNORT and is the only script who
-can analyse snort's logs in all formats (Syslog, Fast and Full alerts).
+can analyse SNORT's logs in all formats (Syslog, Fast and Full alerts).
Also, it is able to summarize Fw-1 (NG and 4.1), Netfilter and IPFilter
logs in a simmilar way.
@@ -34,12 +37,14 @@
%setup -n %{name}_%{real_version}
%{__perl} -pi.orig -e '
-		s|^#(\$domains_file) = .+;|$1 = "%{_sysconfdir}/snortalog/domains";|;
-		s|^#(\$hw_file) = .+;|$1 = "%{_sysconfdir}/snortalog/hw";|;
-		s|^#(\$rules_file) = .+;|$1 = "%{_sysconfdir}/snortalog/rules";|;
+		s|^(\$domains_file) = .+;|$1 = "%{_sysconfdir}/snortalog/domains";|;
+		s|^(\$hw_file) = .+;|$1 = "%{_sysconfdir}/snortalog/hw";|;
+		s|^(\$lang_file) = .+;|$1 = "%{_sysconfdir}/snortalog/lang";|;
+		s|^(\$rules_file) = .+;|$1 = "%{_sysconfdir}/snortalog/rules";|;
		s|^(\$html_directory) = .+;|$1 = "%{_localstatedir}/www/snortalog/";|;
		s|^(\$dbm_directory) = .+;|$1 = "%{_localstatedir}/www/snortalog/";|;
		s|^(\$tmpout_file) = .+;|$1 = "%{_localstatedir}/www/ 
snortalog/.snortalog.tmp";|;
+		s|^require \"modules/(.+);|require \"snortalog/$1;|;
	' snortalog.pl
%{__cat} <<EOF >snortalog.httpd
@@ -66,10 +71,20 @@
%{__install} -D -m0644 snortalog.httpd %{buildroot}%{_sysconfdir}/ 
httpd/conf.d/snortalog.conf
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/snortalog/
-%{__install} -m0644 domains hw rules %{buildroot}%{_sysconfdir}/ 
snortalog/
+%{__install} -m0644 domains hw lang rules %{buildroot}%{_sysconfdir}/ 
snortalog/
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/www/snortalog/
+cd modules
+%{__install} -d -m0755 %{buildroot}/%{perl_vendorlib}/snortalog/
+%{__install} -m0755 barnyardsyslog_log.snortalog  
fw1export_log.snortalog fw1syslog_log.snortalog \
+			gui.snortalog init_graph.snortalog init_pdf.snortalog  
ipf_log.snortalog \
+			netfilter_log.snortalog pf_log.snortalog pix_log.snortalog \
+			snortfast_log.snortalog snortfull_log.snortalog  
snortsyslog_log.snortalog \
+			usage.snortalog whois.snortalog \
+		%{buildroot}/%{perl_vendorlib}/snortalog/
+cd ..
+
%clean
%{__rm} -rf %{buildroot}
@@ -80,6 +95,7 @@
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
%{_bindir}/snortalog
%dir %{_localstatedir}/www/snortalog/
+%{perl_vendorlib}/snortalog/*.snortalog
%changelog
* Sun Dec 05 2004 Dag Wieers <dag at wieers.com> - 2.3.0-1




More information about the packagers mailing list