From: Marius Bakke <mbakke@fastmail.com>
To: Mark H Weaver <mhw@netris.org>, Leo Famulari <leo@famulari.name>
Cc: 31210@debbugs.gnu.org
Subject: bug#31210: Perl graft breakage
Date: Thu, 19 Apr 2018 17:20:59 +0200 [thread overview]
Message-ID: <87zi1z9q90.fsf@fastmail.com> (raw)
In-Reply-To: <87a7tzjtn7.fsf@netris.org>
[-- Attachment #1.1: Type: text/plain, Size: 1046 bytes --]
Mark H Weaver <mhw@netris.org> writes:
> Hi Leo,
>
> One more thing:
>
> Leo Famulari <leo@famulari.name> writes:
>> + (add-after 'install 'workaround-grafting-version-bug
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (new (string-append out "/lib/perl5/5.26.2"))
>> + (old (string-append out "/lib/perl5/5.26.1")))
>> + (symlink new old)
>> + #t)))))))))
>
> It would be better for 'new' to be simply "5.26.2" instead of an
> absolute file name. If I'm not mistaken, on ext4, files (including
> symlinks) smaller than 60 bytes are stored entirely within the inode,
> saving both a disk block and a seek operation when accessing it.
Hello Mark and Leo,
I'm sorry for not testing this graft more thoroughly. And thanks for
the explanation about package/inherit, I had misunderstood its purpose.
The attached patch should address all concerns. I have also tested
urxvt with it.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-perl-Fix-grafting-error-due-to-version-number-in.patch --]
[-- Type: text/x-patch, Size: 2369 bytes --]
From 44ae580e4affc03bcfd6d27277ea78aa63021fb9 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 19 Apr 2018 17:17:54 +0200
Subject: [PATCH] gnu: perl: Fix grafting error due to version number in Perl
library path.
Fixes <https://bugs.gnu.org/31210>.
* gnu/packages/perl.scm (perl-5.26.2): Use (package (inherit) ...) instead
of (package/inherit ...).
[arguments]: Add phase 'workaround-grafting-version-bug'.
---
gnu/packages/perl.scm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index aaf3e2e82..4cd5bf6df 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,19 @@
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")))
+ (with-directory-excursion (string-append out "/lib/perl5")
+ (symlink "5.26.2" "5.26.1")
+ #t))))))))))
(define-public perl-algorithm-c3
(package
--
2.17.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2018-04-19 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-15 15:34 [bug#31163] [PATCH] gnu: perl: Replace with 5.26.2 [fixes CVE-2018-{6797, 6798, 6913}] Marius Bakke
2018-04-17 17:59 ` Leo Famulari
2018-04-17 22:35 ` bug#31163: " Marius Bakke
2018-04-18 18:08 ` bug#31210: Perl graft breakage Leo Famulari
2018-04-18 19:14 ` Mark H Weaver
2018-04-18 20:52 ` Leo Famulari
2018-04-19 7:05 ` Mark H Weaver
2018-04-19 10:28 ` Mark H Weaver
2018-04-19 11:57 ` Mark H Weaver
2018-04-19 14:38 ` Leo Famulari
2018-04-19 15:20 ` Marius Bakke [this message]
2018-04-21 5:53 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zi1z9q90.fsf@fastmail.com \
--to=mbakke@fastmail.com \
--cc=31210@debbugs.gnu.org \
--cc=leo@famulari.name \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.