Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:update-docs into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: cf4664921aa286e4a7365e2f714f6dfdd0977389
Merged at revision: 14f66a82bd89048dcdfd67f18d08d970dda8306b
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:update-docs
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master
Diff against target: 426 lines (+162/-90)
7 files modified
docs/index.md (+5/-13)
docs/installation.md (+25/-17)
docs/reference/available-commands.md (+27/-1)
docs/reference/snap-configuration/debug.md (+4/-4)
docs/release-notes.md (+47/-21)
docs/report-bug.md (+3/-1)
run-tests.sh (+51/-33)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Review via email: mp+387198@code.launchpad.net

Commit message

docs: update to match current state

Description of the change

docs: update to match current state

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 330b0d4c9f06db047a486eef5c9432ddbd7907b3

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/1338/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: cf4664921aa286e4a7365e2f714f6dfdd0977389

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/1340/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/docs/index.md b/docs/index.md
2index 95e7dc5..25a4ce9 100644
3--- a/docs/index.md
4+++ b/docs/index.md
5@@ -5,11 +5,11 @@ table_of_contents: False
6
7 # About ModemManager
8
9-ModemManager is a DBus-activated daemon which controls mobile broadband
10+The modem-manager snap is based on [upstream ModemManager](https://www.freedesktop.org/wiki/Software/ModemManager/), which is a DBus-activated daemon which controls mobile broadband
11 (2G/3G/4G) devices and connections. ModemManager is able to prepare and
12 configure a wide variety of modems and setup connections with them.
13
14-ModemManager should be used in most cases jointly with the
15+The modem-manager snap should be used in most cases jointly with the
16 [network-manager](https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/index)
17 snap. NetworkManager can be used to set cellular connection settings and to
18 start and stop the connection. The recommended way of using a modem in [Ubuntu
19@@ -21,20 +21,12 @@ automatically performed when using NetworkManager.
20
21 ## What ModemManager Offers
22
23-ModemManager offers a wide range of features, with the vast majority of them
24-available in the snap version.
25-
26-The main features provided by the ModemManager snap are:
27+The main features provided by ModemManager are:
28
29 * Cellular connectivity for a [wide variety of
30 modems](https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/)
31- * SMS messages Support for USB modems Support for AT commands, QMI, and MBIM
32- * interfaces
33-
34-What is not yet supported:
35-
36- * RS232 devices
37- * Bluetooth-paired phones
38+ * Support for AT commands, QMI, and MBIM interfaces
39+ * SMS messages support for USB modems
40
41 ## Upstream documentation
42
43diff --git a/docs/installation.md b/docs/installation.md
44index c74fda3..8b9d098 100644
45--- a/docs/installation.md
46+++ b/docs/installation.md
47@@ -13,28 +13,22 @@ You can install the snap with the following command:
48
49 ```text
50 $ snap install modem-manager
51-modem-manager 1.6.2-3 from 'canonical' installed
52+modem-manager (1.10/stable) 1.10.0-4 from Canonical✓ installed
53 ```
54
55-Although the modem-manager snap is available from other channels (candidate,
56-beta, edge), only the stable version should be used for production devices. The
57-meaning of the other channels is internal to the development team of the
58-modem-manager snap.
59-
60 All necessary plugs and slots will be automatically connected within the
61 installation process. You can verify this with:
62
63 ```text
64-$ snap interfaces modem-manager
65-Slot Plug
66-modem-manager:service modem-manager:mmcli
67+$ snap connections modem-manager
68+Interface Plug Slot Notes
69+modem-manager modem-manager:mmcli modem-manager:service -
70+modem-manager network-manager:modem-manager modem-manager:service -
71 ```
72
73 We see here that the _mmcli_ command line utility can use the ModemManager
74-service.
75-
76-**NOTE:** The _network-manager:modem-manager_ plug is connected to the
77-_modem-manager:service_ slot when the NetworkManager snap is installed too.
78+service and that network-manager can do the same (we will see that if
79+the network-manager snap is already installed in the system).
80
81 Once the installation has successfully finished the ModemManager service is
82 running in the background. You can check its current status with
83@@ -43,11 +37,11 @@ running in the background. You can check its current status with
84 $ systemctl status snap.modem-manager.modemmanager.service
85 ● snap.modem-manager.modemmanager.service - Service for snap application modem-manager.modemmanager
86 Loaded: loaded (/etc/systemd/system/snap.modem-manager.modemmanager.service; enabled; vendor preset: enabled)
87- Active: active (running) since Wed 2017-03-22 10:41:02 UTC; 3min 27s ago
88- Main PID: 2518 (modemmanager)
89+ Active: active (running) since Fri 2020-07-10 08:34:43 UTC; 2min 20s ago
90+ Main PID: 2047 (ModemManager)
91+ Tasks: 3 (limit: 569)
92 CGroup: /system.slice/snap.modem-manager.modemmanager.service
93- ├─2518 /bin/sh /snap/modem-manager/39/bin/modemmanager
94- └─2525 /snap/modem-manager/39/usr/sbin/ModemManager
95+ └─2047 /snap/modem-manager/414/usr/sbin/ModemManager --filter-policy=STRICT --log-level=INFO
96 ```
97
98 Now you have ModemManager successfully installed. In the next sections we will
99@@ -63,6 +57,20 @@ desired.
100 Finally, note that to run both _mmcli_ and _dbus-send_ we need root permissions, so
101 we use _sudo_ with them.
102
103+# modem-manager tracks and channels
104+
105+The modem-manager snap has currently three tracks:
106+
107+* __20__: Contains upstream version 1.12.8 and has a core20 base. The track name
108+refers to the base snap and it is the convention being used at the moment.
109+* __1.10__: Contains upstream version 1.10.0 and has a core18
110+base. Nowadays, this is the one installed by default if the channel is
111+not specified when running `snap install`. The track name refers to the
112+upstream version. More modern releases have changed the convention so
113+the track now refers to the base snap.
114+* __latest__: Contains upstream version 1.8.0 and has a core16 base. Despite
115+the unfortunate name (there are historical reasons for that) it is the oldest version.
116+
117 ## Next Steps
118
119 * [Gathering Modem Information](gathering-modem-information.md)
120diff --git a/docs/reference/available-commands.md b/docs/reference/available-commands.md
121index a326fc5..acaaaf2 100644
122--- a/docs/reference/available-commands.md
123+++ b/docs/reference/available-commands.md
124@@ -12,8 +12,34 @@ Further details about their usage is given on linked pages.
125
126 ## mmcli
127
128-The mmcli command offers a command-line based way to control and manage the
129+The __mmcli__ command offers a command-line based way to control and manage the
130 ModemManager service.
131
132 An explanatory description of the command and available options is available
133 [here](https://www.freedesktop.org/software/ModemManager/man/latest/mmcli.8.html)
134+
135+## modem-manager.mbimcli
136+
137+__mbimcli__ can be used to control directly devices that use the MBIM protocol.
138+
139+More details can be found in the [man page](http://manpages.ubuntu.com/manpages/focal/man1/mbimcli.1.html).
140+
141+## modem-manager.qmicli
142+
143+__qmicli__ can be used to control directly devices that use the QMI protocol.
144+
145+More details can be found in the [man page](http://manpages.ubuntu.com/manpages/focal/man1/qmicli.1.html).
146+
147+## modem-manager.mbim-network
148+
149+__mbim-network__ can be used to start a cellular connection for devices
150+that support the MBIM protocol, mainly for debugging purposes.
151+
152+More details can be found in the [man page](http://manpages.ubuntu.com/manpages/focal/man1/mbim-network.1.html).
153+
154+## modem-manager.qmi-network
155+
156+__qmi-network__ can be used to start a cellular connection for devices
157+that support the QMI protocol, mainly for debugging purposes.
158+
159+More details can be found in the [man page](http://manpages.ubuntu.com/manpages/focal/man1/qmi-network.1.html).
160diff --git a/docs/reference/snap-configuration/debug.md b/docs/reference/snap-configuration/debug.md
161index 16b3bd8..8250ec6 100644
162--- a/docs/reference/snap-configuration/debug.md
163+++ b/docs/reference/snap-configuration/debug.md
164@@ -9,7 +9,7 @@ The debug configuration option controls the amount of logs produced by the
165 modem-manager snap. It is useful for collecting information required to either
166 report a bug or investigate a modem-manager failure.
167
168-It is disabled by default and has to be explicitely turned on for usage.
169+It is disabled by default and has to be explicitly turned on for usage.
170
171 Note that the debug logs may contain sensitive information.
172
173@@ -30,14 +30,14 @@ affects future executions of the MM daemon.
174
175 **Example:** Enable debug feature
176
177-```
178+```text
179 $ snap set modem-manager debug.enable=true
180 ```
181
182 <br/>
183 **Example:** Disable debug feature.
184
185-```
186+```text
187 $ snap set modem-manager debug.enable=false
188 ```
189
190@@ -46,6 +46,6 @@ $ snap set modem-manager debug.enable=false
191 The debug information, when enabled, will be available in the journal and can
192 be viewed with:
193
194-```
195+```text
196 $ journalctl --no-pager -u snap.modem-manager.modemmanager.service
197 ```
198diff --git a/docs/release-notes.md b/docs/release-notes.md
199index fe70927..3bfaeeb 100644
200--- a/docs/release-notes.md
201+++ b/docs/release-notes.md
202@@ -14,30 +14,56 @@ installed:
203 ```text
204 $ snap info modem-manager
205 name: modem-manager
206-summary: "ModemManager is a service which controls mobile broadband"
207-publisher: canonical
208-contact: snappy-canonical-storeaccount@canonical.com
209+summary: ModemManager is a service which controls mobile broadband
210+publisher: Canonical✓
211+store-url: https://snapcraft.io/modem-manager
212+contact: snaps@canonical.com
213+license: unset
214 description: |
215- ModemManager is a DBus-activated daemon which controls mobile broadband
216- (2G/3G/4G) devices and connections. Whether built-in devices, USB dongles,
217- bluetooth-paired telephones or professional RS232/USB devices with external
218- power supplies, ModemManager is able to prepare and configure the modems and
219- setup connections with them.
220+ ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and
221+ connections. Whether built-in devices, USB dongles, bluetooth-paired telephones or professional
222+ RS232/USB devices with external power supplies, ModemManager is able to prepare and configure the
223+ modems and setup connections with them.
224+
225+ The modem-manager snap is usually used together with the network-manager snap. The snap is geared
226+ towards devices and IoT and is optimized for Ubuntu Core. Its usage on desktop/server Ubuntu is
227+ possible, but manual connection of interfaces is needed and do not expect full integration with
228+ the GUI.
229+
230+ Documentation on how to use the snap can be found in
231+ https://docs.ubuntu.com/core/en/stacks/network/modem-manager/docs/.
232+
233 Please find the source code at
234 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager
235-
236 commands:
237- - modem-manager.mmcli (mmcli)
238-tracking: stable
239-installed: 1.6.2-3 (39) 5MB -
240-refreshed: 2017-03-02 07:49:36 +0000 UTC
241-channels:
242- stable: 1.6.2-3 (39) 5MB -
243- candidate: 1.6.2-3 (39) 5MB -
244- beta: 1.6.2-3 (39) 5MB -
245- edge: 1.6.2-3 (42) 5MB -
246+ - modem-manager.mbim-network
247+ - modem-manager.mbimcli
248+ - modem-manager.mmcli
249+ - modem-manager.qmi-network
250+ - modem-manager.qmicli
251+services:
252+ modem-manager.modemmanager: simple, enabled, active
253+snap-id: KtwxgRlwCAVKFw92BUdt1WloH1Va3QPo
254+tracking: 1.10/stable
255+refresh-date: today at 08:34 UTC
256+channels:
257+ 1.10/stable: 1.10.0-4 2020-01-21 (414) 1MB -
258+ 1.10/candidate: 1.10.0-4 2020-01-21 (414) 1MB -
259+ 1.10/beta: 1.10.0-4 2020-01-20 (414) 1MB -
260+ 1.10/edge: 1.10.0-5-dev 2020-02-11 (438) 1MB -
261+ latest/stable: 1.8.0-12 2020-02-04 (426) 1MB -
262+ latest/candidate: 1.8.0-12 2020-02-04 (426) 1MB -
263+ latest/beta: 1.8.0-12 2020-01-21 (426) 1MB -
264+ latest/edge: 1.8.0-12 2020-02-04 (426) 1MB -
265+ 20/stable: –
266+ 20/candidate: –
267+ 20/beta: 1.12.8-1 2020-06-22 (454) 1MB -
268+ 20/edge: 1.12.8-1-dev 2020-06-22 (451) 1MB -
269+installed: 1.10.0-4 (414) 1MB -
270 ```
271-</br>
272-## 1.6.2-3
273
274- * Update to upstream version 1.6.2
275+The detailed changelog for each version can be consulted in the sources for each track:
276+
277+* For track 20, [here](https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager/tree/ChangeLog?h=snap-20)
278+* For track 1.10, [here](https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager/tree/ChangeLog?h=snap-1.10)
279+* For track latest (note again this is not actually the more modern MM), [here](https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager/tree/ChangeLog)
280diff --git a/docs/report-bug.md b/docs/report-bug.md
281index b263433..2ee29d2 100644
282--- a/docs/report-bug.md
283+++ b/docs/report-bug.md
284@@ -6,6 +6,8 @@ table_of_contents: False
285 # Report a Bug
286
287 Bugs can be reported [here](https://bugs.launchpad.net/snappy-hwe-snaps/+filebug).
288+Note that this is only for bugs for the snap, if you are using the debian
289+package you should file bugs against the Ubuntu package.
290
291 If the bug can be reproduced, [enabling the debug
292 output](reference/snap-configuration/debug.md) before doing so is
293@@ -21,7 +23,7 @@ And the output of the following command:
294 $ sudo modem-manager.mmcli -m <N>
295 ```
296
297-, being <N> the modem number as reported by
298+, being `<N>` the modem number as reported by
299
300 ```text
301 $ sudo modem-manager.mmcli -L
302diff --git a/run-tests.sh b/run-tests.sh
303index 0b0679d..7f827b6 100755
304--- a/run-tests.sh
305+++ b/run-tests.sh
306@@ -1,4 +1,4 @@
307-#!/bin/sh
308+#!/bin/bash
309 #
310 # Copyright (C) 2016 Canonical Ltd
311 #
312@@ -16,64 +16,82 @@
313
314 set -e
315
316-TESTS_EXTRAS_URL="https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/tests-extras"
317-TESTS_EXTRAS_PATH=".tests-extras"
318+TESTS_EXTRAS_URL="https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/stack-snaps-tools"
319+TESTS_EXTRAS_PATH="tests-extras"
320
321-# Display help.
322-# This has to be in sync with the tests-extras/test-runner.sh script
323-# functionalities as the parameters to this one are passed directly there
324-# this function will quit the script because of the 'exec' keyword
325 show_help() {
326 exec cat <<'EOF'
327 Usage: run-tests.sh [OPTIONS]
328
329 This is fetch & forget script and what it does is to fetch the
330-tests-extras repository and execute the run-tests.sh script from
331+stack-snaps-tools repository and execute the run-tests.sh script from
332 there passing arguments as-is.
333
334-optional arguments:
335- --help Show this help message and exit
336- --channel Select another channel to build the base image from (default: stable)
337- --snap Extra snap to install
338- --debug Enable verbose debugging output
339- --test-from-channel Pull network-manager snap from the specified channel instead of building it from source
340- --force-new-image Force generating a new image used for testing
341+When you see this message you don't have the tests-extras folder
342+successfully populated in your workspace yet. Please rerun without
343+specifying --help to proceed with the initial clone of the git repository.
344 EOF
345 }
346
347-# Clone the tests-extras repository
348+# Clone the stack-snaps-tools repository
349 clone_tests_extras() {
350- echo "INFO: Fetching tests-extras scripts into $TESTS_EXTRAS_PATH ..."
351- git clone -b master $TESTS_EXTRAS_URL $TESTS_EXTRAS_PATH >/dev/null 2>&1
352- if [ $? -ne 0 ]; then
353- echo "ERROR: Failed to fetch the $TESTS_EXTRAS_URL repo, exiting.."
354- exit 1
355- fi
356+ echo "INFO: Fetching stack-snaps-tools scripts into $TESTS_EXTRAS_PATH ..."
357+ if ! git clone -b master $TESTS_EXTRAS_URL $TESTS_EXTRAS_PATH >/dev/null 2>&1; then
358+ echo "ERROR: Failed to fetch the $TESTS_EXTRAS_URL repo, exiting.."
359+ exit 1
360+ fi
361 }
362
363-# Make sure the already cloned tests-extras repository is in a known and update
364+# Make sure the already cloned stack-snaps-tools repository is in a known and update
365 # state before it is going to be used.
366 restore_and_update_tests_extras() {
367- echo "INFO: Restoring and updating $TESTS_EXTRAS_PATH"
368- cd $TESTS_EXTRAS_PATH && git reset --hard && git clean -dfx && git pull
369- cd -
370+ echo "INFO: Restoring and updating $TESTS_EXTRAS_PATH"
371+ cd $TESTS_EXTRAS_PATH && git reset --hard && git clean -dfx && git pull
372+ cd -
373 }
374
375 # ==============================================================================
376-# This is fetch & forget script and what it does is to fetch the tests-extras
377+# This is fetch & forget script and what it does is to fetch the stack-snaps-tools
378 # repo and execute the run-tests.sh script from there passing arguments as-is.
379 #
380-# The tests-extras repository ends up checked out in the snap tree but as a
381+# The stack-snaps-tools repository ends up checked out in the snap tree but as a
382 # hidden directory which is re-used since then.
383
384-# Display help w/o fetching anything and exit
385-[ "$1" = "--help" ] && show_help
386+# Find snap to use in the tests
387+snaps=$(find . -maxdepth 1 -type f -name \
388+ "*_*_$(dpkg-architecture -q DEB_HOST_ARCH).snap")
389+while read -r snap_file; do
390+ if [ -n "$snap" ]; then
391+ printf "More than one snap revision in the folder\n"
392+ exit 1
393+ fi
394+ snap=$PWD/${snap_file#*/}
395+done < <(printf "%s\n" "$snaps")
396+
397+[ ! -d "$TESTS_EXTRAS_PATH" ] && [ "$1" = "--help" ] && show_help
398
399 if [ -d "$TESTS_EXTRAS_PATH" ]; then
400- restore_and_update_tests_extras
401+ restore_and_update_tests_extras
402 else
403- clone_tests_extras
404+ clone_tests_extras
405+fi
406+
407+# Any project-specific options for test-runner should be specified in
408+# .tests_config under EXTRA_ARGS
409+if [ -f ".tests_config" ]; then
410+ # shellcheck disable=SC1091
411+ . .tests_config
412 fi
413
414+# Get backends
415+backends="--backends="
416+separator=""
417+while read -r be; do
418+ backends=$backends$separator${be##*.}
419+ separator=,
420+done < <(yq r spread.yaml --printMode p 'backends.qemu.systems[*].*')
421+
422 echo "INFO: Executing tests runner"
423-cd $TESTS_EXTRAS_PATH && ./tests-runner.sh "$@"
424+# shellcheck disable=SC2086
425+cd $TESTS_EXTRAS_PATH &&
426+ ./tests-runner.sh "$@" --snap="$snap" "$backends" $EXTRA_ARGS

Subscribers

People subscribed via source and target branches