diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2023-05-20 00:09:11 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2023-05-20 00:14:44 +0200 |
commit | 66611395e0027807d95cbe430e4125e5dd800e11 (patch) | |
tree | c2db7f31e0fb507671f6f4fbcf1f7890ee81f590 /pcr/guile-git-lib | |
parent | 57f3a920c105101d1173a356832a146eed8ab668 (diff) |
pcr: [guile-git-lib]: Update to 0.5.2
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'pcr/guile-git-lib')
-rw-r--r-- | pcr/guile-git-lib/PKGBUILD | 51 | ||||
-rw-r--r-- | pcr/guile-git-lib/guile-git-lib-merge-31-fix-clone-tests.patch | 39 | ||||
-rw-r--r-- | pcr/guile-git-lib/guile-git-lib-merge-32-libgit2-1.2.0.patch | 100 |
3 files changed, 168 insertions, 22 deletions
diff --git a/pcr/guile-git-lib/PKGBUILD b/pcr/guile-git-lib/PKGBUILD index 7cd3417bd..80b29bbcf 100644 --- a/pcr/guile-git-lib/PKGBUILD +++ b/pcr/guile-git-lib/PKGBUILD @@ -1,49 +1,56 @@ # Maintainer (aur): lantw44 (at) gmail (dot) com +# Maintainer: Parabola Hackers <dev@lists.parabola.nu> # parabola changes and rationale: -# - disabled tests due to faililng 'clone' test +# - disabled tests due to failing tests pkgname=guile-git-lib _pkgname=guile-git -pkgver=0.3.0 -pkgrel=1 +pkgver=0.5.2 +pkgrel=2 pkgdesc='Guile bindings for libgit2' arch=('x86_64' 'i686' 'armv7h') url="https://gitlab.com/guile-git/guile-git" license=('GPL3') -depends=('guile' 'guile-bytestructures' 'libgit2') +depends=('guile' 'guile-bytestructures' 'libgit2>=0.28.0') makedepends=('git') source=( - "https://gitlab.com/${_pkgname}/${_pkgname}/uploads/4c563d8e7e1ff84396abe8ca7011bcaf/${_pkgname}-${pkgver}.tar.gz" - "https://gitlab.com/guile-git/guile-git/-/raw/v${pkgver}/tests/.ssh/id_rsa_client" - "https://gitlab.com/guile-git/guile-git/-/raw/v${pkgver}/tests/.ssh/id_rsa_client.pub" - "https://gitlab.com/guile-git/guile-git/-/raw/v${pkgver}/tests/.ssh/id_rsa_server") + "${pkgname}-${pkgver}.tar.gz::https://gitlab.com/${_pkgname}/${_pkgname}/uploads/6450f3991aa524484038cdcea3fb248d/${_pkgname}-${pkgver}.tar.gz" + "${pkgname}-merge-31-fix-clone-tests.patch" + "${pkgname}-merge-32-libgit2-1.2.0.patch") sha256sums=( - '75ce437da024fa57d6a2a48ae4e05d48cb42d84f73a3d372baef5c68421bb130' - 'e58e37ec6d5916b46b785b9db5ae05498e5dc25b1beaa46eee227bf415fee952' - '8a3b18d1d725f69ab778e0badbc43746766b591a54f965ee2e57d82822775d43' - '0d49a22bd80c3d1d18061560eecb095c0056ade55fee2fb4c48c290254204641') + '949755a211ad6e905ecdebe66ca35bfaab638d985b9fadc928ad2538d8f5cc95' + '15633944c4177fe5f79b97124d3b2c35739ecbe4246305fc2f8271be95b6e3c9' + 'f353c23e2dae27a715d9dae04bfd269c9262e221082b959e0721e2c4471a7eeb') prepare() { cd "${srcdir}/${_pkgname}-${pkgver}" - mkdir tests/.ssh - cp \ - "${srcdir}/$(basename "${source[1]}")" \ - "${srcdir}/$(basename "${source[2]}")" \ - "${srcdir}/$(basename "${source[3]}")" \ - tests/.ssh + 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}" + autoreconf -fi ./configure --prefix=/usr make } -# check() { -# cd "${srcdir}/${_pkgname}-${pkgver}" -# make check -# } +check() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # FAIL: tests/clone.scm - clone-auth-ssh-credentials + # FAIL: tests/clone.scm - clone-auth-ssh-agent + # FAIL: tests/clone.scm - clone-and-fetch-auth-ssh-credentials + # FAIL: tests/clone.scm - clone + transfer-progress + # make check +} package() { cd "${srcdir}/${_pkgname}-${pkgver}" diff --git a/pcr/guile-git-lib/guile-git-lib-merge-31-fix-clone-tests.patch b/pcr/guile-git-lib/guile-git-lib-merge-31-fix-clone-tests.patch new file mode 100644 index 000000000..4a0b6efa8 --- /dev/null +++ b/pcr/guile-git-lib/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 + diff --git a/pcr/guile-git-lib/guile-git-lib-merge-32-libgit2-1.2.0.patch b/pcr/guile-git-lib/guile-git-lib-merge-32-libgit2-1.2.0.patch new file mode 100644 index 000000000..d1ec23281 --- /dev/null +++ b/pcr/guile-git-lib/guile-git-lib-merge-32-libgit2-1.2.0.patch @@ -0,0 +1,100 @@ +From 278d23a18df6913bfe87c214d0e6dbeee6996f1d Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Mon, 22 Nov 2021 22:08:31 -0500 +Subject: [PATCH 1/3] structs: Adjust %remote-callbacks for libgit2 v1.2.0. + +Fixes <https://gitlab.com/guile-git/guile-git/-/issues/23>. + +* configure.ac (AC_CHECK_MEMBER) +<git_remote_callbacks.remote_ready>: New member check. +<git_remote_callbacks.resolve_url>: Streamline. +* git/config.scm.in (%have-remote-callbacks-remote-ready?): New variable. +* git/structs.scm (%remote-callbacks): Conditionally add the new +callback 'remote_ready' callback field. +--- + configure.ac | 18 ++++++++++++------ + git/configuration.scm.in | 6 ++++++ + git/structs.scm | 6 ++++++ + 3 files changed, 24 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 107e6ca..20e9019 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,6 +2,7 @@ dnl Guile-Git --- GNU Guile bindings of libgit2 + dnl Copyright © 2016-2018 Erik Edrosa <erik.edrosa@gmail.com> + dnl Copyright © 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> + dnl Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ++dnl Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> + dnl + dnl This file is part of Guile-Git. + dnl +@@ -43,15 +44,20 @@ AS_IF([test "x$LIBGIT2_LIBDIR" = "x"], [ + ]) + AC_SUBST([LIBGIT2_LIBDIR]) + ++dnl Does the 'git_remote_callbacks' struct have a 'remote_ready' field? ++dnl It was added in 1.2.0, obsoleting 'resolve_url'. ++AC_CHECK_MEMBER([git_remote_callbacks.remote_ready], ++ [HAVE_REMOTE_CALLBACKS_REMOTE_READY="#true"], ++ [HAVE_REMOTE_CALLBACKS_REMOTE_READY="#false"], ++ [[#include <git2.h>]]) ++AC_SUBST([HAVE_REMOTE_CALLBACKS_REMOTE_READY]) ++ + dnl Does the 'git_remote_callbacks' struct have a 'resolve_url' field? + dnl It's missing in libgit2 0.28.5, added in 1.0. +-AC_CHECK_MEMBER([git_remote_callbacks.resolve_url], [], [], ++AC_CHECK_MEMBER([git_remote_callbacks.resolve_url], ++ [HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#true"], ++ [HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#false"], + [[#include <git2.h>]]) +-if test "x$ac_cv_member_git_remote_callbacks_resolve_url" = "xyes"; then +- HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#true" +-else +- HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#false" +-fi + AC_SUBST([HAVE_REMOTE_CALLBACKS_RESOLVE_URL]) + + dnl Those binaries are required for ssh authentication tests. +diff --git a/git/configuration.scm.in b/git/configuration.scm.in +index c45f698..64c4360 100644 +--- a/git/configuration.scm.in ++++ b/git/configuration.scm.in +@@ -19,11 +19,17 @@ + + (define-module (git configuration) + #:export (%libgit2 ++ %have-remote-callbacks-remote-ready? + %have-remote-callbacks-resolve-url?)) + + (define %libgit2 + "@LIBGIT2_LIBDIR@/libgit2") + ++(define %have-remote-callbacks-remote-ready? ++ ;; True if the 'git_remote_callbacks' struct has a ++ ;; 'remote_ready' field. ++ @HAVE_REMOTE_CALLBACKS_REMOTE_READY@) ++ + (define %have-remote-callbacks-resolve-url? + ;; True if the 'git_remote_callbacks' struct has a 'resolve_url' field. + @HAVE_REMOTE_CALLBACKS_RESOLVE_URL@) +diff --git a/git/structs.scm b/git/structs.scm +index ca51728..be3d050 100644 +--- a/git/structs.scm ++++ b/git/structs.scm +@@ -637,6 +637,12 @@ type to 'specified for this to take effect." + (push-update-reference ,(bs:pointer uint8)) + (push-negotiation ,(bs:pointer uint8)) + (transport ,(bs:pointer uint8)) ++ ++ ;; Added in libgit2 1.2.0. ++ ,@(if %have-remote-callbacks-remote-ready? ++ `((remote-ready ,(bs:pointer uint8))) ++ '()) ++ + (payload ,(bs:pointer uint8)) + + ;; libgit2 1.0 added this field, which is missing from 0.28.5, +-- +GitLab + |