Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62317 closed defect (fixed)

py27-dnspython @1.16.0 fetch fails

Reported by: n2ee Owned by: kurthindenburg (Kurt Hindenburg)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-dnspython

Description (last modified by jmroot (Joshua Root))

Attempting to 'sudo port install py27-dnspython' fails -

[...]
:debug:fetch Fetching distfile failed: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch dnspython-1.16.0.zip from http://jog.id.distfiles.macports.org/macports/distfiles/py-dnspython
:debug:fetch Fetching distfile failed: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch dnspython-1.16.0.zip from http://atl.us.distfiles.macports.org/py-dnspython
:debug:fetch Fetching distfile failed: The requested URL returned error: 404
:error:fetch Failed to fetch py27-dnspython: The requested URL returned error: 404
:debug:fetch Error code: NONE
:debug:fetch Backtrace: The requested URL returned error: 404

Peeking at http://atl.us.distfiles.macports.org/py-dnspython/ shows that dnspython-1.16.0.zip indeed does not exist, however there is a dnspython-1.16.0.tar.gz, among others.

Attachments (2)

main.log (227.2 KB) - added by n2ee 4 years ago.
Portfile (2.8 KB) - added by n2ee 4 years ago.
Non-working example of trying to set use_zip = false.

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by n2ee

Attachment: main.log added

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: set to kurthindenburg
Port: py-dnspython added
Status: newassigned
Summary: 'port install py27-dnspython' fails on ppc 10.4py27-dnspython @1.16.0 fetch fails

comment:2 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

It works here - is there something special about 10.4?

https://files.pythonhosted.org/packages/source/d/dnspython/

Changed 4 years ago by n2ee

Attachment: Portfile added

Non-working example of trying to set use_zip = false.

comment:3 Changed 4 years ago by n2ee

As a quick hack, I put the Portfile in a local repository and removed the 'use_zip true' from line 26, updated the checksums in the ' if {${python.version} eq 27}' clause, and 'port install py27-dnspython' successfully installed dnspython-1.16.0.tar.gz from http://ywg.ca.distfiles.macports.org/mirror/macports/distfiles/py-dnspython/.

I would have thought putting a 'use_zip false' in the version 27 clause would have worked, but it seems that once use_zip is set, I can't change it. Or least I don't understand how to unset a term in the Portfile. The non-working modified Portfile is attached.

comment:4 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

so the real issue is that your 10.4 can't grab the file from ​https://files.pythonhosted.org/packages/source/d/dnspython/

we should fix that - not try to change to grab the .gz files from the mirrors.

1 :notice:fetch ---> Attempting to fetch dnspython-1.16.0.zip from https://files.pythonhosted.org/packages/source/d/dnspython/ 32 :debug:fetch Fetching distfile failed: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

comment:5 Changed 4 years ago by kencu (Ken)

when you build MacPorts on 10.4, it builds against the SSL infrastructure present in /usr/lib which is just too old to support some modern websites:

31      :notice:fetch --->  Attempting to fetch dnspython-1.16.0.zip from https://files.pythonhosted.org/packages/source/d/dnspython/
32	:debug:fetch Fetching distfile failed: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

There are ways around that:

$ port -v installed py27-dnspython
The following ports are currently installed:
  py27-dnspython @1.16.0_0 (active) platform='darwin 8' archs='noarch' date='2021-02-18T19:36:18-0800'

The simplest way is to just manually download the missing files using MacPorts' curl command. You probably have curl installed:

$ which curl
/opt/local/bin/curl

so do this:

$ port distfiles py27-dnspython
--->  Distfiles for py27-dnspython
[dnspython-1.16.0.zip] /opt/local/var/macports/distfiles/py-dnspython/dnspython-1.16.0.zip
 rmd160: 1be4e79bcadfd39bc631d56391f727ce92fdabe2
 sha256: 36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01
 size: 266364
  https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-1.16.0.zip

and now that you know what it wants, do this:

cd /opt/local/var/macports/distfiles/py-dnspython/

then

$ sudo curl -O https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-1.16.0.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

and you are good to go -- for that particular port at least.

I have some more general solutions to this issue that I use myself, so I never see these errors on my Tiger/Leopard/Snow Leopard/Lion systems.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:6 Changed 4 years ago by kencu (Ken)

You might consider this ticket to be a duplicate of this older ticket 51516.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 4 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In ecd059395f89bd19d066b1cd401afbc818889a0d/macports-ports (master):

py-dnspython: change back py27 subport's distfile

The zip version of the distfile was not mirrored after the subport was
changed to use it in 5747864, because no build was scheduled, because
the version did not change. This causes fetch problems for older
systems, and there's no reason to mirror the distfile in two formats
anyway.

Also make better use of portgroup defaults.

Fixes: #62317

comment:8 Changed 4 years ago by kencu (Ken)

n2ee:

if you never want to see this error again on any ports ever, send me a message.

Note: See TracTickets for help on using tickets.