From: ng0 <ng0@pragmatique.xyz>
To: 26967@debbugs.gnu.org
Subject: bug#26967: alpine: provide system-wide config
Date: Wed, 17 May 2017 17:31:27 +0000 [thread overview]
Message-ID: <20170517173127.hwjq77w6oojk7hys@abyayala> (raw)
[-- 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
next reply other threads:[~2017-05-17 17:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 17:31 ng0 [this message]
2017-05-30 21:28 ` bug#26967: alpine: provide system-wide config 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
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517173127.hwjq77w6oojk7hys@abyayala \
--to=ng0@pragmatique.xyz \
--cc=26967@debbugs.gnu.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 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).