Patchwork gnu: Add epic5.

login
register
mail settings
Submitter ng0
Date Sept. 24, 2016, 1:04 p.m.
Message ID <87shsp1ma8.fsf@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/15972/
State New
Headers show

Comments

ng0 - Sept. 24, 2016, 1:04 p.m.
I tried to get ssl working via:
- patching include/config.h
- just export the variable which was in include/config.h without
  patching it.

but it seems like epic5 does something different which 'justworks™' in
ircii. epic5 is based on ircii.
If ssl is mandatory, I'll check their git repository and see if there
have been any commits recently fixing this.
Leo Famulari - Sept. 25, 2016, 5:13 p.m.
On Sat, Sep 24, 2016 at 01:04:47PM +0000, ng0 wrote:
> I tried to get ssl working via:
> - patching include/config.h
> - just export the variable which was in include/config.h without
>   patching it.
> 
> but it seems like epic5 does something different which 'justworks™' in
> ircii. epic5 is based on ircii.
> If ssl is mandatory, I'll check their git repository and see if there
> have been any commits recently fixing this.

In general, SSL / TLS support is not mandatory for packages that do
network traffic. But, users should not be misled into thinking that they
are using TLS when it doesn't work.

So, what happens when you use this epic5 to connect to an IRC server
that uses TLS?

Does it fail silently? That's not okay.

> Subject: [PATCH 1/2] licenses: Add epic.
> 
> * guix/licenses.scm (epic): New variable.

Does anything else use this license? If not, I would leave it out and
use non-copyleft for the epic5 package license.

> Subject: [PATCH 2/2] gnu: Add epic5.
> 
> * gnu/packages/irc.scm (epic5): New variable.

> +         (add-after 'unpack 'patch-bsdinstall
> +           ;; We should include this in the build-system, bsdinstall is a standard.
> +           ;; If we just remove /bin/ some part of the bsdinstall breaks.
> +           (lambda _
> +             (substitute* "bsdinstall"
> +               (("/bin/strip") "strip")
> +               (("/bin/cp") "cp")
> +               (("/bin/chmod") "chmod")
> +               (("/etc/chown") "chown")
> +               (("/bin/chgrp") "chgrp")
> +               (("/bin/mkdir") "mkdir")
> +               (("/bin/rm") "rm")
> +               (("/bin/mv") "mv")
> +               (("/etc/") ""))))

"/etc/" is not an executable path. Do we need to substitute it here?
What happens when you don't change that line?

> +               (zero?
> +                (system* "./configure"
> +                         (string-append "--prefix=" out)
> +                         "--with-ipv6" "--with-libarchive"

What does it use libarchive for? What happens if we leave it out?
ng0 - Sept. 25, 2016, 7:27 p.m.
Leo Famulari <leo@famulari.name> writes:

> [ Unknown signature status ]
> On Sat, Sep 24, 2016 at 01:04:47PM +0000, ng0 wrote:
>> I tried to get ssl working via:
>> - patching include/config.h
>> - just export the variable which was in include/config.h without
>>   patching it.
>> 
>> but it seems like epic5 does something different which 'justworks™' in
>> ircii. epic5 is based on ircii.
>> If ssl is mandatory, I'll check their git repository and see if there
>> have been any commits recently fixing this.
>
> In general, SSL / TLS support is not mandatory for packages that do
> network traffic. But, users should not be misled into thinking that they
> are using TLS when it doesn't work.
>
> So, what happens when you use this epic5 to connect to an IRC server
> that uses TLS?
>
> Does it fail silently? That's not okay.

No, it fails with (for me) cryptic failures like ircII used to do. You
can try it out yourself by comparing ircii and epic5 while trying
chat.freenode.net 6697

unset IRCSERVER; epic5 chat.freenode.net -p 6697
output:

*** I can't find your mailbox.
*** Performing DNS lookup for [chat.freenode.net] (server 0)
*** DNS lookup for server 0 [chat.freenode.net] returned (15) addresses
*** Connecting to server refnum 0 (chat.freenode.net), using address 1 (164.132.77.237:6697)
*** INFO -- unix_recv: read(3) failed: Connection reset by peer
*** INFO -- new_io_event: fd 3 must be closed
*** INFO -- dgets: fd [3] must be closed
*** Connection closed from chat.freenode.net


... I assume that epic5 just isn't up to date or does handle something
differently which ircii succeeds with. ircii added this
functionality/variable:
export IRCSERVER="SSLIRC/chat.freenode.net:6697"
                                            |
so if you prepend "SSLIRC/" and use         |
:whatever-port-the-networks-ircs-port-is ----
you get a connection to ircs, otherwise it fails.
Best is to try this yourself for comparing outputs.

>> Subject: [PATCH 1/2] licenses: Add epic.
>> 
>> * guix/licenses.scm (epic): New variable.
>
> Does anything else use this license? If not, I would leave it out and
> use non-copyleft for the epic5 package license.
>
>> Subject: [PATCH 2/2] gnu: Add epic5.
>> 
>> * gnu/packages/irc.scm (epic5): New variable.
>
>> +         (add-after 'unpack 'patch-bsdinstall
>> +           ;; We should include this in the build-system, bsdinstall is a standard.
>> +           ;; If we just remove /bin/ some part of the bsdinstall breaks.
>> +           (lambda _
>> +             (substitute* "bsdinstall"
>> +               (("/bin/strip") "strip")
>> +               (("/bin/cp") "cp")
>> +               (("/bin/chmod") "chmod")
>> +               (("/etc/chown") "chown")
>> +               (("/bin/chgrp") "chgrp")
>> +               (("/bin/mkdir") "mkdir")
>> +               (("/bin/rm") "rm")
>> +               (("/bin/mv") "mv")
>> +               (("/etc/") ""))))
>
> "/etc/" is not an executable path. Do we need to substitute it here?
> What happens when you don't change that line?

bsdinstalls has a reference to /etc/chmod there - if we leave /etc/ in,
install fails.

>> +               (zero?
>> +                (system* "./configure"
>> +                         (string-append "--prefix=" out)
>> +                         "--with-ipv6" "--with-libarchive"
>
> What does it use libarchive for? What happens if we leave it out?

I added it because of our "maximum features" goal.

UPDATES:1473:*** News 01/03/2008 -- $info(o) values for libarchive, iconv support
UPDATES:1474:   If the binary supports libarchive, $info(o) will include 'r'.
UPDATES:1509:*** News 11/29/2007 -- Support for ZIP files from libarchive
UPDATES:1529:   All of this is based on 'libarchive' being installed.  You will need
UPDATES:1530:   to re-run configure in order to pick up libarchive support after you

Details:

*** News 01/03/2008 -- $info(o) values for libarchive, iconv support
        If the binary supports libarchive, $info(o) will include 'r'.
        If the binary supports iconv, $info(o) will include 'v'.
        Libarchive support is required to /load from a .zip file
        Iconv support is required to be able to do character set translation.

*** News 11/29/2007 -- Support for ZIP files from libarchive
        Support for loading files from .zip files has been added.  This first
        round of implementation just adds the raw ability, but it's not 
        totaly ready to be used yet.  You're welcome to start playing with
        it and reporting any problems you have.

        You can $open() a file for reading or /load it from a zip file:
                /load foo.zip/file
        and
                @fd = open(foo.zip/file R)

        If you /load a zip file, it will load the file ".ircrc" in the top
        level directory.  This might be enahanced or changed in the future:
                /load foo.zip
        acts like
                /load foo.zip/.ircrc

        Some operations cannot be performed on zipped files, such as $fseek()
        and $frewind() and so forth.  This might change in the future.

        All of this is based on 'libarchive' being installed.  You will need
        to re-run configure in order to pick up libarchive support after you
        do a cvs update.
ng0 - Oct. 6, 2016, 10:02 p.m.
Hi,

you are probably busy so I'd like to ask if this requires further
changes or if it is good to go. Someone else can review it too.

Thanks

ng0 <ngillmann@runbox.com> writes:

> Leo Famulari <leo@famulari.name> writes:
>
>> [ Unknown signature status ]
>> On Sat, Sep 24, 2016 at 01:04:47PM +0000, ng0 wrote:
>>> I tried to get ssl working via:
>>> - patching include/config.h
>>> - just export the variable which was in include/config.h without
>>>   patching it.
>>> 
>>> but it seems like epic5 does something different which 'justworks™' in
>>> ircii. epic5 is based on ircii.
>>> If ssl is mandatory, I'll check their git repository and see if there
>>> have been any commits recently fixing this.
>>
>> In general, SSL / TLS support is not mandatory for packages that do
>> network traffic. But, users should not be misled into thinking that they
>> are using TLS when it doesn't work.
>>
>> So, what happens when you use this epic5 to connect to an IRC server
>> that uses TLS?
>>
>> Does it fail silently? That's not okay.
>
> No, it fails with (for me) cryptic failures like ircII used to do. You
> can try it out yourself by comparing ircii and epic5 while trying
> chat.freenode.net 6697
>
> unset IRCSERVER; epic5 chat.freenode.net -p 6697
> output:
>
> *** I can't find your mailbox.
> *** Performing DNS lookup for [chat.freenode.net] (server 0)
> *** DNS lookup for server 0 [chat.freenode.net] returned (15) addresses
> *** Connecting to server refnum 0 (chat.freenode.net), using address 1 (164.132.77.237:6697)
> *** INFO -- unix_recv: read(3) failed: Connection reset by peer
> *** INFO -- new_io_event: fd 3 must be closed
> *** INFO -- dgets: fd [3] must be closed
> *** Connection closed from chat.freenode.net
>
>
> ... I assume that epic5 just isn't up to date or does handle something
> differently which ircii succeeds with. ircii added this
> functionality/variable:
> export IRCSERVER="SSLIRC/chat.freenode.net:6697"
>                                             |
> so if you prepend "SSLIRC/" and use         |
> :whatever-port-the-networks-ircs-port-is ----
> you get a connection to ircs, otherwise it fails.
> Best is to try this yourself for comparing outputs.
>
>>> Subject: [PATCH 1/2] licenses: Add epic.
>>> 
>>> * guix/licenses.scm (epic): New variable.
>>
>> Does anything else use this license? If not, I would leave it out and
>> use non-copyleft for the epic5 package license.
>>
>>> Subject: [PATCH 2/2] gnu: Add epic5.
>>> 
>>> * gnu/packages/irc.scm (epic5): New variable.
>>
>>> +         (add-after 'unpack 'patch-bsdinstall
>>> +           ;; We should include this in the build-system, bsdinstall is a standard.
>>> +           ;; If we just remove /bin/ some part of the bsdinstall breaks.
>>> +           (lambda _
>>> +             (substitute* "bsdinstall"
>>> +               (("/bin/strip") "strip")
>>> +               (("/bin/cp") "cp")
>>> +               (("/bin/chmod") "chmod")
>>> +               (("/etc/chown") "chown")
>>> +               (("/bin/chgrp") "chgrp")
>>> +               (("/bin/mkdir") "mkdir")
>>> +               (("/bin/rm") "rm")
>>> +               (("/bin/mv") "mv")
>>> +               (("/etc/") ""))))
>>
>> "/etc/" is not an executable path. Do we need to substitute it here?
>> What happens when you don't change that line?
>
> bsdinstalls has a reference to /etc/chmod there - if we leave /etc/ in,
> install fails.
>
>>> +               (zero?
>>> +                (system* "./configure"
>>> +                         (string-append "--prefix=" out)
>>> +                         "--with-ipv6" "--with-libarchive"
>>
>> What does it use libarchive for? What happens if we leave it out?
>
> I added it because of our "maximum features" goal.
>
> UPDATES:1473:*** News 01/03/2008 -- $info(o) values for libarchive, iconv support
> UPDATES:1474:   If the binary supports libarchive, $info(o) will include 'r'.
> UPDATES:1509:*** News 11/29/2007 -- Support for ZIP files from libarchive
> UPDATES:1529:   All of this is based on 'libarchive' being installed.  You will need
> UPDATES:1530:   to re-run configure in order to pick up libarchive support after you
>
> Details:
>
> *** News 01/03/2008 -- $info(o) values for libarchive, iconv support
>         If the binary supports libarchive, $info(o) will include 'r'.
>         If the binary supports iconv, $info(o) will include 'v'.
>         Libarchive support is required to /load from a .zip file
>         Iconv support is required to be able to do character set translation.
>
> *** News 11/29/2007 -- Support for ZIP files from libarchive
>         Support for loading files from .zip files has been added.  This first
>         round of implementation just adds the raw ability, but it's not 
>         totaly ready to be used yet.  You're welcome to start playing with
>         it and reporting any problems you have.
>
>         You can $open() a file for reading or /load it from a zip file:
>                 /load foo.zip/file
>         and
>                 @fd = open(foo.zip/file R)
>
>         If you /load a zip file, it will load the file ".ircrc" in the top
>         level directory.  This might be enahanced or changed in the future:
>                 /load foo.zip
>         acts like
>                 /load foo.zip/.ircrc
>
>         Some operations cannot be performed on zipped files, such as $fseek()
>         and $frewind() and so forth.  This might change in the future.
>
>         All of this is based on 'libarchive' being installed.  You will need
>         to re-run configure in order to pick up libarchive support after you
>         do a cvs update.
> -- 
>               ng0
>
>

--
Leo Famulari - Oct. 7, 2016, 1:09 a.m.
On Thu, Oct 06, 2016 at 10:02:18PM +0000, ng0 wrote:
> Hi,
> 
> you are probably busy so I'd like to ask if this requires further
> changes or if it is good to go. Someone else can review it too.

Can you submit a revised patch using 'non-copyleft' for the license? Or
are there more packages on the way using the epic5 license?
ng0 - Oct. 9, 2016, 6:14 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Thu, Oct 06, 2016 at 10:02:18PM +0000, ng0 wrote:
>> Hi,
>> 
>> you are probably busy so I'd like to ask if this requires further
>> changes or if it is good to go. Someone else can review it too.
>
> Can you submit a revised patch using 'non-copyleft' for the license? Or
> are there more packages on the way using the epic5 license?
>

Oh, right. This was the proposed change. Okay, I'll send in a new patch
via git send-email and a new thread.

Thanks

Patch

From f61b13ef79a6f05ec358652fa428324d7b2858d9 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 13 Sep 2016 23:46:16 +0000
Subject: [PATCH 2/2] gnu: Add epic5.

* gnu/packages/irc.scm (epic5): New variable.
---
 gnu/packages/irc.scm | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 79 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 786cfbc..a108b2a 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -3,7 +3,7 @@ 
 ;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,9 +31,11 @@ 
   #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -46,6 +48,7 @@ 
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls))
@@ -291,3 +294,78 @@  and extensible with plugins and scripts.")
     (description
      "sic is a simple IRC client, even more minimalistic than ii.")
     (license license:expat)))
+
+(define-public epic5
+  (package
+    (name "epic5")
+    (version "2.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.epicsol.org/pub/epic/EPIC5-PRODUCTION/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-perl
+           (lambda _
+             (substitute* "regress/crash-irc"
+               (("perl5") (which "perl")))))
+         (add-after 'unpack 'patch-bsdinstall
+           ;; We should include this in the build-system, bsdinstall is a standard.
+           ;; If we just remove /bin/ some part of the bsdinstall breaks.
+           (lambda _
+             (substitute* "bsdinstall"
+               (("/bin/strip") "strip")
+               (("/bin/cp") "cp")
+               (("/bin/chmod") "chmod")
+               (("/etc/chown") "chown")
+               (("/bin/chgrp") "chgrp")
+               (("/bin/mkdir") "mkdir")
+               (("/bin/rm") "rm")
+               (("/bin/mv") "mv")
+               (("/etc/") ""))))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; The tarball uses a very old version of autconf. It doesn't
+             ;; understand extra flags like `--enable-fast-install', so
+             ;; we need to invoke it with just what it understands.
+             (let ((out (assoc-ref outputs "out")))
+               ;; 'configure' doesn't understand '--host'.
+               ,@(if (%current-target-system)
+                     `((setenv "CHOST" ,(%current-target-system)))
+                     '())
+               (setenv "CONFIG_SHELL" (which "bash"))
+               (setenv "SHELL" (which "bash"))
+               (zero?
+                (system* "./configure"
+                         (string-append "--prefix=" out)
+                         "--with-ipv6" "--with-libarchive"
+                         "--with-ssl"
+                         (string-append "--with-tcl="
+                                        (assoc-ref %build-inputs "tcl")
+                                        "/lib/tclConfig.sh")))))))))
+    (inputs
+     `(("openssl" ,openssl)
+       ("ncurses" ,ncurses)
+       ("libarchive" ,libarchive)
+       ("perl" ,perl)
+       ("tcl" ,tcl)
+       ("ruby" ,ruby)
+       ("gdbm" ,gdbm)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://epicsol.org")
+    (synopsis "Epic5 IRC Client")
+    (description
+     "EPIC is a IRC client that has been under active development for 20+ years
+in 5 generations.  It is stable and mature, and offers an excellent ircII
+interface for those of us who are accustomed to the ircII way of doing things.")
+    (license (list license:epic
+                   license:bsd-3
+                   license:isc
+                   license:bsd-4))))
-- 
2.10.0