* [PATCH] sanity: Add warning for local hasheqiv server with remote sstate mirrors
@ 2022-03-23 14:24 Richard Purdie
2022-03-25 17:53 ` [OE-core] " Jose Quaresma
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-03-23 14:24 UTC (permalink / raw)
To: openembedded-core
We're seeing a lot of users configuring an sstate mirror but not realising that
the default hash equivalenve setting will make this ineffective. Add a warning
to highlight this to the user for the common case.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/sanity.bbclass | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 92807dc88e9..be956fbcd6c 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -914,6 +914,11 @@ def check_sanity_everybuild(status, d):
mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
check_symlink(mirror_base, d)
+ # Check sstate mirrors aren't being used with a local hash server and no remote
+ hashserv = d.getVar("BB_HASHSERVE")
+ if d.getVar("SSTATE_MIRRORS") and hashserv and hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
+ bb.warn("You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.")
+
# Check that TMPDIR hasn't changed location since the last time we were run
tmpdir = d.getVar('TMPDIR')
checkfile = os.path.join(tmpdir, "saved_tmpdir")
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] sanity: Add warning for local hasheqiv server with remote sstate mirrors
2022-03-23 14:24 [PATCH] sanity: Add warning for local hasheqiv server with remote sstate mirrors Richard Purdie
@ 2022-03-25 17:53 ` Jose Quaresma
2022-03-25 18:08 ` Steve Sakoman
0 siblings, 1 reply; 3+ messages in thread
From: Jose Quaresma @ 2022-03-25 17:53 UTC (permalink / raw)
To: Steve Sakoman; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2405 bytes --]
Hi Steve,
I see this patch on dunfell-nut but afaik dunfell don't support upstream
hash equivalence server
https://git.yoctoproject.org/poky-contrib/commit/?h=stable/dunfell-nut&id=1d33ad9c8ea2388f51ff00ba3a3442f15f29e663
Jose
Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia quarta,
23/03/2022 à(s) 14:24:
> We're seeing a lot of users configuring an sstate mirror but not realising
> that
> the default hash equivalenve setting will make this ineffective. Add a
> warning
> to highlight this to the user for the common case.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> meta/classes/sanity.bbclass | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 92807dc88e9..be956fbcd6c 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -914,6 +914,11 @@ def check_sanity_everybuild(status, d):
> mirror_base =
> urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
> check_symlink(mirror_base, d)
>
> + # Check sstate mirrors aren't being used with a local hash server and
> no remote
> + hashserv = d.getVar("BB_HASHSERVE")
> + if d.getVar("SSTATE_MIRRORS") and hashserv and
> hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
> + bb.warn("You are using a local hash equivalence server but have
> configured an sstate mirror. This will likely mean no sstate will match
> from the mirror. You may wish to disable the hash equivalence use
> (BB_HASHSERVE), or use a hash equivalence server alongside the sstate
> mirror.")
> +
> # Check that TMPDIR hasn't changed location since the last time we
> were run
> tmpdir = d.getVar('TMPDIR')
> checkfile = os.path.join(tmpdir, "saved_tmpdir")
> --
> 2.32.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#163584):
> https://lists.openembedded.org/g/openembedded-core/message/163584
> Mute This Topic: https://lists.openembedded.org/mt/89976515/5052612
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> quaresma.jose@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Best regards,
José Quaresma
[-- Attachment #2: Type: text/html, Size: 3710 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] sanity: Add warning for local hasheqiv server with remote sstate mirrors
2022-03-25 17:53 ` [OE-core] " Jose Quaresma
@ 2022-03-25 18:08 ` Steve Sakoman
0 siblings, 0 replies; 3+ messages in thread
From: Steve Sakoman @ 2022-03-25 18:08 UTC (permalink / raw)
To: Jose Quaresma; +Cc: OE-core
On Fri, Mar 25, 2022 at 7:53 AM Jose Quaresma <quaresma.jose@gmail.com> wrote:
>
> Hi Steve,
>
> I see this patch on dunfell-nut but afaik dunfell don't support upstream hash equivalence server
> https://git.yoctoproject.org/poky-contrib/commit/?h=stable/dunfell-nut&id=1d33ad9c8ea2388f51ff00ba3a3442f15f29e663
Yes, a moment of temporary insanity :-)
If you look again you'll see it's gone. The stable/dunfell-nut branch
is not to be trusted, it gets changed and rebased multiple times per
day.
Once I send patches to the list for review, stable/dunfell-next can be
trusted a bit more, but even that occasionally gets rebased if there
is some last minute feedback before I send the pull request.
Steve
> Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia quarta, 23/03/2022 à(s) 14:24:
>>
>> We're seeing a lot of users configuring an sstate mirror but not realising that
>> the default hash equivalenve setting will make this ineffective. Add a warning
>> to highlight this to the user for the common case.
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>> meta/classes/sanity.bbclass | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
>> index 92807dc88e9..be956fbcd6c 100644
>> --- a/meta/classes/sanity.bbclass
>> +++ b/meta/classes/sanity.bbclass
>> @@ -914,6 +914,11 @@ def check_sanity_everybuild(status, d):
>> mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
>> check_symlink(mirror_base, d)
>>
>> + # Check sstate mirrors aren't being used with a local hash server and no remote
>> + hashserv = d.getVar("BB_HASHSERVE")
>> + if d.getVar("SSTATE_MIRRORS") and hashserv and hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
>> + bb.warn("You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.")
>> +
>> # Check that TMPDIR hasn't changed location since the last time we were run
>> tmpdir = d.getVar('TMPDIR')
>> checkfile = os.path.join(tmpdir, "saved_tmpdir")
>> --
>> 2.32.0
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#163584): https://lists.openembedded.org/g/openembedded-core/message/163584
>> Mute This Topic: https://lists.openembedded.org/mt/89976515/5052612
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [quaresma.jose@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
>
> --
> Best regards,
>
> José Quaresma
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-25 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 14:24 [PATCH] sanity: Add warning for local hasheqiv server with remote sstate mirrors Richard Purdie
2022-03-25 17:53 ` [OE-core] " Jose Quaresma
2022-03-25 18:08 ` Steve Sakoman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.