diff options
author | Theo Buehler <tb@openbsd.org> | 2023-11-12 00:02:17 +0100 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2023-11-12 00:35:10 +0100 |
commit | 291c0d96361428bf29ffb83d359d043ae26a2b21 (patch) | |
tree | cbf62bd6a7cc198b35b491b6272fec1cfcd8f968 | |
parent | 63635ea958fc6d643c099a54ef84182d8a64de11 (diff) | |
download | portable-291c0d96361428bf29ffb83d359d043ae26a2b21.tar.gz portable-291c0d96361428bf29ffb83d359d043ae26a2b21.tar.bz2 portable-291c0d96361428bf29ffb83d359d043ae26a2b21.zip |
Replace rust-openssl patch with an ed script
It is annoying to update this patch all the time. An easy ed script
does the trick just as well.
-rw-r--r-- | .github/rust-openssl.patch | 12 | ||||
-rw-r--r-- | .github/workflows/rust-openssl.yml | 10 |
2 files changed, 9 insertions, 13 deletions
diff --git a/.github/rust-openssl.patch b/.github/rust-openssl.patch deleted file mode 100644 index 4a8dd3f..0000000 --- a/.github/rust-openssl.patch +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs | ||
2 | index bbee7c5c..57033b2d 100644 | ||
3 | --- a/openssl-sys/build/main.rs | ||
4 | +++ b/openssl-sys/build/main.rs | ||
5 | @@ -293,6 +293,7 @@ See rust-openssl documentation for more information: | ||
6 | (3, 8, 0) => ('3', '8', '0'), | ||
7 | (3, 8, 1) => ('3', '8', '1'), | ||
8 | (3, 8, _) => ('3', '8', 'x'), | ||
9 | + (3, 9, _) => ('3', '8', 'x'), | ||
10 | _ => version_error(), | ||
11 | }; | ||
12 | |||
diff --git a/.github/workflows/rust-openssl.yml b/.github/workflows/rust-openssl.yml index cec2de0..ef5a7b1 100644 --- a/.github/workflows/rust-openssl.yml +++ b/.github/workflows/rust-openssl.yml | |||
@@ -29,6 +29,14 @@ jobs: | |||
29 | - name: "Run rust-openssl tests" | 29 | - name: "Run rust-openssl tests" |
30 | run: | | 30 | run: | |
31 | cd rust-openssl | 31 | cd rust-openssl |
32 | patch -p1 < ../.github/rust-openssl.patch | 32 | # instead of erroring use the last supported version |
33 | ed -s openssl-sys/build/main.rs <<-EOF | ||
34 | /_ => version_error/-1 | ||
35 | .t. | ||
36 | s/(.*=/_ = | ||
37 | +1d | ||
38 | w | ||
39 | q | ||
40 | EOF | ||
33 | export OPENSSL_DIR=${HOME}/opt LD_LIBRARY_PATH=${HOME}/opt/lib | 41 | export OPENSSL_DIR=${HOME}/opt LD_LIBRARY_PATH=${HOME}/opt/lib |
34 | cargo test --verbose | 42 | cargo test --verbose |