mirrors: Switch glibc and binutils to use shallow mirror tarballs
RFC PATCH 1/1 mirrors: Switch glibc and binutils to use shallow mirror tarballs
These two repositories are large and overload our downloads server as a premirror but the recipes are easier to maintain as git urls. Compromise and use shallow clones for them.
In order to be effective, we need premirror entries on where to find the shallow mirror tarballs.
--- meta/classes/mirrors.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+)
meta/classes/mirrors.bbclass +11 -0
@@ -76,3 +76,14 @@ git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ git://.*/.* git://HOST/PATH;protocol=https \ git://.*/.* git://HOST/git/PATH;protocol=https \ " + +# Switch glibc and binutils recipes to use shallow clones as they're large and this +# improves user experience whilst allowing the flexibility of git urls in the recipes +BB_GIT_SHALLOW:pn-binutils = "1" +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1" +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1" +BB_GIT_SHALLOW:pn-glibc = "1" +PREMIRRORS += "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ \ + git://sourceware.org/git/binutils-gdb.git https://downloads.yoctoproject.org/mirror/sources/"
Signature · 1 line
2.32.0
Quoted 27 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 30 mars 2022 14:24
To: [email protected]
Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsThese two repositories are large and overload our downloads server as a premirror but the recipes are easier to maintain as git urls. Compromise and use shallow clones for them.
In order to be effective, we need premirror entries on where to find the shallow mirror tarballs.
Signed-off-by Richard Purdie <[email protected]>--- meta/classes/mirrors.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+)meta/classes/mirrors.bbclass +1
-0@@ -76,3 +76,14 @@ git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ git://.*/.* git://HOST/PATH;protocol=https \ git://.*/.* git://HOST/git/PATH;protocol=https \ " +
meta/classes/mirrors.bbclass git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ · line 89
Quoted 10 lines
meta/classes/mirrors.bbclass +10
-0+# Switch glibc and binutils recipes to use shallow clones as they're large and this +# improves user experience whilst allowing the flexibility of git urls in the recipes +BB_GIT_SHALLOW:pn-binutils = "1" +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1" +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1" +BB_GIT_SHALLOW:pn-glibc = "1" +PREMIRRORS += "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ \ + git://sourceware.org/git/binutils-gdb.git https://downloads.yoctoproject.org/mirror/sources/"
Please use PREMIRRORS:append here, or you will wipe away any default configuration of PREMIRRORS defined using "?=".
Quoted 2 lines
--
2.32.0
//Peter
Quoted 39 lines · Peter Kjellerstedt
Quoted 39 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 30 mars 2022 14:24
To: [email protected]
Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsThese two repositories are large and overload our downloads server as a premirror but the recipes are easier to maintain as git urls. Compromise and use shallow clones for them.
In order to be effective, we need premirror entries on where to find the shallow mirror tarballs.
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/mirrors.bbclass | 11 +++++++++++1 file changed, 11 insertions(+)meta/classes/mirrors.bbclass +0
-0@@ -76,3 +76,14 @@ git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ git://.*/.* git://HOST/PATH;protocol=https \ git://.*/.* git://HOST/git/PATH;protocol=https \"
meta/classes/mirrors.bbclass +2
-0+ +# Switch glibc and binutils recipes to use shallow clones as they're largeand this
+# improves user experience whilst allowing the flexibility of git urls in the recipesmeta/classes/mirrors.bbclass +5
-0+BB_GIT_SHALLOW:pn-binutils = "1" +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1" +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"
Quoted 8 lines
Quoted 5 lines
meta/classes/mirrors.bbclass +2
-0+BB_GIT_SHALLOW:pn-glibc = "1" +PREMIRRORS += "git://sourceware.org/git/glibc.githttps://downloads.yoctoproject.org/mirror/sources/ \
+git://sourceware.org/git/binutils-gdb.git
https://downloads.yoctoproject.org/mirror/sources/"Please use PREMIRRORS:append here, or you will wipe away any default configuration of PREMIRRORS defined using "?=".
No, I'm not using append here since I do want users to be able to reset this. We should change the default to "=" if that is causing an issue.
Cheers,
Richard
Quoted 52 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 31 mars 2022 16:16
To: Peter Kjellerstedt <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsQuoted 34 lines · Peter Kjellerstedt
Quoted 34 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 30 mars 2022 14:24
To: [email protected]
Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsThese two repositories are large and overload our downloads server as a premirror but the recipes are easier to maintain as git urls. Compromise and use shallow clones for them.
In order to be effective, we need premirror entries on where to find the shallow mirror tarballs.
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/mirrors.bbclass | 11 +++++++++++1 file changed, 11 insertions(+)meta/classes/mirrors.bbclass +0
-0@@ -76,3 +76,14 @@ git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ git://.*/.* git://HOST/PATH;protocol=https \ git://.*/.* git://HOST/git/PATH;protocol=https \"
meta/classes/mirrors.bbclass +6
-0+ +# Switch glibc and binutils recipes to use shallow clones as they're large and this +# improves user experience whilst allowing the flexibility of git urls in the recipes +BB_GIT_SHALLOW:pn-binutils = "1" +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1"Quoted 8 lines
meta/classes/mirrors.bbclass git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ · line 89
Quoted 5 lines
meta/classes/mirrors.bbclass +5
-0+BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1" +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1" +BB_GIT_SHALLOW:pn-glibc = "1" +PREMIRRORS += "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ \ + git://sourceware.org/git/binutils-gdb.git https://downloads.yoctoproject.org/mirror/sources/"Please use PREMIRRORS:append here, or you will wipe away any default configuration of PREMIRRORS defined using "?=".
Quoted 1 line
No, I'm not using append here since I do want users to be able to reset this.
That can easily be achieved by instead doing something like:
SHALLOW_PREMIRRORS = " \
git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ \
git://sourceware.org/git/binutils-gdb.git https://downloads.yoctoproject.org/mirror/sources/ \"
PREMIRRORS:append = " ${SHALLOW_PREMIRRORS}"
which I think is a far better solution anyway since it is very hard to reset something in PREMIRRORS as one cannot use :remove. With this solution it is possible to set SHALLOW_PREMIRRORS = "" in case one do not want the mirrors OE-Core adds by default.
Otherwise you are effectively saying that one can no longer define a default for PREMIRRORS using ?=, which was possible up until the above change. And unless I can persuade you to switch to :append, then this needs to be mentioned in the migration notes for 4.0.
Quoted 1 line
We should change the default to "=" if that is causing an issue.
There is no longer any default in OE-Core (there used to be one in poky.conf defined using ??=, but you removed it the other day). However, due to that preexisting definition, we use PREMIRRORS ?= in our site.conf so that it takes precedence over the default from OE-Core (if it exists), while it still defines a default configuration.
Quoted 3 lines
Cheers,
Richard
//Peter
Quoted 61 lines · Peter Kjellerstedt
Quoted 58 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 31 mars 2022 16:16
To: Peter Kjellerstedt <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsQuoted 40 lines · Peter Kjellerstedt
Quoted 40 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 30 mars 2022 14:24
To: [email protected]
Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballsThese two repositories are large and overload our downloads server as a premirror but the recipes are easier to maintain as git urls. Compromise and use shallow clones for them.
In order to be effective, we need premirror entries on where to find the shallow mirror tarballs.
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/mirrors.bbclass | 11 +++++++++++1 file changed, 11 insertions(+)meta/classes/mirrors.bbclass +0
-0@@ -76,3 +76,14 @@ git://git.gnome.org/.* git://gitlab.gnome.org/GNOME/PATH;protocol=https \ git://.*/.* git://HOST/PATH;protocol=https \ git://.*/.* git://HOST/git/PATH;protocol=https \"
meta/classes/mirrors.bbclass +2
-0+ +# Switch glibc and binutils recipes to use shallow clones as they'relarge and this
+# improves user experience whilst allowing the flexibility of git urls in the recipesmeta/classes/mirrors.bbclass +3
-0+BB_GIT_SHALLOW:pn-binutils = "1" +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1" +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ="1"
meta/classes/mirrors.bbclass +2
-0+BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1" +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"Quoted 8 lines
Quoted 5 lines
meta/classes/mirrors.bbclass +2
-0+BB_GIT_SHALLOW:pn-glibc = "1" +PREMIRRORS += "git://sourceware.org/git/glibc.githttps://downloads.yoctoproject.org/mirror/sources/ \
+git://sourceware.org/git/binutils-gdb.git
https://downloads.yoctoproject.org/mirror/sources/"Please use PREMIRRORS:append here, or you will wipe away any default configuration of PREMIRRORS defined using "?=".
Quoted 2 lines
No, I'm not using append here since I do want users to be able to reset this.
Quoted 7 lines
That can easily be achieved by instead doing something like:
SHALLOW_PREMIRRORS= " \
git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ \
git://sourceware.org/git/binutils-gdb.git https://downloads.yoctoproject.org/mirror/sources/ \
"
PREMIRRORS:append = " ${SHALLOW_PREMIRRORS}"
This implies that any variable alteration should always use indirection via another variable. I am not going to support moves in that direction as it is horrible. If our syntax is causing issues we need to resolve that but I'm not going to compound it with moves like the above, sorry.
I'd also note this matches how MIRRORS is being handled.
Quoted 9 lines
which I think is a far better solution anyway since it is very hard to reset something in PREMIRRORS as one cannot use :remove. With this solution it is possible to set
SHALLOW_PREMIRRORS= "" in case one do not want the mirrors OE-Core adds by default.Otherwise you are effectively saying that one can no longer define a default for PREMIRRORS using ?=, which was possible up until the above change. And unless I can persuade you to switch to :append, then this needs to be mentioned in the migration notes for 4.0.
Lets release note it then.
Cheers,
Richard