all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
@ 2017-06-22 19:36 Jelle Licht
  2017-06-26  9:39 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Licht @ 2017-06-22 19:36 UTC (permalink / raw)
  To: 27452

See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the
rationale.

* gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/admin.scm (ansible)[source]: Use it.
---
 gnu/local.mk                                         |  1 +
 gnu/packages/admin.scm                               |  5 ++++-
 gnu/packages/patches/ansible-wrap-program-hack.patch | 17 +++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/ansible-wrap-program-hack.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 88ea8daf4..bed24a841 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -501,6 +501,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/aegis-test-fixup-1.patch            	\
   %D%/packages/patches/aegis-test-fixup-2.patch            	\
   %D%/packages/patches/agg-am_c_prototype.patch			\
+  %D%/packages/patches/ansible-wrap-program-hack.patch		\
   %D%/packages/patches/antiword-CVE-2014-8123.patch			\
   %D%/packages/patches/apr-skip-getservbyname-test.patch	\
   %D%/packages/patches/aspell-default-dict-dir.patch		\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 35679495f..81a53413f 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1366,7 +1366,10 @@ of supported upstream metrics systems simultaneously.")
        (uri (pypi-uri "ansible" version))
        (sha256
         (base32
-         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))))
+         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))
+       ;; FIXME: Remove once wrapping ansible works properly
+       ;; See http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html
+       (patches (search-patches "ansible-wrap-program-hack.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("python2-pycrypto" ,python2-pycrypto)
diff --git a/gnu/packages/patches/ansible-wrap-program-hack.patch b/gnu/packages/patches/ansible-wrap-program-hack.patch
new file mode 100644
index 000000000..bc7eb9d31
--- /dev/null
+++ b/gnu/packages/patches/ansible-wrap-program-hack.patch
@@ -0,0 +1,17 @@
+--- ansible-2.3.0.0/bin/ansible	2017-04-12 16:08:05.000000000 +0200
++++ ansible-2.3.0.0-fixed/bin/ansible	2017-05-21 20:11:18.720872385 +0200
+@@ -75,7 +75,13 @@
+             # sometimes add that
+             target = target[:-1]
+
+-        if len(target) > 1:
++        if target[-1] == "real" and target[0].startswith('.'):
++            target = target[:-1]
++            target[0] = target[0][1:]
++        if len(target) > 1 and target[1] != "real" :
++            sub = target[1]
++            myclass = "%sCLI" % sub.capitalize()
++        elif len(target) > 2 and target[2] == "real" :
+             sub = target[1]
+             myclass = "%sCLI" % sub.capitalize()
+         elif target[0] == 'ansible':
-- 
2.13.1

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

* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-22 19:36 [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script Jelle Licht
@ 2017-06-26  9:39 ` Ludovic Courtès
  2017-06-26 10:46   ` Jelle Licht
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-06-26  9:39 UTC (permalink / raw)
  To: Jelle Licht; +Cc: 27452

Hello,

Jelle Licht <jlicht@fsfe.org> skribis:

> See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the
> rationale.
>
> * gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/admin.scm (ansible)[source]: Use it.
> ---
>  gnu/local.mk                                         |  1 +
>  gnu/packages/admin.scm                               |  5 ++++-
>  gnu/packages/patches/ansible-wrap-program-hack.patch | 17 +++++++++++++++++
>  3 files changed, 22 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/ansible-wrap-program-hack.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 88ea8daf4..bed24a841 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -501,6 +501,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/aegis-test-fixup-1.patch            	\
>    %D%/packages/patches/aegis-test-fixup-2.patch            	\
>    %D%/packages/patches/agg-am_c_prototype.patch			\
> +  %D%/packages/patches/ansible-wrap-program-hack.patch		\
>    %D%/packages/patches/antiword-CVE-2014-8123.patch			\
>    %D%/packages/patches/apr-skip-getservbyname-test.patch	\
>    %D%/packages/patches/aspell-default-dict-dir.patch		\
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 35679495f..81a53413f 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -1366,7 +1366,10 @@ of supported upstream metrics systems simultaneously.")
>         (uri (pypi-uri "ansible" version))
>         (sha256
>          (base32
> -         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))))
> +         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))
> +       ;; FIXME: Remove once wrapping ansible works properly
> +       ;; See http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html
> +       (patches (search-patches "ansible-wrap-program-hack.patch"))))
>      (build-system python-build-system)
>      (native-inputs
>       `(("python2-pycrypto" ,python2-pycrypto)
> diff --git a/gnu/packages/patches/ansible-wrap-program-hack.patch b/gnu/packages/patches/ansible-wrap-program-hack.patch
> new file mode 100644
> index 000000000..bc7eb9d31
> --- /dev/null
> +++ b/gnu/packages/patches/ansible-wrap-program-hack.patch
> @@ -0,0 +1,17 @@
> +--- ansible-2.3.0.0/bin/ansible	2017-04-12 16:08:05.000000000 +0200
> ++++ ansible-2.3.0.0-fixed/bin/ansible	2017-05-21 20:11:18.720872385 +0200
> +@@ -75,7 +75,13 @@

Could you move the FIXME and URL to the .patch file, and also add a
sentence explaining what it does?

OK with these changes, thanks!

Ludo’.

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

* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-26  9:39 ` Ludovic Courtès
@ 2017-06-26 10:46   ` Jelle Licht
  2017-06-26 16:11     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Licht @ 2017-06-26 10:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27452

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

Hello,

2017-06-26 11:39 GMT+02:00 Ludovic Courtès <ludo@gnu.org>:

> Hello,
>
> Jelle Licht <jlicht@fsfe.org> skribis:
>
> > See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html>
> for the
> > rationale.
> >
> > * gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
> > * gnu/local.mk (dist_patch_DATA): Add it.
> > * gnu/packages/admin.scm (ansible)[source]: Use it.
> > ---
> >  gnu/local.mk                                         |  1 +
> >  gnu/packages/admin.scm                               |  5 ++++-
> >  gnu/packages/patches/ansible-wrap-program-hack.patch | 17
> +++++++++++++++++
> >  3 files changed, 22 insertions(+), 1 deletion(-)
> >  create mode 100644 gnu/packages/patches/ansible-wrap-program-hack.patch
> >
> > diff --git a/gnu/local.mk b/gnu/local.mk
> > index 88ea8daf4..bed24a841 100644
> > --- a/gnu/local.mk
> > +++ b/gnu/local.mk
> > @@ -501,6 +501,7 @@ dist_patch_DATA =
>      \
> >    %D%/packages/patches/aegis-test-fixup-1.patch              \
> >    %D%/packages/patches/aegis-test-fixup-2.patch              \
> >    %D%/packages/patches/agg-am_c_prototype.patch                      \
> > +  %D%/packages/patches/ansible-wrap-program-hack.patch               \
> >    %D%/packages/patches/antiword-CVE-2014-8123.patch                  \
> >    %D%/packages/patches/apr-skip-getservbyname-test.patch     \
> >    %D%/packages/patches/aspell-default-dict-dir.patch         \
> > diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> > index 35679495f..81a53413f 100644
> > --- a/gnu/packages/admin.scm
> > +++ b/gnu/packages/admin.scm
> > @@ -1366,7 +1366,10 @@ of supported upstream metrics systems
> simultaneously.")
> >         (uri (pypi-uri "ansible" version))
> >         (sha256
> >          (base32
> > -         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))))
> > +         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))
> > +       ;; FIXME: Remove once wrapping ansible works properly
> > +       ;; See http://lists.gnu.org/archive/h
> tml/bug-guix/2017-05/msg00015.html
> > +       (patches (search-patches "ansible-wrap-program-hack.patch"))))
> >      (build-system python-build-system)
> >      (native-inputs
> >       `(("python2-pycrypto" ,python2-pycrypto)
> > diff --git a/gnu/packages/patches/ansible-wrap-program-hack.patch
> b/gnu/packages/patches/ansible-wrap-program-hack.patch
> > new file mode 100644
> > index 000000000..bc7eb9d31
> > --- /dev/null
> > +++ b/gnu/packages/patches/ansible-wrap-program-hack.patch
> > @@ -0,0 +1,17 @@
> > +--- ansible-2.3.0.0/bin/ansible      2017-04-12 16:08:05.000000000 +0200
> > ++++ ansible-2.3.0.0-fixed/bin/ansible        2017-05-21
> 20:11:18.720872385 +0200
> > +@@ -75,7 +75,13 @@
>
> Could you move the FIXME and URL to the .patch file, and also add a
> sentence explaining what it does?
>

I am not familiar enough with .patch files to know what you expect me to
do.
I should add these comments /in/ the .patch file?

>
> OK with these changes, thanks!
>
> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 4902 bytes --]

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

* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-26 10:46   ` Jelle Licht
@ 2017-06-26 16:11     ` Ludovic Courtès
  2017-06-26 17:33       ` Jelle Licht
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-06-26 16:11 UTC (permalink / raw)
  To: Jelle Licht; +Cc: 27452

Jelle Licht <jlicht@fsfe.org> skribis:

> I am not familiar enough with .patch files to know what you expect me to do. 
> I should add these comments /in/ the .patch file?

Yes, at the top of the file, please.  You can look for examples in the
other files in there.

HTH!

Ludo’.

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

* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-26 16:11     ` Ludovic Courtès
@ 2017-06-26 17:33       ` Jelle Licht
  2017-06-26 19:17         ` Ludovic Courtès
  2017-06-29 12:55         ` bug#27452: " Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Jelle Licht @ 2017-06-26 17:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27452

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


Ludovic Courtès <ludo@gnu.org> writes:

> Jelle Licht <jlicht@fsfe.org> skribis:
>
>> I am not familiar enough with .patch files to know what you expect me to do.
>> I should add these comments /in/ the .patch file?
>
> Yes, at the top of the file, please.  You can look for examples in the
> other files in there.
>
> HTH!
>
> Ludo’.

Thanks for the pointers. Attached you will find the updated patch.

Jelle.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-ansible-Apply-experimental-patch-to-deal-with-wr.patch --]
[-- Type: text/x-patch, Size: 3267 bytes --]

From 1c5ac5bac497f415e20540a193e36dc02d012bf2 Mon Sep 17 00:00:00 2001
From: Jelle Licht <jlicht@fsfe.org>
Date: Thu, 22 Jun 2017 21:26:49 +0200
Subject: [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping
 of ansible script.

See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the
rationale.

* gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/admin.scm (ansible)[source]: Use it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/admin.scm                             |  3 ++-
 .../patches/ansible-wrap-program-hack.patch        | 22 ++++++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/ansible-wrap-program-hack.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5d024de07..f3092d580 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -501,6 +501,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/aegis-test-fixup-1.patch            	\
   %D%/packages/patches/aegis-test-fixup-2.patch            	\
   %D%/packages/patches/agg-am_c_prototype.patch			\
+  %D%/packages/patches/ansible-wrap-program-hack.patch		\
   %D%/packages/patches/antiword-CVE-2014-8123.patch			\
   %D%/packages/patches/apr-skip-getservbyname-test.patch	\
   %D%/packages/patches/aspell-default-dict-dir.patch		\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 96ca6a76d..2cc5200a0 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1366,7 +1366,8 @@ of supported upstream metrics systems simultaneously.")
        (uri (pypi-uri "ansible" version))
        (sha256
         (base32
-         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))))
+         "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd"))
+       (patches (search-patches "ansible-wrap-program-hack.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("python2-pycrypto" ,python2-pycrypto)
diff --git a/gnu/packages/patches/ansible-wrap-program-hack.patch b/gnu/packages/patches/ansible-wrap-program-hack.patch
new file mode 100644
index 000000000..c2e102839
--- /dev/null
+++ b/gnu/packages/patches/ansible-wrap-program-hack.patch
@@ -0,0 +1,22 @@
+Ansible changes its behaviour depending on the name of the script that it is
+called as. Make it deal with guix' .real wrapper scripts.
+
+FIXME: Remove once wrapping ansible works properly.
+See http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html.
+--- ansible-2.3.0.0/bin/ansible	2017-04-12 16:08:05.000000000 +0200
++++ ansible-2.3.0.0-fixed/bin/ansible	2017-05-21 20:11:18.720872385 +0200
+@@ -75,7 +75,13 @@
+             # sometimes add that
+             target = target[:-1]
+
+-        if len(target) > 1:
++        if target[-1] == "real" and target[0].startswith('.'):
++            target = target[:-1]
++            target[0] = target[0][1:]
++        if len(target) > 1 and target[1] != "real" :
++            sub = target[1]
++            myclass = "%sCLI" % sub.capitalize()
++        elif len(target) > 2 and target[2] == "real" :
+             sub = target[1]
+             myclass = "%sCLI" % sub.capitalize()
+         elif target[0] == 'ansible':
-- 
2.13.1


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

* [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-26 17:33       ` Jelle Licht
@ 2017-06-26 19:17         ` Ludovic Courtès
  2017-06-29 12:55         ` bug#27452: " Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-06-26 19:17 UTC (permalink / raw)
  To: Jelle Licht; +Cc: 27452

Jelle Licht <wordempire@gmail.com> skribis:

> From 1c5ac5bac497f415e20540a193e36dc02d012bf2 Mon Sep 17 00:00:00 2001
> From: Jelle Licht <jlicht@fsfe.org>
> Date: Thu, 22 Jun 2017 21:26:49 +0200
> Subject: [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping
>  of ansible script.
>
> See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the
> rationale.
>
> * gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/admin.scm (ansible)[source]: Use it.

Perfect, thanks!  :-)

Ludo'.

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

* bug#27452: [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
  2017-06-26 17:33       ` Jelle Licht
  2017-06-26 19:17         ` Ludovic Courtès
@ 2017-06-29 12:55         ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-06-29 12:55 UTC (permalink / raw)
  To: Jelle Licht; +Cc: 27452-done

Jelle Licht <wordempire@gmail.com> skribis:

>>From 1c5ac5bac497f415e20540a193e36dc02d012bf2 Mon Sep 17 00:00:00 2001
> From: Jelle Licht <jlicht@fsfe.org>
> Date: Thu, 22 Jun 2017 21:26:49 +0200
> Subject: [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping
>  of ansible script.
>
> See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the
> rationale.
>
> * gnu/packages/patches/ansible-wrap-program-hack.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/admin.scm (ansible)[source]: Use it.

Committed, thanks!

Ludo'.

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

end of thread, other threads:[~2017-06-29 12:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 19:36 [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script Jelle Licht
2017-06-26  9:39 ` Ludovic Courtès
2017-06-26 10:46   ` Jelle Licht
2017-06-26 16:11     ` Ludovic Courtès
2017-06-26 17:33       ` Jelle Licht
2017-06-26 19:17         ` Ludovic Courtès
2017-06-29 12:55         ` bug#27452: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.