commit: 7568fd0c09e6062fdcf080dcfea3314dead1889e Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Feb 1 13:48:40 2026 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Feb 1 13:48:40 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7568fd0c
net-proxy/mitmproxy-linux: Bump to 0.12.9 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> net-proxy/mitmproxy-linux/Manifest | 2 + .../mitmproxy-linux/mitmproxy-linux-0.12.9.ebuild | 118 +++++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/net-proxy/mitmproxy-linux/Manifest b/net-proxy/mitmproxy-linux/Manifest index 729cf5cceb59..62f44c09a825 100644 --- a/net-proxy/mitmproxy-linux/Manifest +++ b/net-proxy/mitmproxy-linux/Manifest @@ -15,7 +15,9 @@ DIST libc-0.2.174.crate 779933 BLAKE2B 20ffcbbcad6961e732521940f0595039dc0576d85 DIST memchr-2.7.5.crate 97603 BLAKE2B ee41ef722d90265064db3ffe22d52eff8f7627ac1ae9b0bad6ca9fa06c1027dca8d67e594e03b03c944dbf85930d2dbf030c5aaed369020ca1a1ba00f153d91a SHA512 2606ee16a7dc02db95dac17cebd2cac9deb2e23d7ea62972cdb19145c06eaf75631347a49c4e6ceeff89fb6e90e992f9bca0a9c955eb5130f89ba2bd865936e1 DIST miniz_oxide-0.8.9.crate 67132 BLAKE2B 1a11c5aeef43ac93635942e0c4f17538150f8307fb280b0d66436e4b6697638f0b1bafbdebb377a5dba14a75f213024201e325747419623e5f7d57060bba4445 SHA512 3f6fd786c5fa5b4abafaf21244dd4830d26688d5b6975522bda595206517f354d92d13fb95235667cbc39c0275371c737164d9c7a58e32e09da86eed2f239242 DIST mitmproxy_linux-0.12.8.tar.gz 1287560 BLAKE2B 62cdd871859586cc043f407b2559badec2214486928dd13d97801eb5b9b222899a55b7a5d6fa65b927bf0814a34cbe285f566c8c0ea70435e9c0a030183fac41 SHA512 0a2ee8abe6c9932a11c68be052eb20213398776808635a1730314b2c1c757e9ce944756c5362c807a9705b237931ac51cf0b815109f1e3b5062d3f618e641377 +DIST mitmproxy_linux-0.12.9.tar.gz 1299779 BLAKE2B 2fe79a859c8e15c21dc7b554dd0087c4f6d268f8fc7c2f4f9790fd6ef2dacae8126a55c666ab04477fb7e9ef1b62a2d814c1ee8ced427b8be89f3b1a59c1b4d2 SHA512 dafe7d2d92088ed05aacb505d22732e6d62d852464225cec712df2d2a9edf20a4cc53ad547e1f4a602396ca9d11b29128f38b7b076bedb905a86cace1e9fb127 DIST mitmproxy_rs-0.12.8-crates.tar.xz 49230272 BLAKE2B 9bd32b59d82a6e1d28701373427600d774caecefc406d4646c601f68ae05c46c1d857b00a4a018f6ab15c864f6984377153b99f306024560195b44ef45d0e75c SHA512 b71360be285f4f81feed8cbd283ed00928e8e09d5fa7ba99ecf3a9c2a7ee4a137ca4a7357579925b4e98080f0fa756bc78a58b92badb19fbc7e8992fc63bef4c +DIST mitmproxy_rs-0.12.9-crates.tar.xz 45242028 BLAKE2B b34979c3a573701a2f6f2f029a1cec05d4bc59013dc94c87a0e2b7d340c6bc8f7b2415d171b944f63a7d881ae87941a1e6fa61265218a3eea46fb7a127ef286d SHA512 ed4d48dd443eb777e5b387d38bf36ec6ee1d51e1c0aa650f0b27f8e34ae13a5c1eabfa766565879a661b2c4d6e458800e668f3a80a693eb9d5527ee0eb52314c DIST object-0.37.1.crate 338929 BLAKE2B b2bc4f27968ec308b8d569e71de449adf5cf545aa2054d65cda03cfa44e3d3b108bd39e1288e1c983d08656b4c50a384c2101f2bf049b7d67d42e60c95160cba SHA512 ca9c7857185b6fb7f81a594d73df10cace40b47d7475f8d4ac0c6be9c3f327dc98a86fd4fc8f70da762eb978a0427ecff1e3c181bd3efeefbf3d2f51615b9745 DIST r-efi-5.3.0.crate 64532 BLAKE2B 54bc882e333f7ba52b6dd6ac92b8a282581c10b47de91a4c4b71b15a27b2df885ab52ae2fcc8a546367ee1ce98300dcaec3c33cbd7393b134383528540bb7d14 SHA512 e748db9729dbddf215d5c37630fa272197dd2921297800209ca7bfcd6ffd8530b598b944d95547ad9723655cafdfb69b1c1fade9ba5f8c2ac5c55ec38258fdad DIST r-efi-alloc-2.1.0.crate 14475 BLAKE2B b316af45913ed4fe3b3efd01f800aaafcad9d1d0d05a8ed3685a85246f458cf65f4da50229322ce059a9eea0d341af41b765ef321be31161ec07c3768d6f88ed SHA512 9213827d81f2809341b9ec101bb6d94dc5d4a0e8b87252a34bf21dc200dcc13d7b20013c7ec87ad0e9c24384f4b4f31b37f4bc2126bb8479db7bb1118ab7acef diff --git a/net-proxy/mitmproxy-linux/mitmproxy-linux-0.12.9.ebuild b/net-proxy/mitmproxy-linux/mitmproxy-linux-0.12.9.ebuild new file mode 100644 index 000000000000..1af7755f2f14 --- /dev/null +++ b/net-proxy/mitmproxy-linux/mitmproxy-linux-0.12.9.ebuild @@ -0,0 +1,118 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Extra crates required at runtime via rustc-build-sysroot crate. +# Note: versions are locked in /usr/lib/rust/*/lib/rustlib/src/rust/library/Cargo.lock. +CRATES=" + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected]+wasi-snapshot-preview1 +" + +# Implied by crates above. +RUST_MIN_VER=1.89.0 +RUST_MAX_VER=1.91.0 + +declare -A GIT_CRATES=( + [boringtun]='https://github.com/cloudflare/boringtun;2f3c85f5c4a601018c10b464b1ca890d9504bf6e;boringtun-%commit%/boringtun' +) + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=maturin +PYTHON_COMPAT=( python3_{12..14} ) +RUST_REQ_USE="llvm_targets_BPF(+),rust-src" + +inherit cargo distutils-r1 pypi + +DESCRIPTION="mitmproxy's Rust bits" +HOMEPAGE=" + https://github.com/mitmproxy/mitmproxy_rs/ + https://pypi.org/project/mitmproxy-rs/ +" +SRC_URI+=" + ${CARGO_CRATE_URIS} + https://github.com/gentoo-crate-dist/mitmproxy_rs/releases/download/v${PV}/mitmproxy_rs-${PV}-crates.tar.xz +" + +LICENSE="MIT" +# Dependent crate licenses +LICENSE+=" + 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD ISC + LGPL-3+ MIT Unicode-3.0 WTFPL-2 ZLIB +" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +BDEPEND=" + dev-util/bpf-linker +" + +src_prepare() { + local PATCHES=( + # aya-ebpf overwrites libc functions with incompatible + # implementations that break everything, and therefore + # can only be used for bpf* targets + # https://github.com/aya-rs/aya/issues/1254 + "${FILESDIR}/${PN}-0.11.5-no-host-aya-ebpf.patch" + ) + + distutils-r1_src_prepare + + # replace upstream crate substitution with our crate substitution, sigh + local bor_dep=$(grep ^boringtun "${ECARGO_HOME}"/config.toml || die) + sed -i -e "/boringtun/s;^.*$;${bor_dep};" Cargo.toml || die + + # this only implicitly builds mitmproxy-linux-ebpf, and is broken + # https://github.com/mitmproxy/mitmproxy/issues/7663 + rm mitmproxy-linux/build.rs || die +} + +src_configure() { + # first, we must build mitmproxy-linux-ebpf for the bpf target + # bpf-linker requires BPF target that is only available in nightly + local -x RUSTC_BOOTSTRAP=1 + # no clue why this needs to be explicit + local -x RUSTFLAGS="-C linker=bpf-linker" + + local cmd=( + "${CARGO}" build + -Z build-std=core + --bins + --release + --target=bpfel-unknown-none + ) + + pushd mitmproxy-linux-ebpf >/dev/null || die + echo "${cmd[*]}" >&2 + "${cmd[@]}" || die "${cmd[*]} failed" + popd >/dev/null || die + + export OUT_DIR="${S}/target/bpfel-unknown-none/release" +} + +python_test() { + cargo_src_test --manifest-path mitmproxy-linux/Cargo.toml +}
