Skip to content

Commit

Permalink
Fix musl release
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed May 14, 2022
1 parent 10d66db commit 6d77eed
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 43 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ jobs:
path: |
${{ env.X86_GNU_REL_BIN }}
# NOTE: For musl, we only support ssh2 and not libssh for the time being due to some
# build issue with libssh-rs-sys not finding the symbol ENGINE_cleanup in libcrypto
linux_musl:
name: "Build release on Linux (musl)"
runs-on: ubuntu-latest
Expand All @@ -147,7 +149,7 @@ jobs:
- name: Build binary (MUSL x86_64)
run: |
source $HOME/.cargo/env
cargo build --release --all-features --target ${{ env.X86_MUSL_ARCH }}
cargo build --release --no-default-features --features ssh2 --target ${{ env.X86_MUSL_ARCH }}
ls -l ./${{ env.X86_MUSL_DIR }}
strip ./${{ env.X86_MUSL_DIR }}/${{ env.BUILD_BIN }}
mv ./${{ env.X86_MUSL_DIR }}/${{ env.BUILD_BIN }} ./${{ env.X86_MUSL_REL_BIN }}
Expand Down
30 changes: 0 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ lto = true
codegen-units = 1

[features]
default = ["ssh2"]
ssh2 = ["distant-ssh2"]
default = ["libssh", "ssh2"]
libssh = ["distant-ssh2/libssh"]
ssh2 = ["distant-ssh2/ssh2"]

[dependencies]
derive_more = { version = "0.99.16", default-features = false, features = ["display", "from", "error", "is_variant"] }
Expand All @@ -42,7 +43,7 @@ termwiz = "0.15.0"
whoami = "1.1.2"

# Optional native SSH functionality
distant-ssh2 = { version = "=0.16.1", path = "distant-ssh2", features = ["serde"], optional = true }
distant-ssh2 = { version = "=0.16.1", path = "distant-ssh2", default-features = false, features = ["serde"], optional = true }

[target.'cfg(unix)'.dependencies]
fork = "0.1.18"
Expand Down
15 changes: 6 additions & 9 deletions distant-ssh2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ repository = "https://github.com/chipsenkbeil/distant"
readme = "README.md"
license = "MIT OR Apache-2.0"

[features]
default = ["libssh", "ssh2"]
libssh = ["wezterm-ssh/libssh-rs", "wezterm-ssh/vendored-openssl-libssh-rs"]
ssh2 = ["wezterm-ssh/ssh2", "wezterm-ssh/vendored-openssl-ssh2"]

[dependencies]
async-compat = "0.2.1"
distant-core = { version = "=0.16.1", path = "../distant-core" }
Expand All @@ -20,15 +25,7 @@ rpassword = "5.0.1"
shell-words = "1.0"
smol = "1.2"
tokio = { version = "1.12.0", features = ["full"] }
wezterm-ssh = { version = "0.4.0", features = ["vendored-openssl"] }

# Constrained to the last version of openssl that builds together with
# `openssl-sys = "=0.9.71"` which we are constrained to in libssh-rs used
# by wezterm-ssh until it switches back to openssl 3.x.
# https://github.com/sfackler/rust-openssl/issues/1630
# https://github.com/sfackler/rust-openssl/pull/1578
# https://github.com/wez/libssh-rs/blob/main/libssh-rs-sys/Cargo.toml
openssl = "=0.10.38"
wezterm-ssh = { version = "0.4.0", default-features = false }

# Optional serde support for data structures
serde = { version = "1.0.126", features = ["derive"], optional = true }
Expand Down

0 comments on commit 6d77eed

Please sign in to comment.