/[smecontribs]/rpms/smeserver-snort/contribs7/smeserver-snort-2.7.0.1.spec
ViewVC logotype

Annotation of /rpms/smeserver-snort/contribs7/smeserver-snort-2.7.0.1.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Dec 25 05:10:17 2007 UTC (16 years, 5 months ago) by slords
Branch: MAIN
Changes since 1.1: +2 -3 lines
Update spec

1 slords 1.1 Summary: SME server SNORT
2     %define name smeserver-snort
3     Name: %{name}
4     %define version 2.7.0.1
5     %define release 1
6     Version: %{version}
7 slords 1.2 Release: %{release}%{?dist}
8     License: Freely distributable
9 slords 1.1 Group: Networking/Daemons
10     Source: %{name}-%{version}.tar.gz
11     #Patch0: %{name}-%{version}.patch.yyyymmddnn
12     BuildRoot: /var/tmp/e-smith-buildroot
13     BuildRequires: e-smith-devtools
14     BuildArchitectures: i386
15     Requires: smeserver-release >= 7
16     AutoReqProv: no
17    
18     %changelog
19     * Mon Aug 06 2007 Michel Van hees <michel@vanhees.cc>
20     - Upgrade to version 2.7.0.1
21     - Add possibility to deactivate some rules file
22    
23     * Thu May 24 2007 Michel Van hees <michel@vanhees.cc>
24     - Upgrade to version 2.6.1.5
25     - Should correct problem with serveronly mode
26    
27     * Wed Feb 21 2007 Michel Van hees <michel@vanhees.cc>
28     - Upgrade to version 2.6.1.3
29     - Correct logrotate that consume to mutch time
30    
31     * Fri Jan 19 2007 Michel Van hees <michel@vanhees.cc>
32     - upgrade snort to version 2.6.12
33     - increase rpm integration
34    
35     * Mon Jul 17 2006 Michel Van hees <michel@vanhees.cc>
36     - upgrade snort version to 2.6.0
37    
38     * Sun May 07 2006 Michel Van hees <michel@vanhees.cc>
39     - Integration of snort 2.4.4 from www.adrome.org, Thanks to him
40    
41     * Wed Mar 22 2006 Michel Van hees <michel@vanhees.cc>
42     - bug correction
43    
44     * Sat Feb 14 2006 Michel Van hees <michel@vanhees.cc>
45     - initial release
46    
47     %description
48     SME server - SNORT customization
49    
50     %prep
51     %setup
52     #%patch0 -p1
53     #%patch1 -p1
54    
55     %build
56     perl createlinks
57    
58     %install
59     rm -rf $RPM_BUILD_ROOT
60     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
61     rm -f %{name}-%{version}-filelist
62     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
63     echo "%doc COPYING" >> %{name}-%{version}-filelist
64    
65     %clean
66     rm -rf $RPM_BUILD_ROOT
67    
68     %pre
69     # Don't do all this stuff if we are upgrading
70     if [ $1 = 1 ] ; then
71     groupadd snort 2> /dev/null || true
72     useradd -M -d /var/log/snort -s /bin/false -c "Snort" -g snort snort 2>/dev/null || true
73     fi
74     # Action to be done only we upgrade
75     if [ $1 -ge 2 ] ; then
76     /sbin/e-smith/service snortd stop 1>/dev/null 2>/dev/null
77     fi
78    
79     %preun
80    
81     %post
82     # General action
83     chown -R snort:snort /var/log/snort
84     chown -R smelog:smelog /var/log/snortd
85    
86     # Action to be done only we install
87     if [ $1 = 1 ] ; then
88     echo ======================= Activate sme snort ================================
89     /sbin/e-smith/db configuration set snortd service status enabled mysql enabled HttpInspect enabled
90     echo ======================= Creating snort_log database =======================
91     mysqladmin create snort_log
92     echo ======================= Creating snort_archive database ===================
93     mysqladmin create snort_archive
94     echo ======================= Creating tables in snort_log ======================
95     mysql snort_log < /usr/share/doc/snort-2.7.0.1/contrib/create_mysql
96     echo ======================= Creating tables in snort_archive ==================
97     mysql snort_archive < /usr/share/doc/snort-2.7.0.1/contrib/snort_archive.sql
98     fi
99     # Action to be done only we upgrade
100    
101     /sbin/e-smith/service snortd start
102     echo BEWARE no rules have been installed!! Install some rules in /etc/snort/rules
103     echo or install oinkmaster
104    
105     %postun
106     # Action to be done only we remove
107     if [ $1 = 0 ] ; then
108     if [ -L /usr/sbin/snort ]; then rm -f /usr/sbin/snort; fi
109     /usr/sbin/userdel snort 2>/dev/null
110     echo =========================================================================
111     echo == BEWARE Mysql database was not dropped !
112     echo == You have to drop it manually !
113     echo =========================================================================
114     rm -Rf /var/service/snortd
115     echo =========================================================================
116     echo == BEWARE log directory was not erase !
117     echo == You have to erase it manually !
118     echo =========================================================================
119     fi
120     # Try and restart, but don't bail if it fails
121     if [ $1 -ge 1 ] ; then
122     /sbin/e-smith/service snortd restart 1>/dev/null 2>/dev/null || :
123     fi
124    
125     %files -f %{name}-%{version}-filelist
126     %defattr(-,root,root)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed