From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB2nu-0006TL-C8 for guix-patches@gnu.org; Wed, 17 May 2017 13:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB2nq-0004cp-EC for guix-patches@gnu.org; Wed, 17 May 2017 13:32:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dB2nq-0004ch-Bo for guix-patches@gnu.org; Wed, 17 May 2017 13:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dB2nq-0002kJ-45 for guix-patches@gnu.org; Wed, 17 May 2017 13:32:02 -0400 Subject: bug#26967: alpine: provide system-wide config Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB2nR-0006QO-Di for guix-patches@gnu.org; Wed, 17 May 2017 13:31:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB2nN-0004TM-Fv for guix-patches@gnu.org; Wed, 17 May 2017 13:31:37 -0400 Received: from 93-95-228-241.1984.is ([93.95.228.241]:48794 helo=sharknado9001.pragmatique.xyz) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dB2nN-0004So-2Q for guix-patches@gnu.org; Wed, 17 May 2017 13:31:33 -0400 Received: by sharknado9001.pragmatique.xyz (OpenSMTPD) with ESMTPSA id 37489f5f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Wed, 17 May 2017 17:31:19 +0000 (UTC) Date: Wed, 17 May 2017 17:31:27 +0000 From: ng0 Message-ID: <20170517173127.hwjq77w6oojk7hys@abyayala> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4c3gnrvoau76j5lc" Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26967@debbugs.gnu.org --4c3gnrvoau76j5lc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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: 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/ --4c3gnrvoau76j5lc Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-alpine-Add-generate-system-pine.conf-phase.patch" Content-Transfer-Encoding: quoted-printable =46rom 7a7995cb5718c133124ae29fd8276fbe2ff57a35 Mon Sep 17 00:00:00 2001 =46rom: ng0 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) --=20 2.13.0 --4c3gnrvoau76j5lc--