From efc2290ca02ccbf4f45d3bbd439fb0902fa77d35 Mon Sep 17 00:00:00 2001 From: Emanuel Haupt Date: Fri, 10 Sep 2021 18:08:49 +0200 Subject: [PATCH] ports-mgmt/distilator: Update to 1.4 This version has improved url validation. PR: 258389 (based on) Reported by: yuri --- ports-mgmt/distilator/Makefile | 10 ++--- ports-mgmt/distilator/distinfo | 6 +-- .../distilator/files/patch-distilator.py | 38 ------------------- 3 files changed, 8 insertions(+), 46 deletions(-) delete mode 100644 ports-mgmt/distilator/files/patch-distilator.py diff --git a/ports-mgmt/distilator/Makefile b/ports-mgmt/distilator/Makefile index ce221aae46bc6..5a0e41bc839a5 100644 --- a/ports-mgmt/distilator/Makefile +++ b/ports-mgmt/distilator/Makefile @@ -1,8 +1,7 @@ # Created by: Emanuel Haupt PORTNAME= distilator -PORTVERSION= 1.3 -PORTREVISION= 1 +PORTVERSION= 1.4 CATEGORIES= ports-mgmt MASTER_SITES= https://critical.ch/distilator/ \ LOCAL/ehaupt @@ -13,15 +12,16 @@ COMMENT= Command-line script to check the availability of a ports distfiles LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=2.18.4_1:www/py-requests@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}requests-ftp>=0.3.1:ftp/py-requests-ftp@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests-ftp>=0.3.1:ftp/py-requests-ftp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.18.4_1:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}validators>=0.18:devel/py-validators@${PY_FLAVOR} USES= python shebangfix +SHEBANG_FILES= distilator.py NO_ARCH= yes NO_BUILD= yes PLIST_FILES= bin/distilator -SHEBANG_FILES= distilator.py .include diff --git a/ports-mgmt/distilator/distinfo b/ports-mgmt/distilator/distinfo index 8b8c98f685316..841636ff58f96 100644 --- a/ports-mgmt/distilator/distinfo +++ b/ports-mgmt/distilator/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1595061055 -SHA256 (distilator-1.3.tar.gz) = 67cb3323fb06ff18efbcbe90824c1c41ae19d8bb8e61751c67b6d8aa0003a369 -SIZE (distilator-1.3.tar.gz) = 3836 +TIMESTAMP = 1631289688 +SHA256 (distilator-1.4.tar.gz) = 53e9e7deabea4cb10a511b37fa1f05e5ba833b2977e0ec5a3514ca941d22c33c +SIZE (distilator-1.4.tar.gz) = 3824 diff --git a/ports-mgmt/distilator/files/patch-distilator.py b/ports-mgmt/distilator/files/patch-distilator.py deleted file mode 100644 index 1a7cfdecbe175..0000000000000 --- a/ports-mgmt/distilator/files/patch-distilator.py +++ /dev/null @@ -1,38 +0,0 @@ ---- distilator.py.orig 2020-07-18 07:41:39 UTC -+++ distilator.py -@@ -1,8 +1,6 @@ - #!/usr/bin/env python - """Command-line script to check the availability of a ports distfiles.""" - --from __future__ import print_function # Imports print_function from python 3 -- - from multiprocessing import Pool - from functools import partial - -@@ -38,7 +36,7 @@ class Distfiles: - valid_urls = [] - for url in urls: - thisurl = urlparse(url) -- if thisurl.scheme is not "": -+ if thisurl.scheme != "": - valid_urls.append(thisurl.geturl()) - return valid_urls - -@@ -129,7 +127,7 @@ def resolve_or_timeout_error(url, urltype, args): - def validate_url_pool(args, iterable): - """Method to validate a list of URLs.""" - for url, urltype in iterable.items(): -- if urlparse(url).scheme is "http" or "https": -+ if urlparse(url).scheme == "http" or "https": - try: - user_agent = "distilator/%s (%s)" % (__version__, os.uname()[0]) - headers = {"User-Agent": user_agent} -@@ -160,7 +158,7 @@ def validate_url_pool(args, iterable): - status_code = resolve_or_timeout_error(url, urltype, args) - return {"status_code": status_code, "urltype": urltype, "url": url} - -- if urlparse(url).scheme is "ftp": -+ if urlparse(url).scheme == "ftp": - try: - requests_ftp.monkeypatch_session() - session = requests.Session()