From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2 5/5] modemmanager: version bump 1.14.8 -> 1.16.2
Date: Tue, 30 Mar 2021 08:42:35 +0200 [thread overview]
Message-ID: <20210330064235.GA4158052@pengutronix.de> (raw)
In-Reply-To: <20210329054904.24342-6-post@lespocky.de>
On Mon, Mar 29, 2021 at 07:49:04AM +0200, Alexander Dahl wrote:
> From: Alexander Dahl <ada@thorsis.com>
>
> The patch allows build against libgudev older than version 232.
>
> Link: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/349
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> ...dev-don-t-use-autoptr-in-GUdev-types.patch | 127 ++++++++++++++++++
> patches/ModemManager-1.16.2/series | 4 +
> rules/modemmanager.make | 7 +-
> 3 files changed, 136 insertions(+), 2 deletions(-)
> create mode 100644 patches/ModemManager-1.16.2/0001-kerneldevice-udev-don-t-use-autoptr-in-GUdev-types.patch
> create mode 100644 patches/ModemManager-1.16.2/series
>
> diff --git a/patches/ModemManager-1.16.2/0001-kerneldevice-udev-don-t-use-autoptr-in-GUdev-types.patch b/patches/ModemManager-1.16.2/0001-kerneldevice-udev-don-t-use-autoptr-in-GUdev-types.patch
> new file mode 100644
> index 000000000..511b1693f
> --- /dev/null
> +++ b/patches/ModemManager-1.16.2/0001-kerneldevice-udev-don-t-use-autoptr-in-GUdev-types.patch
> @@ -0,0 +1,127 @@
> +From: Aleksander Morgado <aleksander@aleksander.es>
> +Date: Tue, 23 Mar 2021 15:36:58 +0100
> +Subject: [PATCH] kerneldevice,udev: don't use autoptr in GUdev types
> +
> +The autoptr support in all GUdev types was introduced in
> +commit 272533131c6ed38479a88805, included in libgudev 232.
Why not update libgudev instead of adding this patch?
Michael
> +In the MM 1.16 branch we depend on libgudev 147, so avoid
> +implicitly bumping the required version.
> +
> +Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/349
> +---
> + src/kerneldevice/mm-kernel-device-udev.c | 30 +++++++++++++++++++++---------
> + 1 file changed, 21 insertions(+), 9 deletions(-)
> +
> +diff --git a/src/kerneldevice/mm-kernel-device-udev.c b/src/kerneldevice/mm-kernel-device-udev.c
> +index f75104bd6b1c..a6bf1a71df88 100644
> +--- a/src/kerneldevice/mm-kernel-device-udev.c
> ++++ b/src/kerneldevice/mm-kernel-device-udev.c
> +@@ -81,7 +81,7 @@ static void
> + preload_contents_platform (MMKernelDeviceUdev *self,
> + const gchar *platform)
> + {
> +- g_autoptr(GUdevDevice) iter = NULL;
> ++ GUdevDevice *iter;
> +
> + iter = g_object_ref (self->priv->device);
> + while (iter) {
> +@@ -102,17 +102,19 @@ preload_contents_platform (MMKernelDeviceUdev *self,
> + g_clear_object (&iter);
> + iter = parent;
> + }
> ++
> ++ g_clear_object (&iter);
> + }
> +
> + static void
> + preload_contents_pcmcia (MMKernelDeviceUdev *self)
> + {
> +- g_autoptr(GUdevDevice) iter = NULL;
> +- gboolean pcmcia_subsystem_found = FALSE;
> ++ GUdevDevice *iter;
> ++ gboolean pcmcia_subsystem_found = FALSE;
> +
> + iter = g_object_ref (self->priv->device);
> + while (iter) {
> +- g_autoptr(GUdevDevice) parent = NULL;
> ++ GUdevDevice *parent;
> +
> + /* Store the first driver found */
> + if (!self->priv->driver)
> +@@ -133,18 +135,21 @@ preload_contents_pcmcia (MMKernelDeviceUdev *self)
> + self->priv->product = udev_device_get_sysfs_attr_as_hex (iter, "card_id");
> + self->priv->physdev = g_object_ref (iter);
> + /* stop traversing as soon as the physical device is found */
> ++ g_clear_object (&parent);
> + break;
> + }
> +
> + g_clear_object (&iter);
> +- iter = g_steal_pointer (&parent);
> ++ iter = parent;
> + }
> ++
> ++ g_clear_object (&iter);
> + }
> +
> + static void
> + preload_contents_pci (MMKernelDeviceUdev *self)
> + {
> +- g_autoptr(GUdevDevice) iter = NULL;
> ++ GUdevDevice *iter;
> +
> + iter = g_object_ref (self->priv->device);
> + while (iter) {
> +@@ -170,12 +175,14 @@ preload_contents_pci (MMKernelDeviceUdev *self)
> + g_clear_object (&iter);
> + iter = parent;
> + }
> ++
> ++ g_clear_object (&iter);
> + }
> +
> + static void
> + preload_contents_usb (MMKernelDeviceUdev *self)
> + {
> +- g_autoptr(GUdevDevice) iter = NULL;
> ++ GUdevDevice *iter;
> +
> + iter = g_object_ref (self->priv->device);
> + while (iter) {
> +@@ -204,12 +211,14 @@ preload_contents_usb (MMKernelDeviceUdev *self)
> + g_clear_object (&iter);
> + iter = parent;
> + }
> ++
> ++ g_clear_object (&iter);
> + }
> +
> + static gchar *
> + find_device_bus_subsystem (MMKernelDeviceUdev *self)
> + {
> +- g_autoptr(GUdevDevice) iter = NULL;
> ++ GUdevDevice *iter;
> +
> + iter = g_object_ref (self->priv->device);
> + while (iter) {
> +@@ -224,8 +233,10 @@ find_device_bus_subsystem (MMKernelDeviceUdev *self)
> + (g_strcmp0 (subsys, "pci") == 0) ||
> + (g_strcmp0 (subsys, "platform") == 0) ||
> + (g_strcmp0 (subsys, "pnp") == 0) ||
> +- (g_strcmp0 (subsys, "sdio") == 0))
> ++ (g_strcmp0 (subsys, "sdio") == 0)) {
> ++ g_clear_object (&iter);
> + return g_strdup (subsys);
> ++ }
> +
> + parent = g_udev_device_get_parent (iter);
> + g_clear_object (&iter);
> +@@ -233,6 +244,7 @@ find_device_bus_subsystem (MMKernelDeviceUdev *self)
> + }
> +
> + /* no more parents to check */
> ++ g_clear_object (&iter);
> + return NULL;
> + }
> +
> diff --git a/patches/ModemManager-1.16.2/series b/patches/ModemManager-1.16.2/series
> new file mode 100644
> index 000000000..073ee95c5
> --- /dev/null
> +++ b/patches/ModemManager-1.16.2/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-kerneldevice-udev-don-t-use-autoptr-in-GUdev-types.patch
> +# 7ee4df7afdcd7083fe59386d7e47c795 - git-ptx-patches magic
> diff --git a/rules/modemmanager.make b/rules/modemmanager.make
> index ee0f78515..18191583c 100644
> --- a/rules/modemmanager.make
> +++ b/rules/modemmanager.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_MODEMMANAGER) += modemmanager
> #
> # Paths and names
> #
> -MODEMMANAGER_VERSION := 1.14.8
> -MODEMMANAGER_MD5 := 138762a976a654d244744963d2250372
> +MODEMMANAGER_VERSION := 1.16.2
> +MODEMMANAGER_MD5 := 83c5fc0bf65b8f321532b61b5f2b0b51
> MODEMMANAGER := ModemManager-$(MODEMMANAGER_VERSION)
> MODEMMANAGER_SUFFIX := tar.xz
> MODEMMANAGER_URL := https://www.freedesktop.org/software/ModemManager/$(MODEMMANAGER).$(MODEMMANAGER_SUFFIX)
> @@ -45,13 +45,16 @@ MODEMMANAGER_CONF_OPT := \
> --disable-gtk-doc-pdf \
> --disable-nls \
> --disable-rpath \
> + --disable-code-coverage \
> --disable-introspection \
> --disable-vala \
> --enable-all-plugins \
> --with-gnu-ld \
> + --without-gcov \
> --with-dbus-sys-dir=/usr/share/dbus-1/system.d \
> --with-udev-base-dir=/usr/lib/udev \
> --with-systemdsystemunitdir=/usr/lib/systemd/system \
> + --with-udev \
> --$(call ptx/wwo, PTXCONF_INITMETHOD_SYSTEMD)-systemd-suspend-resume \
> --$(call ptx/wwo, PTXCONF_INITMETHOD_SYSTEMD)-systemd-journal \
> --without-polkit \
> --
> 2.20.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
>
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2021-03-30 6:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 5:48 [ptxdist] [PATCH v2 0/5] ModemManager: version bump Alexander Dahl
2021-03-29 5:49 ` [ptxdist] [PATCH v2 1/5] libqmi: Add license file hashes Alexander Dahl
2021-03-30 18:08 ` [ptxdist] [APPLIED] " Michael Olbrich
2021-03-29 5:49 ` [ptxdist] [PATCH v2 2/5] libqmi: version bump 1.26.2 -> 1.28.2 Alexander Dahl
2021-03-30 18:08 ` [ptxdist] [APPLIED] " Michael Olbrich
2021-03-29 5:49 ` [ptxdist] [PATCH v2 3/5] modemmanager: Revise applicable licenses Alexander Dahl
2021-03-30 18:08 ` [ptxdist] [APPLIED] " Michael Olbrich
2021-03-29 5:49 ` [ptxdist] [PATCH v2 4/5] modemmanager: Add license file hashes Alexander Dahl
2021-03-30 18:08 ` [ptxdist] [APPLIED] " Michael Olbrich
2021-03-29 5:49 ` [ptxdist] [PATCH v2 5/5] modemmanager: version bump 1.14.8 -> 1.16.2 Alexander Dahl
2021-03-30 6:42 ` Michael Olbrich [this message]
2021-03-30 9:17 ` Roland Hieber
2021-03-30 13:54 ` Alexander Dahl
2021-03-30 17:34 ` Michael Olbrich
2021-03-30 18:08 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210330064235.GA4158052@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox