Bug 258389 - ports-mgmt/distilator: Fails on comms/qtel: requests.exceptions.InvalidSchema: No connection adapters were found for 'make:'
Summary: ports-mgmt/distilator: Fails on comms/qtel: requests.exceptions.InvalidSchema...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-09 16:17 UTC by Yuri Victorovich
Modified: 2021-09-10 16:12 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2021-09-09 16:17:07 UTC
rev eb3ceff682682389456e66657eabd66e01fdbca4



$ cd /usr/ports/comms/qtel && distilator 
200 [WWW]	http://www.svxlink.org/
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/bin/distilator", line 134, in validate_url_pool
    req = requests.head(url, timeout=args.timeout, headers=headers)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 104, in head
    return request('head', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 649, in send
    adapter = self.get_adapter(url=request.url)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 742, in get_adapter
    raise InvalidSchema("No connection adapters were found for {!r}".format(url))
requests.exceptions.InvalidSchema: No connection adapters were found for 'make:'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/usr/local/bin/distilator", line 158, in validate_url_pool
    status_code = resolve_or_timeout_error(url, urltype, args)
  File "/usr/local/bin/distilator", line 114, in resolve_or_timeout_error
    if hostname_resolves(hostname):
  File "/usr/local/bin/distilator", line 103, in hostname_resolves
    socket.gethostbyname(hostname)
TypeError: gethostbyname() argument 1 must be str, bytes or bytearray, not None
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/distilator", line 246, in <module>
    main()
  File "/usr/local/bin/distilator", line 238, in main
    result = pool.map(func, iterable)
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
TypeError: gethostbyname() argument 1 must be str, bytes or bytearray, not None
Comment 1 Emanuel Haupt freebsd_committer 2021-09-09 17:20:01 UTC
Distilator creates a list of distfiles with the following command:

$ make fetch-urlall-list

For this particular port it fails with a non zero exit code (1):

root@portjail:/usr/ports/comms/qtel # make fetch-urlall-list
=> sm0svx-qtel-19.09.1_GH0.tar.gz is not in /usr/ports/comms/qtel/../svxlink/distinfo.
=> Either /usr/ports/comms/qtel/../svxlink/distinfo is out of date, or
=> sm0svx-qtel-19.09.1_GH0.tar.gz is spelled incorrectly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/comms/qtel
*** Error code 1

Stop.
make: stopped in /usr/ports/comms/qtel

I will update distilator to handle a non 0 exit code more gracefully but comms/qtel should also be looked at:

root@portjail:/usr/ports/comms/qtel # make fetch
===>  License GPLv2 accepted by the user
===>   qtel-19.09.1_2 depends on file: /usr/local/sbin/pkg - found
=> sm0svx-qtel-19.09.1_GH0.tar.gz is not in /usr/ports/comms/qtel/../svxlink/distinfo.
=> Either /usr/ports/comms/qtel/../svxlink/distinfo is out of date, or
=> sm0svx-qtel-19.09.1_GH0.tar.gz is spelled incorrectly.
*** Error code 1

Stop.
make: stopped in /usr/ports/comms/qtel
Comment 2 commit-hook freebsd_committer 2021-09-10 16:11:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=efc2290ca02ccbf4f45d3bbd439fb0902fa77d35

commit efc2290ca02ccbf4f45d3bbd439fb0902fa77d35
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2021-09-10 16:08:49 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2021-09-10 16:08:49 +0000

    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 (gone)    | 38 ----------------------
 3 files changed, 8 insertions(+), 46 deletions(-)
Comment 3 Emanuel Haupt freebsd_committer 2021-09-10 16:12:39 UTC
Distilator fixed in the latest update.