Re: [PATCH] gnu: curl: Add ca-bundle to config.
ng0writes: >> how can I make this valid: >> >>(arguments >> `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2" >> "--without-libmetalink" "--without-winidn" >> "--without-librtmp" "--without-nghttp2" >> "--without-nss" "--without-cyassl" >> "--without-polarssl" "--without-ssl" >> "--without-winssl" "--without-darwinssl" >> "--disable-sspi" "--disable-ntlm-wb" >> "--disable-ldap" "--disable-rtsp" "--disable-dict" >> "--disable-telnet" "--disable-tftp" >> "--disable-pop3" >> "--disable-imap" "--disable-smtp" >> "--disable-gopher" >> "--disable-file" "--disable-ftp" "--disable-smb" >> (string-append >>"--with-ca-bundle=" >>(string-append (assoc-ref %build-inputs >> "nss-certs") >> >> "/etc/ssl/certs/ca-certificates.crt"))) >> >> The string-append is not valid here. > > Solved, by using "(list" here. The reason why this didn’t work is because you’re expecting code to be evaluated inside of an “inert” expression. (+ 1 2) is evaluated right away and the result is 3 '(+ 1 2) is a quoted expression, so it’s just a list of '+, 1, and 2. Think of the ' as “DATA MODE” `(+ 1 2) is a quasiquoted expression. Think of the backtick as a toggle switch. When it’s up it means “DATA MODE”, when it is down (,) it means “CODE MODE”. Example: `(+ 1 2 ,(string->number "4")) this means: DATA MODE + 1 2 CODE MODE (string->number "4") so you get a list with the following contents: '+, 1, 2, and the number 4. Your configure flags above are a quoted list, so everything that follows is just data. “string-append” is not special, it’s just another symbol in the list. You can try this in the REPL to convince yourself that this is how quoting works. Note the difference between: `(#:configure-flags '("foo" "bar" (string-append "baz" "lightyear"))) and `(#:configure-flags '("foo" "bar" ,(string-append "baz" "lightyear"))) The comma (“unquote”) flips the toggle switch and the expression is evaluated. Using “list” just means that you are not using quotation at all. One final note: >> (string-append >>"--with-ca-bundle=" >>(string-append (assoc-ref %build-inputs >> "nss-certs") >> >> "/etc/ssl/certs/ca-certificates.crt"))) That’s really not pretty. You don’t need to nest string-append expressions. (string-append "this" "and" "that") returns the same value as (string-append "this" (string-append "and" "that")) ~~ Ricardo
Re: [PATCH] gnu: curl: Add ca-bundle to config.
ng0writes: > Marius Bakke writes: > >> Marius Bakke writes: >> >>> ng0 writes: >>> * gnu/packages/curl.scm (curl)[arguments]: Add "--with-ca-bundle" configure flag. [arguments]: Disable failing test number 324. --- gnu/packages/curl.scm | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 7329d870d..3473055b8 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Tomáš Čech ;;; Copyright © 2015 Ludovic Courtès ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,7 +66,8 @@ ("pkg-config" ,pkg-config) ("python" ,python-2))) (arguments -`(#:configure-flags '("--with-gnutls" "--with-gssapi") +`(#:configure-flags '("--with-gnutls" "--with-gssapi" + "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt") >>> >>> This may not work on all distros, and is "impure" since this path is not >>> managed by Guix. If we are doing this, it should be referring to >>> (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/..."). >>> That will likely fix the test as well. >> >> I realized shortly after posting why this wasn't done already. Curl has >> 1403 dependent packages, which would apply for "nss-certs" as well if >> that is added as input. Obviously we want to be able to update TLS >> certificates quickly without rebuilding ~1/4 of the tree. >> >> Perhaps it could be added as a separate package, or by e.g. renaming the >> current curl package to "curl-minimal". > > Appending to my last message: > how can I make this valid: > >(arguments > `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2" > "--without-libmetalink" "--without-winidn" > "--without-librtmp" "--without-nghttp2" > "--without-nss" "--without-cyassl" > "--without-polarssl" "--without-ssl" > "--without-winssl" "--without-darwinssl" > "--disable-sspi" "--disable-ntlm-wb" > "--disable-ldap" "--disable-rtsp" "--disable-dict" > "--disable-telnet" "--disable-tftp" "--disable-pop3" > "--disable-imap" "--disable-smtp" "--disable-gopher" > "--disable-file" "--disable-ftp" "--disable-smb" > (string-append >"--with-ca-bundle=" >(string-append (assoc-ref %build-inputs > "nss-certs") > > "/etc/ssl/certs/ca-certificates.crt"))) > > The string-append is not valid here. Solved, by using "(list" here. -- ♥Ⓐ ng0 PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org
Re: [PATCH] gnu: curl: Add ca-bundle to config.
Marius Bakkewrites: > Marius Bakke writes: > >> ng0 writes: >> >>> * gnu/packages/curl.scm (curl)[arguments]: Add "--with-ca-bundle" configure >>> flag. >>> [arguments]: Disable failing test number 324. >>> --- >>> gnu/packages/curl.scm | 13 - >>> 1 file changed, 12 insertions(+), 1 deletion(-) >>> >>> diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm >>> index 7329d870d..3473055b8 100644 >>> --- a/gnu/packages/curl.scm >>> +++ b/gnu/packages/curl.scm >>> @@ -4,6 +4,7 @@ >>> ;;; Copyright © 2015 Tomáš Čech >>> ;;; Copyright © 2015 Ludovic Courtès >>> ;;; Copyright © 2016 Leo Famulari >>> +;;; Copyright © 2017 ng0 >>> ;;; >>> ;;; This file is part of GNU Guix. >>> ;;; >>> @@ -65,7 +66,8 @@ >>> ("pkg-config" ,pkg-config) >>> ("python" ,python-2))) >>> (arguments >>> -`(#:configure-flags '("--with-gnutls" "--with-gssapi") >>> +`(#:configure-flags '("--with-gnutls" "--with-gssapi" >>> + >>> "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt") >> >> This may not work on all distros, and is "impure" since this path is not >> managed by Guix. If we are doing this, it should be referring to >> (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/..."). >> That will likely fix the test as well. > > I realized shortly after posting why this wasn't done already. Curl has > 1403 dependent packages, which would apply for "nss-certs" as well if > that is added as input. Obviously we want to be able to update TLS > certificates quickly without rebuilding ~1/4 of the tree. > > Perhaps it could be added as a separate package, or by e.g. renaming the > current curl package to "curl-minimal". Appending to my last message: how can I make this valid: (arguments `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2" "--without-libmetalink" "--without-winidn" "--without-librtmp" "--without-nghttp2" "--without-nss" "--without-cyassl" "--without-polarssl" "--without-ssl" "--without-winssl" "--without-darwinssl" "--disable-sspi" "--disable-ntlm-wb" "--disable-ldap" "--disable-rtsp" "--disable-dict" "--disable-telnet" "--disable-tftp" "--disable-pop3" "--disable-imap" "--disable-smtp" "--disable-gopher" "--disable-file" "--disable-ftp" "--disable-smb" (string-append "--with-ca-bundle=" (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/certs/ca-certificates.crt"))) The string-append is not valid here. -- ♥Ⓐ ng0 PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org
Re: [PATCH] gnu: curl: Add ca-bundle to config.
Marius Bakkewrites: > Marius Bakke writes: > >> ng0 writes: >> >>> * gnu/packages/curl.scm (curl)[arguments]: Add "--with-ca-bundle" configure >>> flag. >>> [arguments]: Disable failing test number 324. >>> --- >>> gnu/packages/curl.scm | 13 - >>> 1 file changed, 12 insertions(+), 1 deletion(-) >>> >>> diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm >>> index 7329d870d..3473055b8 100644 >>> --- a/gnu/packages/curl.scm >>> +++ b/gnu/packages/curl.scm >>> @@ -4,6 +4,7 @@ >>> ;;; Copyright © 2015 Tomáš Čech >>> ;;; Copyright © 2015 Ludovic Courtès >>> ;;; Copyright © 2016 Leo Famulari >>> +;;; Copyright © 2017 ng0 >>> ;;; >>> ;;; This file is part of GNU Guix. >>> ;;; >>> @@ -65,7 +66,8 @@ >>> ("pkg-config" ,pkg-config) >>> ("python" ,python-2))) >>> (arguments >>> -`(#:configure-flags '("--with-gnutls" "--with-gssapi") >>> +`(#:configure-flags '("--with-gnutls" "--with-gssapi" >>> + >>> "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt") >> >> This may not work on all distros, and is "impure" since this path is not >> managed by Guix. If we are doing this, it should be referring to >> (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/..."). >> That will likely fix the test as well. > > I realized shortly after posting why this wasn't done already. Curl has > 1403 dependent packages, which would apply for "nss-certs" as well if > that is added as input. Obviously we want to be able to update TLS > certificates quickly without rebuilding ~1/4 of the tree. > > Perhaps it could be added as a separate package, or by e.g. renaming the > current curl package to "curl-minimal". Okay, I will wait for more people to comment on the best route to follow here for curl. For gnurl: As right now gnurl is only required by gnunet and related packages, I will send in a patch for this in advance for gnurl. -- ♥Ⓐ ng0 PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org
Re: [PATCH] gnu: curl: Add ca-bundle to config.
Marius Bakkewrites: > ng0 writes: > >> * gnu/packages/curl.scm (curl)[arguments]: Add "--with-ca-bundle" configure >> flag. >> [arguments]: Disable failing test number 324. >> --- >> gnu/packages/curl.scm | 13 - >> 1 file changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm >> index 7329d870d..3473055b8 100644 >> --- a/gnu/packages/curl.scm >> +++ b/gnu/packages/curl.scm >> @@ -4,6 +4,7 @@ >> ;;; Copyright © 2015 Tomáš Čech >> ;;; Copyright © 2015 Ludovic Courtès >> ;;; Copyright © 2016 Leo Famulari >> +;;; Copyright © 2017 ng0 >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -65,7 +66,8 @@ >> ("pkg-config" ,pkg-config) >> ("python" ,python-2))) >> (arguments >> -`(#:configure-flags '("--with-gnutls" "--with-gssapi") >> +`(#:configure-flags '("--with-gnutls" "--with-gssapi" >> + >> "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt") > > This may not work on all distros, and is "impure" since this path is not > managed by Guix. If we are doing this, it should be referring to > (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/..."). > That will likely fix the test as well. I realized shortly after posting why this wasn't done already. Curl has 1403 dependent packages, which would apply for "nss-certs" as well if that is added as input. Obviously we want to be able to update TLS certificates quickly without rebuilding ~1/4 of the tree. Perhaps it could be added as a separate package, or by e.g. renaming the current curl package to "curl-minimal". signature.asc Description: PGP signature
Re: [PATCH] gnu: curl: Add ca-bundle to config.
ng0writes: > * gnu/packages/curl.scm (curl)[arguments]: Add "--with-ca-bundle" configure > flag. > [arguments]: Disable failing test number 324. > --- > gnu/packages/curl.scm | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm > index 7329d870d..3473055b8 100644 > --- a/gnu/packages/curl.scm > +++ b/gnu/packages/curl.scm > @@ -4,6 +4,7 @@ > ;;; Copyright © 2015 Tomáš Čech > ;;; Copyright © 2015 Ludovic Courtès > ;;; Copyright © 2016 Leo Famulari > +;;; Copyright © 2017 ng0 > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -65,7 +66,8 @@ > ("pkg-config" ,pkg-config) > ("python" ,python-2))) > (arguments > -`(#:configure-flags '("--with-gnutls" "--with-gssapi") > +`(#:configure-flags '("--with-gnutls" "--with-gssapi" > + > "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt") This may not work on all distros, and is "impure" since this path is not managed by Guix. If we are doing this, it should be referring to (string-append (assoc-ref %build-inputs "nss-certs") "/etc/ssl/..."). That will likely fix the test as well. signature.asc Description: PGP signature