unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* core-updates: Fix cups-minimal build failure
@ 2017-02-26  2:25 Leo Famulari
  2017-02-26 14:45 ` Marius Bakke
  2017-02-27  8:47 ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2017-02-26  2:25 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 65 bytes --]

Do you have any suggestions about how to make this more concise?

[-- Attachment #1.2: 0001-gnu-cups-minimal-Fix-build-failure-in-reset-gzip-tim.patch --]
[-- Type: text/plain, Size: 2007 bytes --]

From 0191e8394eedd271494b5e1e8c8eb131176440a8 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sat, 25 Feb 2017 21:22:08 -0500
Subject: [PATCH] gnu: cups-minimal: Fix build failure in reset-gzip-timestamps
 phase.

* gnu/packages/cups.scm (cups-minimal)[arguments]: Add 'make-manpages-writable'
phase.
---
 gnu/packages/cups.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 20621e32b..ebb979c62 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -166,6 +166,23 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
              (substitute* "Makedefs.in"
                (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
                (("/bin/sh") (which "sh")))))
+         ;; Make the compressed manpages writable so that the
+         ;; reset-gzip-timestamps phase does not error out.
+         (add-before 'reset-gzip-timestamps 'make-manpages-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man1 (string-append out "/share/man/man1"))
+                    (man5 (string-append out "/share/man/man5"))
+                    (man7 (string-append out "/share/man/man7"))
+                    (man8 (string-append out "/share/man/man8")))
+               (for-each (lambda (file) (chmod file #o666))
+                         (find-files man1 "\\.gz"))
+               (for-each (lambda (file) (chmod file #o666))
+                         (find-files man5 "\\.gz"))
+               (for-each (lambda (file) (chmod file #o666))
+                         (find-files man7 "\\.gz"))
+               (for-each (lambda (file) (chmod file #o666))
+                         (find-files man8 "\\.gz")))))
          (add-before 'build 'patch-tests
            (lambda _
              (substitute* "test/ippserver.c"
-- 
2.11.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: core-updates: Fix cups-minimal build failure
  2017-02-26  2:25 core-updates: Fix cups-minimal build failure Leo Famulari
@ 2017-02-26 14:45 ` Marius Bakke
  2017-02-27  8:47 ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2017-02-26 14:45 UTC (permalink / raw)
  To: Leo Famulari, guix-devel

[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]

Leo Famulari <leo@famulari.name> writes:

> Do you have any suggestions about how to make this more concise?
> From 0191e8394eedd271494b5e1e8c8eb131176440a8 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Sat, 25 Feb 2017 21:22:08 -0500
> Subject: [PATCH] gnu: cups-minimal: Fix build failure in reset-gzip-timestamps
>  phase.
>
> * gnu/packages/cups.scm (cups-minimal)[arguments]: Add 'make-manpages-writable'
> phase.
> ---
>  gnu/packages/cups.scm | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
> index 20621e32b..ebb979c62 100644
> --- a/gnu/packages/cups.scm
> +++ b/gnu/packages/cups.scm
> @@ -166,6 +166,23 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
>               (substitute* "Makedefs.in"
>                 (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
>                 (("/bin/sh") (which "sh")))))
> +         ;; Make the compressed manpages writable so that the
> +         ;; reset-gzip-timestamps phase does not error out.
> +         (add-before 'reset-gzip-timestamps 'make-manpages-writable
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (man1 (string-append out "/share/man/man1"))
> +                    (man5 (string-append out "/share/man/man5"))
> +                    (man7 (string-append out "/share/man/man7"))
> +                    (man8 (string-append out "/share/man/man8")))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man1 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man5 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man7 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man8 "\\.gz")))))

Would it work to simply run this on all of "out/share/man", instead of
explicitly specifying the sections?

I would also use 0644 perms here, not that it matters though!

>           (add-before 'build 'patch-tests
>             (lambda _
>               (substitute* "test/ippserver.c"
> -- 
> 2.11.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: core-updates: Fix cups-minimal build failure
  2017-02-26  2:25 core-updates: Fix cups-minimal build failure Leo Famulari
  2017-02-26 14:45 ` Marius Bakke
@ 2017-02-27  8:47 ` Andy Wingo
  2017-02-27 21:13   ` Leo Famulari
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2017-02-27  8:47 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

On Sun 26 Feb 2017 03:25, Leo Famulari <leo@famulari.name> writes:

> Do you have any suggestions about how to make this more concise?

> +         ;; Make the compressed manpages writable so that the
> +         ;; reset-gzip-timestamps phase does not error out.
> +         (add-before 'reset-gzip-timestamps 'make-manpages-writable
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (man1 (string-append out "/share/man/man1"))
> +                    (man5 (string-append out "/share/man/man5"))
> +                    (man7 (string-append out "/share/man/man7"))
> +                    (man8 (string-append out "/share/man/man8")))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man1 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man5 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man7 "\\.gz"))
> +               (for-each (lambda (file) (chmod file #o666))
> +                         (find-files man8 "\\.gz")))))

(for-each
 (lambda (section)
   (for-each
     (lambda (file) (chmod file #o666))
     (find-files (string-append out "/share/man/man" section)
                 "\\.gz")))
 '("1" "5" "7" "8"))

Would be nice if there were a recursive find-files; oh well.

Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: core-updates: Fix cups-minimal build failure
  2017-02-27  8:47 ` Andy Wingo
@ 2017-02-27 21:13   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2017-02-27 21:13 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

On Mon, Feb 27, 2017 at 09:47:47AM +0100, Andy Wingo wrote:
> > Do you have any suggestions about how to make this more concise?

> (for-each
>  (lambda (section)
>    (for-each
>      (lambda (file) (chmod file #o666))
>      (find-files (string-append out "/share/man/man" section)
>                  "\\.gz")))
>  '("1" "5" "7" "8"))

*copy+paste*

> Would be nice if there were a recursive find-files; oh well.

It seems that find-files is recursive. At least, it worked as expected
in d043ceedbb3ce1873db97cfe2c8806de64881f01 (gnu: cups-minimal: Fix
build failure in reset-gzip-timestamps phase.).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-27 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26  2:25 core-updates: Fix cups-minimal build failure Leo Famulari
2017-02-26 14:45 ` Marius Bakke
2017-02-27  8:47 ` Andy Wingo
2017-02-27 21:13   ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).