From c5cf534788a5966d1db4a80100c80586e364a2f7 Mon Sep 17 00:00:00 2001 From: zyppe <210hcl@gmail.com> Date: Wed, 28 Feb 2024 21:20:02 +0800 Subject: [PATCH] Initialize for libmbim --- .gitignore | 1 + .libmbim.metadata | 1 + libmbim.changes | 345 ++++++++++++++++++++++++++++++++++++++++++++++ libmbim.spec | 125 +++++++++++++++++ 4 files changed, 472 insertions(+) create mode 100644 .gitignore create mode 100644 .libmbim.metadata create mode 100644 libmbim.changes create mode 100644 libmbim.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b140843 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +libmbim-1.26.4.tar.xz diff --git a/.libmbim.metadata b/.libmbim.metadata new file mode 100644 index 0000000..42c5183 --- /dev/null +++ b/.libmbim.metadata @@ -0,0 +1 @@ +02b783c5d107f634e865f36572ddce3be95f5bc126b2659a74c8fe27992f873d libmbim-1.26.4.tar.xz diff --git a/libmbim.changes b/libmbim.changes new file mode 100644 index 0000000..01de8f9 --- /dev/null +++ b/libmbim.changes @@ -0,0 +1,345 @@ +* Sun May 29 2022 dmueller@suse.com +- update to 1.26.4: + * meson: force building doc on normal builds, not only during install. + * meson: fix 'export_packages' in GIR setup. + * compat: deprecate the MbimLteAttachStatus type. + * net-port-manager: use unaligned netlink attribute length. + * include MBIM proxy control service in docs. + * codegen: add section doc for each service. + * utils: add missing short description in section. + * compat: add missing MbimLteAttachStatus doc. + * device: add missing mbim_device_list_links() doc. + * device: fix MbimDevice 'device-in-session' property doc. + * version: add missing MBIM_CHECK_VERSION() documentation. + * device: fix wrong reference to QmiDevice + * Several other minor improvements and fixes. +* Mon Dec 20 2021 dmueller@suse.com +- Update to version 1.26.2: + + The GUdev optional build/runtime requirement is now fully + dropped, it's no longer used. + + Implemented new link management operations, exclusively for the + cdc_mbim driver for now. These new operations allow creating or + deleting VLAN network interfaces in order to run multiplexed + data sessions over one single physical network interface. + + Added support for the Microsoft-defined SAR service, including + the following operations: + - MBIM_CID_MS_SAR_CONFIG + - MBIM_CID_MS_SAR_TRANSMISSION_STATUS + + libmbim-glib: + - Logic updated to make sure full packets are written at once, + instead of writing them in chunks. + - Updated the "LTE attach status" APIs in order to avoid + creating unneeded struct types in the interface. The older + methods have been deprecated and maintained in the library + for compatibility purposes only. + + Bugfixes. +- Drop pkgconfig(gudev-1.0) BuildRequires: no longer used. +* Fri Jan 22 2021 mardnh@gmx.de +- Update to version 1.24.6: + * libmbim-glib,device: + + Fixed a GSource use after free. + + Avoid g_file_test() on NULL path. + + Don't warn if descriptors file cannot be read. + * Several other minor improvements and fixes. +* Fri Oct 2 2020 mardnh@gmx.de +- Update to version 1.24.4: + * libmbim-glib,device: + + Added new mbim_device_get_transaction_id() to retrieve the + transaction id currently being used. + * libmbim-glib,proxy: + + Fixed the transaction id used in fragments of the same + request. + + Avoid creating device context when it's already being + untracked. + + Fixed double GError free. + * mbimcli: + + Fixed missing EOL in error string when closing device. +* Wed Aug 19 2020 dimstar@opensuse.org +- Upate to version 1.24.2: + + libmbim-glib: + - Fixed several issues in the logic that merges the service + subscribe list. + - Improved message reading logic to skip malformed MBIM + messages (e.g. AT URCs emitted wrongly in the MBIM port by + some Cinterion modules). +* Fri Jun 19 2020 mardnh@gmx.de +- Update to version 1.24 + * Build now requires GLib/GObject/GIO 2.48. + * Added new GObject Introspection support in the library, that + can be explicitly requested during configure with + - -enable-introspection=yes. With the new introspection support, + the libmbim-glib library can now be used directly from e.g. + python programs, as in the example included with the release. + * Added release version information to all the types and methods + of the public library API, and added new per-version indices + in the documentation. + * Added g_autoptr() support to all public types. + * Several other minor improvements and fixes. +- Introduce subpackage for Introspection bindings +* Wed Jan 15 2020 mardnh@gmx.de +- Update to version 1.22.0 + + libmbim-glib: Message parsing logic improved to avoid reading + fields out of bounds, e.g. if the messages sent by the modem + are malformed or not in line with the specs. + + Several other minor improvements and fixes. +* Sat Jan 4 2020 stefan.bruens@rwth-aachen.de +- Only require python3-base package for building instead of + full python3 package. +* Sat Dec 21 2019 mardnh@gmx.de +- Update to version 1.20.4: + + libmbim-glib: + - Fixed memleak when processing responses with multiple + fragments. + - Fixed memleak when processing failed Open operations. + - Removed redundant method declaration in UUID header. +* Wed Nov 6 2019 mardnh@gmx.de +- Update to version 1.20.2: + + mbim-proxy: + - Fixed device control port management when using symlinks. + + libmbim-glib: + - Fixed handling of fragmented indication messages. + + Several other minor improvements and fixes. +* Sat Sep 14 2019 bjorn.lie@gmail.com +- Update to version 1.20.0: + + Build updated with several fixes: + - Explicitly define max allowed GLib version. + - Fix issues with -Werror=type-limits. + - Made compiler warning options compatible with clang. + + mbim-proxy: + - Fixed client subscription to service indications using + wildcard. + - Fixed client subscription update logic when services/cids are + being removed. + - New '--empty-timeout=[SECS}' option to specify the empty + lifetime duration. + - New '--no-exit' option to avoid the proxy from exiting. + + Several other minor improvements and fixes. +- Drop libmbim-fix-build-commits.patch: Fixed upstream. Follwing + this, drop libtool BuildRequires and autoreconf call. +* Mon Sep 2 2019 bjorn.lie@gmail.com +- Add libmbim-fix-build-commits.patch: Fix build with new glib2. +- Follwing the above patch, add libtool BuildRequires and pass + autoreconf as the patch touches the buildsystem. +- Use modern macros and url's. +* Sun Apr 14 2019 mardnh@gmx.de +- Update to version 1.18.2: + + mbim-proxy: Increased empty lifetime to 300s. +- Fix wording in the package summary. +* Tue Jan 8 2019 mardnh@gmx.de +- Update to version 1.18.0 + + New Microsoft Basic Connect Extensions service, that includes + new commands to manage Protocol Configuration Operations (PCO) + as well as LTE attach status and settings. + + libmbim-glib: + - Added support to fully print all message contents, including + all fields, when traces are enabled. + - Added support for QMI indications over MBIM. + - Added additional cause codes to MbimNwError. + - Fixed signal emission in device, so that it's done before + completing transaction task. + + mbim-proxy: Fixed the management of subscribed events, so that + the lists are maintained per-device. + + mbimcli: + - New '--ms-query-pco' action. + - New '--ms-query-lte-attach-configuration' action. + - New '--ms-query-lte-attach-status' action. + + Several other minor improvements and fixes. +* Sat Aug 25 2018 mardnh@gmx.de +- Update to version 1.16.2: + + mbimcli: + - Fix SNR reporting in --atds-query-signal output. + - Longer timeout (60s) in --disconnect. + - Add "ip-type" property to --connect. + + libmbim-glib: + - Fix printing message in Intel Firmware Update service. + - Fix error reporting when unknown status. +* Wed Feb 28 2018 dimstar@opensuse.org +- Modernize spec-file by calling spec-cleaner +* Mon Jan 22 2018 luc14n0@linuxmail.org +- Update to version 1.16.0: + + All the code base was ported to use the GTask based + asynchronous operations support instead of the deprecated + GSimpleAsyncResult. + + New support for AT&T Device Service and Intel Firmware Update + Service. + + libmbim-glib: + - Added: + . MBIM_STATUS_ERROR_CONTEXT_NOT_SUPPORTED to MbimStatusError. + . Support to detect already open MBIM channels on the Sierra + Wireless EM7345. + - Avoid using iconv() directly for the UTF-16BE conversions, + which makes it possible to use libmbim on systems with a stub + iconv() implementation. + - Prefer realpath() to canonicalize_file_name(). + - Added MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag. + + mbimcli: + - New: --query-ip-packet-filters, --query-pin-list action, + - -atds-query-signal, --atds-query-location and + - -intel-modem-reboot actions. + - Add cancellability to the query-ip-configuration action. + + mbim-proxy: Avoid receiving signals from the parent process. +- Add pkgconfig(gio-unix-2.0) BuildRequires: it was being pulled + by another pkgconfig module that live in glib2-devel package and + used already. +* Thu Nov 2 2017 mpluskal@suse.com +- Enable tests +- Do not rely on env for python during build +- Run spec-cleaner +* Thu Sep 7 2017 zaitor@opensuse.org +- Update to version 1.14.2: + + libmbim-glib: + - Added MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag. + - Fixed G_DEPRECATED_FOR annotations. + + mbim-proxy: + - Fixed segfault when device goes away while being opened. + - Avoid receiving signals from the parent process. + + mbimcli: + - Fix second ctrl+c handling. + - Add cancellability to the query-ip-configuration action. + + mbim-network: Fix bashisms. + + Several other minor improvements and fixes. +- Drop libmbim-plug-mem-leak.patch: Fixed upstream. +* Wed Mar 1 2017 zaitor@opensuse.org +- Add libmbim-plug-mem-leak.patch: libmbim-glib: device: Plug + memory leak in open timeout, patch from upstream stable git. +* Mon Jul 11 2016 bruno@ioda-net.ch +- Update to version 1.14.0: + + New support for the 'QMI over MBIM' service, so that clients + can use libqmi to build messages and libmbim to transport them. + + The GUDev library, which we use to read the max message size + from the USB descriptor, is now optional. When configuring, it + will be used by default only if it's found. It can also be + explicitly disabled using the new configure switch + '--without-udev' or explicitly enabled using '--with-udev'. + If GUDev isn't used, libmbim-glib will rely on sysfs directly. + + libmbim-glib updates: Added support for building messages of + custom services. + + mbim-network updates: + - Added support for loading profiles from different paths using + the new '--profile' option. This makes it possible to use + mbim-network with multiple devices running in the same + system. + - Added support to allow specifying APN user (APN_USER), + password (APN_PASS) and authentication type (APN_AUTH) in the + profile. + - Added support to allow using the mbim-proxy setup by + configuring it in the profile file (PROXY=yes). + + Several other minor improvements and fixes. + + The following features which were backported to 1.12.x releases + are also present in libmbim 1.14.0: + - mbimcli updates: + . Updated '--connect' arguments to allow specifying + "key=value" pairs. The old legacy + "[(APN),(PAP|CHAP|MSCHAPV2),(Username),(Password)]" format + is kept as valid for backwards compatibility, although it + should be assumed deprecated. + . Longer timeouts for connect/register operations. + . Report IP configuration when connected. + . Allow specifying session ids. + + libmbim-glib updates: Probing retry interval increased to 5s. + - Split out mbimcli-bash-completion package, requiring and + supplementing bash-completion. +- Pass --with-udev to configure: new config parameter, but keeping + the old behavior (it was non-optional before). +* Fri Apr 15 2016 hpj@suse.com +- Update to GNOME 3.20 -- Fate#318572. +* Fri Mar 18 2016 zaitor@opensuse.org +- Update to version 1.12.4: + + Updated '--connect' arguments to allow specifying "key=value" + pairs. The old legacy "[(APN), (PAP|CHAP|MSCHAPV2), (Username), + (Password)]" format is kept as valid for backwards + compatibility, although it should be assumed deprecated. + + mbimcli: + - Longer timeouts for connect/register operations. + - Report IP configuration when connected. + - Allow specifying session ids. + + libmbim-glib: probing retry interval increased to 5s. + + Some other minor fixes. +* Sun Feb 1 2015 zaitor@opensuse.org +- Update to version 1.12.2: + + Fix assertion triggered by a bug in the removal of unreleased + transactions. +* Wed Jan 28 2015 dimstar@opensuse.org +- Update to version 1.12.0: + + New `--enable-mbim-username' option during configure, which + allows specifying which will be the user owning the + /dev/cdc-wdm character devices of all MBIM modems (udev rules + are installed to change file ownership). If this option is + used, the mbim-proxy will only allow connections from processes + running by the specified user or by the root user. + + Function error messages can now be returned by the MbimDevice + as responses to `Command', `Open' or `Close' messages. Users of + the library should not assume the type of message returned to + the previous actions. + + The MbimProxy will monitor for 'NotOpened' errors, and when one + detected it will directly close the internal MbimDevice. Any + subsequent request sent by clients to that specific device will + be aborted with a proxy-generated 'NotOpened' error. Clients + will need to explicitly reopen the ports in that case. + + The API now has a new mbim_message_response_get_result() method + which allows getting a GError from a message which may be of a + specific type (e.g. a `Command Done' message in response to a + `Command' request) or instead the generic `Function Error' + message type. Users of the library can use this new method to + avoid assuming the type of message returned. + + Other bugfixes and minor improvements: + - Attach timeout and idle events to the thread-default context. + - Fix bashisms in the mbim-network script. +- Drop libmbim-1.10.0-fix-bashisms.patch: fixed upstream. +* Thu Nov 27 2014 ledest@gmail.com +- Add libmbim-1.10.0-fix-bashisms.patch: fix bashisms in + mbim-network script. +* Mon Oct 20 2014 dimstar@opensuse.org +- Update to version 1.10.0: + + API break: Flag values in 'MbimRegistrationFlag' were updated + to match the ones in the MBIM documentation. + + Implemented a new 'mbim-proxy', which allows sharing a single + MBIM control port among different processes. The usage of the + proxy is optional, and can be requested by specifying the + MBIM_DEVICE_OPEN_FLAGS_PROXY flag in the new + mbim_device_open_full() method. The 'mbimcli' command line tool + was also extended with a new '--device-open-proxy,-p' option, + to allow requesting the use of the proxy process. + + New 'removed' signal added to the MbimDevice, to notify when + the underlying connection to the device is lost (e.g. lost + connection to the mbim-proxy, or lost access to the MBIM + control port). + + Added support for registering and using custom services. + + Added additional GMM cause codes to MbimNwError. + + Transactions are now matched not only by ID but also by type. + + Several other minor improvements and fixes. +- Changes from version 1.8.0: + + Added support for additional MBIM messages: + - MBIM_CID_MS_FIRMWARE_ID_GET + - MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY + + Updated mbimcli with new commands: + - --set-radio-state + - --ms-query-firmware-id + - --ms-notify-host-shutdown + - --dss-connect + - --dss-disconnect + + Several enums and functions were renamed, and marked as + deprecated. A small layer is given to provide backwards + compatibility. + + Several other minor improvements and fixes. +- Rename libmbim-glib0 subpackage to libmbim-glib4, following + upstreams soname change. +* Sun Feb 2 2014 zaitor@opensuse.org +- Update to version 1.6.0: + + Updated mbimcli with new commands: + - -phonebook-query-configuration, --phonebook-read, + - -phonebook-read-all, --phonebook-write, --phonebook-delete, + - -phonebook-delete-all. + + Added generation of man pages for mbimcli and mbim-network. + + Several other minor improvements and fixes. +- Stop packaging Changelog in docs as it is empty. +* Mon Dec 16 2013 dimstar@opensuse.org +- Update License fields: + + Main package: GPL-2.0+ and LGPL-2.1+ (also for the src pkg). + + Library and -devel subpackage: LGPL-2.1+. + + The Small tools shipped in the main package (binary) are + licensed GPL-2.0+. +* Wed Dec 4 2013 dimstar@opensuse.org +- Call ldconfig on post/postun of libmbim-glib0. +* Sun Dec 1 2013 dimstar@opensuse.org +- Initial package, version 1.4.0. diff --git a/libmbim.spec b/libmbim.spec new file mode 100644 index 0000000..9d8b89e --- /dev/null +++ b/libmbim.spec @@ -0,0 +1,125 @@ +# +# spec file for package libmbim +# +# Copyright (c) 2022-2023 ZhuningOS +# +# + + +Name: libmbim +Version: 1.26.4 +Release: 150500.1.2 +Summary: Mobile Broadband Interface Model (MBIM) protocol +License: GPL-2.0-or-later AND LGPL-2.0-or-later +Group: Productivity/Networking/System +URL: https://www.freedesktop.org/wiki/Software/libmbim/ +Source: https://www.freedesktop.org/software/libmbim/%{name}-%{version}.tar.xz + +BuildRequires: pkgconfig +BuildRequires: python3-base +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(glib-2.0) >= 2.48 +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) + +%description +libmbim is a glib-based library for talking to WWAN modems and devices +which speak the Mobile Broadband Interface Model (MBIM) protocol. + +%package -n libmbim-glib4 +Summary: Mobile Broadband Interface Model (MBIM) protocol +License: LGPL-2.1-or-later +Group: System/Libraries + +%description -n libmbim-glib4 +libmbim is a glib-based library for talking to WWAN modems and devices +which speak the Mobile Broadband Interface Model (MBIM) protocol. + +%package devel +Summary: Mobile Broadband Interface Model (MBIM) protocol - Development files +License: LGPL-2.1-or-later +Group: Development/Languages/C and C++ +Requires: libmbim-glib4 = %{version} + +%description devel +libmbim is a glib-based library for talking to WWAN modems and devices +which speak the Mobile Broadband Interface Model (MBIM) protocol. + +%package -n mbimcli-bash-completion +Summary: Bash completion for mbimcli +License: GPL-2.0-or-later AND LGPL-2.0-or-later +Group: Productivity/Networking/System +BuildRequires: bash-completion +Requires: bash-completion +Supplements: packageand(%{name}:bash-completion) + +%description -n mbimcli-bash-completion +This package contain de bash completion command for mbimcli tools. + +%package -n typelib-1_0-Mbim-1_0 +Summary: Introspection bindings for libmbim +License: GPL-2.0-or-later AND LGPL-2.0-or-later +Group: System/Libraries + +%description -n typelib-1_0-Mbim-1_0 +libmbim is a glib-based library for talking to WWAN modems and devices +which speak the Mobile Broadband Interface Model (MBIM) protocol. + +This package provides the GObject Introspection bindings for libmbim. + +%prep +%autosetup -p1 + +%build +# Do not rely on env for choosing python +sed -i "s|env python|python3|g" build-aux/mbim-codegen/* +%configure \ + --with-udev \ + --disable-static \ + --enable-introspection=yes \ + %{nil} +%make_build + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print + +%check +%make_build check + +%post -n libmbim-glib4 -p /sbin/ldconfig +%postun -n libmbim-glib4 -p /sbin/ldconfig + +%files +%license COPYING +%doc NEWS +%{_bindir}/mbim-network +%{_bindir}/mbimcli +%{_libexecdir}/mbim-proxy +%{_mandir}/man1/mbim-network.1%{?ext_man} +%{_mandir}/man1/mbimcli.1%{?ext_man} + +%files -n libmbim-glib4 +%license COPYING.LIB + +%{_libdir}/libmbim-glib.so.* + +%files devel +%doc AUTHORS README +# Own these directories to not depend on gtk-doc +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%doc %{_datadir}/gtk-doc/html/libmbim-glib/ +%{_datadir}/gir-1.0/*.gir +%{_includedir}/libmbim-glib/ +%{_libdir}/libmbim-glib.so +%{_libdir}/pkgconfig/mbim-glib.pc + +%files -n mbimcli-bash-completion +%{_datadir}/bash-completion/completions/mbimcli + +%files -n typelib-1_0-Mbim-1_0 +%{_libdir}/girepository-1.0/Mbim-1.0.typelib + +%changelog