public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [DISCUSSION] Mirror implementation with isar-bootstrap
@ 2018-04-09 12:03 Claudius Heine
  2018-04-12 14:12 ` Baurzhan Ismagulov
  0 siblings, 1 reply; 6+ messages in thread
From: Claudius Heine @ 2018-04-09 12:03 UTC (permalink / raw)
  To: isar-users

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-13 11:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 12:03 [DISCUSSION] Mirror implementation with isar-bootstrap Claudius Heine
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox