guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: le-certs: Create OpenSSL hash symlinks.


From: Ludovic Courtès
Subject: 01/04: gnu: le-certs: Create OpenSSL hash symlinks.
Date: Fri, 28 Jul 2017 12:10:03 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 6f0f55148d8f70ff5bb7455689a4e78b1807d555
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jul 28 14:50:52 2017 +0200

    gnu: le-certs: Create OpenSSL hash symlinks.
    
    * gnu/packages/certs.scm (le-certs)[arguments]: Run 'c_rehash' on the
    result.
    [native-inputs]: New fields.
---
 gnu/packages/certs.scm | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index c7242de..31ffa54 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <address@hidden>
 ;;; Copyright © 2015 Mark H Weaver <address@hidden>
-;;; Copyright © 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2016, 2017 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2017 Leo Famulari <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -155,13 +155,26 @@ taken from the NSS package and thus ultimately from the 
Mozilla project.")
          (let ((root (assoc-ref %build-inputs "isrgrootx1.pem"))
                (intermediate (assoc-ref %build-inputs 
"letsencryptauthorityx3.pem"))
                (backup (assoc-ref %build-inputs "letsencryptauthorityx4.pem"))
-               (out (string-append (assoc-ref %outputs "out") 
"/etc/ssl/certs")))
+               (out (string-append (assoc-ref %outputs "out") 
"/etc/ssl/certs"))
+               (openssl (assoc-ref %build-inputs "openssl"))
+               (perl (assoc-ref %build-inputs "perl")))
            (mkdir-p out)
            (for-each
              (lambda (cert)
                (copy-file cert (string-append out "/"
                                               (strip-store-file-name cert))))
-             (list root intermediate backup))))))
+             (list root intermediate backup))
+
+           ;; Create hash symlinks suitable for OpenSSL ('SSL_CERT_DIR' and
+           ;; similar.)
+           (chdir (string-append %output "/etc/ssl/certs"))
+           (unless (zero? (system* (string-append perl "/bin/perl")
+                                   (string-append openssl "/bin/c_rehash")
+                                   "."))
+             (error "'c_rehash' failed" openssl))))))
+    (native-inputs
+     `(("openssl" ,openssl)
+       ("perl" ,perl)))                           ;for 'c_rehash'
     (inputs
      `(; The Let's Encrypt root certificate, "ISRG Root X1".
        ("isrgrootx1.pem"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]