alpine: provide system-wide config

  • Done
  • quality assurance status badge
Details
2 participants
  • ng0
  • Ricardo Wurmus
Owner
unassigned
Submitted by
ng0
Severity
normal
N
(address . guix-patches@gnu.org)
20170517173127.hwjq77w6oojk7hys@abyayala
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
R
R
Ricardo Wurmus wrote on 30 May 2017 23:28
(name . ng0)(address . ng0@pragmatique.xyz)(address . 26967@debbugs.gnu.org)
87poeq2fws.fsf@elephly.net
ng0 <ng0@pragmatique.xyz> writes:

Toggle quote (3 lines)
> Without this patch, alpine silently(?) complains until a
> $HOME/.pinerc exists:

How does it complain “silently”? :)

Toggle quote (4 lines)
> 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.

Recommended by whom? I see in the manual [1] that

$prefix/lib/pine.conf (Pine's global configuration file)
$prefix/lib/pine.conf.fixed (Non-overridable global configuration file)

should exist, but it doesn’t say what should be in them. Could they
just be empty? Given that one of them is for non-overridable global
configurations I’d rather not fill them.


WDYT?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
R
R
Ricardo Wurmus wrote on 30 May 2017 23:28
control message for bug #26967
(address . control@debbugs.gnu.org)
E1dFohF-0007vu-F6@debbugs.gnu.org
tags 26967 moreinfo
N
Re: bug#26967: alpine: provide system-wide config
(address . 26967@debbugs.gnu.org)(name . ng0)(address . ng0@pragmatique.xyz)
20170530230314.miqpfykb2ryutspo@abyayala
Ricardo Wurmus transcribed 0.9K bytes:
Toggle quote (8 lines)
>
> ng0 <ng0@pragmatique.xyz> writes:
>
> > Without this patch, alpine silently(?) complains until a
> > $HOME/.pinerc exists:
>
> How does it complain “silently”? :)

I removed my .pinerc symlink and this is what happens. I should've
described the problem before I sent this:

Upon first start, a .pinerc is generated from a global file[1], but
we also get a ".pine-debug1" and with every start a new one this
with a number increase. Is it just because of these files? I'm not
a alpine user.. This .pine-debug1 is appended. Twice because I forgot
how to remove attachments.

1: I _guess_ ... the existing file is actually not existing so I don't
know what alpine does here. Fixing it the way I did it seemed like
the first possible solution to me.

Toggle quote (6 lines)
> > 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.
>
> Recommended by whom? I see in the manual [1] that

Actually this is a comment in a file I can longer find (slackbuilds?)
which came up when I searched for this problem.

Toggle quote (8 lines)
> $prefix/lib/pine.conf (Pine's global configuration file)
> $prefix/lib/pine.conf.fixed (Non-overridable global configuration file)
>
> should exist, but it doesn’t say what should be in them. Could they
> just be empty? Given that one of them is for non-overridable global
> configurations I’d rather not fill them.
>
> [1]: https://www.washington.edu/alpine/tech-notes/installation.html#files-unix
^
Keep in mind that this |-- is not the alpine we use.
If it is

Toggle quote (11 lines)
> WDYT?
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
> https://elephly.net
>
>


--
ng0
OpenPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
Attachment: .pine-debug1
Attachment: .pine-debug1
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlkt+i4ACgkQ4i+bv+40
hYhKew//Q6zh/okoMEB8L+siW263uAXa3vXljBCVUUk1l9WzsdkWW8frq/7vkFzp
E6wf3bAhLFBWWt+jccCSbqqE2IKvaVJS39AS/9jVEwJselCJOFk1JGwvcqpYC2n2
ePfesjbvhAEvPHkNlZrGG5D0qh0PItUXPrSHYearPrd/oRQI8PKaftJY8u+hk1fK
6vPM4kXulMgAH8RXLvoN/axUY5CGqxgUx4dBrzIeR1Xr+e5YG9/DxanACnBfyizg
glnVmG9YOLlomjGenMfmugfXPEMYXN6jx04W0im84vu8OD2YEmVYg7Dajefsm7bu
YOE3nDXaHcZSPJ9rfyfOOVGlxbdvJEqx8r00PxS1J+n1KNK4xjS/zhEpV/iHyRwK
VYQHV85J5L4H+FuCi2sy3yBTYkICGNdXhN3tQVN+qf7cti0XIJyboDU3QDr75trZ
5XQB+gJGCosLho6QswyPy+/IKA0zyiCWkkQXrUuaC5bqn1T3Tswpyjtrr8U6p/d+
Egzlgx9NSt92HVGUMFGXpl6lc7o/lJDjR59okjnhMR6S6GrdXwEIkoUJP3H0aJgK
exlODgFdQWD9JpNzW6A7coSrd8KiMFd0Kh8LxndtErdqXzQpEpV6S05dd8uIyjdf
dzZ9c6P9X2uD9i8ZRQbIVrsW3dX/dsMxkjLIXbz/b3Zk0bdligE=
=HiRT
-----END PGP SIGNATURE-----


N
(address . 26967@debbugs.gnu.org)
20170814120445.5smgi76rrwydnuqk@abyayala
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlmRkd0ACgkQ4i+bv+40
hYjn4Q//eBka9NhgFmHKMv6xDZRw3wEEo7U/COkkY84QK2QGgaPYi9hF7g3QDBxj
V/l4QLZYTzVsbxznfiDp70LZhKwUN4UcfDS3svTEl5XWz3SlnQGrbP0PVQEdkFAb
w9C43fhXVPw2OoTIbS1gPTRi1c7jr1FnUL2Wt+MJbCOU/gPNDZ8i0HDwfkQ2cv8o
YsUMuvSe+mnNKKKbK0BmckeLxOY27CuVItI6nobBTfkVB7zKwMMrYGXQJl2CmryN
uPaI0rJSSw5D9NrIhLrhWPqirrLAMvyueC8On5daDa5rCsWqiKlFzIbAq07kkHFz
uyBXo7PcbL55Oyq80yd8AVtUdaC6MJhTbW9T/GkjZFRLOs9q1JQ3E14cXwP4RpV3
lTF8mBkZhGSCp9vMv6JzyCIdkgHAYAeyGKUOYO8LaF4j4qQcHWNakZBhbprWWva3
yATUG4ZrjrHaVs0nJYLl0iC2HiIW1UmLqUK8FFJMzoVujU1mHSghS174daJEFy1X
nyjUgGVa9NWG8zG4E/RTFqDKsUkkF1uT2NuNhGSvRJfhEZryj2GgsuAq9bM+UBWK
MikhByIdNKMaXDOtmJ2KLWmoSf6ehGoj9/F6a7YXYtROqIda6b6Z27wbMoDdHt5i
zpTLbY2pfSN3BKWIHpC0CHk2KdWI7vBQrydCJbRUyBWGQkL50L8=
=pQzl
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 19 Oct 2017 00:54
Re: [bug#26967] alpine: provide system-wide config
(name . ng0)(address . ng0@pragmatique.xyz)(address . 26967-done@debbugs.gnu.org)
87y3o82hk0.fsf@elephly.net
ng0 <ng0@pragmatique.xyz> writes:

Toggle quote (3 lines)
> I'm not using alpine, so I'll leave this bug open for anyone who
> uses alpine and wants to solve it.

I think that the bug report as it is now is not actionable. Since
neither of us are using alpine and it is not clear to me that this patch
clearly improves the package, I’m closing this now.

If there really is a bug in our alpine package, please submit a bug with
a clear summary and problem description to bug-guix@gnu.org.

Thanks!

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
Closed
?