Although having different parts of NM in different subdirectories
keeps the source tree neat, it has made the build messy, particularly
because of cross-dependencies between the subdirs.
Reorganize to build all of the pieces of the NetworkManager binary
from src/Makefile, and only use recursive make for test programs,
helper binaries, and plugins.
As part of this, get rid of all the per-directory convenience
libraries, and switch to building a single top-level
libNetworkManager.la, containing everything except main.c, which all
of the test programs can then link against.
When --with-modem-manager-1=yes not explicitly specified (i.e. 'auto' mode), and
libmm-glib is not found, we should not report:
Features:
...
modemmanager-1: auto
Instead, better report:
Features:
...
modemmanager-1: no
If the Intel WiMAX stack is built with libnl1, but NM is built with a
newer libnl, then symbol conflicts between libnl versions will occur
when the WiMAX plugin is loaded into NM, and NM will crash.
Distros should be building their WiMAX stack with libnl3, using the
following git repos, rather than the long-defunct Intel git repos:
git://people.freedesktop.org/~dcbw/wimax
git://people.freedesktop.org/~dcbw/wimax-tools
These repos contain fixes to allow the WiMAX stack to build against
libnl3.
If the Intel WiMAX stack is built with libnl1, but NM is built with a
newer libnl, then symbol conflicts between libnl versions will occur
when the WiMAX plugin is loaded into NM, and NM will crash.
Distros should be building their WiMAX stack with libnl3, using the
following git repos, rather than the long-defunct Intel git repos:
git://people.freedesktop.org/~dcbw/wimax
git://people.freedesktop.org/~dcbw/wimax-tools
These repos contain fixes to allow the WiMAX stack to build against
libnl3.
Some distributions (Debian and Ubuntu in particular) will soon use systemd's
logind, but not its init part. Check for a recent enough "libsystemd-login"
version instead of "systemd", as suspend/resume and inhibitors are all in
logind.
https://bugzilla.gnome.org/show_bug.cgi?id=698947
DocBook is not my favorite thing in the world, but it's
<lots-of-emphasis>far</lots-of-emphasis> saner than troff. Some style
parts cribbed from systemd.
This is preparatory work for actually improving the content of the
man pages.
Create the new nm-platform framework and implement link (or interface)
management. The nm-platform serves as the point of contact between
the rest of NetworkManager and the operating system.
There are two backends for nm-platform:
* NMFakePlatform: Fake kernel backend for testing purposes
* NMLinuxPlatform: Linux kernel backend for actual use
A comprehensive testsuite is included and will be extended with new
feature additions. To enable the Linux part of the testsuite, use
--enable-tests=root configure options and run 'make check' as root.
Use --enable-code-coverage for code coverage support.
./autogen.sh --enable-tests=root --enable-code-coverage
make
make -C src/platform check-code-coverage
Link features:
* Retrieve the list of links
* Translate between indexes and names
* Discover device type
* Add/remove dummy interfaces (for testing)
Thanks to Thomas Graf for helping with libnl3 synchronization issues.
For cases where NM may run without a bus daemon in root-only
environments, like an initramfs. For disconnection, since private
connection just get a disconnect message instead of NameOwnerChanged
signals broadcast by a bus daemon, just synthesize the NameOwnerChanged
signals using our fake owner name. It's just easier to do this rather
than modify any code that cares about disconnects.
Note that the new private socket is only enabled if built with
dbus-glib >= 0.100 as there are bugs in previous versions in the
implementation of dbus_g_proxy_new_for_peer() which clients must
use to talk to the private socket.
Modern operating systems come with systemwide "crash catching"
facilities; for example, the Linux kernel can now pipe core dumps out
to userspace, and programs like "systemd-coredump" and "abrt" record
these.
In this model, it's actively counterproductive for individual
processes to catch SIGSEGV because:
1) Trying to unwind from inside the process after arbitrary
corruption is destined to fail.
2) It hides the fact that a crash happened at all - my OS test
framework wants to know if any process crashed, and I don't
want to guess by running regexps against /var/log/Xorg.0.log
or whatever.
Signed-off-by: Colin Walters <walters@verbum.org>
https://bugzilla.gnome.org/show_bug.cgi?id=692032
Use the following in Makefile.am to enable code coverage for individual modules:
@GNOME_CODE_COVERAGE_RULES@
my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
When enumerating devices, libgudev's matching by default will return
devices which udev has not yet finished initializing.
This was frequently causing boot-time races on the OLPC XO, where
NetworkManager would bring a device up before udev had renamed it,
causing the later rename to fail.
To solve this, filter the enumeration matches to only include
initialized devices. The devices that are present but uninitialized
at this time will arrive a short time later, via a uevent.
https://bugs.freedesktop.org/show_bug.cgi?id=56929
(dcbw: update gudev version check in configure.ac)
Until we remove libnl-1.x and libnl-2.x support, it should be
possible to choose the libnl version at build time. This is
mostly important for testing legacy libnl support but it also
helps distributions that ship other tools built agains them.
(https://bugs.gentoo.org/show_bug.cgi?id=441750)
The new switch will run in 'auto' mode when not explicitly specified. In this
case the new ModemManager1 support will only be available if it finds libmm-glib
through pkg-config.
Other than the 'auto' mode, 'yes' and 'no' are allowed in order to specify
explicit requirements.
The Gentoo initscript is being patched downstream anyway. It
will be easier to maintain it in just one place.
See discussion at bugs.gentoo.org:
https://bugs.gentoo.org/show_bug.cgi?id=441754
Use --enable-doc and --enable-tests instead of --with-docs and
--with-tests. This is consistent with other features and with
--enable-gtk-doc option. Support current variants as fallback.
Don't build tests unless --enable-tests is specified.
New option --with-suspend-resume=[upower|systemd] which defaults
to systemd if you have systemd >= 183 with the inhibit support,
otherwise upower. Allows you to use systemd session tracking
simultaneously with upower for suspend/resume if you don't have
system >= 183.
Use autoconf/automake variables for NetworkManager paths. Use
NetworkManager subdirectory where appropriate.
Files in /var/run (or /run on some distros) are moved into a separate
directory as is usual with other daemons. It makes the filesystem
more readable and file prefixing unnecessary.
/var/run/NetworkManager.pid -> /var/run/NetworkManager/NetworkManager.pid
/var/run/nm-dns-dnsmasq.pid -> /var/run/NetworkManager/dnsmasq.pid
/var/run/nm-dns-dnsmasq.conf -> /var/run/NetworkManager/dnsmasq.conf
The /var/run/NetworkManager directory is created at runtime, if it doesn't
exist.
Note: Path-based security policies like SELinux and AppArmor may need to
be adapted.