guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Perl: Fix a grafting failure due to a path that includes the


From: Leo Famulari
Subject: 01/01: gnu: Perl: Fix a grafting failure due to a path that includes the package version.
Date: Thu, 19 Apr 2018 10:37:59 -0400 (EDT)

lfam pushed a commit to branch master
in repository guix.

commit 44b98b00026e62766620dbc4330a305282d61069
Author: Leo Famulari <address@hidden>
Date:   Wed Apr 18 16:41:39 2018 -0400

    gnu: Perl: Fix a grafting failure due to a path that includes the package 
version.
    
    Fixes <https://bugs.gnu.org/31210>.
    
    * gnu/packages/perl.scm (perl-5.26.2): Don't use package/inherit.
    [arguments]: Add a 'workaround-grafting-version-bug' phase.
---
 gnu/packages/perl.scm | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index aaf3e2e..33601f3 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -44,6 +44,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix utils) ;substitute-keyword-arguments for perl-5.26.2
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages freedesktop)
@@ -161,7 +162,8 @@
 ;; Fixes CVE-2018-6797, CVE-2018-6798, and CVE-2018-6913.
 ;; See <https://metacpan.org/changes/release/SHAY/perl-5.26.2>.
 (define-public perl-5.26.2
-  (package/inherit perl
+  (package
+    (inherit perl)
     (version "5.26.2")
     (source (origin
               (inherit (package-source perl))
@@ -169,7 +171,22 @@
                                   version ".tar.gz"))
               (sha256
                (base32
-                "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"))))))
+                "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments perl)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           ;; The path to libperl.so includes the Perl version number, and this
+           ;; is not handled by grafting. See <https://bugs.gnu.org/31210>.
+           (add-after 'install 'workaround-grafting-version-bug
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (dir (string-append out "/lib/perl5"))
+                      (new "5.26.2")
+                      (old "5.26.1"))
+                 (with-directory-excursion dir
+                   (symlink new old))
+                 #t)))))))))
 
 (define-public perl-algorithm-c3
   (package



reply via email to

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