Bug 209789 - sysutils/ansible: add patch to fix cron module
Summary: sysutils/ansible: add patch to fix cron module
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-05-27 10:46 UTC by Dmitry Marakasov
Modified: 2016-06-11 00:50 UTC (History)
2 users (show)

See Also:
lifanov: maintainer-feedback+
amdmi3: merge-quarterly?


Attachments
Patch (1.61 KB, patch)
2016-05-27 10:46 UTC, Dmitry Marakasov
no flags Details | Diff
fix crontab module (2.20 KB, patch)
2016-05-27 12:49 UTC, Nikolai Lifanov
lifanov: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2016-05-27 10:46:15 UTC
Created attachment 170722 [details]
Patch

ansible `cron' module does not work correctly: when writing crontab, it passes arguments to crontab(1) in wrong order (`crontab <newcrontabfile> -u <user>' instead of `crontab -u <user> <newcrontabfile>'). This leads to rewriting root's crontab instead of appending user's. The fix was already upstreamed:

https://github.com/ansible/ansible-modules-core/pull/3750

but since it'll take some time to get into the release, it'd be nice to have it in the port right now. MFH candidate as well.
Comment 1 Nikolai Lifanov 2016-05-27 12:49:45 UTC
Created attachment 170725 [details]
fix crontab module

Please use this instead. It rebases the patch on ansible 2.1.0.0
and lists the patch and uses the EXTRA_PATCHES approach to avoid
modifying sysutils/ansible1.

Thanks for the fix! I had to do a similar thing with "at" module
a while ago.

In order to merge to stable, you can merge it together with r415910,
or, if you would prefer, add this one as a second line to EXTRA_PATCHES.
Comment 2 commit-hook freebsd_committer 2016-06-11 00:49:56 UTC
A commit references this bug:

Author: brd
Date: Sat Jun 11 00:49:53 UTC 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 <amdmi3@FreeBSD.org>
  Submitted by:	Nikolai Lifanov <lifanov@mail.lifanov.com> (maintainer)
  Approved by:	bdrewery (implicit, mentor)

Changes:
  head/sysutils/ansible/Makefile
  head/sysutils/ansible/files/extra-patch-b5e012b
Comment 3 Brad Davis freebsd_committer 2016-06-11 00:50:29 UTC
Committed, thank you for your submission!