gnu: Python: Fix CVE-2021-3177.
[jackhill/guix/guix.git] / gnu / packages / patches / rust-nettle-sys-disable-vendor.patch
CommitLineData
5effc5bf
HG
1Subject: nettle-sys: clear out "vendored" feature cruft from build.rs
2From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor <dkg@fifthhorseman.net>
3
4https://salsa.debian.org/rust-team/debcargo-conf/-/commit/0c71150ad26bb66a8396dcdab055181af232ddc5
5https://sources.debian.org/src/rust-nettle-sys/2.0.4-3/debian/patches/disable-vendor.diff/
6--- a/Cargo.toml 2019-10-23 13:08:07.000000000 -0400
7+++ b/Cargo.toml 2019-10-23 14:08:46.644064014 -0400
8@@ -29,12 +29,9 @@
9 version = "0.51.1"
10 default-features = false
11
12-[build-dependencies.nettle-src]
13-version = "3.5.1-0"
14-optional = true
15-
16 [build-dependencies.pkg-config]
17 version = "0.3"
18
19 [features]
20 vendored = ["nettle-src"]
21+nettle-src = []
22diff --git a/build.rs b/build.rs
23index 44f7af3..ede4b2f 100644
24--- a/build.rs
25+++ b/build.rs
26@@ -1,7 +1,5 @@
27 extern crate bindgen;
28 extern crate pkg_config;
29-#[cfg(feature = "vendored")]
30-extern crate nettle_src;
31
32 use std::env;
33 use std::fs;
34@@ -36,14 +34,6 @@ fn main() {
35 println!("cargo:rerun-if-env-changed=NETTLE_STATIC");
36 println!("cargo:rerun-if-env-changed={}", NETTLE_PREGENERATED_BINDINGS);
37
38- #[cfg(feature = "vendored")]
39- {
40- let artifacts = nettle_src::Build::new().build();
41- println!("cargo:vendored=1");
42- env::set_var("PKG_CONFIG_PATH",
43- artifacts.lib_dir().join("pkgconfig"));
44- }
45-
46 let nettle = pkg_config::probe_library("nettle hogweed").unwrap();
47
48 let mode = match env::var_os("NETTLE_STATIC") {