usertags 637769 + pca.it-communication
thanks

Hi there!

I just found out that this bug got more attention during the last days,
while I was preparing (and testing) the patch below.  I decided to
anyway sent this email because it was ready (I was simply waiting to
come back online, check the Git repository and commit...).

Because of the ongoing discussion on debian-devel@ (thanks to Josselin
and Michal) I discovered that it is actually possible to use
network-manager without the GUI:

  <http://lists.debian.org/1332506635.4294.9.camel@tomoyo>
  <http://lists.debian.org/[email protected]>

This bug is tightly-linked to #641902, because ATM there is no way to
create a connection through nmcli.

On Sun, 14 Aug 2011 11:05:06 +0200, Tzafrir Cohen wrote:
> Below is an example system-connection file I used in the recent weeks.
> It seems to be good enough for practically anyhwere, even though it
> only configures wifi (unencrypted, WPA2-psk and WEP).
>
> As implied from the text, including the reference (settings-spec.html)
> in the package would also be nice.

The other option would be to include a fully-commented system-connection
file similar to what wpasupplicant does, with the disadvantage that it
should be manually updated over time:

  <file:///usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.gz>

OTOH, the reference file (since 0.9 called ref-settings.html despite the
HTML title still says "Network Configuration Setting Specification") is
already shipped by the network-manager-dev package (FWIW not really in a
"standard" location):

  <file:///usr/share/gtk-doc/html/NetworkManager/ref-settings.html>

IMHO the best option would be to include a basic example which explains
the format of system-connection files and directs to the full
network-manager-dev package.

Attached a Git and improved version of your patch, with some notes:

1) I was not able to find 'genuuid' in Debian sid, so I replaced it with
   uuidgen (shipped by the uuid-runtime package).

2) a symlink to /usr/share/gtk-doc/html/NetworkManager/ is created in
   /usr/share/doc/network-manager-dev/html to ease documentation lookup.

On Wed, 04 Apr 2012 17:23:24 +0200, Michael Biebl wrote:
> On 04.04.2012 16:28, Tzafrir Cohen wrote:
>> Update: a simple script to generate simple system-connections entry for
>> a wi-fi connection.
>
> thanks for the script, but I'm a bit uncertain about shipping it system
> wide. People might get used to it and then it's hard to get rid of it
> again. Maybe as example script in /usr/share/doc.

I have not tried Tzafrir's script, but any solution not involving nmcli
still requires root access to /etc/NetworkManager/system-connections/,
thus it is suboptimal.

> That said, we seriously need to grow a
> "nmcli con add" command.

Which, as I wrote at the beginning, is #641902.  Nevertheless, having
better documentation is still useful.

Thx, bye,
Gismo / Luca

From 0e5730785405e0d7fea4e7e590585b05dfe3b468 Mon Sep 17 00:00:00 2001
From: Luca Capello <[email protected]>
Date: Fri, 6 Apr 2012 01:55:33 +0200
Subject: [PATCH] debian/system-connection_wireless: (Closes: #637769) new
 file

---
 debian/changelog                  |   12 +++++++++++
 debian/rules                      |    6 +++++
 debian/system-connection_wireless |   38 +++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 debian/system-connection_wireless

diff --git a/debian/changelog b/debian/changelog
index f0ad4e7..0c86d09 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+network-manager (0.9.4.0-4) UNRELEASED; urgency=low
+
+  [ Luca Capello ]
+  * debian/system-connection_wireless:
+    + new file, thanks to Tzafrir Cohen. (Closes: #637769)
+  * debian/rules:
+    + install the examples file in the network-manager binary package.
+    + link the network-manager-dev GTK+ documentation in the Debian
+      documentation folder.
+
+ --
+
 network-manager (0.9.4.0-3) unstable; urgency=low
 
   * debian/patches/12-initialize-gerror.patch: Initialize GError, else invalid
diff --git a/debian/rules b/debian/rules
index 4ee224f..f63d5af 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,9 +26,15 @@ override_dh_install:
 	install -m 755 debian/ifblacklist_migrate.sh \
 		debian/network-manager/usr/lib/NetworkManager
 
+override_dh_installexamples:
+	dh_installexamples -pnetwork-manager debian/system-connection_wireless
+
 override_dh_installinit:
 	dh_installinit -pnetwork-manager -R -- start 26 2 3 4 5 . stop 88 0 1 6 .
 
+override_dh_link:
+	dh_link -pnetwork-manager-dev /usr/share/gtk-doc/html/NetworkManager /usr/share/doc/network-manager-dev/html
+
 override_dh_makeshlibs:
 	dh_makeshlibs -X/usr/lib/NetworkManager/ -X/usr/lib/pppd/
 
diff --git a/debian/system-connection_wireless b/debian/system-connection_wireless
new file mode 100644
index 0000000..1404ddf
--- /dev/null
+++ b/debian/system-connection_wireless
@@ -0,0 +1,38 @@
+##### Example NetworkManager system-connection file ####################
+#
+# This file describes a basic configuration file format for wireless
+# connections.  It includes some common options, for a full reference,
+# see /usr/share/gtk-doc/html/NetworkManager/ref-settings.html
+# (shipped by the network-manager-dev package).
+#
+# Rename and drop it over the /etc/NetworkManager/system-connections/
+# folder with owner/group 'root' and permissions 600.  The
+# NetworkManager daemon watches the directory with inotify, so no
+# further manual intervention is needed.
+#
+# Be sure to set a different UUID for each new system-connection file,
+# using the output of `cat /proc/sys/kernel/random/uuid` or simply via
+# uuidgen (shipped by the uuid-runtime package).
+#
+# Empty lines and lines starting with # are ignored.
+
+# Any comment before the '[connection]' stanza will be deleted.
+[connection]
+type=802-11-wireless
+id=REPLACE_WITH_AN_ARBITRARY_NAME
+uuid=01234567-89ab-cdef-0123-456789abcdef
+
+[802-11-wireless]
+ssid=REPLACE_WITH_THE_ACCESS_POINT_SSID
+# Only enable the next line if the connection is encrypted and set a
+# proper value in the following stanza, according to the authenticated
+# key management protocol.
+#security=802-11-wireless-security
+
+#[802-11-wireless-security]
+# WEP
+#key-mgmt=none
+#wep-key0=REPLACE_WITH_YOUR_WEP_KEY
+# WPA-PSK/WPA2-PSK (infrastructure)
+#key-mgmt=wpa-psk
+#psk=REPLACE_WITH_YOUR_WPA_KEY
-- 
1.7.9.1

Attachment: pgp6EjArCVDU8.pgp
Description: PGP signature

Reply via email to