Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > e1e1d0ac4b0e115199f6afe855a5fb96 > files > 13

nc-1.10-19mdk.src.rpm

%define name 	nc
%define version 1.10
%define release 19mdk

Summary: 	Reads and writes data across network connections using TCP or UDP
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
URL:		http://www.atstake.com/research/tools/network_utilities/
Source0:	http://www.atstake.com/research/tools/network_utilities/nc110.tar.bz2
Source1: 	%{name}.1.bz2
Patch0: 	%{name}-%{version}-arm.patch.bz2
Patch1: 	%{name}-%{version}-resolv.patch.bz2
Patch2:		%{name}-%{version}-posix_setjmp.patch.bz2
Patch3:		%{name}-%{version}-nopunt.patch.bz2
Patch4:		%{name}-%{version}-nosleep.patch.bz2
Patch5:		%{name}-%{version}-single_verbose.patch.bz2
Patch6:		%{name}-%{version}-use_getservbyport.patch.bz2
Patch7:		%{name}-%{version}-read_overflow.patch.bz2
Patch8:		%{name}-%{version}-inet_aton.patch.bz2
Patch9:		%{name}-%{version}-udp_broadcast.patch.bz2
Patch10:	%{name}-%{version}-quit.patch.bz2
License: 	GPL
Group: 		Networking/Other
BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
Provides:	netcat = %{version}

%description
The nc package contains Netcat (the program is now netcat), a simple
utility for reading and writing data across network connections, using
the TCP or UDP protocols. Netcat is intended to be a reliable back-end
tool which can be used directly or easily driven by other programs and
scripts.  Netcat is also a feature-rich network debugging and exploration
tool, since it can create many different connections and has many
built-in capabilities.

You may want to install the netcat package if you are administering a
network and you'd like to use its debugging and network exploration
capabilities.

netcat has been compiled with -DGAPING_SECURITY_HOLE turned on. I do
not believe this is as much of a security hole as the author makes it
out to be, *if* you know what you're doing (but then, if you didn't,
you'd still be using telnet ;-)). Since the spawned program will run
as whatever user started netcat, don't use -e as root. You have been
warned, so if some cracker breaks into your system due to your own
stupidity, don't blame me.

A symlink to the netcat binary called 'netcat' has been installed.
However, the canonical name is still 'nc'. If you use netcat on other
systems, it will probably only be installed as 'nc', so keep this in
mind when writing scripts.

%prep
%setup -c -n nc -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1

%build
#Make linux ids supported, but it makes a static binary. 
%make CFLAGS="$RPM_OPT_FLAGS" \
      DFLAGS='-DLINUX -DTELNET -DGAPING_SECURITY_HOLE' generic

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir} $RPM_BUILD_ROOT
%{__mkdir} $RPM_BUILD_ROOT%{_prefix}
%{__mkdir} $RPM_BUILD_ROOT%{_bindir}
%{__mkdir} -p $RPM_BUILD_ROOT%{_mandir}/man1

%{__cp} %{name} $RPM_BUILD_ROOT%{_bindir}
(cd $RPM_BUILD_ROOT%{_bindir}; ln -s %{name} netcat)

%{__install} -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README Changelog
%doc scripts
%{_bindir}/%{name}
%{_bindir}/netcat
%{_mandir}/man1/%{name}*


%changelog
* Fri Jun 17 2005 Olivier Blin <oblin@mandriva.com> 1.10-19mdk
- fix Summary ended with dot

* Fri Apr 02 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.10-18mdk
- fix url (#9355)

* Fri Aug 08 2003 Ben Reser <ben@reser.org> 1.10-17mdk
- Use debians patch to fix arm issue (which is better because
  it actually fixes the problem as opposed to just working 
  around it).  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=56390
  Applied as patch 0 
- Applied posix_setjmp patch to fix multiple timeouts with glibc from 
  Debian.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97583
  Applied as patch 2
- Applied no_punt patch from debian to get rid of the annoying punt
  output. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=45669
  Applied as patch 3
- Applied no_sleep patch from debian to avoid the 1 second delay
  on a interupt. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=45669
  Applied as patch 4
- Applied single_verbose patch to show "connection refused" messages
  without -v.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=65413
  Applied as patch 5
- Applied us_getservbyport patch to lookup services even if resolving
  hostnames with DNS is disabled. 
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=98902
  Applied as patch 6
- Applied read_overflow patch from debian/openbsd to avoid buffer overflow
  issue. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=145801
  Applied as patch 7
- Applied UDP broadcast patch from NetBSD and inet_aton from debian
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=108182
  Applied as patche 8 & 9
- Applied quit patch from debian to allow netcat to quit on EOF.
  Also closes Mandrake bug 4529
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=45675
  Applied as patch 10
- Symlink %{_bindir}/netcat to %{_bindir}/nc
- Provide netcat for easier urpmi'ing
- Update man page to match debians.
- Remove %%ifarch for arm (not necessary with debians better patch)
- Built with GAPING_SECURITY_HOLE, since I agree with Debian it isn't
  a GAPING security hole added warning to description about it (borrowed
  from Debian)
- Added -DLINUX to the build to enable some of the debian patches
- Added -DTELNET to build to enable -t option.
- Macroized
- rm build root in %%install

* Tue Jun  3 2003 Damien Chaumette <dchaumette@mandrakesoft.com> 1.10-16mdk
- rebuild (fix rpmReadSignature failed)

* Wed Jul 11 2001 Yves Duret <yduret@mandrakesoft.com> 1.10-15mdk
- updated source and url tag
- rebuild

* Mon Apr  9 2001 Yves Duret <yduret@mandrakesoft.com>  1.10-14mdk
- renamed back nc to nc :)
- added the man page
- added %%ifarch arm (yes arm!)

* Tue Mar 27 2001 Yves Duret <yduret@mandrakesoft.com> 1.10-13mdk
- rename nc to netcat (conflict with nedit) : patch2

* Tue Mar 27 2001 Yves Duret <yduret@mandrakesoft.com> 1.10-12mdk
- fixed header for new glibc (res_init()) : patch1

* Wed Dec 20 2000 Yves Duret <yduret@mandrakesoft.com> 1.10-11mdk
- macros

* Fri Aug 04 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.10-10mdk
- rebuild with macros

* Tue Apr 11 2000 Maurizio De Cecco <maurizio@mandrakesoft.com>
- Fixed Distribution name

* Mon Apr 10 2000 Maurizio De Cecco  <maurizio@mandrakesoft.com>
- Fixed error in Group 

* Thu Mar 16 2000 Maurizio De Cecco  <maurizio@mandrakesoft.com>
- Adapted to the new Group structure

* Wed Nov 10 1999 Jerome Martin <jerome@mandrakesoft.com>
- Build for new environment

* Wed May 05 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com>
- Mandrake adaptions

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 4)

* Tue Jan 12 1999 Cristian Gafton <gafton@redhat.com>
- make it build on the arm

* Tue Dec 29 1998 Cristian Gafton <gafton@redhat.com>
- build for 6.0