From owner-freebsd-ports@FreeBSD.ORG Wed May 20 13:30:21 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8732A77C; Wed, 20 May 2015 13:30:21 +0000 (UTC) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6CE188E; Wed, 20 May 2015 13:30:21 +0000 (UTC) Received: by qkgv12 with SMTP id v12so31460399qkg.0; Wed, 20 May 2015 06:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=3b/Po7QlX/QkEssYmXrIZwdQrI2tGmXO+fs77qaI0Ug=; b=1CtqJimC6hB0xeJBIBCF+RgcRV6KQLgEoHrdgJvL07UkMsT3P6hOv8dooT5hOnFFrn PdFCK9fsxImUeaXprw8OmzZSE4f/zXEDCg7nRPwXmubgo7Ive4hNoBjqOI6r80fjwLbN WwOsTtXKnE3K0Fyi+Pic6FcK2CM0JlbdGLJjBdNifynRmNTmAVP1wUUvrTS4fj6XUi39 1JbebXbwnstiiaF+4uxiwPDm27Nr6abOlZ19N2QqVzXpz+i14JDqYGsTNpJIS9oN0BNu djV5+TXIhus+eFAttwmAAJTg3uHYztPWAK1Ej1L3/daFhy2QRZDsH4bRlxE4lC6vpq0l wbjA== X-Received: by 10.55.49.71 with SMTP id x68mr69942712qkx.62.1432128620236; Wed, 20 May 2015 06:30:20 -0700 (PDT) Received: from jacob.local (jacob.engr.mun.ca. [134.153.27.124]) by mx.google.com with ESMTPSA id 78sm11081395qht.45.2015.05.20.06.30.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 May 2015 06:30:18 -0700 (PDT) Message-ID: <555C8C68.9060705@gmail.com> Date: Wed, 20 May 2015 11:00:16 -0230 From: Jonathan Anderson User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: Shane Ambler CC: Jonathan Anderson , freebsd-ports@freebsd.org Subject: Re: USE_GITHUB and submodules References: <555B84AA.30901@FreeBSD.org> <555BD95A.6010706@ShaneWare.Biz> In-Reply-To: <555BD95A.6010706@ShaneWare.Biz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 13:30:21 -0000 Thanks everybody for the input! With a security hat on, I definitely concur with the policy of no fetching outside of fetch and of requiring reproducibility/verifiability (e.g., commit hashes). With my getting-this-darn-port-updated hat, however... :) I think that I'll try to go with Shane's solution, if others concur that it's a good idea. I don't want to create a rust-llvm port, since Rust's customized version of LLVM isn't much good outside of Rust, it doesn't expose any external libraries and it's intended to eventually go away. So, until GitHub implements the "give me a tarball with all of the submodules" feature, I might try hacking up MASTER_SITES as Shane suggests. Cheers, Jon > Shane Ambler > May 19, 2015 at 10:16 PM > On 20/05/2015 04:14, Jonathan Anderson wrote: >> Hi all, >> >> 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: > > While you can setup multiple files to be downloaded for a port this > doesn't work with USE_GITHUB, see my 3 year old report - > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172964 > > This isn't an official port, but the workaround I came up with was to > setup multiple files by setting MASTER_SITES using -- > > MASTER_SITES= https://github.com/sambler/myblender/tarball/:base \ > https://github.com/sambler/myblendertranslations/tarball/:trans \ > https://github.com/sambler/myblenderaddons/tarball/:addons \ > https://github.com/sambler/myblendercontrib/tarball/:contrib > DISTFILES= sambler-${PORTVERSION}.${PORTREVISION}:base \ > translate-${PORTVERSION}.${PORTREVISION}:trans \ > addons-${PORTVERSION}.${PORTREVISION}:addons \ > contrib-${PORTVERSION}.${PORTREVISION}:contrib > DIST_SUBDIR= ${PORTNAME} > > The DISTFILES names are setup to match my tag format. > > This gives you multiple archives for the port, each will be extracted > into the work dir, I then use post-extract to move them into place > within the main source tree and don't depend on git for the port-- > > post-extract: > # tanslations > @${MV} ${WRKDIR}/sambler-myblendertranslations-*/* > ${WRKSRC}/release/datafiles/locale/ > # addons > @${MV} ${WRKDIR}/sambler-myblenderaddons-*/* > ${WRKSRC}/release/scripts/addons/ > # contrib > @${MV} ${WRKDIR}/sambler-myblendercontrib-*/* > ${WRKSRC}/release/scripts/addons_contrib/ > > >> 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 >> >> 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? >> >> Cheers, >> >> >> Jon >> -- >> jonathan@FreeBSD.org >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >> > > -- jonathan.anderson@ieee.org