From owner-svn-ports-all@freebsd.org Sun Dec 16 18:59:07 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99642133740C; Sun, 16 Dec 2018 18:59:07 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AA6C92C6B; Sun, 16 Dec 2018 18:59:07 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27B993985; Sun, 16 Dec 2018 18:59:07 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBGIx6t7059858; Sun, 16 Dec 2018 18:59:06 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBGIx607059855; Sun, 16 Dec 2018 18:59:06 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201812161859.wBGIx607059855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 16 Dec 2018 18:59:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r487621 - in head/multimedia/py-moviepy: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/multimedia/py-moviepy: . files X-SVN-Commit-Revision: 487621 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3AA6C92C6B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.881,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2018 18:59:07 -0000 Author: yuri Date: Sun Dec 16 18:59:06 2018 New Revision: 487621 URL: https://svnweb.freebsd.org/changeset/ports/487621 Log: multimedia/py-moviepy: Unbreak: it couldn't find the ffmpeg executable This line: from moviepy.editor import * resulted in failure: File "/usr/local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 77, in download raise RuntimeError("FFMPEG exe isn't available for platform %s" % plat) RuntimeError: FFMPEG exe isn't available for platform freebsd64 This is because it uses py-imageio to download the ffmpeg binary which doesn't exist for FreeBSD. Besides, py-imageio is downloading files without checking cryptographic fingerprints wihich is insecure: https://github.com/imageio/imageio/issues/416 Solution: Make py-moviepy to always use the pre-installed ffmpeg package. Approved by: portmgr (unbreak) Added: head/multimedia/py-moviepy/files/ head/multimedia/py-moviepy/files/patch-moviepy_config__defaults.py (contents, props changed) head/multimedia/py-moviepy/files/patch-moviepy_editor.py (contents, props changed) Modified: head/multimedia/py-moviepy/Makefile Modified: head/multimedia/py-moviepy/Makefile ============================================================================== --- head/multimedia/py-moviepy/Makefile Sun Dec 16 18:42:27 2018 (r487620) +++ head/multimedia/py-moviepy/Makefile Sun Dec 16 18:59:06 2018 (r487621) @@ -2,7 +2,7 @@ PORTNAME= moviepy PORTVERSION= 0.2.3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,7 +16,8 @@ LICENSE_FILE= ${WRKSRC}/LICENCE.txt RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}decorator>=4.0.2:devel/py-decorator@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}imageio>=2.1.2:graphics/py-imageio@${PY_FLAVOR} \ ${PYNUMPY} \ - ${PYTHON_PKGNAMEPREFIX}tqdm>=4.11.2:misc/py-tqdm@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}tqdm>=4.11.2:misc/py-tqdm@${PY_FLAVOR} \ + ffmpeg:multimedia/ffmpeg USES= python USE_PYTHON= autoplist concurrent distutils Added: head/multimedia/py-moviepy/files/patch-moviepy_config__defaults.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/py-moviepy/files/patch-moviepy_config__defaults.py Sun Dec 16 18:59:06 2018 (r487621) @@ -0,0 +1,12 @@ +--- moviepy/config_defaults.py.orig 2018-12-16 18:28:09 UTC ++++ moviepy/config_defaults.py +@@ -50,5 +50,6 @@ IMAGEMAGICK_BINARY + + import os + +-FFMPEG_BINARY = os.getenv('FFMPEG_BINARY', 'ffmpeg-imageio') +-IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect') +\ No newline at end of file ++FFMPEG_BINARY = "ffmpeg" # by default it asks py-imageio to download ffmpeg from GitHub, but it doesn't exist there for FreeBSD, and it is also an insecure download ++ # instead, just default to "ffmpeg" which means to use the local binary ++IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect') Added: head/multimedia/py-moviepy/files/patch-moviepy_editor.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/py-moviepy/files/patch-moviepy_editor.py Sun Dec 16 18:59:06 2018 (r487621) @@ -0,0 +1,14 @@ +--- moviepy/editor.py.orig 2018-12-16 18:36:01 UTC ++++ moviepy/editor.py +@@ -21,8 +21,10 @@ import os + + # Downloads ffmpeg if it isn't already installed + import imageio ++from moviepy.config import get_setting ++ + # Checks to see if the user has set a place for their own version of ffmpeg +-if os.getenv('FFMPEG_BINARY', 'ffmpeg-imageio') == 'ffmpeg-imageio': ++if get_setting("FFMPEG_BINARY") == 'ffmpeg-imageio': + imageio.plugins.ffmpeg.download() + + # Clips