rpms/snort/devel .cvsignore, 1.8, 1.9 snort.spec, 1.23, 1.24 sources, 1.8, 1.9

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Thu Jun 14 11:59:01 UTC 2007


Author: ausil

Update of /cvs/extras/rpms/snort/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2834

Modified Files:
	.cvsignore snort.spec sources 
Log Message:
update to 2.6.1.4  switch to alternatives




Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/snort/devel/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore	19 Feb 2007 21:36:01 -0000	1.8
+++ .cvsignore	14 Jun 2007 11:58:20 -0000	1.9
@@ -1 +1 @@
-snort-2.6.1.3.tar.gz
+snort-2.6.1.4.tar.gz


Index: snort.spec
===================================================================
RCS file: /cvs/extras/rpms/snort/devel/snort.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- snort.spec	19 Feb 2007 21:36:01 -0000	1.23
+++ snort.spec	14 Jun 2007 11:58:20 -0000	1.24
@@ -1,18 +1,17 @@
 Summary:        Intrusion detection system
 Name:           snort
-Version:        2.6.1.3
+Version:        2.6.1.4
 Release:        1%{?dist}
 License:        GPL
 Group:          Applications/Internet
 Source0:        http://www.snort.org/dl/current/snort-%{version}.tar.gz
 Source1:        snortd
-Source2:	README.fedora
-Patch0:		snort-2.4.3-configure64.patch
+Source2:        README.fedora
+Patch0:         snort-2.4.3-configure64.patch
 Url:            http://www.snort.org
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
-Prefix:         /usr
 Requires:       libpcap >= 0.4
-%if "%{?fedora}" <= "5"
+%if "%{?fedora}" <= "5" || "%{?rhel}" <= "4"
 BuildRequires:  libpcap >= 0.4
 %else
 BuildRequires:  libpcap-devel >= 0.4
@@ -86,7 +85,7 @@
 attacks and probes, such as buffer overflows, stealth port scans,
 CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
 Snort has a real-time alerting capabilty, with alerts being sent to syslog,
-a seperate "alert" file, or as a WinPopup message via Samba's smbclient
+a separate "alert" file, or as a WinPopup message via Samba's smbclient
 
 Edit %{_sysconfdir}/snort.conf to configure snort and use snort.d to start snort
 
@@ -152,9 +151,7 @@
 
 %build
 
-SNORT_BASE_CONFIG="--prefix=%{_prefix} \
-                   --sysconfdir=%{_sysconfdir} \
-                   --with-libpcap-includes=/usr/include/pcap \
+SNORT_BASE_CONFIG="--with-libpcap-includes=/usr/include/pcap \
                    --enable-dynamicplugin"
 export LDFLAGS=-L/usr/lib64/mysql
 # there are some strange configure errors
@@ -281,7 +278,7 @@
 
 %install
 if [ -d %{buildroot} ]; then
-	rm -rf %{buildroot}
+        rm -rf %{buildroot}
 fi
 
 mkdir -p %{buildroot}%{_sysconfdir}/snort
@@ -324,7 +321,7 @@
 
 install snort.8 %{buildroot}%{_mandir}/man8
 install etc/generators  etc/gen-msg.map  etc/sid etc/sid-msg.map  etc/threshold.conf  etc/unicode.map etc/reference.config etc/classification.config etc/snort.conf %{buildroot}%{_sysconfdir}/snort
-install %{SOURCE1} %{buildroot}/etc/rc.d/init.d
+install -p -m 755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d
 
 perl -pi -e 's!var RULE_PATH ../rules!var RULE_PATH %{_sysconfdir}!'  %{buildroot}%{_sysconfdir}/snort/snort.conf
 perl -pi -e 's!dynamicpreprocessor directory /usr/local/lib/snort_dynamicpreprocessor/!dynamicpreprocessor directory %{_libdir}/snort/dynamicpreprocessor/!' %{buildroot}%{_sysconfdir}/snort/snort.conf
@@ -332,55 +329,121 @@
 
 %clean
 if [ -d %{buildroot} ]; then
-	rm -rf %{buildroot}
+         rm -rf %{buildroot}
 fi
 
 
 %post
-# make a symlink if there is no link
-ln -sf %{_sbindir}/snort-plain %{_sbindir}/snort
 /sbin/chkconfig --add snortd
 /sbin/ldconfig
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-plain 10
+fi
 
 
 %preun
 /etc/rc.d/init.d/snortd stop
 if [ $1 = 0 ] ; then
    /sbin/chkconfig --del snortd
-   if [ -L %{_sbindir}/snort ]; then rm %{_sbindir}/snort; fi
+   %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-plain
 fi
 
 
 %post plain+flexresp
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-plain+flexresp %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-plain+flexresp 20
+fi
+
+%postun plain+flexresp
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-plain+flexresp 
+fi
 
 
 %post mysql
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-mysql %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-mysql 30
+fi
+
+%postun mysql
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-mysql
+fi
 
 
 %post mysql+flexresp
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-mysql+flexresp %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-mysql+flexresp 40
+fi
+
+%postun mysql+flexresp
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-mysql+flexresp
+fi
 
 
 %post postgresql
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-postgresql %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-postgresql 50
+fi
+
+%postun postgresql
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-postgresql
+fi
 
 
 %post postgresql+flexresp
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-postgresql+flexresp %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-postgresql+flexresp 60
+fi
+
+%postun postgresql+flexresp
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-postgresql+flexresp
+fi
 
 
 %post snmp
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-snmp %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-snmp 60
+fi
+
+%postun snmp
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-snmp 
+fi
 
 
 %post snmp+flexresp
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-snmp+flexresp %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-snmp+flexresp 70
+fi
+
+%postun snmp+flexresp
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-snmp+flexresp 
+fi
 
 
 %post bloat
-if [ -L %{_sbindir}/snort ] || [ ! -e %{_sbindir}/snort ] ; then ln -sf %{_sbindir}/snort-bloat %{_sbindir}/snort; fi
+if [ $1 -eq 1 ] ; then
+  %{_sbindir}/update-alternatives --install %{_bindir}/snort \
+    snort %{_bindir}/snort-bloat 80
+fi
+
+%postun bloat
+if [ $1 -eq 0 ] ; then
+  %{_sbindir}/update-alternatives --remove snort %{_bindir}/snort-bloat 
+fi
 
 
 %files
@@ -421,6 +484,10 @@
 
 
 %changelog
+* Sun May 06 2007 Dennis Gilmore <dennis at ausil.us> - 2.6.1.4-1
+- update to 2.6.1.4 
+- use alternatives
+
 * Mon Feb 19 2007 Dennis Gilmore <dennis at ausil.us> - 2.6.1.3-1
 - update to 2.6.1.3 which fixes CVE-2006-5276
 
@@ -510,7 +577,7 @@
 - moved /var/snort/dev/null creation to install time
 
 * Tue Nov 21 2000 Chris Green <cmg at uab.edu>
-- changed to %{SnortPrefix}
+- changed to %%{SnortPrefix}
 - upgrade to patch2
 
 * Mon Jul 31 2000 Wim Vandersmissen <wim at bofh.st>
@@ -523,9 +590,9 @@
 
 * Sat Jul 22 2000 Wim Vandersmissen <wim at bofh.st>
 - Updated to version 1.6.3
-- Fixed the user/group stuff (moved to %post)
-- Added userdel/groupdel to %postun
-- Automagically adds the right IP, nameservers to %{_sysconfdir}/rules.base
+- Fixed the user/group stuff (moved to %%post)
+- Added userdel/groupdel to %%postun
+- Automagically adds the right IP, nameservers to %%{_sysconfdir}/rules.base
 
 * Sat Jul 08 2000 Dave Wreski <dave at linuxsecurity.com>
 - Updated to version 1.6.2
@@ -543,7 +610,7 @@
 - Fixed permissions on /var/log/snort
 - Created /var/log/snort/archive for archival of snort logs
 - Added post/preun to add/remove snortd to/from rc?.d directories
-- Defined configuration files as %config
+- Defined configuration files as %%config
 
 * Tue Mar 28 2000 William Stearns <wstearns at pobox.com>
 - Quick update to 1.6.


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/snort/devel/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources	19 Feb 2007 21:36:01 -0000	1.8
+++ sources	14 Jun 2007 11:58:20 -0000	1.9
@@ -1 +1 @@
-8b46997afd728fbdaafdc9b1d0278b07  snort-2.6.1.3.tar.gz
+70e7f297c9fcf1f46d6fa3e1bb4aae49  snort-2.6.1.4.tar.gz




More information about the fedora-extras-commits mailing list