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: 11.0.2 -> 11.1.0; mitmproxy-linux: init at 0.11.4 #373425

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MisileLab
Copy link
Contributor

@MisileLab MisileLab commented Jan 13, 2025

https://github.com/mitmproxy/mitmproxy/blob/v11.1.0/CHANGELOG.md

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@MisileLab
Copy link
Contributor Author

I don't know why mitmproxy pulling old version of mitmproxy

Checking runtime dependencies for mitmproxy-11.1.0-py3-none-any.whl
  - mitmproxy-rs<0.12,>=0.11.2 not satisfied by version 0.10.7

@MisileLab MisileLab marked this pull request as draft January 13, 2025 12:57
@MisileLab
Copy link
Contributor Author

@SuperSandro2000 mitmproxy seperated linux part to mitmproxy-linux like mitmproxy-macos, I want to hear your opinion.

  1. delete mitmproxy-rs and add mitmproxy-linux
  2. only add mitmproxy-linux (not delete mitmproxy-rs)

@SuperSandro2000
Copy link
Member

If mitmproxy-rs is unused in tree then we don't need it and should delete it.

@MisileLab MisileLab changed the title mitmproxy: 11.0.2 -> 11.1.0; mitmproxy-rs: 0.10.7 -> 0.11.4 mitmproxy: 11.0.2 -> 11.1.0; mitmproxy-linux: init at 0.11.4 Jan 13, 2025
@MisileLab
Copy link
Contributor Author

mitmproxy-linux requires rust-src, how can I add it?

full log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ivygxbmksxdm6chlzkva2m7qqmxvi9fp-source
source root is source
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/wireguard-test-client/wireguard_echo_test_server.py
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Executing cargoSetupPostPatchHook
Validating consistency between /build/source/Cargo.lock and /build/mitmproxy-linux-0.11.4-vendor/Cargo.lock
Finished cargoSetupPostPatchHook
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing maturinBuildHook
/build/source/mitmproxy-linux /build/source
maturinBuildHook flags: --jobs=16 --offline --target x86_64-unknown-linux-gnu --manylinux off --strip --release --out /build/source/dist
🍹 Building a mixed python/rust project
🐍 Found CPython 3.12 at /nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3
📡 Using build options bindings from pyproject.toml
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling libc v0.2.169
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.5
   Compiling stable_deref_trait v1.2.0
   Compiling typenum v1.17.0
   Compiling serde v1.0.217
   Compiling autocfg v1.4.0
   Compiling rustversion v1.0.19
   Compiling aya-ebpf-cty v0.2.2
   Compiling memchr v2.7.4
   Compiling semver v1.0.24
   Compiling aya-ebpf-bindings v0.1.1
   Compiling litemap v0.7.4
   Compiling writeable v0.5.5
   Compiling crc32fast v1.4.2
   Compiling pin-project-lite v0.2.15
   Compiling byteorder v1.5.0
   Compiling smallvec v1.13.2
   Compiling subtle v2.6.1
   Compiling bytes v1.9.0
   Compiling either v1.13.0
   Compiling log v0.4.22
   Compiling allocator-api2 v0.2.21
   Compiling equivalent v1.0.1
   Compiling simd-adler32 v0.3.7
   Compiling generic-array v0.14.7
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling thiserror v2.0.9
   Compiling icu_locid_transform_data v1.5.0
   Compiling once_cell v1.20.2
   Compiling foldhash v0.1.4
   Compiling object v0.36.7
   Compiling icu_properties_data v1.5.0
   Compiling adler2 v2.0.0
   Compiling crossbeam-utils v0.8.21
   Compiling rustix v0.38.42
   Compiling thiserror v1.0.69
   Compiling miniz_oxide v0.8.2
   Compiling cpufeatures v0.2.16
   Compiling linux-raw-sys v0.4.14
   Compiling bitflags v2.6.0
   Compiling utf8_iter v1.0.4
   Compiling icu_normalizer_data v1.5.0
   Compiling bitflags v1.3.2
   Compiling hashbrown v0.15.2
   Compiling write16 v1.0.0
   Compiling futures-core v0.3.31
   Compiling utf16_iter v1.0.5
   Compiling quote v1.0.38
   Compiling lock_api v0.4.12
   Compiling slab v0.4.9
   Compiling aya-ebpf v0.1.1
   Compiling parking_lot_core v0.9.10
   Compiling futures-sink v0.3.31
   Compiling syn v2.0.94
   Compiling shlex v1.3.0
   Compiling env_home v0.1.0
   Compiling tracing-core v0.1.33
   Compiling core-error v0.0.0
   Compiling cc v1.2.6
   Compiling rayon-core v1.12.1
   Compiling heapless v0.8.0
   Compiling anyhow v1.0.95
   Compiling scopeguard v1.2.0
   Compiling camino v1.1.9
   Compiling percent-encoding v2.3.1
   Compiling crossbeam-epoch v0.9.18
   Compiling serde_json v1.0.134
   Compiling cfg_aliases v0.2.1
   Compiling nix v0.29.0
   Compiling form_urlencoded v1.2.1
   Compiling indexmap v2.7.0
   Compiling flate2 v1.0.35
   Compiling crossbeam-deque v0.8.6
   Compiling aho-corasick v1.1.3
   Compiling num-traits v0.2.19
   Compiling hash32 v0.3.1
   Compiling futures-task v0.3.31
   Compiling tinyvec_macros v0.1.1
   Compiling match_cfg v0.1.0
   Compiling regex-syntax v0.8.5
   Compiling opaque-debug v0.3.1
   Compiling smoltcp v0.12.0
   Compiling heck v0.5.0
   Compiling itoa v1.0.14
   Compiling ryu v1.0.18
   Compiling inout v0.1.3
   Compiling block-buffer v0.10.4
   Compiling gimli v0.31.1
   Compiling pin-utils v0.1.0
   Compiling getrandom v0.2.15
   Compiling socket2 v0.5.8
   Compiling signal-hook-registry v1.4.2
   Compiling mio v1.0.3
   Compiling hostname v0.3.1
   Compiling rand_core v0.6.4
   Compiling parking_lot v0.12.3
   Compiling tinyvec v1.8.1
   Compiling crypto-common v0.1.6
   Compiling universal-hash v0.5.1
   Compiling digest v0.10.7
   Compiling poly1305 v0.8.0
   Compiling aead v0.5.2
   Compiling futures-channel v0.3.31
   Compiling ring v0.17.8
   Compiling which v7.0.1
   Compiling fdeflate v0.3.7
   Compiling itertools v0.13.0
   Compiling weezl v0.1.8
   Compiling untrusted v0.9.0
   Compiling regex-automata v0.4.9
   Compiling quick-error v1.2.3
   Compiling data-encoding v2.6.0
   Compiling mitmproxy-linux-ebpf v0.11.4 (/build/source/mitmproxy-linux-ebpf)
   Compiling ipnet v2.10.1
   Compiling managed v0.8.0
   Compiling jpeg-decoder v0.3.1
   Compiling futures-io v0.3.31
   Compiling ip_network v0.4.1
   Compiling utf8parse v0.2.2
   Compiling rustc-demangle v0.1.24
   Compiling linked-hash-map v0.5.6
   Compiling spin v0.9.8
   Compiling ip_network_table-deps-treebitmap v0.5.0
   Compiling lru-cache v0.1.2
   Compiling anstyle-parse v0.2.6
   Compiling ip_network_table v0.2.0
   Compiling tiff v0.9.1
   Compiling rayon v1.10.0
   Compiling png v0.17.16
   Compiling addr2line v0.24.2
   Compiling resolv-conf v0.7.0
   Compiling hmac v0.12.1
   Compiling blake2 v0.10.6
   Compiling synstructure v0.13.1
   Compiling nix v0.25.1
   Compiling anstyle v1.0.10
   Compiling anstyle-query v1.1.2
   Compiling is_terminal_polyfill v1.70.1
   Compiling hex v0.4.3
   Compiling fastrand v2.3.0
   Compiling internet-checksum v0.2.1
   Compiling byteorder-lite v0.1.0
   Compiling regex v1.11.1
   Compiling colorchoice v1.0.3
   Compiling bytemuck v1.21.0
   Compiling base64 v0.13.1
   Compiling assert_matches v1.5.0
   Compiling tempfile v3.15.0
   Compiling anstream v0.6.18
   Compiling humantime v2.1.0
   Compiling env_filter v0.1.3
   Compiling lru_time_cache v0.11.11
   Compiling image v0.25.5
   Compiling pretty-hex v0.4.1
   Compiling const-sha1 v0.3.0
   Compiling env_logger v0.11.6
   Compiling sysinfo v0.33.1
   Compiling zerofrom-derive v0.1.5
   Compiling serde_derive v1.0.217
   Compiling yoke-derive v0.7.5
   Compiling zerovec-derive v0.10.3
   Compiling displaydoc v0.2.5
   Compiling num_enum_derive v0.7.3
   Compiling icu_provider_macros v1.5.0
   Compiling tokio-macros v2.4.0
   Compiling zeroize_derive v1.4.2
   Compiling aya-ebpf-macros v0.1.1
   Compiling thiserror-impl v2.0.9
   Compiling zerocopy-derive v0.7.35
   Compiling tokio v1.42.0
   Compiling zeroize v1.8.1
   Compiling thiserror-impl v1.0.69
   Compiling num_enum v0.7.3
   Compiling tracing-attributes v0.1.28
   Compiling aya-log-common v0.1.15
   Compiling cipher v0.4.4
   Compiling aya-log-parser v0.1.13
   Compiling aya-log-ebpf-macros v0.1.0
   Compiling curve25519-dalek-derive v0.1.1
   Compiling futures-macro v0.3.31
   Compiling zerofrom v0.1.5
   Compiling zerocopy v0.7.35
   Compiling yoke v0.7.5
   Compiling zerovec v0.10.4
   Compiling aya-log-ebpf v0.1.1
   Compiling mitmproxy-linux-ebpf-common v0.11.4 (/build/source/mitmproxy-linux-ebpf-common)
   Compiling chacha20 v0.9.1
   Compiling enum-as-inner v0.6.1
   Compiling async-trait v0.1.83
   Compiling chacha20poly1305 v0.10.1
   Compiling backtrace v0.3.74
   Compiling prost-derive v0.13.4
   Compiling ppv-lite86 v0.2.20
   Compiling futures-util v0.3.31
   Compiling aya-obj v0.2.1
   Compiling tracing v0.1.41
   Compiling rand_chacha v0.3.1
   Compiling tinystr v0.7.6
   Compiling icu_collections v1.5.0
   Compiling rand v0.8.5
   Compiling icu_locid v1.5.0
   Compiling internet-packet v0.2.3
   Compiling icu_provider v1.5.0
   Compiling prost v0.13.4
   Compiling icu_locid_transform v1.5.0
   Compiling icu_properties v1.5.1
   Compiling tokio-util v0.7.13
   Compiling aya v0.13.1
   Compiling cargo-platform v0.1.9
   Compiling rustc_version v0.4.1
   Compiling icu_normalizer v1.5.0
   Compiling curve25519-dalek v4.1.3
   Compiling cargo_metadata v0.19.1
   Compiling idna_adapter v1.2.0
   Compiling idna v1.0.3
   Compiling aya-log v0.2.1
   Compiling url v2.5.4
   Compiling x25519-dalek v2.0.1
   Compiling hickory-proto v0.24.2
   Compiling mitmproxy-linux v0.11.4 (/build/source/mitmproxy-linux)
The following warnings were emitted during compilation:

warning: [email protected]: error: "/nix/store/m7kpqhpwk1cjxg4nr02j3ypgyxi4vyr5-rustc-1.83.0/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:
warning: [email protected]:         rustup component add rust-src

error: failed to run custom build command for `mitmproxy-linux v0.11.4 (/build/source/mitmproxy-linux)`

Caused by:
  process didn't exit successfully: `/build/source/target/release/build/mitmproxy-linux-710200a1aef499b7/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=/build/source/mitmproxy-linux-ebpf
  cargo:warning=error: "/nix/store/m7kpqhpwk1cjxg4nr02j3ypgyxi4vyr5-rustc-1.83.0/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:
  cargo:warning=        rustup component add rust-src

  --- stderr
  thread 'main' panicked at mitmproxy-linux/build.rs:135:5:
  assertion `left == right` failed: cd "/build/source/mitmproxy-linux-ebpf" && env -u RUSTC -u RUSTC_WORKSPACE_WRAPPER -u RUSTUP_TOOLCHAIN CARGO_CFG_BPF_TARGET_ARCH="x86_64" "cargo" "build" "-Z" "build-std=core" "--bins" "--message-format=json" "--release" "--target" "bpfel-unknown-none" "--target-dir" "/build/source/target/x86_64-unknown-linux-gnu/release/build/mitmproxy-linux-c39012555da2e620/out/mitmproxy-linux-ebpf" failed: ExitStatus(unix_wait_status(25856))
    left: Some(101)
   right: Some(0)
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3" PYTHON_SYS_EXECUTABLE="/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3" "cargo" "rustc" "--jobs" "16" "--target" "x86_64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--offline" "--manifest-path" "/build/source/mitmproxy-linux/Cargo.toml" "--release" "--bin" "mitmproxy-linux-redirector" "--" "-C" "strip=symbols"`

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

pkgs/top-level/python-aliases.nix Show resolved Hide resolved
@MisileLab
Copy link
Contributor Author

mitmproxy-linux requires rust-src, how can I add it?
full log

ref: https://github.com/mitmproxy/mitmproxy_rs/blob/79dbbf7e080574b7bb8b92766232f7e1b6e1d0a3/mitmproxy-linux/build.rs#L52-L62

@@ -370,7 +370,8 @@ mapAliases ({
mir_eval = mir-eval; # added 2024-01-07
mistune_0_8 = throw "mistune_0_8 was removed because it was outdated and insecure"; # added 2022-08-12
mistune_2_0 = mistune; # added 2022-08-12
mitmproxy-wireguard = throw "mitmproxy-wireguard has been removed because it was replaced by upstream with mitmproxy-rs"; # added 2023-11-06
mitmproxy = throw "mitmproxy has been removed because it was replaced by mitmproxy-linux and mitmproxy-macos"; # added 2025-01-16
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
mitmproxy = throw "mitmproxy has been removed because it was replaced by mitmproxy-linux and mitmproxy-macos"; # added 2025-01-16
mitmproxy-rs = throw "mitmproxy-rs has been removed because it was replaced by mitmproxy-linux and mitmproxy-macos"; # added 2025-01-16

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 15, 2025

mitmproxy-linux requires rust-src, how can I add it?

I don't see an env how to point it to that. Also so far I couldn't figure out which step exactly wants the src but the source will be in rustPlatform.rustLibSrc

@SuperSandro2000
Copy link
Member

I think aya-ebpf might be causing the rust nightly dependency. https://github.com/aya-rs/aya not sure what to do here.

@MisileLab
Copy link
Contributor Author

maybe we can fetch from https://pypi.org/project/mitmproxy-linux like mitmproxy-macos

@MisileLab
Copy link
Contributor Author

mitmproxy-linux requires rust-src, how can I add it?

I don't see an env how to point it to that. Also so far I couldn't figure out which step exactly wants the src but the source will be in rustPlatform.rustLibSrc

I looked rust doc and it says -Z build-std needs nightly version of rustc, rust-src and cargo.

@SuperSandro2000
Copy link
Member

I tried patching that out earlier but we should try it again more aggressively. If that doesn't work we just fetch it from nine source if possible

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.

2 participants