Bug 229960 - sysutils/ansible: Fix executable symlinks for non-default Python flavors
Summary: sysutils/ansible: Fix executable symlinks for non-default Python flavors
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nikolai Lifanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-22 13:32 UTC by Andreas Sommer
Modified: 2018-07-24 03:17 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (lifanov)


Attachments
Fix symlinks to point to `ansible-${PYTHON_VER}` (not to `ansible`), against ports head (527 bytes, patch)
2018-07-22 13:32 UTC, Andreas Sommer
andreas.sommer87: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sommer 2018-07-22 13:32:13 UTC
Created attachment 195366 [details]
Fix symlinks to point to `ansible-${PYTHON_VER}` (not to `ansible`), against ports head

As requested, a separate bug report for fixing `ansible-playbook-3.6 -> ansible` symlinks to correctly use `ansible-playbook-3.6 -> ansible-3.6`. The attached patch only fixes the issue – the committer has to adapt PORTREVISION accordingly.

Before for @py36 flavor:

-rwxr-xr-x  1 root  wheel   5850 Jul 22 10:20 ansible-3.6
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-config-3.6 -> ansible
-rwxr-xr-x  1 root  wheel  10982 Jul 22 10:20 ansible-connection-3.6
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-console-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-doc-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-galaxy-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-inventory-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-playbook-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-pull-3.6 -> ansible
lrwxr-xr-x  1 root  wheel      7 Jul 22 10:20 ansible-vault-3.6 -> ansible

After (list for both flavors):

lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible -> ansible-2.7
-rwxr-xr-x  1 root  wheel   5850 Jul 22 13:28 ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-config -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-config-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     22 Jul 22 13:28 ansible-connection -> ansible-connection-2.7
-rwxr-xr-x  1 root  wheel  10982 Jul 22 13:28 ansible-connection-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-console -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-console-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-doc -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-doc-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-galaxy -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-galaxy-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-inventory -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-inventory-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-playbook -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-playbook-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-pull -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-pull-2.7 -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-vault -> ansible-2.7
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-vault-2.7 -> ansible-2.7

-rwxr-xr-x  1 root  wheel   5850 Jul 22 13:28 ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-config-3.6 -> ansible-3.6
-rwxr-xr-x  1 root  wheel  10982 Jul 22 13:28 ansible-connection-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-console-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-doc-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-galaxy-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-inventory-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-playbook-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-pull-3.6 -> ansible-3.6
lrwxr-xr-x  1 root  wheel     11 Jul 22 13:28 ansible-vault-3.6 -> ansible-3.6
Comment 1 Nikolai Lifanov freebsd_committer 2018-07-24 02:39:53 UTC
Thank you for your submission! I'm reviewing it.
Comment 2 commit-hook freebsd_committer 2018-07-24 03:16:39 UTC
A commit references this bug:

Author: lifanov
Date: Tue Jul 24 03:16:33 UTC 2018
New revision: 475222
URL: https://svnweb.freebsd.org/changeset/ports/475222

Log:
  fix symlinks for ansible when non-default version is installed

  The issue is that before stage, other binaries are links to ansible:

  bin/ansible-vault -> bin/ansible
  bin/ansible-playbook -> bin/ansible

  During stage, these get renamed with a suffix, like 3.6, but the
  target of the symlink doesn't change:

  bin/ansible-vault-3.6 -> bin/ansible
  bin/ansible-playbook-3.6 -> bin/ansible

  This either creates broken links if the package for the default
  Python version is not installed or it creates links to the
  wrong binary if it is.

  Thank you Andreas Sommer for the fix!

  PR:		229960
  Submitted by:	Andreas Sommer

Changes:
  head/sysutils/ansible/Makefile
  head/sysutils/ansible1/Makefile
  head/sysutils/ansible23/Makefile
  head/sysutils/ansible24/Makefile
  head/sysutils/ansible25/Makefile
Comment 3 Nikolai Lifanov freebsd_committer 2018-07-24 03:17:04 UTC
Committed, thanks!