From 356cb92cdbb61ded5467358fcb280125f87e9bf9 Mon Sep 17 00:00:00 2001 From: zyppe <210hcl@gmail.com> Date: Wed, 28 Feb 2024 21:56:49 +0800 Subject: [PATCH] Initialize for libpcap --- .gitignore | 1 + .libpcap.metadata | 1 + baselibs.conf | 4 + libpcap-1.0.0-ppp.patch | 12 + libpcap-1.0.0-s390.patch | 25 ++ libpcap-1.10.1.tar.gz.sig | Bin 0 -> 442 bytes libpcap.changes | 574 ++++++++++++++++++++++++++++++++++++++ libpcap.keyring | 31 ++ libpcap.spec | 115 ++++++++ 9 files changed, 763 insertions(+) create mode 100644 .gitignore create mode 100644 .libpcap.metadata create mode 100644 baselibs.conf create mode 100644 libpcap-1.0.0-ppp.patch create mode 100644 libpcap-1.0.0-s390.patch create mode 100644 libpcap-1.10.1.tar.gz.sig create mode 100644 libpcap.changes create mode 100644 libpcap.keyring create mode 100644 libpcap.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3da7989 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +libpcap-1.10.1.tar.gz diff --git a/.libpcap.metadata b/.libpcap.metadata new file mode 100644 index 0000000..f0342db --- /dev/null +++ b/.libpcap.metadata @@ -0,0 +1 @@ +3b20fb144e42fb1a89eb2f725647c5fa277a8e7734287b62db4da4ffad54d976 libpcap-1.10.1.tar.gz diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..48d3c64 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,4 @@ +libpcap1 +libpcap-devel + requires -libpcap- + requires "libpcap1- = " diff --git a/libpcap-1.0.0-ppp.patch b/libpcap-1.0.0-ppp.patch new file mode 100644 index 0000000..c8f4b9e --- /dev/null +++ b/libpcap-1.0.0-ppp.patch @@ -0,0 +1,12 @@ +Index: gencode.c +=================================================================== +--- gencode.c.orig ++++ gencode.c +@@ -8204,6 +8204,7 @@ gen_inbound(compiler_state_t *cstate, in + */ + switch (cstate->linktype) { + case DLT_SLIP: ++ case DLT_PPP: + b0 = gen_relation_internal(cstate, BPF_JEQ, + gen_load_internal(cstate, Q_LINK, gen_loadi_internal(cstate, 0), 1), + gen_loadi_internal(cstate, 0), diff --git a/libpcap-1.0.0-s390.patch b/libpcap-1.0.0-s390.patch new file mode 100644 index 0000000..5806cbe --- /dev/null +++ b/libpcap-1.0.0-s390.patch @@ -0,0 +1,25 @@ +From b9fa92532328daad84766753422e8a21fd474e6f Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 29 Sep 2014 08:37:25 +0200 +Subject: [PATCH 3/4] pcap-linux: apparently ctc interfaces on s390 has + ethernet DLT + +--- + pcap-linux.c | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: libpcap-1.10.0/pcap-linux.c +=================================================================== +--- libpcap-1.10.0.orig/pcap-linux.c ++++ libpcap-1.10.0/pcap-linux.c +@@ -2461,6 +2461,10 @@ activate_pf_packet(pcap_t *handle, int i + } + } + ++ /* 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/libpcap-1.10.1.tar.gz.sig b/libpcap-1.10.1.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..cf8492957caaf0ae4b6728e22a1e8606fca30223 GIT binary patch literal 442 zcmV;r0Y(0a0k;GI0SW*e79j*57HU^QtGVDLnvF2viQe(q!Cegn0${-trvM5G5a5a4 z@!7#$4UVD=AgX5b>}S*b`vZ3*@fDzf?&BkKe>zBBliYq|AL!%As9mzqUPU!qU~UWo zVix;8kxGoVgE}L^1o-=_x^haC>H|$_4}8=5%(@0yi-d1Fd_8(J4rhx~S$D$otgR7Y zr^2J<6%I6HVmb~Uf-;a_kVYu?VX*ZW9t91Tas3R$dw?BvY}XY||0IM^o7M zL`c#AcZ?C1YtOy7_`km>z2= 2.64 +- package (newly added) pkgconfig file +- Check-only-VID-in-VLAN-test-issue-461.patch: + fix "vlan " test to check only VID, not complete TCI +- drop disable-remote.diff (superseded by upstream changes) +* Thu Mar 1 2018 jengelh@inai.de +- Fix SRPM group +* Tue Sep 12 2017 asterios.dramis@gmail.com +- Added a patch (disable-remote.diff) to fix applications to FTBFS + if they define HAVE_REMOTE (deb#843384). Patch taken from Debian. +* Thu Mar 23 2017 jengelh@inai.de +- Restore section setting $pic +* Wed Mar 1 2017 tchvatal@suse.com +- Do not put conditions about the provides for < 11.0 +* Wed Feb 15 2017 pmonrealgonzalez@suse.com +- Dropped patches not required after review + * libpcap-1.0.0-pcap-bpf.patch + * libpcap-1.5.2-filter-fix.patch +- Reference of the pull request for the rest of the patches + * https://github.com/the-tcpdump-group/libpcap/issues/196 +- Changed libpcap-1.0.0-s390.patch to the git formatted one +* Thu Feb 2 2017 pmonrealgonzalez@suse.com +- Formatted the specs file using spec-cleaner. +* Thu Feb 2 2017 pmonrealgonzalez@suse.com +- Allow bluetooth monitoring support unconditionally. +* Thu Feb 2 2017 pmonrealgonzalez@suse.com +- update to 1.8.1 + * Clean up the name-to-DLT mapping table. + * Add some newer DLT_ values: + IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS + * Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue + [#493]. + * Filter out duplicate looped back CAN frames. + * Fix the handling of loopback filters for IPv6 packets. + * Add a link-layer header type for RDS (IEC 62106) groups. + * On Linux, handle all CAN captures with pcap-linux.c, in cooked mode. + * Removes the need for the "host-endian" link-layer header type. + * Compile with '-Wused-but-marked-unused' in devel mode if supported + * Have separate DLTs for big-endian and host-endian SocketCAN headers. + * Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)! + * Properly check for sock_recv() errors. + * Re-impose some of Winsock's limitations on sock_recv(). + * Replace sprintf() with pcap_snprintf(). + * Fix signature of pcap_stats_ex_remote(). + * Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag. + * Clean up {DAG, Septel, Myricom SNF}-only builds. + * pcap_create_interface() needs the interface name on Linux. + * Clean up hardware time stamp support: the "any" device does not support any time stamp types. + * Recognize 802.1ad nested VLAN tag in vlan filter. +- dropped libpcap-ocloexec.patch, never upstreamed. +- refreshed libpcap-1.0.0-ppp.patch +* Sun Apr 17 2016 crrodriguez@opensuse.org +- libpcap-no-old-socket.patch: never fallback to the obsolete + SOCK_PACKET (kernel < 2.2) interface, this still happens + for example, when you update the kernel, run iftop and + the old kernel af_packet module wasn't loaded, program fails + and the kernel prints "iftop uses obsolete (PF_INET,SOCK_PACKET)" +* Sun Jun 21 2015 crrodriguez@opensuse.org +- remove dependency on libusb-devel, only libusb-1.0 is used for + build. +- split a -devel-static subpackage that contains the static + libraries and all the extra dependencies which are not needed + for dynamic linking. +* Sun Apr 26 2015 astieger@suse.com +- libpcap 1.7.3: + * work around a Linux bonding driver bug. +* Fri Mar 13 2015 vcizek@suse.com +- update to 1.7.2 + * Support for filtering Geneve encapsulated packets. + * Fix handling of zones for BPF on Solaris + * new DLT for ZWAVE + * clarifications for read timeouts. + * added bpf_filter1() with extensions + * some fixes to compilation without stdint.h + * EBUSY can now be returned by SNFv3 code. +- refreshed libpcap-ocloexec.patch +* Fri Nov 14 2014 dimstar@opensuse.org +- No longer perform gpg validation; osc source_validator does it + implicit: + + Drop gpg-offline BuildRequires. + + No longer execute gpg_verify. +* Wed Sep 3 2014 andreas.stieger@gmx.de +- libpcap 1.6.2: + * Don't crash on filters testing a non-existent link-layer type + field. + * Fix sending in non-blocking mode on Linux with memory-mapped + capture. + * Fix timestamps when reading pcap-ng files on big-endian + machines. +* Sun Aug 17 2014 andreas.stieger@gmx.de +- libpcap 1.6.1: + * some fixes for the any device + * changes for how --enable-XXX works +- includes changes from 1.6.0: + * fixes for byte order issues with NFLOG captures + * Handle using cooked mode for DLT_NETLINK in activate_new(). + removing libpcap-netlink.patch, upstream, [bnc#863823] + * on platforms where you can not capture on down interfaces, do + not list them, but: do list interfaces which are down, if you + can capture on them! +- libpcap does not build with bluez 5.21, disable bluetooth + ( bluetooth/mgmt.h moved to kernel ) +* Thu Feb 13 2014 vcizek@suse.com +- added support for netlink (bnc#863823) + * libpcap-netlink.patch +* Thu Feb 13 2014 vcizek@suse.com +- update to 1.5.3 + * Don't let packets that don't match the current filter get to the + application when TPACKET_V3 is used. (GitHub issue #331) + * Fix handling of pcap_loop()/pcap_dispatch() with a packet count + of 0 on some platforms (including Linux with TPACKET_V3). + (GitHub issue #333) + * Work around TPACKET_V3 deficiency that causes packets to be lost + when a timeout of 0 is specified. (GitHub issue #335) + * Man page formatting fixes. +- refreshed libpcap-1.5.2-filter-fix.patch +* Sat Dec 14 2013 andreas.stieger@gmx.de +- update to 1.5.2 + Version 1.5.0 revised for non-code related edits Version, + 1.5.1 revised for for interop against Linux 3.1.0 + * TPACKET_V3 support added for Linux + * Point users to the the-tcpdump-group repository on GitHub + rather than the mcr repository + * Checks added for malloc()/realloc()/etc. failures + * Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + * Use "ln -s" to link man pages by default + * Added pcap_open_dead_with_tstamp_precision API interface. + * Many changes to autoconf to deal better with non-GCC compilers + added many new DLT types +- require pkg-config for devel library support detection +- add support for D-Bus capture +- modified patches for upstream changes: + * libpcap-ocloexec.patch + * libpcap-1.0.0-filter-fix.patch to libpcap-1.5.2-filter-fix.patch +* Fri Sep 13 2013 andreas.stieger@gmx.de +- update to 1.4.0: + * add netfilter/nfqueue interface + * support IPv6 filter expressions when no IPv6 address resolution + availavle + * Fix pcap-config to include -lpthread if canusb support is + present + * Try to fix "pcap_parse not defined" problems when --without-flex + and --without-bison are used when you have Flex and Bison + * Fix some issues with the pcap_loop man page. + * Fix pcap_getnonblock() and pcap_setnonblock() to fill in the + supplied error message buffer + * Fix typo that, it appeared, would cause pcap-libdlpi.c not to + compile (perhaps systems with libdlpi also have BPF and use + that instead) + * Catch attempts to call pcap_compile() on a non-activated pcap_t + * Fix crash on Linux with CAN-USB support without usbfs + * Fix addition of VLAN tags for Linux cooked captures + * Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so + that the driver can report either one if it doesn't support + SIOCETHTOOL + * Add DLT_INFINIBAND and DLT_SCTP + * Describe "proto XXX" and "protochain XXX" in the pcap-filter man + page + * Handle either directories, or symlinks to directories, that + correspond to interfaces in /sys/class/net + * Fix handling of VLAN tag insertion to check, on Linux 3.x + kernels, for VLAN tag valid flag + * Clean up some man pages + * Support libnl3 as well as libnl1 and libnl2 on Linux +- packaging changes: + * build with libnl + * refresh libpcap-ocloexec.patch for upstream changes + * verify source signatures +* Mon Aug 27 2012 crrodriguez@opensuse.org +- BuildRequire libusb-devel for "usb sniffing" +* Mon Aug 27 2012 crrodriguez@opensuse.org +- Added libpcap-ocloexec.patch: + Use O_CLOEXEC in all internal fds so they do not + leak on fork()..execve() +* Fri Jun 15 2012 jslaby@suse.de +- remove some patches + - libpcap-1.0.0-fcode.patch -- not needed, if this emitted a warning, + it was a compiler bug + - libpcap-1.0.0-mac_syntax.patch -- already handled by MAC rule + - libpcap-1.0.0-man.patch -- tcpdump is man 1, not 8 + - libpcap-1.1.1-scanif.patch -- misapplied, this was fixed upstream + already + - libpcap-1.2.1-netfilter-dont-fail-on-EPROTONOSUPPORT.patch +* Thu Jun 14 2012 jslaby@suse.de +- update to 1.3.0 + - Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + - Linux: Don't fail if netfilter isn't enabled in the kernel. + - Add new link-layer type for NFC Forum LLCP. + - Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + - Add LINKTYPE_NG40/DLT_NG40. + - Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + - [PATCH] Fix AIX-3.5 crash with read failure during stress + - AIX fixes. + - Introduce --disable-shared configure option. + - Added initial support for canusb devices. + - Include the pcap(3PCAP) additions as 1.2.1 changes. + - many updates to documentation: pcap.3pcap.in + - Improve 'inbound'/'outbound' capture filters under Linux. + - Note the cleanup of handling of new DLT_/LINKTYPE_ values. + - On Lion, don't build for PPC. + - For mac80211 devices we need to clean up monitor mode on exit. +* Tue Feb 28 2012 jslaby@suse.de +- make it work also on kernels without netfilter (bnc#746356) +* Tue Jan 3 2012 puzel@suse.com +- update to libpcap-1.2.1 + - Support 802.1 QinQ as a form of VLAN in filters. + - Treat "carp" as equivalent to "vrrp" in filters. + - Fix code generated for "ip6 protochain". + - Add some new link-layer header types. + - Support capturing NetFilter log messages on Linux. + - Turn off monitor mode on exit for mac80211 interfaces on Linux. + - Fix problems turning monitor mode on for non-mac80211 interfaces + - on Linux. + - Properly fail if /sys/class/net or /proc/net/dev exist but can't + - be opened. + - Fail if pcap_activate() is called on an already-activated + - pcap_t, and add a test program for that. + - Fix filtering in pcap-ng files. + - Simplify handling of new DLT_/LINKTYPE_ values. + - Expand pcap(3PCAP) man page. +- drop libpcap-fix-calculation-of-frame-size.patch (upstream) +* Fri Sep 16 2011 jengelh@medozas.de +- Add libpcap-devel to baselibs +- Remove redundant tags/sections +* Thu May 19 2011 puzel@novell.com +- add libpcap-fix-calculation-of-frame-size.patch (bnc#694779) +- clean up specfile +* Mon Mar 14 2011 cyliu@novell.com +- fix bug#674278: pcap_findalldevs error with bonding device + libpcap-1.1.1-scanif.patch +* Tue Apr 6 2010 puzel@novell.com +- update to libpcap-1.1.1 + - notable changes : + - Add SocketCAN capture support + - Add Myricom SNF API support + - Update Endace DAG and ERF support + - Support monitor mode on mac80211 devices on Linux + - Fix USB memory-mapped capturing on Linux + - On Linux, scan /sys/class/net for devices if we have it + - Add limited support for reading pcap-ng files + - see /usr/share/doc/packages/libpcap1/CHANGES for + full list of changes +- drop fix-any-interface-handling.patch (fixed upstream) +- drop fix-usb-nic.patch (fixed upstream) +* Tue Jan 26 2010 jengelh@medozas.de +- large PIC model is required on SPARC +* Wed Dec 16 2009 jengelh@medozas.de +- add baselibs.conf as a source +- enable parallel building +* Tue Nov 3 2009 coolo@novell.com +- updated patches to apply with fuzz=0 +* Thu Oct 29 2009 puzel@novell.com +- move pcap-filter and pcap-linktype out from -devel subpackage + (bnc#550372) +* Tue May 26 2009 poeml@suse.de +- don't obsolete an old libpcap (0.9.x) package on openSUSE 11.0 or + older (bnc#507083) +* Thu Mar 19 2009 puzel@suse.cz +- add fix-usb-nic.patch (bnc#455774) +* Fri Feb 20 2009 puzel@suse.cz +- fix-any-interface-handling.patch (bnc#463182) +* Wed Jan 14 2009 prusnak@suse.cz +- updated to 1.0.0 + * Compile with IPv6 support by default + * Compile with large file support on by default + * Add pcap-config script, which deals with -I/-L flags + for compiling + * DLT: Add IPMB + * DLT: Add LAPD + * DLT: Add AX25 (AX.25 w/KISS header) + * DLT: Add JUNIPER_ST + * 802.15.4 support + * Variable length 802.11 header support + * X2E data type support + * SITA ACN Interface support - see README.sita + * Support for zerocopy BPF on platforms that support it + * Better support for dealing with VLAN tagging/stripping on Linux + * Fix dynamic library support on OSX + * Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so + applications can print better diagnostic information + * Return PCAP_ERROR_PERM_DENIED if we don't have permission to open + a device, so applications can tell the user they need to go play + with permissions + * On Linux, ignore ENETDOWN so we can continue to capture packets + if the interface goes down and comes back up again. + * On Linux, support new tpacket frame headers (2.6.27+) + * On Mac OS X, add scripts for changing permissions on /dev/pbf* and + launchd plist + * On Solaris, support 'passive mode' on systems that support it + * Fixes to autoconf and general build environment + * Man page reorganization + cleanup + * Autogenerate VERSION numbers better +- dropped obsoleted shared.patch +* Tue Jan 13 2009 olh@suse.de +- obsolete old -XXbit packages (bnc#437293) +* Mon Sep 15 2008 dmueller@suse.de +- adjust buildrequires +* Thu Sep 4 2008 prusnak@suse.cz +- updated to CVS-20080503 + * support for USB and Bluetooth capture +* Wed Aug 20 2008 prusnak@suse.cz +- renamed libpcap package to libpcap0 +- added ppp.patch and s390.patch (small issues) +* Thu Apr 10 2008 ro@suse.de +- added baselibs.conf file to build xxbit packages + for multilib support +* Tue Jan 8 2008 prusnak@suse.cz +- update to 0.9.8 + * Change build process to put public libpcap headers into pcap subdir + * DLT: Add value for IPMI IPMB packets + * DLT: Add value for u10 Networks boards + * Require for pf definitions - allows reading of pflog + formatted libpcap files on an OS other than where the file was generated +- added pcap-bpf.patch + * add two structs needed for tahi testsuite +* Thu Jul 26 2007 prusnak@suse.cz +- updated to 0.9.7 + * added flags/configuration for cloning bpf device. + * added DLT_MTP2_WITH_PHDR support (PPI) + * introduced support for the DAG ERF type TYPE_COLOR_MC_HDLC_POS + * added basic BPF filtering support for DLT_MTP2_WITH_PHDR + * add support for DLT_JUNIPER_ISM + * allocate DLT_ for 802.15.4 without any header munging + * header for 802.16 MAC Common Part Sublayer plus a radiotap radio header +- branch -devel subpackage +* Thu Jul 12 2007 prusnak@suse.cz +- updated to 0.9.6 + * added Bluetooth support + * added USB capturing support + * added support for the binary USB sniffing interface + * added additional filter operations for 802.11 frame types + * added support for filtering on MTP2 frame types + * added LINKTYPE_ for IEEE 802.15.4, with address fields padded + * added LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS + * added DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer + * added DLT for Bluetooth HCI UART transport layer + * fixed discarding of unread packets when changing filters + * fixed a bug in pcap_open_live() +* Wed May 2 2007 pth@suse.de +- Use correct version for naming the shared library (#270226) +* Thu Mar 29 2007 rguenther@suse.de +- add flex and bison BuildRequires +* Tue Jan 16 2007 prusnak@suse.cz +- implemented socket timeout (socket-timeout.diff) [#234034] +* Wed Jan 3 2007 prusnak@suse.cz +- update to 0.9.5 + * Support for LAPD frames with vISDN + * Support for ERF on channelized T1/E1 cards via DAG API + * Better failure detection on PacketGetAdapterNames() + * Fixes for MPLS packet generation (link layer) + * OP_PACKET now matches the beginning of the packet, instead of beginning+link-layer + * Fix allocation of buffer for list of link-layer types + * Add support for DLT_JUNIPER_VP + * Don't double-count received packets on Linux systems +* Wed Jan 25 2006 mls@suse.de +- converted neededforbuild to BuildRequires +* Mon Jan 9 2006 mjancar@suse.cz +- update to 0.9.4 +* Tue Aug 9 2005 kkeil@suse.de +- Reverse the -fno-strict-aliasing work around +* Sun Aug 7 2005 aj@suse.de +- Compile with -fno-strict-aliasing to work around compiler bug for now. +* Thu Aug 4 2005 ro@suse.de +- do not package all of libdir (debuginfo) +* Tue Aug 2 2005 mjancar@suse.cz +- update to 0.9.3 +* Tue Apr 12 2005 ro@suse.de +- added return value to non-void functions +* Thu Nov 18 2004 ro@suse.de +- fixed file list +* Tue Aug 24 2004 kkeil@suse.de +- add DLT_PPP_WITHDIRECTION from libpcap cvs to handle PPP filters + in a compatible way + Thanks to Hannes Gredler for implementing it +* Wed Aug 4 2004 postadal@suse.cz +- updated to version 0.8.3 +* Mon Feb 9 2004 postadal@suse.cz +- updated to version 0.8.1 + * the include file include/net/bpf.h renamed to include/pcap-bpf +- fixed config (LIBOBJS issue) +* Sat Jan 10 2004 schwab@suse.de +- Use autoreconf. +* Thu Jul 24 2003 postadal@suse.cz +- update to version 0.7.2 + * support frame relay + * support for ARPHRD_RAWHDLC + * support eg (Octane/O2xxx/O3xxx Gigabit) devices + * add new reserved DLT types +* Mon May 20 2002 postadal@suse.de +- security fix (get spurious packets before kernel filter kicks in) +- update to 0.7.1 + * pcap_stats() has been documented as to what its counters mean on + each platform + * Added pcap_findalldevs() call to get list of interfaces in + a MI way +* Wed Mar 13 2002 postadal@suse.cz +- fixed Makefile.in to created shared library +* Thu Jan 10 2002 cihlar@suse.cz +- use %%{_lib} +* Fri Feb 23 2001 cihlar@suse.cz +- update to 0.6.2 - it should handle isdn without patch +* Thu Dec 7 2000 schwab@suse.de +- Compile with -fpic so that it can be included in a shared library. +* Wed Oct 11 2000 smid@suse.cz +- new version 0.5.2 +* Thu Jun 8 2000 cihlar@suse.cz +- Group sorted +* Fri Apr 21 2000 smid@suse.cz +- buildroot added +* Thu Mar 2 2000 uli@suse.de +- moved man page to %%{_mandir} +* Mon Sep 13 1999 bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Thu Sep 9 1999 bs@suse.de +- fixed call of Check at the end of %%install section +* Sun Jul 11 1999 @suse.de +- new package: libpcap + now an extra package, because many network tools use it (so far + it was included in .srpm packages that needed it, like tcpdump) diff --git a/libpcap.keyring b/libpcap.keyring new file mode 100644 index 0000000..a623393 --- /dev/null +++ b/libpcap.keyring @@ -0,0 +1,31 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQGRBFGRD2gBDCDcthM1N9jeWic9tD17LsHwWyh/IelKgFMVFShgHk31YsQUetKn +5hGKlW0WU7+r3dsECiqxgyuqeUKvqiZneqma0GDk1n8ucXLc7oFFLrF7qbvssPPM +831014FlzsN82OZZ1SnNUGacdyNzV5myPybKILWemsLuAJaGU60IkAJkTReiaMFR +pB0QmBiqM5KY2SHAkeja2+UhupBw/lHyAwU/KVhkohmvUTJeUBJaKK2gRY7jJQmf +ouTbIe0nKIqDzMmE9GvFhyQmMJzbxAwTfSxSZq3bMCpsyQtjoi2LGQFoMVkI6g7K +IRNWgCqSTHF238VIdOkLzbwuoZAmS+oacXszIln2jLJsKkbiCCOb/lV+5u5O6/wJ +M4RHxCBnkRgBmMLyXSM9qAo1FU5suPqf01msqvKMsa99lTF6kIWurR/7rw4S2bNl +iaMqHNHliFNfaAE42S8as+Pw5Rhq2SJczWyd8rYw/q1IIZyKLO1oGn6ZRt+EQ7BS +8nlREmT/MDqP0rgrpvRrABEBAAG0PVRoZSBUY3BkdW1wIEdyb3VwIChQYWNrYWdl +IHNpZ25pbmcga2V5KSA8cmVsZWFzZUB0Y3BkdW1wLm9yZz6JAcIEEwECACgFAlGR +D2gCGwMFCRLMAwAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOCJ3vHZwV0N +wPAMH22fmTbjByMSvR/gxDFA26ULgf02qZzqYlRLKB7EDbEjB1Ga6PrLB22Sn/b5 +8fxNw/9zH0EPkorv0YnBhinE51jLmZ99Sk5eGFIMcCkNAOOhadFZGGKarekEPwNB +oDtxCuSuOQ0JVvyn5fLcbA5u3+LBvHvbnUKgCpiXahpq15bZiS1aoVkdXknUQVO+ +bU6Y2lj3m8Q1C6t+J29UvbyixgQhFeTkl25NZkTS6Cqds5F9q3nUBD/7gvQbATBy +A+p+iWLHqt1s4c5UHRzriuLyBbnJgOEI13pNbgFIoKhbCSGQj0uQVZORmzzqs0nh +QXtj+JPOAMd619mHjmhXItgqu2llywQ36tXTEdRoUjJmgMkoqXtZQ8XDVdJ6f/sG +OJDHCctr5aVanWierzePl1PvWPWeC9mnB6Nnxuah+8zQFb4wXUnYO09OX47UgQlu +mE9/lZfY7okIODVrXjqbPVxSBLzCzptBrkeZ3brkrl5oCdYlWsUiQCY0hO6jzMEd +CnxEp1kkn2eJATAEEAECAAYFAlGaR8gACgkQbzNW3/yhb5DWLgigkgtM5wXCQkJz +VyXdCVTfdP9KXEZ1LM1NpRVHbk8lRmgWn4LHb2y1zmH8TDioAyz7GMSFDvqK5kqc +ZPOFi3YZOqLwtcYjAk+jW0ekmx7ao1fIsMjsTvAMVq/EKNRq8IeiKhJSD4KCttFa +qvtD5IfxlgsMoVAdsXF0tyTtC457zWCof3FP7Wbm3MRN3TV4eJInEZhKFgLt4xM6 +dCI4ifizu4aPe/TptNl+MuyYTXmPghkQgoeTB9b2qhklp5ccX+8HYeWrpMuCM4er +YYG/j5tZ5YJ/13HDO7S22Wxp94h0hy7NgZ7DRXP0XGp5NvS1stLMGwPm6wyYsjtL +m+jWKltF1WFO1z8zSpZaC+u1GSe48qpqA40k +=1rmx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/libpcap.spec b/libpcap.spec new file mode 100644 index 0000000..32c7bc2 --- /dev/null +++ b/libpcap.spec @@ -0,0 +1,115 @@ +# +# spec file for package libpcap +# +# Copyright (c) 2022-2023 ZhuningOS +# + + +Name: libpcap +Version: 1.10.1 +Release: 150400.1.7 +Summary: A Library for Network Sniffers +License: BSD-3-Clause +Group: Development/Libraries/C and C++ +URL: https://www.tcpdump.org/ +Source: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz +Source2: baselibs.conf +Source3: https://www.tcpdump.org/tcpdump-workers.asc#/%{name}.keyring +Source4: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig +Patch2: libpcap-1.0.0-ppp.patch +Patch3: libpcap-1.0.0-s390.patch +BuildRequires: autoconf >= 2.64 +BuildRequires: automake +BuildRequires: bison +BuildRequires: bluez-devel +BuildRequires: dbus-1-devel +BuildRequires: flex +BuildRequires: libnl3-devel +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libusb-1.0) + +%description +libpcap is a library used by packet sniffer programs. It provides an +interface for them to capture and analyze packets from network devices. +This package is only needed if you plan to compile or write such a +program yourself. + +%package -n libpcap1 +Summary: A Library for Network Sniffers +Group: System/Libraries +Provides: libpcap = %{version} +Obsoletes: libpcap < %{version} + +%description -n libpcap1 +libpcap is a library used by packet sniffer programs. It provides an +interface for them to capture and analyze packets from network devices. +This package is only needed if you plan to compile or write such a +program yourself. + +%package devel +Summary: A Library for Network Sniffers +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libpcap1 = %{version} + +%description devel +libpcap is a library used by packet sniffer programs. It provides an +interface for them to capture and analyze packets from network devices. +This package is only needed if you plan to compile or write such a +program yourself. + +%package devel-static +Summary: A Library for Network Sniffers +Group: Development/Libraries/C and C++ +Requires: %{name}-devel = %{version} +Requires: bluez-devel +Requires: dbus-1-devel +Requires: libnl3-devel +Requires: pkgconfig(libusb-1.0) + +%description devel-static +libpcap static libraries + +%prep +%setup -q +%patch2 +%patch3 -p1 + +%build +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +autoreconf -fiv +%ifarch %sparc +pic="PIC" +%else +pic="pic" +%endif +export CFLAGS="%{optflags} -f$pic" CXXFLAGS="%{optflags} -f$pic" +%configure \ + --enable-bluetooth=yes \ + --enable-ipv6 +make %{?_smp_mflags} all shared + +%install +mkdir -p %{buildroot}%{_bindir} +make DESTDIR=%{buildroot} install install-shared + +%post -n libpcap1 -p /sbin/ldconfig +%postun -n libpcap1 -p /sbin/ldconfig + +%files -n libpcap1 +%license LICENSE +%doc CHANGES CREDITS README.md doc/README.linux TODO +%{_libdir}/*.so.* +%{_mandir}/man7/* + +%files devel-static +%{_libdir}/*.*a + +%files devel +%{_mandir}/man[1-6]/* +%{_includedir}/* +%{_bindir}/pcap-config +%{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog