/[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.1 - (hide annotations) (download)
Tue Dec 25 05:01:31 2007 UTC (16 years, 5 months ago) by slords
Branch: MAIN
Import on branch contribs7 of package smeserver-snort-2.7.0.1-1.src.rpm

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

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