From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1W1eCv-00089z-SA for ptxdist@pengutronix.de; Fri, 10 Jan 2014 16:41:15 +0100 Received: by mail-la0-f41.google.com with SMTP id c6so3360104lan.0 for ; Fri, 10 Jan 2014 07:41:07 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20140110153743.GC20358@pengutronix.de> References: <201401080859.43988.jbe@pengutronix.de> <20140109090334.GI2156@pengutronix.de> <20140109160612.GA7098@pengutronix.de> <20140110153743.GC20358@pengutronix.de> Date: Fri, 10 Jan 2014 10:41:06 -0500 Message-ID: From: Jon Ringle Subject: Re: [ptxdist] git ptxdist best practices Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0255533580==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============0255533580== Content-Type: multipart/alternative; boundary=001a113480a0ec445b04ef9f8d9e --001a113480a0ec445b04ef9f8d9e Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jan 10, 2014 at 10:37 AM, Michael Olbrich wrote: > On Thu, Jan 09, 2014 at 11:37:15AM -0500, Jon Ringle wrote: > > On Thu, Jan 9, 2014 at 11:06 AM, Michael Olbrich > > wrote: > > > > > On Thu, Jan 09, 2014 at 10:23:58AM -0500, Jon Ringle wrote:> One issue > > > that I ran across with this is that I have: > > > > PTXCONF_SETUP_PTXMIRROR_ONLY=y > > > > PTXCONF_SETUP_PTXMIRROR="http://opensource/pool/" > > > > > > > > Where opensource is an internal server that keeps all tar balls used > to > > > > build. I'm paranoid that someday a upstream tar ball won't be > available > > > and > > > > would cause a build break if someone tried to build and they didn't > have > > > > that tar ball in ${PTXCONF_SETUP_SRCDIR} > > > > > > > > But for my purposes, if I wanted to use the git URL in a rule file > I'd > > > want > > > > it to use the URL as is. But it rewrites it trying to use > > > > ${PTXCONF_SETUP_PTXMIRROR} instead in > scripts/lib/ptxd_make_get.sh:295 > > > > > > > > Is there away to work around this? > > > > > > put your git repositories in the mirror: > > > FOO_URL := http://opensource/pool/foo.git;tag=bar > > > > > > Unfortunately, I can't do that. The opensource server is under IT > control > > and they've locked it down so that I can only write to it using scp or > sftp > > and have no ssh shell access to it. > > > > The mechanism whitelists any URL starting with ${PTXCONF_SETUP_PTXMIRROR} > > > > > > > Would the following approach work: > > > > 1. In ptxdist/rules/post/ptxd_make_world_common.make add to > world/env/impl: > > pkg_url_safe="$(call ptx/escape,$($(1)_URL_SAFE))" > > > > 2. In ptxdist/scripts/lib/ptxd_make_get.sh function ptxd_make_get > > change all occurances of: > > if [ -z "${PTXCONF_SETUP_PTXMIRROR_ONLY}" ]; then > > with something like: > > if [ -z "${PTXCONF_SETUP_PTXMIRROR_ONLY}" -o -n "${pkg_url_safe}" ]; > > then > > > > Then in the rule file you can do: > > FOO_URL_SAFE := y > > > > So that you can whitelist a specific URL if PTXCONF_SETUP_PTXMIRROR_ONLY > is > > set > > Hmmm, this is not so nice. How about making PTXCONF_SETUP_PTXMIRROR a list? > Then you can add http://opensource/pool/ and your git server to the > 'whitelist'. > > Does PTXCONF_SETUP_PTXMIRROR currently support supplying a list of URLs?-- --001a113480a0ec445b04ef9f8d9e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On F= ri, Jan 10, 2014 at 10:37 AM, Michael Olbrich <m.olbrich@pengutroni= x.de> wrote:
On T= hu, Jan 09, 2014 at 11:37:15AM -0500, Jon Ringle wrote:
> On Thu, Jan 9, 2014 at 11:06 AM, Michael Olbrich
> <m.olbrich@pengutronix.= de>wrote:
>
> > On Thu, Jan 09, 2014 at 10:23:58AM -0500, Jon Ringle wrote:> O= ne issue
> > that I ran across with this is that I have:
> > > PTXCONF_SETUP_PTXMIRROR_ONLY=3Dy
> > > PTXCONF_SETUP_PTXMIRROR=3D"http://opensource/pool/"
> > >
> > > Where opensource is an internal server that keeps all tar ba= lls used to
> > > build. I'm paranoid that someday a upstream tar ball won= 't be available
> > and
> > > would cause a build break if someone tried to build and they= didn't have
> > > that tar ball in ${PTXCONF_SETUP_SRCDIR}
> > >
> > > But for my purposes, if I wanted to use the git URL in a rul= e file I'd
> > want
> > > it to use the URL as is. But it rewrites it trying to use > > > ${PTXCONF_SETUP_PTXMIRROR} instead in scripts/lib/ptxd_make_= get.sh:295
> > >
> > > Is there away to work around this?
> >
> > put your git repositories in the mirror:
> > FOO_URL :=3D http://opensource/pool/foo.git;tag=3Dbar
> >
> > Unfortunately, I can't do that. The opensource server is unde= r IT control
> and they've locked it down so that I can only write to it using sc= p or sftp
> and have no ssh shell access to it.
>
> The mechanism whitelists any URL starting with ${PTXCONF_SETUP_PTXMIRR= OR}
> >
>
> Would the following approach work:
>
> 1. In ptxdist/rules/post/ptxd_make_world_common.make add to world/env/= impl:
> =A0 =A0 pkg_url_safe=3D"$(call ptx/escape,$($(1)_URL_SAFE))"=
>
> 2. In ptxdist/scripts/lib/ptxd_make_get.sh function ptxd_make_get
> change all occurances of:
> =A0 =A0 if [ -z "${PTXCONF_SETUP_PTXMIRROR_ONLY}" ]; then > with something like:
> =A0 =A0 if [ -z "${PTXCONF_SETUP_PTXMIRROR_ONLY}" -o -n &quo= t;${pkg_url_safe}" ];
> then
>
> Then in the rule file you can do:
> FOO_URL_SAFE :=3D y
>
> So that you can whitelist a specific URL if PTXCONF_SETUP_PTXMIRROR_ON= LY is
> set

Hmmm, this is not so nice. How about making PTXCONF_SETUP_PTXMI= RROR a list?
Then you can add http= ://opensource/pool/ and your git server to the
'whitelist'.

Does PTXCONF_SETUP_PTXMIRROR currently support supplying a list= of URLs?--

--001a113480a0ec445b04ef9f8d9e-- --===============0255533580== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0255533580==--