summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan2021-11-12 00:28:43 +0800
committerTing-Wei Lan2021-11-12 00:28:43 +0800
commit0e7977702c56d9a610e0a1ef9268a71a901977e8 (patch)
tree66ef73e3ebd51046430ff526cc6b25e7d4550d24
parent8c32f80b226c6a54dcd6d19a129b2d8bb8913e67 (diff)
downloadaur-0e7977702c56d9a610e0a1ef9268a71a901977e8.tar.gz
guile-git-lib: Fix clone tests
These tests fail when sshd is installed because they use the outdated protocol to connect to the SSH server. https://gitlab.com/guile-git/guile-git/-/merge_requests/31 https://aur.archlinux.org/packages/guile-git-lib/#comment-833404
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD18
-rw-r--r--guile-git-lib-merge-31-fix-clone-tests.patch39
3 files changed, 57 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 32718f4e7bb9..1062ac49afa3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,6 +12,8 @@ pkgbase = guile-git-lib
depends = guile-bytestructures
depends = libgit2>=0.28.0
source = guile-git-lib-0.5.2.tar.gz::https://gitlab.com/guile-git/guile-git/uploads/6450f3991aa524484038cdcea3fb248d/guile-git-0.5.2.tar.gz
+ source = guile-git-lib-merge-31-fix-clone-tests.patch
sha256sums = 949755a211ad6e905ecdebe66ca35bfaab638d985b9fadc928ad2538d8f5cc95
+ sha256sums = 15633944c4177fe5f79b97124d3b2c35739ecbe4246305fc2f8271be95b6e3c9
pkgname = guile-git-lib
diff --git a/PKGBUILD b/PKGBUILD
index 60e7eea75865..3329e3167d03 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,9 +11,23 @@ license=('GPL3')
depends=('guile' 'guile-bytestructures' 'libgit2>=0.28.0')
makedepends=('git')
source=(
- "${pkgname}-${pkgver}.tar.gz::https://gitlab.com/${_pkgname}/${_pkgname}/uploads/6450f3991aa524484038cdcea3fb248d/${_pkgname}-${pkgver}.tar.gz")
+ "${pkgname}-${pkgver}.tar.gz::https://gitlab.com/${_pkgname}/${_pkgname}/uploads/6450f3991aa524484038cdcea3fb248d/${_pkgname}-${pkgver}.tar.gz"
+ "${pkgname}-merge-31-fix-clone-tests.patch")
sha256sums=(
- '949755a211ad6e905ecdebe66ca35bfaab638d985b9fadc928ad2538d8f5cc95')
+ '949755a211ad6e905ecdebe66ca35bfaab638d985b9fadc928ad2538d8f5cc95'
+ '15633944c4177fe5f79b97124d3b2c35739ecbe4246305fc2f8271be95b6e3c9')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ local source_file
+ for source_file in "${source[@]}"; do
+ case "${source_file}" in
+ *.patch)
+ patch -p1 < "${srcdir}/${source_file}"
+ ;;
+ esac
+ done
+}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
diff --git a/guile-git-lib-merge-31-fix-clone-tests.patch b/guile-git-lib-merge-31-fix-clone-tests.patch
new file mode 100644
index 000000000000..4a0b6efa8764
--- /dev/null
+++ b/guile-git-lib-merge-31-fix-clone-tests.patch
@@ -0,0 +1,39 @@
+From 04edea32ea9393b6b8fa77db5f568aaf773cdffd Mon Sep 17 00:00:00 2001
+From: Will Frew <will.frew1@gmail.com>
+Date: Sat, 2 Oct 2021 12:11:13 +0300
+Subject: [PATCH] Fixes git clone tests when running against openssh 8.8
+
+OpenSSH 8.8 turns off the hostkey algorithm 'ssh-rsa' by default.
+See: https://www.openssh.com/txt/release-8.8
+
+Unfortunately, libssh2 (and therefore libgit2) do not yet support the
+newer sha2-based ssh hostkey algorithms.
+See upstream issue: https://github.com/libssh2/libssh2/issues/536
+
+This explicitly re-enables ssh-rsa on the sshd that is spun up for
+testing to ensure that libgit2 can handshake with it again.
+---
+ tests/ssh.scm.in | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/ssh.scm.in b/tests/ssh.scm.in
+index e6621ca..0311681 100644
+--- a/tests/ssh.scm.in
++++ b/tests/ssh.scm.in
+@@ -61,6 +61,13 @@ AuthorizedKeysFile ~a
+ PidFile ~a
+ PermitUserEnvironment yes
+
++# libssh2 and therefore libgit2 do not yet support
++# sha2-based rsa algorithms.
++# See upstream issue:
++# https://github.com/libssh2/libssh2/issues/536
++HostkeyAlgorithms +ssh-rsa
++PubkeyAcceptedAlgorithms +ssh-rsa
++
+ # Disable permission checks on auth files for the sake
+ # of isolated build environments.
+ StrictModes no~%"
+--
+GitLab
+