Fix publishing
This commit is contained in:
parent
c71e2bed39
commit
6435c5b8d5
|
|
@ -17,7 +17,7 @@ boring-sys = { version = "3.0", path = "./boring-sys" }
|
||||||
boring = { version = "3.0", path = "./boring" }
|
boring = { version = "3.0", path = "./boring" }
|
||||||
tokio-boring = { version = "3.0", path = "./tokio-boring" }
|
tokio-boring = { version = "3.0", path = "./tokio-boring" }
|
||||||
|
|
||||||
bindgen = { version = "0.65.1", default-features = false, features = ["runtime"] }
|
bindgen = { version = "0.66.1", default-features = false, features = ["runtime"] }
|
||||||
cmake = "0.1"
|
cmake = "0.1"
|
||||||
fslock = "0.2"
|
fslock = "0.2"
|
||||||
bitflags = "1.0"
|
bitflags = "1.0"
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,12 @@ include = [
|
||||||
"/deps/boringssl/**/CMakeLists.txt",
|
"/deps/boringssl/**/CMakeLists.txt",
|
||||||
"/deps/boringssl/**/sources.cmake",
|
"/deps/boringssl/**/sources.cmake",
|
||||||
"/deps/boringssl/LICENSE",
|
"/deps/boringssl/LICENSE",
|
||||||
|
"/deps/boringssl-fips/**/*.[chS]",
|
||||||
|
"/deps/boringssl-fips/**/*.asm",
|
||||||
|
"/deps/boringssl-fips/src/**/*.cc",
|
||||||
|
"/deps/boringssl-fips/**/CMakeLists.txt",
|
||||||
|
"/deps/boringssl-fips/**/sources.cmake",
|
||||||
|
"/deps/boringssl/LICENSE",
|
||||||
"/build.rs",
|
"/build.rs",
|
||||||
"/src",
|
"/src",
|
||||||
"/patches",
|
"/patches",
|
||||||
|
|
|
||||||
|
|
@ -406,23 +406,30 @@ fn get_extra_clang_args_for_bindgen() -> Vec<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ensure_patches_applied() -> io::Result<()> {
|
fn ensure_patches_applied() -> io::Result<()> {
|
||||||
|
let out_dir = env::var("OUT_DIR").unwrap();
|
||||||
|
let mut lock_file = LockFile::open(&PathBuf::from(&out_dir).join(".patch_lock"))?;
|
||||||
let src_path = get_boringssl_source_path();
|
let src_path = get_boringssl_source_path();
|
||||||
|
let is_in_submodule = Path::new(&src_path).join(".git").exists();
|
||||||
let mut lock_file = LockFile::open(&PathBuf::from(&src_path).join(".patch_lock"))?;
|
|
||||||
|
|
||||||
lock_file.lock()?;
|
lock_file.lock()?;
|
||||||
|
|
||||||
let mut cmd = Command::new("git");
|
// NOTE: check that we are not in files copied for publishing, otherwise we will reset
|
||||||
|
// the upper level git repo which is the workspace itself.
|
||||||
|
if is_in_submodule {
|
||||||
|
println!("cargo:warning=cleaning up boringssl git submodule dir");
|
||||||
|
|
||||||
cmd.args(["reset", "--hard"]).current_dir(&src_path);
|
let mut cmd = Command::new("git");
|
||||||
|
|
||||||
run_command(&mut cmd)?;
|
cmd.args(["reset", "--hard"]).current_dir(&src_path);
|
||||||
|
|
||||||
let mut cmd = Command::new("git");
|
run_command(&mut cmd)?;
|
||||||
|
|
||||||
cmd.args(["clean", "-fdx"]).current_dir(&src_path);
|
let mut cmd = Command::new("git");
|
||||||
|
|
||||||
run_command(&mut cmd)?;
|
cmd.args(["clean", "-fdx"]).current_dir(&src_path);
|
||||||
|
|
||||||
|
run_command(&mut cmd)?;
|
||||||
|
}
|
||||||
|
|
||||||
if cfg!(feature = "pq-experimental") {
|
if cfg!(feature = "pq-experimental") {
|
||||||
println!("cargo:warning=applying experimental post quantum crypto patch to boringssl");
|
println!("cargo:warning=applying experimental post quantum crypto patch to boringssl");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue