Commit graph

131 commits

Author SHA1 Message Date
Thomas Haller 3c2a49df2f build: merge "introspection/Makefile.am" into toplevel Makefile.am 2016-10-19 15:26:30 +02:00
Thomas Haller f42466215a callouts/dispatcher: rename directory callouts
Originally, the "callouts" directory contained various programs
that NetworkManager would call, for example the dhcp helper.

For a while, it only contains nm-dispatcher. Thus rename the directory
to indicate that it's for dispatcher.
2016-10-13 21:33:33 +02:00
Thomas Haller eab8b06d8b ifcfg-rh/tests: merge test-ifcfg-rh-utils into test-ifcfg-rh
We don't need need separate unit tests for basic tests that can
just run in the same test-run. If you really need to run only
a particular set of tests, try
  ./src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/utils

Results in less compilation (time), and less binaries to test during
`make check`.
2016-10-11 11:37:46 +02:00
Thomas Haller 8b1d569e91 gitignore: ignore test-wifi-ap-utils
Although the test "test-wifi-ap-utils" got already renamed to "test-general",
keep ignoring the old binary when switching between branches.
2016-10-08 10:19:10 +02:00
Thomas Haller 44b2044faa wifi: rename NMAccessPoint to NMWifiAP
NMAccessPoint was in file "nm-wifi-ap.h" with
method nm_ap_*(). Make the naming consistent.

Also rename "nm-wifi-ap-utils.*" as it contains general
purpose wifi utilities. No need to have special "ap" utilities.

Same for "test-wifi-ap-utils.c". It just contains general wifi
tests.
2016-10-06 20:35:05 +02:00
Lubomir Rintel db6ebe003d docs: include the D-Bus enums reference with the API documentation
Otherwise the types links would be dangling or resolved to slightly
irrelevant documentation in libnm or completely irrelevant documentation
in libnm-util.
2016-04-22 10:02:37 +02:00
Lubomir Rintel 530af7009e man: don't template NetworkManager.conf.xml
Use XML entities instead.
2016-04-08 13:10:47 +02:00
Lubomir Rintel 29cfb144a8 man: gitignore man7 2016-04-05 20:30:43 +02:00
Lubomir Rintel ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Lubomir Rintel 60582bf443 man: include version from a XML entity
This way it's consistently used across all manual page without a need
for XSL templating.

Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
2016-04-05 14:37:51 +02:00
Beniamino Galvani efa559bcc8 libnm-core: add test cases for NMSettingBond
The setting well deserves some testing.
2016-03-29 18:10:05 +02:00
Lubomir Rintel 3a2803b42c docs: replace spec.html with docbook D-Bus API reference
May use a lot of improvement (actually documenting the names and
objects that use the interfaces in question), but at least this looks a
lot better on developer.gnome.org.
2016-03-26 11:28:19 +01:00
Lubomir Rintel f88dd66e6d introspection: build docbook when generating the code 2016-03-26 11:28:19 +01:00
Thomas Haller 51e292885c systemd/tests: add test util for systemd
Most interestingly is also, whether we can link libsystemd.a without
having undefined references (which might be wrongly satisfied by an
externally loaded libsystem shared library.
2016-03-01 12:42:42 +01:00
Thomas Haller 8cb78ac38b gitignore: ignore /src/devices/tests/test-arping
Fixes: 83b712aa42
2016-01-21 14:57:08 +01:00
Thomas Haller bcd28951a4 gitignore: ignore "include/" directory
When switching between "nm-1-0" branch and "master", it is
common to have a left-over "include/" directory with build
artifacts. Add it to gitignore.
2016-01-07 17:49:38 +01:00
Thomas Haller db80ec05ab build: rename directory "include" to "shared"
Up to now, the "include" directory contained (only) header files that were
used project-wide by libs, core, clients, et al.

Since the directory now also contains a non-header file, the "include"
name is misleading. Instead of adding yet another directory that is
project-wide, with non-header-only content, rename the "include"
directory to "shared".
2015-12-24 11:42:37 +01:00
Thomas Haller d5a8401686 initscript: remove all distribution initscripts
These initscripts weren't modified for a long time. Are they just
unused or flawless? It seems they are no longer best-practice
(e.g. NetworkManager supports reloading configuration via SIGHUP,
which none of these scripts implement).

Nowadays some distributions moved to systemd and quite possible
nobody uses these scripts. Also, any potential downstream user
probably has an adjusted copy of them in their repositories.

Just remove them.

https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00003.html
2015-12-07 13:37:30 +01:00
Thomas Haller 3d8eb6b1e0 gitignore: ignore ifnet/tests/check_ifnet binary
This file no longer exists on master, but it is annoying when
switching branches.
2015-11-25 11:59:37 +01:00
Thomas Haller 3e3bceb6db gitignore: ignore test-utils test binary
Fixes: e603c86926
2015-11-16 16:32:51 +01:00
Thomas Haller 42ab7c8ec1 gitignore: ignore test-lldp file
Fixes: ff31171a1c
2015-11-16 16:30:36 +01:00
Lubomir Rintel 3385dcdc5a gitignore: ignore more generated D-Bus glue 2015-10-27 15:31:13 +01:00
Thomas Haller 7bf10a75db build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a8 removed that dependancy.

For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".

Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.

For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.

[1] https://github.com/hughsie/PackageKit/issues/85

Fixes: 4545a7fe96
2015-09-30 23:10:29 +02:00
Lubomir Rintel d7614d0bda gitignore: ignore GDBus generated glue 2015-09-18 13:53:30 +02:00
Lubomir Rintel 60372f1090 build: create xz compressed by default
GNOME release tooling repacks the bz2 to a xz anyway. This makes it easier for
packagers to use tarballs created with "make dist" in place of distribution
tarballs.
2015-08-13 17:22:44 +02:00
Dan Winship 1cf35cb26b core: final gdbus porting
Port remaining bits to gdbus and remove stray dbus-glib references

Drop the dbus-glib version check from configure, since nothing depends
on new dbus-glib any more.

Move nm-dbus-glib-types.h and nm-gvaluearray-compat.h from include/ to
libnm-util/ since they are now only used by libnm-util and libnm-glib.
2015-08-10 09:41:26 -04:00
Dan Winship 9f8de603e3 ifcfg-rh: port to gdbus 2015-08-10 09:41:26 -04:00
Thomas Haller 176b13374a gitignore: ignore temporary files during build
If you type `git status` a certain times during build,
you see some temporary (untracked) files. Ignore them.
2015-06-11 13:45:37 +02:00
Thomas Haller fb623df747 ifnet/test: rename test check_ifnet to test-ifnet
All our other test binaries are named "test-*" so rename this
one too. Also we gitignore "test-*.log" files, but didn't ignore
"check_ifnet.log".
2015-05-26 16:35:00 +02:00
Lubomir Rintel 380ed63318 build: switch to parallel test harness
This will make it possible to use the TAP formatter.
2015-05-26 13:51:45 +02:00
Dan Williams e52dac9887 trivial: update .gitignore for new rdisc tests 2015-05-01 16:48:53 -05:00
Thomas Haller c9a8764ad2 keyfile: support writing certificates as blob inside the keyfile
keyfile should become our main import/export format. It is desirable,
that a keyfile can contain every aspect of a connection.

For blob certificates, the writer in core daemon would always write
them to a file and convert the scheme to path.
This behavior is not great for a (hyptetical) `nmcli connection export`
command because it would have to export them somehow outside of keyfile,
e.g. by writing them to temporary files.

Instead, if the write handler does not handle a certificate, use a
default implementation in nm_keyfile_write() which adds the blob inside
the keyfile.

Interestingly, keyfile reader already supported reading certificate
blobs. But this legacy format accepts the blob as arbitrary
binary without marking the format and without scheme prefix.
Instead of writing the binary data directly, write it with a new
uri scheme "data:;base64," and encode it in base64.

Also go through some lengths to make sure that whatever path
keyfile plugin writes, can be read back again. That is, because
keyfile writer preferably writes relative paths without prefix.
Add nm_keyfile_detect_unqualified_path_scheme() to encapsulate
the detection of pathnames without file:// prefix and use it to
check whether the path name must be fully qualified.
2015-03-12 18:16:58 +01:00
Lubomir Rintel 0659a67c8f route-manager: add test 2015-02-27 16:48:28 +01:00
Thomas Haller afa369e10c gitignore: do not ignore test artifacts that should be cleaned up by the test themselves 2014-12-18 19:03:06 +01:00
Dan Winship e43ba45f2f cli, libnm: don't use D-Bus-specific documentation in nmcli
Now that nm-setting-docs.xml is more D-Bus-specific, it's less
appropriate for nmcli's internal documentation. So generate a second
copy of the docs without using the overrides file, and use that one
for nmcli's documentation.
2014-11-19 09:24:10 -05:00
Dan Winship 36156b70dc libnm: Override parts of nm-setting-docs.xml
Add "---dbus---" sections to the NMSetting property docs, in the same
style as the plugin docs, parse them out into a file
"nm-setting-docs-overrides.xml", and use them to override the GObject
property docs in nm-setting-docs.xml.

This lets us put more D-Bus-specific information in the setting docs,
without cluttering up the property docs, and it also lets us document
dbus-only properties.
2014-11-19 09:24:10 -05:00
Dan Winship c14486984e libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.

With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).

The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...

(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-11-19 09:24:09 -05:00
Dan Williams 5149fd120d iface-helper: add nm-iface-helper for dynamic configure-then-quit support
When quitting, the Manager asks each device to spawn the interface helper,
which persists and manages dynamic address on the interface after NetworkManager
is gone.  If the dynamic address cannot be maintaned, the helper quits and
the interface's address may be removed when their lifetime runs out.

To keep the helper as simple as possible, NetworkManager passes most of the
configuration on the command-line, including some properties of the device's
current state, which are necessary for the helper to maintain DHCP leases
or IPv6 SLAAC addresses.
2014-11-07 12:18:33 -06:00
Thomas Haller 252286729c gitignore: ignore dhcp test binary
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-07 12:25:33 +01:00
Thomas Haller 63a8c6a184 build: generate man/NetworkManager.conf.xml by autoconf
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:00:11 +02:00
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
Dan Winship 1a5cfc1f45 dispatcher: port to GDBus
Port nm-dispatcher to GDBus, mostly, using dbus-glib's GVariant
utilities to translate the return value of nm_connection_to_dbus().
2014-09-18 11:26:59 -04:00
Dan Williams beb18050b5 settings: create default wired connection from NMDeviceEthernet
Instead of creating it in NMSettings, where we must use
NM_IS_DEVICE_ETHERNET() (not NM_DEVICE_TYPE_ETHERNET because various generic
devices masquerade as NM_DEVICE_TYPE_ETHERNET too), push knowledge
of which device types create default wired connections into the device
types themselves.  This solves a problem with testcases where
libNetworkManager.a (which testcases link to) requires the symbol
nm_type_device_ethernet().
2014-09-11 12:47:07 -05:00
Dan Winship c9fb96e02e libnm: add test-secret-agent
Implement some basic secret agent functionality in
test-networkmanager-service.py, and add test-secret-agent to test that
NMSecretAgent works as expected.
2014-09-09 12:16:38 -04:00
Dan Winship 9e5ddb5830 examples: port dbus-glib-based examples to gdbus
Port the dbus-glib-based examples to GDBus.

Also, don't use libnm in them at all; there's not much point in
examples that use the D-Bus API directly if they're just going to fall
back to libnm for the hard stuff... (And also, this avoids the problem
that GDBus uses GVariant, while the libnm-core APIs currently still
use GHashTables.)

Also fix up some comment grammar and copyright style, and add emacs
modelines where missing.

Also rename the existing GDBus-based examples to have names ending in
"-gdbus", not "-GDBus", since there's no reason to gratuitously
capitalize here.
2014-09-04 18:19:22 -04:00
Dan Winship 99e1699d89 libnm-core: fix up the new property-comparison test program
Make the formerly-nm-param-spec-specialized test compile (fix use of
inet_pton), and pass (include the mandatory "gateway" element in the
IPv6 addresses), make it use gtestutils and g_assert (so it actually
fails when it fails), and test a few more cases.
2014-09-04 09:20:09 -04:00
Dan Winship 799922c14b libnm-util: generate-plugin-docs.pl-related fixes
generate-plugin-docs.pl was assuming that it was being run out of
srcdir, and so failed in srcdir!=builddir builds (such as "make
distcheck"). Fix that.

Also, update .gitignore
2014-09-03 23:06:00 -04:00
Dan Williams 448254f761 ibft: add settings plugin for reading iBFT configuration (bgo #734009)
Instead of handling iBFT (iSCSI Boot Firmware Table) in the ifcfg-rh plugin,
create a new plugin for it.  This allows all distributions to use iBFT
configuration, and makes both iBFT handling and ifcfg-rh less complicated.

The plugin (like the old ifcfg-rh code) creates read-only connections backed
by the data exported by iscsiadm.  The plugin does not support adding new
connections or modifying existing connections (since the iBFT data is
read-only anyway).  Instead, users should change their iBFT data through
the normal firmware interfaces.

Unmanaged devices can be configured through NetworkManager.conf and the
normal 'keyfile' mechanisms.

(In the future, we'll read this data directly from the kernel's
/sys/firmware/ibft/ethernetX directory instead of iscsiadm, since the
kernel has all the information we need and that's where iscsiadm gets
it from anyway.)

https://bugzilla.gnome.org/show_bug.cgi?id=734009
2014-08-29 18:46:11 -05:00
Thomas Haller 4b9dc30988 gitignore: ignore /libgsystem/
When switching to and fro old branches, you end up with
the (now removed) libgsystem submodule. As `git clean -fd`
refuses to remove git-repositories, this is especially annoying.

Tell git to ignore it.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-27 17:26:30 +02:00
Dan Winship 4c14b3db2a trivial: reorganize .gitignore
alphabetize by subdir; no other changes
2014-08-26 14:42:01 -04:00