From f5c6b72128da1f9d0295e7b8dfee4f37b6e786c0 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 19:10:21 +0000 Subject: [PATCH] import UBI libpcap-1.10.4-7.el10 --- .gitignore | 3 +- .libpcap.metadata | 1 - ...p-and-tcpslice-have-manpages-in-man8.patch | 19 +-- ...ap-config-mitigate-multilib-conflict.patch | 53 +++---- ...ently-ctc-interfaces-on-s390-has-eth.patch | 2 +- SOURCES/0004-invalid-IPv4-address.patch | 66 --------- SPECS/libpcap.spec => libpcap.spec | 132 ++++++++++++++---- sources | 2 + 8 files changed, 134 insertions(+), 144 deletions(-) delete mode 100644 .libpcap.metadata rename SOURCES/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch => 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch (59%) rename SOURCES/0002-pcap-config-mitigate-multilib-conflict.patch => 0002-pcap-config-mitigate-multilib-conflict.patch (67%) rename SOURCES/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch => 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch (94%) delete mode 100644 SOURCES/0004-invalid-IPv4-address.patch rename SPECS/libpcap.spec => libpcap.spec (66%) create mode 100644 sources diff --git a/.gitignore b/.gitignore index 7392f9b..47506d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SOURCES/libpcap-1.9.1.tar.gz +libpcap-1.10.4.tar.gz +libpcap-1.10.4.tar.gz.sig diff --git a/.libpcap.metadata b/.libpcap.metadata deleted file mode 100644 index ac2b3df..0000000 --- a/.libpcap.metadata +++ /dev/null @@ -1 +0,0 @@ -04d6e619defad5bb17af15f6d2304e79b649786c SOURCES/libpcap-1.9.1.tar.gz diff --git a/SOURCES/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch b/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch similarity index 59% rename from SOURCES/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch rename to 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch index 888bb9a..7b5e87c 100644 --- a/SOURCES/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch +++ b/0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch @@ -10,18 +10,19 @@ Both should be run only by root, hence manpages for them should be located in 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcap.3pcap.in b/pcap.3pcap.in -index f5a7e0c..f220e68 100644 +index 492c227..46a2a4b 100644 --- a/pcap.3pcap.in +++ b/pcap.3pcap.in -@@ -882,7 +882,7 @@ use an - script or some other configuration script to check whether the libpcap +@@ -1025,8 +1025,8 @@ 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(@MAN_ADMIN_COMMANDS@) - .SH AUTHORS - The original authors of libpcap are: + .BR autoconf (1), +-.BR tcpdump (1), +-.BR tcpslice (1), ++.BR tcpdump (8), ++.BR tcpslice (8), + .BR \%pcap-filter (@MAN_MISC_INFO@), + .BR pfconfig (8), + .BR usermod (@MAN_ADMIN_COMMANDS@) -- 1.8.3.1 - diff --git a/SOURCES/0002-pcap-config-mitigate-multilib-conflict.patch b/0002-pcap-config-mitigate-multilib-conflict.patch similarity index 67% rename from SOURCES/0002-pcap-config-mitigate-multilib-conflict.patch rename to 0002-pcap-config-mitigate-multilib-conflict.patch index 8b6b420..08a80e8 100644 --- a/SOURCES/0002-pcap-config-mitigate-multilib-conflict.patch +++ b/0002-pcap-config-mitigate-multilib-conflict.patch @@ -12,45 +12,30 @@ path anyway. --- pcap-config.in | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) +-- +1.8.3.1 diff --git a/pcap-config.in b/pcap-config.in -index 206be3b..75f2c9f 100644 +index 6039ef3..72297bf 100644 --- a/pcap-config.in +++ b/pcap-config.in -@@ -7,7 +7,6 @@ +@@ -11,7 +11,6 @@ prefix="@prefix@" exec_prefix="@exec_prefix@" includedir="@includedir@" -libdir="@libdir@" - V_RPATH_OPT="@V_RPATH_OPT@" LIBS="@LIBS@" - PACKAGE_NAME="@PACKAGE_NAME@" -@@ -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 + LIBS_STATIC="@LIBS_STATIC@" + VERSION="@PACKAGE_VERSION@" +@@ -90,16 +89,16 @@ then # if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] then -- echo "-I$includedir -L$libdir -lpcap $LIBS" +- echo "-I$includedir $LPATH -l@PACKAGE_NAME@ $LIBS_STATIC" + echo "-lpcap @LIBS@" elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] then -- echo "-I$includedir -L$libdir $LIBS" +- echo "-I$includedir $LPATH $LIBS_STATIC" + echo "@LIBS@" elif [ "$show_cflags" = 1 ] then @@ -58,20 +43,20 @@ index 206be3b..75f2c9f 100644 + echo "" elif [ "$show_libs" = 1 ] then -- echo "-L$libdir -lpcap $LIBS" +- echo "$LPATH -l@PACKAGE_NAME@ $LIBS_STATIC" + echo "-lpcap @LIBS@" elif [ "$show_additional_libs" = 1 ] then - echo "$LIBS" -@@ -75,15 +64,15 @@ else + echo "$LIBS_STATIC" +@@ -117,16 +116,16 @@ then # if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] then -- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME" +- echo "-I$includedir $LPATH -l@PACKAGE_NAME@ $LIBS" + echo "-lpcap" elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] then -- echo "-I$includedir" +- echo "-I$includedir $LPATH $LIBS" + echo "" elif [ "$show_cflags" = 1 ] then @@ -79,10 +64,8 @@ index 206be3b..75f2c9f 100644 + echo "" elif [ "$show_libs" = 1 ] then -- echo "-L$libdir $RPATH -l$PACKAGE_NAME" +- echo "$LPATH -l@PACKAGE_NAME@ $LIBS" + echo "-lpcap" - fi - fi --- -1.8.3.1 - + elif [ "$show_additional_libs" = 1 ] + then + echo "$LIBS" diff --git a/SOURCES/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch b/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch similarity index 94% rename from SOURCES/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch rename to 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch index c2c9ca2..7f7d372 100644 --- a/SOURCES/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch +++ b/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch @@ -13,7 +13,7 @@ index 900ebbc..58292c3 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -3197,6 +3197,10 @@ activate_new(pcap_t *handle) - handle->linktype = DLT_LINUX_SLL; + } } + /* Hack to make things work on s390 ctc interfaces */ diff --git a/SOURCES/0004-invalid-IPv4-address.patch b/SOURCES/0004-invalid-IPv4-address.patch deleted file mode 100644 index 2712b1a..0000000 --- a/SOURCES/0004-invalid-IPv4-address.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 907070918d5e81a515315b395f334e52589fe0fb Mon Sep 17 00:00:00 2001 -From: Guy Harris -Date: Wed, 18 Dec 2019 15:06:53 -0800 -Subject: [PATCH] Check for invalid IPv4 addresses. - -This should fix GitHub issue #893. ---- - gencode.c | 9 ++++++++- - nametoaddr.c | 9 ++++++++- - 2 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/gencode.c b/gencode.c -index bdc35e646..040a55315 100644 ---- a/gencode.c -+++ b/gencode.c -@@ -6947,11 +6947,15 @@ gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2, - return (NULL); - - nlen = __pcap_atoin(s1, &n); -+ if (nlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s1); - /* Promote short ipaddr */ - n <<= 32 - nlen; - - if (s2 != NULL) { - mlen = __pcap_atoin(s2, &m); -+ if (mlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s2); - /* Promote short ipaddr */ - m <<= 32 - mlen; - if ((n & ~m) != 0) -@@ -7009,8 +7013,11 @@ gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q) - vlen = __pcap_atodn(s, &v); - if (vlen == 0) - bpf_error(cstate, "malformed decnet address '%s'", s); -- } else -+ } else { - vlen = __pcap_atoin(s, &v); -+ if (vlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s); -+ } - - switch (q.addr) { - -diff --git a/nametoaddr.c b/nametoaddr.c -index 53070a285..13bf4c683 100644 ---- a/nametoaddr.c -+++ b/nametoaddr.c -@@ -674,8 +674,15 @@ __pcap_atoin(const char *s, bpf_u_int32 *addr) - len = 0; - for (;;) { - n = 0; -- while (*s && *s != '.') -+ while (*s && *s != '.') { -+ if (n > 25) { -+ /* The result will be > 255 */ -+ return -1; -+ } - n = n * 10 + *s++ - '0'; -+ } -+ if (n > 255) -+ return -1; - *addr <<= 8; - *addr |= n & 0xff; - len += 8; - diff --git a/SPECS/libpcap.spec b/libpcap.spec similarity index 66% rename from SPECS/libpcap.spec rename to libpcap.spec index f97d56a..54957da 100644 --- a/SPECS/libpcap.spec +++ b/libpcap.spec @@ -1,24 +1,29 @@ Name: libpcap Epoch: 14 -Version: 1.9.1 -Release: 5%{?dist} +Version: 1.10.4 +Release: 7%{?dist} Summary: A system-independent interface for user-level packet capture -License: BSD with advertising -URL: http://www.tcpdump.org +License: ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC +URL: https://www.tcpdump.org/ +BuildRequires: make BuildRequires: bison BuildRequires: bluez-libs-devel BuildRequires: flex +BuildRequires: gcc BuildRequires: git BuildRequires: glibc-kernheaders >= 2.2.0 +#rdma-core-devel not available on arm +%ifnarch %{arm} BuildRequires: rdma-core-devel +%endif -Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz +Source0: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz +Source1: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch -Patch0004: 0004-invalid-IPv4-address.patch %description Libpcap provides a portable framework for low-level network @@ -34,7 +39,7 @@ on your network. %package devel Summary: Libraries and header files for the libpcap library -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description devel Libpcap provides a portable framework for low-level network @@ -58,24 +63,26 @@ sed -i -e 's|-fpic|-fPIC|g' configure %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +%ifarch %{arm} +%configure +%else %configure --enable-rdma -make %{?_smp_mflags} +%endif +%make_build %install -make DESTDIR=$RPM_BUILD_ROOT install +%make_install rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a %ldconfig_scriptlets %files -%defattr(-,root,root) %license LICENSE %doc README.md CHANGES CREDITS %{_libdir}/libpcap.so.* %{_mandir}/man7/pcap*.7* %files devel -%defattr(-,root,root) %{_bindir}/pcap-config %{_includedir}/pcap*.h %{_includedir}/pcap @@ -86,36 +93,99 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a %{_mandir}/man5/pcap*.5* %changelog -* Mon Jan 18 2021 Michal Ruprich - 14:1.9.1-5 -- Resolves: #1743650 - Enable inbox support for sniffing offloaded RDMA traffic with tcpdump +* Tue Oct 29 2024 Troy Dawson - 14:1.10.4-7 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 -* Fri May 22 2020 Michal Ruprich - 14:1.9.1-4 -- Related: #1806422 - Building libpcap to side-tag for tcpdump +* Tue Jul 02 2024 FrantiĊĦek Hrdina - 14:1.10.4-6 +- Fix broken gating -* Fri May 22 2020 Michal Ruprich - 14:1.9.1-3 -- Related: #1743650 - reverting rdma changes due to unresolved dependency loop +* Mon Jun 24 2024 Troy Dawson - 14:1.10.4-5 +- Bump release for June 2024 mass rebuild -* Wed May 06 2020 Michal Ruprich - 14:1.9.1-2 -- Related: #1806422 - Building libpcap to side-tag for tcpdump +* Thu Jan 25 2024 Fedora Release Engineering - 14:1.10.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Thu Apr 09 2020 Michal Ruprich - 14:1.9.1-1 -- Resolves: #1806422 - rebase libpcap to version 1.9.1 -- Resolves: #1743650 - [RFE] enable inbox support for sniffing offloaded (RDMA) traffic with tcpdump -- Resolves: #1785330 - Invalid IPv4 addresses are accepted without reporting even a warning -- Resolves: #1792208 - Resource exhaustion while PHB header length validation +* Sun Jan 21 2024 Fedora Release Engineering - 14:1.10.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Wed Jul 03 2019 Michal Ruprich - 14:1.9.0-3 -- Resolves: #1708397 - Move libpcap.pc to libpcap-devel -- Removing obsolete group tag +* Thu Jul 20 2023 Fedora Release Engineering - 14:1.10.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Wed May 22 2019 Michal Ruprich - 14:1.9.0-2 -- Resolves: #1680929 - libpcap changes blocked until gating tests are added +* Wed Apr 12 2023 Michal Ruprich - 14:1.10.4-1 +- New version 1.10.4 + +* Tue Mar 21 2023 Michal Ruprich - 14:1.10.3-3 +- SPDX migration + +* Thu Jan 19 2023 Fedora Release Engineering - 14:1.10.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 17 2023 Michal Ruprich - 14:1.10.3-1 +- New version 1.10.3 + +* Tue Jan 03 2023 Michal Ruprich - 14:1.10.2-1 +- New version 1.10.2 + +* Thu Jul 21 2022 Fedora Release Engineering - 14:1.10.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 14:1.10.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 14:1.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 10 2021 Michal Ruprich - 14:1.10.1-1 +- New version 1.10.1 + +* Thu Feb 11 2021 Michal Ruprich - 14:1.10.0-1 +- New version 1.10.0 + +* Tue Jan 26 2021 Fedora Release Engineering - 14:1.9.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Oct 12 2020 Michal Ruprich - 14:1.9.1-6 +- Using make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Jul 28 2020 Fedora Release Engineering - 14:1.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri May 15 2020 Michal Ruprich - 14:1.9.1-4 +- Enabling rdma support in libpcap + +* Mon Feb 24 2020 Michal Ruprich - 14:1.9.1-3 +- libpcap should print an error on wrong IPv4 address + +* Wed Jan 29 2020 Fedora Release Engineering - 14:1.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Oct 11 2019 Michal Ruprich - 14:1.9.1-1 +- New version 1.9.1 +- Fix for CVE-2018-16301, CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165 + +* Thu Jul 25 2019 Fedora Release Engineering - 14:1.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 14:1.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 13 2018 Peter Robinson 14:1.9.0-2 +- pkgconfig file belong in devel package +- drop obsolete group in spec * Wed Aug 01 2018 Michal Ruprich - 14:1.9.0-1 - New version 1.9.0 -* Thu Jun 07 2018 Michal Ruprich - 14:1.8.1-9 -- Adding support for AF_VSOCK (rhbz#1587833) +* Fri Jul 13 2018 Fedora Release Engineering - 14:1.8.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 06 2018 Michal Ruprich - 14:1.8.1-10 +- Adding support for AF_VSOCK + +* Tue Feb 20 2018 Martin Sehnoutka - 14:1.8.1-9 +- Add gcc to BuildRequires * Wed Feb 07 2018 Fedora Release Engineering - 14:1.8.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources new file mode 100644 index 0000000..b49ec4f --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (libpcap-1.10.4.tar.gz) = 1f6d6ddd07dae7c557054cb246437ecdaf39d579592a5a6bdf1144eea6cb5a779ac4ca647cfed11ec1b0bb18efc63b845444e497070bacefaaed19a5787ae5e1 +SHA512 (libpcap-1.10.4.tar.gz.sig) = 34aa401c2e162d708c61b78b445af2fe4ddc0e57de9124b5cc3a05679ffbc3834088160f83892d827e25c65b33313fe71aa73c2de09935d387252ab315ca5ee1