rpms/unicornscan/devel unicornscan-0.4.7-geoip.patch, NONE, 1.1 unicornscan-0.4.7-lib64.patch, NONE, 1.1 unicornscan.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Robert Scheck robert at fedoraproject.org
Tue Dec 8 08:18:49 UTC 2009


Author: robert

Update of /cvs/pkgs/rpms/unicornscan/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7204

Modified Files:
	.cvsignore sources 
Added Files:
	unicornscan-0.4.7-geoip.patch unicornscan-0.4.7-lib64.patch 
	unicornscan.spec 
Log Message:
Initial import


unicornscan-0.4.7-geoip.patch:
 report.c |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

--- NEW FILE unicornscan-0.4.7-geoip.patch ---
Patch by Robert Scheck <robert at fedoraproject.org> for unicornscan >= 0.4.7, which adds the
standard location of GeoIP data at Fedora in front of the original opening try. Unicornscan
upstream is expecting /etc/unicornscan/GeoIP.dat instead of /usr/share/GeoIP/GeoIP.dat by
default. This patch is looking for the existence of /usr/share/GeoIP/GeoIP.dat, otherwise
/etc/unicornscan/GeoIP.dat will be used to not break the standards from upstream, if patch
gets applied for a future unicornscan release.

--- unicornscan-0.4.7/src/scan_progs/report.c		2006-10-18 18:57:05.000000000 +0200
+++ unicornscan-0.4.7/src/scan_progs/report.c.geoip	2009-11-17 13:16:04.000000000 +0100
@@ -68,9 +68,18 @@
 	report_t=rbinit(123);
 
 #ifdef HAVE_LIBGEOIP
-	gi=GeoIP_open(CONF_DIR "/GeoIP.dat", GEOIP_MEMORY_CACHE);
-	if (gi == NULL) {
-		ERR("error opening geoip database `%s/%s': %s", CONF_DIR, "/GeoIP.dat", strerror(errno));
+
+	if (access("/usr/share/GeoIP/GeoIP.dat", F_OK) == 0) {
+		gi=GeoIP_open("/usr/share/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE);
+		if (gi == NULL) {
+			ERR("error opening geoip standard database `/usr/share/GeoIP/GeoIP.dat': %s", strerror(errno));
+		}
+	}
+	else {
+		gi=GeoIP_open(CONF_DIR "/GeoIP.dat", GEOIP_MEMORY_CACHE);
+		if (gi == NULL) {
+			ERR("error opening geoip database `%s/%s': %s", CONF_DIR, "/GeoIP.dat", strerror(errno));
+		}
 	}
 
 #endif

unicornscan-0.4.7-lib64.patch:
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE unicornscan-0.4.7-lib64.patch ---
Patch by Robert Scheck <robert at fedoraproject.org> for unicornscan >= 0.4.7, which
adds support for x86_64, ppc64 or other 64 bit architectures using /usr/lib64 for
their libraries. Having lib64 in front of lib is mandatory, as 64 bit systems are
likely to run with multi-lib, that means 32 bit libraries are parallel in use. So
running autoconf is required after applying this patch.

--- unicornscan-0.4.7/configure.ac		2007-11-29 15:51:20.000000000 +0100
+++ unicornscan-0.4.7/configure.ac.lib64	2009-11-16 23:32:27.000000000 +0100
@@ -269,7 +269,7 @@
       AC_MSG_RESULT(no)
     fi
   else
-    for i in lib lib/mysql; do
+    for i in lib64 lib lib64/mysql lib/mysql; do
       str="$MYSQL_DIR/$i/libmysqlclient.*"
       for j in `echo $str`; do
         if test -r $j; then
@@ -331,7 +331,7 @@
       AC_MSG_RESULT(no)
     fi
   else
-    for i in lib lib/postgresql; do
+    for i in lib64 lib lib64/postgresql lib/postgresql; do
       str="$PGSQL_DIR/$i/libpq.*"
       for j in `echo $str`; do
         if test -r $j; then


--- NEW FILE unicornscan.spec ---
Summary:	Scalable, accurate, flexible and efficient network probing
Name:		unicornscan
Version:	0.4.7
Release:	1%{?dist}
License:	GPLv2+
Group:		Applications/Internet
URL:		http://www.unicornscan.org/
Source:		http://www.unicornscan.org/releases/%{name}-%{version}-2.tar.bz2
Patch0:		unicornscan-0.4.7-lib64.patch
Patch1:		unicornscan-0.4.7-geoip.patch
Requires(pre):	shadow-utils
BuildRequires:	flex, bison, %{_includedir}/pcap.h, %{_includedir}/ltdl.h
BuildRequires:	libdnet-devel, GeoIP-devel, postgresql-devel, autoconf
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Unicornscan is an attempt at a user-land distributed TCP/IP stack. It is
intended to provide a researcher a superior interface for introducing a
stimulus into and measuring a response from a TCP/IP enabled device or
network. Although it currently has hundreds of individual features, a main
set of abilities include: Asynchronous stateless TCP scanning with all
variations of TCP flags, asynchronous stateless TCP banner grabbing,
asynchronous protocol specific UDP scanning (sending enough of a signature
to elicit a response), active and passive remote OS, application and
component identification by analyzing responses, PCAP file logging and
filtering, relational database output, custom module support, customized
data-set views.

%prep
%setup -q
%patch0 -p1 -b .lib64
%patch1 -p1 -b .geoip
autoconf

%build
# - _GNU_SOURCE is required for "ucred" from <bits/socket.h> via <sys/socket.h>
# - Use classical non-SELinux permission schema once SELinux Reference Policy is
#   including unicornscan support directly, maybe with Fedora 13 and/or RHEL 6
# - MySQL support is only available in ./configure as inside broken and disabled
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
%configure --localstatedir=%{_localstatedir}/lib --with-pgsql --with-listen-user=%{name}
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install

# Remove the static library files
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/modules/*.a

# Correct permissions from 755 to 644
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/*

%pre
getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name}
getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "Unicornscan User" %{name}
exit 0

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README README.database README.security THANKS
%doc TODO UDP_PAYLOADS_NEEDED docs/Unicornscan-Getting_Started.pdf
%doc src/output_modules/database/sql/pgsql_schema.sql src/parse/example_confs
%dir %{_sysconfdir}/%{name}
%config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/modules.conf
%config(noreplace) %{_sysconfdir}/%{name}/oui.txt
%config(noreplace) %{_sysconfdir}/%{name}/payloads.conf
%config(noreplace) %{_sysconfdir}/%{name}/ports.txt
%config(noreplace) %{_sysconfdir}/%{name}/unicorn.conf
%{_bindir}/fantaip
%{_bindir}/unibrow
%{_bindir}/unicfgtst
%{_bindir}/%{name}
%{_bindir}/us
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/modules
# *.la files are referenced by the shared objects and required
%{_libdir}/%{name}/modules/httpexp.la
%{_libdir}/%{name}/modules/httpexp.so
%{_libdir}/%{name}/modules/http.la
%{_libdir}/%{name}/modules/http.so
%{_libdir}/%{name}/modules/ntalk.la
%{_libdir}/%{name}/modules/ntalk.so
%{_libdir}/%{name}/modules/osdetect.la
%{_libdir}/%{name}/modules/osdetect.so
%{_libdir}/%{name}/modules/pgsqldb.la
%{_libdir}/%{name}/modules/pgsqldb.so
%{_libdir}/%{name}/modules/rdns.la
%{_libdir}/%{name}/modules/rdns.so
%{_libdir}/%{name}/modules/sip.la
%{_libdir}/%{name}/modules/sip.so
%{_libdir}/%{name}/modules/upnp.la
%{_libdir}/%{name}/modules/upnp.so
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/unilisten
%{_libexecdir}/%{name}/unisend
%{_mandir}/man1/%{name}.1*
%dir %{_localstatedir}/lib/%{name}

%changelog
* Tue Nov 17 2009 Robert Scheck <robert at fedoraproject.org> 0.4.7-1
- Upgrade to 0.4.7
- Initial spec file for Fedora and Red Hat Enterprise Linux (spec
  file is based on a try by Robert E. Lee and Manuel Wolfshant)


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/unicornscan/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	6 Dec 2009 23:27:24 -0000	1.1
+++ .cvsignore	8 Dec 2009 08:18:48 -0000	1.2
@@ -0,0 +1 @@
+unicornscan-0.4.7-2.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/unicornscan/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	6 Dec 2009 23:27:25 -0000	1.1
+++ sources	8 Dec 2009 08:18:48 -0000	1.2
@@ -0,0 +1 @@
+4c5f272eb38c333c0094c32317edf758  unicornscan-0.4.7-2.tar.bz2




More information about the scm-commits mailing list