From owner-freebsd-ports@freebsd.org Sun May 24 08:49:08 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F5442FED68 for ; Sun, 24 May 2020 08:49:08 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49VDRR6mVMz4ZYK for ; Sun, 24 May 2020 08:49:07 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 872C9177BC for ; Sun, 24 May 2020 08:49:07 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:b02c:d1ac:ec69:d100]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 7FE101AD7D for ; Sun, 24 May 2020 08:49:04 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/7FE101AD7D; dkim=none; dkim-atps=neutral Subject: Re: Ports from github To: freebsd-ports@freebsd.org References: <3c6205ea-e589-769b-7b12-ee7e6d3fa8ff@missouri.edu> From: Matthew Seaman Autocrypt: addr=matthew@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFJIL80BEADi7/VbnnErDU6pjEhI/SzEZ/HbDRkJ5g7HroAtqIRm6nj8ZwOAgZ/2ZnWn 5F+fXTuLsG0FLNtkd17FoVcuCi5e/GPliXI5cmamV7E1Yz4T8UsJ7RQolimyxVexccKd16Tc AA7B9bFlJSKkBUSD0buj7VjT07xWhRzu6Vgi5r0UjLALYJz977uZA0F1aOGOXREDEAOhdcNc kSNjynqAwDA6dCT1Elpi4key1fYjv4jyDF+GU/YXul2Y/rguA8FCkHd9vyym5eAsLQ5mG00V V9fkEHIpH5KorNVnl/ufHXnkZqmHAZVpFDcrshb7aZ/pL45PXyWgLj+e6etelgj3a2bZi0JF cVdXCnBZVP2oIyYblM11ugTbfCwodORU8a5KfPeztMdAtDr4e+32NTrPdPi5rLT+GUsYz+PL 3A3m3u8bdsFp40DlIrBtSByVjqERxcfhphrEB4J8BXHUG7OAtXkZMlW/PGKDwXJq0O6Z5Tcg YHAoEiSWbXiexHgXNJyP+sqnIlhLWhSJGeJ+C83wqI6oYlZUCW00NkPxcIHnQPV/z+5wQVci TMyaWC2YCIHz4Ljs+TnwWMz0E8PNFDfHVbQ0W4PRGV7gRAqxfL+yKufauIEGbEq8rNDbSwL3 bcUCxR4ZDlaUEUwT4J8naf7rjdgiEYHs2Ig3jeK1+ER4FPG1sQARAQABtCRNYXR0aGV3IFNl YW1hbiA8bWF0dGhld0BmcmVlYnNkLm9yZz6JAlQEEwEKAD4CGwMFCwkIBwMFFQoJCAsFFgMC AQACHgECF4AWIQRyz6whebywJLW1RZADb2ye5/OevwUCXp/jFQUJDjo4SAAKCRADb2ye5/Oe v5lwD/0bhCaxMGrWb1PpmvqwARJRcqcXJOLUJX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ZNZfcWDSaP/VQfsL2/vOHBZzEmqmalQHp5QeZszGDTwr7yR886viXbLV40bBs ZXyVm2yodwsT3B1swxMGASV6ZG9p0bURekwyuN1zjCf2cIr6SrU8gTZjQyAlfDtU+dhvVCfw D2UGgsFXnd7KkBLadQs= Message-ID: <5bb5cc69-ef90-2285-324f-58e09399d3ef@FreeBSD.org> Date: Sun, 24 May 2020 09:49:01 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <3c6205ea-e589-769b-7b12-ee7e6d3fa8ff@missouri.edu> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n1itdvt4nlp8z0QoUnY6Aq4ad1NPPrJWP" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2020 08:49:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --n1itdvt4nlp8z0QoUnY6Aq4ad1NPPrJWP Content-Type: multipart/mixed; boundary="1z3YyftSJ556xYoaCcGMRRfrxjCcmkXv7" --1z3YyftSJ556xYoaCcGMRRfrxjCcmkXv7 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 24/05/2020 03:39, Montgomery-Smith, Stephen wrote: > Is there a "howto" that explains how to build a port from a project tha= t > is on github? The FreeBSD porters handbook seems to assume a lot of > knowledge is already understood. Well, the only thing "different" about porting something from Github, as opposed to any other distfile location, occurs in the 'fetch' phase -- actually pulling down the distfiles. Once you've got past that, the rest of building the port is exactly the same as it would be if you got the distfiles from anywhere else. So, minimally a Github using port will set the following variables: PORTNAME=3D someport PORTVERSION=3D 1.2.3 DISTVERSIONPREFIX=3D v USE_GITHUB=3D yes GH_ACCOUNT=3D someone and it won't set: MASTER_SITES DISTFILES An example from amongst the ports I maintain is database/pg_citus: PORTNAME=3D citus PORTVERSION=3D 9.3.0 DISTVERSIONPREFIX=3D v USE_GITHUB=3D yes GH_ACCOUNT=3D citusdata =46rom this, the ports can work out that the Github project is: https://github.com/citusdata/citus/ ^^^^^^^^^ GH_ACCOUNT ^^^^^ PORTNAME If you go to that project URL and look at their releases page: https://github.com/citusdata/citus/releases you'll see the list of versions like so: v9.3.0 ^ ^^^^ | PORTVERSION DISTVERSIONPREFIX That's all that is needed for this port to be able to download a tarball of the project's sources. Now, this is about the simplest possible example of what you might need when pulling sources from Github, and this pattern probably accounts for the largest fraction of the Github-using ports in the tree. Beyond that, the next largest fraction will be projects where the PORTNAME doesn't quite match the GH project URL, or their release tags specify the version as (eg.) v1_2_3 rather than v1.2.3 -- all just minor tweaks so the ports can put together the right URL to pull the distfiles from. Beyond that is where it can start to get pretty complicated though. Sometimes a project doesn't create formal releases, or you want to pull down a code base a few commits beyond the latest release, or the project uses a lot of different sub-projects linked into its tree from other github repositories. Certain programs written in go are pretty notorious for this, and can end up with huge lists of distfiles. See www/gitlab-pages for an example. Finally, and only if you really want to blow your mind: throw in an unreasonable number of port options to the mix. www/nginx is the pinnacle (or is it nadir?) here. In general I'd offer the following three pieces of advice when trying to get to grips with a new area in porting: * Find a good example of a port that does something similar and blatantly copy it[*]. * Keep things as simple as possible (but no simpler). * Work iteratively: start with something close, and make simple minimal changes, one at a time and testing as you go, to get it spot on. [*] The trick here is not to copy a port that does things sub-optimally. Sods law has it that if there's a dozen good examples you might copy, and one bad one, it's the bad one that will seem like the most enticing prospect. If in doubt, ask. It helps if you can provide a concrete example or a specific context for your questions, and indeed, trying to formulate such a question will often lead you directly to the answer yourself. Cheers, Matthew --1z3YyftSJ556xYoaCcGMRRfrxjCcmkXv7-- --n1itdvt4nlp8z0QoUnY6Aq4ad1NPPrJWP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAl7KNP5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE5 RjE1NEVDQkYxMTJFNTA1NDRFM0YzMDAwNTEzRjEwRTBBOUU0RTcACgkQAFE/EOCp 5OfMWA/9Eys+2BuVQLTN2EqYPKtEbGLiRrZVaSIGpH3VtNZs10aUBJfDI590OwWF TaviE2mKtrwvMWajrv8Q8dNtcklXAawNbgWb13AQB802fDjxUUPa9HJs+KC/DwZP tsHoY8y4OiOgjhs9l6P2a5CV5KRiGQsqLD572sPOFswRniCVcdnsc6p1m1TOgmj7 Dw1nd4nTJR9ISIadRXhdPeyVrGEzdnOYWHoHjuekdKQNYpBPbclLWu0jwZjr3h0S LRAQFoCbpXlNC5T9SpX6m/sBed8BCc2puYbnxEPn/mzOmSxnBaLbYIU+CU4fwPqs sy7txV6mjffcoj0npv4XAeP93z1u7s77ecxyOy0T10m/VvMI+oviihsYSj5PyNxF mBzGBojmknEsif+T1+rwIlsdnT5AC2VPDhtFNcTBGS7NnDgDCF17omdK5CSIWCwX XvX1EJDwPSw5ZvSGfXDem4HGs0E3wus7SvryNsFndf1WwObr/0IQmwx3Xs/gctfk HKjPeTavsxKqn8D5qNPIqN84z8C9k25778IRnF5mmIdMb7fOVMgHfEQGDt40r0s2 FwcJW1y52OgPynS8opXwi+HVpBREBZ9+p7zmb3GjBNwQ3LRMTZUA/GPVtlW8VBMN QAD9SritFZH17lU5ISmuyiiHYFMFzwi17Q84mHLw86o0GvIJWBU= =Iuul -----END PGP SIGNATURE----- --n1itdvt4nlp8z0QoUnY6Aq4ad1NPPrJWP--