This is what I get when I try to upgrade PHP from 7.4.26 to 7.4.27 using FreeBSD ports: => php-7.4.27.tar.xz doesn't seem to exist in /usr/ports/distfiles//. => Attempting to fetch https://www.php.net/distributions/php-7.4.27.tar.xz fetch: https://www.php.net/distributions/php-7.4.27.tar.xz: Service Unavailable => Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/php-7.4.27.tar.xz fetch: http://distcache.FreeBSD.org/ports-distfiles/php-7.4.27.tar.xz: Not Found => Couldn't fetch it - please try to retrieve this => port manually into /usr/ports/distfiles// and try again. FreeBSD ports uses "fetch" to download https://www.php.net/distributions/php-7.4.27.tar.xz but looks like www.php.net web-server blocks user agent "fetch libfetch/2.0" and returns "Service Unavailable". ---- I submit a bug report here too: https://github.com/php/php-src/issues/7833
Me too ❯ fetch https://www.php.net/distributions/php-7.4.27.tar.xz fetch: https://www.php.net/distributions/php-7.4.27.tar.xz: Service Unavailable
(In reply to Christos Chatzaras from comment #0) No it apparently blocks fetch somehow. I have tried fetch with so many --user-agent string without any fruitful result. For now you can do: sed -i '' -e 's|PHP/distributions|LOCAL/bofh|g’ /usr/ports/lang/php74/Makefile While me and tz@ are working on a permanent fix.
(In reply to Muhammad Moinur Rahman from comment #2) By the by my hack is also applicable for php73 and php80 too as I have cached the distfiles.
I use wget to download the file inside /usr/ports/distfiles
In case someone needs to follow look like someone has already submitted an issue: https://github.com/php/web-php/issues/483
(In reply to Muhammad Moinur Rahman from comment #5) Yes this was me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=529117f533a514559415cae1128f90c4c8f131c4 commit 529117f533a514559415cae1128f90c4c8f131c4 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2021-12-26 18:08:49 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2021-12-26 18:23:22 +0000 Fix fetch for php* - Primary hosting provider of php has introduced some sort of checking which is blocking fetch although curl/wget works perfectly. fetch with other --user-agent is also not working at the moment. An issue has been opened with the upstream which can be found at: https://github.com/php/web-php/issues/483 - Untill this is fixed add php Github distributions URL to MASTER_SITES - Modify MASTER_SITES for php[73|74|80] and remove SUBDIR as it affects DIST_SUBDIR - Add DIST_SUBDIR as Github is IPv4 only which affects IPv6 only builders. In case someone is running IPv6 only builders distcache will pickup and serve. - Although distinfo has been updated as we have added DIST_SUBDIR but SHA256 and SIZE are unchanged. In case someone needs to verify those are available from https://www.php.net/downloads - We might have done some drastic changes but we are on the brink of quarterly build and we do not want to start a new year and a new quarter with BROKEN php and thousands of other ports. PR: 260699 Reported by: chris@cretaforce.gr Approved by: portmgr (blanket infrastructure) Sponsored by: Bounce Experts Mk/bsd.sites.mk | 5 ++++- lang/php73/Makefile | 3 ++- lang/php73/distinfo | 6 +++--- lang/php74/Makefile | 3 ++- lang/php74/distinfo | 6 +++--- lang/php80/Makefile | 3 ++- lang/php80/distinfo | 6 +++--- 7 files changed, 19 insertions(+), 13 deletions(-)
For now the fetch should start working again but we will keep this open to followup with the upstream issue.
The problem is related to http1.1 and http2. In case we try curl with --http1.1 it also fails with the same errors. I believe fetch do not have http2 support.
Looks like this has been fixed by upstream and no changes are needed from our side. As a failproof mechanism we will keep using Github distfiles too in addition to original upstream MASTER_SITES.
MARKED AS SPAM