diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b04ab81de..b9023013e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,7 +39,6 @@ build-repro: image: rust:1.54.0-alpine3.14 script: - ./maint/reproducible_build.sh - - mv /arti/target/x86_64-unknown-linux-musl/release/arti ./arti-bin artifacts: paths: - arti-bin diff --git a/Cargo.lock b/Cargo.lock index 961869b7e..9336b90a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1300,6 +1300,7 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" dependencies = [ + "cc", "pkg-config", "vcpkg", ] diff --git a/arti/Cargo.toml b/arti/Cargo.toml index 2873cead8..8f19b5800 100644 --- a/arti/Cargo.toml +++ b/arti/Cargo.toml @@ -14,7 +14,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/" default = [ "tokio" ] async-std = [ "tor-client/async-std", "tor-rtcompat/async-std", "async-ctrlc", "once_cell" ] tokio = [ "tokio-crate", "tor-client/tokio", "tor-rtcompat/tokio" ] -vendored = [ "tor-rtcompat/vendored" ] +static = [ "tor-rtcompat/static", "tor-dirmgr/static" ] [dependencies] tor-client = { package="arti-tor-client", path = "../tor-client", version="0.0.0" } diff --git a/maint/reproducible_build.sh b/maint/reproducible_build.sh index c75e5797f..3df9d26c5 100755 --- a/maint/reproducible_build.sh +++ b/maint/reproducible_build.sh @@ -21,7 +21,9 @@ mkdir -p /sys/fs/cgroup/registry /usr/local/cargo/registry ln -s /sys/fs/cgroup/registry /usr/local/cargo/registry/src ## add missing dependancies -apk add --no-cache musl-dev perl make sqlite-static sqlite-dev +apk add --no-cache musl-dev perl make -cargo build -p arti --target x86_64-unknown-linux-musl --release --features vendored +cargo build -p arti --target x86_64-unknown-linux-musl --release --features static sha256sum target/x86_64-unknown-linux-musl/release/arti + +mv /arti/target/x86_64-unknown-linux-musl/release/arti "$here"/arti-bin diff --git a/tor-dirmgr/Cargo.toml b/tor-dirmgr/Cargo.toml index 5f2dfa97d..385a6f280 100644 --- a/tor-dirmgr/Cargo.toml +++ b/tor-dirmgr/Cargo.toml @@ -13,6 +13,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/" [features] default = [ "mmap" ] mmap = [ "memmap2" ] +static = [ "rusqlite/bundled" ] [dependencies] retry-error = { path="../retry-error", version="0.0.0" } diff --git a/tor-rtcompat/Cargo.toml b/tor-rtcompat/Cargo.toml index 3302e1c20..d3107af02 100644 --- a/tor-rtcompat/Cargo.toml +++ b/tor-rtcompat/Cargo.toml @@ -15,7 +15,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/" default = [ ] async-std = [ "async-std-crate", "async-io", "async-native-tls" , "async_executors/async_std" ] tokio = [ "tokio-crate", "tokio-util", "tokio-native-tls", "async_executors/tokio_tp" ] -vendored = [ "native-tls/vendored" ] +static = [ "native-tls/vendored" ] [dependencies]