import ModemManager-1.10.4-1.el8
This commit is contained in:
parent
6e3099b884
commit
c0efef0b8e
@ -1 +1 @@
|
||||
075e2c6ff8257f85e6a52c4d721a628ed18e042d SOURCES/ModemManager-1.8.0.tar.xz
|
||||
5e91a6b9e671e54c500c68ec64c72908611b03fd SOURCES/ModemManager-1.10.4.tar.xz
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/ModemManager-1.8.0.tar.xz
|
||||
SOURCES/ModemManager-1.10.4.tar.xz
|
||||
|
185
SOURCES/0001-plugin-ignore-unwanted-net-ports.patch
Normal file
185
SOURCES/0001-plugin-ignore-unwanted-net-ports.patch
Normal file
@ -0,0 +1,185 @@
|
||||
From fd1a26fc36df005d66627109875631264d2f8e19 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Morgado <aleksander@aleksander.es>
|
||||
Date: Wed, 22 May 2019 23:20:30 +0200
|
||||
Subject: [PATCH] plugin: ignore unwanted net ports
|
||||
|
||||
* For QMI modems, make sure we only grab QMI data ports (flag the
|
||||
rest as ignored).
|
||||
* For MBIM modems, make sure we only grab MBIM data ports (flag the
|
||||
rest as ignored).
|
||||
* For other plugins that use NET ports in their logic, make sure we
|
||||
only grab non-QMI and non-MBIM data ports.
|
||||
---
|
||||
src/mm-plugin.c | 120 +++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 89 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
|
||||
index 08fe2cd0..a19111ff 100644
|
||||
--- a/src/mm-plugin.c
|
||||
+++ b/src/mm-plugin.c
|
||||
@@ -37,6 +37,13 @@
|
||||
#include "mm-log.h"
|
||||
#include "mm-daemon-enums-types.h"
|
||||
|
||||
+#if defined WITH_QMI
|
||||
+# include "mm-broadband-modem-qmi.h"
|
||||
+#endif
|
||||
+#if defined WITH_MBIM
|
||||
+# include "mm-broadband-modem-mbim.h"
|
||||
+#endif
|
||||
+
|
||||
G_DEFINE_TYPE (MMPlugin, mm_plugin, G_TYPE_OBJECT)
|
||||
|
||||
/* Virtual port corresponding to the embedded modem */
|
||||
@@ -920,9 +927,22 @@ mm_plugin_create_modem (MMPlugin *self,
|
||||
|
||||
/* Grab each port */
|
||||
for (l = port_probes; l; l = g_list_next (l)) {
|
||||
- GError *inner_error = NULL;
|
||||
- MMPortProbe *probe = MM_PORT_PROBE (l->data);
|
||||
- gboolean grabbed;
|
||||
+ GError *inner_error = NULL;
|
||||
+ MMPortProbe *probe;
|
||||
+ gboolean grabbed = FALSE;
|
||||
+ gboolean force_ignored = FALSE;
|
||||
+ const gchar *subsys;
|
||||
+ const gchar *name;
|
||||
+ const gchar *driver;
|
||||
+ MMPortType port_type;
|
||||
+
|
||||
+ probe = MM_PORT_PROBE (l->data);
|
||||
+
|
||||
+ subsys = mm_port_probe_get_port_subsys (probe);
|
||||
+ name = mm_port_probe_get_port_name (probe);
|
||||
+ port_type = mm_port_probe_get_port_type (probe);
|
||||
+
|
||||
+ driver = mm_kernel_device_get_driver (mm_port_probe_peek_port (probe));
|
||||
|
||||
/* If grabbing a port fails, just warn. We'll decide if the modem is
|
||||
* valid or not when all ports get organized */
|
||||
@@ -931,45 +951,82 @@ mm_plugin_create_modem (MMPlugin *self,
|
||||
* probed and accepted by the generic plugin, which is overwritten
|
||||
* by the specific one when needed. */
|
||||
if (apply_subsystem_filter (self, mm_port_probe_peek_port (probe))) {
|
||||
- grabbed = FALSE;
|
||||
inner_error = g_error_new (MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_UNSUPPORTED,
|
||||
"unsupported subsystem: '%s'",
|
||||
- mm_port_probe_get_port_subsys (probe));
|
||||
+ subsys);
|
||||
+ goto next;
|
||||
}
|
||||
+
|
||||
/* Ports that are explicitly blacklisted will be grabbed as ignored */
|
||||
- else if (mm_port_probe_is_ignored (probe)) {
|
||||
- mm_dbg ("(%s/%s): port is blacklisted",
|
||||
- mm_port_probe_get_port_subsys (probe),
|
||||
- mm_port_probe_get_port_name (probe));
|
||||
- grabbed = mm_base_modem_grab_port (modem,
|
||||
- mm_port_probe_peek_port (probe),
|
||||
- MM_PORT_TYPE_IGNORED,
|
||||
- MM_PORT_SERIAL_AT_FLAG_NONE,
|
||||
- &inner_error);
|
||||
+ if (mm_port_probe_is_ignored (probe)) {
|
||||
+ mm_dbg ("(%s/%s): port is blacklisted", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
}
|
||||
-#if !defined WITH_QMI
|
||||
- else if (mm_port_probe_get_port_type (probe) == MM_PORT_TYPE_NET &&
|
||||
- !g_strcmp0 (mm_kernel_device_get_driver (mm_port_probe_peek_port (probe)), "qmi_wwan")) {
|
||||
- /* Try to generically grab the port, but flagged as ignored */
|
||||
- grabbed = mm_base_modem_grab_port (modem,
|
||||
- mm_port_probe_peek_port (probe),
|
||||
- MM_PORT_TYPE_IGNORED,
|
||||
- MM_PORT_SERIAL_AT_FLAG_NONE,
|
||||
- &inner_error);
|
||||
+
|
||||
+#if defined WITH_QMI
|
||||
+ if (MM_IS_BROADBAND_MODEM_QMI (modem) &&
|
||||
+ port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "qmi_wwan") != 0) {
|
||||
+ /* Non-QMI net ports are ignored in QMI modems */
|
||||
+ mm_dbg ("(%s/%s): ignoring non-QMI net port in QMI modem", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
+ }
|
||||
+
|
||||
+ if (!MM_IS_BROADBAND_MODEM_QMI (modem) &&
|
||||
+ port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "qmi_wwan") == 0) {
|
||||
+ /* QMI net ports are ignored in non-QMI modems */
|
||||
+ mm_dbg ("(%s/%s): ignoring QMI net port in non-QMI modem", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
+ }
|
||||
+#else
|
||||
+ if (port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "qmi_wwan") != 0) {
|
||||
+ /* QMI net ports are ignored if QMI support not built */
|
||||
+ mm_dbg ("(%s/%s): ignoring QMI net port as QMI support isn't available", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#if defined WITH_MBIM
|
||||
+ if (MM_IS_BROADBAND_MODEM_MBIM (modem) &&
|
||||
+ port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "cdc_mbim") != 0) {
|
||||
+ /* Non-MBIM net ports are ignored in MBIM modems */
|
||||
+ mm_dbg ("(%s/%s): ignoring non-MBIM net port in MBIM modem", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
+ }
|
||||
+
|
||||
+ if (!MM_IS_BROADBAND_MODEM_MBIM (modem) &&
|
||||
+ port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "cdc_mbim") == 0) {
|
||||
+ /* MBIM net ports are ignored in non-MBIM modems */
|
||||
+ mm_dbg ("(%s/%s): ignoring MBIM net port in non-MBIM modem", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
+ }
|
||||
+#else
|
||||
+ if (port_type == MM_PORT_TYPE_NET &&
|
||||
+ g_strcmp0 (driver, "cdc_mbim") == 0) {
|
||||
+ mm_dbg ("(%s/%s): ignoring MBIM net port as MBIM support isn't available", subsys, name);
|
||||
+ force_ignored = TRUE;
|
||||
+ goto grab_port;
|
||||
}
|
||||
#endif
|
||||
-#if !defined WITH_MBIM
|
||||
- else if (mm_port_probe_get_port_type (probe) == MM_PORT_TYPE_NET &&
|
||||
- !g_strcmp0 (mm_kernel_device_get_driver (mm_port_probe_peek_port (probe)), "cdc_mbim")) {
|
||||
- /* Try to generically grab the port, but flagged as ignored */
|
||||
+
|
||||
+ grab_port:
|
||||
+ if (force_ignored)
|
||||
grabbed = mm_base_modem_grab_port (modem,
|
||||
mm_port_probe_peek_port (probe),
|
||||
MM_PORT_TYPE_IGNORED,
|
||||
MM_PORT_SERIAL_AT_FLAG_NONE,
|
||||
&inner_error);
|
||||
- }
|
||||
-#endif
|
||||
else if (MM_PLUGIN_GET_CLASS (self)->grab_port)
|
||||
grabbed = MM_PLUGIN_GET_CLASS (self)->grab_port (MM_PLUGIN (self),
|
||||
modem,
|
||||
@@ -981,10 +1038,11 @@ mm_plugin_create_modem (MMPlugin *self,
|
||||
mm_port_probe_get_port_type (probe),
|
||||
MM_PORT_SERIAL_AT_FLAG_NONE,
|
||||
&inner_error);
|
||||
+
|
||||
+ next:
|
||||
if (!grabbed) {
|
||||
mm_warn ("Could not grab port (%s/%s): '%s'",
|
||||
- mm_port_probe_get_port_subsys (MM_PORT_PROBE (l->data)),
|
||||
- mm_port_probe_get_port_name (MM_PORT_PROBE (l->data)),
|
||||
+ subsys, name,
|
||||
inner_error ? inner_error->message : "unknown error");
|
||||
g_clear_error (&inner_error);
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
@ -6,21 +6,25 @@
|
||||
|
||||
Summary: Mobile broadband modem management service
|
||||
Name: ModemManager
|
||||
Version: 1.8.0
|
||||
Version: 1.10.4
|
||||
Release: 1%{?dist}
|
||||
Source: https://www.freedesktop.org/software/ModemManager/%{name}-%{version}.tar.xz
|
||||
Patch0: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/commit/fd1a26fc36df.patch#/0001-plugin-ignore-unwanted-net-ports.patch
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
|
||||
URL: http://www.freedesktop.org/wiki/Software/ModemManager/
|
||||
Requires: glib2 >= %{glib2_version}
|
||||
Requires: libqmi >= %{qmi_version}
|
||||
Requires: libmbim >= %{mbim_version}
|
||||
# For mbim-proxy and qmi-proxy
|
||||
Requires: libmbim-utils
|
||||
Requires: libqmi-utils
|
||||
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
|
||||
|
||||
# Don't allow older versions of these than what we built against,
|
||||
# because they add new API w/o versioning it or bumping the SONAME
|
||||
Conflicts: glib2%{?_isa} < %{glib2_version}
|
||||
Conflicts: libqmi%{?_isa} < %{qmi_version}
|
||||
Conflicts: libmbim%{?_isa} < %{mbim_version}
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(preun): systemd
|
||||
@ -29,13 +33,14 @@ BuildRequires: glib2-devel >= 2.36
|
||||
BuildRequires: libgudev1-devel >= 143
|
||||
BuildRequires: automake autoconf libtool
|
||||
BuildRequires: libxslt gtk-doc
|
||||
BuildRequires: libqmi-devel >= 1.20.0
|
||||
BuildRequires: libmbim-devel >= 1.16.0
|
||||
BuildRequires: libqmi-devel >= 1.22.4
|
||||
BuildRequires: libmbim-devel >= 1.18.0
|
||||
BuildRequires: gobject-introspection-devel >= 1.38
|
||||
BuildRequires: vala-tools vala-devel
|
||||
BuildRequires: vala
|
||||
BuildRequires: dbus
|
||||
BuildRequires: systemd-devel >= 209
|
||||
BuildRequires: gettext-devel >= 0.19.8
|
||||
BuildRequires: dbus-daemon
|
||||
|
||||
%global __provides_exclude ^libmm-plugin-
|
||||
|
||||
@ -86,6 +91,7 @@ Vala bindings for ModemManager
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# Regenerate configure, because the one that is shipped
|
||||
@ -93,6 +99,7 @@ Vala bindings for ModemManager
|
||||
autoreconf -i --force
|
||||
%configure \
|
||||
--disable-rpath \
|
||||
--disable-silent-rules \
|
||||
--with-systemd-suspend-resume \
|
||||
--with-systemd-journal \
|
||||
--enable-more-warnings=no \
|
||||
@ -154,10 +161,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_unitdir}/ModemManager.service
|
||||
%{_datadir}/icons/hicolor/22x22/apps/*.png
|
||||
%{_datadir}/bash-completion
|
||||
%{_datadir}/ModemManager
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/ModemManager/*.h
|
||||
%{_includedir}/ModemManager/
|
||||
%dir %{_datadir}/gtk-doc/html/%{name}
|
||||
%{_datadir}/gtk-doc/html/%{name}/*
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
@ -180,6 +189,16 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_datadir}/vala/vapi/libmm-glib.*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 10 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.10.4-1
|
||||
- Update to 1.10.2 release (rh #1543498)
|
||||
|
||||
* Fri Jun 14 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.10.2-1
|
||||
- Update to 1.10.2 release (rh #1543498)
|
||||
- Don't grab cdc_ether devices on Sierra QMI modems (rh #1712031)
|
||||
|
||||
* Mon May 06 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.10.0-1
|
||||
- Update to 1.10.0 release
|
||||
|
||||
* Sun Jun 03 2018 Lubomir Rintel <lkundrak@v3.sk> - 1.8.0-1
|
||||
- Update to 1.8.0 release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user