Patchwork gnu: Add ruby-safe-yaml

login
register
mail settings
Submitter Frederick Muriithi
Date Nov. 21, 2016, 5:47 p.m.
Message ID <CALjrZwYPbDXPao4MfXOLhbA8d-xE0WKEpkQ8oJuHaBWAtr78=g@mail.gmail.com>
Download mbox | patch
Permalink /patch/17679/
State New
Headers show

Comments

Frederick Muriithi - Nov. 21, 2016, 5:47 p.m.
gnu/packages/ruby.scm (ruby-safe-yaml): Add new variable

Tests deactivated due to missing rake task. Submitted a patch to
upstream maintainer, so hopefully future versions will run tests
successfully
Marius Bakke - Nov. 21, 2016, 5:59 p.m.
Frederick Muriithi <fredmanglis@gmail.com> writes:

> gnu/packages/ruby.scm (ruby-safe-yaml): Add new variable
>
> Tests deactivated due to missing rake task. Submitted a patch to
> upstream maintainer, so hopefully future versions will run tests
> successfully

Cool! If there are tests, and a patch exists for enabling them as a rake
task, I think we should include it, with a link to the upstream issue.

Could you send an updated patch that enables the tests? And thanks! :)

>
> -- 
> Frederick M. Muriithi
> From 271945b9de385fe7ddcc74bf2555f40096c4099a Mon Sep 17 00:00:00 2001
> From: Muriithi Frederick Muriuki <fredmanglis@gmail.com>
> Date: Mon, 21 Nov 2016 19:24:19 +0300
> Subject: [PATCH] gnu: Add ruby-safe-yaml
>
> * gnu/packages/ruby.scm (ruby-safe-yaml): New variable.
> ---
>  gnu/packages/ruby.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index d8c36be..e939190 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -4247,3 +4247,31 @@ of the more insecure basic authentication scheme.")
>  them more powerful")
>     (home-page "https://github.com/intridea/hashie")
>     (license license:expat)))
> +
> +(define-public ruby-safe-yaml
> +  (package
> +    (name "ruby-safe-yaml")
> +    (version "1.0.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "safe_yaml" version))
> +       (sha256
> +        (base32
> +         "1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     ;; Missing rake task 'test'
> +     ;; Submitted patch to upstream maintainer
> +     `(#:tests? #f))
> +    (native-inputs
> +     `(("ruby-rspec" ,ruby-rspec)
> +       ("ruby-hashie" ,ruby-hashie)))
> +    (synopsis "Parse YAML safely")
> +    (description "The SafeYAML gem provides an alternative
> +implementation of YAML.load suitable for accepting user input
> +in Ruby applications.  Unlike Ruby's built-in implementation of
> +YAML.load, SafeYAML's version will not expose apps to arbitrary
> +code execution exploits")
> +    (home-page "https://github.com/dtao/safe_yaml")
> +    (license license:expat)))
> -- 
> 2.1.4

Patch

From 271945b9de385fe7ddcc74bf2555f40096c4099a Mon Sep 17 00:00:00 2001
From: Muriithi Frederick Muriuki <fredmanglis@gmail.com>
Date: Mon, 21 Nov 2016 19:24:19 +0300
Subject: [PATCH] gnu: Add ruby-safe-yaml

* gnu/packages/ruby.scm (ruby-safe-yaml): New variable.
---
 gnu/packages/ruby.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d8c36be..e939190 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4247,3 +4247,31 @@  of the more insecure basic authentication scheme.")
 them more powerful")
    (home-page "https://github.com/intridea/hashie")
    (license license:expat)))
+
+(define-public ruby-safe-yaml
+  (package
+    (name "ruby-safe-yaml")
+    (version "1.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "safe_yaml" version))
+       (sha256
+        (base32
+         "1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; Missing rake task 'test'
+     ;; Submitted patch to upstream maintainer
+     `(#:tests? #f))
+    (native-inputs
+     `(("ruby-rspec" ,ruby-rspec)
+       ("ruby-hashie" ,ruby-hashie)))
+    (synopsis "Parse YAML safely")
+    (description "The SafeYAML gem provides an alternative
+implementation of YAML.load suitable for accepting user input
+in Ruby applications.  Unlike Ruby's built-in implementation of
+YAML.load, SafeYAML's version will not expose apps to arbitrary
+code execution exploits")
+    (home-page "https://github.com/dtao/safe_yaml")
+    (license license:expat)))
-- 
2.1.4