unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (unknown), 
@ 2016-06-08 12:55 Ben Woodcroft
  2016-06-08 12:55 ` [PATCH 1/2] gnu: Add ruby-hoe-git Ben Woodcroft
  2016-06-08 12:55 ` [PATCH 2/2] gnu: Add ruby-puma Ben Woodcroft
  0 siblings, 2 replies; 6+ messages in thread
From: Ben Woodcroft @ 2016-06-08 12:55 UTC (permalink / raw)
  To: guix-devel

Thanks in advance.
ben

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

* [PATCH 1/2] gnu: Add ruby-hoe-git.
  2016-06-08 12:55 (unknown), Ben Woodcroft
@ 2016-06-08 12:55 ` Ben Woodcroft
  2016-06-08 13:09   ` Thompson, David
  2016-06-08 12:55 ` [PATCH 2/2] gnu: Add ruby-puma Ben Woodcroft
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Woodcroft @ 2016-06-08 12:55 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/ruby.scm (ruby-hoe-git): New variable.
---
 gnu/packages/ruby.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 527f76b..d2b49ba 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3939,6 +3939,28 @@ part of the Prawn PDF generator.")
     ;; for details."
     (license (list license:gpl2 license:gpl3 license:ruby))))
 
+(define-public ruby-hoe-git
+  (package
+    (name "ruby-hoe-git")
+    (version "1.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "hoe-git" version))
+       (sha256
+        (base32
+         "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
+    (build-system ruby-build-system)
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)))
+    (synopsis "Hoe plugins for tighter Git integration")
+    (description
+     "This package provides a set of Hoe plugins for tighter Git integration.
+It provides tasks to automate release tagging and pushing and changelog
+generation.")
+    (home-page "http://github.com/jbarnette/hoe-git")
+    (license license:expat)))
+
 (define-public ruby-sequel
   (package
     (name "ruby-sequel")
-- 
2.7.4

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

* [PATCH 2/2] gnu: Add ruby-puma.
  2016-06-08 12:55 (unknown), Ben Woodcroft
  2016-06-08 12:55 ` [PATCH 1/2] gnu: Add ruby-hoe-git Ben Woodcroft
@ 2016-06-08 12:55 ` Ben Woodcroft
  2016-06-08 13:13   ` Thompson, David
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Woodcroft @ 2016-06-08 12:55 UTC (permalink / raw)
  To: guix-devel

gnu/packages/ruby.scm (ruby-puma): New variable.
gnu/packages/patches/ruby-puma-ignore-broken-test.patch: New file.
gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |  1 +
 .../patches/ruby-puma-ignore-broken-test.patch     | 13 +++++++
 gnu/packages/ruby.scm                              | 41 ++++++++++++++++++++++
 3 files changed, 55 insertions(+)
 create mode 100644 gnu/packages/patches/ruby-puma-ignore-broken-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ff476be..5ff5075 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -733,6 +733,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rpm-CVE-2014-8118.patch			\
   %D%/packages/patches/rsem-makefile.patch			\
   %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch	\
+  %D%/packages/patches/ruby-puma-ignore-broken-test.patch       \
   %D%/packages/patches/ruby-symlinkfix.patch                    \
   %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
   %D%/packages/patches/rush-CVE-2013-6889.patch			\
diff --git a/gnu/packages/patches/ruby-puma-ignore-broken-test.patch b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch
new file mode 100644
index 0000000..fb653dc
--- /dev/null
+++ b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch
@@ -0,0 +1,13 @@
+diff --git a/test/test_integration.rb b/test/test_integration.rb
+index d9b189c..6e21180 100644
+--- a/test/test_integration.rb
++++ b/test/test_integration.rb
+@@ -115,7 +115,7 @@ class TestIntegration < Test::Unit::TestCase
+     assert_kind_of Thread, t.join(1), "server didn't stop"
+   end
+ 
+-  def test_phased_restart_via_pumactl
++  def no_test_phased_restart_via_pumactl
+     if Puma.jruby? || Puma.windows?
+       assert true
+       return
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d2b49ba..add5a32 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3939,6 +3939,47 @@ part of the Prawn PDF generator.")
     ;; for details."
     (license (list license:gpl2 license:gpl3 license:ruby))))
 
+(define-public ruby-puma
+  (package
+    (name "ruby-puma")
+    (version "3.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       ;; Fetch from GitHub because distributed gem does not contain tests.
+       (uri (string-append "https://github.com/puma/puma/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "10svyj2jk949y1dmkxyzipk1ddzl4iz9limrcws1zhpganpvq3j8"))
+       ;; Ignore broken test reported upstream.
+       ;; https://github.com/puma/puma/issues/995
+       (patches (search-patches "ruby-puma-ignore-broken-test.patch"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-gemspec
+           (lambda _
+             (substitute* "puma.gemspec"
+               (("git ls-files") "find * |sort"))
+             #t)))))
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)
+       ("ruby-rake-compiler" ,ruby-rake-compiler)
+       ("ruby-hoe-git" ,ruby-hoe-git)
+       ("ruby-rack" ,ruby-rack)))
+    (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
+    (description
+     "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
+for Ruby/Rack applications.  Puma is intended for use in both development and
+production environments.  In order to get the best throughput, it is highly
+recommended that you use a Ruby implementation with real threads like Rubinius
+or JRuby.")
+    (home-page "http://puma.io")
+    (license license:expat)))
+
 (define-public ruby-hoe-git
   (package
     (name "ruby-hoe-git")
-- 
2.7.4

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

* Re: [PATCH 1/2] gnu: Add ruby-hoe-git.
  2016-06-08 12:55 ` [PATCH 1/2] gnu: Add ruby-hoe-git Ben Woodcroft
@ 2016-06-08 13:09   ` Thompson, David
  0 siblings, 0 replies; 6+ messages in thread
From: Thompson, David @ 2016-06-08 13:09 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

On Wed, Jun 8, 2016 at 8:55 AM, Ben Woodcroft <donttrustben@gmail.com> wrote:
> * gnu/packages/ruby.scm (ruby-hoe-git): New variable.
> ---
>  gnu/packages/ruby.scm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 527f76b..d2b49ba 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -3939,6 +3939,28 @@ part of the Prawn PDF generator.")
>      ;; for details."
>      (license (list license:gpl2 license:gpl3 license:ruby))))
>
> +(define-public ruby-hoe-git
> +  (package
> +    (name "ruby-hoe-git")
> +    (version "1.6.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "hoe-git" version))
> +       (sha256
> +        (base32
> +         "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
> +    (build-system ruby-build-system)
> +    (native-inputs
> +     `(("ruby-hoe" ,ruby-hoe)))

Why is this a native input?

Also, I would have expected git to be an input.  How does this gem
interact with git?

> +    (synopsis "Hoe plugins for tighter Git integration")
> +    (description
> +     "This package provides a set of Hoe plugins for tighter Git integration.
> +It provides tasks to automate release tagging and pushing and changelog
> +generation.")
> +    (home-page "http://github.com/jbarnette/hoe-git")
> +    (license license:expat)))
> +
>  (define-public ruby-sequel
>    (package
>      (name "ruby-sequel")
> --
> 2.7.4
>
>

- Dave

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

* Re: [PATCH 2/2] gnu: Add ruby-puma.
  2016-06-08 12:55 ` [PATCH 2/2] gnu: Add ruby-puma Ben Woodcroft
@ 2016-06-08 13:13   ` Thompson, David
  2016-06-10  9:37     ` Ben Woodcroft
  0 siblings, 1 reply; 6+ messages in thread
From: Thompson, David @ 2016-06-08 13:13 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

On Wed, Jun 8, 2016 at 8:55 AM, Ben Woodcroft <donttrustben@gmail.com> wrote:
> gnu/packages/ruby.scm (ruby-puma): New variable.
> gnu/packages/patches/ruby-puma-ignore-broken-test.patch: New file.
> gnu/local.mk (dist_patch_DATA): Add it.
> ---
>  gnu/local.mk                                       |  1 +
>  .../patches/ruby-puma-ignore-broken-test.patch     | 13 +++++++
>  gnu/packages/ruby.scm                              | 41 ++++++++++++++++++++++
>  3 files changed, 55 insertions(+)
>  create mode 100644 gnu/packages/patches/ruby-puma-ignore-broken-test.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index ff476be..5ff5075 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -733,6 +733,7 @@ dist_patch_DATA =                                           \
>    %D%/packages/patches/rpm-CVE-2014-8118.patch                 \
>    %D%/packages/patches/rsem-makefile.patch                     \
>    %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch        \
> +  %D%/packages/patches/ruby-puma-ignore-broken-test.patch       \
>    %D%/packages/patches/ruby-symlinkfix.patch                    \
>    %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
>    %D%/packages/patches/rush-CVE-2013-6889.patch                        \
> diff --git a/gnu/packages/patches/ruby-puma-ignore-broken-test.patch b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch
> new file mode 100644
> index 0000000..fb653dc
> --- /dev/null
> +++ b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch
> @@ -0,0 +1,13 @@
> +diff --git a/test/test_integration.rb b/test/test_integration.rb
> +index d9b189c..6e21180 100644
> +--- a/test/test_integration.rb
> ++++ b/test/test_integration.rb
> +@@ -115,7 +115,7 @@ class TestIntegration < Test::Unit::TestCase
> +     assert_kind_of Thread, t.join(1), "server didn't stop"
> +   end
> +
> +-  def test_phased_restart_via_pumactl
> ++  def no_test_phased_restart_via_pumactl
> +     if Puma.jruby? || Puma.windows?
> +       assert true
> +       return
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index d2b49ba..add5a32 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -3939,6 +3939,47 @@ part of the Prawn PDF generator.")
>      ;; for details."
>      (license (list license:gpl2 license:gpl3 license:ruby))))
>
> +(define-public ruby-puma
> +  (package
> +    (name "ruby-puma")
> +    (version "3.4.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       ;; Fetch from GitHub because distributed gem does not contain tests.
> +       (uri (string-append "https://github.com/puma/puma/archive/v"
> +                           version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "10svyj2jk949y1dmkxyzipk1ddzl4iz9limrcws1zhpganpvq3j8"))
> +       ;; Ignore broken test reported upstream.
> +       ;; https://github.com/puma/puma/issues/995
> +       (patches (search-patches "ruby-puma-ignore-broken-test.patch"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'build 'fix-gemspec
> +           (lambda _
> +             (substitute* "puma.gemspec"
> +               (("git ls-files") "find * |sort"))
> +             #t)))))

Food for thought: With the prevalence of "git ls-files" in gemspecs
(thanks to Bundler), maybe we should consider adding a phase to
ruby-build-system that performs this substitution.

> +    (native-inputs
> +     `(("ruby-hoe" ,ruby-hoe)
> +       ("ruby-rake-compiler" ,ruby-rake-compiler)
> +       ("ruby-hoe-git" ,ruby-hoe-git)
> +       ("ruby-rack" ,ruby-rack)))

Why are these native inputs?  rake-compiler makes sense because it's
build-time only, but rack is most definitely a runtime dependency that
should be in propagated-inputs.  What environment have you been using
to test these packages?

> +    (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
> +    (description
> +     "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
> +for Ruby/Rack applications.  Puma is intended for use in both development and
> +production environments.  In order to get the best throughput, it is highly
> +recommended that you use a Ruby implementation with real threads like Rubinius
> +or JRuby.")
> +    (home-page "http://puma.io")
> +    (license license:expat)))
> +
>  (define-public ruby-hoe-git
>    (package
>      (name "ruby-hoe-git")
> --
> 2.7.4
>
>

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

* Re: [PATCH 2/2] gnu: Add ruby-puma.
  2016-06-08 13:13   ` Thompson, David
@ 2016-06-10  9:37     ` Ben Woodcroft
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Woodcroft @ 2016-06-10  9:37 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

Thanks Dave.

On 08/06/16 23:13, Thompson, David wrote:
> On Wed, Jun 8, 2016 at 8:55 AM, Ben Woodcroft <donttrustben@gmail.com> wrote:
>> +         (add-before 'build 'fix-gemspec
>> +           (lambda _
>> +             (substitute* "puma.gemspec"
>> +               (("git ls-files") "find * |sort"))
>> +             #t)))))
> Food for thought: With the prevalence of "git ls-files" in gemspecs
> (thanks to Bundler), maybe we should consider adding a phase to
> ruby-build-system that performs this substitution.

Sounds good to me. Next time..

>> +    (native-inputs
>> +     `(("ruby-hoe" ,ruby-hoe)
>> +       ("ruby-rake-compiler" ,ruby-rake-compiler)
>> +       ("ruby-hoe-git" ,ruby-hoe-git)
>> +       ("ruby-rack" ,ruby-rack)))
> Why are these native inputs?  rake-compiler makes sense because it's
> build-time only, but rack is most definitely a runtime dependency that
> should be in propagated-inputs.  What environment have you been using
> to test these packages?

Well, I did send this off a bit too quickly, in part because I still 
cannot get containers working after updating Ubuntu.
https://lists.gnu.org/archive/html/help-guix/2016-05/msg00003.html

You were right about the inputs to hoe-git. However, as it turns out I'm 
not sure rack is needed for puma, actually. For instance this works with 
the current patch:
$ cat >/tmp/config.ru

run Proc.new { |env| ['200', {'Content-Type' => 'text/html'}, ['get rack\'d']] }

$ environment --pure --ad-hoc ruby ruby-puma -- puma /tmp/config.ru

Also, rack is not mentioned in the gemspec. WDYT?

ben

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

end of thread, other threads:[~2016-06-10  9:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 12:55 (unknown), Ben Woodcroft
2016-06-08 12:55 ` [PATCH 1/2] gnu: Add ruby-hoe-git Ben Woodcroft
2016-06-08 13:09   ` Thompson, David
2016-06-08 12:55 ` [PATCH 2/2] gnu: Add ruby-puma Ben Woodcroft
2016-06-08 13:13   ` Thompson, David
2016-06-10  9:37     ` Ben Woodcroft

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