Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2019 00:52:52 +0000 (UTC)
From:      "Danilo G. Baio" <dbaio@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r519057 - in head/sysutils/py-azure-cli: . files
Message-ID:  <201912050052.xB50qqOr038877@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dbaio
Date: Thu Dec  5 00:52:52 2019
New Revision: 519057
URL: https://svnweb.freebsd.org/changeset/ports/519057

Log:
  sysutils/py-azure-cli: Add experimental support for azcopy
  
  Azcopy binary is not available officially for FreeBSD and even if you have
  built it manually, azure-cli won't find/run it.
  
  This patch add FreeBSD as an available platform and now users can build
  and install azcopy manually to work with azure-cli.
  
  More info at https://wiki.freebsd.org/Ports/sysutils/py-azure-cli
  
  PR:		242391
  Submitted by:	cem

Added:
  head/sysutils/py-azure-cli/files/
  head/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_storage_azcopy_util.py   (contents, props changed)
Modified:
  head/sysutils/py-azure-cli/Makefile

Modified: head/sysutils/py-azure-cli/Makefile
==============================================================================
--- head/sysutils/py-azure-cli/Makefile	Thu Dec  5 00:41:04 2019	(r519056)
+++ head/sysutils/py-azure-cli/Makefile	Thu Dec  5 00:52:52 2019	(r519057)
@@ -2,6 +2,7 @@
 
 PORTNAME=	azure-cli
 PORTVERSION=	2.0.77
+PORTREVISION=	1
 CATEGORIES=	sysutils python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

Added: head/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_storage_azcopy_util.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/py-azure-cli/files/patch-azure_cli_command__modules_storage_azcopy_util.py	Thu Dec  5 00:52:52 2019	(r519057)
@@ -0,0 +1,20 @@
+--- azure/cli/command_modules/storage/azcopy/util.py.orig	2019-12-04 23:30:55 UTC
++++ azure/cli/command_modules/storage/azcopy/util.py
+@@ -41,6 +41,8 @@ class AzCopy(object):
+                 file_url = base_url.format('linux', 'tar.gz')
+             elif self.system == 'Darwin':
+                 file_url = base_url.format('darwin', 'zip')
++            elif self.system == 'FreeBSD':
++                raise CLIError('Azcopy ({}) binary not available, follow instructions at https://wiki.freebsd.org/Ports/sysutils/py-azure-cli'.format(self.system))
+             else:
+                 raise CLIError('Azcopy ({}) does not exist.'.format(self.system))
+             try:
+@@ -163,7 +165,7 @@ def _get_default_install_location():
+         if not home_dir:
+             return None
+         install_location = os.path.join(home_dir, r'.azcopy\azcopy.exe')
+-    elif system in ('Linux', 'Darwin'):
++    elif system in ('Linux', 'Darwin', 'FreeBSD'):
+         install_location = os.path.expanduser(os.path.join('~', 'bin/azcopy'))
+     else:
+         install_location = None



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912050052.xB50qqOr038877>