From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6542418157487783936 X-Received: by 10.223.225.13 with SMTP id d13mr2377456wri.22.1523275430579; Mon, 09 Apr 2018 05:03:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.124.22 with SMTP id x22ls1589770wmc.9.gmail; Mon, 09 Apr 2018 05:03:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/EyLuW/2LkKY1e/zMrf3L4VeySsIjd5groeSpaXPYGFeThHlr3tzVJB+J50T8XMhUNxg7B X-Received: by 10.28.218.3 with SMTP id r3mr2668127wmg.20.1523275430121; Mon, 09 Apr 2018 05:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523275430; cv=none; d=google.com; s=arc-20160816; b=zf4BFSau3XgNj3uJdm6yLLqM5DxSAW6AjDwvVbOYAibpamROmXwBKD+I1ifZ93cAw4 fGBVAJQGetsob3V5Str5aDjMi3UDCGCOG6pBiw8Rqn1q4V+sS5OS+rTAjHhATXRcfuIM HtXqm3LSmoA2djOWspqDdEDKnpv3CANM140wmZOpaW357Js61l2G7yKWdoEWoISu9QtN 4sZMRQp4gtzwpYQkE9fo6XsZRp0wIHX7+Z7O/acI5gBh/RAOKEfuWeOv0zTYqTehpS88 NOjuXBwVX/3q8ZStgFBHamF/8e9oW9s9c3IXdcuiM5Zwxs3laHjKyTeQrRgByVMKs8DB kzYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version:user-agent :date:message-id:subject:from:to:arc-authentication-results; bh=syJ181T/zVep+q7WPgmbN50UCKfcZI51X8KAmbvn1PA=; b=GfKDJTOynXG3NAC8Fj4H+Y4CNylD8t8SkDYXd1GQ43BG0n+rotH2mVdlLI6N/Do26f jOkGGQ3u3I5Xbe9gOBFbGuye9pUy+miSeNQzb9qk8+EIk9AvnSIDzj6/mXIjo86lzNel fELqhDKWKRZpHzHc8y5C06JKSDblYnmu34AqTIS10ICLXDGuIJbERSCCD4JEuq3LfGE8 Sdok3RDTqnHcwXBW932yyWXnyTr/sOsOacnsy0OXFB11IxcXqfLfHlyXx/7c+v9oKLad yvRLek21smNMFvT4YJrBRlEws9k2IvgnQ9CnqTrOnS8v0ungrV1lHJFvhn5FART1Jq8b /8MQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id n11si9111wrh.4.2018.04.09.05.03.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 05:03:50 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w39C3nxE019545 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 9 Apr 2018 14:03:49 +0200 Received: from [139.25.69.226] (linux-ses-ext02.ppmd.siemens.net [139.25.69.226]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w39C3nUl030536 for ; Mon, 9 Apr 2018 14:03:49 +0200 To: isar-users@googlegroups.com From: Claudius Heine Subject: [DISCUSSION] Mirror implementation with isar-bootstrap Message-ID: Date: Mon, 9 Apr 2018 14:03:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 2ekH90L6FPDr 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