Commit graph

87 commits

Author SHA1 Message Date
Dan Winship 6793a32a8c libnm: port to GDBus
Port libnm-core/libnm to GDBus.

The NetworkManager daemon continues to use dbus-glib; the
previously-added connection hash/variant conversion methods are now
moved to NetworkManagerUtils (along with a few other utilities that
are now only needed by the daemon code).
2014-09-18 11:51:09 -04:00
Thomas Haller 83479263c4 build: adjust make cscope paths for recent refactoring
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-17 23:04:11 +02:00
Dan Winship eedcf185a7 libnm: add libnm/libnm-core (part 2)
This fixes up the code from the previous "clean" import, and adds
build infrastructure.

[There are two slightly orthogonal sets of changes in this patch.
First, the files added in the previous commit were modified as followed:

  # Replace internal references to "libnm-util" and "libnm-glib" with "libnm"
  perl -pi -e 's/libnm-(util|glib)/libnm/;' libnm-core/*.[ch] libnm-core/tests/*.[ch] libnm/*.[ch] libnm/tests/*.[ch]

  # Fix includes of the enum-types files
  perl -pi -e 's/nm-utils-enum-types/nm-core-enum-types/;' libnm-core/*.[ch] libnm-core/tests/*.[ch] libnm/*.[ch] libnm/tests/*.[ch]
  perl -pi -e 's/nm-glib-enum-types/nm-enum-types/;' libnm/*.[ch] libnm/tests/*.[ch]

  # Fix some python example code
  perl -pi -e 's/import NMClient/import NM/;' -e 's/NMClient.Client\(\)/NM.Client()/;' libnm/nm-client.c

Then, the build infrastructure was added (without further modifying
any existing files in libnm-core or libnm.)

Note: to regenerate libnm.ver after rebase:
  (head -2 libnm-util/libnm-util.ver; (grep -h '\s'nm_ libnm-util/libnm-util.ver libnm-glib/libnm-glib.ver | env LANG=C sort); tail -3 libnm-util/libnm-util.ver) > libnm/libnm.ver
]
2014-08-01 14:34:04 -04:00
Dan Winship 763ce29e58 test: drop this directory
The remaining contents of the test/ directory are:

  - 2 python example programs that aren't as good as the ones in examples/

  - a test of the deprecated libnm_glib API which isn't as good as the one
    in libnm-glib/

  - A DHCP-related test program that hasn't been relevant since 2005

Let's just kill it all
2014-07-30 15:56:29 -04:00
Dan Winship 3d25d70461 clients: reorganize source tree, put all the installed clients together
Create a new clients/ subdirectory at the top level, and move cli/ and
tui/ into it, as well as nm-online.c (which was previously in test/,
which made no sense).

cli/ was split into two subdirectories, src/ and completion/. While
this does simplify things (given that the completion file and the
binary both need to be named "nmcli"), it bloats the source tree, and
we can work around it by just renaming the completion file at install
time. Then we can combine the two directories into one and just have
it all under clients/cli/.
2014-07-30 15:56:19 -04:00
Thomas Haller 39fce7371a libgsystem: remove submodule libgsystem
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-15 22:50:36 +02: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 Winship dcc109516d libnm-util: build nm-setting-docs.xml from gtk-doc and GParamSpecs
Add generate-setting-docs.py, based on tools/generate-settings-spec.c,
which generates a simple XML file describing all libnm setting
properties (still getting the default values via GParamSpec
introspection like generate-settings-spec.c does, but getting the
documentation out of the gtk-doc strings in the GIR file instead).
2014-06-19 17:45:02 -04: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
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 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
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
Dan Williams ae319b922e build: fix distcheck configure flags
Update the tests flag to the latest syntax, and make sure we
don't run valgrind on distcheck for now, since new valgrind
errors may show up when things like glib change.
2013-07-24 14:06:32 -05:00
Dan Winship c347ac2123 build: allow building against system libndp 2013-06-13 10:24:01 -03:00
Dan Winship c89acbdc8f build: don't install libndp 2013-06-13 10:24:01 -03:00
Pavel Šimerda bbce69491a rdisc: build libndp recursively 2013-06-06 06:47:17 +02:00
Colin Walters 468c08511c core: add libgsystem as a git submodule
And change src/main.c to use the local allocation macros.  This
results in much cleaner code, as one can see from the diff.

Because libgsystem is designed for nonrecursive make, it fits best in
the current recursive setup if we build . first.  This will be a lot
nicer when we switch NM to a nonrecursive setup.
2013-05-16 14:08:09 -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
Pavel Šimerda b530603019 valgrind: distribute valgrind.suppressions 2013-04-10 16:40:58 +02:00
Dan Williams 44bcc990f7 build: distribute autogen.sh 2013-03-12 15:43:43 -05:00
Pavel Šimerda f0277c19aa settings: add support for code coverage to the settings plugins
Use:

  ./autogen.sh --enable-code-coverage
  make
  make -C src/settings check-code-coverage
2013-02-19 13:05:52 +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 2a900e2d0d build: fix plugin options for 'make distcheck' 2012-11-14 02:13:55 +01:00
Pavel Šimerda 2d7f9f3d10 build: build with all plugins for 'make distcheck' 2012-11-13 20:23:06 +01:00
Pavel Šimerda 3ee36a6f74 distro: don't install initscripts
It doesn't make much sense to install initscripts in current distributions. Most
of them either don't use initscripts at all, locally patch the initscripts or
supply their own. This allows us to eventually drop the --with-distro configure
option.

Many current distributions support multiple init systems and it doesn't make
sense for upstream to make the choice for them. Distributors can still make
their scripts copy one of the initscripts from the source tree if they wish so.
2012-10-30 00:36:04 +01:00
Alberto Ruiz b1e1ee79bd vala: add vala bindings for libnm-util and libnm-glib
This patch adds the autotools facilities to generate vapi files so that
libnm-util and libnm-glib can be consumed from Vala.

It depends on vapigen and it is a soft dependency.
2012-06-12 16:31:20 -05:00
Dan Williams ca3c39abd3 wifi: let WEXT be disabled with --with-wext=no
It's still enabled by default if you don't pass --with-wext=no.
But now it's possible to build without WEXT entirely.
2012-02-29 23:11:04 -06:00
Dan Winship 839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Thomas Graf be2e40c667 build: add "cscope" target to makefile
It builds cscope database, gets cleaned on "clean".
2011-11-14 13:40:28 +01:00
Dan Williams 3b48fdfc89 build: turn on warnings during distcheck
Make sure we catch everything before generating a tarball for release.
2011-04-11 17:10:54 -05:00
Dan Williams 1a61a0a2ca build: let distcheck autoconfigure wimax 2011-04-05 11:00:55 -05:00
Dan Williams ebc4681368 build: tell rebuilt makefiles about macro dir (bgo #640896) 2011-02-23 10:54:01 -06:00
Dan Williams 5bcb0832e5 settings: move system-settings/plugins => src/settings/plugins 2011-02-15 11:55:34 -06:00
Giovanni Campagna 3ebecd2a29 introspection: add GObject introspection support (bgo #637032)
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
2011-01-21 14:46:09 -06:00
Dan Williams b38f39cfc6 core: build keyfile plugin into NetworkManager
Since settings storage is now handled by NetworkManager, we must
have the ability to read/write all connection types at all times.
Since the 'keyfile' plugin is the only plugin that can handle all
connection types, build it into NetworkManager.
2011-01-12 18:12:23 -06:00
Dan Williams 4b44a2bd54 core: add systemd unit support 2010-08-12 11:15:26 -05:00
Jirka Klimes c2ec07f17d cli: add initial pieces of nmcli 2010-02-25 09:52:30 -08:00
Dan Williams fa9e9b4227 examples: add some python examples 2010-02-18 10:17:08 -08:00
Dan Williams 9c0e929552 core: require gio
Which isn't a problem, since we already require glib-2.16 which
includes gio.  Thus, we can remove all the gfilemonitor compat
stuff.
2009-08-20 13:00:37 -05:00
Daniel Drake ff88cf12c2 olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
Michael Biebl fb386ceee4 Use m4/ macro directory
Keep the relevant m4 macros in-tree.
2009-05-02 18:01:00 -04:00
Dan Williams 73659e724c makefile cleanups
0.7 requires dbus 1.1 or greater (for system bus activation), so make that
explicit, and remove compat code for D-Bus 0.6 and earlier.  Consolidate
the various glib pkgconfig checks into one, since most anything will require
gthread, glib, and gobject anyway.  Fixup the docs makefile to be more
automake-compatible and let 'make clean' actually work correctly when
docs are built.
2009-02-15 11:20:25 -05:00
Dan Williams 45f2f1144d keyfile: read MAC addresses and a test framework
Clean up handling of "special" keys in keyfiles, ie ones that
need more processing than the basic GKeyFile API supports.  Add
MAC address reading (writing support to come).

Additionally, add some test bits for the keyfile plugin that get
run on 'make check'.
2009-01-12 14:21:44 -05:00
Dan Williams 2e85fb21f8 2008-11-19 Dan Williams <dcbw@redhat.com>
* configure.in
	  Makefile.am
	  docs/libnm-util/Makefile.am
	  docs/libnm-util/libnm-util.types
		- Start to document libnm-util



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4302 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-19 18:46:01 +00:00
Tambet Ingo 09294555c0 2008-08-12 Tambet Ingo <tambet@gmail.com>
* Makefile.am: Fix distcheck.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3935 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 13:41:29 +00:00
Tambet Ingo 0f534a9f8f 2008-08-12 Tambet Ingo <tambet@gmail.com>
Start documenting libnm-glib public API using gtk-doc.

	* libnm-glib/nm-serial-device.c:
	* libnm-glib/nm-object.c:
	* libnm-glib/nm-gsm-device.c:
	* libnm-glib/nm-device.c:
	* libnm-glib/nm-device-wifi.c:
	* libnm-glib/nm-device-ethernet.c:
	* libnm-glib/nm-client.c:
	* libnm-glib/nm-cdma-device.c: Document the public API.

	* docs/libnm-glib/libnm-glib.types: Implement.

	* docs/libnm-glib/Makefile.am: Implement.

	* autogen.sh:
	* configure.in:
	* Makefile.am: Add gtk-doc support.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3932 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 08:05:21 +00:00
Dan Williams d7eafc71b1 2008-05-11 Dan Williams <dcbw@redhat.com>
* configure.in
	  Makefile.am
	  gfilemonitor/*
		- Add a private copy of the GIO GFileMonitor code, with a custom GFile
			implementation, so that the same change monitoring code can be used
			on systems without glib-2.14 (like Fedora 8)

	* system-settings/plugins/keyfile/Makefile.am
	  system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/ifcfg-suse/Makefile.am
	  system-settings/plugins/ifcfg-suse/plugin.c
		- Use private gfilemonitor code if GIO is not present



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3654 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-11 20:12:18 +00:00
Tambet Ingo d2cf6fa75c 2008-05-08 Tambet Ingo <tambet@gmail.com>
Use PolicyKit to authorize the system settings' AddConnection method
    	and the system settings connections' Update and Delete methods.

    	* libnm-glib/nm-settings.c (impl_exported_connection_update)
    	(impl_exported_connection_delete, nm_exported_connection_update)
    	(nm_exported_connection_delete): Return boolean and fill GError
    	to notify the callers of the reasons why it might have failed.

    	* libnm-glib/nm-dbus-settings-system.c
    	(nm_dbus_settings_system_add_connection): Return the error from dbus
    	call so that the callers can see why it failed.

    	* libnm-glib/nm-dbus-connection.c (update, delete): Update the
    	signatures.

    	* system-settings/src/nm-polkit-helpers.[ch]: Implement.

    	* system-settings/src/nm-sysconfig-connection.[ch]: Implement. New
    	abstract base class that checks PolicyKit permissions.

    	* system-settings/src/dbus-settings.c:
    	(impl_settings_add_connection): Check the policy before carring out
    	the request.

    	* system-settings/plugins/keyfile/nm-keyfile-connection.c:
    	Inherit from NMSysconfigConnection, check the policies before
    	allowing updating or removing.

    	* system-settings/plugins/ifcfg-suse/nm-suse-connection.c:
    	Inherit from NMSysconfigConnection.

    	* introspection/nm-exported-connection.xml: Annotate "Update" and
    	"Delete" methods with async flag so that the implementations can get
    	access to DBusGMethodInvocation.

    	* system-settings/src/dbus-settings.c
    	(settings_add_connection_check_privileges): Implement.
    	(impl_settings_add_connection): Check the privileges before adding a new
    	connection. Improve error reporting.

    	* introspection/nm-settings-system.xml: Make the 'AddConnection' method
    	async so that the implementation can access DBusGMethodInvocation.

    	* configure.in: Check for PolicyKit.

    	* policy/org.freedesktop.network-manager-settings.system.policy:
    	New file.

    	* policy/Makefile.am: Install the policy file.

    	* configure.in: Add 'policy' subdir.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3646 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 06:33:30 +00:00
Dan Williams 03194ce96d 2008-04-27 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  configure.in
	  dispatcher-daemon/Makefile.am
	  dispatcher-daemon/NetworkManagerDispatcher.c
	  initscript/Arch/Makefile.am
	  initscript/Arch/networkmanager-dispatcher.in
	  initscript/Gentoo/Makefile.am
	  initscript/Gentoo/NetworkManagerDispatcher.in
	  initscript/Mandriva/Makefile.am
	  initscript/Mandriva/networkmanagerdispatcher.in
	  initscript/RedHat/Makefile.am
	  initscript/RedHat/NetworkManagerDispatcher.in
	  initscript/SUSE/Makefile.am
	  initscript/SUSE/networkmanager-dispatcher.in
	  initscript/Slackware/Makefile.am
	  initscript/Slackware/rc.networkmanager-dispatcher.in
	  initscript/paldo/Makefile.am
	  initscript/paldo/NetworkManagerDispatcher.in
	  man/Makefile.am
	  man/NetworkManagerDispatcher.8.in
		- Remove the dispatcher daemon



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3608 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-27 15:22:10 +00:00
Dan Williams 0422784433 2008-04-05 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  configure.in
	  marshallers/Makefile.am
	  marshallers/nm-marshal-main.c
	  marshallers/nm-marshal.list
		- Consolidate marshallers

	* libnm-glib/nm-marshal-main.c
	  libnm-glib/nm-marshal.list
	  src/marshallers/Makefile.am
	  src/marshallers/nm-marshal-main.c
	  src/marshallers/nm-marshal.list
		- Remove

	* libnm-glib/Makefile.am
	  src/Makefile.am
	  src/dhcp-manager/Makefile.am
	  src/ppp-manager/Makefile.am
	  src/supplicant-manager/Makefile.am
	  src/vpn-manager/Makefile.am
		- Use consolidated marshallers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3533 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-05 16:28:24 +00:00