(address . guix-patches@gnu.org)
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.
--
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(-)
Toggle diff (33 lines)
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