guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: ansible: Apply experimental patch to deal with wrapping of a


From: Ludovic Courtès
Subject: 03/05: gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
Date: Thu, 29 Jun 2017 09:21:35 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit b786661309ab8194eb5e5a3ebf55d35be2e0bb01
Author: Jelle Licht <address@hidden>
Date:   Thu Jun 22 21:26:49 2017 +0200

    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.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/admin.scm                             |  3 ++-
 .../patches/ansible-wrap-program-hack.patch        | 22 ++++++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index b0690ed..83b0196 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -502,6 +502,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 96ca6a7..2cc5200 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 0000000..c2e1028
--- /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':



reply via email to

[Prev in Thread] Current Thread [Next in Thread]