feedhenry / mcp-standalone

Standalone version of the mobile-control-panel.
http://feedhenry.org
Apache License 2.0
13 stars 21 forks source link

GNU tar required for installer #217

Open kpiwko opened 6 years ago

kpiwko commented 6 years ago

Following error has been printed out while running installer on a macOS:

TASK [install-socat : Retrieve and unpack] *************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to find handler for \"/private/var/folders/rx/1v5sh4v96ss452yvl3dsfyj80000gn/T/ansible_EMtASF/socat-1.7.3.2.tar.gz\". Make sure the required command to extract the file is installed. Command \"/usr/bin/tar\" detected as tar type bsd. GNU tar required. Command \"/usr/bin/unzip\" could not handle archive."}
    to retry, use: --limit @/Users/kpiwko/devel/mobile/mcp-standalone/installer/playbook.retry
kpiwko commented 6 years ago

After installing gnu-tar via brew (brew install gnu-tar) and making it to appear first in PATH, I was running into different issue.

Resolved by:

brew install socat
david-martin commented 6 years ago

@aidenkeating thoughts on this issue? Is it something you've seen/heard of when adding the socat install on mac?

aidenkeating commented 6 years ago

@david-martin Thinking this might be a requirement of the Ansible unarchive module. We should be able to use the default BSD tar packaged with macOS by default.

aidenkeating commented 6 years ago

@kpiwko @david-martin Managed to reproduce. A fix has been made here (https://github.com/aidenkeating/install-socat/pull/1). The role will now use bsdtar which should be installed on macOS by default.

You'll need to delete your local mcp-standalone/installer/roles/install-socat and run the installer again to get the updated role.

david-martin commented 6 years ago

@aidenkeating Not sure I can verify on LInux. Either way, here's what's output for me, which is fine

TASK [install-socat : Check socat exists] ************************************************************************************
skipping: [localhost]

TASK [install-socat : Create download directory] *****************************************************************************
skipping: [localhost]

TASK [install-socat : Retrieve and unpack] ***********************************************************************************
skipping: [localhost]

TASK [install-socat : Configure] *********************************************************************************************
skipping: [localhost]

TASK [install-socat : Make] **************************************************************************************************
skipping: [localhost]

TASK [install-socat : Move to install directory] *****************************************************************************
skipping: [localhost]

TASK [install-socat : file] **************************************************************************************************
skipping: [localhost]

TASK [oc-cluster-up : Create alias for lo0 (macos)] **************************************************************************
skipping: [localhost]

TASK [oc-cluster-up : Create alias for lo0 (linux)] **************************************************************************
ok: [localhost]
cat /etc/redhat-release 
Fedora release 25 (Twenty Five)
aidenkeating commented 6 years ago

@david-martin Ah yep, install-socat will only run on macOS.

@maleck13 Would you mind giving this a run ensuring gnu-tar is uninstalled? tar --version should output bsdtar........

kpiwko commented 6 years ago

Let me try to check the fix. I should be able to get to it in 2 hours.