From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO7uc-0005Zm-85 for guix-patches@gnu.org; Thu, 22 Jun 2017 15:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO7uY-0001sB-UT for guix-patches@gnu.org; Thu, 22 Jun 2017 15:37:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59046) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dO7uY-0001s3-Q6 for guix-patches@gnu.org; Thu, 22 Jun 2017 15:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dO7uY-0004ed-Kr for guix-patches@gnu.org; Thu, 22 Jun 2017 15:37:02 -0400 Subject: [bug#27452] [PATCH] gnu: ansible: Apply experimental patch to deal with wrapping of ansible script. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO7u5-0005Z5-JR for guix-patches@gnu.org; Thu, 22 Jun 2017 15:36:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO7u1-0001PM-TW for guix-patches@gnu.org; Thu, 22 Jun 2017 15:36:33 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:32974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dO7u1-0001Oj-Mr for guix-patches@gnu.org; Thu, 22 Jun 2017 15:36:29 -0400 Received: by mail-wr0-f170.google.com with SMTP id r103so36974485wrb.0 for ; Thu, 22 Jun 2017 12:36:29 -0700 (PDT) From: Jelle Licht Date: Thu, 22 Jun 2017 21:36:20 +0200 Message-Id: <20170622193620.3381-1-jlicht@fsfe.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27452@debbugs.gnu.org See 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