<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/nm-dcb.c, branch th/fix-python-test</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>all: SPDX header conversion</title>
<updated>2019-09-10T09:19:56+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2019-09-10T09:19:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=24028a22467275671df71cc6a8054036b37d8f03'/>
<id>24028a22467275671df71cc6a8054036b37d8f03</id>
<content type='text'>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>all: drop emacs file variables from source files</title>
<updated>2019-06-11T08:04:00+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-06-02T12:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c0e075c90263150bd00ea033dbbd2d8e6b05300e'/>
<id>c0e075c90263150bd00ea033dbbd2d8e6b05300e</id>
<content type='text'>
We no longer add these. If you use Emacs, configure it yourself.

Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.

No manual changes, just ran commands:

    F=($(git grep -l -e '-\*-'))
    sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
    sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"

Check remaining lines with:

    git grep -e '-\*-'

The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We no longer add these. If you use Emacs, configure it yourself.

Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.

No manual changes, just ran commands:

    F=($(git grep -l -e '-\*-'))
    sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
    sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"

Check remaining lines with:

    git grep -e '-\*-'

The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
</pre>
</div>
</content>
</entry>
<entry>
<title>dcb: fix invalid assertion in dcb's do_helper()</title>
<updated>2019-04-16T13:30:14+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-04-16T13:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=48f1cdc735f684b4f73f244de91d3e40c01c0114'/>
<id>48f1cdc735f684b4f73f244de91d3e40c01c0114</id>
<content type='text'>
https://bugzilla.redhat.com/show_bug.cgi?id=1700408

Fixes: a55c10754a69 ('dcb: cleanup do_helper() in "nm-dcb.c"')
(cherry picked from commit 76584e8f1d401c506e415404010e9d47d0001a7a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugzilla.redhat.com/show_bug.cgi?id=1700408

Fixes: a55c10754a69 ('dcb: cleanup do_helper() in "nm-dcb.c"')
(cherry picked from commit 76584e8f1d401c506e415404010e9d47d0001a7a)
</pre>
</div>
</content>
</entry>
<entry>
<title>dcb: cleanup do_helper() in "nm-dcb.c"</title>
<updated>2019-04-10T13:05:57+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-04-04T11:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a55c10754a69e0e5b4046a1d6972fa2a635928e5'/>
<id>a55c10754a69e0e5b4046a1d6972fa2a635928e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>all: drop unnecessary includes of &lt;errno.h&gt; and &lt;string.h&gt;</title>
<updated>2019-02-12T07:50:28+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-01-31T12:44:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a3370af3a8a965e41950c5022182730d79614df2'/>
<id>a3370af3a8a965e41950c5022182730d79614df2</id>
<content type='text'>
"nm-macros-interal.h" already includes &lt;errno.h&gt; and &lt;string.h&gt;.
No need to include it everywhere else too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"nm-macros-interal.h" already includes &lt;errno.h&gt; and &lt;string.h&gt;.
No need to include it everywhere else too.
</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>build: don't add subdirectories to include search path but require qualified include</title>
<updated>2016-11-21T13:26:37+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-11-20T23:43:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=44ecb41593bc627d8f4529e74de4a549cf24a695'/>
<id>44ecb41593bc627d8f4529e74de4a549cf24a695</id>
<content type='text'>
Keep the include paths clean and separate. We use directories to group source
files together. That makes sense (I guess), but then we should use this
grouping also when including files. Thus require to #include files with their
path relative to "src/".

Also, we build various artifacts from the "src/" tree. Instead of having
individual CFLAGS for each artifact in Makefile.am, the CFLAGS should be
unified. Previously, the CFLAGS for each artifact differ and are inconsistent
in which paths they add to the search path. Fix the inconsistency by just
don't add the paths at all.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keep the include paths clean and separate. We use directories to group source
files together. That makes sense (I guess), but then we should use this
grouping also when including files. Thus require to #include files with their
path relative to "src/".

Also, we build various artifacts from the "src/" tree. Instead of having
individual CFLAGS for each artifact in Makefile.am, the CFLAGS should be
unified. Previously, the CFLAGS for each artifact differ and are inconsistent
in which paths they add to the search path. Fix the inconsistency by just
don't add the paths at all.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: cleanup includes and let "nm-default.h" include "config.h"</title>
<updated>2016-02-19T16:53:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-02-19T13:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8bace23bebcc28396460663203d54aac4ec8ffbf'/>
<id>8bace23bebcc28396460663203d54aac4ec8ffbf</id>
<content type='text'>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</pre>
</div>
</content>
</entry>
<entry>
<title>all: make use of new header file "nm-default.h"</title>
<updated>2015-08-05T13:32:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-07-17T12:38:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=19c3ea948a7c74774621baf62d68cb4826e1b97c'/>
<id>19c3ea948a7c74774621baf62d68cb4826e1b97c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>all: rename nm-glib-compat.h to nm-glib.h, use everywhere</title>
<updated>2015-07-24T17:25:47+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@redhat.com</email>
</author>
<published>2015-04-06T20:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3452ee2a0e3d04a324e7b9cd153323a353d5c182'/>
<id>3452ee2a0e3d04a324e7b9cd153323a353d5c182</id>
<content type='text'>
Rather than randomly including one or more of &lt;glib.h&gt;,
&lt;glib-object.h&gt;, and &lt;gio/gio.h&gt; everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include &lt;gio/gio.h&gt; from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.

(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)

Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than randomly including one or more of &lt;glib.h&gt;,
&lt;glib-object.h&gt;, and &lt;gio/gio.h&gt; everywhere (and forgetting to include
"nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
nm-glib.h, include &lt;gio/gio.h&gt; from there, and then change all .c
files in NM to include "nm-glib.h" rather than including the glib
headers directly.

(Public headers files still have to include the real glib headers,
since nm-glib.h isn't installed...)

Also, remove glib includes from header files that are already
including a base object header file (which must itself already include
the glib headers).
</pre>
</div>
</content>
</entry>
</feed>
