Bug 218506 - devel/bcc: Unbreak fetch
Summary: devel/bcc: Unbreak fetch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joerg Wunsch
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-04-09 07:18 UTC by lightside
Modified: 2017-04-09 18:56 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (joerg)


Attachments
Proposed patch (since 438048 revision) (787 bytes, patch)
2017-04-09 07:18 UTC, lightside
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2017-04-09 07:18:51 UTC
Created attachment 181614 [details]
Proposed patch (since 438048 revision)

Patch to unbreak devel/bcc port.

- Unbreak fetch
- Add mirrors to MASTER_SITES

The distfile is fetchable from some mirror(s):
% curl -LI http://ftp.netbsd.org/pub/pkgsrc/distfiles/bcc.tar.gz
HTTP/1.1 200 OK
Date: Sun, 09 Apr 2017 05:54:56 GMT
Server: bozohttpd/20160415
Accept-Ranges: bytes
Last-Modified: Sat, 25 Mar 1995 22:00:00 GMT
Content-Type: multipart/x-tar
Content-Encoding: gzip
Content-Length: 214834
Connection: close

% fetch -qo - http://ftp.netbsd.org/pub/pkgsrc/distfiles/bcc.tar.gz | sha256
3e14cc6dc840d043957e9ec9b5ca400b565e33f1a81f193b9dd18ecae20a8894
Comment 1 lightside 2017-04-09 07:20:45 UTC
Results for some other mirrors (based on http://www.filewatcher.com/m/bcc.tar.gz.214834-0.html):
% cat mirrors.txt
http://mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/
http://ftpmirror.your.org/pub/pkgsrc/distfiles/
http://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/
http://ftp.tw.freebsd.org/distfiles/
http://ftp.netbsd.org/pub/pkgsrc/distfiles/

% cat test_mirror.sh
#!/bin/sh

url=$1
checksum=$2

if [ -z "$url" -o -z "$checksum" ]; then
	echo "Usage: $0 url checksum"
	exit 1
fi

if [ "`fetch -qo - $url | sha256`" == "$checksum" ]; then
	echo "$url [OK]"
else
	echo "$url [Checksum mismatch]"
fi

% cat mirrors.txt | xargs -I {} -L 1 ./test_mirror.sh "{}bcc.tar.gz" 3e14cc6dc840d043957e9ec9b5ca400b565e33f1a81f193b9dd18ecae20a8894
http://mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/bcc.tar.gz [OK]
http://ftpmirror.your.org/pub/pkgsrc/distfiles/bcc.tar.gz [OK]
http://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/bcc.tar.gz [OK]
http://ftp.tw.freebsd.org/distfiles/bcc.tar.gz [OK]
http://ftp.netbsd.org/pub/pkgsrc/distfiles/bcc.tar.gz [OK]
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-04-09 09:26:55 UTC
A commit references this bug:

Author: joerg
Date: Sun Apr  9 09:26:41 UTC 2017
New revision: 438092
URL: https://svnweb.freebsd.org/changeset/ports/438092

Log:
  Move this port's distfile to my FreeBSD local_distfiles.

  PR:		218506

Changes:
  head/devel/bcc/Makefile
Comment 3 Joerg Wunsch freebsd_committer freebsd_triage 2017-04-09 09:27:47 UTC
Thanks for the suggestion.

Instead of relying on other 3rd-party mirrors, I decided to rather move
the distfile to my FreeBSD local_distfiles/ directory.