diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d215fb9..fec81211 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,3 +53,17 @@ repos: entry: /bin/sh -c '/usr/bin/env bazel run //:gazelle_python_manifest.update' language: script require_serial: true + + - id: check-amd64-image-lists + name: Update amd64 image lists + # Note that we use a nested shell to discard $@, which is the file list + entry: /bin/sh -c '/usr/bin/env bazel run //py/tests/py_venv_image_layer:my_app_amd64_layers' + language: script + require_serial: true + + - id: check-arm64-image-lists + name: Update arm64 image lists + # Note that we use a nested shell to discard $@, which is the file list + entry: /bin/sh -c '/usr/bin/env bazel run //py/tests/py_venv_image_layer:my_app_arm64_layers' + language: script + require_serial: true diff --git a/Cargo.Bazel.lock b/Cargo.Bazel.lock index ac2d678d..32874d74 100644 --- a/Cargo.Bazel.lock +++ b/Cargo.Bazel.lock @@ -1,5 +1,5 @@ { - "checksum": "f1be4baa5924515e3e3bfe91c4afbfa084b2751aec2f7560df597efbcdc4dc3b", + "checksum": "c6702817f7343cbaf7065db00a7e1f82a0887efa615b84fc3cc5cf60af1d649b", "crates": { "addr2line 0.24.2": { "name": "addr2line", @@ -1348,7 +1348,7 @@ "target": "addr2line" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -2126,7 +2126,7 @@ "target": "bzip2_sys" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -2190,7 +2190,7 @@ "target": "build_script_build" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -2360,7 +2360,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -2428,7 +2428,7 @@ "target": "jobserver" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -2907,7 +2907,7 @@ "target": "core_foundation_sys" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -3004,25 +3004,25 @@ "selects": { "aarch64-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(all(target_arch = \"aarch64\", target_vendor = \"apple\"))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(all(target_arch = \"loongarch64\", target_os = \"linux\"))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ] @@ -3722,7 +3722,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -3973,6 +3973,45 @@ ], "license_file": "LICENSE-APACHE" }, + "env_home 0.1.0": { + "name": "env_home", + "version": "0.1.0", + "package_url": "https://github.com/notpeter/env-home", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/env_home/0.1.0/download", + "sha256": "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "env_home", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "env_home", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, "equivalent 1.0.1": { "name": "equivalent", "version": "1.0.1", @@ -4070,14 +4109,14 @@ ], "license_file": "LICENSE-APACHE" }, - "errno 0.3.9": { + "errno 0.3.14": { "name": "errno", - "version": "0.3.9", + "version": "0.3.14", "package_url": "https://github.com/lambda-fairy/rust-errno", "repository": { "Http": { - "url": "https://static.crates.io/crates/errno/0.3.9/download", - "sha256": "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" + "url": "https://static.crates.io/crates/errno/0.3.14/download", + "sha256": "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" } }, "targets": [ @@ -4110,32 +4149,32 @@ "selects": { "cfg(target_os = \"hermit\")": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(target_os = \"wasi\")": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(windows)": [ { - "id": "windows-sys 0.52.0", + "id": "windows-sys 0.59.0", "target": "windows_sys" } ] } }, "edition": "2018", - "version": "0.3.9" + "version": "0.3.14" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -4295,7 +4334,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -4601,7 +4640,7 @@ "selects": { "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -5504,7 +5543,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -7547,7 +7586,7 @@ "selects": { "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ] @@ -7805,7 +7844,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -7899,14 +7938,14 @@ ], "license_file": "LICENSE-APACHE" }, - "libc 0.2.161": { + "libc 0.2.176": { "name": "libc", - "version": "0.2.161", + "version": "0.2.176", "package_url": "https://github.com/rust-lang/libc", "repository": { "Http": { - "url": "https://static.crates.io/crates/libc/0.2.161/download", - "sha256": "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + "url": "https://static.crates.io/crates/libc/0.2.176/download", + "sha256": "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" } }, "targets": [ @@ -8023,14 +8062,14 @@ "deps": { "common": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "build_script_build" } ], "selects": {} }, - "edition": "2015", - "version": "0.2.161" + "edition": "2021", + "version": "0.2.176" }, "build_script_attrs": { "compile_data_glob": [ @@ -8083,7 +8122,7 @@ "target": "bitflags" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -8191,6 +8230,89 @@ ], "license_file": "LICENSE-APACHE" }, + "linux-raw-sys 0.11.0": { + "name": "linux-raw-sys", + "version": "0.11.0", + "package_url": "https://github.com/sunfishcode/linux-raw-sys", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/linux-raw-sys/0.11.0/download", + "sha256": "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + } + }, + "targets": [ + { + "Library": { + "crate_name": "linux_raw_sys", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "linux_raw_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "general", + "ioctl", + "no_std" + ], + "selects": { + "aarch64-unknown-linux-gnu": [ + "auxvec", + "elf", + "errno" + ], + "aarch64-unknown-nixos-gnu": [ + "auxvec", + "elf", + "errno" + ], + "arm-unknown-linux-gnueabi": [ + "auxvec", + "elf", + "errno" + ], + "armv7-unknown-linux-gnueabi": [ + "auxvec", + "elf", + "errno" + ], + "i686-unknown-linux-gnu": [ + "auxvec", + "elf", + "errno" + ], + "x86_64-unknown-linux-gnu": [ + "auxvec", + "elf", + "errno" + ], + "x86_64-unknown-nixos-gnu": [ + "auxvec", + "elf", + "errno" + ] + } + }, + "edition": "2021", + "version": "0.11.0" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, "lock_api 0.4.12": { "name": "lock_api", "version": "0.4.12", @@ -8362,7 +8484,7 @@ "deps": { "common": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -8599,7 +8721,7 @@ "selects": { "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ] @@ -9012,7 +9134,7 @@ ], "cfg(target_os = \"wasi\")": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -9022,7 +9144,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -9747,7 +9869,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -9842,7 +9964,7 @@ ], "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -10358,7 +10480,7 @@ "selects": { "cfg(not(target_os = \"windows\"))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -11104,7 +11226,7 @@ "deps": { "common": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -11344,145 +11466,145 @@ "selects": { "aarch64-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-apple-ios": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-apple-ios-sim": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-fuchsia": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-unknown-nixos-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-unknown-nto-qnx710": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "arm-unknown-linux-gnueabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "armv7-linux-androideabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "armv7-unknown-linux-gnueabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-unknown-freebsd": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "powerpc-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "s390x-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-apple-ios": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-fuchsia": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-unknown-freebsd": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-unknown-nixos-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ] @@ -14429,7 +14551,7 @@ "selects": { "cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(target_arch = \"aarch64\", target_arch = \"arm\")))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -15047,78 +15169,78 @@ "selects": { "aarch64-apple-darwin": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-apple-ios": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-apple-ios-sim": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-fuchsia": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-linux-android": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "aarch64-unknown-nto-qnx710": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "armv7-linux-androideabi": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -15136,18 +15258,18 @@ ], "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "cfg(windows)": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, @@ -15158,188 +15280,188 @@ ], "i686-apple-darwin": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-linux-android": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "i686-unknown-freebsd": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "powerpc-unknown-linux-gnu": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "riscv32imc-unknown-none-elf": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "riscv64gc-unknown-none-elf": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "s390x-unknown-linux-gnu": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "thumbv7em-none-eabi": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "thumbv8m.main-none-eabi": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "wasm32-unknown-unknown": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "wasm32-wasi": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-apple-darwin": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-apple-ios": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-fuchsia": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-linux-android": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-unknown-freebsd": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], "x86_64-unknown-none": [ { - "id": "errno 0.3.9", + "id": "errno 0.3.14", "target": "errno", "alias": "libc_errno" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ] @@ -15363,20 +15485,20 @@ ], "license_file": "LICENSE-APACHE" }, - "rustls 0.23.15": { - "name": "rustls", - "version": "0.23.15", - "package_url": "https://github.com/rustls/rustls", + "rustix 1.1.2": { + "name": "rustix", + "version": "1.1.2", + "package_url": "https://github.com/bytecodealliance/rustix", "repository": { "Http": { - "url": "https://static.crates.io/crates/rustls/0.23.15/download", - "sha256": "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" + "url": "https://static.crates.io/crates/rustix/1.1.2/download", + "sha256": "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" } }, "targets": [ { "Library": { - "crate_name": "rustls", + "crate_name": "rustix", "crate_root": "src/lib.rs", "srcs": { "allow_empty": true, @@ -15399,151 +15521,464 @@ } } ], - "library_target_name": "rustls", + "library_target_name": "rustix", "common_attrs": { "compile_data_glob": [ "**" ], "crate_features": { "common": [ - "ring", - "std", - "tls12" + "alloc", + "fs", + "std" ], "selects": {} }, "deps": { "common": [ { - "id": "once_cell 1.20.2", - "target": "once_cell" - }, - { - "id": "ring 0.17.8", - "target": "ring" + "id": "bitflags 2.6.0", + "target": "bitflags" }, { - "id": "rustls 0.23.15", + "id": "rustix 1.1.2", "target": "build_script_build" - }, - { - "id": "rustls-pki-types 1.10.0", - "target": "rustls_pki_types", - "alias": "pki_types" - }, - { - "id": "rustls-webpki 0.102.8", - "target": "webpki" - }, - { - "id": "subtle 2.6.1", - "target": "subtle" - }, - { - "id": "zeroize 1.8.1", - "target": "zeroize" - } - ], - "selects": {} - }, - "edition": "2021", - "version": "0.23.15" - }, - "build_script_attrs": { - "compile_data_glob": [ - "**" - ], - "data_glob": [ - "**" - ], - "link_deps": { - "common": [ - { - "id": "ring 0.17.8", - "target": "ring" - } - ], - "selects": {} - } - }, - "license": "Apache-2.0 OR ISC OR MIT", - "license_ids": [ - "Apache-2.0", - "ISC", - "MIT" - ], - "license_file": "LICENSE-APACHE" - }, - "rustls-native-certs 0.8.0": { - "name": "rustls-native-certs", - "version": "0.8.0", - "package_url": "https://github.com/rustls/rustls-native-certs", - "repository": { - "Http": { - "url": "https://static.crates.io/crates/rustls-native-certs/0.8.0/download", - "sha256": "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" - } - }, - "targets": [ - { - "Library": { - "crate_name": "rustls_native_certs", - "crate_root": "src/lib.rs", - "srcs": { - "allow_empty": true, - "include": [ - "**/*.rs" - ] - } - } - } - ], - "library_target_name": "rustls_native_certs", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "rustls-pemfile 2.2.0", - "target": "rustls_pemfile" - }, - { - "id": "rustls-pki-types 1.10.0", - "target": "rustls_pki_types", - "alias": "pki_types" } ], "selects": { - "cfg(all(unix, not(target_os = \"macos\")))": [ + "aarch64-apple-darwin": [ { - "id": "openssl-probe 0.1.5", - "target": "openssl_probe" + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" } ], - "cfg(target_os = \"macos\")": [ + "aarch64-apple-ios": [ { - "id": "security-framework 2.11.1", - "target": "security_framework" + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" } ], - "cfg(windows)": [ + "aarch64-apple-ios-sim": [ { - "id": "schannel 0.1.26", - "target": "schannel" + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" } - ] - } - }, - "edition": "2021", - "version": "0.8.0" - }, - "license": "Apache-2.0 OR ISC OR MIT", - "license_ids": [ - "Apache-2.0", - "ISC", - "MIT" + ], + "aarch64-fuchsia": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "aarch64-linux-android": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "aarch64-unknown-nto-qnx710": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "armv7-linux-androideabi": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "cfg(all(any(target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ + { + "id": "linux-raw-sys 0.11.0", + "target": "linux_raw_sys" + } + ], + "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"))))": [ + { + "id": "linux-raw-sys 0.11.0", + "target": "linux_raw_sys" + } + ], + "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "windows-sys 0.59.0", + "target": "windows_sys" + } + ], + "i686-apple-darwin": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "i686-linux-android": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "i686-unknown-freebsd": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "powerpc-unknown-linux-gnu": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "s390x-unknown-linux-gnu": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "wasm32-wasi": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "x86_64-apple-darwin": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "x86_64-apple-ios": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "x86_64-fuchsia": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "x86_64-linux-android": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ], + "x86_64-unknown-freebsd": [ + { + "id": "errno 0.3.14", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.176", + "target": "libc" + } + ] + } + }, + "edition": "2021", + "version": "1.1.2" + }, + "build_script_attrs": { + "compile_data_glob": [ + "**" + ], + "data_glob": [ + "**" + ] + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, + "rustls 0.23.15": { + "name": "rustls", + "version": "0.23.15", + "package_url": "https://github.com/rustls/rustls", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/rustls/0.23.15/download", + "sha256": "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rustls", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "rustls", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "ring", + "std", + "tls12" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "once_cell 1.20.2", + "target": "once_cell" + }, + { + "id": "ring 0.17.8", + "target": "ring" + }, + { + "id": "rustls 0.23.15", + "target": "build_script_build" + }, + { + "id": "rustls-pki-types 1.10.0", + "target": "rustls_pki_types", + "alias": "pki_types" + }, + { + "id": "rustls-webpki 0.102.8", + "target": "webpki" + }, + { + "id": "subtle 2.6.1", + "target": "subtle" + }, + { + "id": "zeroize 1.8.1", + "target": "zeroize" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.23.15" + }, + "build_script_attrs": { + "compile_data_glob": [ + "**" + ], + "data_glob": [ + "**" + ], + "link_deps": { + "common": [ + { + "id": "ring 0.17.8", + "target": "ring" + } + ], + "selects": {} + } + }, + "license": "Apache-2.0 OR ISC OR MIT", + "license_ids": [ + "Apache-2.0", + "ISC", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, + "rustls-native-certs 0.8.0": { + "name": "rustls-native-certs", + "version": "0.8.0", + "package_url": "https://github.com/rustls/rustls-native-certs", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/rustls-native-certs/0.8.0/download", + "sha256": "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rustls_native_certs", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "rustls_native_certs", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "rustls-pemfile 2.2.0", + "target": "rustls_pemfile" + }, + { + "id": "rustls-pki-types 1.10.0", + "target": "rustls_pki_types", + "alias": "pki_types" + } + ], + "selects": { + "cfg(all(unix, not(target_os = \"macos\")))": [ + { + "id": "openssl-probe 0.1.5", + "target": "openssl_probe" + } + ], + "cfg(target_os = \"macos\")": [ + { + "id": "security-framework 2.11.1", + "target": "security_framework" + } + ], + "cfg(windows)": [ + { + "id": "schannel 0.1.26", + "target": "schannel" + } + ] + } + }, + "edition": "2021", + "version": "0.8.0" + }, + "license": "Apache-2.0 OR ISC OR MIT", + "license_ids": [ + "Apache-2.0", + "ISC", + "MIT" ], "license_file": "LICENSE" }, @@ -16257,7 +16692,7 @@ "target": "core_foundation_sys" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -16322,7 +16757,7 @@ "target": "core_foundation_sys" }, { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -17065,7 +17500,7 @@ "deps": { "common": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -17453,7 +17888,7 @@ "selects": { "cfg(unix)": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -17887,7 +18322,7 @@ "deps": { "common": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18654,7 +19089,7 @@ "selects": { "aarch64-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18668,7 +19103,7 @@ ], "aarch64-apple-ios": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18682,7 +19117,7 @@ ], "aarch64-apple-ios-sim": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18696,7 +19131,7 @@ ], "aarch64-fuchsia": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18710,7 +19145,7 @@ ], "aarch64-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18734,7 +19169,7 @@ ], "aarch64-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18748,7 +19183,7 @@ ], "aarch64-unknown-nixos-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18762,7 +19197,7 @@ ], "aarch64-unknown-nto-qnx710": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18776,7 +19211,7 @@ ], "arm-unknown-linux-gnueabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18790,7 +19225,7 @@ ], "armv7-linux-androideabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18804,7 +19239,7 @@ ], "armv7-unknown-linux-gnueabi": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18824,7 +19259,7 @@ ], "i686-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18838,7 +19273,7 @@ ], "i686-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18862,7 +19297,7 @@ ], "i686-unknown-freebsd": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18876,7 +19311,7 @@ ], "i686-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18890,7 +19325,7 @@ ], "powerpc-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18916,7 +19351,7 @@ ], "s390x-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18942,7 +19377,7 @@ ], "x86_64-apple-darwin": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18956,7 +19391,7 @@ ], "x86_64-apple-ios": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18970,7 +19405,7 @@ ], "x86_64-fuchsia": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -18984,7 +19419,7 @@ ], "x86_64-linux-android": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -19008,7 +19443,7 @@ ], "x86_64-unknown-freebsd": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -19022,7 +19457,7 @@ ], "x86_64-unknown-linux-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -19036,7 +19471,7 @@ ], "x86_64-unknown-nixos-gnu": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" }, { @@ -23316,6 +23751,10 @@ { "id": "miette 7.2.0", "target": "miette" + }, + { + "id": "which 8.0.0", + "target": "which" } ], "selects": {} @@ -24221,23 +24660,99 @@ ], "selects": {} }, - "edition": "2018", - "version": "0.26.6" + "edition": "2018", + "version": "0.26.6" + }, + "license": "MPL-2.0", + "license_ids": [ + "MPL-2.0" + ], + "license_file": "LICENSE" + }, + "which 6.0.3": { + "name": "which", + "version": "6.0.3", + "package_url": "https://github.com/harryfei/which-rs.git", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/which/6.0.3/download", + "sha256": "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "which", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "which", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "regex" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "either 1.13.0", + "target": "either" + }, + { + "id": "regex 1.11.1", + "target": "regex" + } + ], + "selects": { + "cfg(any(unix, target_os = \"wasi\", target_os = \"redox\"))": [ + { + "id": "rustix 0.38.37", + "target": "rustix" + } + ], + "cfg(any(windows, unix, target_os = \"redox\"))": [ + { + "id": "home 0.5.9", + "target": "home" + } + ], + "cfg(windows)": [ + { + "id": "winsafe 0.0.19", + "target": "winsafe" + } + ] + } + }, + "edition": "2021", + "version": "6.0.3" }, - "license": "MPL-2.0", + "license": "MIT", "license_ids": [ - "MPL-2.0" + "MIT" ], - "license_file": "LICENSE" + "license_file": "LICENSE.txt" }, - "which 6.0.3": { + "which 8.0.0": { "name": "which", - "version": "6.0.3", + "version": "8.0.0", "package_url": "https://github.com/harryfei/which-rs.git", "repository": { "Http": { - "url": "https://static.crates.io/crates/which/6.0.3/download", - "sha256": "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" + "url": "https://static.crates.io/crates/which/8.0.0/download", + "sha256": "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" } }, "targets": [ @@ -24261,44 +24776,294 @@ ], "crate_features": { "common": [ - "regex" + "default", + "real-sys" ], "selects": {} }, "deps": { - "common": [ - { - "id": "either 1.13.0", - "target": "either" - }, - { - "id": "regex 1.11.1", - "target": "regex" - } - ], + "common": [], "selects": { - "cfg(any(unix, target_os = \"wasi\", target_os = \"redox\"))": [ + "aarch64-apple-darwin": [ { - "id": "rustix 0.38.37", + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", "target": "rustix" } ], - "cfg(any(windows, unix, target_os = \"redox\"))": [ + "aarch64-apple-ios": [ { - "id": "home 0.5.9", - "target": "home" + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" } ], - "cfg(windows)": [ + "aarch64-apple-ios-sim": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "aarch64-fuchsia": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "aarch64-linux-android": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "aarch64-pc-windows-msvc": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "winsafe 0.0.19", + "target": "winsafe" + } + ], + "aarch64-unknown-linux-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "aarch64-unknown-nixos-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "aarch64-unknown-nto-qnx710": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "arm-unknown-linux-gnueabi": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "armv7-linux-androideabi": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "armv7-unknown-linux-gnueabi": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "i686-apple-darwin": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "i686-linux-android": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "i686-pc-windows-msvc": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "winsafe 0.0.19", + "target": "winsafe" + } + ], + "i686-unknown-freebsd": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "i686-unknown-linux-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "powerpc-unknown-linux-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "s390x-unknown-linux-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "wasm32-wasi": [ + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-apple-darwin": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-apple-ios": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-fuchsia": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-linux-android": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-pc-windows-msvc": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, { "id": "winsafe 0.0.19", "target": "winsafe" } + ], + "x86_64-unknown-freebsd": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-unknown-linux-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } + ], + "x86_64-unknown-nixos-gnu": [ + { + "id": "env_home 0.1.0", + "target": "env_home" + }, + { + "id": "rustix 1.1.2", + "target": "rustix" + } ] } }, "edition": "2021", - "version": "6.0.3" + "version": "8.0.0" }, "license": "MIT", "license_ids": [ @@ -26609,7 +27374,7 @@ "selects": { "cfg(any(target_os = \"freebsd\", target_os = \"netbsd\"))": [ { - "id": "libc 0.2.161", + "id": "libc 0.2.176", "target": "libc" } ], @@ -27208,6 +27973,19 @@ "armv7-linux-androideabi", "armv7-unknown-linux-gnueabi" ], + "cfg(all(any(target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu" + ], + "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"))))": [ + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "arm-unknown-linux-gnueabi", + "armv7-unknown-linux-gnueabi", + "i686-unknown-linux-gnu", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu" + ], "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"))))": [ "aarch64-unknown-linux-gnu", "aarch64-unknown-nixos-gnu", @@ -27217,6 +27995,32 @@ "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu" ], + "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-nto-qnx710", + "armv7-linux-androideabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-none" + ], "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [ "aarch64-apple-darwin", "aarch64-apple-ios", @@ -27750,7 +28554,8 @@ "uv-pypi-types 0.0.1", "uv-python 0.0.1", "uv-virtualenv 0.0.4", - "walkdir 2.5.0" + "walkdir 2.5.0", + "which 8.0.0" ], "direct_dev_deps": [] } diff --git a/Cargo.lock b/Cargo.lock index cd1c8956..3a540ae7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -593,6 +593,12 @@ dependencies = [ "encoding_rs", ] +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + [[package]] name = "equivalent" version = "1.0.1" @@ -611,12 +617,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1193,9 +1199,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libredox" @@ -1214,6 +1220,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + [[package]] name = "lock_api" version = "0.4.12" @@ -1802,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc31414597d1cd7fdd2422798b7652a6329dda0fe0219e6335a13d5bcaa9aeb6" dependencies = [ "cfg-if", - "rustix", + "rustix 0.38.37", "windows", ] @@ -2044,10 +2056,23 @@ dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.59.0", +] + [[package]] name = "rustls" version = "0.23.15" @@ -2446,7 +2471,7 @@ dependencies = [ "cfg-if", "fastrand", "once_cell", - "rustix", + "rustix 0.38.37", "windows-sys 0.59.0", ] @@ -2456,7 +2481,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix", + "rustix 0.38.37", "windows-sys 0.48.0", ] @@ -2914,7 +2939,7 @@ dependencies = [ "uv-platform-tags", "uv-pypi-types", "uv-static", - "which", + "which 6.0.3", ] [[package]] @@ -2999,7 +3024,7 @@ dependencies = [ "fs2", "junction", "path-slash", - "rustix", + "rustix 0.38.37", "serde", "tempfile", "tokio", @@ -3222,7 +3247,7 @@ dependencies = [ "uv-state", "uv-static", "uv-warnings", - "which", + "which 6.0.3", "windows-registry", "windows-result", "windows-sys 0.59.0", @@ -3291,6 +3316,7 @@ version = "0.1.0" dependencies = [ "miette", "runfiles", + "which 8.0.0", ] [[package]] @@ -3447,7 +3473,18 @@ dependencies = [ "either", "home", "regex", - "rustix", + "rustix 0.38.37", + "winsafe 0.0.19", +] + +[[package]] +name = "which" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" +dependencies = [ + "env_home", + "rustix 1.1.2", "winsafe 0.0.19", ] @@ -3733,8 +3770,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys", - "rustix", + "linux-raw-sys 0.4.14", + "rustix 0.38.37", ] [[package]] diff --git a/py/private/py_venv/link.py b/py/private/py_venv/link.py index 887e7fb7..28748e81 100644 --- a/py/private/py_venv/link.py +++ b/py/private/py_venv/link.py @@ -21,10 +21,10 @@ def munge_venv_name(target_package, virtualenv_name): if __name__ == "__main__": - virtualenv_home = os.path.realpath(os.environ["VIRTUAL_ENV"]) + virtualenv_home = os.path.normpath(os.environ["VIRTUAL_ENV"]) virtualenv_name = os.path.basename(virtualenv_home) - runfiles_dir = os.path.realpath(os.environ["RUNFILES_DIR"]) - builddir = os.path.realpath(os.environ["BUILD_WORKING_DIRECTORY"]) + runfiles_dir = os.path.normpath(os.environ["RUNFILES_DIR"]) + builddir = os.path.normpath(os.environ["BUILD_WORKING_DIRECTORY"]) target_package, target_name = os.environ["BAZEL_TARGET"].split("//", 1)[1].split(":") PARSER = argparse.ArgumentParser( diff --git a/py/tests/py_venv_image_layer/my_app_amd64_layers_listing.yaml b/py/tests/py_venv_image_layer/my_app_amd64_layers_listing.yaml index 364b15c0..96519260 100644 --- a/py/tests/py_venv_image_layer/my_app_amd64_layers_listing.yaml +++ b/py/tests/py_venv_image_layer/my_app_amd64_layers_listing.yaml @@ -2511,9 +2511,9 @@ files: - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/ - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/ - -rwxr-xr-x 0 0 0 2853 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/activate - - -rwxr-xr-x 0 0 0 854280 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python - - -rwxr-xr-x 0 0 0 854280 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3 - - -rwxr-xr-x 0 0 0 854280 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3.9 + - -rwxr-xr-x 0 0 0 870664 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python + - -rwxr-xr-x 0 0 0 870664 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3 + - -rwxr-xr-x 0 0 0 870664 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3.9 - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/lib/ - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/lib/python3.9/ - -rwxr-xr-x 0 0 0 343 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/pyvenv.cfg diff --git a/py/tests/py_venv_image_layer/my_app_arm64_layers_listing.yaml b/py/tests/py_venv_image_layer/my_app_arm64_layers_listing.yaml index 605de9cc..94269b73 100644 --- a/py/tests/py_venv_image_layer/my_app_arm64_layers_listing.yaml +++ b/py/tests/py_venv_image_layer/my_app_arm64_layers_listing.yaml @@ -2492,9 +2492,9 @@ files: - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/ - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/ - -rwxr-xr-x 0 0 0 2853 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/activate - - -rwxr-xr-x 0 0 0 726736 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python - - -rwxr-xr-x 0 0 0 726736 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3 - - -rwxr-xr-x 0 0 0 726736 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3.9 + - -rwxr-xr-x 0 0 0 743120 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python + - -rwxr-xr-x 0 0 0 743120 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3 + - -rwxr-xr-x 0 0 0 743120 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/bin/python3.9 - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/lib/ - drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/lib/python3.9/ - -rwxr-xr-x 0 0 0 344 Jan 1 2023 ./py/tests/py_venv_image_layer/my_app_bin.runfiles/aspect_rules_py/py/tests/py_venv_image_layer/.my_app_bin/pyvenv.cfg diff --git a/py/tools/runfiles/src/lib.rs b/py/tools/runfiles/src/lib.rs index 565451ab..f1293f79 100644 --- a/py/tools/runfiles/src/lib.rs +++ b/py/tools/runfiles/src/lib.rs @@ -154,14 +154,14 @@ impl Runfiles { /// Creates a manifest based Runfiles object when /// RUNFILES_MANIFEST_FILE environment variable is present, /// or a directory based Runfiles object otherwise. - pub fn create() -> Result { + pub fn create(executable: impl AsRef) -> Result { // Note that the MANIFEST_FILE_ENV_VAR may be set but also blank. let mode = match std::env::var_os(MANIFEST_FILE_ENV_VAR) { Some(manifest_file) if (!manifest_file.is_empty()) => { Self::create_manifest_based(Path::new(&manifest_file))? } _ => { - let dir = find_runfiles_dir()?; + let dir = find_runfiles_dir(executable)?; let manifest_path = dir.join("MANIFEST"); match manifest_path.exists() { true => Self::create_manifest_based(&manifest_path)?, @@ -269,7 +269,7 @@ fn parse_repo_mapping(path: PathBuf) -> Result { } /// Returns the .runfiles directory for the currently executing binary. -pub fn find_runfiles_dir() -> Result { +pub fn find_runfiles_dir(executable: impl AsRef) -> Result { // Note that the MANIFEST_FILE_ENV_VAR may be set but also blank. assert!( match std::env::var_os(MANIFEST_FILE_ENV_VAR) { @@ -298,7 +298,7 @@ pub fn find_runfiles_dir() -> Result { } // Consume the first argument (argv[0]) - let exec_path = std::env::args().next().expect("arg 0 was not set"); + let exec_path = executable.as_ref(); let current_dir = env::current_dir().expect("The current working directory is always expected to be set."); diff --git a/py/tools/venv_shim/BUILD.bazel b/py/tools/venv_shim/BUILD.bazel index c47f70f7..38cae621 100644 --- a/py/tools/venv_shim/BUILD.bazel +++ b/py/tools/venv_shim/BUILD.bazel @@ -8,6 +8,7 @@ rust_binary( deps = [ "//py/tools/runfiles", "@crate_index//:miette", + "@crate_index//:which", ], ) diff --git a/py/tools/venv_shim/Cargo.toml b/py/tools/venv_shim/Cargo.toml index 7c9f6390..f695dbaf 100644 --- a/py/tools/venv_shim/Cargo.toml +++ b/py/tools/venv_shim/Cargo.toml @@ -21,3 +21,4 @@ path = "src/main.rs" [dependencies] miette = { workspace = true } runfiles = { path = "../runfiles" } +which = "8.0.0" diff --git a/py/tools/venv_shim/src/main.rs b/py/tools/venv_shim/src/main.rs index cf18c2a9..00eeb0c5 100644 --- a/py/tools/venv_shim/src/main.rs +++ b/py/tools/venv_shim/src/main.rs @@ -1,5 +1,6 @@ use miette::IntoDiagnostic; use runfiles::Runfiles; +use which::which; // Depended on out of rules_rust use std::env; use std::ffi::OsStr; @@ -145,7 +146,7 @@ fn find_python_executables(version_from_cfg: &str, exclude_dir: &Path) -> Option } } -fn find_actual_interpreter(cfg: &PyCfg) -> miette::Result { +fn find_actual_interpreter(executable: impl AsRef, cfg: &PyCfg) -> miette::Result { match &cfg.interpreter { InterpreterConfig::External { version } => { // NOTE (reid@aspect.build): @@ -196,7 +197,7 @@ fn find_actual_interpreter(cfg: &PyCfg) -> miette::Result { Ok(actual_interpreter_path.to_owned()) } InterpreterConfig::Runfiles { rpath, repo } => { - let r = Runfiles::create().unwrap(); + let r = Runfiles::create(executable).unwrap(); if let Some(interpreter) = r.rlocation_from(rpath.as_str(), &repo) { Ok(PathBuf::from(interpreter)) } else { @@ -222,7 +223,84 @@ fn main() -> miette::Result<()> { // The logical path of the interpreter let venv_interpreter = venv_root.join("bin/python3"); - let actual_interpreter = find_actual_interpreter(&venv_config)?; + // Alright this is a bit of a mess. + // + // There is a std::env::current_exe(), but it has platform dependent + // behavior. Some platforms realpath the invocation binary, some don't, it's + // a mess for our purposes when we REALLY want to avoid dereferencing links. + // + // So we have to do this manually. There are three cases: + // 1. `/foo/bar/python3` via absolute path + // 2. `./foo/bar/python3` via relative path + // 3. `python3` via $PATH lookup + // + // If the `exec_name` (raw `argv[0]`) is absolute, use that. Otherwise try + // to relativize, otherwise fall back to $PATH lookup. + // + // This lets us get a "raw" un-dereferenced path to the start of any + // potential symlink chain so that we can then do our symlink chain dance. + let mut executable = PathBuf::from(exec_name); + #[cfg(feature = "debug")] + eprintln!("interp {:?}", executable); + let cwd = std::env::current_dir().into_diagnostic()?; + if !executable.is_absolute() { + let candidate = cwd.join(&executable); + if candidate.exists() { + executable = candidate; + #[cfg(feature = "debug")] + eprintln!(" {:?}", executable); + } else if let Ok(exe) = which(&exec_name) { + executable = exe; + #[cfg(feature = "debug")] + eprintln!(" {:?}", executable); + } + } + + // Now, if we _don't_ have the `.runfiles` part in the interpreter path, + // then we have to go through the path parts and try resolving the _first_ + // link which sequentially exists in the path. + let mut changed = true; + while changed + && !executable.components().any(|it| { + it.as_os_str() + .to_str() + .expect(&format!("Failed to normalize {:?} as a str", it)) + .ends_with(".runfiles") + }) + { + changed = false; + // Ancestors is in iterated .parent order, but we want to go the other + // way. We want to resolve the deepest link first on the expectation + // that the target file itself is likely a link which escapes a runfiles + // tree, whereas some part of the invocation path is a symlink to the + // venv tree within a runfiles tree. Ancestors isn't double ended so we + // have to collect it first. + for parent in executable.ancestors().collect::>().into_iter().rev() { + if parent.is_symlink() { + // Find the stable tail we want to preserve + let suffix = executable.strip_prefix(parent).into_diagnostic()?; + // Resolve the link we identified + let parent = parent + .parent() + .expect(&format!("Failed to take the parent of {:?}", parent)) + .join(parent.read_link().into_diagnostic()?); + // And join the tail to the resolved head + executable = parent.join(suffix); + #[cfg(feature = "debug")] + eprintln!(" {:?}", executable); + + changed = true; + break; + } + } + if changed { + break; + } + } + + #[cfg(feature = "debug")] + eprintln!("final {:?}", executable); + let actual_interpreter = find_actual_interpreter(executable, &venv_config)?; #[cfg(feature = "debug")] eprintln!(