From owner-svn-ports-all@freebsd.org Sat Jun 11 00:49:54 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D8EDAD950B; Sat, 11 Jun 2016 00:49:54 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C54112A89; Sat, 11 Jun 2016 00:49:53 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5B0nqvk070930; Sat, 11 Jun 2016 00:49:52 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5B0nqGf070928; Sat, 11 Jun 2016 00:49:52 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201606110049.u5B0nqGf070928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 11 Jun 2016 00:49:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r416699 - in head/sysutils/ansible: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 00:49:54 -0000 Author: brd Date: Sat Jun 11 00:49:52 2016 New Revision: 416699 URL: https://svnweb.freebsd.org/changeset/ports/416699 Log: sysutils/ansible: add patch to fix cron module PR: 209789 Submitted by: Dmitry Marakasov Submitted by: Nikolai Lifanov (maintainer) Approved by: bdrewery (implicit, mentor) Added: head/sysutils/ansible/files/extra-patch-b5e012b (contents, props changed) Modified: head/sysutils/ansible/Makefile Modified: head/sysutils/ansible/Makefile ============================================================================== --- head/sysutils/ansible/Makefile Fri Jun 10 22:12:21 2016 (r416698) +++ head/sysutils/ansible/Makefile Sat Jun 11 00:49:52 2016 (r416699) @@ -3,6 +3,7 @@ PORTNAME= ansible PORTVERSION?= 2.1.0.0 +PORTREVISION?= 1 CATEGORIES= sysutils python MASTER_SITES= http://releases.ansible.com/ansible/ @@ -17,6 +18,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml ${PYTHON_PKGNAMEPREFIX}paramiko>0:security/py-paramiko \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 +EXTRA_PATCHES?= ${FILESDIR}/extra-patch-b5e012b + NO_ARCH= yes USES= cpe python:2 shebangfix USE_PYTHON= autoplist distutils Added: head/sysutils/ansible/files/extra-patch-b5e012b ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ansible/files/extra-patch-b5e012b Sat Jun 11 00:49:52 2016 (r416699) @@ -0,0 +1,29 @@ +commit b5e012b47fa9e242a38c3f66678aa2f47946a9c9 +Author: Dmitry Marakasov +Date: Thu May 26 17:37:28 2016 +0300 + + Fix crontab argument order for writing + + Currently, when writing user's crontab, ansible calls + + crontab -u + + This is incorrect according to crontab(1) on both FreeBSD and Linux, + which suggest that file argument should be the last. + + At least on FreeBSD, this leads to incorrect cron module bahavior which + writes to root's crontab instead of users's + +diff --git system/cron.py system/cron.py +index ab97606..b9f0940 100644 +--- lib/ansible/modules/core/system/cron.py ++++ lib/ansible/modules/core/system/cron.py +@@ -488,7 +488,7 @@ class CronTab(object): + return "chown %s %s ; su '%s' -c '%s %s'" % (pipes.quote(self.user), pipes.quote(path), pipes.quote(self.user), CRONCMD, pipes.quote(path)) + else: + user = '-u %s' % pipes.quote(self.user) +- return "%s %s %s" % (CRONCMD , pipes.quote(path), user) ++ return "%s %s %s" % (CRONCMD , user, pipes.quote(path)) + + +