Skip to contentSkip to conversation

mirrors: Add uninative mirror on kernel.org

PATCH In review Richard Purdie 2 participants 3 messages Nov 9, 2021 – Nov 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mirrors: Add uninative mirror on kernel.org

At the last nas outage, we realised that we don't have good mirrors of the uninative tarball if our main system can't be accessed. kernel.org mirrors some Yocto Project data so we've ensured uninative is there. Add the appropriate mirror url to make use of that.

---
 meta/classes/mirrors.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/mirrors.bbclass +1 -0
index ba325a658bc..75eb86a7243 100644
@@ -62,6 +62,7 @@ ftp://.*/.*     http://sources.openembedded.org/ \n \
 npm://.*/?.*    http://sources.openembedded.org/ \n \
 ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
 ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
+https?$://downloads.yoctoproject.org/releases/uninative/ https://mirrors.kernel.org/yocto/uninative/ \n \
 "
 
 # Use MIRRORS to provide git repo fallbacks using the https protocol, for cases
Signature · 1 line
2.32.0
#1 lore raw
Quoted 22 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 9 november 2021 14:22
To: [email protected]
Subject: [OE-core] [PATCH] mirrors: Add uninative mirror on kernel.org

At the last nas outage, we realised that we don't have good mirrors of the uninative tarball if our main system can't be accessed. kernel.org mirrors some Yocto Project data so we've ensured uninative is there. Add the appropriate mirror url to make use of that.

---
 meta/classes/mirrors.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/mirrors.bbclass +0 -0
index ba325a658bc..75eb86a7243 100644

meta/classes/mirrors.bbclass ftp://.*/.* http://sources.openembedded.org/ \n \ · line 65

Quoted 4 lines
meta/classes/mirrors.bbclass +1 -0
@@ -62,6 +62,7 @@ ftp://.*/.*     http://sources.openembedded.org/ \n \
 npm://.*/?.*    http://sources.openembedded.org/ \n \
 ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
 ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
+https?$://downloads.yoctoproject.org/releases/uninative/ https://mirrors.kernel.org/yocto/uninative/ \n \

The above looked very odd to me, having that dollar sign in the middle of the regular expression. It wasn't until I was deep into the fetcher's code that I realized that it is not actually one regular expression above, but three, formatted as a URL...

However, based on the code in bitbake/lib/bb/fetch2/__init__.py:uri_replace(), AFAICT, the dollar sign should not be needed above, as it will be added for the URI type regexp automatically. The same goes for the other two URLs in mirrors.bbclass that use that formatting.

While investigating this, I also tried to look in the bitbake documentation for a description of the format used for the PREMIRRORS and MIRRORS variables, but I could not find any. There is only a simple example, without any explanation for the actual format that is being used.

Quoted 5 lines
meta/classes/mirrors.bbclass +0 -1
 "
 
 # Use MIRRORS to provide git repo fallbacks using the https protocol, for cases
--

2.32.0

//Peter

#2 lore raw
Quoted 18 lines · Peter Kjellerstedt
Quoted 18 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 9 november 2021 14:22
To: [email protected]
Subject: [OE-core] [PATCH] mirrors: Add uninative mirror on kernel.org

At the last nas outage, we realised that we don't have good mirrors of the uninative tarball if our main system can't be accessed. kernel.org mirrors some Yocto Project data so we've ensured uninative is there. Add the appropriate
mirror url to make use of that.

---
 meta/classes/mirrors.bbclass | 1 +

 1 file changed, 1 insertion(+)
Quoted 15 lines

meta/classes/mirrors.bbclass ftp://.*/.* http://sources.openembedded.org/ \n \ · line 66

Quoted 10 lines
meta/classes/mirrors.bbclass +1 -0
index ba325a658bc..75eb86a7243 100644
@@ -62,6 +62,7 @@ ftp://.*/.*     http://sources.openembedded.org/ \n \
  npm://.*/?.*    http://sources.openembedded.org/ \n \
  ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
  ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
+https?$://downloads.yoctoproject.org/releases/uninative/
 https://mirrors.kernel.org/yocto/uninative/ \n \

The above looked very odd to me, having that dollar sign in the middle of the regular expression. It wasn't until I was deep into the fetcher's code that I realized that it is not actually one regular expression above, but three, formatted as a URL...

It is all a bit crazy. This format is from the days of the fetcher before my involvement and before it was the fetcher.

Quoted 4 lines

However, based on the code in bitbake/lib/bb/fetch2/__init__.py:uri_replace(), AFAICT, the dollar sign should not be needed above, as it will be added for the URI type regexp automatically. The same goes for the other two URLs in mirrors.bbclass that use that formatting.

Right, I think I remember added the anchoring fix. We haven't cleaned up all the urls out in the wild and I was being consistent with the other entries in this case.

Quoted 4 lines

While investigating this, I also tried to look in the bitbake documentation for a description of the format used for the PREMIRRORS and MIRRORS variables, but I could not find any. There is only a simple example, without any explanation for the actual format that is being used.

That doesn't surprise me, I still have trouble remembering all the idiosyncrasies when trying to fix the mirror url code too. It would be good to document it if anyone fancies trying.

Cheers,

Richard