From 46333adfb81dabc139d7ee88e510798dd7bc61fe Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 7 Dec 2023 20:49:34 +0000 Subject: [PATCH] ci: add FreeBSD 14 job, fix issues - install bash to fix error when running tests: ``` ERROR: test_sshd.test - missing test plan ERROR: test_sshd.test - exited with status 127 (command not found?) ===================================== [...] # TOTAL: 4 # PASS: 2 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 2 [...] env: bash: No such file or directory ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7133852508/job/19427420687#step:3:3998 - fix sshd issue when running tests: ``` # sshd log: # Server listening on :: port 4711. # Server listening on 0.0.0.0 port 4711. # Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/key_rsa.pub # Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/openssh_server/authorized_keys ``` Ref: https://github.com/libssh2/libssh2/actions/runs/7134629175/job/19429828342#step:3:4059 Cherry-picked from #1277 Closes #1277 --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ tests/test_sshd.test | 1 + 2 files changed, 21 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29d87a59..692780fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -558,6 +558,26 @@ jobs: make -j3 make check VERBOSE=1 + build_freebsd_new: + name: 'FreeBSD 14 (autotools, openssl, clang, amd64)' + runs-on: ubuntu-22.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: 'autotools' + uses: vmactions/freebsd-vm@v1 + with: + # https://ports.freebsd.org/ + prepare: pkg install -y autoconf automake libtool bash + run: | + setenv CC clang + autoreconf -fi + mkdir bld && cd bld && ../configure --enable-werror --enable-debug \ + --with-crypto=openssl \ + --disable-docker-tests + make -j3 + make check VERBOSE=1 + build_netbsd: name: 'NetBSD (cmake, openssl, clang, amd64)' runs-on: macos-12 diff --git a/tests/test_sshd.test b/tests/test_sshd.test index ff09f65b..4bc695e4 100755 --- a/tests/test_sshd.test +++ b/tests/test_sshd.test @@ -80,6 +80,7 @@ chmod go-rwx \ "${SSHD}" \ -f "${SSHD_FIXTURE_CONFIG:-${d}/openssh_server/sshd_config}" \ -o 'Port 4711' \ + -o 'StrictModes no' \ -h "${d}/openssh_server/ssh_host_rsa_key" \ -h "${d}/openssh_server/ssh_host_ecdsa_key" \ -h "${d}/openssh_server/ssh_host_ed25519_key" \