all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26967: alpine: provide system-wide config
@ 2017-05-17 17:31 ng0
  2017-05-30 21:28 ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: ng0 @ 2017-05-17 17:31 UTC (permalink / raw)
  To: 26967

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

Without this patch, alpine silently(?) complains until a
$HOME/.pinerc exists:

Global config "/gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf" is default
Personal config "/home/user/.pinerc" is default
Exceptions config not set on cmdline
  checking for default "/home/user/.pinercex" in pinerc dir
    no, there is no exceptions config
    
      Global config:     /gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf
        Personal config:   /home/user/.pinerc
          Exceptions config: <none>
            Fixed config:      /gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf.fixed
            
            reading_pinerc "/gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf"
            so_get error: /gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf : No such file or directory
            Open failed: No such file or directory
            reading_pinerc "/home/user/.pinerc"
            Read 24568 characters:
            reading_pinerc "/gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf.fixed"
            so_get error: /gnu/store/57k152vswq14m2ialxacmnrkar17vcan-alpine-2.21/lib/pine.conf.fixed : No such file or directory
            Open failed: No such file or directory
            

With this patch, we profive these missing files.
The way they are created is copied from slackware and seems to be
the recommended way of providing them, as no such file exists in
the distribution of alpine.
-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/

[-- Attachment #2: 0001-gnu-alpine-Add-generate-system-pine.conf-phase.patch --]
[-- Type: text/plain, Size: 1956 bytes --]

From 7a7995cb5718c133124ae29fd8276fbe2ff57a35 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@no-reply.pragmatique.xyz>
Date: Tue, 16 May 2017 22:28:57 +0000
Subject: [PATCH] gnu: alpine: Add 'generate-system-pine.conf' phase.

* gnu/packages/mail.scm (alpine)[arguments]: Add new 'generate-system-pine.conf'
phase to provide system-wide configs which are expected by alpine.
---
 gnu/packages/mail.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index b4dfef6ec..ecb49af0b 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2264,7 +2264,25 @@ operators and scripters.")
              (substitute* (list "alpine/Makefile.in"
                                 "web/src/alpined.d/Makefile.in")
                (("`date`") "1970-01-01"))
-             #t)))))
+             #t))
+         (add-after 'install 'generate-system-pine.conf
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Alpine will silently complain if no system-wide
+             ;; default config is present. This is the recommended
+             ;; way of generating such a config.
+             (let* ((out (assoc-ref outputs "out"))
+                    (alpine (string-append out "/bin/alpine"))
+                    (lib (string-append out "/lib")))
+               (mkdir-p lib)
+               (with-output-to-file
+                   (string-append lib "/pine.conf")
+                 (lambda _
+                   (zero? (system* alpine "-conf"))
+                   out))
+               ;; pine.conf.fixed is expected aswell, so pine.conf.fixed
+               ;; is equal to pine.conf in our system.
+               (symlink (string-append lib "/pine.conf")
+                        (string-append lib "/pine.conf.fixed"))))))))
     (inputs
      `(("ncurses" ,ncurses)
        ("openssl" ,openssl)
-- 
2.13.0


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

end of thread, other threads:[~2017-10-19 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 17:31 bug#26967: alpine: provide system-wide config ng0
2017-05-30 21:28 ` Ricardo Wurmus
2017-05-30 23:03   ` ng0
2017-08-14 12:04     ` [bug#26967] " ng0
2017-10-18 22:54       ` bug#26967: " Ricardo Wurmus

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.