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 dnl Copyright © 2017, 2019, 2020, 2021 Ludovic Courtès dnl Copyright © 2019 Mathieu Othacehe +dnl Copyright © 2021 Maxim Cournoyer 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 ]]) +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 ]]) -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, Binary Installation): Update accordingly. * etc/guix-install.sh * etc/guix-install.sh (sys_create_store, sys_enable_guix_daemon) (sys_authorize_build_farms): Likewise. * etc/guix-publish.conf.in, etc/guix-publish.service.in, etc/guix-daemon.conf.in, etc/guix-daemon.service.in: Update file names accordingly. Ludovic Courtès 2017-07-15Remove task from 'guix-daemon.conf'....The 'task' means that events that led to this job starting will be blocked until it has stopped. Tasks are short lived jobs, whereas the guix-daemon is a long lived service. Including 'task' means that attempts to start the guix-daemon appear to hang, as upstart waits for it to exit. * etc/guix-daemon.conf.in: Remove 'task'. Christopher Baines 2017-03-06build: Don't embed absolute paths in .service and .conf service files....Otherwise, users will be stuck running an old copy of guix and the guix-daemon if they copy the service files instead of symlinking them. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/guix-publish.conf.in, etc/guix-publish.service.in: Expand @localstatedir@ instead of @bindir@. * nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Use @localstatedir@ instead of @bindir@. Leo Famulari 2015-11-26Add 'guix-daemon.conf' job for Upstart....* etc/guix-daemon.conf.in: New file. * daemon.am (CLEANFILES): Add etc/guix-daemon.conf. (upstartjobdir, nodist_upstartjob_DATA): New variables. (EXTRA_DIST): Add etc/guix-daemon.conf.in. * doc/guix.texi (Binary Installation, Build Environment Setup): Mention 'guix-daemon.conf'. Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes@rocketmail.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mario Daniel Ruiz Saavedra