unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add darkhttpd.
@ 2016-09-09 19:56 Arun Isaac
  2016-09-09 20:41 ` Leo Famulari
  0 siblings, 1 reply; 16+ messages in thread
From: Arun Isaac @ 2016-09-09 19:56 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/web.scm (darkhttpd): New variable.
---
 gnu/packages/web.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 20c7d12..261eed2 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3633,3 +3634,36 @@ provides a unix command line interface to a variety of popular www search engine
 and similar services.")
     (home-page "https://surfraw.alioth.debian.org/")
     (license l:public-domain)))
+
+(define-public darkhttpd
+  (package
+    (name "darkhttpd")
+    (version "1.12")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
+             (commit "master")))
+       (sha256
+        (base32
+         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
+       (file-name (string-append name "-" version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _ (setenv "CC" "gcc")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (mkdir-p bin)
+               (copy-file "darkhttpd" (string-append bin "/darkhttpd"))))))))
+    (synopsis "Simple static web server")
+    (description "darkhttpd is a simple static web server.  It is
+standalone and does not need inetd or ucspi-tcp.  It does not need any
+config files -- you only have to specify the www root.")
+    (home-page "https://unix4lyfe.org/darkhttpd/")
+    (license l:bsd-2)))
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-09 19:56 [PATCH] gnu: Add darkhttpd Arun Isaac
@ 2016-09-09 20:41 ` Leo Famulari
  2016-09-10  5:19   ` Arun Isaac
  2016-09-10  6:51   ` Arun Isaac
  0 siblings, 2 replies; 16+ messages in thread
From: Leo Famulari @ 2016-09-09 20:41 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

On Sat, Sep 10, 2016 at 01:26:23AM +0530, Arun Isaac wrote:
> * gnu/packages/web.scm (darkhttpd): New variable.

Hi, thank you for this patch!

> +     `(#:tests? #f

When we disable the tests, we have to leave a comment explaining why. It
can be as simple as "No test suite" if that is the case.

> +         (replace 'configure
> +           (lambda _ (setenv "CC" "gcc")))

This has the effect of setting the CC variable and skipping any other
'configure' actions. Is this intended? If there is no './configure'
script or similar tool, this environment variable could be set in
#:make-flags or in a 'setenv' phase.

> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +               (mkdir-p bin)
> +               (copy-file "darkhttpd" (string-append bin "/darkhttpd"))))))))

mkdir-p and copy-file and be replaced with install-file.

> +    (description "darkhttpd is a simple static web server.  It is
> +standalone and does not need inetd or ucspi-tcp.  It does not need any
> +config files -- you only have to specify the www root.")

You can make an 'em dash' in Texinfo like this:
"...config files---you only..."

> +    (home-page "https://unix4lyfe.org/darkhttpd/")
> +    (license l:bsd-2)))

The license on the main source file is the ISC license:
https://unix4lyfe.org/gitweb/darkhttpd/blob/HEAD:/darkhttpd.c

Can you send an updated patch?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-09 20:41 ` Leo Famulari
@ 2016-09-10  5:19   ` Arun Isaac
  2016-09-10  6:51   ` Arun Isaac
  1 sibling, 0 replies; 16+ messages in thread
From: Arun Isaac @ 2016-09-10  5:19 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


> Can you send an updated patch?

Sure, I'll make the changes and send an updated patch soon.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] gnu: Add darkhttpd.
  2016-09-09 20:41 ` Leo Famulari
  2016-09-10  5:19   ` Arun Isaac
@ 2016-09-10  6:51   ` Arun Isaac
  2016-09-10  7:10     ` Alex Kost
  1 sibling, 1 reply; 16+ messages in thread
From: Arun Isaac @ 2016-09-10  6:51 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/web.scm (darkhttpd): New variable.
---
 gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 20c7d12..287c389 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3633,3 +3634,35 @@ provides a unix command line interface to a variety of popular www search engine
 and similar services.")
     (home-page "https://surfraw.alioth.debian.org/")
     (license l:public-domain)))
+
+(define-public darkhttpd
+  (package
+    (name "darkhttpd")
+    (version "1.12")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
+             (commit "master")))
+       (sha256
+        (base32
+         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
+       (file-name (string-append name "-" version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "darkhttpd"
+                           (string-append (assoc-ref outputs "out") "/bin")))))))
+    (synopsis "Simple static web server")
+    (description "darkhttpd is a simple static web server.  It is
+standalone and does not need inetd or ucspi-tcp.  It does not need any
+config files---you only have to specify the www root.")
+    (home-page "https://unix4lyfe.org/darkhttpd/")
+    (license l:isc)))
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-10  6:51   ` Arun Isaac
@ 2016-09-10  7:10     ` Alex Kost
  2016-09-10 12:30       ` Arun Isaac
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-09-10  7:10 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

Arun Isaac (2016-09-10 12:21 +0530) wrote:

> * gnu/packages/web.scm (darkhttpd): New variable.
> ---
>  gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 20c7d12..287c389 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -14,6 +14,7 @@
>  ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
>  ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
>  ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
> +;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -3633,3 +3634,35 @@ provides a unix command line interface to a variety of popular www search engine
>  and similar services.")
>      (home-page "https://surfraw.alioth.debian.org/")
>      (license l:public-domain)))
> +
> +(define-public darkhttpd
> +  (package
> +    (name "darkhttpd")
> +    (version "1.12")
> +    (source
> +     (origin
> +       (method git-fetch)

Why 'git-fetch'?  There is a release tarball:

https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2

> +       (uri (git-reference
> +             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
> +             (commit "master")))
> +       (sha256
> +        (base32
> +         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
> +       (file-name (string-append name "-" version))))

I think (file-name (string-append name "-" version "-checkout")) is a
cleaner name for a git checkout directory (but using the tarball is
preferred).

> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:make-flags '("CC=gcc")
> +       #:tests? #f ; No test suite
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (install-file "darkhttpd"
> +                           (string-append (assoc-ref outputs "out") "/bin")))))))

If a phase succeed, it should return non-false value, while the value of
'install-file' is unspecified.  In such cases we add #t to the end of
the phase.  BTW I would shorten that last line by moving "/bin" to the
next one.

> +    (synopsis "Simple static web server")
> +    (description "darkhttpd is a simple static web server.  It is
> +standalone and does not need inetd or ucspi-tcp.  It does not need any
> +config files---you only have to specify the www root.")
> +    (home-page "https://unix4lyfe.org/darkhttpd/")
> +    (license l:isc)))

-- 
Alex

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-10  7:10     ` Alex Kost
@ 2016-09-10 12:30       ` Arun Isaac
  2016-09-10 17:44         ` Alex Kost
  2016-09-11 13:52         ` Ludovic Courtès
  0 siblings, 2 replies; 16+ messages in thread
From: Arun Isaac @ 2016-09-10 12:30 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel


> Why 'git-fetch'?  There is a release tarball:
>
> https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2

Yes, there is a release tarball. But, there is some server side issue
with the url. When I try to download it with wget, I get a "The server
name sent was not recognized" warning. wget ignores this warning and
moves on. The guix downloader fails completely. Should the guix
downloader be patched to ignore this warning as well?

The guix downloader output is shown below.

$ guix download https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2

Starting download of /tmp/guix-file.9jzMRu
From https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2...
ERROR: Throw to key `gnutls-error' with args `(#<gnutls-error-enum A TLS warning alert has been received.> handshake)'.
failed to download "/tmp/guix-file.9jzMRu" from "https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2"
guix download: error: https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2: download failed

The wget downloader output is shown below.

$ wget https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2

--2016-09-09 23:58:53--  https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
Resolving unix4lyfe.org (unix4lyfe.org)... 64.62.188.248, 2001:470:1:41::403e:bcf8
Connecting to unix4lyfe.org (unix4lyfe.org)|64.62.188.248|:443... connected.
GnuTLS: A TLS warning alert has been received.
GnuTLS: received alert [112]: The server name sent was not recognized
HTTP request sent, awaiting response... 200 OK
Length: 20184 (20K) [application/x-bzip2]
Saving to: 'darkhttpd-1.12.tar.bz2'

darkhttpd-1.12.tar.bz2            100%[===========================================================>]  19.71K  39.6KB/s    in 0.5s    

2016-09-09 23:58:56 (39.6 KB/s) - 'darkhttpd-1.12.tar.bz2' saved [20184/20184]

I have initiated a conversation about this problem with the darkhttpd
developer. But, he has no idea what the problem might be. I'll have to
do some research on the Internet. Any ideas?

If you insist on a tarball instead of the git repo, we can add this
package after this tarball download url problem is fixed.

> I think (file-name (string-append name "-" version "-checkout")) is a
> cleaner name for a git checkout directory (but using the tarball is
> preferred).
>
> If a phase succeed, it should return non-false value, while the value of
> 'install-file' is unspecified.  In such cases we add #t to the end of
> the phase.  BTW I would shorten that last line by moving "/bin" to the
> next one.

Sure, I'll make these changes as well.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-10 12:30       ` Arun Isaac
@ 2016-09-10 17:44         ` Alex Kost
  2016-09-11 15:14           ` Arun Isaac
  2016-09-11 19:20           ` Arun Isaac
  2016-09-11 13:52         ` Ludovic Courtès
  1 sibling, 2 replies; 16+ messages in thread
From: Alex Kost @ 2016-09-10 17:44 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

Arun Isaac (2016-09-10 18:00 +0530) wrote:

>> Why 'git-fetch'?  There is a release tarball:
>>
>> https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
>
> Yes, there is a release tarball. But, there is some server side issue
> with the url. When I try to download it with wget, I get a "The server
> name sent was not recognized" warning. wget ignores this warning and
> moves on. The guix downloader fails completely. Should the guix
> downloader be patched to ignore this warning as well?

Oh, indeed (sorry, I didn't try to do "guix download").  Actually I
don't even know whether this problem can be fixed on the guix side
(since the error comes from gnutls).

[...]
> I have initiated a conversation about this problem with the darkhttpd
> developer. But, he has no idea what the problem might be. I'll have to
> do some research on the Internet. Any ideas?

Sorry, no ideas.  All this TLS stuff is a complete mistery for me, I
hope a more knowledgeable person will comment on this.

> If you insist on a tarball instead of the git repo, we can add this
> package after this tarball download url problem is fixed.

No, no, I don't insist; this problem shouldn't block packaging,
git-fetch will be OK, but I think there should be a comment explaining
why the tarball is not used.

-- 
Alex

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-10 12:30       ` Arun Isaac
  2016-09-10 17:44         ` Alex Kost
@ 2016-09-11 13:52         ` Ludovic Courtès
  1 sibling, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-09-11 13:52 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel, Alex Kost

Arun Isaac <arunisaac@systemreboot.net> skribis:

>> Why 'git-fetch'?  There is a release tarball:
>>
>> https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
>
> Yes, there is a release tarball. But, there is some server side issue
> with the url. When I try to download it with wget, I get a "The server
> name sent was not recognized" warning. wget ignores this warning and
> moves on. The guix downloader fails completely. Should the guix
> downloader be patched to ignore this warning as well?
>
> The guix downloader output is shown below.
>
> $ guix download https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
>
> Starting download of /tmp/guix-file.9jzMRu
> From https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2...
> ERROR: Throw to key `gnutls-error' with args `(#<gnutls-error-enum A TLS warning alert has been received.> handshake)'.
> failed to download "/tmp/guix-file.9jzMRu" from "https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2"
> guix download: error: https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2: download failed
>
> The wget downloader output is shown below.
>
> $ wget https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
>
> --2016-09-09 23:58:53--  https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2
> Resolving unix4lyfe.org (unix4lyfe.org)... 64.62.188.248, 2001:470:1:41::403e:bcf8
> Connecting to unix4lyfe.org (unix4lyfe.org)|64.62.188.248|:443... connected.
> GnuTLS: A TLS warning alert has been received.
> GnuTLS: received alert [112]: The server name sent was not recognized

This has to do with the TLS ‘SERVER NAME’ extension (info "(gnutls)
Server name indication").  Unfortunately

  gnutls-cli -p https unix4lyfe.org -VV

doesn’t seem to provide helpful info.

I don’t think we can easily ignore this alert in (guix build download),
and it’s really a server configuration issue in the first place.

Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-10 17:44         ` Alex Kost
@ 2016-09-11 15:14           ` Arun Isaac
  2016-09-11 19:20           ` Arun Isaac
  1 sibling, 0 replies; 16+ messages in thread
From: Arun Isaac @ 2016-09-11 15:14 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]


> No, no, I don't insist; this problem shouldn't block packaging,
> git-fetch will be OK, but I think there should be a comment explaining
> why the tarball is not used.

Sure, I'll send a new patch shortly with all suggested changes
incorporated.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] gnu: Add darkhttpd.
  2016-09-10 17:44         ` Alex Kost
  2016-09-11 15:14           ` Arun Isaac
@ 2016-09-11 19:20           ` Arun Isaac
  2016-09-13 15:42             ` Leo Famulari
  1 sibling, 1 reply; 16+ messages in thread
From: Arun Isaac @ 2016-09-11 19:20 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/web.scm (darkhttpd): New variable.
---
 gnu/packages/web.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 20c7d12..2b73446 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3633,3 +3634,40 @@ provides a unix command line interface to a variety of popular www search engine
 and similar services.")
     (home-page "https://surfraw.alioth.debian.org/")
     (license l:public-domain)))
+
+(define-public darkhttpd
+  (package
+    (name "darkhttpd")
+    (version "1.12")
+    (source
+     (origin
+       ;; The darkhttpd release tarball URL fails to download with a
+       ;; 'TLS warning alert'. Download from the darkhttpd git repo
+       ;; until the problem has been fixed upstream.
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
+             (commit "master")))
+       (sha256
+        (base32
+         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "darkhttpd"
+                           (string-append (assoc-ref outputs "out")
+                                          "/bin"))
+             #t)))))
+    (synopsis "Simple static web server")
+    (description "darkhttpd is a simple static web server.  It is
+standalone and does not need inetd or ucspi-tcp.  It does not need any
+config files---you only have to specify the www root.")
+    (home-page "https://unix4lyfe.org/darkhttpd/")
+    (license l:isc)))
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-11 19:20           ` Arun Isaac
@ 2016-09-13 15:42             ` Leo Famulari
  2016-09-13 17:09               ` Arun Isaac
  2016-09-14  6:01               ` Arun Isaac
  0 siblings, 2 replies; 16+ messages in thread
From: Leo Famulari @ 2016-09-13 15:42 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

On Mon, Sep 12, 2016 at 12:50:14AM +0530, Arun Isaac wrote:
> * gnu/packages/web.scm (darkhttpd): New variable.

Thanks for this patch!

> +    (version "1.12")
> +    (source
> +     (origin
> +       ;; The darkhttpd release tarball URL fails to download with a
> +       ;; 'TLS warning alert'. Download from the darkhttpd git repo
> +       ;; until the problem has been fixed upstream.
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
> +             (commit "master")))

If I understand correctly, this will not work as expected. When the
master branch gets another commit, our package's hash will become
invalid.

Too bad upstream doesn't make Git tags for their releases. Commit
41b68476c35270f47dcd2ddebe27cbcd87e43d41 appears to correspond to the
1.12 release, so we should specify that commit:

https://unix4lyfe.org/gitweb/darkhttpd/commit/41b68476c35270f47dcd2ddebe27cbcd87e43d41

> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (install-file "darkhttpd"
> +                           (string-append (assoc-ref outputs "out")
> +                                          "/bin"))
> +             #t)))))

Did you notice if there is any documentation that could be installed too?

In any case, can you send a revised patch addressing the commit /
version issue?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-13 15:42             ` Leo Famulari
@ 2016-09-13 17:09               ` Arun Isaac
  2016-09-14  6:01               ` Arun Isaac
  1 sibling, 0 replies; 16+ messages in thread
From: Arun Isaac @ 2016-09-13 17:09 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]


> If I understand correctly, this will not work as expected. When the
> master branch gets another commit, our package's hash will become
> invalid.

Oops! I didn't think of that. I'll fix it.

> Did you notice if there is any documentation that could be installed too?

There's only a README file. And, that doesn't have very much that can be
considered documentation. `darkhttpd --help` is all the documentation
for this program, I guess.

> In any case, can you send a revised patch addressing the commit /
> version issue?

I'll send a revised patch soon.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] gnu: Add darkhttpd.
  2016-09-13 15:42             ` Leo Famulari
  2016-09-13 17:09               ` Arun Isaac
@ 2016-09-14  6:01               ` Arun Isaac
  2016-09-14 21:28                 ` Leo Famulari
  1 sibling, 1 reply; 16+ messages in thread
From: Arun Isaac @ 2016-09-14  6:01 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/web.scm (darkhttpd): New variable.
---
 gnu/packages/web.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 20c7d12..2b73446 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3633,3 +3634,40 @@ provides a unix command line interface to a variety of popular www search engine
 and similar services.")
     (home-page "https://surfraw.alioth.debian.org/")
     (license l:public-domain)))
+
+(define-public darkhttpd
+  (package
+    (name "darkhttpd")
+    (version "1.12")
+    (source
+     (origin
+       ;; The darkhttpd release tarball URL fails to download with a
+       ;; 'TLS warning alert'. Download from the darkhttpd git repo
+       ;; until the problem has been fixed upstream.
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
+             (commit "41b68476c35270f47dcd2ddebe27cbcd87e43d41"))
+       (sha256
+        (base32
+         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "darkhttpd"
+                           (string-append (assoc-ref outputs "out")
+                                          "/bin"))
+             #t)))))
+    (synopsis "Simple static web server")
+    (description "darkhttpd is a simple static web server.  It is
+standalone and does not need inetd or ucspi-tcp.  It does not need any
+config files---you only have to specify the www root.")
+    (home-page "https://unix4lyfe.org/darkhttpd/")
+    (license l:isc)))
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-14  6:01               ` Arun Isaac
@ 2016-09-14 21:28                 ` Leo Famulari
  2016-09-15  6:17                   ` Arun Isaac
  0 siblings, 1 reply; 16+ messages in thread
From: Leo Famulari @ 2016-09-14 21:28 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

On Wed, Sep 14, 2016 at 11:31:59AM +0530, Arun Isaac wrote:
> * gnu/packages/web.scm (darkhttpd): New variable.

Thanks for the updated patch!

> +       (uri (git-reference
> +             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
> +             (commit "41b68476c35270f47dcd2ddebe27cbcd87e43d41"))
                                                                    ^
There was a missing parentheses here -------------------------------|

> +       #:tests? #f ; No test suite

I found some tests! See attached. Part of the test suite wants some
static library from Clang / LLVM; I couldn't make that work in 5 minutes
so I gave up ;) I think it's okay to commit in this state.

What do you think?

[-- Attachment #2: 0001-gnu-Add-darkhttpd.patch --]
[-- Type: text/plain, Size: 2768 bytes --]

From 8268e04b18292047ff1922a151ad7458b443b9a0 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Wed, 14 Sep 2016 11:31:59 +0530
Subject: [PATCH] gnu: Add darkhttpd.

* gnu/packages/web.scm (darkhttpd): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/web.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index b9c201d..14cdf49 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3633,3 +3634,46 @@ provides a unix command line interface to a variety of popular www search engine
 and similar services.")
     (home-page "https://surfraw.alioth.debian.org/")
     (license l:public-domain)))
+
+(define-public darkhttpd
+  (package
+    (name "darkhttpd")
+    (version "1.12")
+    (source
+     (origin
+       ;; The darkhttpd release tarball URL fails to download with a
+       ;; 'TLS warning alert'. Download from the darkhttpd git repo
+       ;; until the problem has been fixed upstream.
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
+             (commit "41b68476c35270f47dcd2ddebe27cbcd87e43d41")))
+       (sha256
+        (base32
+         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python-2" ,python-2)))
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "darkhttpd"
+                           (string-append (assoc-ref outputs "out")
+                                          "/bin"))
+             #t))
+
+         ;; TODO Fix "***WARNING*** $CLANG \
+         ;; (/homeless-shelter/llvm/install/bin/clang) doesn't exist."
+         (replace 'check
+           (lambda _ (zero? (system* "make" "--directory" "devel")))))))
+    (synopsis "Simple static web server")
+    (description "darkhttpd is a simple static web server.  It is
+standalone and does not need inetd or ucspi-tcp.  It does not need any
+config files---you only have to specify the www root.")
+    (home-page "https://unix4lyfe.org/darkhttpd/")
+    (license l:isc)))
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-14 21:28                 ` Leo Famulari
@ 2016-09-15  6:17                   ` Arun Isaac
  2016-09-15 15:23                     ` Leo Famulari
  0 siblings, 1 reply; 16+ messages in thread
From: Arun Isaac @ 2016-09-15  6:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]


> I found some tests! See attached. Part of the test suite wants some
> static library from Clang / LLVM; I couldn't make that work in 5 minutes
> so I gave up ;) I think it's okay to commit in this state.

Yeah, the darkhttpd git repo has some test cases, but the release
tarball does not. Since we will be moving to the release tarball once
the release tarball URL problem is fixed upstream, I think we should not
do the test cases.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] gnu: Add darkhttpd.
  2016-09-15  6:17                   ` Arun Isaac
@ 2016-09-15 15:23                     ` Leo Famulari
  0 siblings, 0 replies; 16+ messages in thread
From: Leo Famulari @ 2016-09-15 15:23 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

On Thu, Sep 15, 2016 at 11:47:16AM +0530, Arun Isaac wrote:
> 
> > I found some tests! See attached. Part of the test suite wants some
> > static library from Clang / LLVM; I couldn't make that work in 5 minutes
> > so I gave up ;) I think it's okay to commit in this state.
> 
> Yeah, the darkhttpd git repo has some test cases, but the release
> tarball does not. Since we will be moving to the release tarball once
> the release tarball URL problem is fixed upstream, I think we should not
> do the test cases.

Okay, makes sense. Pushed as 797a5cf57f038e31e464afd5256a9faff5b46689

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-15 15:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 19:56 [PATCH] gnu: Add darkhttpd Arun Isaac
2016-09-09 20:41 ` Leo Famulari
2016-09-10  5:19   ` Arun Isaac
2016-09-10  6:51   ` Arun Isaac
2016-09-10  7:10     ` Alex Kost
2016-09-10 12:30       ` Arun Isaac
2016-09-10 17:44         ` Alex Kost
2016-09-11 15:14           ` Arun Isaac
2016-09-11 19:20           ` Arun Isaac
2016-09-13 15:42             ` Leo Famulari
2016-09-13 17:09               ` Arun Isaac
2016-09-14  6:01               ` Arun Isaac
2016-09-14 21:28                 ` Leo Famulari
2016-09-15  6:17                   ` Arun Isaac
2016-09-15 15:23                     ` Leo Famulari
2016-09-11 13:52         ` Ludovic Courtès

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).