<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/examples, branch th/device-availability</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>dispatcher: fix shellcheck warnings</title>
<updated>2018-10-06T08:03:48+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-10-04T07:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9e43821e1741e2800df00f71ced0569629b032ab'/>
<id>9e43821e1741e2800df00f71ced0569629b032ab</id>
<content type='text'>
Prefer [ p ] &amp;&amp; [ q ] as [ p -a q ] is not well defined.
And likewise, prefer [ p ] || [ q ] over [ p -o q ].

https://github.com/koalaman/shellcheck/wiki/SC2166
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prefer [ p ] &amp;&amp; [ q ] as [ p -a q ] is not well defined.
And likewise, prefer [ p ] || [ q ] over [ p -o q ].

https://github.com/koalaman/shellcheck/wiki/SC2166
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: misc. typos</title>
<updated>2018-09-15T07:08:03+00:00</updated>
<author>
<name>luz.paz</name>
<email>luzpaz@users.noreply.github.com</email>
</author>
<published>2018-09-15T03:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=f985b6944a1147281e34721c96db1a41baca65b3'/>
<id>f985b6944a1147281e34721c96db1a41baca65b3</id>
<content type='text'>
Found via `codespell -q 3 --skip="*.po"`

https://github.com/NetworkManager/NetworkManager/pull/203
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found via `codespell -q 3 --skip="*.po"`

https://github.com/NetworkManager/NetworkManager/pull/203
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: make 10-ifcfg-rh-routes.sh self-contained</title>
<updated>2018-08-28T16:56:56+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-08-20T18:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=357edff198aa732e25073b84a4da3e53293e2602'/>
<id>357edff198aa732e25073b84a4da3e53293e2602</id>
<content type='text'>
Don't call the 'if{up,down}-routes' scripts because in next Fedora
versions network scripts will be deprecated and will not be present in
the default installation.

Instead, just copy and adapt the code from those scripts.

https://bugzilla.redhat.com/show_bug.cgi?id=1618419
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't call the 'if{up,down}-routes' scripts because in next Fedora
versions network scripts will be deprecated and will not be present in
the default installation.

Instead, just copy and adapt the code from those scripts.

https://bugzilla.redhat.com/show_bug.cgi?id=1618419
</pre>
</div>
</content>
</entry>
<entry>
<title>all: don't use gchar/gshort/gint/glong but C types</title>
<updated>2018-07-11T10:02:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-07-11T05:40:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e1c7a2b5d0b142a3d4347ec6f1934f53c4b402a9'/>
<id>e1c7a2b5d0b142a3d4347ec6f1934f53c4b402a9</id>
<content type='text'>
We commonly don't use the glib typedefs for char/short/int/long,
but their C types directly.

    $ git grep '\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;' | wc -l
    587
    $ git grep '\&lt;\(char\|short\|int\|long\|float\|double\)\&gt;' | wc -l
    21114

One could argue that using the glib typedefs is preferable in
public API (of our glib based libnm library) or where it clearly
is related to glib, like during

  g_object_set (obj, PROPERTY, (gint) value, NULL);

However, that argument does not seem strong, because in practice we don't
follow that argument today, and seldomly use the glib typedefs.
Also, the style guide for this would be hard to formalize, because
"using them where clearly related to a glib" is a very loose suggestion.

Also note that glib typedefs will always just be typedefs of the
underlying C types. There is no danger of glib changing the meaning
of these typedefs (because that would be a major API break of glib).

A simple style guide is instead: don't use these typedefs.

No manual actions, I only ran the bash script:

  FILES=($(git ls-files '*.[hc]'))
  sed -i \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;\( [^ ]\)/\1\2/g' \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;  /\1   /g' \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;/\1/g' \
      "${FILES[@]}"
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We commonly don't use the glib typedefs for char/short/int/long,
but their C types directly.

    $ git grep '\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;' | wc -l
    587
    $ git grep '\&lt;\(char\|short\|int\|long\|float\|double\)\&gt;' | wc -l
    21114

One could argue that using the glib typedefs is preferable in
public API (of our glib based libnm library) or where it clearly
is related to glib, like during

  g_object_set (obj, PROPERTY, (gint) value, NULL);

However, that argument does not seem strong, because in practice we don't
follow that argument today, and seldomly use the glib typedefs.
Also, the style guide for this would be hard to formalize, because
"using them where clearly related to a glib" is a very loose suggestion.

Also note that glib typedefs will always just be typedefs of the
underlying C types. There is no danger of glib changing the meaning
of these typedefs (because that would be a major API break of glib).

A simple style guide is instead: don't use these typedefs.

No manual actions, I only ran the bash script:

  FILES=($(git ls-files '*.[hc]'))
  sed -i \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;\( [^ ]\)/\1\2/g' \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;  /\1   /g' \
      -e 's/\&lt;g\(char\|short\|int\|long\|float\|double\)\&gt;/\1/g' \
      "${FILES[@]}"
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/python: drop nmex.py</title>
<updated>2018-06-29T18:05:39+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-06-15T12:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=59ccf5dc89b063528bb23fbe9a6700c2874452a2'/>
<id>59ccf5dc89b063528bb23fbe9a6700c2874452a2</id>
<content type='text'>
It's not an example and not actually used.

https://github.com/NetworkManager/NetworkManager/pull/141
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not an example and not actually used.

https://github.com/NetworkManager/NetworkManager/pull/141
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/qt/meson: drop dbus-glib dependency</title>
<updated>2018-06-28T18:41:12+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-06-26T16:14:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=79fe82753dea6716ed5ea2929487fb5bc9116c45'/>
<id>79fe82753dea6716ed5ea2929487fb5bc9116c45</id>
<content type='text'>
It's not actually required.

(cherry picked from commit 22813fdc6005fa3ed0ecddfdb21fefd4bea616c3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not actually required.

(cherry picked from commit 22813fdc6005fa3ed0ecddfdb21fefd4bea616c3)
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/python: utilize nm_utils_get_timestamp_msec()</title>
<updated>2018-06-15T14:23:30+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-06-15T12:42:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1b6127d1bcf66fd7304fe894a6933ad2ffe0092c'/>
<id>1b6127d1bcf66fd7304fe894a6933ad2ffe0092c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "example/python: avoid falling back to CLOCK_MONOTONIC"</title>
<updated>2018-06-15T06:36:22+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-06-15T06:36:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9c0db9809496bad98d8d62e4f42a5643af9eccab'/>
<id>9c0db9809496bad98d8d62e4f42a5643af9eccab</id>
<content type='text'>
This breaks client tests on avery old kernel (2.6.32, RHEL 6).

  Traceback (most recent call last):
    File "./clients/tests/test-client.py", line 699, in setUp
      self.srv = NMStubServer(self._testMethodName)
    File "./clients/tests/test-client.py", line 309, in __init__
      start = nmex.nm_boot_time_ns()
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 54, in nm_boot_time_ns
      return sys_clock_gettime_ns(CLOCK_BOOTTIME)
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 50, in sys_clock_gettime_ns
      return _sys_clock_gettime_ns(clock_id)
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 39, in f
      raise OSError(errno_, os.strerror(errno_))
  OSError: [Errno 22] Invalid argument

This reverts commit 119e828dbeeeab134e83890b18d0b7a0c1838786.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This breaks client tests on avery old kernel (2.6.32, RHEL 6).

  Traceback (most recent call last):
    File "./clients/tests/test-client.py", line 699, in setUp
      self.srv = NMStubServer(self._testMethodName)
    File "./clients/tests/test-client.py", line 309, in __init__
      start = nmex.nm_boot_time_ns()
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 54, in nm_boot_time_ns
      return sys_clock_gettime_ns(CLOCK_BOOTTIME)
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 50, in sys_clock_gettime_ns
      return _sys_clock_gettime_ns(clock_id)
    File "/builddir/build/BUILD/NetworkManager-1.11.4/examples/python/nmex.py", line 39, in f
      raise OSError(errno_, os.strerror(errno_))
  OSError: [Errno 22] Invalid argument

This reverts commit 119e828dbeeeab134e83890b18d0b7a0c1838786.
</pre>
</div>
</content>
</entry>
<entry>
<title>example/python: avoid falling back to CLOCK_MONOTONIC</title>
<updated>2018-06-14T15:30:06+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-06-13T14:23:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=119e828dbeeeab134e83890b18d0b7a0c1838786'/>
<id>119e828dbeeeab134e83890b18d0b7a0c1838786</id>
<content type='text'>
According to the D-Bus API specification we return CLOCK_BOOTTIME only.
We don't support kernels too old to have it -- the fall back to
CLOCK_MONOTONIC is only there to be able to run unit tests on RHEL 6
kernel and will eventually go away.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the D-Bus API specification we return CLOCK_BOOTTIME only.
We don't support kernels too old to have it -- the fall back to
CLOCK_MONOTONIC is only there to be able to run unit tests on RHEL 6
kernel and will eventually go away.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: add ipv4.dhcp-client-id and ipv6.dhcp-duid to 30-anon.conf example</title>
<updated>2018-06-12T12:45:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-06-11T11:08:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=fd878d826129141043e7b30e6521b23544c8967e'/>
<id>fd878d826129141043e7b30e6521b23544c8967e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
