* [Buildroot] [PATCH 1/2] modem-manager: fix build with musl
@ 2018-06-15 4:02 Baruch Siach
2018-06-15 4:02 ` [Buildroot] [PATCH 2/2] modem-manager: update package prompt name Baruch Siach
2018-06-15 19:35 ` [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Baruch Siach @ 2018-06-15 4:02 UTC (permalink / raw)
To: buildroot
modem-manager version 1.8.0 introduced use of canonicalize_file_name(),
which is a GNU extension that musl does not implement. Add a patch
switching to POSIX standard realpath().
Fixes:
http://autobuild.buildroot.net/results/9f6/9f6859f1854d94d3caba7b5c24d9ca6a14622042/
Cc: Aleksander Morgado <aleksander@aleksander.es>
Cc: Carlos Santos <casantos@datacom.com.br>
Cc: Petr Vorel <petr.vorel@gmail.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
...erneldevice-fix-build-with-musl-libc.patch | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch
diff --git a/package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch b/package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch
new file mode 100644
index 000000000000..68181cb5ed19
--- /dev/null
+++ b/package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch
@@ -0,0 +1,67 @@
+From ed40ac76b125b1c3b2e2f8522d283b073c23bd3b Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Fri, 15 Jun 2018 06:25:46 +0300
+Subject: [PATCH] kerneldevice: fix build with musl libc
+
+musl libc does not implement the canonicalize_file_name() GNU extension.
+Use the POSIX standard realpath() instead.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: sent to modemmanager-devel at lists.freedesktop.org
+
+ src/kerneldevice/mm-kernel-device-generic.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/kerneldevice/mm-kernel-device-generic.c b/src/kerneldevice/mm-kernel-device-generic.c
+index 6b0f072402ff..885bef171f5d 100644
+--- a/src/kerneldevice/mm-kernel-device-generic.c
++++ b/src/kerneldevice/mm-kernel-device-generic.c
+@@ -120,7 +120,7 @@ preload_sysfs_path (MMKernelDeviceGeneric *self)
+ mm_kernel_event_properties_get_subsystem (self->priv->properties),
+ mm_kernel_event_properties_get_name (self->priv->properties));
+
+- self->priv->sysfs_path = canonicalize_file_name (tmp);
++ self->priv->sysfs_path = realpath (tmp, NULL);
+ if (!self->priv->sysfs_path || !g_file_test (self->priv->sysfs_path, G_FILE_TEST_EXISTS)) {
+ mm_warn ("Invalid sysfs path read for %s/%s",
+ mm_kernel_event_properties_get_subsystem (self->priv->properties),
+@@ -163,7 +163,7 @@ preload_interface_sysfs_path (MMKernelDeviceGeneric *self)
+ * The correct parent dir we want to have is the first one with "usb" subsystem.
+ */
+ aux = g_strdup_printf ("%s/device", self->priv->sysfs_path);
+- dirpath = canonicalize_file_name (aux);
++ dirpath = realpath (aux, NULL);
+ g_free (aux);
+
+ while (dirpath) {
+@@ -179,7 +179,7 @@ preload_interface_sysfs_path (MMKernelDeviceGeneric *self)
+ gchar *canonicalized_subsystem;
+ gchar *subsystem_name;
+
+- canonicalized_subsystem = canonicalize_file_name (subsystem_filepath);
++ canonicalized_subsystem = realpath (subsystem_filepath, NULL);
+ g_free (subsystem_filepath);
+
+ subsystem_name = g_path_get_basename (canonicalized_subsystem);
+@@ -239,7 +239,7 @@ preload_driver (MMKernelDeviceGeneric *self)
+ gchar *tmp2;
+
+ tmp = g_strdup_printf ("%s/driver", self->priv->interface_sysfs_path);
+- tmp2 = canonicalize_file_name (tmp);
++ tmp2 = realpath (tmp, NULL);
+ if (tmp2 && g_file_test (tmp2, G_FILE_TEST_EXISTS))
+ self->priv->driver = g_path_get_basename (tmp2);
+ g_free (tmp2);
+@@ -308,7 +308,7 @@ preload_physdev_subsystem (MMKernelDeviceGeneric *self)
+ gchar *subsyspath;
+
+ aux = g_strdup_printf ("%s/subsystem", self->priv->physdev_sysfs_path);
+- subsyspath = canonicalize_file_name (aux);
++ subsyspath = realpath (aux, NULL);
+ self->priv->physdev_subsystem = g_path_get_dirname (subsyspath);
+ g_free (subsyspath);
+ g_free (aux);
+--
+2.17.1
+
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] modem-manager: update package prompt name
2018-06-15 4:02 [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Baruch Siach
@ 2018-06-15 4:02 ` Baruch Siach
2018-06-15 7:06 ` Yegor Yefremov
2018-06-15 19:15 ` Petr Vorel
2018-06-15 19:35 ` [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Thomas Petazzoni
1 sibling, 2 replies; 6+ messages in thread
From: Baruch Siach @ 2018-06-15 4:02 UTC (permalink / raw)
To: buildroot
Rename the prompt string for consistency with the package directory
name.
Cc: Aleksander Morgado <aleksander@aleksander.es>
Cc: Carlos Santos <casantos@datacom.com.br>
Cc: Petr Vorel <petr.vorel@gmail.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/modem-manager/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in
index 226f82f4f631..c4c723776d06 100644
--- a/package/modem-manager/Config.in
+++ b/package/modem-manager/Config.in
@@ -1,5 +1,5 @@
config BR2_PACKAGE_MODEM_MANAGER
- bool "modemmanager"
+ bool "modem-manager"
depends on BR2_USE_WCHAR # libglib2 and gnutls
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
depends on BR2_USE_MMU # dbus
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] modem-manager: update package prompt name
2018-06-15 4:02 ` [Buildroot] [PATCH 2/2] modem-manager: update package prompt name Baruch Siach
@ 2018-06-15 7:06 ` Yegor Yefremov
2018-06-15 19:15 ` Petr Vorel
1 sibling, 0 replies; 6+ messages in thread
From: Yegor Yefremov @ 2018-06-15 7:06 UTC (permalink / raw)
To: buildroot
On Fri, Jun 15, 2018 at 6:02 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> Rename the prompt string for consistency with the package directory
> name.
>
> Cc: Aleksander Morgado <aleksander@aleksander.es>
> Cc: Carlos Santos <casantos@datacom.com.br>
> Cc: Petr Vorel <petr.vorel@gmail.com>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> package/modem-manager/Config.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in
> index 226f82f4f631..c4c723776d06 100644
> --- a/package/modem-manager/Config.in
> +++ b/package/modem-manager/Config.in
> @@ -1,5 +1,5 @@
> config BR2_PACKAGE_MODEM_MANAGER
> - bool "modemmanager"
> + bool "modem-manager"
> depends on BR2_USE_WCHAR # libglib2 and gnutls
> depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
> depends on BR2_USE_MMU # dbus
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] modem-manager: update package prompt name
2018-06-15 4:02 ` [Buildroot] [PATCH 2/2] modem-manager: update package prompt name Baruch Siach
2018-06-15 7:06 ` Yegor Yefremov
@ 2018-06-15 19:15 ` Petr Vorel
1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2018-06-15 19:15 UTC (permalink / raw)
To: buildroot
Hi Baruch,
> Rename the prompt string for consistency with the package directory
> name.
> Cc: Aleksander Morgado <aleksander@aleksander.es>
> Cc: Carlos Santos <casantos@datacom.com.br>
> Cc: Petr Vorel <petr.vorel@gmail.com>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Petr Vorel <petr.vorel@gmail.com>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] modem-manager: fix build with musl
2018-06-15 4:02 [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Baruch Siach
2018-06-15 4:02 ` [Buildroot] [PATCH 2/2] modem-manager: update package prompt name Baruch Siach
@ 2018-06-15 19:35 ` Thomas Petazzoni
2018-06-15 19:46 ` Petr Vorel
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-06-15 19:35 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 15 Jun 2018 07:02:13 +0300, Baruch Siach wrote:
> modem-manager version 1.8.0 introduced use of canonicalize_file_name(),
> which is a GNU extension that musl does not implement. Add a patch
> switching to POSIX standard realpath().
>
> Fixes:
> http://autobuild.buildroot.net/results/9f6/9f6859f1854d94d3caba7b5c24d9ca6a14622042/
>
> Cc: Aleksander Morgado <aleksander@aleksander.es>
> Cc: Carlos Santos <casantos@datacom.com.br>
> Cc: Petr Vorel <petr.vorel@gmail.com>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> ...erneldevice-fix-build-with-musl-libc.patch | 67 +++++++++++++++++++
> 1 file changed, 67 insertions(+)
> create mode 100644 package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch
Both applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] modem-manager: fix build with musl
2018-06-15 19:35 ` [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Thomas Petazzoni
@ 2018-06-15 19:46 ` Petr Vorel
0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2018-06-15 19:46 UTC (permalink / raw)
To: buildroot
Hi Baruch,
> Hello,
> On Fri, 15 Jun 2018 07:02:13 +0300, Baruch Siach wrote:
> > modem-manager version 1.8.0 introduced use of canonicalize_file_name(),
> > which is a GNU extension that musl does not implement. Add a patch
> > switching to POSIX standard realpath().
> > Fixes:
> > http://autobuild.buildroot.net/results/9f6/9f6859f1854d94d3caba7b5c24d9ca6a14622042/
> > Cc: Aleksander Morgado <aleksander@aleksander.es>
> > Cc: Carlos Santos <casantos@datacom.com.br>
> > Cc: Petr Vorel <petr.vorel@gmail.com>
> > Cc: Yegor Yefremov <yegorslists@googlemail.com>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > ...erneldevice-fix-build-with-musl-libc.patch | 67 +++++++++++++++++++
> > 1 file changed, 67 insertions(+)
> > create mode 100644 package/modem-manager/0001-kerneldevice-fix-build-with-musl-libc.patch
> Both applied. Thanks!
Thanks for fixing!
> Thomas
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-15 19:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 4:02 [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Baruch Siach
2018-06-15 4:02 ` [Buildroot] [PATCH 2/2] modem-manager: update package prompt name Baruch Siach
2018-06-15 7:06 ` Yegor Yefremov
2018-06-15 19:15 ` Petr Vorel
2018-06-15 19:35 ` [Buildroot] [PATCH 1/2] modem-manager: fix build with musl Thomas Petazzoni
2018-06-15 19:46 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox