Commit Graph

224 Commits

Author SHA1 Message Date
Dan Winship
c4417c71b6 core: use non-recursive build
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.
2013-05-08 15:07:18 -04:00
Aleksander Morgado
371f022116 build: fix reporting of modemmanager-1 compilation status
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
2013-05-08 07:03:37 -05:00
Dan Williams
e0409e631b build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)
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.
2013-05-06 15:34:23 -05:00
Dan Williams
a112ec8f9e Revert "build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)"
This reverts commit fcf4542ab3.

Pushed before some requested cleanups were added.
2013-05-06 15:34:08 -05:00
Dan Williams
fcf4542ab3 build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)
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.
2013-05-06 12:21:30 -05:00
Jürg Billeter
cf8b338b27 remove paldo initscript
paldo has migrated to systemd a while ago
2013-05-06 16:33:14 +02:00
Emanuele Aina
c300e953fb build: Require libnl >= 3.2.8 for nl_object_get_type()
https://bugzilla.gnome.org/show_bug.cgi?id=698452
2013-05-04 01:47:43 +02:00
Martin Pitt
39a0c81aa5 configure: Check libsystemd-login version for suspend-resume
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
2013-04-26 10:52:24 -04:00
Tim Lunn
190d8aa840 build: fix session tracking for systemd in configure.ac
https://bugzilla.gnome.org/show_bug.cgi?id=698706
2013-04-24 16:13:47 -04:00
Colin Walters
34c88dd8e4 man: rewrite NetworkManager.8 and NetworkManager.conf.5 in DocBook
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.
2013-04-24 11:44:50 -05:00
Pavel Šimerda
15fd7cd75e platform: link management
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.
2013-04-10 16:40:58 +02:00
Dan Williams
c9335a497b core: add a root-only private D-Bus socket
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.
2013-04-08 10:55:37 -05:00
Dan Williams
496534b9f4 core: add nm_dbus_g_method_invocation_get_g_connection()
This method exists in dbus-glib >= 101, but if it doesn't, emulate it.

See https://bugs.freedesktop.org/show_bug.cgi?id=55729
2013-04-08 10:55:37 -05:00
Dan Winship
53bd84feff config: move NMConfig into its own subdirectory/library
Also, remove the unused NMConfigError, and add a config-parsing test
program.
2013-04-03 10:23:47 -04:00
Pavel Šimerda
a78a1847c6 testing: fix configure.ac typo regarding valgrind
--without-valgrind will now work properly.
2013-03-23 03:35:44 +01:00
Pavel Šimerda
2675af05b9 testing: support for valgrind memory checking
Use @VALGRIND_RULES@ in Makefile.am for modules that you want to check
for memory leaks.
2013-03-22 23:08:20 +01:00
Pavel Šimerda
bb8c75bd53 remove obsolete nm-tool
Use nmcli instead.
2013-03-04 22:11:45 +01:00
Dan Winship
de2e32b375 build: Update GLIB_VERSION_MIN_REQUIRED to 2.32
now that it no longer causes any warnings
2013-02-26 13:07:33 +01:00
Dan Winship
3bd867bb62 build: remove glib-mkenums
This was imported to get a bugfix in glib 2.31.5; since we require
2.32 now, we can use the system glib-mkenums.
2013-02-26 13:07:32 +01:00
Dan Winship
38035856d9 build: require GLib 2.32 2013-02-26 13:07:32 +01:00
Michael Biebl
1556a19c3e Add bash-completion file for nmcli
Based on work by Guillaume Rousse <guillomovitch@gmail.com>
2013-02-19 21:20:59 +01:00
Dan Williams
abfb8374d1 release: bump version to 0.9.9.0 (development) 2013-02-12 09:43:49 -06:00
Dan Williams
d953aad17a build: remove unused line 2013-02-08 10:06:48 -06:00
Dan Williams
7491198138 build: clean up dbus-glib checks
dbus_glib_global_set_disable_legacy_property_access() was added in dbus-glib
0.88, and since we require 0.94 we can remove this check.
2013-01-30 11:19:15 -06:00
Dan Williams
9495331a22 build: fix PolicyKit modify.system configure message
It wasn't actually checking the value, which it should have
been doing.  Thus the wrong message was printed.
2013-01-29 13:47:31 -06:00
Pavel Šimerda
663859c180 build: drop libnl 1.x and 2.x support, require libnl >= 3.2.7 2013-01-24 19:47:53 +01:00
Colin Walters
ae627737d5 Remove SIGSEGV/SIGFPE etc. handling
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
2013-01-22 12:49:48 -05:00
Dan Williams
750147f94d release: bump version to 0.9.7.995 (0.9.8-beta1) 2013-01-15 17:34:39 -06:00
Pavel Šimerda
998f4ccc88 build: add code coverage support
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) …
2013-01-08 13:30:56 +01:00
Alban Browaeys
e78c3e83d2 build: negate the grep result. Not the echo result.
https://bugzilla.gnome.org/show_bug.cgi?id=690991
2013-01-02 12:50:32 -05:00
Alban Browaeys
338f1e4e6a build: Fix with_session_tracking check vs consolkit.
Fix with_session_tracking check vs consolkit,
missing dollar before identifier.

https://bugzilla.gnome.org/show_bug.cgi?id=690991
2013-01-02 12:50:32 -05:00
Pavel Šimerda
a787e5c585 build: cleanups 2012-12-28 19:21:25 +01:00
Guido Günther
1208f6e512 build: various session tracking fixes 2012-12-28 19:00:07 +01:00
Pavel Šimerda
a596db45f0 build: add --enable-tests=root to enable tests that require uid=0 2012-12-18 14:15:13 +01:00
Pavel Šimerda
aa52ca327a build: enable silent rules 2012-12-05 23:22:21 +01:00
Pavel Šimerda
13b8301fda build: clean up --with-session-tracking 2012-12-05 23:22:21 +01:00
Daniel Drake
c6fb063e09 core: don't enumerate uninitialized devices from udev (fdo #56929)
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)
2012-11-26 16:09:23 -06:00
Pavel Šimerda
423d766b03 build: implement libnl version selection
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)
2012-11-22 18:03:16 +01:00
Aleksander Morgado
52c993dd65 build: new `--with-modem-manager-1' to check for new ModemManager1 support
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.
2012-11-21 11:48:25 -06:00
Pavel Šimerda
449ca34cb0 initscripts: remove Gentoo initscript
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
2012-11-18 14:56:39 +01:00
Pavel Šimerda
ffb60cdba4 dhcp: improve DHCP client selection in configure.ac
This patch is mostly just a cleanup. It removes some obsolete processing
related to DHCP client support.
2012-11-16 15:27:22 -06:00
Pavel Šimerda
9e7eceeca5 build: fix nmdatadir in configure.ac
And print NetworkManager directories.
2012-11-15 10:41:41 +01:00
Pavel Šimerda
2750b0759f build: don't write systemd unit file outside of prefix 2012-11-15 10:40:50 +01:00
Pavel Šimerda
86f857325e trivial: quote configure.ac string so that vim's highlighting works 2012-11-14 23:55:08 +01:00
Pavel Šimerda
ec1bd3a936 build: fix bad AM_CONDITIONAL
Introduced by commit faa1bcb.
2012-11-13 20:48:22 +01:00
Pavel Šimerda
faa1bcb540 build: improve documentation and test configure options
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.
2012-11-13 20:23:06 +01:00
Pavel Šimerda
c225a6397f build: fix nl80211.h check 2012-11-13 15:39:03 +01:00
Dan Williams
3f179d74e2 build: decouple systemd session tracking from systemd suspend/resume
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.
2012-11-06 15:10:03 -06:00
Dan Williams
0180f461ef build: clarify systemd-login build flags
systemd gets used for more than just systemd-login.
2012-11-06 14:11:05 -06:00
Pavel Šimerda
d82669d3fd build: unify NetworkManager path handling (some paths are changed)
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.
2012-11-05 14:01:47 +01:00