diff --git a/.libpcap.metadata b/.libpcap.metadata new file mode 100644 index 0000000..5352b56 --- /dev/null +++ b/.libpcap.metadata @@ -0,0 +1 @@ +6573ecf2ec4d4382321ef83aaea59c55e5e8e9ab SOURCES/libpcap-1.5.0-20131108git459712e.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/libpcap-man.patch b/SOURCES/libpcap-man.patch new file mode 100644 index 0000000..e37afbc --- /dev/null +++ b/SOURCES/libpcap-man.patch @@ -0,0 +1,12 @@ +diff -up libpcap/pcap.3pcap.in.man libpcap/pcap.3pcap.in +--- libpcap/pcap.3pcap.in.man 2009-07-03 06:01:12.000000000 +0200 ++++ libpcap/pcap.3pcap.in 2009-07-03 15:00:12.000000000 +0200 +@@ -363,7 +363,7 @@ use an + script or some other configuration script to check whether the libpcap + 1.0 APIs are available and use them only if they are. + .SH SEE ALSO +-autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), ++autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8), + usermod(1M) + .SH AUTHORS + The original authors of libpcap are: diff --git a/SOURCES/libpcap-multilib.patch b/SOURCES/libpcap-multilib.patch new file mode 100644 index 0000000..e359736 --- /dev/null +++ b/SOURCES/libpcap-multilib.patch @@ -0,0 +1,69 @@ +diff -up libpcap-1.3.0/pcap-config.in.multilib libpcap-1.3.0/pcap-config.in +--- libpcap-1.3.0/pcap-config.in.multilib 2012-03-29 14:57:32.000000000 +0200 ++++ libpcap-1.3.0/pcap-config.in 2013-03-26 09:56:16.293324264 +0100 +@@ -7,7 +7,6 @@ + prefix="@prefix@" + exec_prefix="@exec_prefix@" + includedir="@includedir@" +-libdir="@libdir@" + V_RPATH_OPT="@V_RPATH_OPT@" + LIBS="@LIBS@" + +@@ -36,16 +35,6 @@ do + esac + shift + done +-if [ "$V_RPATH_OPT" != "" ] +-then +- # +- # If libdir isn't /usr/lib, add it to the run-time linker path. +- # +- if [ "$libdir" != "/usr/lib" ] +- then +- RPATH=$V_RPATH_OPT$libdir +- fi +-fi + if [ "$static" = 1 ] + then + # +@@ -54,16 +43,16 @@ then + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir -lpcap $LIBS" ++ echo "-lpcap @LIBS@" + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $LIBS" ++ echo "@LIBS@" + elif [ "$show_cflags" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_libs" = 1 ] + then +- echo "-L$libdir -lpcap $LIBS" ++ echo "-lpcap @LIBS@" + elif [ "$show_additional_libs" = 1 ] + then + echo "$LIBS" +@@ -75,15 +64,15 @@ else + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $RPATH -lpcap" ++ echo "-lpcap" + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_cflags" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_libs" = 1 ] + then +- echo "-L$libdir $RPATH -lpcap" ++ echo "-lpcap" + fi + fi diff --git a/SOURCES/libpcap-s390.patch b/SOURCES/libpcap-s390.patch new file mode 100644 index 0000000..ee7c003 --- /dev/null +++ b/SOURCES/libpcap-s390.patch @@ -0,0 +1,14 @@ +diff -up libpcap-1.5.0/pcap-linux.c.s390 libpcap-1.5.0/pcap-linux.c +--- libpcap-1.5.0/pcap-linux.c.s390 2013-11-08 08:05:02.608387300 +0100 ++++ libpcap-1.5.0/pcap-linux.c 2013-11-08 08:08:49.597405024 +0100 +@@ -3181,6 +3181,10 @@ activate_new(pcap_t *handle) + handle->linktype = DLT_LINUX_SLL; + } + ++ /* Hack to make things work on s390 ctc interfaces */ ++ if (strncmp("ctc", device, 3) == 0) ++ handle->linktype = DLT_EN10MB; ++ + handlep->ifindex = iface_get_id(sock_fd, device, + handle->errbuf); + if (handlep->ifindex == -1) { diff --git a/SPECS/libpcap.spec b/SPECS/libpcap.spec new file mode 100644 index 0000000..63f7bc9 --- /dev/null +++ b/SPECS/libpcap.spec @@ -0,0 +1,174 @@ +Name: libpcap +Epoch: 14 +Version: 1.5.0 +Release: 1.20131108git459712e%{?dist} +Summary: A system-independent interface for user-level packet capture +Group: Development/Libraries +License: BSD with advertising +URL: http://www.tcpdump.org +BuildRequires: glibc-kernheaders >= 2.2.0 bison flex bluez-libs-devel + +Source: libpcap-1.5.0-20131108git459712e.tar.gz +Patch1: libpcap-man.patch +Patch2: libpcap-multilib.patch +Patch3: libpcap-s390.patch + +%description +Libpcap provides a portable framework for low-level network +monitoring. Libpcap can provide network statistics collection, +security monitoring and network debugging. Since almost every system +vendor provides a different interface for packet capture, the libpcap +authors created this system-independent API to ease in porting and to +alleviate the need for several system-dependent packet capture modules +in each application. + +Install libpcap if you need to do low-level network traffic monitoring +on your network. + +%package devel +Summary: Libraries and header files for the libpcap library +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description devel +Libpcap provides a portable framework for low-level network +monitoring. Libpcap can provide network statistics collection, +security monitoring and network debugging. Since almost every system +vendor provides a different interface for packet capture, the libpcap +authors created this system-independent API to ease in porting and to +alleviate the need for several system-dependent packet capture modules +in each application. + +This package provides the libraries, include files, and other +resources needed for developing libpcap applications. + +%prep +%setup -q + +%patch1 -p1 -b .man +%patch2 -p1 -b .multilib +%patch3 -p1 -b .s390 + +#sparc needs -fPIC +%ifarch %{sparc} +sed -i -e 's|-fpic|-fPIC|g' configure +%endif + +%build +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +%configure +make %{?_smp_mflags} + +%install +make DESTDIR=$RPM_BUILD_ROOT install +rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc LICENSE README CHANGES CREDITS +%{_libdir}/libpcap.so.* +%{_mandir}/man7/pcap*.7* + +%files devel +%defattr(-,root,root) +%{_bindir}/pcap-config +%{_includedir}/pcap*.h +%{_includedir}/pcap +%{_libdir}/libpcap.so +%{_mandir}/man1/pcap-config.1* +%{_mandir}/man3/pcap*.3* +%{_mandir}/man5/pcap*.5* + +%changelog +* Fri Nov 08 2013 Michal Sekletar - 14:1.5.0-1.20131108git459712e +- update to snapshot 20131108git459712e (#1026856) + +* Thu Jun 06 2013 Michal Sekletar - 14:1.4.0-1 +- update to 1.4.0 + +* Tue Mar 26 2013 Michal Sekletar - 14:1.3.0-4 +- remove unused variable from pcap-config to prevent multilib conflicts +- specfile cleanup + +* Thu Feb 14 2013 Fedora Release Engineering - 14:1.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 14:1.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 13 2012 Michal Sekletar 14:1.3.0-1 +- Update to 1.3.0 + +* Thu Jan 05 2012 Jan Synáček 14:1.2.1-2 +- Rebuilt for GCC 4.7 + +* Tue Jan 03 2012 Jan Synáček 14:1.2.1-1 +- Update to 1.2.1 +- Drop unnecessary -fragment patch + +* Fri Dec 02 2011 Michal Sekletar 14:1.2.0-1 +- update to 1.2.0 + +* Tue Sep 06 2011 Michal Sekletar 14:1.1.1-4 +- fix capture of fragmented ipv6 packets + +* Fri Apr 22 2011 Miroslav Lichvar 14:1.1.1-3 +- ignore /sys/net/dev files on ENODEV (#693943) +- drop ppp patch +- compile with -fno-strict-aliasing + +* Tue Feb 08 2011 Fedora Release Engineering - 14:1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Apr 06 2010 Miroslav Lichvar 14:1.1.1-1 +- update to 1.1.1 + +* Wed Dec 16 2009 Miroslav Lichvar 14:1.0.0-5.20091201git117cb5 +- update to snapshot 20091201git117cb5 + +* Sat Oct 17 2009 Dennis Gilmore 14:1.0.0-4.20090922gite154e2 +- use -fPIC on sparc arches + +* Wed Sep 23 2009 Miroslav Lichvar 14:1.0.0-3.20090922gite154e2 +- update to snapshot 20090922gite154e2 +- drop old soname + +* Fri Jul 24 2009 Fedora Release Engineering - 14:1.0.0-2.20090716git6de2de +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 22 2009 Miroslav Lichvar 14:1.0.0-1.20090716git6de2de +- update to 1.0.0, git snapshot 20090716git6de2de + +* Wed Feb 25 2009 Fedora Release Engineering - 14:0.9.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Jun 27 2008 Miroslav Lichvar 14:0.9.8-3 +- use CFLAGS when linking (#445682) + +* Tue Feb 19 2008 Fedora Release Engineering - 14:0.9.8-2 +- Autorebuild for GCC 4.3 + +* Wed Oct 24 2007 Miroslav Lichvar 14:0.9.8-1 +- update to 0.9.8 + +* Wed Aug 22 2007 Miroslav Lichvar 14:0.9.7-3 +- update license tag + +* Wed Jul 25 2007 Jesse Keating - 14:0.9.7-2 +- Rebuild for RH #249435 + +* Tue Jul 24 2007 Miroslav Lichvar 14:0.9.7-1 +- update to 0.9.7 + +* Tue Jun 19 2007 Miroslav Lichvar 14:0.9.6-1 +- update to 0.9.6 + +* Tue Nov 28 2006 Miroslav Lichvar 14:0.9.5-1 +- split from tcpdump package (#193657) +- update to 0.9.5 +- don't package static library +- maintain soname