FreeBSD Bugzilla – Attachment 170722 Details for
Bug 209789
sysutils/ansible: add patch to fix cron module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
ansible.patch (text/plain), 1.61 KB, created by
Dmitry Marakasov
on 2016-05-27 10:46:15 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dmitry Marakasov
Created:
2016-05-27 10:46:15 UTC
Size:
1.61 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 414834) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= ansible > PORTVERSION?= 2.0.2.0 >-PORTREVISION?= 1 >+PORTREVISION?= 2 > CATEGORIES= sysutils python > MASTER_SITES= http://releases.ansible.com/ansible/ > >Index: files/patch-cron.py >=================================================================== >--- files/patch-cron.py (nonexistent) >+++ files/patch-cron.py (working copy) >@@ -0,0 +1,29 @@ >+commit b5e012b47fa9e242a38c3f66678aa2f47946a9c9 >+Author: Dmitry Marakasov <amdmi3@amdmi3.ru> >+Date: Thu May 26 17:37:28 2016 +0300 >+ >+ Fix crontab argument order for writing >+ >+ Currently, when writing user's crontab, ansible calls >+ >+ crontab <file> -u <user> >+ >+ 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)) >+ >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209789
: 170722 |
170725