mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
ports-mgmt/distilator: Update to 1.4
This version has improved url validation. PR: 258389 (based on) Reported by: yuri
This commit is contained in:
parent
1e0341d5cf
commit
efc2290ca0
3 changed files with 8 additions and 46 deletions
|
@ -1,8 +1,7 @@
|
|||
# Created by: Emanuel Haupt <ehaupt@FreeBSD.org>
|
||||
|
||||
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 <bsd.port.mk>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
Loading…
Add table
Reference in a new issue