diff mbox

[3/3] gnu: lvm2: Make sure compiled objects are stripped.

Message ID d64d05a1252381766b8eeb1f160a2df36b6b74c6.1475523667.git.leo@famulari.name
State New
Headers show

Commit Message

Leo Famulari Oct. 3, 2016, 7:42 p.m. UTC
* gnu/packages/linux.scm (lvm2)[arguments]: Add 'make-objects-writeable' phase.
---
 gnu/packages/linux.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès Oct. 6, 2016, 8:34 p.m. UTC | #1
Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/linux.scm (lvm2)[arguments]: Add 'make-objects-writeable' phase.

OK, thanks!

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d977be1..91c7a8a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1667,7 +1667,17 @@  time.")
 
              ;; Replace /bin/sh with the right file name.
              (patch-makefile-SHELL "make.tmpl")
-             #t)))
+             #t))
+         (add-before 'strip 'make-objects-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Make compiled objects writable so they can be stripped.
+             (let ((out (assoc-ref outputs "out")))
+               (for-each (lambda (file)
+                           (chmod file #o755))
+                         (append
+                           (find-files (string-append out "/lib"))
+                           (find-files (string-append out "/sbin"))))
+               #t))))
 
        #:configure-flags (list (string-append "--sysconfdir="
                                               (assoc-ref %outputs "out")