From 390c778bd8a95b601232767211aca1075b6f4804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Standa=20Luke=C5=A1?= Date: Thu, 18 Jan 2024 18:26:17 +0100 Subject: [PATCH] tmp: ci --- cli/Cargo.toml | 2 +- cli/Cross.toml | 5 ++--- cli/src/postgres_cloner.rs | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 59ef718..2dddd00 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -28,7 +28,7 @@ byteorder = "1.4.3" [target.'cfg(not(any(target_family = "windows", target_arch = "riscv64")))'.dependencies] jemallocator = "0.5.4" -[target.'cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64"))))'.dependencies] +[target.'cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64"))))'.dependencies] postgres-native-tls = "0.5.0" native-tls = "0.2.11" diff --git a/cli/Cross.toml b/cli/Cross.toml index a2c898a..f7ca81c 100644 --- a/cli/Cross.toml +++ b/cli/Cross.toml @@ -6,7 +6,6 @@ pre-build = [ [target.riscv64gc-unknown-linux-gnu] pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH" + "dpkg --add-architecture $CROSS_DEB_ARCH" ] -image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:main@sha256:935f448e57450c0325b82e5d3a44662a46b1aabd56a3b1c4c03a1bef31dd168b" \ No newline at end of file +image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:main@sha256:67ee97dd4719390d299edfcf39f226360ccfb1539e08b078ec187d4848415794" diff --git a/cli/src/postgres_cloner.rs b/cli/src/postgres_cloner.rs index 9aa5c12..54cad92 100644 --- a/cli/src/postgres_cloner.rs +++ b/cli/src/postgres_cloner.rs @@ -113,14 +113,14 @@ fn read_password(user: &str) -> Result { Ok(password) } -#[cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64"))))] +#[cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64"))))] fn build_tls_connector() -> Result { let connector = native_tls::TlsConnector::new().map_err(|e| format!("Creating TLS connector failed: {}", e.to_string()))?; let pg_connector = postgres_native_tls::MakeTlsConnector::new(connector); Ok(pg_connector) } -#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64")))))] +#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64")))))] fn build_tls_connector() -> Result { Ok(NoTls) } @@ -143,7 +143,7 @@ fn pg_connect(args: &PostgresConnArgs) -> Result { pg_config.password(&read_password(pg_config.get_user().unwrap())?.trim()); } - #[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64")))))] + #[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64")))))] match &args.sslmode { None | Some(crate::SslMode::Disable) => {}, Some(x) => return Err(format!("SSL/TLS is disabled in this build of pg2parquet, so ssl mode {:?} cannot be used. Only 'disable' option is allowed.", x)),