Commit Graph

384 Commits

Author SHA1 Message Date
Dan Winship
7eb0288aa0 libnm-util: move NetworkManager.h, etc, from include/ to here
NetworkManager.h, NetworkManagerVPN.h, and nm-version.h are part of
the libnm-util API, so move them to libnm-util.

include/ still contains headers that are strictly NM-internal (eg,
nm-glib-compat.h).
2014-07-15 09:44:54 -04:00
Dan Winship
377f72a66f build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc
--disable-introspection) were broken with respect to nm-setting-docs.
Fix this. Also, we don't require just gobject-introspection, we need
pygobject specifically as well.
2014-06-27 17:24:57 -04:00
Dan Williams
29297f8531 build: check harder for readline
Not all distros build their readline linked with a termcap library,
since apps are (apparently) supposed to choose one for themselves
and explicitly link to it when using readline.  So add some checks
to figure out whether readline is already linked, and if not, prefer
ncurses since we use that for nmtui already.

ax_lib_readline based off:

http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
2014-06-27 13:10:50 -05:00
Thomas Haller
38a83e15a2 team: make team support a plugin
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Jiří Klimeš
142e2c4726 build: fix gobject-introspection detection
so that HAVE_INTROSPECTION is properly defined
2014-06-20 13:58:36 +02:00
Dan Winship
8252ebd941 cli: generate setting docs from libnm-util/nm-setting-docs.xml
nmcli used the GParamSpec doc strings to get property descriptions,
but they will be going away. Generate a .c file from the new XML
setting docs file, and link that into nmcli.
2014-06-19 17:45:02 -04:00
Michael Biebl
ec1034a03a build: fix bashisms in configure.ac
[[ && ]] is a bashism, so use [ ] && [ ] instead.
Also use readlink -f instead of realpath, since the latter is not
guaranteed to be installed.
2014-06-17 11:33:50 -05:00
Thomas Haller
9f114f661a build: remove libndp location in summary of ./configure
This is a left-over from the early days of libndp when
the libarary was optionally a git-submodule of NetworkManager.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-12 14:58:48 +02:00
Thomas Haller
2af20f9389 release: bump version to 0.9.11.0 (development) 2014-06-07 02:09:00 +02:00
Dan Williams
c817409fc0 release: bump version to 0.9.9.95 (0.9.10-beta1) 2014-06-06 18:28:21 -05:00
Thomas Haller
e3784fa618 platform/test: always run linux platform tests (will be skipped as non-root)
Always run the linux platform tests, even if called as non-root user.
In such a case, print a message and return 77 (signalizing that the test
was skipped).

Only if we configured with --enable-test=root, we enforce that the
user executes the tests as root.

Co-Authored-By: Pavel Šimerda <psimerda@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-05 18:12:58 +02:00
Jiří Klimeš
03be41d409 cli/build: make libreadline a build-time dependency (bgo #729846)
and link nmcli against it.

This simplifies code, makes sure that line editing capability is supported,
and will allow using readline on other places too.

https://bugzilla.gnome.org/show_bug.cgi?id=729846
https://bugzilla.redhat.com/show_bug.cgi?id=1007365
2014-06-04 09:47:37 +02:00
Dan Williams
06e3c6d02f wifi: make Wi-Fi support a plugin
Make Wi-Fi support a plugin using the new device factory interface.
Provides a 7% size reduction in the core NM binary.

        Before    After
NM:    1154104  1071992  (-7%)
Wi-Fi:       0   110464

(all results from stripped files)
2014-05-13 12:38:43 -05:00
Dan Winship
7955806a02 ppp-manager: don't use kernel pppoe (rh #1034860, rh #1061641)
The kernel PPPoE code disconnects when it receives a PADT frame, but
doesn't notify userland about it. So if the server sends a PPPoE PADT
without having sent the standard PPP LCP Termination request first,
then pppd (and thus NetworkManager) will not know that the connection
has been disconnected.

This should eventually be fixed in the kernel, but for now, work
around this by using the userland pppoe client rather than the kernel
code.
2014-04-14 10:11:05 -04:00
Dan Winship
ebc5ea0b80 ppp-manager: find pppd at build time, allow overriding
Add --with-pppd, just like --with-dnsmasq.

Also change "ppp" to "pppd" for clarity in a few places.
2014-04-14 10:11:05 -04:00
Jiří Klimeš
da354830da core: build with SELinux; don't break /etc/hostname context (rh #1070829)
https://bugzilla.redhat.com/show_bug.cgi?id=1070829
2014-03-31 17:44:15 +02:00
Dan Winship
a18248dd1b devices: rename "atm" plugin to "adsl", and "bt" to "bluetooth"
The atm/adsl plugin really is a generic ATM plugin but (a) it needs a
bit of work to do IPoATM rather than just PPPoATM and PPPoEoATM, and
(b) most people currently using NM's ATM support are using DSL devices
not actual ATM cards anyway, and have no idea what "ATM" even means.
If we add the necessary IPoATM support later we can rename the plugin
back to -atm
2014-03-19 14:56:47 -04:00
Jiří Klimeš
94d0d30e95 team: read team port config in nm_team_update_slave_connection() (rh #1035859)
Without reading team port config we would fail to assume team slaves.

libteam provides teamdctl_port_config_get_raw_direct() from 1.9 up
See https://bugzilla.redhat.com/show_bug.cgi?id=1028138

https://bugzilla.redhat.com/show_bug.cgi?id=1035859
2014-03-12 10:44:29 +01:00
Dan Williams
aeb1e103d8 mobile: make WWAN support a plugin
Make WWAN support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.

     Before    After
NM: 1187224  1125208  (-5%)
MM:       0   100576

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Dan Williams
a9591aecaf bluez: make Bluetooth support a plugin
Make Bluetooth support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.

     Before   After
NM: 1253016 1187224 (-5%)
BT:       0   85752

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Dan Williams
71a52347f3 atm: make ADSL support a plugin
Make ADSL support a plugin using the new device factory interface.
Provides a 1% size reduction in the core NM binary.

      Before    After
NM:  1265336  1253016  (-1%)
ATM:       0    27360

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Thomas Haller
16bbc90c16 release: bump version to 0.9.9.1 (development)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-28 14:21:35 +01:00
Dan Winship
932aa29026 trivial: fix configure.ac comment 2014-02-19 13:43:10 -05:00
Aleksander Morgado
3b76ae18a5 modem-manager: if building systemd support, assume it manages the MM lifecycle
We will not explicitly poke MM to start it if NetworkManager is built with
systemd support.

https://bugzilla.gnome.org/show_bug.cgi?id=703040
2014-02-13 12:06:17 -05:00
Dan Winship
64c5395cb1 build: improve our use of glib's version macros to catch more bugs
We were setting GLIB_VERSION_MAX_ALLOWED to 2.34, since we provide
reimplementations of a few 2.34 functions in nm-glib-compat.h. But
this was turning off warnings for the 2.34+ APIs we *didn't* have
compat versions of too.

Fix this by setting MAX_ALLOWED to 2.32 (same as MIN_REQUIRED), and
defining macros to wrap calls to compat-ified functions and disable
deprecation warnings around them.

This points out several places where we were accidentally using 2.34
APIs without noticing, which need to be fixed now.
2014-02-13 11:24:37 -05:00
Thomas Haller
8da98026da build: include the git commit id of HEAD in ./configure
`make dist` packs the 'configure' file in the tarball, so this is
useful, to include the commit id into the release tarball.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-05 17:13:23 +01:00
Dan Winship
dd58d9c703 build: drop the libndp submodule
libndp has existed for a while now. 1.0 was released six months
ago. So drop the submodule and just require an installed package.
2014-02-03 12:13:41 +01:00
Dan Williams
d18f524984 wifi: add nl80211 Critical Protocol indication support
At critical times during the connection process, especially during
DHCP and EAPOL, the driver can increase the reliability of communication
in an attempt to increase the possibility of success.  This could be
done by suppressing bluetooth for a short period, or locking in a low
(and thus more reliable) bitrate, or enforcing some other interference
protection.  The 3.10 kernel added nl80211 support for this, so lets
use it if we can.
2014-01-31 14:11:28 -06:00
Dan Williams
32a001f526 core: allow custom IP address ranges for Shared connections (bgo #675973)
Given an IPv4 address and prefix for a shared config, figure out
the DHCP address range automatically.  To keep things simple we
allow a max of 252 addresses (not including network address,
broadcast address, and the hotspot) no matter what prefix you use,
so if the address is 10.0.10.1, you still only get a range of
10.0.10.2 -> 10.0.10.254.

But we also leave some addresses available above the host address
for static stuff, like we did before.  This is done on a sliding
scale from 0 to 8 addresses, where about 1/10th the number of
available addresses are reserved.

https://bugzilla.gnome.org/show_bug.cgi?id=675973
2014-01-23 16:21:01 -06:00
Jan Alexander Steffens
691422a460 build: add --with-dnsmasq, to specify dnsmasq path
https://bugzilla.gnome.org/show_bug.cgi?id=700219
2014-01-03 14:51:16 -05:00
Dan Winship
dfe194eea6 dns-manager: don't add "public suffix" domains to search (rh #851521)
If the hostname is "foo.example.com" then we want to add
"search example.com" to resolv.conf, but if it's just "example.com",
we don't want to add "search com" (rh #812394).

So if NetworkManager is being built with recent libsoup, use
soup_tld_domain_is_public_suffix() to double-check the domain before
adding it. (If it is not being built with libsoup, or is being built
with too old a version, we just skip that test, keeping the old
behavior.)
2013-12-20 09:31:04 -05:00
Dan Winship
7481c64ad5 systemd: add "Before=network.service" on Fedora/RHEL (rh #1034983)
On Fedora/RHEL, NetworkManager.service needs to be started before
network.service, or else network.service may try to bring up NM's
devices itself.
2013-12-17 09:45:18 -05:00
Dan Winship
3bda3fb60c nmtui: initial import of nmtui
nmtui is a TUI (curses-based Text User Interface) for NetworkManager
2013-12-13 16:00:51 +01:00
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