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

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