Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mitmproxy: 9.0.1 -> 10.1.1 #264207

Merged
merged 1 commit into from
Nov 5, 2023
Merged

mitmproxy: 9.0.1 -> 10.1.1 #264207

merged 1 commit into from
Nov 5, 2023

Conversation

K900
Copy link
Contributor

@K900 K900 commented Oct 29, 2023

Also add the new mitmproxy-rs dependency, which seemingly replaces mitmproxy-wireguard.

Description of changes

Got nerdsniped into it on Matrix. @fabaff I hope you don't mind being listed as maintainer for the Rust bits.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Also add the new mitmproxy-rs dependency, which seemingly replaces mitmproxy-wireguard.
@fabaff
Copy link
Member

fabaff commented Nov 3, 2023

Result of nixpkgs-review pr 264207 run on x86_64-linux 1

12 packages built:
  • mitmproxy (python311Packages.mitmproxy)
  • mitmproxy.dist (python311Packages.mitmproxy.dist)
  • mitmproxy2swagger
  • mitmproxy2swagger.dist
  • python310Packages.mitmproxy
  • python310Packages.mitmproxy-rs
  • python310Packages.mitmproxy-rs.dist
  • python310Packages.mitmproxy.dist
  • python311Packages.mitmproxy-rs
  • python311Packages.mitmproxy-rs.dist
  • wapiti
  • wapiti.dist

@fabaff
Copy link
Member

fabaff commented Nov 3, 2023

I see an issue.

...ew/pr-264207-1]$ ./results/mitmproxy/bin/mitmproxy 
Traceback (most recent call last):
  File "/nix/store/lhi8cp78nipwmirpmng0xj2ac3hbllch-python3.11-mitmproxy-10.1.1/bin/.mitmproxy-wrapped", line 6, in <module>
    from mitmproxy.tools.main import mitmproxy
  File "/nix/store/sf9g8ylrdzzgpkdk8bmzb7qynfpg1wa3-python3.10-mitmproxy-10.1.1/lib/python3.10/site-packages/mitmproxy/tools/main.py", line 15, in <module>
    from mitmproxy import master
  File "/nix/store/sf9g8ylrdzzgpkdk8bmzb7qynfpg1wa3-python3.10-mitmproxy-10.1.1/lib/python3.10/site-packages/mitmproxy/master.py", line 8, in <module>
    from mitmproxy import eventsequence
  File "/nix/store/sf9g8ylrdzzgpkdk8bmzb7qynfpg1wa3-python3.10-mitmproxy-10.1.1/lib/python3.10/site-packages/mitmproxy/eventsequence.py", line 8, in <module>
    from mitmproxy import http
  File "/nix/store/sf9g8ylrdzzgpkdk8bmzb7qynfpg1wa3-python3.10-mitmproxy-10.1.1/lib/python3.10/site-packages/mitmproxy/http.py", line 24, in <module>
    from mitmproxy.net import encoding
  File "/nix/store/sf9g8ylrdzzgpkdk8bmzb7qynfpg1wa3-python3.10-mitmproxy-10.1.1/lib/python3.10/site-packages/mitmproxy/net/encoding.py", line 12, in <module>
    import zstandard as zstd
  File "/nix/store/bsiv3nsbg8p70pz20gnydqbjf8w4gj6n-python3.10-zstandard-0.21.0/lib/python3.10/site-packages/zstandard/__init__.py", line 39, in <module>
    from .backend_c import *  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'zstandard.backend_c'

@K900
Copy link
Contributor Author

K900 commented Nov 3, 2023

Pretty sure this is nixpkgs-review messing with the PYTHONPATH. I wonder if we should just make buildPythonApplication drop outside PYTHONPATH unconditionally...

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine for me 👍

@K900
Copy link
Contributor Author

K900 commented Nov 5, 2023

I'm just going to merge this before it bitrots.

@K900 K900 merged commit 105676c into NixOS:master Nov 5, 2023
30 checks passed
}:

buildPythonPackage rec {
pname = "mitmproxy-rs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go really strongly by the contributing guide then this should have been it's own commit but it's alright for me if I am honest :)

changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
platforms = platforms.all;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We default to unix here by buildPythonPackage which is more correct than all

@@ -6856,6 +6856,8 @@ self: super: with self; {

mitmproxy = callPackage ../development/python-modules/mitmproxy { };

mitmproxy-rs = callPackage ../development/python-modules/mitmproxy-rs { };

mitmproxy-wireguard = callPackage ../development/python-modules/mitmproxy-wireguard { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping that in another PR. To quote the PR:

https://github.com/mitmproxy/mitmproxy/pull/5909

mitmproxy-wireguard is already shipping in 9.0, but we will add more non-WireGuard stuff written in Rust.

@SuperSandro2000
Copy link
Member

#265841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants