All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core] [dunfell][PATCH] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
       [not found] <16236F46F8876220.6175@lists.openembedded.org>
@ 2020-08-03  7:43 ` Ahmad Fatoum
  2020-08-03 14:32   ` Steve Sakoman
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2020-08-03  7:43 UTC (permalink / raw)
  To: openembedded-core, akuster808

Hello,

On 7/20/20 12:30 PM, Ahmad Fatoum wrote:
> Since 010202076760 ("meson.bbclass: avoid unexpected operating-system
> names"), meson is no longer used with a cross file that appends the used
> libc to the operating system name, e.g. linux-gnueabi.
> 
> Prior to that commit, the host_system == 'linux' checks in glib's meson
> failed, which led to glib being compiled without libmount, mkostemp and
> selinux even if explicitly requested.
> 
> As the aforementioned commit affects all recipes built by glib, it might
> not be a candidate for backporting to current stable branches. To fix
> just the glib issue, instances of host_system == 'linux' are patched
> locally.
> 
> The patch is marked as Upstream-Status: Inappropriate as it is rendered
> unnecessary for OE releases newer than Dunfell.

Gentle Ping.

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++
>  meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb |  1 +
>  2 files changed, 50 insertions(+)
>  create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> 
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> new file mode 100644
> index 000000000000..616bbd8a7d7c
> --- /dev/null
> +++ b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> @@ -0,0 +1,49 @@
> +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Thu, 9 Jul 2020 13:00:16 +0200
> +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system
> +
> +OE build system can set this to other values that include 'linux',
> +e.g. 'linux-gnueabi'. This led to glib always being built without
> +libmount, mkostemp and selinux support.
> +
> +Upstream-Status: Inappropriate [other]
> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +---
> + meson.build | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 3a47a7cc4b98..af09dfc853e5 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -632,7 +632,7 @@ else
> + endif
> + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use)
> + 
> +-if host_system == 'linux'
> ++if host_system.contains('linux')
> +   if cc.has_function('mkostemp',
> +                      prefix: '''#define _GNU_SOURCE
> +                                 #include <stdlib.h>''')
> +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
> + # libmount is only used by gio, but we need to fetch the libs to generate the
> + # pkg-config file below
> + libmount_dep = []
> +-if host_system == 'linux' and get_option('libmount')
> ++if host_system.contains('linux') and get_option('libmount')
> +   libmount_dep = [dependency('mount', version : '>=2.23', required : true)]
> +   glib_conf.set('HAVE_LIBMOUNT', 1)
> + endif
> +@@ -1867,7 +1867,7 @@ if host_system == 'windows'
> + endif
> + 
> + selinux_dep = []
> +-if host_system == 'linux'
> ++if host_system.contains('linux')
> +   selinux_dep = dependency('libselinux', required: get_option('selinux'))
> + 
> +   glib_conf.set('HAVE_SELINUX', selinux_dep.found())
> +-- 
> +2.27.0
> +
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> index d496235003d4..fd7f5ee920d8 100644
> --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> @@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
>             file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \
>             file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \
>             file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \
> +           file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \
>             "
>  
>  SRC_URI_append_class-native = " file://relocate-modules.patch"
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [OE-core] [dunfell][PATCH] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
  2020-08-03  7:43 ` [OE-core] [dunfell][PATCH] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in Ahmad Fatoum
@ 2020-08-03 14:32   ` Steve Sakoman
  2020-08-20 13:20     ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Sakoman @ 2020-08-03 14:32 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: Patches and discussions about the oe-core layer, akuster

On Sun, Aug 2, 2020 at 9:43 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> Hello,
>
> On 7/20/20 12:30 PM, Ahmad Fatoum wrote:
> > Since 010202076760 ("meson.bbclass: avoid unexpected operating-system
> > names"), meson is no longer used with a cross file that appends the used
> > libc to the operating system name, e.g. linux-gnueabi.
> >
> > Prior to that commit, the host_system == 'linux' checks in glib's meson
> > failed, which led to glib being compiled without libmount, mkostemp and
> > selinux even if explicitly requested.
> >
> > As the aforementioned commit affects all recipes built by glib, it might
> > not be a candidate for backporting to current stable branches. To fix
> > just the glib issue, instances of host_system == 'linux' are patched
> > locally.
> >
> > The patch is marked as Upstream-Status: Inappropriate as it is rendered
> > unnecessary for OE releases newer than Dunfell.
>
> Gentle Ping.

I didn't take this patch since it no longer seems to be needed in dunfell.

Please see:  https://lists.openembedded.org/g/openembedded-core/message/141008

If we are mistaken, please let us know!

Steve

> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > ---
> >  ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++
> >  meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb |  1 +
> >  2 files changed, 50 insertions(+)
> >  create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> >
> > diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> > new file mode 100644
> > index 000000000000..616bbd8a7d7c
> > --- /dev/null
> > +++ b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
> > @@ -0,0 +1,49 @@
> > +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001
> > +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > +Date: Thu, 9 Jul 2020 13:00:16 +0200
> > +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system
> > +
> > +OE build system can set this to other values that include 'linux',
> > +e.g. 'linux-gnueabi'. This led to glib always being built without
> > +libmount, mkostemp and selinux support.
> > +
> > +Upstream-Status: Inappropriate [other]
> > +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > +---
> > + meson.build | 6 +++---
> > + 1 file changed, 3 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/meson.build b/meson.build
> > +index 3a47a7cc4b98..af09dfc853e5 100644
> > +--- a/meson.build
> > ++++ b/meson.build
> > +@@ -632,7 +632,7 @@ else
> > + endif
> > + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use)
> > +
> > +-if host_system == 'linux'
> > ++if host_system.contains('linux')
> > +   if cc.has_function('mkostemp',
> > +                      prefix: '''#define _GNU_SOURCE
> > +                                 #include <stdlib.h>''')
> > +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
> > + # libmount is only used by gio, but we need to fetch the libs to generate the
> > + # pkg-config file below
> > + libmount_dep = []
> > +-if host_system == 'linux' and get_option('libmount')
> > ++if host_system.contains('linux') and get_option('libmount')
> > +   libmount_dep = [dependency('mount', version : '>=2.23', required : true)]
> > +   glib_conf.set('HAVE_LIBMOUNT', 1)
> > + endif
> > +@@ -1867,7 +1867,7 @@ if host_system == 'windows'
> > + endif
> > +
> > + selinux_dep = []
> > +-if host_system == 'linux'
> > ++if host_system.contains('linux')
> > +   selinux_dep = dependency('libselinux', required: get_option('selinux'))
> > +
> > +   glib_conf.set('HAVE_SELINUX', selinux_dep.found())
> > +--
> > +2.27.0
> > +
> > diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> > index d496235003d4..fd7f5ee920d8 100644
> > --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> > +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
> > @@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
> >             file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \
> >             file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \
> >             file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \
> > +           file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \
> >             "
> >
> >  SRC_URI_append_class-native = " file://relocate-modules.patch"
> >
> >
> >
> >
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 

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

* Re: [OE-core] [dunfell][PATCH] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
  2020-08-03 14:32   ` Steve Sakoman
@ 2020-08-20 13:20     ` Ahmad Fatoum
  0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2020-08-20 13:20 UTC (permalink / raw)
  To: Steve Sakoman; +Cc: Patches and discussions about the oe-core layer, akuster

Hello,

On 8/3/20 4:32 PM, Steve Sakoman wrote:
> On Sun, Aug 2, 2020 at 9:43 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>>
>> Hello,
>>
>> On 7/20/20 12:30 PM, Ahmad Fatoum wrote:
>>> Since 010202076760 ("meson.bbclass: avoid unexpected operating-system
>>> names"), meson is no longer used with a cross file that appends the used
>>> libc to the operating system name, e.g. linux-gnueabi.
>>>
>>> Prior to that commit, the host_system == 'linux' checks in glib's meson
>>> failed, which led to glib being compiled without libmount, mkostemp and
>>> selinux even if explicitly requested.
>>>
>>> As the aforementioned commit affects all recipes built by glib, it might
>>> not be a candidate for backporting to current stable branches. To fix
>>> just the glib issue, instances of host_system == 'linux' are patched
>>> locally.
>>>
>>> The patch is marked as Upstream-Status: Inappropriate as it is rendered
>>> unnecessary for OE releases newer than Dunfell.
>>
>> Gentle Ping.
> 
> I didn't take this patch since it no longer seems to be needed in dunfell.
> 
> Please see:  https://lists.openembedded.org/g/openembedded-core/message/141008
> 
> If we are mistaken, please let us know!

I didn't notice this (and the same patch rebased on zeus) were already
looked at. Everything fine then. Thanks!

Cheers
Ahmad

> 
> Steve
> 
>>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> ---
>>>  ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++
>>>  meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb |  1 +
>>>  2 files changed, 50 insertions(+)
>>>  create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
>>>
>>> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
>>> new file mode 100644
>>> index 000000000000..616bbd8a7d7c
>>> --- /dev/null
>>> +++ b/meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
>>> @@ -0,0 +1,49 @@
>>> +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001
>>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> +Date: Thu, 9 Jul 2020 13:00:16 +0200
>>> +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system
>>> +
>>> +OE build system can set this to other values that include 'linux',
>>> +e.g. 'linux-gnueabi'. This led to glib always being built without
>>> +libmount, mkostemp and selinux support.
>>> +
>>> +Upstream-Status: Inappropriate [other]
>>> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> +---
>>> + meson.build | 6 +++---
>>> + 1 file changed, 3 insertions(+), 3 deletions(-)
>>> +
>>> +diff --git a/meson.build b/meson.build
>>> +index 3a47a7cc4b98..af09dfc853e5 100644
>>> +--- a/meson.build
>>> ++++ b/meson.build
>>> +@@ -632,7 +632,7 @@ else
>>> + endif
>>> + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use)
>>> +
>>> +-if host_system == 'linux'
>>> ++if host_system.contains('linux')
>>> +   if cc.has_function('mkostemp',
>>> +                      prefix: '''#define _GNU_SOURCE
>>> +                                 #include <stdlib.h>''')
>>> +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
>>> + # libmount is only used by gio, but we need to fetch the libs to generate the
>>> + # pkg-config file below
>>> + libmount_dep = []
>>> +-if host_system == 'linux' and get_option('libmount')
>>> ++if host_system.contains('linux') and get_option('libmount')
>>> +   libmount_dep = [dependency('mount', version : '>=2.23', required : true)]
>>> +   glib_conf.set('HAVE_LIBMOUNT', 1)
>>> + endif
>>> +@@ -1867,7 +1867,7 @@ if host_system == 'windows'
>>> + endif
>>> +
>>> + selinux_dep = []
>>> +-if host_system == 'linux'
>>> ++if host_system.contains('linux')
>>> +   selinux_dep = dependency('libselinux', required: get_option('selinux'))
>>> +
>>> +   glib_conf.set('HAVE_SELINUX', selinux_dep.found())
>>> +--
>>> +2.27.0
>>> +
>>> diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
>>> index d496235003d4..fd7f5ee920d8 100644
>>> --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
>>> +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
>>> @@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
>>>             file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \
>>>             file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \
>>>             file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \
>>> +           file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \
>>>             "
>>>
>>>  SRC_URI_append_class-native = " file://relocate-modules.patch"
>>>
>>>
>>>
>>>
>>
>> --
>> Pengutronix e.K.                           |                             |
>> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
>> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

end of thread, other threads:[~2020-08-20 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <16236F46F8876220.6175@lists.openembedded.org>
2020-08-03  7:43 ` [OE-core] [dunfell][PATCH] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in Ahmad Fatoum
2020-08-03 14:32   ` Steve Sakoman
2020-08-20 13:20     ` Ahmad Fatoum

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.