mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Jon Ringle <jon@ringle.org>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] git ptxdist best practices
Date: Fri, 24 Jan 2014 08:10:34 -0500	[thread overview]
Message-ID: <CAMwGMjyJkEGUT3T6mcVfrNFWby4M9tetpOHfiR1ppPag3Q_hAQ@mail.gmail.com> (raw)
In-Reply-To: <20140124092158.GC7704@pengutronix.de>

On Fri, Jan 24, 2014 at 4:21 AM, Michael Olbrich
<m.olbrich@pengutronix.de> wrote:
> On Fri, Jan 10, 2014 at 08:47:52PM -0500, Jon Ringle wrote:
>> On Fri, Jan 10, 2014 at 10:37 AM, Michael Olbrich
>> <m.olbrich@pengutronix.de>wrote:
>>
>> > On Thu, Jan 09, 2014 at 11:37:15AM -0500, Jon Ringle wrote:
>> > > 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'.
>> >
>> > The approach you are proposing has several issue for which I don't have
>> the necessary bash chops to figure out how to tackle:
>>
>> 1. In the 1st while loop in ptxd_make_get(), I don't know how to get the
>> case to accept multiple array values for ${PTXCONF_SETUP_PTXMIRROR}:
>>         case "${url}" in
>>         ${PTXCONF_SETUP_PTXMIRROR}/*/*)
>>             # keep original URL, for stuff like glibc
>>             argv[${#argv[@]}]="${url}"
>>             mrd=true
>>             ;;
>>         ${PTXCONF_SETUP_PTXMIRROR}/*)
>>             # if mirror is given us to download, add it, but only once
>>             if ! ${mrd}; then
>>                 argv[${#argv[@]}]="${url}"
>>                 mrd=true
>>             fi
>>             ;;
>>
>> Replacing with ${PTXCONF_SETUP_PTXMIRROR[@]} clear won't help as the
>> various options aren't separate by PIPE character |.
>>
>> 2. Where ptxmirror_url gets assigned, it would also need to be an array too
>> 3. And then also where ${ptxmirror_url} gets added to the argv array
>>
>> Quite frankly, I really like my approach much better... and it does not
>> preclude you from implementing your solution as well.
>> If I created and tested a patch that allows FOO_URL_SAFE, would you
>> consider it for inclusion to ptxdist?
>
> I've been thinking about this some more. The choice to only download from
> the mirror comes from the BSP user via 'setup'. I don't think allowing the
> BSP / ptxdist developer to overwrite that is a good idea.
> What about an explicit URL whitelist in 'setup'?

I wouldn't mind that. This isn't any different than what you suggested
before. But as I mentioned before, I don't know how to implement this.

Jon

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2014-01-24 13:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  2:32 Jon Ringle
2014-01-08  5:56 ` Alexander Dahl
2014-01-08  6:12   ` Jon Ringle
2014-01-08  9:21     ` Alexander Dahl
2014-01-08  9:48       ` Alexander Dahl
2014-01-08  9:52       ` Jürgen Beisert
2014-01-08 17:56       ` Jon Ringle
2014-01-08 20:43         ` Alexander Dahl
2014-01-08  7:59 ` Jürgen Beisert
2014-01-08 14:14   ` Jon Ringle
2014-01-09  8:10     ` Jürgen Beisert
2014-01-09  9:03   ` Olbrich, Michael
2014-01-09 15:23     ` Jon Ringle
2014-01-09 16:06       ` Michael Olbrich
2014-01-09 16:37         ` Jon Ringle
2014-01-10 15:37           ` Michael Olbrich
2014-01-10 15:41             ` Jon Ringle
2014-01-11  1:47             ` Jon Ringle
2014-01-24  9:21               ` Michael Olbrich
2014-01-24 13:10                 ` Jon Ringle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMwGMjyJkEGUT3T6mcVfrNFWby4M9tetpOHfiR1ppPag3Q_hAQ@mail.gmail.com \
    --to=jon@ringle.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox