All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sanity: skip make 4.2.1 warning for debian
@ 2022-04-26 19:46 Nicolas Dechesne
  2022-04-26 20:50 ` [OE-core] " Andre McCurdy
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Dechesne @ 2022-04-26 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne

This is a follow up patch of:
ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)

Debian10 has the exact same version/sources for make as Ubuntu
(focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
https://packages.ubuntu.com/source/focal/make-dfsg.

As per the corresponding changelog, the patch mentioned in
ad5829aa1f8a, is included in both Debian and Ubuntu in make
4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index c385d92e8b..c72a7b3ed3 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -470,7 +470,7 @@ def check_make_version(sanity_data):
 
     if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
         distro = oe.lsb.distro_identifier()
-        if "ubuntu" in distro:
+        if "ubuntu" in distro or "debian" in distro:
             return None
         return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
     return None
-- 
2.36.0



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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-26 19:46 [PATCH] sanity: skip make 4.2.1 warning for debian Nicolas Dechesne
@ 2022-04-26 20:50 ` Andre McCurdy
  2022-04-26 20:56   ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Andre McCurdy @ 2022-04-26 20:50 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: OE Core mailing list

On Tue, Apr 26, 2022 at 12:46 PM Nicolas Dechesne
<nicolas.dechesne@linaro.org> wrote:
>
> This is a follow up patch of:
> ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)
>
> Debian10 has the exact same version/sources for make as Ubuntu
> (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
> https://packages.ubuntu.com/source/focal/make-dfsg.
>
> As per the corresponding changelog, the patch mentioned in
> ad5829aa1f8a, is included in both Debian and Ubuntu in make
> 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.
>
> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> ---
>  meta/classes/sanity.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index c385d92e8b..c72a7b3ed3 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -470,7 +470,7 @@ def check_make_version(sanity_data):
>
>      if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
>          distro = oe.lsb.distro_identifier()

Not directly related to your change, but shouldn't this be
lsb_distro_identifier() instead of oe.lsb.distro_identifier()?

> -        if "ubuntu" in distro:
> +        if "ubuntu" in distro or "debian" in distro:
>              return None
>          return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
>      return None
> --
> 2.36.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#164881): https://lists.openembedded.org/g/openembedded-core/message/164881
> Mute This Topic: https://lists.openembedded.org/mt/90716488/3619030
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [armccurdy@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-26 20:50 ` [OE-core] " Andre McCurdy
@ 2022-04-26 20:56   ` Khem Raj
  2022-04-26 21:39     ` Andre McCurdy
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2022-04-26 20:56 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Nicolas Dechesne, OE Core mailing list

On Tue, Apr 26, 2022 at 1:51 PM Andre McCurdy <armccurdy@gmail.com> wrote:
>
> On Tue, Apr 26, 2022 at 12:46 PM Nicolas Dechesne
> <nicolas.dechesne@linaro.org> wrote:
> >
> > This is a follow up patch of:
> > ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)
> >
> > Debian10 has the exact same version/sources for make as Ubuntu
> > (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
> > https://packages.ubuntu.com/source/focal/make-dfsg.
> >
> > As per the corresponding changelog, the patch mentioned in
> > ad5829aa1f8a, is included in both Debian and Ubuntu in make
> > 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.
> >
> > Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> > ---
> >  meta/classes/sanity.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> > index c385d92e8b..c72a7b3ed3 100644
> > --- a/meta/classes/sanity.bbclass
> > +++ b/meta/classes/sanity.bbclass
> > @@ -470,7 +470,7 @@ def check_make_version(sanity_data):
> >
> >      if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
> >          distro = oe.lsb.distro_identifier()
>
> Not directly related to your change, but shouldn't this be
> lsb_distro_identifier() instead of oe.lsb.distro_identifier()?
>

lsb_distro_identifier would work when it is inheriting base.bbclass
otherwise the utility function is needed.

> > -        if "ubuntu" in distro:
> > +        if "ubuntu" in distro or "debian" in distro:
> >              return None
> >          return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
> >      return None
> > --
> > 2.36.0
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#164883): https://lists.openembedded.org/g/openembedded-core/message/164883
> Mute This Topic: https://lists.openembedded.org/mt/90716488/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-26 20:56   ` Khem Raj
@ 2022-04-26 21:39     ` Andre McCurdy
  2022-04-27 10:40       ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Andre McCurdy @ 2022-04-26 21:39 UTC (permalink / raw)
  To: Khem Raj; +Cc: Nicolas Dechesne, OE Core mailing list

On Tue, Apr 26, 2022 at 1:56 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Tue, Apr 26, 2022 at 1:51 PM Andre McCurdy <armccurdy@gmail.com> wrote:
> >
> > On Tue, Apr 26, 2022 at 12:46 PM Nicolas Dechesne
> > <nicolas.dechesne@linaro.org> wrote:
> > >
> > > This is a follow up patch of:
> > > ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)
> > >
> > > Debian10 has the exact same version/sources for make as Ubuntu
> > > (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
> > > https://packages.ubuntu.com/source/focal/make-dfsg.
> > >
> > > As per the corresponding changelog, the patch mentioned in
> > > ad5829aa1f8a, is included in both Debian and Ubuntu in make
> > > 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.
> > >
> > > Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> > > ---
> > >  meta/classes/sanity.bbclass | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> > > index c385d92e8b..c72a7b3ed3 100644
> > > --- a/meta/classes/sanity.bbclass
> > > +++ b/meta/classes/sanity.bbclass
> > > @@ -470,7 +470,7 @@ def check_make_version(sanity_data):
> > >
> > >      if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
> > >          distro = oe.lsb.distro_identifier()
> >
> > Not directly related to your change, but shouldn't this be
> > lsb_distro_identifier() instead of oe.lsb.distro_identifier()?
>
> lsb_distro_identifier would work when it is inheriting base.bbclass
> otherwise the utility function is needed.

Question isn't really whether it will work or not (if it doesn't work,
we should make it work) but rather whether any user-defined
LSB_DISTRO_ADJUST should be applied before checking if the host distro
is based on Debian/Ubuntu or not.

> > > -        if "ubuntu" in distro:
> > > +        if "ubuntu" in distro or "debian" in distro:
> > >              return None
> > >          return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
> > >      return None
> > > --
> > > 2.36.0
> > >
> > >
> > >
> > >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#164883): https://lists.openembedded.org/g/openembedded-core/message/164883
> > Mute This Topic: https://lists.openembedded.org/mt/90716488/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-26 21:39     ` Andre McCurdy
@ 2022-04-27 10:40       ` Richard Purdie
  2022-04-27 13:22         ` Mike Crowe
  2022-04-27 16:54         ` Andre McCurdy
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Purdie @ 2022-04-27 10:40 UTC (permalink / raw)
  To: Andre McCurdy, Khem Raj
  Cc: Nicolas Dechesne, OE Core mailing list, chris_larson

On Tue, 2022-04-26 at 14:39 -0700, Andre McCurdy wrote:
> On Tue, Apr 26, 2022 at 1:56 PM Khem Raj <raj.khem@gmail.com> wrote:
> > 
> > On Tue, Apr 26, 2022 at 1:51 PM Andre McCurdy <armccurdy@gmail.com> wrote:
> > > 
> > > On Tue, Apr 26, 2022 at 12:46 PM Nicolas Dechesne
> > > <nicolas.dechesne@linaro.org> wrote:
> > > > 
> > > > This is a follow up patch of:
> > > > ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)
> > > > 
> > > > Debian10 has the exact same version/sources for make as Ubuntu
> > > > (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
> > > > https://packages.ubuntu.com/source/focal/make-dfsg.
> > > > 
> > > > As per the corresponding changelog, the patch mentioned in
> > > > ad5829aa1f8a, is included in both Debian and Ubuntu in make
> > > > 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.
> > > > 
> > > > Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> > > > ---
> > > >  meta/classes/sanity.bbclass | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> > > > index c385d92e8b..c72a7b3ed3 100644
> > > > --- a/meta/classes/sanity.bbclass
> > > > +++ b/meta/classes/sanity.bbclass
> > > > @@ -470,7 +470,7 @@ def check_make_version(sanity_data):
> > > > 
> > > >      if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
> > > >          distro = oe.lsb.distro_identifier()
> > > 
> > > Not directly related to your change, but shouldn't this be
> > > lsb_distro_identifier() instead of oe.lsb.distro_identifier()?
> > 
> > lsb_distro_identifier would work when it is inheriting base.bbclass
> > otherwise the utility function is needed.
> 
> Question isn't really whether it will work or not (if it doesn't work,
> we should make it work) but rather whether any user-defined
> LSB_DISTRO_ADJUST should be applied before checking if the host distro
> is based on Debian/Ubuntu or not.

It would help to be a little more specific with the background. Having looked at
the code, we have two lsb functions, one in base.bbclass and one in
oe/lib/lsb.py. The one in base.bbclass is a wrapper which uses
LSB_DISTRO_ADJUST.

As far as I know, we don't use LSB_DISTRO_ADJUST in core at all. I suspect it
should really probably be added to the lsb.py function in most cases. Is there
any documentation or other info about when it should be applied and when it
should not?

I did have a look at
https://git.yoctoproject.org/poky/commit/meta/classes/base.bbclass?id=096306ecd1bb80fe5e732584caca0172305628a2
where it was introduced 10 years ago but there isn't much more info. 
Chris: Do we still need/use this?

As ever, patches are welcome both to improve this and perhaps to better document
it too but if I remember rightly your policy is not to send them :/.

Cheers,

Richard








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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-27 10:40       ` Richard Purdie
@ 2022-04-27 13:22         ` Mike Crowe
  2022-04-27 16:54         ` Andre McCurdy
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Crowe @ 2022-04-27 13:22 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Andre McCurdy, Khem Raj, Nicolas Dechesne, OE Core mailing list,
	chris_larson

On Wednesday 27 April 2022 at 11:40:49 +0100, Richard Purdie wrote:
> As far as I know, we don't use LSB_DISTRO_ADJUST in core at all. I suspect it
> should really probably be added to the lsb.py function in most cases. Is there
> any documentation or other info about when it should be applied and when it
> should not?

We used to use LSB_DISTRO_ADJUST to stop Debian minor release upgrades
causing sstate paths to change up until about five years ago when we
upgraded to an oe-core version that only considered the major version to be
important.

> I did have a look at
> https://git.yoctoproject.org/poky/commit/meta/classes/base.bbclass?id=096306ecd1bb80fe5e732584caca0172305628a2
> where it was introduced 10 years ago but there isn't much more info. 

I believe that we use the mapping in SSTATE_MIRRORS to do the equivalent of
what is described in that commit message:

  SSTATE_MIRRORS ?= "\
  file://debian ${OUR_SSTATE_DIR}/debian-10 \n \
  file://debian-11 ${OUR_SSTATE_DIR}/debian-10 \n \
  file://debian-10 ${OUR_SSTATE_DIR}/debian-10 \n \
  \
  file://debian-9 ${OUR_SSTATE_DIR}/debian-9 \n \
  file://.* ${OUR_SSTATE_DIR}/PATH \n \
  "

(Our autobuilders are running Debian 10 at the moment, so anyone running
Debian 11 can make use of sstate files they wrote to debian-10, but anyone
running Debian 9 cannot.)

I have no idea whether this works for the Red Hat world though.

HTH.

Mike.

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

* Re: [OE-core] [PATCH] sanity: skip make 4.2.1 warning for debian
  2022-04-27 10:40       ` Richard Purdie
  2022-04-27 13:22         ` Mike Crowe
@ 2022-04-27 16:54         ` Andre McCurdy
  1 sibling, 0 replies; 7+ messages in thread
From: Andre McCurdy @ 2022-04-27 16:54 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Khem Raj, Nicolas Dechesne, OE Core mailing list, chris_larson

On Wed, Apr 27, 2022 at 3:40 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2022-04-26 at 14:39 -0700, Andre McCurdy wrote:
> > On Tue, Apr 26, 2022 at 1:56 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > On Tue, Apr 26, 2022 at 1:51 PM Andre McCurdy <armccurdy@gmail.com> wrote:
> > > >
> > > > On Tue, Apr 26, 2022 at 12:46 PM Nicolas Dechesne
> > > > <nicolas.dechesne@linaro.org> wrote:
> > > > >
> > > > > This is a follow up patch of:
> > > > > ad5829aa1f8a (sanity: Show a warning that make 4.2.1 is buggy on non-ubuntu systems)
> > > > >
> > > > > Debian10 has the exact same version/sources for make as Ubuntu
> > > > > (focal), e.g. https://packages.debian.org/source/buster/make-dfsg and
> > > > > https://packages.ubuntu.com/source/focal/make-dfsg.
> > > > >
> > > > > As per the corresponding changelog, the patch mentioned in
> > > > > ad5829aa1f8a, is included in both Debian and Ubuntu in make
> > > > > 4.2.1-1.1. So it's safe to use make 4.2.1 in Debian10.
> > > > >
> > > > > Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> > > > > ---
> > > > >  meta/classes/sanity.bbclass | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> > > > > index c385d92e8b..c72a7b3ed3 100644
> > > > > --- a/meta/classes/sanity.bbclass
> > > > > +++ b/meta/classes/sanity.bbclass
> > > > > @@ -470,7 +470,7 @@ def check_make_version(sanity_data):
> > > > >
> > > > >      if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
> > > > >          distro = oe.lsb.distro_identifier()
> > > >
> > > > Not directly related to your change, but shouldn't this be
> > > > lsb_distro_identifier() instead of oe.lsb.distro_identifier()?
> > >
> > > lsb_distro_identifier would work when it is inheriting base.bbclass
> > > otherwise the utility function is needed.
> >
> > Question isn't really whether it will work or not (if it doesn't work,
> > we should make it work) but rather whether any user-defined
> > LSB_DISTRO_ADJUST should be applied before checking if the host distro
> > is based on Debian/Ubuntu or not.
>
> It would help to be a little more specific with the background. Having looked at
> the code, we have two lsb functions, one in base.bbclass and one in
> oe/lib/lsb.py. The one in base.bbclass is a wrapper which uses
> LSB_DISTRO_ADJUST.
>
> As far as I know, we don't use LSB_DISTRO_ADJUST in core at all. I suspect it
> should really probably be added to the lsb.py function in most cases. Is there
> any documentation or other info about when it should be applied and when it
> should not?

Adding LSB_DISTRO_ADJUST directly to lsb.py would be fine I think.
Personally I use LSB_DISTRO_ADJUST to map Linux Mint to Ubuntu. Linux
Mint is binary compatible with Ubuntu (created from Ubuntu package
feeds). The LSB_DISTRO_ADJUST mapping allows native sstate from a
build server running Ubuntu to be reused on a developer laptop running
Linux Mint.

  https://github.com/lgirdk/meta-mng/blob/ofw/conf/distro/include/mng-sstate.inc

If the make 4.2.1 sanity check were to include LSB_DISTRO_ADJUST then
(for me at least) it would suppress unnecessary warnings when running
on Linux Mint (ie with the Ubuntu version of make). But in general, if
we give users a method to adjust how their host distro is identified
then we should enable it consistently unless there's a clear reason
not to.


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

end of thread, other threads:[~2022-04-27 16:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 19:46 [PATCH] sanity: skip make 4.2.1 warning for debian Nicolas Dechesne
2022-04-26 20:50 ` [OE-core] " Andre McCurdy
2022-04-26 20:56   ` Khem Raj
2022-04-26 21:39     ` Andre McCurdy
2022-04-27 10:40       ` Richard Purdie
2022-04-27 13:22         ` Mike Crowe
2022-04-27 16:54         ` Andre McCurdy

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.