Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2015 14:10:33 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Jonathan Anderson <jonathan@FreeBSD.org>, freebsd-ports@freebsd.org
Subject:   Re: USE_GITHUB and submodules
Message-ID:  <555B8AA9.4070907@FreeBSD.org>
In-Reply-To: <555B84AA.30901@FreeBSD.org>
References:  <555B84AA.30901@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--u74QqW3uIpfqV5kGavakUktuCffVmju38
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 5/19/2015 1:44 PM, Jonathan Anderson wrote:
> Hi all,
>=20
> Is there a mechanism for using the USE_GITHUB variable in a port that
> depends on submodules? For instance, the Rust port requires an embedded=

> (and modified) version of LLVM, which it includes as a submodule. Right=

> now I'm attempting to add the following to a `post-extract` rule:
>=20
> post-extract:
>     cd ${WRKSRC} && \
>     git init && \
>     git remote add origin https://github.com/${GH_ACCOUNT}/${PORTNAME} =
&& \
>     git fetch && \
>     git reset --hard ${PORTVERSION} && \
>     git submodule init && \
>     git submodule update --recursive
>=20
> But this seems quite hackish! It would be great if submodules Just
> Worked... but alternatively, is there a USE_GITHUB_URL or somesuch that=

> would check things out via Git instead of tarball to save me the `git
> init` through `git reset` steps?

There's not currently. However consider that using git for the fetch is
a potential security risk. You must ensure that a hash is checked out
and not a branch name. A branch would change hash on the next update and
the port would then be building an unknown version. It would really just
be best to avoid using git as an actual fetch mechanism. USE_GITHUB does
not.

You could just add a rust-llvm port that uses the modified llvm and have
rust depend on it for a build dependency.

Another alternative that others have employed is to just check all of
this out on freefall and make your own tarball. Then put that in your
~/public_distfiles and serve it in the port as MASTER_SITES=3D LOCAL/jona=
than.

Or ask the upstream to do an actual release of their own with a real
tarball rather than asking people to use git.

--=20
Regards,
Bryan Drewery


--u74QqW3uIpfqV5kGavakUktuCffVmju38
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJVW4qtAAoJEDXXcbtuRpfPtesH/ilgz1zMtZ3SzQaDkSIOWUlp
yvIuW9ickjW9zTzhO0ABlfdY1GoFiYk/9H3dnjPO1FtsTzzkT2LUjd/MWNLM1vSw
9n8nKfpkQwmoN8n4EkrqOIalrF++3XfRvKlOyT5ck2DbyqYIkTyblG8zSVrItGo9
5gwKc3xKtDdpQWo6cCl/nfX8bJzWHdqMYwfIlM70bvljV6Cnj5Og/mq0u4Xr2VHe
JLJ7X3fpDyANcFcPAVmrv3RcCC351a1WCPqIkL9xkQKRQISVAEB5XfcjOfJHWmdk
rX+YCCUrB1hZjvL2gJVMWTB1VhYIt5U/O0W0DdHrPF5ATUB7ONznIl0kZQjVV/c=
=yPPi
-----END PGP SIGNATURE-----

--u74QqW3uIpfqV5kGavakUktuCffVmju38--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?555B8AA9.4070907>