diff mbox series

[bug#60358,v3,2/2] gnu: guile-gnutls: Update to 3.7.11.

Message ID 0217a832b73fa21f3346e75385eb7d8d7e18edae.camel@planete-kraus.eu
State New
Headers show
Series [bug#60358,v3,1/2] gnu: Add gnulib. | expand

Commit Message

Vivien Kraus Dec. 28, 2022, 2:20 a.m. UTC
* gnu/packages/tls.scm (guile-gnutls) [phases]: Patch-shebang autopull.sh and
autogen.sh.
* gnu/packages/tls.scm (guile-gnutls) [native-inupts]: Add gnulib and git.
---
 gnu/packages/tls.scm | 41 ++++++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 13 deletions(-)

Comments

Vivien Kraus Dec. 29, 2022, 3:25 p.m. UTC | #1
Le mercredi 28 décembre 2022 à 03:20 +0100, Vivien Kraus a écrit :
> @@ -412,7 +421,13 @@ (define-public guile-gnutls
>             pkg-config
>             texinfo
>             gnutls                 ;XXX: 'guile-snarf' invokes the
> native 'cpp'
> -           guile-3.0))
> +           guile-3.0
> +           (gnulib-checkout
> +            "2022-12-06"
> +            "440b528b1d81dd31b2a2e4dde20d5c837c147811"
> +            "15mq43abbnkbamchc9lynrvrd5ql8qacgyx2ph4kkngxf1bz3pqy")
> +           git ; gnulib requires git even if nothing is downloaded.
> +           ))
>      (inputs
>       (list gnutls-latest
>             guile-3.0))

I can still pick an exact commit of gnulib (I was not aware that it
would be required, I thought the most common idea was "give me any
version of gnulib later than <>"). And I don’t have to package every
commit of gnulib, but only those that are actually used.

I’m not sure guix people will be happy to have each package use a
differently outdated version of gnulib though.
Simon Josefsson Dec. 29, 2022, 3:37 p.m. UTC | #2
Vivien Kraus <vivien@planete-kraus.eu> writes:

> Le mercredi 28 décembre 2022 à 03:20 +0100, Vivien Kraus a écrit :
>> @@ -412,7 +421,13 @@ (define-public guile-gnutls
>>             pkg-config
>>             texinfo
>>             gnutls                 ;XXX: 'guile-snarf' invokes the
>> native 'cpp'
>> -           guile-3.0))
>> +           guile-3.0
>> +           (gnulib-checkout
>> +            "2022-12-06"
>> +            "440b528b1d81dd31b2a2e4dde20d5c837c147811"
>> +            "15mq43abbnkbamchc9lynrvrd5ql8qacgyx2ph4kkngxf1bz3pqy")
>> +           git ; gnulib requires git even if nothing is downloaded.
>> +           ))
>>      (inputs
>>       (list gnutls-latest
>>             guile-3.0))
>
> I can still pick an exact commit of gnulib (I was not aware that it
> would be required, I thought the most common idea was "give me any
> version of gnulib later than <>"). And I don’t have to package every
> commit of gnulib, but only those that are actually used.
>
> I’m not sure guix people will be happy to have each package use a
> differently outdated version of gnulib though.

Interesting approach!  I believe this works in Guix, and is also
compatible with the way gnulib is intended to be used.

However, doesn't this lead to a gazillion variants of gnulib being
installed into /gnu/store, once all projects that use gnulib adopt this
model in Guix?  And built on the build servers, and downloaded via
substitute servers?  One gnulib for each particular commit that is used
by each respective project that rely on gnulib.  That sounds worse than
having to download copies of gnulib when building a Guix package, which
I thought was what you wanted to accomplish.

/Simon
Vivien Kraus Dec. 29, 2022, 4:06 p.m. UTC | #3
Le jeudi 29 décembre 2022 à 16:37 +0100, Simon Josefsson a écrit :
> One gnulib for each particular commit that is used
> by each respective project that rely on gnulib.

Yes, but a shallow checkout of gnulib. If I packaged the whole git
archive (if I could do it reliably), that would bring the checkouts for
all commits in gnulib, used or not. Granted, compressed.

> That sounds worse than
> having to download copies of gnulib when building a Guix package
From what I understand, the idea in guix would be: yes that would be
horrible, the solution is for every project to use the same version of
gnulib!
Simon Josefsson Dec. 29, 2022, 4:14 p.m. UTC | #4
Vivien Kraus <vivien@planete-kraus.eu> writes:

>> That sounds worse than
>> having to download copies of gnulib when building a Guix package
> From what I understand, the idea in guix would be: yes that would be
> horrible, the solution is for every project to use the same version of
> gnulib!

That won't happen and is impossible -- while I don't have an example, in
general you can't build an old version of, say, coreutils with today's
gnulib, or expect that a future version of coreutils will work with
today's gnulib.  I'm sure trying old enough coreutils, or some other
project that use gnulib, will come up with an example that breaks the
build (or produce incorrect results).

/Simon
diff mbox series

Patch

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index a74b423ccf..5bb0faaf64 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -56,6 +56,7 @@  (define-module (gnu packages tls)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages build-tools)
   #:use-module (gnu packages check)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages dns)
@@ -80,6 +81,7 @@  (define-module (gnu packages tls)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages time)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages base)
   #:use-module (srfi srfi-1))
 
@@ -381,7 +383,7 @@  (define-public guile-gnutls
     ;; This package supersedes the Guile bindings that came with GnuTLS until
     ;; version 3.7.8 included.
     (name "guile-gnutls")
-    (version "3.7.9")
+    (version "3.7.11")
     (home-page "https://gitlab.com/gnutls/guile/")
     (source (origin
               (method git-fetch)
@@ -390,21 +392,28 @@  (define-public guile-gnutls
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "00sfpqjmd263ka51fq4xf7nvaaxyfqsr3r8fj94jgx45q6q6n6wq"))
+                "06d7v3i0d9ayp7zqk1rsy4z0wfpq69n0r54f1xrppb9gn7q9iva6"))
               (file-name (git-file-name name version))
               (patches (search-patches "gnutls-cross.patch"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags
-       ;; Tell the build system that we want Guile bindings installed to
-       ;; the output instead of Guiles own module directory.
-       (list "--disable-static"
-             (string-append "--with-guile-site-dir="
-                            "$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)")
-             (string-append "--with-guile-site-ccache-dir="
-                            "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache")
-             (string-append "--with-guile-extension-dir="
-                            "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions"))))
+     (list
+      #:configure-flags
+      ;; Tell the build system that we want Guile bindings installed to the
+      ;; output instead of Guiles own module directory.
+      #~(list "--disable-static"
+              (string-append "--with-guile-site-dir="
+                             "$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)")
+              (string-append "--with-guile-site-ccache-dir="
+                             "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache")
+              (string-append "--with-guile-extension-dir="
+                             "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-more-shebangs
+            (lambda _
+              (for-each patch-shebang
+                        '("autopull.sh" "autogen.sh")))))))
     (native-inputs
      (list autoconf
            automake
@@ -412,7 +421,13 @@  (define-public guile-gnutls
            pkg-config
            texinfo
            gnutls                 ;XXX: 'guile-snarf' invokes the native 'cpp'
-           guile-3.0))
+           guile-3.0
+           (gnulib-checkout
+            "2022-12-06"
+            "440b528b1d81dd31b2a2e4dde20d5c837c147811"
+            "15mq43abbnkbamchc9lynrvrd5ql8qacgyx2ph4kkngxf1bz3pqy")
+           git ; gnulib requires git even if nothing is downloaded.
+           ))
     (inputs
      (list gnutls-latest
            guile-3.0))