Commit Graph

251 Commits

Author SHA1 Message Date
Dan Williams
b11aec3f15 dhcp: force IPv4-only for dhcpcd
dhcpcd v5.99 and later automatically enabled IPv6 behavior unless
specifically disabled.  This is undesirable for two reason:

1) dhcpcd sends IPv4 Router Solicitations, which NetworkManager
handles itself, so there's no need to do it twice.  NetworkManager
knows better than dhcpcd whether IPv6 is supposed to be used for
that interface or not.

2) Some devices don't react well to IPv6 when they aren't expecting
it.  For example, older Qualcomm Gobi-based devices will listen
for Router Solicitations and attempt to set up IPv6, but if other
settings are not done correctly, or the firmware doesn't actually
support it, the firmware will then crash.  So simply upgrading your
dhcpcd from 5.x to 6.x magically stops WWAN working for these
devices.
2013-11-27 17:14:32 -06:00
Thomas Haller
044cebade4 build: fix for make distcheck without enable-gtk-doc
Without this patch, the following fails with a rather obscure message
about missing make target.

  ./autogen.sh && make && make distcheck
  ...
  *** No rule to make target `NetworkManager.8', needed by `distdir'. Stop.

Swap the order of the subdirectories 'docs' and 'man' to build
'docs' earlier. This way, `make distcheck` fails in the directory 'docs'
with a better error message:
  *** gtk-doc must be installed and enabled in order to make dist

Also, add 'man/nmcli-examples.5' to the list of files, to determine
whether to use the pre generated doc files.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-11-18 19:19:13 +01:00
Thomas Haller
bf5a6ad443 bluez: enable both BlueZ4 and 5 and select it dynamically at runtime
NMBluezManager is now a proxy and only delegates to either
NMBluez4Manager or NMBluez5Manager. It detects the running BlueZ
version at runtime, and once it decides for one version, it cannot be
changed anymore as long NetworkManager is running.

This means, when switching from BlueZ4 to BlueZ5 or vice versa you have
to restart NetworkManager. This should be acceptable, because it is
not a common use case (most systems won't have both versions installed
anyway) and it greatly simplifies implementation.

Also note that NMBluez4Manager and NMBluez5Manager do not implement a
common interface. NMBluezManager delegates to the correct manager.
Having them share an common interface or base class would not simplify
the code, because NMBluezManager not only delegates, but it also acts as
a proxy until it is decided which BlueZ version is running. So, this
proxy-like behaviour would still be needed. The alternative would be to
merge the functionality of all three NMBluez*Manager classes into one.

This also removes the --enable-bluez4 configure switch, because both
versions are now always enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=709412

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-10-18 19:56:37 +02:00
Dan Williams
961e23a2e2 build: show bluez4 as "no" when not explicitly enabled 2013-09-25 21:01:04 +02:00
Thomas Haller
b246788bc4 config: make BlueZ 5 default and replace --enable-bluez5 with --enable-bluez4
Build now BlueZ 5 by default and rename the configure flag
--enable-bluez5 to --enable-bluez4.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
1013caba75 bluez: add configure switch for BlueZ 5 2013-09-25 21:01:04 +02:00
Jiří Klimeš
8a04ab9135 examples: group python examples - dbus vs. gi
Move examples using dbus-python ('dbus' module) and GObject introspection into
their own directories.
2013-09-24 12:52:33 +02:00
Jiri Pirko
2ba2390a82 add libteamdctl for configure.ac
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-08-22 09:38:11 -04:00
Jiří Klimeš
4aa56de14c build: only add 'serial-tests' for automake >= 1.12
Earlier versions of automake complain if they get a configuration
parameter which they don't understand.  The error is:

configure.ac:19: option `serial-tests' not recognized

Use some m4 hackery to work around this.

Stolen from here by jklimes:
https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html
2013-07-30 12:53:42 +02:00
Pavel Šimerda
da71cc6e8c trivial: allow building tests from rdisc directory
The nm-rdisc subsystem, just as the nm-platform subsystem is separately
testable and it proved convenient to be able to build the test programs
by just typing 'make' in the rdisc/platform directory where the source
code for those modules resides.
2013-07-30 11:40:18 +02:00
Pavel Šimerda
b38f76cdb4 build: use a helper script for all valgrind tests 2013-07-26 19:08:03 +02:00
Pavel Šimerda
7b2a4054b0 build: always use serial-tests 2013-07-26 18:16:18 +02:00
Dan Williams
0744c6be08 build: simplify rdisc tests makefile subdirs
src/rdisc doesn't need a makefile just to point to the tests,
we can do that more easily from src/Makefile.am like we do for
all the other tests subdirs.
2013-07-24 14:05:46 -05:00
Pavel Šimerda
bd1c7fbece device: use internal router discovery implementation 2013-07-20 17:08:01 +02:00
Pavel Šimerda
21a8a71d48 rdisc: abstract class and fake implementation
Abstract class, fake implementation and a manual testing tool for
NetworkManager's internal IPv6 router discovery module. When a real
implementation is ready, it will replace nm-ip6-manager and will be used
by nm-device.
2013-07-20 16:50:18 +02:00
Dan Williams
89512ec5c4 build: allow dhcpcd versions higher than 5
No reason to exclude them, just that configure.ac hasn't tracked new
versions of dhcpcd.
2013-07-19 13:41:28 -05:00
Pavel Šimerda
b294a1ef63 platform: add minimal Makefile.am for convenience
When working only with nm-platform and its testsuite, it's convenient to
call 'make', 'make check', etc from 'src/platform' directory.
2013-06-19 13:48:29 +02:00
Dan Winship
c347ac2123 build: allow building against system libndp 2013-06-13 10:24:01 -03:00
Pavel Šimerda
bbce69491a rdisc: build libndp recursively 2013-06-06 06:47:17 +02:00
Aleksander Morgado
c3706810ef modem-manager: read 'SupportedCapabilities' instead of 'ModemCapabilities' (bgo #701668)
There is no longer a 'ModemCapabilities' uint32 property; instead we have
'SupportedCapabilities' giving a list of uint32 values. Just read the list and
merge the values into a single mask; NM doesn't care about the exact
combinations supported.

https://bugzilla.gnome.org/show_bug.cgi?id=701668
2013-06-05 12:59:32 -05:00
Dan Williams
db3ad9bc90 systemd: update for network-online.target for systemd >= 200 (rh #787314)
systemd's new network-online target abstracts the "wait until
networking is up" stuff, and NM-wait-online implements that
functionality.  Thus NM-wait-online should be ordered before
(and thus be a dependency of) network-online.
2013-06-03 11:30:35 -05:00
Dan Williams
b9ea3ed1b1 build: don't install nm-dhcp-helper dbus permissions if we don't need to
The DHCP helper uses a private socket when building with dbus-glib >= 0.100,
which means we don't need to install a D-Bus permissions file.
2013-05-14 15:37:41 -05:00
Dan Williams
408cafc889 build: fix detection of Qt on non-Fedora platforms (bgo #691583)
Apparently Qt.pc is a Fedora-specific file to allow parallel install
of Qt3 and Qt4.  We should instead be using the upstream QtCore.

https://bugzilla.gnome.org/show_bug.cgi?id=691583
2013-05-14 14:50:32 -05:00
Dan Williams
bbf0720a8d trivial: remove a bit of debug code 2013-05-14 11:13:00 -05:00
Dan Williams
3a5bf0517c build: always generate docs at dist time (bgo #700093)
dist tarballs shouldn't ever be released without the documentation,
and this allows us to build the tarballs with pre-generated docs
that get installed on the end system, but don't need to be built
there.  So the end system doesn't need gtk-doc installed, only
the dist system does.

https://bugzilla.gnome.org/show_bug.cgi?id=700093
2013-05-14 10:53:46 -05:00
Adrian Bunk
f5c29c9694 configure.ac cleanups
- unconditionally use AM_SILENT_RULES, automake 1.11 is already required
- remove the following macros whose results were unused:
  - AC_PROG_INSTALL
  - AC_HEADER_STDC
  - AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
  - AC_TYPE_MODE_T
  - AC_HEADER_TIME
  - AC_CHECK_FUNCS(select socket uname)
- remove the following obsolete macros (not relevant on non-historic systems):
  - AC_PROG_GCC_TRADITIONAL
  - AC_FUNC_MEMCMP

https://bugzilla.gnome.org/show_bug.cgi?id=700169
2013-05-13 10:29:37 -04:00
Dan Winship
3ab82ea20e core: move devices into a subdirectory
We have lots of device types and will soon have lots more, so let's
put them in their own directory.
2013-05-08 15:07:22 -04:00
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