public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Claudius Heine <claudius.heine.ext@siemens.com>
To: isar-users@googlegroups.com
Subject: [DISCUSSION] Mirror implementation with isar-bootstrap
Date: Mon, 9 Apr 2018 14:03:49 +0200	[thread overview]
Message-ID: <df57bb46-942e-65c4-c930-b7d581a4c1ef@siemens.com> (raw)

Hi,

since isar-bootstrap is currently missing support to change the mirror 
of the apt repositories via the bitbake configuration, I would like to 
start the discussion about how to implement this the best way.

AFAIK apt doesn't has a native support for mirror selection that could 
be simply adapted to our use-case. Debian itself uses http redirection 
to find the closest remote server (http://httpredir.debian.org/) while 
apt also supports a 'mirror' method like this:

     deb mirror://mirrors.ubuntu.com/mirrors.txt precise main

Both of those methods aren't really what we are looking for.

What we want is being able to overwrite official mirror URIs with our 
own. OEs mechanism to deal with this is the PREMIRRORS variable [1].
It basically contains a regex and a replace string separated by a 
whitespace where each of those sets is separated by a new line.

We could do something similar like this:

   PREMIRRORS="http://ftp.debian.org/ http://internal.mirror/ \n
               ..."

And that would work as long as the internal mirror mirrors exactly the 
same content as ftp.debian.org.

If this is not the case, then things are getting more difficult.
My first question is: Can we assume the internal mirrors are 1:1 copies 
of the external ones?

If not then here are some other solutions:

   PREMIRRORS="http://ftp.debian.org/ stretch http://internal.mirror/ \n
               ..."

This way we could select additionally the distribution suite. It's just 
a bit more flexible but maybe not enough? We could add components and 
what not here as well. Maybe we also need to split between 'deb' and 
'deb-src' mirrors?

With those previous examples PREMIRRORS are operating on the global 
aggregated source list. So maybe specifying which file they needed to be 
applied could be better:

   PREMIRRORS="conf/distro/stretch.list http://ftp.debian.org 
http://internal.mirror \n
               ..."

That might limit the effect of those regexes to lower the risk of 
accidentally overwriting anything else.

I currently don't know how flexible we need to design this, so that is 
why I am asking the community.

Thanks,
Claudius


[1] 
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

             reply	other threads:[~2018-04-09 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 12:03 Claudius Heine [this message]
2018-04-12 14:12 ` Baurzhan Ismagulov
2018-04-12 15:13   ` Claudius Heine
2018-04-13 10:33     ` Baurzhan Ismagulov
2018-04-13 10:56       ` Claudius Heine
2018-04-13 11:25         ` Baurzhan Ismagulov

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=df57bb46-942e-65c4-c930-b7d581a4c1ef@siemens.com \
    --to=claudius.heine.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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