pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-mitmproxy_rs: Double-check smoltcp patch



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Tue Jan 2 19:28:50 2024 +0100
Changeset:	7b8656f9b7bfa74158a05ba14fa4558b365ef91d

Modified Files:
	py-mitmproxy_rs/distinfo
	py-mitmproxy_rs/patches/patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs

Log Message:
py-mitmproxy_rs: Double-check smoltcp patch

Review all bits based on their actual definition and add a reference to
upstream PR.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7b8656f9b7bfa74158a05ba14fa4558b365ef91d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-mitmproxy_rs/distinfo                           |  2 +-
 ...tch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs | 24 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs:
diff --git a/py-mitmproxy_rs/distinfo b/py-mitmproxy_rs/distinfo
index 85534552f8..6936686c6d 100644
--- a/py-mitmproxy_rs/distinfo
+++ b/py-mitmproxy_rs/distinfo
@@ -853,4 +853,4 @@ BLAKE2s (zune-inflate-0.2.54.crate) = c10d8be1628f8a0b68a2d35a2cc3ab5ca45461685e
 SHA512 (zune-inflate-0.2.54.crate) = 0de30f310121c1fed42612b7bcb50631d699195a77c7ce4094729f502e63d1ae38034d6054d95b6825e7e9a2afb7bb614ff123e12736163fee04a46ef1dc56bd
 Size (zune-inflate-0.2.54.crate) = 37973 bytes
 SHA1 (patch-.._vendor_boringtun-0.6.0_src_sleepyinstant_unix.rs) = 58ba251ef419e80d8e6735cf3c91637e050d35a9
-SHA1 (patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs) = 5d090396368272eb67f518b558cbcd6ed25e9033
+SHA1 (patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs) = 54023412c6318c0874969902fa942008f9514e55
diff --git a/py-mitmproxy_rs/patches/patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs b/py-mitmproxy_rs/patches/patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs
index 8c2ccc4fb8..86f8bd87d3 100644
--- a/py-mitmproxy_rs/patches/patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs
+++ b/py-mitmproxy_rs/patches/patch-.._vendor_smoltcp-0.10.0_src_phy_sys_bpf.rs
@@ -2,11 +2,11 @@ $NetBSD$
 
 Add support for NetBSD.
 
-XXX: likely incorrect, double-check!
+Shared upstream via <https://github.com/smoltcp-rs/smoltcp/pull/883>.
 
---- ../vendor/smoltcp-0.10.0/src/phy/sys/bpf.rs.orig	2024-01-01 23:09:33.311396101 +0000
+--- ../vendor/smoltcp-0.10.0/src/phy/sys/bpf.rs.orig	2006-07-24 01:21:28.000000000 +0000
 +++ ../vendor/smoltcp-0.10.0/src/phy/sys/bpf.rs
-@@ -9,24 +9,24 @@ use crate::phy::Medium;
+@@ -9,16 +9,16 @@ use crate::phy::Medium;
  use crate::wire::ETHERNET_HEADER_LEN;
  
  /// set interface
@@ -22,12 +22,12 @@ XXX: likely incorrect, double-check!
 +#[cfg(any(target_os = "macos", target_os = "netbsd", target_os = "openbsd"))]
  const BIOCIMMEDIATE: libc::c_ulong = 0x80044270;
  /// set bpf_hdr struct size
- #[cfg(target_os = "macos")]
+-#[cfg(target_os = "macos")]
++#[cfg(any(target_os = "macos", target_os = "netbsd"))]
  const SIZEOF_BPF_HDR: usize = 18;
  /// set bpf_hdr struct size
--#[cfg(target_os = "openbsd")]
-+#[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
- const SIZEOF_BPF_HDR: usize = 24;
+ #[cfg(target_os = "openbsd")]
+@@ -26,7 +26,7 @@ const SIZEOF_BPF_HDR: usize = 24;
  /// The actual header length may be larger than the bpf_hdr struct due to aligning
  /// see https://github.com/openbsd/src/blob/37ecb4d066e5566411cc16b362d3960c93b1d0be/sys/net/bpf.c#L1649
  /// and https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/bsd/net/bpf.c#L3580
@@ -36,12 +36,12 @@ XXX: likely incorrect, double-check!
  const BPF_HDRLEN: usize = (((SIZEOF_BPF_HDR + ETHERNET_HEADER_LEN) + mem::align_of::<u32>() - 1)
      & !(mem::align_of::<u32>() - 1))
      - ETHERNET_HEADER_LEN;
-@@ -170,7 +170,7 @@ mod test {
-     }
+@@ -164,7 +164,7 @@ mod test {
+     use super::*;
  
      #[test]
--    #[cfg(target_os = "openbsd")]
-+    #[cfgany((target_os = "netbsd", target_os = "openbsd"))]
+-    #[cfg(target_os = "macos")]
++    #[cfg(any(target_os = "macos", target_os = "netbsd"))]
      fn test_aligned_bpf_hdr_len() {
-         assert_eq!(26, BPF_HDRLEN);
+         assert_eq!(18, BPF_HDRLEN);
      }


Home | Main Index | Thread Index | Old Index