All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libmbim: fix build with musl libc
@ 2017-09-11  7:54 Aleksander Morgado
  2017-09-11  8:27 ` Baruch Siach
  2017-09-11  8:55 ` [Buildroot] [PATCH v2] " Aleksander Morgado
  0 siblings, 2 replies; 4+ messages in thread
From: Aleksander Morgado @ 2017-09-11  7:54 UTC (permalink / raw)
  To: buildroot

This is now failing because the libgudev dependency is optional and
the build will only use if it's found during the configure checks.

Imported the same patch that has been applied in the upstream libmbim
git repository:
  https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
---
 ...-prefer-realpath-to-canonicalize_file_nam.patch | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch

diff --git a/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
new file mode 100644
index 000000000..a13aee547
--- /dev/null
+++ b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
@@ -0,0 +1,36 @@
+From 48772b32f10523cca22b7d63c3523377279c7427 Mon Sep 17 00:00:00 2001
+From: Aleksander Morgado <aleksander@aleksander.es>
+Date: Mon, 11 Sep 2017 09:31:03 +0200
+Subject: [PATCH] mbim-device: prefer realpath() to canonicalize_file_name()
+
+Usually the canonicalize_file_name() GNU extension is preferred to the
+POSIX realpath(), as it covers some of the limitations the latter has.
+But this extension isn't available in lots of platforms or in other
+c library implementations (e.g. musl), so just default to the POSIX
+method to improve portability.
+
+Note that the check for canonicalize_file_name() availability during
+configure isn't as trivial as adding a new AC_CHECK_FUNCS(), and
+importing a gnulib module seems overkill just for this one liner.
+
+(cherry picked from commit 417b0b80023dc30d61c111ec0a54da2884d3a541)
+---
+ src/libmbim-glib/mbim-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
+index e1f32a6..20e64af 100644
+--- a/src/libmbim-glib/mbim-device.c
++++ b/src/libmbim-glib/mbim-device.c
+@@ -867,7 +867,7 @@ get_descriptors_filepath (MbimDevice *self)
+          *    /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:2.0
+          */
+         tmp = g_strdup_printf ("/sys/class/%s/%s/device", subsystems[i], device_basename);
+-        path = canonicalize_file_name (tmp);
++        path = realpath (tmp, NULL);
+         g_free (tmp);
+ 
+         if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+-- 
+2.13.1
+
-- 
2.13.1

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

* [Buildroot] [PATCH] libmbim: fix build with musl libc
  2017-09-11  7:54 [Buildroot] [PATCH] libmbim: fix build with musl libc Aleksander Morgado
@ 2017-09-11  8:27 ` Baruch Siach
  2017-09-11  8:55 ` [Buildroot] [PATCH v2] " Aleksander Morgado
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2017-09-11  8:27 UTC (permalink / raw)
  To: buildroot

Hi Aleksander,

On Mon, Sep 11, 2017 at 09:54:26AM +0200, Aleksander Morgado wrote:
> This is now failing because the libgudev dependency is optional and
> the build will only use if it's found during the configure checks.
> 
> Imported the same patch that has been applied in the upstream libmbim
> git repository:
>   https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541
> 
> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
> ---
>  ...-prefer-realpath-to-canonicalize_file_nam.patch | 36 ++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>  create mode 100644 package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
> 
> diff --git a/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
> new file mode 100644
> index 000000000..a13aee547
> --- /dev/null
> +++ b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
> @@ -0,0 +1,36 @@
> +From 48772b32f10523cca22b7d63c3523377279c7427 Mon Sep 17 00:00:00 2001
> +From: Aleksander Morgado <aleksander@aleksander.es>
> +Date: Mon, 11 Sep 2017 09:31:03 +0200
> +Subject: [PATCH] mbim-device: prefer realpath() to canonicalize_file_name()
> +
> +Usually the canonicalize_file_name() GNU extension is preferred to the
> +POSIX realpath(), as it covers some of the limitations the latter has.
> +But this extension isn't available in lots of platforms or in other
> +c library implementations (e.g. musl), so just default to the POSIX
> +method to improve portability.
> +
> +Note that the check for canonicalize_file_name() availability during
> +configure isn't as trivial as adding a new AC_CHECK_FUNCS(), and
> +importing a gnulib module seems overkill just for this one liner.
> +
> +(cherry picked from commit 417b0b80023dc30d61c111ec0a54da2884d3a541)

Please add your sign-off here.

baruch

> +---
> + src/libmbim-glib/mbim-device.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
> +index e1f32a6..20e64af 100644
> +--- a/src/libmbim-glib/mbim-device.c
> ++++ b/src/libmbim-glib/mbim-device.c
> +@@ -867,7 +867,7 @@ get_descriptors_filepath (MbimDevice *self)
> +          *    /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:2.0
> +          */
> +         tmp = g_strdup_printf ("/sys/class/%s/%s/device", subsystems[i], device_basename);
> +-        path = canonicalize_file_name (tmp);
> ++        path = realpath (tmp, NULL);
> +         g_free (tmp);
> + 
> +         if (g_file_test (path, G_FILE_TEST_EXISTS)) {

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH v2] libmbim: fix build with musl libc
  2017-09-11  7:54 [Buildroot] [PATCH] libmbim: fix build with musl libc Aleksander Morgado
  2017-09-11  8:27 ` Baruch Siach
@ 2017-09-11  8:55 ` Aleksander Morgado
  2017-09-23 20:25   ` Arnout Vandecappelle
  1 sibling, 1 reply; 4+ messages in thread
From: Aleksander Morgado @ 2017-09-11  8:55 UTC (permalink / raw)
  To: buildroot

This is now failing because the libgudev dependency is optional and
the build will only use if it's found during the configure checks.

Imported the same patch that has been applied in the upstream libmbim
git repository:
  https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
---

v2 with Signed-off-by in the patch itself.

---
 ...-prefer-realpath-to-canonicalize_file_nam.patch | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch

diff --git a/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
new file mode 100644
index 000000000..ff178dd61
--- /dev/null
+++ b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
@@ -0,0 +1,37 @@
+From 6b043b9b676e88a80e3d4013863c5e970fdde1df Mon Sep 17 00:00:00 2001
+From: Aleksander Morgado <aleksander@aleksander.es>
+Date: Mon, 11 Sep 2017 09:31:03 +0200
+Subject: [PATCH] mbim-device: prefer realpath() to canonicalize_file_name()
+
+Usually the canonicalize_file_name() GNU extension is preferred to the
+POSIX realpath(), as it covers some of the limitations the latter has.
+But this extension isn't available in lots of platforms or in other
+c library implementations (e.g. musl), so just default to the POSIX
+method to improve portability.
+
+Note that the check for canonicalize_file_name() availability during
+configure isn't as trivial as adding a new AC_CHECK_FUNCS(), and
+importing a gnulib module seems overkill just for this one liner.
+
+(cherry picked from commit 417b0b80023dc30d61c111ec0a54da2884d3a541)
+Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
+---
+ src/libmbim-glib/mbim-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
+index e1f32a6..20e64af 100644
+--- a/src/libmbim-glib/mbim-device.c
++++ b/src/libmbim-glib/mbim-device.c
+@@ -867,7 +867,7 @@ get_descriptors_filepath (MbimDevice *self)
+          *    /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:2.0
+          */
+         tmp = g_strdup_printf ("/sys/class/%s/%s/device", subsystems[i], device_basename);
+-        path = canonicalize_file_name (tmp);
++        path = realpath (tmp, NULL);
+         g_free (tmp);
+
+         if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+--
+2.13.1
+
--
2.13.1

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

* [Buildroot] [PATCH v2] libmbim: fix build with musl libc
  2017-09-11  8:55 ` [Buildroot] [PATCH v2] " Aleksander Morgado
@ 2017-09-23 20:25   ` Arnout Vandecappelle
  0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2017-09-23 20:25 UTC (permalink / raw)
  To: buildroot



On 11-09-17 10:55, Aleksander Morgado wrote:
> This is now failing because the libgudev dependency is optional and
> the build will only use if it's found during the configure checks.
> 
> Imported the same patch that has been applied in the upstream libmbim
> git repository:
>   https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541
> 
> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

 Applied to master, thanks.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2017-09-23 20:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11  7:54 [Buildroot] [PATCH] libmbim: fix build with musl libc Aleksander Morgado
2017-09-11  8:27 ` Baruch Siach
2017-09-11  8:55 ` [Buildroot] [PATCH v2] " Aleksander Morgado
2017-09-23 20:25   ` Arnout Vandecappelle

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.