Date: Thu, 26 Jul 2012 17:42:26 -0400 From: "Mikhail T." <mi+thun@aldan.algebra.com> To: freebsd-ports@FreeBSD.ORG Subject: How to fetch files from GitHub? Message-ID: <5011B9C2.6070700@aldan.algebra.com>
next in thread | raw e-mail | index | archive | help
Hello! I've created a port of bittorrent-libutp -- a piece of software, that has not been officially "released" yet. It is in use by a number of other projects (like net-p2p/transmission/). The not-yet-committed port can be found at: http://aldan.algebra.com/~mi/port-stuff/libutp.shar The vendor's code is hosted on GitHub, which allows downloading the entire directory as a single tarball. However, to download sources as of particular date/time, one has to use a hash of the version one cares for. For example, the current version's tag is d4685a3. If you attempt to download the tar.gz from the https://github.com/bittorrent/libutp/downloads, you will get a file named: bittorrent-libutp-d4685a3.tar.gz. Setting MASTER_SITES to https://github.com/bittorrent/libutp/tarball/d4685a3/ works, but the download is a redirect... The port builds fine, but has two nasty problems: 1. The DISTVERSION being simply the first 7 characters of some hash will not be sequential -- the next release of the sources may have a hash, that will sort below the current one, necessitating an ugly PORT_EPOCH bump. The PORTVERSION ends up being "d4685.a3", which is not at all useful, but forcing one's own PORTVERSION (something like 0.20120726) is not allowed... 2. Fetching the code requires forceful removal of the -A option from fetch(1)'s arguments. Would anyone care to play with the port as posted and offer suggestions on how to best resolve the two problems (other than hosting the tarball on my own)? Thanks! Yours, -mi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5011B9C2.6070700>