Created attachment 193420 [details] patch to add py27-/py36- prefix patch to set PKGNAMEPREFIX and remove noflavors to be able to produce both py27-ansible and py36-ansible packages
Will need to QA this for concurrent support and Python version specific dependencies (if any)
Slave ports ansible2[4]3 and ansible1 need to either be split into individual ports or have their version restricted to 2.7 as only 2.5+ supports Python 3
I have a patch in progress that adds TEST_DEPENDS and a test target to make QA easier / more thorough
Created attachment 193424 [details] patch v2 - Use PYTHON_PKGNAMEPREFIX - Enable USE_PYTHON=concurrent - Add TEST_DEPENDS and test target
Hi Christopher, koobs! I removed the flavor support in r455231 to unbreak slave ports because: 1) Ansible is a tool and not a library, so it doesn't matter which interpreter it's running with as long as it obeys PYTHON_DEFAULT 2) slave ports need to be adjusted with a unique suffix, and back then it was impossible to set PKGNAMESUFFIX if using FLAVORS To point #2, I think this has been fixed since, so it's worth revisiting the issue. I'll make the conversion and get to testing! Thanks koobs for the test target! This will make it a ton easier.
Hello Nikolai, Koobs Thanks for your help in working on this, several of our playbooks just fail on Python2 Ansible and since other team members are using Mac or Linux (with Python3) I did a quick patch and have so far experienced no problems.
Hi Christopher, I'm still in the middle of testing the whole support matrix. Thanks for providing the use case for FLAVORS!
With small changes, enough tests pass with both Python 2 and 3 on Ansible 2.3, 2.4, and 2.5. I'm ready to commit this unless koobs would like to since he did most of the work.
Created attachment 193471 [details] patch v3 added py-nose dependency, nuked problematic test
A commit references this bug: Author: lifanov Date: Fri May 18 13:45:41 UTC 2018 New revision: 470293 URL: https://svnweb.freebsd.org/changeset/ports/470293 Log: add tests and FLAVORS to Ansible ports Most of the work was done by koobs. Thank you! PR: 228268 Submitted by: koobs Reported by: Christopher Hall Changes: head/UPDATING head/sysutils/ansible/Makefile head/sysutils/ansible1/Makefile head/sysutils/ansible23/Makefile head/sysutils/ansible24/Makefile
Committed, thanks!
Re-open for MFH (bugfix) @Lifanov Also, the slave ports (ansible[23]) should have their USES=python value limtied to 2.7 (as they dont support Python 3.x). Please merge all commits if you could
The 2.3 and 2.4 versions include beta support for Python 3. They were compatible with Python 3 already for easier testing. There is a note to this effect in pkg-message. Only Ansible 1 is not compatible with Python 3. I'll MFH this and other commits. I previously was not MFH'ing them because there was only a single sysutils/ansible ports and not ports tracking stable branches.
(In reply to Nikolai Lifanov from comment #13) Ah gotcha. Thanks for clarifying :)
When FLAVOR=py36 is chosen, all ansible-* files are symlinks to ansible, while only ansible-3.6 exists
(In reply to Goran Mekić from comment #15) I'll post a patch here in a minute to fix `ansible-playbook-3.6 -> ansible` symlinks to correctly use `ansible-playbook-3.6 -> ansible-3.6`. Only fixes the issue – the committer has to adapt PORTREVISION accordingly.
Created attachment 195296 [details] Fix symlinks to point to `ansible-${PYTHON_VER}` (not to `ansible`)
(In reply to Goran Mekić from comment #15) @Goran, Andreas This issue is effectively resolved/closed, as the change has already been committed, but is (apparently, still) pending MFH to the quarterll branch. Please create a separate (new) issue to report any bugs against ansible ports, including the attached patch, so it can be independently reviewed/analyzed. If the bug(s) are related to or caused by this change, please include this issue ID in the new issues 'See Also' field, and CC lifanov (as the original committer).
what is the current status? Does ports-secteam have to be active here?
Let me check what's in the quarterly branch right now. I have more ansible updates pending first.
Is this still relevant?
I'll close up here. If there are any problems with this P.R., please reopen.