[WIP PATCH] gnu: Update libgit2 to 1.4.2

  • Done
  • quality assurance status badge
Details
3 participants
  • Thiago Jung Bauermann
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 28 Mar 2022 15:12
(address . guix-patches@gnu.org)
0035734f12073a2f50d41641f66dacc35e2e6a2c.camel@telenet.be
Patch is not yet ready (I'm looking at the source code diff for
anything ‘suspicious’), just reserving a bug number and avoiding double
work. Will send an actual patch later.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkG0SxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iWUAPwPDIWaR+hwE0K8KE9lLlJ+c4R4
61oGHTXv9QXd4XK4bwEA5ccJ9wroiFpnP5p/sV4ZFV4GW1lwkWm3msFHueIMYQ4=
=G1r1
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 29 Mar 2022 22:30
(address . 54611@debbugs.gnu.org)
14826dd444a41d7b9c834ea08a960c7a2550da67.camel@telenet.be
Maxime Devos schreef op ma 28-03-2022 om 15:12 [+0200]:
Toggle quote (5 lines)
> Patch is not yet ready (I'm looking at the source code diff for
> anything ‘suspicious’), just reserving a bug number and avoiding
> double
> work.  Will send an actual patch later.

Looks like it cannot find libssh2:

$ ./pre-inst-env guix build libgit2
Toggle quote (2 lines)
> [...]
> -- LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed
outside of the default search path.
Toggle quote (10 lines)
> [...]
> -- Disabled features:
> * debugpool, debug pool allocator
> * debugalloc, debug strict allocators
> * debugopen, path validation in open
> * SSH, SSH transport support
> * ntlmclient, NTLM authentication support for Unix
> * SPNEGO, SPNEGO authentication support
> * iconv, iconv encoding conversion support

ssh support seems rather important. TBI ...
WIP patch attached.

Greetings,
Maxime
Toggle diff (22 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9489cf9980..901487da58 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -789,7 +789,7 @@ (define-public git-cal
(define-public libgit2
(package
(name "libgit2")
- (version "1.3.0")
+ (version "1.4.2")
(source (origin
;; Since v1.1.1, release artifacts are no longer offered (see:
;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
@@ -800,7 +800,7 @@ (define-public libgit2
(file-name (git-file-name name version))
(sha256
(base32
- "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
+ "0xd5w2kzdafipf10sdjmrzzsi12q8rkpcafajwlnmwvrbg6ldvs5"))
(modules '((guix build utils)))
(snippet '(delete-file-recursively "deps"))))
(build-system cmake-build-system)
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkNsehccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lwAAQCh8UWlWb+m+Mu8FDLTxiQS5hUu
hEVuYIZSCZ/sbxsAjgD+Jv6bTRxr4H4iQtY9LBm4ZB25LJ5yEMfdHxnLrvIR3gM=
=9W0B
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 31 Mar 2022 19:11
(address . 54611@debbugs.gnu.org)
e27cb0a8f0f19970fd0440df16b49634d1dbf989.camel@telenet.be
Maxime Devos schreef op di 29-03-2022 om 22:30 [+0200]:
Toggle quote (8 lines)
> Maxime Devos schreef op ma 28-03-2022 om 15:12 [+0200]:
> > Patch is not yet ready (I'm looking at the source code diff for
> > anything ‘suspicious’), just reserving a bug number and avoiding
> > double
> > work.  Will send an actual patch later.
>
> Looks like it cannot find libssh2:

With the attached patch, libgit2 actually finds libssh2.
Next steps:

* [ ] verify it builds on a 32-bit arch (maybe i686-linux)
* [ ] verify it cross-compiles
* [ ] verify that dependents still build.

If someone has a x86_64 and is interested in a reproducibility check:

# store item returned by "./pre-inst-env guix build libgit2 --no-
grafts"
$ ./pre-inst-env guix hash -r /gnu/store/5sm6dz6jjn7bgnqlakhlw72ncfxdyh2n-libgit2-1.4.2
1g3qbpca5j5s7iklx5ln6pi4aw0ycx69djiajgzqmw7k64b935qb

Greetings,
Maxime.
From a7df2fe70f38cfb53084e1bea14e90836fa8caa5 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 31 Mar 2022 16:34:47 +0000
Subject: [PATCH] gnu: libgit2: Update to 1.4.2.

* gnu/packages/version-control.scm (libgit2)
[version]: Update to 1.4.2.
[arguments]<#:configure-flags>: Explicitly enable SSH support.
[arguments]<#:phases>{check}: Adjust to new test runner name.
[arguments]<#:phases>{fix-hardcoded-paths}: Remove obsolete phase.
---
gnu/packages/version-control.scm | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

Toggle diff (62 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9489cf9980..f48c5d2b53 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -44,6 +44,7 @@
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -789,7 +790,7 @@ to GitHub contributions calendar.")
(define-public libgit2
(package
(name "libgit2")
- (version "1.3.0")
+ (version "1.4.2")
(source (origin
;; Since v1.1.1, release artifacts are no longer offered (see:
;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
@@ -800,7 +801,7 @@ to GitHub contributions calendar.")
(file-name (git-file-name name version))
(sha256
(base32
- "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
+ "0xd5w2kzdafipf10sdjmrzzsi12q8rkpcafajwlnmwvrbg6ldvs5"))
(modules '((guix build utils)))
(snippet '(delete-file-recursively "deps"))))
(build-system cmake-build-system)
@@ -810,6 +811,7 @@ to GitHub contributions calendar.")
(list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
"-DREGEX_BACKEND=pcre2"
"-DUSE_HTTP_PARSER=system"
+ "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
,@(if (%current-target-system)
`((string-append
"-DPKG_CONFIG_EXECUTABLE="
@@ -820,18 +822,11 @@ to GitHub contributions calendar.")
'()))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'fix-hardcoded-paths
- (lambda _
- (substitute* "tests/repo/init.c"
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- (substitute* "tests/clar/fs.h"
- (("/bin/cp") (which "cp"))
- (("/bin/rm") (which "rm")))))
;; Run checks more verbosely, unless we are cross-compiling.
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
(if tests?
- (invoke "./libgit2_clar" "-v" "-Q")
+ (invoke "./libgit2_tests" "-v" "-Q")
;; Tests may be disabled if cross-compiling.
(format #t "Test suite not run.~%")))))))
(inputs

base-commit: 9a31942cabb5c73174aee96ecd873fcf89955a9d
--
2.30.2
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkXgrBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nD2AQCOsrdPkHD1at0gotoUxqTjZKbo
u0uwXLa8kxmJ/MaYIwD/VQqmxMdUfJGMUZrnRpkRK2Buo/xmu8+Eg8VS2Ia1ugw=
=cXjd
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 2022 16:43
(address . 54611@debbugs.gnu.org)
bc3143c419bc093f317725e743f11dff4d88ec7e.camel@telenet.be
Maxime Devos schreef op do 31-03-2022 om 19:11 [+0200]:
Toggle quote (2 lines)
> * [ ] verify that dependents still build.

This seems to go rather slowly. None have failed to built yet, except
'guix' and 'kmessagelib' (https://issues.guix.gnu.org/54658,
https://issues.guix.gnu.org/53543). These test failures seem
unrelated. So far things look good.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkcPlRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7soHAP9qw9Q7mam7O99lzpAzAbsAGzew
Ijz5MrDFSH47Fet5cgD+IVCCVNo3l/GRP5mE6pd2fHkWIVg/ZuDClVdB9avOwwE=
=rGoe
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 2022 16:57
(address . 54611@debbugs.gnu.org)
9dae39b36075035aec8f2eb2d61a3f70575d38c8.camel@telenet.be
Maxime Devos schreef op do 31-03-2022 om 19:11 [+0200]:
* [ ] verify it builds on a 32-bit arch (maybe i686-linux)

It does:

$ /pre-inst-env guix build libgit2 --system=i686-linux --cores=16 --no-grafts
Toggle quote (2 lines)
> /gnu/store/gc6f6zkmh5sj2a9gpdp8xf2xqmd7dsdy-libgit2-1.4.2-debug
> /gnu/store/lx1p75x2ljj5f2g6v8ya8pqccr9kgcbn-libgit2-1.4.2
# reproducibility check
$ ./pre-inst-env guix hash -rx /gnu/store/lx1p75x2ljj5f2g6v8ya8pqccr9kgcbn-libgit2-1.4.2
Toggle quote (2 lines)
> 05ilpjik1cw1aqnf1i2mnc4ja91p0glr19r2bag2p424l0zbwh9g

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkcS9xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rw0AQCXloKbf5AtY4VtSjff8iO5GWja
hHqX2eUcgodkZMv4DQEA2Hf3gGorbNa7A3D3Ck4QVulMAHAqe5gIXMdRWViTpAE=
=m2w8
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 2022 17:05
(address . 54611@debbugs.gnu.org)
5f8dbd23f97a41bbe6b3a0f3821303339bd285cb.camel@telenet.be
Maxime Devos schreef op do 31-03-2022 om 19:11 [+0200]:
* [ ] verify it cross-compiles

It does:

$ ./pre-inst-env guix build libgit2 --target=riscv64-linux-gnu --system=x86_64-linux --no-grafts
Toggle quote (2 lines)
> /gnu/store/lj17ci85vdrmhxg2mm7ri6pxb7gky0x1-libgit2-1.4.2-debug
> /gnu/store/4ib6wzqi2r6yli214jc41w4kfm1cv7kr-libgit2-1.4.2
# reproducibility check
$ ./pre-inst-env guix hash -rx /gnu/store/4ib6wzqi2r6yli214jc41w4kfm1cv7kr-libgit2-1.4.2
Toggle quote (1 lines)
> 1dh9zw874gzn72rzmg0s57115fgwmsk5h3nx0bzdvczlh3zc9hz6
$ ./pre-inst-env guix hash -rx /gnu/store/lj17ci85vdrmhxg2mm7ri6pxb7gky0x1-libgit2-1.4.2-debug
Toggle quote (2 lines)
> 1sak58mjzrwg9jrzbv1xdxl3198qmfi794aybqypp31k9dh20n7y

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkcUqxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7i4cAQCER/4M+HUztQ0tbdAgi9qIzHy5
uMaiO5Ok3miZ/bs3fgD+L/cU0V+ghO3TOurTezX0RE2ZZufBLjEjAuYu3i7Y+AI=
=SA4r
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 1 Apr 2022 17:09
(address . 54611@debbugs.gnu.org)
c42d04df7d5a7d9ed637f02a0bdb33215b8e314a.camel@telenet.be
Maxime Devos schreef op do 31-03-2022 om 19:11 [+0200]:
Toggle quote (4 lines)
> * [ ] verify it builds on a 32-bit arch (maybe i686-linux)
> * [ ] verify it cross-compiles
> * [ ] verify that dependents still build.

I wasn't able to build-test all dependents (89) due to it taking too
long, but otherwise all boxes are checked. I think the patch is ready,
WDYT?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iIwEABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkcVsBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lr1AP0X4npW4PpMQnA2rYQKn+OeGnjD
RldxnSmodu9u2VF+8gD2LXa0TpjPyLFvxIk35RDwdQUnDtjNe3FNI+CDiy9lAQ==
=lVQV
-----END PGP SIGNATURE-----


T
T
Thiago Jung Bauermann wrote on 2 Apr 2022 06:07
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54611@debbugs.gnu.org)
87v8vsruqf.fsf@kolabnow.com
Hello Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (24 lines)
> [[PGP Signed Part:Undecided]]
> Maxime Devos schreef op di 29-03-2022 om 22:30 [+0200]:
>> Maxime Devos schreef op ma 28-03-2022 om 15:12 [+0200]:
>> > Patch is not yet ready (I'm looking at the source code diff for
>> > anything ‘suspicious’), just reserving a bug number and avoiding
>> > double
>> > work.  Will send an actual patch later.
>>
>> Looks like it cannot find libssh2:
>
> With the attached patch, libgit2 actually finds libssh2.
> Next steps:
>
> * [ ] verify it builds on a 32-bit arch (maybe i686-linux)
> * [ ] verify it cross-compiles
> * [ ] verify that dependents still build.
>
> If someone has a x86_64 and is interested in a reproducibility check:
>
> # store item returned by "./pre-inst-env guix build libgit2 --no-
> grafts"
> $ ./pre-inst-env guix hash -r /gnu/store/5sm6dz6jjn7bgnqlakhlw72ncfxdyh2n-libgit2-1.4.2
> 1g3qbpca5j5s7iklx5ln6pi4aw0ycx69djiajgzqmw7k64b935qb

I did that, and obtained the same hash!

--
Thanks
Thiago
T
T
Thiago Jung Bauermann wrote on 2 Apr 2022 06:23
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54611@debbugs.gnu.org)
87r16gru1w.fsf@kolabnow.com
Hello Maxim,

Maxime Devos <maximedevos@telenet.be> writes:
Toggle quote (12 lines)
> Maxime Devos schreef op do 31-03-2022 om 19:11 [+0200]:
> * [ ] verify it builds on a 32-bit arch (maybe i686-linux)
>
> It does:
>
> $ /pre-inst-env guix build libgit2 --system=i686-linux --cores=16 --no-grafts
>> /gnu/store/gc6f6zkmh5sj2a9gpdp8xf2xqmd7dsdy-libgit2-1.4.2-debug
>> /gnu/store/lx1p75x2ljj5f2g6v8ya8pqccr9kgcbn-libgit2-1.4.2
> # reproducibility check
> $ ./pre-inst-env guix hash -rx /gnu/store/lx1p75x2ljj5f2g6v8ya8pqccr9kgcbn-libgit2-1.4.2
>> 05ilpjik1cw1aqnf1i2mnc4ja91p0glr19r2bag2p424l0zbwh9g

This hash also matched on my system. Nice!

--
Thanks
Thiago
L
L
Ludovic Courtès wrote on 11 May 2022 23:56
Re: bug#54611: [WIP PATCH] gnu: Update libgit2 to 1.4.2
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54611-done@debbugs.gnu.org)
87o803n36q.fsf_-_@gnu.org
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (11 lines)
> From a7df2fe70f38cfb53084e1bea14e90836fa8caa5 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Thu, 31 Mar 2022 16:34:47 +0000
> Subject: [PATCH] gnu: libgit2: Update to 1.4.2.
>
> * gnu/packages/version-control.scm (libgit2)
> [version]: Update to 1.4.2.
> [arguments]<#:configure-flags>: Explicitly enable SSH support.
> [arguments]<#:phases>{check}: Adjust to new test runner name.
> [arguments]<#:phases>{fix-hardcoded-paths}: Remove obsolete phase.

I started from this patch, bumped to 1.4.3, adjusted for the
time-dependent test, adjusted ‘libgit2-1.1’, introduced ‘libgit2-1.3’
for use in packages that can’t switch to 1.4, etc.

Pushed as e764b89a52171fd5ff6d22fdb562ceb60ec6a50a.

Let me know if you notice anything wrong!

Thanks,
Ludo’.
Closed
M
M
Maxime Devos wrote on 12 May 2022 08:44
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 54611-done@debbugs.gnu.org)
27bd86eec19515be4ba5fe8b184505a813e965fe.camel@telenet.be
Ludovic Courtès schreef op wo 11-05-2022 om 23:56 [+0200]:
Toggle quote (4 lines)
> I started from this patch, bumped to 1.4.3, adjusted for the
> time-dependent test, adjusted ‘libgit2-1.1’, introduced ‘libgit2-1.3’
> for use in packages that can’t switch to 1.4, etc.

Maybe in the future, I could use
https://data.guix-patches.cbaines.net/ for determining if there are
no new build failures.

Toggle quote (5 lines)
>
> Pushed as e764b89a52171fd5ff6d22fdb562ceb60ec6a50a.
>
> Let me know if you notice anything wrong!

Thanks!

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnys5hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7r6tAQCIhBSQ9BA8dLr0wrC+VQFFVu7R
Flc2qrfM1UQzpRyeVgEA8jpAyc8f/eewcz9KdpW6/W96N8WQpnvFMUjCC11o9AM=
=Ddan
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54611@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54611
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch