Commit graph

21212 commits

Author SHA1 Message Date
Thomas Haller 815834aebc build: fix error message in configure script about gtk-doc 2018-09-14 08:17:32 +02:00
Thomas Haller 5023e089c6 contrib/rpm: disable --with-more-asserts for devel-builds
The NetworkManager spec file used to determine devel builds as those that
have an odd minor version number. In that case, the built package would
enable more-asserts.
-- By the way, why is '1.13.3-dev' considered a delopment version worthy of more
asserts, but a build from the development phase of the next minor release on
'nm-1-12' branch not?

Note that during the development phase of Fedora (and sometimes even afterwards),
we commonly package development versions from 'master'. For example '1.12.0-0.1',
which is some snapshot with version number '1.11.x-dev' (or '1.12-rc1' in this case),
but before the actual '1.12.0' release.

It's problematic that for part of the devel phase we compile the
package for the distribution with more assertions. This package is
significanly different and rpmdiff and coverity give different results
for them.
For example, the binary size of debug packages is larger, so first
rpmdiff will complain that the binary sized increased (compare to the
previous version) and then later it decreases again.
Likewise, coverity finds significantly different issues on a debug
build. For example, it sees assertions against NULL and takes that
as a hint as to whether the parameter can/shall be NULL. Keeping
coverity warnings low is already high effort to sort out false
positives. We should not invest time in checking debug builds with
coverity, at least not as long as there are more important issues.

But more importantly, the --with-more-asserts configure option governs whether
nm_assert() is enabled. The only point of existance of nm_assert() -- compared to
g_assert(), g_return_*() and assert() -- is that this variant is disabled by default.
It's only used for checks that are really really not supposed to fail and/or
which may be expensive to do. This is useful for developing and CI,
but it's not right to put into the distribution. It really enables
assertions that you don't want in such a scenario. Enabling them even
for distribution builds defeats their purpose. If you care about an
assertion to be usually/always enabled, you should use g_assert() or
g_return_*() instead.

What this changes, that "devel" builds in koji/brew do not have more-asserts
enabled. When manually building the SRPM one still can enable it,
for example via

  $ ./contrib/fedora/rpm/build_clean.sh -w debug

Also our CI has an option to build packages with or without more-asserts
(defaulting to more asserts already).

(cherry picked from commit b4e2f83403)
2018-09-14 08:16:57 +02:00
Thomas Haller b4e2f83403 contrib/rpm: disable --with-more-asserts for devel-builds
The NetworkManager spec file used to determine devel builds as those that
have an odd minor version number. In that case, the built package would
enable more-asserts.
-- By the way, why is '1.13.3-dev' considered a delopment version worthy of more
asserts, but a build from the development phase of the next minor release on
'nm-1-12' branch not?

Note that during the development phase of Fedora (and sometimes even afterwards),
we commonly package development versions from 'master'. For example '1.12.0-0.1',
which is some snapshot with version number '1.11.x-dev' (or '1.12-rc1' in this case),
but before the actual '1.12.0' release.

It's problematic that for part of the devel phase we compile the
package for the distribution with more assertions. This package is
significanly different and rpmdiff and coverity give different results
for them.
For example, the binary size of debug packages is larger, so first
rpmdiff will complain that the binary sized increased (compare to the
previous version) and then later it decreases again.
Likewise, coverity finds significantly different issues on a debug
build. For example, it sees assertions against NULL and takes that
as a hint as to whether the parameter can/shall be NULL. Keeping
coverity warnings low is already high effort to sort out false
positives. We should not invest time in checking debug builds with
coverity, at least not as long as there are more important issues.

But more importantly, the --with-more-asserts configure option governs whether
nm_assert() is enabled. The only point of existance of nm_assert() -- compared to
g_assert(), g_return_*() and assert() -- is that this variant is disabled by default.
It's only used for checks that are really really not supposed to fail and/or
which may be expensive to do. This is useful for developing and CI,
but it's not right to put into the distribution. It really enables
assertions that you don't want in such a scenario. Enabling them even
for distribution builds defeats their purpose. If you care about an
assertion to be usually/always enabled, you should use g_assert() or
g_return_*() instead.

What this changes, that "devel" builds in koji/brew do not have more-asserts
enabled. When manually building the SRPM one still can enable it,
for example via

  $ ./contrib/fedora/rpm/build_clean.sh -w debug

Also our CI has an option to build packages with or without more-asserts
(defaulting to more asserts already).
2018-09-14 08:07:27 +02:00
AsciiWolf 210e28f7e9 po: update Czech (cz) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/13
(cherry picked from commit 69b4b28bb8)
2018-09-13 17:07:46 +02:00
AsciiWolf 69b4b28bb8 po: update Czech (cz) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/13
2018-09-13 17:06:38 +02:00
Thomas Haller d08530ac4b wifi: fix leaking fake AP in NMDeviceWifi's act_stage1_prepare()
Fixes: 96f40dcdcd
(cherry picked from commit ef61d7909f)
2018-09-13 16:28:55 +02:00
Thomas Haller ef61d7909f wifi: fix leaking fake AP in NMDeviceWifi's act_stage1_prepare()
Fixes: 96f40dcdcd
2018-09-13 16:23:36 +02:00
Thomas Haller d01b37c46f libnm: fix memleak in _nm_utils_ssid_to_string_arr()
Fixes: 5cd4e6f3e6
(cherry picked from commit 54e1f73e0c)
2018-09-13 16:18:34 +02:00
Thomas Haller 54e1f73e0c libnm: fix memleak in _nm_utils_ssid_to_string_arr()
Fixes: 5cd4e6f3e6
2018-09-13 16:18:11 +02:00
Beniamino Galvani 8309a7a696 dns: dnsmasq: avoid crash when no reverse domains exist
ip_data->domains.reverse can be NULL when the device is being removed
and has no IP configuration for a short moment.

Fixes: 6409e7719c

https://bugzilla.gnome.org/show_bug.cgi?id=797022
(cherry picked from commit f0c075f050)
2018-09-13 15:07:57 +02:00
Beniamino Galvani f0c075f050 dns: dnsmasq: avoid crash when no reverse domains exist
ip_data->domains.reverse can be NULL when the device is being removed
and has no IP configuration for a short moment.

Fixes: 6409e7719c

https://bugzilla.gnome.org/show_bug.cgi?id=797022
2018-09-13 15:05:31 +02:00
Beniamino Galvani 5713acfe72 build: merge branch 'bg/meson-paths'
https://github.com/NetworkManager/NetworkManager/pull/198
(cherry picked from commit 4a1ff8ad8c)
2018-09-13 14:36:35 +02:00
Thomas Haller 51d7ae2ba7 build/autotools: fail configure if netconfig/resolveconf tool is not found
If the user explicitly passes --with-netconfig=$PATH or --with-resolvconf=$PATH,
the path is accepted as is. We only do autodetection, if the binary was not found.

In that case, if the binary cannot be found in the common paths fail compilation.

(cherry picked from commit 5b36585a3d)
2018-09-13 14:35:35 +02:00
Thomas Haller 4fc3bdb45c travis: enabling building more optional components during CI with meson
After fixing meson build for these components, enable them for
build in travis.

(cherry picked from commit 0dda7586e4)
2018-09-13 14:35:33 +02:00
Beniamino Galvani 7e1443746b build: rename DNSSEC_TRIGGER_SCRIPT to DNSSEC_TRIGGER_PATH
Rename the define for consistency, since the configure option is named
'dnssec-trigger'.

(cherry picked from commit 8e776955ee)
2018-09-13 14:35:32 +02:00
Beniamino Galvani e86b552e0c build: print both pppd path and plugins path in configure summary
Reported-by: Michael Biebl <biebl@debian.org>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/25
(cherry picked from commit ff837b2686)
2018-09-13 14:35:30 +02:00
Beniamino Galvani 7ba7c1038d build: meson: fix NMSTATEDIR path
Reported-by: Michael Biebl <biebl@debian.org>
(cherry picked from commit 8c77ca1a6d)
2018-09-13 14:35:29 +02:00
Beniamino Galvani bb12dfa442 build: meson: add missing libnm-core header file
Reported-by: Michael Biebl <biebl@debian.org>
Fixes: df30651b89
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/31
(cherry picked from commit e2522c8c2d)
2018-09-13 14:35:28 +02:00
Beniamino Galvani ec123d3bf4 build: meson: generate and use a linker script for NM binary
Generate the NetworkManager.ver link script to link the NM binary so
that unneeded symbol are unexported and can be dropped, reducing the
binary size.

Reported-by: Michael Biebl <biebl@debian.org>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/33
(cherry picked from commit dfa2a2b40c)
2018-09-13 14:35:26 +02:00
Beniamino Galvani 10ca2444b9 build: support meson builds in create-exports script
(cherry picked from commit 9b4bc0824c)
2018-09-13 14:35:25 +02:00
Beniamino Galvani fb0d36a883 build: add config-extra.h.meson to EXTRA_DIST
Reported-by: Michael Biebl <biebl@debian.org>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/22
(cherry picked from commit 5ebe5efa7a)
2018-09-13 14:35:23 +02:00
Beniamino Galvani 6220bae2d3 ifcfg-rh: fix build with meson
The shared object was missing some files.

(cherry picked from commit bd556c8937)
2018-09-13 14:35:22 +02:00
Beniamino Galvani e37e4d0fb6 build: autotools: remove unused defines
Remove AC_DEFINE()s that add unused entries to config.h.

(cherry picked from commit 8b313d4c54)
2018-09-13 14:35:20 +02:00
Beniamino Galvani 5a0cef2f36 build: meson: uniform handling of rc managers
Handle all rc managers paths through the same code.

(cherry picked from commit 2fd7559819)
2018-09-13 14:35:19 +02:00
Beniamino Galvani 73249e2ef7 build: meson: uniform handling of dhcp client paths
Handle all dhcp client paths through the same code.

(cherry picked from commit 36b0e46146)
2018-09-13 14:35:18 +02:00
Beniamino Galvani 4fd6623161 build: move paths of dhcp clients from config-extra.h to config.h
Some path variable like $(bindir), $(datadir), etc. are special for
autotools and must be handled separately through config-extra.h.

But dhcp path variables are just normal variables defined through
the configure script and should go into config.h.

(cherry picked from commit 087c367d62)
2018-09-13 14:35:15 +02:00
Beniamino Galvani b66607af95 build: remove check on dhcpcd version number
dhcpcd version 6, the first supporting IPv6, was released more than 5
years ago. Remove all checks on version number and IPv6 support.

(cherry picked from commit e0c49d7341)
2018-09-13 14:35:14 +02:00
Beniamino Galvani 365482bf5e build: remove check on dhclient version
dhclient 4.0 was released more than 10 years ago. I think it is
reasonable to expect that nobody is using an older version today.

https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=shortlog;h=refs/tags/v4_0_0
(cherry picked from commit 9e61ea7040)
2018-09-13 14:35:13 +02:00
Beniamino Galvani bda3bb931b build: meson: fix pppd path
Allow specifying a non-existent path.

(cherry picked from commit 794e499ab8)
2018-09-13 14:35:12 +02:00
Beniamino Galvani e860a2e09c build: meson: fix setting iptables/dnsmasq/dnssec-trigger paths
Handle the iptables, dnsmasq and dnssec-trigger paths in the same way
through common code.

The path set by user must be accepted as is, even if does not exist,
because this is a requirement for cross-compilation. When user does
not specify a path, search a predefined set of paths and fall back to
an hardcoded one.

(cherry picked from commit 220dea0948)
2018-09-13 14:35:10 +02:00
Beniamino Galvani 0e845fc28b build/meson: merge branch 'heftig/pr/12'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/12
(cherry picked from commit 08d19df209)
2018-09-13 14:33:50 +02:00
Jan Alexander Steffens (heftig) 9f2b05c1e6 meson: Fix vapi build
Apparently vapigen can't find the NetworkManager-1.0.gir belonging to
libnm-util.vapi.

(cherry picked from commit 44f14e969b)
2018-09-13 14:33:20 +02:00
Jan Alexander Steffens (heftig) c6cd8b3ee1 meson: Fix libnm-util build
This was broken by e01f7f2c6d.
Port the commit's changes from libnm to libnm-util.

(cherry picked from commit 4bfd0bab0d)
2018-09-13 14:33:16 +02:00
Jan Alexander Steffens (heftig) 58e5627909 meson: Use libexecdir for dnssec-trigger-script fallback
Use an `if` to keep line length down.

(cherry picked from commit 5b042b16ca)
2018-09-13 14:33:14 +02:00
Jan Alexander Steffens (heftig) 9de4cc53a5 gitignore: Fix *.stamp ignore
ripgrep complains about the invalid `**`.

(cherry picked from commit 1fad494c34)
2018-09-13 14:33:11 +02:00
Beniamino Galvani 4a1ff8ad8c build: merge branch 'bg/meson-paths'
https://github.com/NetworkManager/NetworkManager/pull/198
2018-09-13 11:54:17 +02:00
Thomas Haller 5b36585a3d build/autotools: fail configure if netconfig/resolveconf tool is not found
If the user explicitly passes --with-netconfig=$PATH or --with-resolvconf=$PATH,
the path is accepted as is. We only do autodetection, if the binary was not found.

In that case, if the binary cannot be found in the common paths fail compilation.
2018-09-13 11:49:25 +02:00
Thomas Haller 0dda7586e4 travis: enabling building more optional components during CI with meson
After fixing meson build for these components, enable them for
build in travis.
2018-09-13 11:49:25 +02:00
Beniamino Galvani 8e776955ee build: rename DNSSEC_TRIGGER_SCRIPT to DNSSEC_TRIGGER_PATH
Rename the define for consistency, since the configure option is named
'dnssec-trigger'.
2018-09-13 11:49:25 +02:00
Beniamino Galvani ff837b2686 build: print both pppd path and plugins path in configure summary
Reported-by: Michael Biebl <biebl@debian.org>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/25
2018-09-13 11:53:35 +02:00
Beniamino Galvani 8c77ca1a6d build: meson: fix NMSTATEDIR path
Reported-by: Michael Biebl <biebl@debian.org>
2018-09-13 11:49:25 +02:00
Beniamino Galvani e2522c8c2d build: meson: add missing libnm-core header file
Reported-by: Michael Biebl <biebl@debian.org>
Fixes: df30651b89
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/31
2018-09-13 11:51:13 +02:00
Beniamino Galvani dfa2a2b40c build: meson: generate and use a linker script for NM binary
Generate the NetworkManager.ver link script to link the NM binary so
that unneeded symbol are unexported and can be dropped, reducing the
binary size.

Reported-by: Michael Biebl <biebl@debian.org>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/33
2018-09-13 11:50:45 +02:00
Beniamino Galvani 9b4bc0824c build: support meson builds in create-exports script 2018-09-13 11:49:25 +02:00
Beniamino Galvani 5ebe5efa7a build: add config-extra.h.meson to EXTRA_DIST
Reported-by: Michael Biebl <biebl@debian.org>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/22
2018-09-13 11:50:39 +02:00
Beniamino Galvani bd556c8937 ifcfg-rh: fix build with meson
The shared object was missing some files.
2018-09-13 11:49:25 +02:00
Beniamino Galvani 8b313d4c54 build: autotools: remove unused defines
Remove AC_DEFINE()s that add unused entries to config.h.
2018-09-13 11:49:25 +02:00
Beniamino Galvani 2fd7559819 build: meson: uniform handling of rc managers
Handle all rc managers paths through the same code.
2018-09-13 11:49:25 +02:00
Beniamino Galvani 36b0e46146 build: meson: uniform handling of dhcp client paths
Handle all dhcp client paths through the same code.
2018-09-13 11:49:25 +02:00
Beniamino Galvani 087c367d62 build: move paths of dhcp clients from config-extra.h to config.h
Some path variable like $(bindir), $(datadir), etc. are special for
autotools and must be handled separately through config-extra.h.

But dhcp path variables are just normal variables defined through
the configure script and should go into config.h.
2018-09-13 11:50:32 +02:00