From 3d25d70461b7ed07c8b998620975daf149dc60d0 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 22 Jul 2014 17:55:13 -0400 Subject: [PATCH 1/6] 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/. --- .gitignore | 11 ++- Makefile.am | 3 +- cli/Makefile.am | 2 - cli/completion/Makefile.am | 2 - clients/Makefile.am | 26 +++++++ {cli/src => clients/cli}/Makefile.am | 11 +++ {cli/src => clients/cli}/common.c | 0 {cli/src => clients/cli}/common.h | 0 {cli/src => clients/cli}/connections.c | 0 {cli/src => clients/cli}/connections.h | 0 {cli/src => clients/cli}/devices.c | 0 {cli/src => clients/cli}/devices.h | 0 {cli/src => clients/cli}/network-manager.c | 0 {cli/src => clients/cli}/network-manager.h | 0 .../nmcli => clients/cli/nmcli-completion | 0 {cli/src => clients/cli}/nmcli.c | 0 {cli/src => clients/cli}/nmcli.h | 0 {cli/src => clients/cli}/settings-docs.xsl | 0 {cli/src => clients/cli}/settings.c | 0 {cli/src => clients/cli}/settings.h | 0 {cli/src => clients/cli}/utils.c | 0 {cli/src => clients/cli}/utils.h | 0 {test => clients}/nm-online.c | 0 {tui => clients/tui}/Makefile.am | 0 {tui => clients/tui}/newt/Makefile.am | 0 .../tui}/newt/nmt-newt-button-box.c | 0 .../tui}/newt/nmt-newt-button-box.h | 0 {tui => clients/tui}/newt/nmt-newt-button.c | 0 {tui => clients/tui}/newt/nmt-newt-button.h | 0 {tui => clients/tui}/newt/nmt-newt-checkbox.c | 0 {tui => clients/tui}/newt/nmt-newt-checkbox.h | 0 .../tui}/newt/nmt-newt-component.c | 0 .../tui}/newt/nmt-newt-component.h | 0 .../tui}/newt/nmt-newt-container.c | 0 .../tui}/newt/nmt-newt-container.h | 0 .../tui}/newt/nmt-newt-entry-numeric.c | 0 .../tui}/newt/nmt-newt-entry-numeric.h | 0 {tui => clients/tui}/newt/nmt-newt-entry.c | 0 {tui => clients/tui}/newt/nmt-newt-entry.h | 0 {tui => clients/tui}/newt/nmt-newt-form.c | 0 {tui => clients/tui}/newt/nmt-newt-form.h | 0 {tui => clients/tui}/newt/nmt-newt-grid.c | 0 {tui => clients/tui}/newt/nmt-newt-grid.h | 0 {tui => clients/tui}/newt/nmt-newt-hacks.c | 0 {tui => clients/tui}/newt/nmt-newt-hacks.h | 0 {tui => clients/tui}/newt/nmt-newt-label.c | 0 {tui => clients/tui}/newt/nmt-newt-label.h | 0 {tui => clients/tui}/newt/nmt-newt-listbox.c | 0 {tui => clients/tui}/newt/nmt-newt-listbox.h | 0 {tui => clients/tui}/newt/nmt-newt-popup.c | 0 {tui => clients/tui}/newt/nmt-newt-popup.h | 0 {tui => clients/tui}/newt/nmt-newt-section.c | 0 {tui => clients/tui}/newt/nmt-newt-section.h | 0 .../tui}/newt/nmt-newt-separator.c | 0 .../tui}/newt/nmt-newt-separator.h | 0 {tui => clients/tui}/newt/nmt-newt-stack.c | 0 {tui => clients/tui}/newt/nmt-newt-stack.h | 0 {tui => clients/tui}/newt/nmt-newt-textbox.c | 0 {tui => clients/tui}/newt/nmt-newt-textbox.h | 0 .../tui}/newt/nmt-newt-toggle-button.c | 0 .../tui}/newt/nmt-newt-toggle-button.h | 0 {tui => clients/tui}/newt/nmt-newt-types.h | 0 {tui => clients/tui}/newt/nmt-newt-utils.c | 0 {tui => clients/tui}/newt/nmt-newt-utils.h | 0 {tui => clients/tui}/newt/nmt-newt-widget.c | 0 {tui => clients/tui}/newt/nmt-newt-widget.h | 0 {tui => clients/tui}/newt/nmt-newt.h | 0 {tui => clients/tui}/nm-editor-bindings.c | 0 {tui => clients/tui}/nm-editor-bindings.h | 0 {tui => clients/tui}/nm-editor-utils.c | 0 {tui => clients/tui}/nm-editor-utils.h | 0 {tui => clients/tui}/nmt-address-list.c | 0 {tui => clients/tui}/nmt-address-list.h | 0 .../tui}/nmt-connect-connection-list.c | 0 .../tui}/nmt-connect-connection-list.h | 0 {tui => clients/tui}/nmt-device-entry.c | 0 {tui => clients/tui}/nmt-device-entry.h | 0 .../tui}/nmt-edit-connection-list.c | 0 .../tui}/nmt-edit-connection-list.h | 0 {tui => clients/tui}/nmt-editor-page.c | 0 {tui => clients/tui}/nmt-editor-page.h | 0 {tui => clients/tui}/nmt-editor.c | 0 {tui => clients/tui}/nmt-editor.h | 0 {tui => clients/tui}/nmt-ip-entry.c | 0 {tui => clients/tui}/nmt-ip-entry.h | 0 {tui => clients/tui}/nmt-mac-entry.c | 0 {tui => clients/tui}/nmt-mac-entry.h | 0 {tui => clients/tui}/nmt-mtu-entry.c | 0 {tui => clients/tui}/nmt-mtu-entry.h | 0 {tui => clients/tui}/nmt-page-bond.c | 0 {tui => clients/tui}/nmt-page-bond.h | 0 {tui => clients/tui}/nmt-page-bridge-port.c | 0 {tui => clients/tui}/nmt-page-bridge-port.h | 0 {tui => clients/tui}/nmt-page-bridge.c | 0 {tui => clients/tui}/nmt-page-bridge.h | 0 {tui => clients/tui}/nmt-page-device.c | 0 {tui => clients/tui}/nmt-page-device.h | 0 {tui => clients/tui}/nmt-page-ethernet.c | 0 {tui => clients/tui}/nmt-page-ethernet.h | 0 {tui => clients/tui}/nmt-page-grid.c | 0 {tui => clients/tui}/nmt-page-grid.h | 0 {tui => clients/tui}/nmt-page-infiniband.c | 0 {tui => clients/tui}/nmt-page-infiniband.h | 0 {tui => clients/tui}/nmt-page-ip4.c | 0 {tui => clients/tui}/nmt-page-ip4.h | 0 {tui => clients/tui}/nmt-page-ip6.c | 0 {tui => clients/tui}/nmt-page-ip6.h | 0 {tui => clients/tui}/nmt-page-main.c | 0 {tui => clients/tui}/nmt-page-main.h | 0 {tui => clients/tui}/nmt-page-team-port.c | 0 {tui => clients/tui}/nmt-page-team-port.h | 0 {tui => clients/tui}/nmt-page-team.c | 0 {tui => clients/tui}/nmt-page-team.h | 0 {tui => clients/tui}/nmt-page-vlan.c | 0 {tui => clients/tui}/nmt-page-vlan.h | 0 {tui => clients/tui}/nmt-page-wifi.c | 0 {tui => clients/tui}/nmt-page-wifi.h | 0 {tui => clients/tui}/nmt-password-dialog.c | 0 {tui => clients/tui}/nmt-password-dialog.h | 0 {tui => clients/tui}/nmt-password-fields.c | 0 {tui => clients/tui}/nmt-password-fields.h | 0 {tui => clients/tui}/nmt-route-editor.c | 0 {tui => clients/tui}/nmt-route-editor.h | 0 {tui => clients/tui}/nmt-route-entry.c | 0 {tui => clients/tui}/nmt-route-entry.h | 0 {tui => clients/tui}/nmt-route-table.c | 0 {tui => clients/tui}/nmt-route-table.h | 0 {tui => clients/tui}/nmt-secret-agent.c | 0 {tui => clients/tui}/nmt-secret-agent.h | 0 {tui => clients/tui}/nmt-slave-list.c | 0 {tui => clients/tui}/nmt-slave-list.h | 0 {tui => clients/tui}/nmt-utils.c | 0 {tui => clients/tui}/nmt-utils.h | 0 {tui => clients/tui}/nmt-widget-list.c | 0 {tui => clients/tui}/nmt-widget-list.h | 0 {tui => clients/tui}/nmtui-connect.c | 0 {tui => clients/tui}/nmtui-connect.h | 0 {tui => clients/tui}/nmtui-edit.c | 0 {tui => clients/tui}/nmtui-edit.h | 0 {tui => clients/tui}/nmtui-hostname.c | 0 {tui => clients/tui}/nmtui-hostname.h | 0 {tui => clients/tui}/nmtui.c | 0 {tui => clients/tui}/nmtui.h | 0 {tui => clients/tui}/vpn-helpers.c | 0 {tui => clients/tui}/vpn-helpers.h | 0 configure.ac | 9 +-- contrib/fedora/rpm/NetworkManager.spec | 2 - po/POTFILES.in | 77 +++++++++---------- po/POTFILES.skip | 2 +- test/Makefile.am | 13 ---- 150 files changed, 86 insertions(+), 72 deletions(-) delete mode 100644 cli/Makefile.am delete mode 100644 cli/completion/Makefile.am create mode 100644 clients/Makefile.am rename {cli/src => clients/cli}/Makefile.am (77%) rename {cli/src => clients/cli}/common.c (100%) rename {cli/src => clients/cli}/common.h (100%) rename {cli/src => clients/cli}/connections.c (100%) rename {cli/src => clients/cli}/connections.h (100%) rename {cli/src => clients/cli}/devices.c (100%) rename {cli/src => clients/cli}/devices.h (100%) rename {cli/src => clients/cli}/network-manager.c (100%) rename {cli/src => clients/cli}/network-manager.h (100%) rename cli/completion/nmcli => clients/cli/nmcli-completion (100%) rename {cli/src => clients/cli}/nmcli.c (100%) rename {cli/src => clients/cli}/nmcli.h (100%) rename {cli/src => clients/cli}/settings-docs.xsl (100%) rename {cli/src => clients/cli}/settings.c (100%) rename {cli/src => clients/cli}/settings.h (100%) rename {cli/src => clients/cli}/utils.c (100%) rename {cli/src => clients/cli}/utils.h (100%) rename {test => clients}/nm-online.c (100%) rename {tui => clients/tui}/Makefile.am (100%) rename {tui => clients/tui}/newt/Makefile.am (100%) rename {tui => clients/tui}/newt/nmt-newt-button-box.c (100%) rename {tui => clients/tui}/newt/nmt-newt-button-box.h (100%) rename {tui => clients/tui}/newt/nmt-newt-button.c (100%) rename {tui => clients/tui}/newt/nmt-newt-button.h (100%) rename {tui => clients/tui}/newt/nmt-newt-checkbox.c (100%) rename {tui => clients/tui}/newt/nmt-newt-checkbox.h (100%) rename {tui => clients/tui}/newt/nmt-newt-component.c (100%) rename {tui => clients/tui}/newt/nmt-newt-component.h (100%) rename {tui => clients/tui}/newt/nmt-newt-container.c (100%) rename {tui => clients/tui}/newt/nmt-newt-container.h (100%) rename {tui => clients/tui}/newt/nmt-newt-entry-numeric.c (100%) rename {tui => clients/tui}/newt/nmt-newt-entry-numeric.h (100%) rename {tui => clients/tui}/newt/nmt-newt-entry.c (100%) rename {tui => clients/tui}/newt/nmt-newt-entry.h (100%) rename {tui => clients/tui}/newt/nmt-newt-form.c (100%) rename {tui => clients/tui}/newt/nmt-newt-form.h (100%) rename {tui => clients/tui}/newt/nmt-newt-grid.c (100%) rename {tui => clients/tui}/newt/nmt-newt-grid.h (100%) rename {tui => clients/tui}/newt/nmt-newt-hacks.c (100%) rename {tui => clients/tui}/newt/nmt-newt-hacks.h (100%) rename {tui => clients/tui}/newt/nmt-newt-label.c (100%) rename {tui => clients/tui}/newt/nmt-newt-label.h (100%) rename {tui => clients/tui}/newt/nmt-newt-listbox.c (100%) rename {tui => clients/tui}/newt/nmt-newt-listbox.h (100%) rename {tui => clients/tui}/newt/nmt-newt-popup.c (100%) rename {tui => clients/tui}/newt/nmt-newt-popup.h (100%) rename {tui => clients/tui}/newt/nmt-newt-section.c (100%) rename {tui => clients/tui}/newt/nmt-newt-section.h (100%) rename {tui => clients/tui}/newt/nmt-newt-separator.c (100%) rename {tui => clients/tui}/newt/nmt-newt-separator.h (100%) rename {tui => clients/tui}/newt/nmt-newt-stack.c (100%) rename {tui => clients/tui}/newt/nmt-newt-stack.h (100%) rename {tui => clients/tui}/newt/nmt-newt-textbox.c (100%) rename {tui => clients/tui}/newt/nmt-newt-textbox.h (100%) rename {tui => clients/tui}/newt/nmt-newt-toggle-button.c (100%) rename {tui => clients/tui}/newt/nmt-newt-toggle-button.h (100%) rename {tui => clients/tui}/newt/nmt-newt-types.h (100%) rename {tui => clients/tui}/newt/nmt-newt-utils.c (100%) rename {tui => clients/tui}/newt/nmt-newt-utils.h (100%) rename {tui => clients/tui}/newt/nmt-newt-widget.c (100%) rename {tui => clients/tui}/newt/nmt-newt-widget.h (100%) rename {tui => clients/tui}/newt/nmt-newt.h (100%) rename {tui => clients/tui}/nm-editor-bindings.c (100%) rename {tui => clients/tui}/nm-editor-bindings.h (100%) rename {tui => clients/tui}/nm-editor-utils.c (100%) rename {tui => clients/tui}/nm-editor-utils.h (100%) rename {tui => clients/tui}/nmt-address-list.c (100%) rename {tui => clients/tui}/nmt-address-list.h (100%) rename {tui => clients/tui}/nmt-connect-connection-list.c (100%) rename {tui => clients/tui}/nmt-connect-connection-list.h (100%) rename {tui => clients/tui}/nmt-device-entry.c (100%) rename {tui => clients/tui}/nmt-device-entry.h (100%) rename {tui => clients/tui}/nmt-edit-connection-list.c (100%) rename {tui => clients/tui}/nmt-edit-connection-list.h (100%) rename {tui => clients/tui}/nmt-editor-page.c (100%) rename {tui => clients/tui}/nmt-editor-page.h (100%) rename {tui => clients/tui}/nmt-editor.c (100%) rename {tui => clients/tui}/nmt-editor.h (100%) rename {tui => clients/tui}/nmt-ip-entry.c (100%) rename {tui => clients/tui}/nmt-ip-entry.h (100%) rename {tui => clients/tui}/nmt-mac-entry.c (100%) rename {tui => clients/tui}/nmt-mac-entry.h (100%) rename {tui => clients/tui}/nmt-mtu-entry.c (100%) rename {tui => clients/tui}/nmt-mtu-entry.h (100%) rename {tui => clients/tui}/nmt-page-bond.c (100%) rename {tui => clients/tui}/nmt-page-bond.h (100%) rename {tui => clients/tui}/nmt-page-bridge-port.c (100%) rename {tui => clients/tui}/nmt-page-bridge-port.h (100%) rename {tui => clients/tui}/nmt-page-bridge.c (100%) rename {tui => clients/tui}/nmt-page-bridge.h (100%) rename {tui => clients/tui}/nmt-page-device.c (100%) rename {tui => clients/tui}/nmt-page-device.h (100%) rename {tui => clients/tui}/nmt-page-ethernet.c (100%) rename {tui => clients/tui}/nmt-page-ethernet.h (100%) rename {tui => clients/tui}/nmt-page-grid.c (100%) rename {tui => clients/tui}/nmt-page-grid.h (100%) rename {tui => clients/tui}/nmt-page-infiniband.c (100%) rename {tui => clients/tui}/nmt-page-infiniband.h (100%) rename {tui => clients/tui}/nmt-page-ip4.c (100%) rename {tui => clients/tui}/nmt-page-ip4.h (100%) rename {tui => clients/tui}/nmt-page-ip6.c (100%) rename {tui => clients/tui}/nmt-page-ip6.h (100%) rename {tui => clients/tui}/nmt-page-main.c (100%) rename {tui => clients/tui}/nmt-page-main.h (100%) rename {tui => clients/tui}/nmt-page-team-port.c (100%) rename {tui => clients/tui}/nmt-page-team-port.h (100%) rename {tui => clients/tui}/nmt-page-team.c (100%) rename {tui => clients/tui}/nmt-page-team.h (100%) rename {tui => clients/tui}/nmt-page-vlan.c (100%) rename {tui => clients/tui}/nmt-page-vlan.h (100%) rename {tui => clients/tui}/nmt-page-wifi.c (100%) rename {tui => clients/tui}/nmt-page-wifi.h (100%) rename {tui => clients/tui}/nmt-password-dialog.c (100%) rename {tui => clients/tui}/nmt-password-dialog.h (100%) rename {tui => clients/tui}/nmt-password-fields.c (100%) rename {tui => clients/tui}/nmt-password-fields.h (100%) rename {tui => clients/tui}/nmt-route-editor.c (100%) rename {tui => clients/tui}/nmt-route-editor.h (100%) rename {tui => clients/tui}/nmt-route-entry.c (100%) rename {tui => clients/tui}/nmt-route-entry.h (100%) rename {tui => clients/tui}/nmt-route-table.c (100%) rename {tui => clients/tui}/nmt-route-table.h (100%) rename {tui => clients/tui}/nmt-secret-agent.c (100%) rename {tui => clients/tui}/nmt-secret-agent.h (100%) rename {tui => clients/tui}/nmt-slave-list.c (100%) rename {tui => clients/tui}/nmt-slave-list.h (100%) rename {tui => clients/tui}/nmt-utils.c (100%) rename {tui => clients/tui}/nmt-utils.h (100%) rename {tui => clients/tui}/nmt-widget-list.c (100%) rename {tui => clients/tui}/nmt-widget-list.h (100%) rename {tui => clients/tui}/nmtui-connect.c (100%) rename {tui => clients/tui}/nmtui-connect.h (100%) rename {tui => clients/tui}/nmtui-edit.c (100%) rename {tui => clients/tui}/nmtui-edit.h (100%) rename {tui => clients/tui}/nmtui-hostname.c (100%) rename {tui => clients/tui}/nmtui-hostname.h (100%) rename {tui => clients/tui}/nmtui.c (100%) rename {tui => clients/tui}/nmtui.h (100%) rename {tui => clients/tui}/vpn-helpers.c (100%) rename {tui => clients/tui}/vpn-helpers.h (100%) diff --git a/.gitignore b/.gitignore index 824291915d..18fb67d45d 100644 --- a/.gitignore +++ b/.gitignore @@ -166,7 +166,6 @@ valgrind-*.log /system-settings/src /test/libnm-glib-test /test/libnm_glib_test -/test/nm-online /test/nmtestdevices /libnm-util/nm-version.h /libnm-util/nm-setting-docs.xml @@ -219,10 +218,10 @@ valgrind-*.log /data/org.freedesktop.NetworkManager.service /data/server.conf -/cli/src/nmcli -/cli/src/settings-docs.c - -/tui/newt/libnmt-newt.a -/tui/nmtui +clients/cli/nmcli +clients/cli/settings-docs.c +clients/tui/newt/libnmt-newt.a +clients/tui/nmtui +clients/nm-online /vapi/*.vapi diff --git a/Makefile.am b/Makefile.am index 97f094d791..ea0bab0f9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,8 +8,7 @@ SUBDIRS = \ introspection \ src \ callouts \ - cli \ - tui \ + clients \ tools \ policy \ data \ diff --git a/cli/Makefile.am b/cli/Makefile.am deleted file mode 100644 index f436d46da7..0000000000 --- a/cli/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = src completion - diff --git a/cli/completion/Makefile.am b/cli/completion/Makefile.am deleted file mode 100644 index 9a250f070b..0000000000 --- a/cli/completion/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -completiondir = $(datadir)/bash-completion/completions -dist_completion_DATA = nmcli diff --git a/clients/Makefile.am b/clients/Makefile.am new file mode 100644 index 0000000000..616887df15 --- /dev/null +++ b/clients/Makefile.am @@ -0,0 +1,26 @@ +SUBDIRS = cli tui + +AM_CPPFLAGS = \ + -I${top_srcdir} \ + -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-util \ + -I${top_srcdir}/libnm-glib \ + -I${top_builddir}/libnm-glib \ + -I${top_srcdir}/include \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ + -DNMLOCALEDIR=\"$(datadir)/locale\" + +bin_PROGRAMS = nm-online + +nm_online_SOURCES = nm-online.c +nm_online_CPPFLAGS = \ + -DG_LOG_DOMAIN=\""nm-online"\" \ + $(AM_CPPFLAGS) + +nm_online_LDADD = \ + $(top_builddir)/libnm-glib/libnm-glib.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) diff --git a/cli/src/Makefile.am b/clients/cli/Makefile.am similarity index 77% rename from cli/src/Makefile.am rename to clients/cli/Makefile.am index 70dbd9795f..65df699abd 100644 --- a/cli/src/Makefile.am +++ b/clients/cli/Makefile.am @@ -47,3 +47,14 @@ endif DISTCLEANFILES = settings-docs.c EXTRA_DIST = settings-docs.c settings-docs.xsl + +completiondir = $(datadir)/bash-completion/completions + +install-data-hook: + $(mkinstalldirs) $(DESTDIR)$(completiondir) + $(INSTALL_DATA) $(srcdir)/nmcli-completion $(DESTDIR)$(completiondir)/nmcli + +uninstall-hook: + rm -f $(DESTDIR)$(completiondir)/nmcli + +EXTRA_DIST += nmcli-completion diff --git a/cli/src/common.c b/clients/cli/common.c similarity index 100% rename from cli/src/common.c rename to clients/cli/common.c diff --git a/cli/src/common.h b/clients/cli/common.h similarity index 100% rename from cli/src/common.h rename to clients/cli/common.h diff --git a/cli/src/connections.c b/clients/cli/connections.c similarity index 100% rename from cli/src/connections.c rename to clients/cli/connections.c diff --git a/cli/src/connections.h b/clients/cli/connections.h similarity index 100% rename from cli/src/connections.h rename to clients/cli/connections.h diff --git a/cli/src/devices.c b/clients/cli/devices.c similarity index 100% rename from cli/src/devices.c rename to clients/cli/devices.c diff --git a/cli/src/devices.h b/clients/cli/devices.h similarity index 100% rename from cli/src/devices.h rename to clients/cli/devices.h diff --git a/cli/src/network-manager.c b/clients/cli/network-manager.c similarity index 100% rename from cli/src/network-manager.c rename to clients/cli/network-manager.c diff --git a/cli/src/network-manager.h b/clients/cli/network-manager.h similarity index 100% rename from cli/src/network-manager.h rename to clients/cli/network-manager.h diff --git a/cli/completion/nmcli b/clients/cli/nmcli-completion similarity index 100% rename from cli/completion/nmcli rename to clients/cli/nmcli-completion diff --git a/cli/src/nmcli.c b/clients/cli/nmcli.c similarity index 100% rename from cli/src/nmcli.c rename to clients/cli/nmcli.c diff --git a/cli/src/nmcli.h b/clients/cli/nmcli.h similarity index 100% rename from cli/src/nmcli.h rename to clients/cli/nmcli.h diff --git a/cli/src/settings-docs.xsl b/clients/cli/settings-docs.xsl similarity index 100% rename from cli/src/settings-docs.xsl rename to clients/cli/settings-docs.xsl diff --git a/cli/src/settings.c b/clients/cli/settings.c similarity index 100% rename from cli/src/settings.c rename to clients/cli/settings.c diff --git a/cli/src/settings.h b/clients/cli/settings.h similarity index 100% rename from cli/src/settings.h rename to clients/cli/settings.h diff --git a/cli/src/utils.c b/clients/cli/utils.c similarity index 100% rename from cli/src/utils.c rename to clients/cli/utils.c diff --git a/cli/src/utils.h b/clients/cli/utils.h similarity index 100% rename from cli/src/utils.h rename to clients/cli/utils.h diff --git a/test/nm-online.c b/clients/nm-online.c similarity index 100% rename from test/nm-online.c rename to clients/nm-online.c diff --git a/tui/Makefile.am b/clients/tui/Makefile.am similarity index 100% rename from tui/Makefile.am rename to clients/tui/Makefile.am diff --git a/tui/newt/Makefile.am b/clients/tui/newt/Makefile.am similarity index 100% rename from tui/newt/Makefile.am rename to clients/tui/newt/Makefile.am diff --git a/tui/newt/nmt-newt-button-box.c b/clients/tui/newt/nmt-newt-button-box.c similarity index 100% rename from tui/newt/nmt-newt-button-box.c rename to clients/tui/newt/nmt-newt-button-box.c diff --git a/tui/newt/nmt-newt-button-box.h b/clients/tui/newt/nmt-newt-button-box.h similarity index 100% rename from tui/newt/nmt-newt-button-box.h rename to clients/tui/newt/nmt-newt-button-box.h diff --git a/tui/newt/nmt-newt-button.c b/clients/tui/newt/nmt-newt-button.c similarity index 100% rename from tui/newt/nmt-newt-button.c rename to clients/tui/newt/nmt-newt-button.c diff --git a/tui/newt/nmt-newt-button.h b/clients/tui/newt/nmt-newt-button.h similarity index 100% rename from tui/newt/nmt-newt-button.h rename to clients/tui/newt/nmt-newt-button.h diff --git a/tui/newt/nmt-newt-checkbox.c b/clients/tui/newt/nmt-newt-checkbox.c similarity index 100% rename from tui/newt/nmt-newt-checkbox.c rename to clients/tui/newt/nmt-newt-checkbox.c diff --git a/tui/newt/nmt-newt-checkbox.h b/clients/tui/newt/nmt-newt-checkbox.h similarity index 100% rename from tui/newt/nmt-newt-checkbox.h rename to clients/tui/newt/nmt-newt-checkbox.h diff --git a/tui/newt/nmt-newt-component.c b/clients/tui/newt/nmt-newt-component.c similarity index 100% rename from tui/newt/nmt-newt-component.c rename to clients/tui/newt/nmt-newt-component.c diff --git a/tui/newt/nmt-newt-component.h b/clients/tui/newt/nmt-newt-component.h similarity index 100% rename from tui/newt/nmt-newt-component.h rename to clients/tui/newt/nmt-newt-component.h diff --git a/tui/newt/nmt-newt-container.c b/clients/tui/newt/nmt-newt-container.c similarity index 100% rename from tui/newt/nmt-newt-container.c rename to clients/tui/newt/nmt-newt-container.c diff --git a/tui/newt/nmt-newt-container.h b/clients/tui/newt/nmt-newt-container.h similarity index 100% rename from tui/newt/nmt-newt-container.h rename to clients/tui/newt/nmt-newt-container.h diff --git a/tui/newt/nmt-newt-entry-numeric.c b/clients/tui/newt/nmt-newt-entry-numeric.c similarity index 100% rename from tui/newt/nmt-newt-entry-numeric.c rename to clients/tui/newt/nmt-newt-entry-numeric.c diff --git a/tui/newt/nmt-newt-entry-numeric.h b/clients/tui/newt/nmt-newt-entry-numeric.h similarity index 100% rename from tui/newt/nmt-newt-entry-numeric.h rename to clients/tui/newt/nmt-newt-entry-numeric.h diff --git a/tui/newt/nmt-newt-entry.c b/clients/tui/newt/nmt-newt-entry.c similarity index 100% rename from tui/newt/nmt-newt-entry.c rename to clients/tui/newt/nmt-newt-entry.c diff --git a/tui/newt/nmt-newt-entry.h b/clients/tui/newt/nmt-newt-entry.h similarity index 100% rename from tui/newt/nmt-newt-entry.h rename to clients/tui/newt/nmt-newt-entry.h diff --git a/tui/newt/nmt-newt-form.c b/clients/tui/newt/nmt-newt-form.c similarity index 100% rename from tui/newt/nmt-newt-form.c rename to clients/tui/newt/nmt-newt-form.c diff --git a/tui/newt/nmt-newt-form.h b/clients/tui/newt/nmt-newt-form.h similarity index 100% rename from tui/newt/nmt-newt-form.h rename to clients/tui/newt/nmt-newt-form.h diff --git a/tui/newt/nmt-newt-grid.c b/clients/tui/newt/nmt-newt-grid.c similarity index 100% rename from tui/newt/nmt-newt-grid.c rename to clients/tui/newt/nmt-newt-grid.c diff --git a/tui/newt/nmt-newt-grid.h b/clients/tui/newt/nmt-newt-grid.h similarity index 100% rename from tui/newt/nmt-newt-grid.h rename to clients/tui/newt/nmt-newt-grid.h diff --git a/tui/newt/nmt-newt-hacks.c b/clients/tui/newt/nmt-newt-hacks.c similarity index 100% rename from tui/newt/nmt-newt-hacks.c rename to clients/tui/newt/nmt-newt-hacks.c diff --git a/tui/newt/nmt-newt-hacks.h b/clients/tui/newt/nmt-newt-hacks.h similarity index 100% rename from tui/newt/nmt-newt-hacks.h rename to clients/tui/newt/nmt-newt-hacks.h diff --git a/tui/newt/nmt-newt-label.c b/clients/tui/newt/nmt-newt-label.c similarity index 100% rename from tui/newt/nmt-newt-label.c rename to clients/tui/newt/nmt-newt-label.c diff --git a/tui/newt/nmt-newt-label.h b/clients/tui/newt/nmt-newt-label.h similarity index 100% rename from tui/newt/nmt-newt-label.h rename to clients/tui/newt/nmt-newt-label.h diff --git a/tui/newt/nmt-newt-listbox.c b/clients/tui/newt/nmt-newt-listbox.c similarity index 100% rename from tui/newt/nmt-newt-listbox.c rename to clients/tui/newt/nmt-newt-listbox.c diff --git a/tui/newt/nmt-newt-listbox.h b/clients/tui/newt/nmt-newt-listbox.h similarity index 100% rename from tui/newt/nmt-newt-listbox.h rename to clients/tui/newt/nmt-newt-listbox.h diff --git a/tui/newt/nmt-newt-popup.c b/clients/tui/newt/nmt-newt-popup.c similarity index 100% rename from tui/newt/nmt-newt-popup.c rename to clients/tui/newt/nmt-newt-popup.c diff --git a/tui/newt/nmt-newt-popup.h b/clients/tui/newt/nmt-newt-popup.h similarity index 100% rename from tui/newt/nmt-newt-popup.h rename to clients/tui/newt/nmt-newt-popup.h diff --git a/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c similarity index 100% rename from tui/newt/nmt-newt-section.c rename to clients/tui/newt/nmt-newt-section.c diff --git a/tui/newt/nmt-newt-section.h b/clients/tui/newt/nmt-newt-section.h similarity index 100% rename from tui/newt/nmt-newt-section.h rename to clients/tui/newt/nmt-newt-section.h diff --git a/tui/newt/nmt-newt-separator.c b/clients/tui/newt/nmt-newt-separator.c similarity index 100% rename from tui/newt/nmt-newt-separator.c rename to clients/tui/newt/nmt-newt-separator.c diff --git a/tui/newt/nmt-newt-separator.h b/clients/tui/newt/nmt-newt-separator.h similarity index 100% rename from tui/newt/nmt-newt-separator.h rename to clients/tui/newt/nmt-newt-separator.h diff --git a/tui/newt/nmt-newt-stack.c b/clients/tui/newt/nmt-newt-stack.c similarity index 100% rename from tui/newt/nmt-newt-stack.c rename to clients/tui/newt/nmt-newt-stack.c diff --git a/tui/newt/nmt-newt-stack.h b/clients/tui/newt/nmt-newt-stack.h similarity index 100% rename from tui/newt/nmt-newt-stack.h rename to clients/tui/newt/nmt-newt-stack.h diff --git a/tui/newt/nmt-newt-textbox.c b/clients/tui/newt/nmt-newt-textbox.c similarity index 100% rename from tui/newt/nmt-newt-textbox.c rename to clients/tui/newt/nmt-newt-textbox.c diff --git a/tui/newt/nmt-newt-textbox.h b/clients/tui/newt/nmt-newt-textbox.h similarity index 100% rename from tui/newt/nmt-newt-textbox.h rename to clients/tui/newt/nmt-newt-textbox.h diff --git a/tui/newt/nmt-newt-toggle-button.c b/clients/tui/newt/nmt-newt-toggle-button.c similarity index 100% rename from tui/newt/nmt-newt-toggle-button.c rename to clients/tui/newt/nmt-newt-toggle-button.c diff --git a/tui/newt/nmt-newt-toggle-button.h b/clients/tui/newt/nmt-newt-toggle-button.h similarity index 100% rename from tui/newt/nmt-newt-toggle-button.h rename to clients/tui/newt/nmt-newt-toggle-button.h diff --git a/tui/newt/nmt-newt-types.h b/clients/tui/newt/nmt-newt-types.h similarity index 100% rename from tui/newt/nmt-newt-types.h rename to clients/tui/newt/nmt-newt-types.h diff --git a/tui/newt/nmt-newt-utils.c b/clients/tui/newt/nmt-newt-utils.c similarity index 100% rename from tui/newt/nmt-newt-utils.c rename to clients/tui/newt/nmt-newt-utils.c diff --git a/tui/newt/nmt-newt-utils.h b/clients/tui/newt/nmt-newt-utils.h similarity index 100% rename from tui/newt/nmt-newt-utils.h rename to clients/tui/newt/nmt-newt-utils.h diff --git a/tui/newt/nmt-newt-widget.c b/clients/tui/newt/nmt-newt-widget.c similarity index 100% rename from tui/newt/nmt-newt-widget.c rename to clients/tui/newt/nmt-newt-widget.c diff --git a/tui/newt/nmt-newt-widget.h b/clients/tui/newt/nmt-newt-widget.h similarity index 100% rename from tui/newt/nmt-newt-widget.h rename to clients/tui/newt/nmt-newt-widget.h diff --git a/tui/newt/nmt-newt.h b/clients/tui/newt/nmt-newt.h similarity index 100% rename from tui/newt/nmt-newt.h rename to clients/tui/newt/nmt-newt.h diff --git a/tui/nm-editor-bindings.c b/clients/tui/nm-editor-bindings.c similarity index 100% rename from tui/nm-editor-bindings.c rename to clients/tui/nm-editor-bindings.c diff --git a/tui/nm-editor-bindings.h b/clients/tui/nm-editor-bindings.h similarity index 100% rename from tui/nm-editor-bindings.h rename to clients/tui/nm-editor-bindings.h diff --git a/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c similarity index 100% rename from tui/nm-editor-utils.c rename to clients/tui/nm-editor-utils.c diff --git a/tui/nm-editor-utils.h b/clients/tui/nm-editor-utils.h similarity index 100% rename from tui/nm-editor-utils.h rename to clients/tui/nm-editor-utils.h diff --git a/tui/nmt-address-list.c b/clients/tui/nmt-address-list.c similarity index 100% rename from tui/nmt-address-list.c rename to clients/tui/nmt-address-list.c diff --git a/tui/nmt-address-list.h b/clients/tui/nmt-address-list.h similarity index 100% rename from tui/nmt-address-list.h rename to clients/tui/nmt-address-list.h diff --git a/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c similarity index 100% rename from tui/nmt-connect-connection-list.c rename to clients/tui/nmt-connect-connection-list.c diff --git a/tui/nmt-connect-connection-list.h b/clients/tui/nmt-connect-connection-list.h similarity index 100% rename from tui/nmt-connect-connection-list.h rename to clients/tui/nmt-connect-connection-list.h diff --git a/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c similarity index 100% rename from tui/nmt-device-entry.c rename to clients/tui/nmt-device-entry.c diff --git a/tui/nmt-device-entry.h b/clients/tui/nmt-device-entry.h similarity index 100% rename from tui/nmt-device-entry.h rename to clients/tui/nmt-device-entry.h diff --git a/tui/nmt-edit-connection-list.c b/clients/tui/nmt-edit-connection-list.c similarity index 100% rename from tui/nmt-edit-connection-list.c rename to clients/tui/nmt-edit-connection-list.c diff --git a/tui/nmt-edit-connection-list.h b/clients/tui/nmt-edit-connection-list.h similarity index 100% rename from tui/nmt-edit-connection-list.h rename to clients/tui/nmt-edit-connection-list.h diff --git a/tui/nmt-editor-page.c b/clients/tui/nmt-editor-page.c similarity index 100% rename from tui/nmt-editor-page.c rename to clients/tui/nmt-editor-page.c diff --git a/tui/nmt-editor-page.h b/clients/tui/nmt-editor-page.h similarity index 100% rename from tui/nmt-editor-page.h rename to clients/tui/nmt-editor-page.h diff --git a/tui/nmt-editor.c b/clients/tui/nmt-editor.c similarity index 100% rename from tui/nmt-editor.c rename to clients/tui/nmt-editor.c diff --git a/tui/nmt-editor.h b/clients/tui/nmt-editor.h similarity index 100% rename from tui/nmt-editor.h rename to clients/tui/nmt-editor.h diff --git a/tui/nmt-ip-entry.c b/clients/tui/nmt-ip-entry.c similarity index 100% rename from tui/nmt-ip-entry.c rename to clients/tui/nmt-ip-entry.c diff --git a/tui/nmt-ip-entry.h b/clients/tui/nmt-ip-entry.h similarity index 100% rename from tui/nmt-ip-entry.h rename to clients/tui/nmt-ip-entry.h diff --git a/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c similarity index 100% rename from tui/nmt-mac-entry.c rename to clients/tui/nmt-mac-entry.c diff --git a/tui/nmt-mac-entry.h b/clients/tui/nmt-mac-entry.h similarity index 100% rename from tui/nmt-mac-entry.h rename to clients/tui/nmt-mac-entry.h diff --git a/tui/nmt-mtu-entry.c b/clients/tui/nmt-mtu-entry.c similarity index 100% rename from tui/nmt-mtu-entry.c rename to clients/tui/nmt-mtu-entry.c diff --git a/tui/nmt-mtu-entry.h b/clients/tui/nmt-mtu-entry.h similarity index 100% rename from tui/nmt-mtu-entry.h rename to clients/tui/nmt-mtu-entry.h diff --git a/tui/nmt-page-bond.c b/clients/tui/nmt-page-bond.c similarity index 100% rename from tui/nmt-page-bond.c rename to clients/tui/nmt-page-bond.c diff --git a/tui/nmt-page-bond.h b/clients/tui/nmt-page-bond.h similarity index 100% rename from tui/nmt-page-bond.h rename to clients/tui/nmt-page-bond.h diff --git a/tui/nmt-page-bridge-port.c b/clients/tui/nmt-page-bridge-port.c similarity index 100% rename from tui/nmt-page-bridge-port.c rename to clients/tui/nmt-page-bridge-port.c diff --git a/tui/nmt-page-bridge-port.h b/clients/tui/nmt-page-bridge-port.h similarity index 100% rename from tui/nmt-page-bridge-port.h rename to clients/tui/nmt-page-bridge-port.h diff --git a/tui/nmt-page-bridge.c b/clients/tui/nmt-page-bridge.c similarity index 100% rename from tui/nmt-page-bridge.c rename to clients/tui/nmt-page-bridge.c diff --git a/tui/nmt-page-bridge.h b/clients/tui/nmt-page-bridge.h similarity index 100% rename from tui/nmt-page-bridge.h rename to clients/tui/nmt-page-bridge.h diff --git a/tui/nmt-page-device.c b/clients/tui/nmt-page-device.c similarity index 100% rename from tui/nmt-page-device.c rename to clients/tui/nmt-page-device.c diff --git a/tui/nmt-page-device.h b/clients/tui/nmt-page-device.h similarity index 100% rename from tui/nmt-page-device.h rename to clients/tui/nmt-page-device.h diff --git a/tui/nmt-page-ethernet.c b/clients/tui/nmt-page-ethernet.c similarity index 100% rename from tui/nmt-page-ethernet.c rename to clients/tui/nmt-page-ethernet.c diff --git a/tui/nmt-page-ethernet.h b/clients/tui/nmt-page-ethernet.h similarity index 100% rename from tui/nmt-page-ethernet.h rename to clients/tui/nmt-page-ethernet.h diff --git a/tui/nmt-page-grid.c b/clients/tui/nmt-page-grid.c similarity index 100% rename from tui/nmt-page-grid.c rename to clients/tui/nmt-page-grid.c diff --git a/tui/nmt-page-grid.h b/clients/tui/nmt-page-grid.h similarity index 100% rename from tui/nmt-page-grid.h rename to clients/tui/nmt-page-grid.h diff --git a/tui/nmt-page-infiniband.c b/clients/tui/nmt-page-infiniband.c similarity index 100% rename from tui/nmt-page-infiniband.c rename to clients/tui/nmt-page-infiniband.c diff --git a/tui/nmt-page-infiniband.h b/clients/tui/nmt-page-infiniband.h similarity index 100% rename from tui/nmt-page-infiniband.h rename to clients/tui/nmt-page-infiniband.h diff --git a/tui/nmt-page-ip4.c b/clients/tui/nmt-page-ip4.c similarity index 100% rename from tui/nmt-page-ip4.c rename to clients/tui/nmt-page-ip4.c diff --git a/tui/nmt-page-ip4.h b/clients/tui/nmt-page-ip4.h similarity index 100% rename from tui/nmt-page-ip4.h rename to clients/tui/nmt-page-ip4.h diff --git a/tui/nmt-page-ip6.c b/clients/tui/nmt-page-ip6.c similarity index 100% rename from tui/nmt-page-ip6.c rename to clients/tui/nmt-page-ip6.c diff --git a/tui/nmt-page-ip6.h b/clients/tui/nmt-page-ip6.h similarity index 100% rename from tui/nmt-page-ip6.h rename to clients/tui/nmt-page-ip6.h diff --git a/tui/nmt-page-main.c b/clients/tui/nmt-page-main.c similarity index 100% rename from tui/nmt-page-main.c rename to clients/tui/nmt-page-main.c diff --git a/tui/nmt-page-main.h b/clients/tui/nmt-page-main.h similarity index 100% rename from tui/nmt-page-main.h rename to clients/tui/nmt-page-main.h diff --git a/tui/nmt-page-team-port.c b/clients/tui/nmt-page-team-port.c similarity index 100% rename from tui/nmt-page-team-port.c rename to clients/tui/nmt-page-team-port.c diff --git a/tui/nmt-page-team-port.h b/clients/tui/nmt-page-team-port.h similarity index 100% rename from tui/nmt-page-team-port.h rename to clients/tui/nmt-page-team-port.h diff --git a/tui/nmt-page-team.c b/clients/tui/nmt-page-team.c similarity index 100% rename from tui/nmt-page-team.c rename to clients/tui/nmt-page-team.c diff --git a/tui/nmt-page-team.h b/clients/tui/nmt-page-team.h similarity index 100% rename from tui/nmt-page-team.h rename to clients/tui/nmt-page-team.h diff --git a/tui/nmt-page-vlan.c b/clients/tui/nmt-page-vlan.c similarity index 100% rename from tui/nmt-page-vlan.c rename to clients/tui/nmt-page-vlan.c diff --git a/tui/nmt-page-vlan.h b/clients/tui/nmt-page-vlan.h similarity index 100% rename from tui/nmt-page-vlan.h rename to clients/tui/nmt-page-vlan.h diff --git a/tui/nmt-page-wifi.c b/clients/tui/nmt-page-wifi.c similarity index 100% rename from tui/nmt-page-wifi.c rename to clients/tui/nmt-page-wifi.c diff --git a/tui/nmt-page-wifi.h b/clients/tui/nmt-page-wifi.h similarity index 100% rename from tui/nmt-page-wifi.h rename to clients/tui/nmt-page-wifi.h diff --git a/tui/nmt-password-dialog.c b/clients/tui/nmt-password-dialog.c similarity index 100% rename from tui/nmt-password-dialog.c rename to clients/tui/nmt-password-dialog.c diff --git a/tui/nmt-password-dialog.h b/clients/tui/nmt-password-dialog.h similarity index 100% rename from tui/nmt-password-dialog.h rename to clients/tui/nmt-password-dialog.h diff --git a/tui/nmt-password-fields.c b/clients/tui/nmt-password-fields.c similarity index 100% rename from tui/nmt-password-fields.c rename to clients/tui/nmt-password-fields.c diff --git a/tui/nmt-password-fields.h b/clients/tui/nmt-password-fields.h similarity index 100% rename from tui/nmt-password-fields.h rename to clients/tui/nmt-password-fields.h diff --git a/tui/nmt-route-editor.c b/clients/tui/nmt-route-editor.c similarity index 100% rename from tui/nmt-route-editor.c rename to clients/tui/nmt-route-editor.c diff --git a/tui/nmt-route-editor.h b/clients/tui/nmt-route-editor.h similarity index 100% rename from tui/nmt-route-editor.h rename to clients/tui/nmt-route-editor.h diff --git a/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c similarity index 100% rename from tui/nmt-route-entry.c rename to clients/tui/nmt-route-entry.c diff --git a/tui/nmt-route-entry.h b/clients/tui/nmt-route-entry.h similarity index 100% rename from tui/nmt-route-entry.h rename to clients/tui/nmt-route-entry.h diff --git a/tui/nmt-route-table.c b/clients/tui/nmt-route-table.c similarity index 100% rename from tui/nmt-route-table.c rename to clients/tui/nmt-route-table.c diff --git a/tui/nmt-route-table.h b/clients/tui/nmt-route-table.h similarity index 100% rename from tui/nmt-route-table.h rename to clients/tui/nmt-route-table.h diff --git a/tui/nmt-secret-agent.c b/clients/tui/nmt-secret-agent.c similarity index 100% rename from tui/nmt-secret-agent.c rename to clients/tui/nmt-secret-agent.c diff --git a/tui/nmt-secret-agent.h b/clients/tui/nmt-secret-agent.h similarity index 100% rename from tui/nmt-secret-agent.h rename to clients/tui/nmt-secret-agent.h diff --git a/tui/nmt-slave-list.c b/clients/tui/nmt-slave-list.c similarity index 100% rename from tui/nmt-slave-list.c rename to clients/tui/nmt-slave-list.c diff --git a/tui/nmt-slave-list.h b/clients/tui/nmt-slave-list.h similarity index 100% rename from tui/nmt-slave-list.h rename to clients/tui/nmt-slave-list.h diff --git a/tui/nmt-utils.c b/clients/tui/nmt-utils.c similarity index 100% rename from tui/nmt-utils.c rename to clients/tui/nmt-utils.c diff --git a/tui/nmt-utils.h b/clients/tui/nmt-utils.h similarity index 100% rename from tui/nmt-utils.h rename to clients/tui/nmt-utils.h diff --git a/tui/nmt-widget-list.c b/clients/tui/nmt-widget-list.c similarity index 100% rename from tui/nmt-widget-list.c rename to clients/tui/nmt-widget-list.c diff --git a/tui/nmt-widget-list.h b/clients/tui/nmt-widget-list.h similarity index 100% rename from tui/nmt-widget-list.h rename to clients/tui/nmt-widget-list.h diff --git a/tui/nmtui-connect.c b/clients/tui/nmtui-connect.c similarity index 100% rename from tui/nmtui-connect.c rename to clients/tui/nmtui-connect.c diff --git a/tui/nmtui-connect.h b/clients/tui/nmtui-connect.h similarity index 100% rename from tui/nmtui-connect.h rename to clients/tui/nmtui-connect.h diff --git a/tui/nmtui-edit.c b/clients/tui/nmtui-edit.c similarity index 100% rename from tui/nmtui-edit.c rename to clients/tui/nmtui-edit.c diff --git a/tui/nmtui-edit.h b/clients/tui/nmtui-edit.h similarity index 100% rename from tui/nmtui-edit.h rename to clients/tui/nmtui-edit.h diff --git a/tui/nmtui-hostname.c b/clients/tui/nmtui-hostname.c similarity index 100% rename from tui/nmtui-hostname.c rename to clients/tui/nmtui-hostname.c diff --git a/tui/nmtui-hostname.h b/clients/tui/nmtui-hostname.h similarity index 100% rename from tui/nmtui-hostname.h rename to clients/tui/nmtui-hostname.h diff --git a/tui/nmtui.c b/clients/tui/nmtui.c similarity index 100% rename from tui/nmtui.c rename to clients/tui/nmtui.c diff --git a/tui/nmtui.h b/clients/tui/nmtui.h similarity index 100% rename from tui/nmtui.h rename to clients/tui/nmtui.h diff --git a/tui/vpn-helpers.c b/clients/tui/vpn-helpers.c similarity index 100% rename from tui/vpn-helpers.c rename to clients/tui/vpn-helpers.c diff --git a/tui/vpn-helpers.h b/clients/tui/vpn-helpers.h similarity index 100% rename from tui/vpn-helpers.h rename to clients/tui/vpn-helpers.h diff --git a/configure.ac b/configure.ac index 7b1c1221a0..2185be5961 100644 --- a/configure.ac +++ b/configure.ac @@ -839,11 +839,10 @@ libnm-glib/tests/Makefile callouts/Makefile callouts/tests/Makefile tools/Makefile -cli/Makefile -cli/src/Makefile -cli/completion/Makefile -tui/Makefile -tui/newt/Makefile +clients/Makefile +clients/cli/Makefile +clients/tui/Makefile +clients/tui/newt/Makefile test/Makefile initscript/RedHat/NetworkManager initscript/Debian/NetworkManager diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index f4aee9ff67..34cce1c57e 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -423,8 +423,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.d %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/pppd/%{ppp_version}/*.la %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/NetworkManager/*.la -install -m 0755 test/.libs/nm-online %{buildroot}/%{_bindir} - %if %{regen_docs} # install the pristine docs %{__cp} ORIG-docs/libnm-glib/html/* $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/libnm-glib/ diff --git a/po/POTFILES.in b/po/POTFILES.in index d83560f35e..c3e34f5e8d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,13 +1,44 @@ [encoding: UTF-8] # List of source files containing translatable strings. # Please keep this file sorted alphabetically. -cli/src/common.c -cli/src/connections.c -cli/src/devices.c -cli/src/network-manager.c -cli/src/nmcli.c -cli/src/settings.c -cli/src/utils.c +clients/cli/common.c +clients/cli/connections.c +clients/cli/devices.c +clients/cli/network-manager.c +clients/cli/nmcli.c +clients/cli/settings.c +clients/cli/utils.c +clients/nm-online.c +clients/tui/newt/nmt-newt-utils.c +clients/tui/nm-editor-utils.c +clients/tui/nmt-connect-connection-list.c +clients/tui/nmt-device-entry.c +clients/tui/nmt-edit-connection-list.c +clients/tui/nmt-editor.c +clients/tui/nmt-mtu-entry.c +clients/tui/nmt-page-bond.c +clients/tui/nmt-page-bridge-port.c +clients/tui/nmt-page-bridge.c +clients/tui/nmt-page-ethernet.c +clients/tui/nmt-page-infiniband.c +clients/tui/nmt-page-ip4.c +clients/tui/nmt-page-ip6.c +clients/tui/nmt-page-main.c +clients/tui/nmt-page-team-port.c +clients/tui/nmt-page-team.c +clients/tui/nmt-page-vlan.c +clients/tui/nmt-page-wifi.c +clients/tui/nmt-password-dialog.c +clients/tui/nmt-password-fields.c +clients/tui/nmt-route-editor.c +clients/tui/nmt-route-table.c +clients/tui/nmt-secret-agent.c +clients/tui/nmt-slave-list.c +clients/tui/nmt-widget-list.c +clients/tui/nmtui-connect.c +clients/tui/nmtui-edit.c +clients/tui/nmtui-hostname.c +clients/tui/nmtui.c libnm-glib/nm-device.c libnm-glib/nm-remote-connection.c libnm-util/crypto.c @@ -62,35 +93,3 @@ src/nm-manager.c src/nm-sleep-monitor-systemd.c src/settings/plugins/ifcfg-rh/reader.c src/settings/nm-settings-utils.c -test/nm-online.c -tui/newt/nmt-newt-utils.c -tui/nm-editor-utils.c -tui/nmt-connect-connection-list.c -tui/nmt-device-entry.c -tui/nmt-edit-connection-list.c -tui/nmt-editor.c -tui/nmt-mtu-entry.c -tui/nmt-page-bond.c -tui/nmt-page-bridge-port.c -tui/nmt-page-bridge.c -tui/nmt-page-ethernet.c -tui/nmt-page-infiniband.c -tui/nmt-page-ip4.c -tui/nmt-page-ip6.c -tui/nmt-page-main.c -tui/nmt-page-team-port.c -tui/nmt-page-team.c -tui/nmt-page-vlan.c -tui/nmt-page-wifi.c -tui/nmt-password-dialog.c -tui/nmt-password-fields.c -tui/nmt-route-editor.c -tui/nmt-route-table.c -tui/nmt-secret-agent.c -tui/nmt-slave-list.c -tui/nmt-widget-list.c -tui/nmtui-connect.c -tui/nmtui-edit.c -tui/nmtui-hostname.c -tui/nmtui.c - diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 461200fade..2a7f3518a1 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -1,7 +1,7 @@ +clients/tui/vpn-helpers.c examples/python/NetworkManager.py examples/python/systray/eggtrayicon.c policy/org.freedesktop.NetworkManager.policy.in vpn-daemons/openvpn vpn-daemons/pptp vpn-daemons/vpnc -tui/vpn-helpers.c diff --git a/test/Makefile.am b/test/Makefile.am index f577d8a7dd..a03c15fa77 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -11,21 +11,8 @@ AM_CPPFLAGS = \ -DDATADIR=\"$(datadir)\" \ -DNMLOCALEDIR=\"$(datadir)/locale\" -bin_PROGRAMS = nm-online - noinst_PROGRAMS = libnm-glib-test -nm_online_SOURCES = nm-online.c -nm_online_CPPFLAGS = \ - -DG_LOG_DOMAIN=\""nm-online"\" \ - $(AM_CPPFLAGS) - -nm_online_LDADD = \ - $(top_builddir)/libnm-glib/libnm-glib.la \ - $(top_builddir)/libnm-util/libnm-util.la \ - $(DBUS_LIBS) \ - $(GLIB_LIBS) - libnm_glib_test_SOURCES = libnm-glib-test.c libnm_glib_test_CFLAGS = \ -Wno-deprecated-declarations \ From 420e027c999d43cc367aa7378a0e2d48dcd5ea30 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 25 Jul 2014 11:53:15 -0400 Subject: [PATCH 2/6] tools: dist everything Dist run-test-valgrind.sh and test-sudo-wrapper.sh, since they may be of use to people building from tarballs as well. --- tools/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index e8b568a9f8..592fb408ea 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,3 +1,5 @@ EXTRA_DIST = \ + check-exports.sh \ doc-generator.xsl \ - check-exports.sh + run-test-valgrind.sh \ + test-sudo-wrapper.sh From efb2b13baa3bee125776f867eeacb038c8977817 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 25 Jul 2014 11:54:36 -0400 Subject: [PATCH 3/6] tools: move debug-helper.py from test/ to tools/ --- tools/Makefile.am | 1 + {test => tools}/debug-helper.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename {test => tools}/debug-helper.py (99%) diff --git a/tools/Makefile.am b/tools/Makefile.am index 592fb408ea..414308fd40 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,6 @@ EXTRA_DIST = \ check-exports.sh \ + debug-helper.py \ doc-generator.xsl \ run-test-valgrind.sh \ test-sudo-wrapper.sh diff --git a/test/debug-helper.py b/tools/debug-helper.py similarity index 99% rename from test/debug-helper.py rename to tools/debug-helper.py index ebf08475aa..07338242db 100755 --- a/test/debug-helper.py +++ b/tools/debug-helper.py @@ -46,7 +46,7 @@ if args.do_set_mm_logging: if args.do_set_wpa_logging: print "Setting wpa_supplicant log level to '" + args.do_set_wpa_logging + "'" - if 'debug' in args.do_set_wpa_logging or 'msgdump' in args.do_set_wpa_logging: + if 'debug' in args.do_set_wpa_logging or 'msgdump' in args.do_set_wpa_logging: print "Enabling timestamps for wpasupplicant debugging logs" use_timestamps = dbus.Boolean(True, variant_level=1) else: From 763ce29e58a92fb7aa125d8d70bd486f9ed77ab4 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 25 Jul 2014 11:55:15 -0400 Subject: [PATCH 4/6] 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 --- .gitignore | 3 - Makefile.am | 1 - configure.ac | 1 - test/Makefile.am | 25 ---- test/add-connection.py | 59 --------- test/libnm-glib-test.c | 113 ---------------- test/nm-dhcp-opt-test.c | 279 ---------------------------------------- test/set-hostname.py | 27 ---- 8 files changed, 508 deletions(-) delete mode 100644 test/Makefile.am delete mode 100755 test/add-connection.py delete mode 100644 test/libnm-glib-test.c delete mode 100644 test/nm-dhcp-opt-test.c delete mode 100755 test/set-hostname.py diff --git a/.gitignore b/.gitignore index 18fb67d45d..8706c98d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -164,9 +164,6 @@ valgrind-*.log /src/supplicant-manager/tests/test-supplicant-config /src/dhcp-manager/nm-dhcp-helper /system-settings/src -/test/libnm-glib-test -/test/libnm_glib_test -/test/nmtestdevices /libnm-util/nm-version.h /libnm-util/nm-setting-docs.xml /libnm-util/test-crypto diff --git a/Makefile.am b/Makefile.am index ea0bab0f9f..54992d42bf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,6 @@ SUBDIRS = \ tools \ policy \ data \ - test \ po \ docs \ man \ diff --git a/configure.ac b/configure.ac index 2185be5961..6d1aeb9f30 100644 --- a/configure.ac +++ b/configure.ac @@ -843,7 +843,6 @@ clients/Makefile clients/cli/Makefile clients/tui/Makefile clients/tui/newt/Makefile -test/Makefile initscript/RedHat/NetworkManager initscript/Debian/NetworkManager initscript/Slackware/rc.networkmanager diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index a03c15fa77..0000000000 --- a/test/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -AM_CPPFLAGS = \ - -I${top_srcdir} \ - -I${top_srcdir}/libnm-util \ - -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-glib \ - -I${top_srcdir}/include \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - -DBINDIR=\"$(bindir)\" \ - -DDATADIR=\"$(datadir)\" \ - -DNMLOCALEDIR=\"$(datadir)/locale\" - -noinst_PROGRAMS = libnm-glib-test - -libnm_glib_test_SOURCES = libnm-glib-test.c -libnm_glib_test_CFLAGS = \ - -Wno-deprecated-declarations \ - -Wno-deprecated -libnm_glib_test_LDADD = \ - $(top_builddir)/libnm-glib/libnm-glib.la \ - $(top_builddir)/libnm-util/libnm-util.la \ - $(DBUS_LIBS) \ - $(GLIB_LIBS) - diff --git a/test/add-connection.py b/test/add-connection.py deleted file mode 100755 index 4458824417..0000000000 --- a/test/add-connection.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2010 Red Hat, Inc. -# - -import dbus -import sys - -s_wired = dbus.Dictionary({'duplex': 'full'}) -s_con = dbus.Dictionary({ - 'type': '802-3-ethernet', - 'uuid': '7371bb78-c1f7-42a3-a9db-5b9566e8ca07', - 'id': sys.argv[1]}) - -if len(sys.argv) > 2: - s_con['permissions'] = ["user:%s:" % sys.argv[2]] - -addr1 = dbus.Array([dbus.UInt32(50462986L), dbus.UInt32(8L), dbus.UInt32(16908554L)], signature=dbus.Signature('u')) -s_ip4 = dbus.Dictionary({ - 'addresses': dbus.Array([addr1], signature=dbus.Signature('au')), - 'method': 'manual'}) - -s_ip6 = dbus.Dictionary({'method': 'ignore'}) - -con = dbus.Dictionary({ - '802-3-ethernet': s_wired, - 'connection': s_con, - 'ipv4': s_ip4, - 'ipv6': s_ip6}) - - -bus = dbus.SystemBus() - -proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager/Settings") -settings = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Settings") - -new_con_path = settings.AddConnection(con) - -con_proxy = bus.get_object("org.freedesktop.NetworkManager", new_con_path) -con = dbus.Interface(con_proxy, "org.freedesktop.NetworkManager.Settings.Connection") - -print "New connection object path: %s" % new_con_path -print con.GetSettings() - - diff --git a/test/libnm-glib-test.c b/test/libnm-glib-test.c deleted file mode 100644 index 9ad1dc0a7a..0000000000 --- a/test/libnm-glib-test.c +++ /dev/null @@ -1,113 +0,0 @@ -/* libnm_glib_test - test app for libnm_glib - * - * Dan Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * (C) Copyright 2005 Red Hat, Inc. - */ - -#include -#include -#include -#include -#include - -#include "libnm_glib.h" - - -static void status_printer (libnm_glib_ctx *ctx, gpointer user_data) -{ - libnm_glib_state state; - - g_return_if_fail (ctx != NULL); - - state = libnm_glib_get_network_state (ctx); - switch (state) - { - case LIBNM_NO_DBUS: - fprintf (stderr, "Status: No DBUS\n"); - break; - case LIBNM_NO_NETWORKMANAGER: - fprintf (stderr, "Status: No NetworkManager\n"); - break; - case LIBNM_NO_NETWORK_CONNECTION: - fprintf (stderr, "Status: No Connection\n"); - break; - case LIBNM_ACTIVE_NETWORK_CONNECTION: - fprintf (stderr, "Status: Active Connection\n"); - break; - case LIBNM_INVALID_CONTEXT: - fprintf (stderr, "Status: Error\n"); - break; - default: - fprintf (stderr, "Status: unknown\n"); - break; - } -} - -static GMainLoop *loop = NULL; - -static void -signal_handler (int signo) -{ - if (signo == SIGINT || signo == SIGTERM) { - g_message ("Caught signal %d, shutting down...", signo); - g_main_loop_quit (loop); - } -} - -static void -setup_signals (void) -{ - struct sigaction action; - sigset_t mask; - - sigemptyset (&mask); - action.sa_handler = signal_handler; - action.sa_mask = mask; - action.sa_flags = 0; - sigaction (SIGTERM, &action, NULL); - sigaction (SIGINT, &action, NULL); -} - -int main( int argc, char *argv[] ) -{ - libnm_glib_ctx *ctx; - guint id; - - ctx = libnm_glib_init (); - if (!ctx) - { - fprintf (stderr, "Could not initialize libnm.\n"); - exit (1); - } - - id = libnm_glib_register_callback (ctx, status_printer, ctx, NULL); - fprintf (stderr, "Registered Callback with ID %d\n", id); - libnm_glib_unregister_callback (ctx, id); - fprintf (stderr, "Unregistered Callback with ID %d\n", id); - - id = libnm_glib_register_callback (ctx, status_printer, ctx, NULL); - fprintf (stderr, "Registered Callback with ID %d\n", id); - - loop = g_main_loop_new (NULL, FALSE); - setup_signals (); - g_main_loop_run (loop); - - libnm_glib_shutdown (ctx); - - exit (0); -} diff --git a/test/nm-dhcp-opt-test.c b/test/nm-dhcp-opt-test.c deleted file mode 100644 index 9fe2e699f5..0000000000 --- a/test/nm-dhcp-opt-test.c +++ /dev/null @@ -1,279 +0,0 @@ -/* nm-dhcp-opt-test - test app for NetworkManager's DHCP Options interface - * - * Dan Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * (C) Copyright 2005 Red Hat, Inc. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "NetworkManager.h" - -/* Return codes for functions that use dbus */ -enum -{ - RETURN_SUCCESS = 1, - RETURN_FAILURE = 0, - RETURN_NO_NM = -1 -}; - - -#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist" -#define NM_DHCP_OPT_NOT_FOUND_ERROR "org.freedesktop.NetworkManager.OptionNotFound" - -static char *dbus_type_to_string (int type) -{ - switch (type) - { - case DBUS_TYPE_UINT32: - return "uint32"; - - case DBUS_TYPE_BOOLEAN: - return "boolean"; - - case DBUS_TYPE_BYTE: - return "byte"; - - case DBUS_TYPE_STRING: - return "string"; - } - g_assert_not_reached (); - return NULL; -} - - -/* - * call_nm_method - * - * Do a method call on NetworkManager. - * - * Returns: RETURN_SUCCESS on success - * RETURN_FAILURE on failure - * RETURN_NO_NM if NetworkManager service no longer exists - */ -static int call_nm_method (DBusConnection *con, const char *method, int opt, gboolean is_array, int arg_type, void **arg, int *item_count) -{ - DBusMessage *message; - DBusMessage *reply; - DBusError error; - dbus_bool_t ret = TRUE; - DBusMessageIter iter; - - g_return_val_if_fail (con != NULL, RETURN_FAILURE); - g_return_val_if_fail (method != NULL, RETURN_FAILURE); - g_return_val_if_fail (arg != NULL, RETURN_FAILURE); - - if (is_array) - { - g_return_val_if_fail (item_count != NULL, RETURN_FAILURE); - *item_count = 0; - } - - if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_DHCP, NM_DBUS_INTERFACE_DHCP, method))) - { - fprintf (stderr, "call_nm_method(): Couldn't allocate the dbus message\n"); - return (RETURN_FAILURE); - } - dbus_message_append_args (message, DBUS_TYPE_UINT32, &opt, DBUS_TYPE_INVALID); - - dbus_error_init (&error); - reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error); - dbus_message_unref (message); - if (dbus_error_is_set (&error)) - { - int ret = RETURN_FAILURE; - - if (!strcmp (error.name, DBUS_NO_SERVICE_ERROR)) - ret = RETURN_NO_NM; - - if (ret != RETURN_SUCCESS && (strcmp (error.name, NM_DHCP_OPT_NOT_FOUND_ERROR) != 0)) - fprintf (stderr, "call_nm_method(): %s raised:\n %s\n\n", error.name, error.message); - - dbus_error_free (&error); - return (ret); - } - - if (reply == NULL) - { - fprintf (stderr, "call_nm_method(): dbus reply message was NULL\n" ); - return (RETURN_FAILURE); - } - - if (is_array) - ret = dbus_message_get_args (reply, NULL, DBUS_TYPE_ARRAY, arg_type, arg, item_count, DBUS_TYPE_INVALID); - else - ret = dbus_message_get_args (reply, NULL, arg_type, arg, DBUS_TYPE_INVALID); - -/* - We simply don't unref the message, so that the values returned stay - valid in the caller of this function. - dbus_message_unref (reply); -*/ - if (!ret) - { - fprintf (stderr, "call_nm_method(): error while getting args.\n"); - return (RETURN_FAILURE); - } - - return (RETURN_SUCCESS); -} - -void print_array (DBusConnection *connection, int opt) -{ - int num_items; - unsigned int *uint32 = NULL; - int *int32 = NULL; - gboolean *bool = NULL; - unsigned char *byte = NULL; - char **string = NULL; - void *item = NULL; - char *method = NULL; - int ret; - const char *name = NULL; - int opt_type = -1; - unsigned int foo; - char buf[INET_ADDRSTRLEN+1]; - - memset (&buf, '\0', sizeof (buf)); - - ret = call_nm_method (connection, "getName", opt, FALSE, DBUS_TYPE_STRING, (void *)(&name), NULL); - if (ret != RETURN_SUCCESS) - return; - - ret = call_nm_method (connection, "getElementType", opt, FALSE, DBUS_TYPE_UINT32, (void *)(&opt_type), NULL); - if (ret != RETURN_SUCCESS) - return; - - switch (opt_type) - { - case DBUS_TYPE_UINT32: - item = &uint32; - method = "getInteger"; - break; - - case DBUS_TYPE_BOOLEAN: - item = &bool; - method = "getBoolean"; - break; - - case DBUS_TYPE_BYTE: - item = &byte; - method = "getByte"; - break; - - case DBUS_TYPE_STRING: - item = &string; - method = "getString"; - break; - - default: - fprintf (stderr, "%d: Type %c\n", opt, opt_type); - g_assert_not_reached (); - break; - } - - ret = call_nm_method (connection, method, opt, TRUE, opt_type, item, &num_items); - if ((ret == RETURN_SUCCESS) && (num_items > 0)) - { - int i; - fprintf (stderr, "%d ('%s'): (%d %s of type %s) ", opt, name, num_items, num_items > 1 ? "elements" : "element", dbus_type_to_string (opt_type)); - for (i = 0; i < num_items; i++) - { - guint32 in; - gboolean last = (i == num_items - 1) ? TRUE : FALSE; - - switch (opt_type) - { - case DBUS_TYPE_BYTE: - fprintf (stderr, "%d%s", byte[i], last ? "" : ", "); - break; - case DBUS_TYPE_BOOLEAN: - fprintf (stderr, "%d%s", bool[i], last ? "" : ", "); - break; - case DBUS_TYPE_UINT32: - in = uint32[i]; - if (!inet_ntop (AF_INET, &in, buf, INET_ADDRSTRLEN)) - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (in)); - else - fprintf (stderr, "%u (%s)%s", uint32[i], buf, last ? "" : ", "); - break; - case DBUS_TYPE_STRING: - fprintf (stderr, "'%s'%s", string[i], last ? "" : ", "); - break; - - default: - g_assert_not_reached (); - break; - } - } - fprintf (stderr, "\n"); - } - else - fprintf (stderr, "%d ('%s'): could not get option value\n", opt, name); -} - - -void print_each_dhcp_option (DBusConnection *connection) -{ - DBusMessage *message; - DBusMessage *reply; - DBusMessageIter iter; - DBusError error; - int i; - int opt_type; - int ret; - - g_return_if_fail (connection != NULL); - - /* Loop through all available DHCP options and print each one. */ - for (i = 1; i < 62; i++) - print_array (connection, i); -} - - -int main (int argc, char **argv) -{ - DBusConnection *connection; - DBusError error; - -#if !GLIB_CHECK_VERSION (2, 35, 0) - g_type_init (); -#endif - - dbus_error_init (&error); - connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error); - if (connection == NULL) - { - fprintf (stderr, "Error connecting to system bus: %s\n", error.message); - dbus_error_free (&error); - return 1; - } - - print_each_dhcp_option (connection); - - exit (0); -} diff --git a/test/set-hostname.py b/test/set-hostname.py deleted file mode 100755 index 283db367b7..0000000000 --- a/test/set-hostname.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright (C) 2010 Red Hat, Inc. -# - -import dbus -import sys - -bus = dbus.SystemBus() -proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager/Settings") -settings = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Settings") -settings.SaveHostname(sys.argv[1]) - From 5432ef5e520b8f7f7f24d126e7b35490be880d85 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 22 Jul 2014 18:22:23 -0400 Subject: [PATCH 5/6] tools: move libnm-glib's fake NM service implementations here Move libnm-glib's test-fake-nm.py and test-remote-settings-service.py to tools/, merge them together into a single program, and fix a few bugs (notably some missing signal emissions in the Settings service). Although they are currently only used by libnm-glib's tests, they are generic enough that they could be used by other code in the future (and in particular, they will be used by libnm's tests as well). --- libnm-glib/tests/Makefile.am | 13 +- .../tests/test-remote-settings-service.py | 150 ------------------ tools/Makefile.am | 1 + .../test-networkmanager-service.py | 127 ++++++++++++++- 4 files changed, 125 insertions(+), 166 deletions(-) delete mode 100755 libnm-glib/tests/test-remote-settings-service.py rename libnm-glib/tests/test-fake-nm.py => tools/test-networkmanager-service.py (84%) diff --git a/libnm-glib/tests/Makefile.am b/libnm-glib/tests/Makefile.am index 0bdd61a91a..86732f95f0 100644 --- a/libnm-glib/tests/Makefile.am +++ b/libnm-glib/tests/Makefile.am @@ -35,18 +35,15 @@ test_remote_settings_client_LDADD = \ ########################################### -TEST_NM_BIN = test-fake-nm.py -TEST_RSS_BIN = test-remote-settings-service.py - -EXTRA_DIST = $(TEST_RSS_BIN) $(TEST_NM_BIN) +TEST_NM_SERVICE = $(top_srcdir)/tools/test-networkmanager-service.py check-local: test-nm-client test-remote-settings-client if test -z "$$DBUS_SESSION_BUS_ADDRESS" ; then \ - dbus-launch --exit-with-session $(abs_builddir)/test-nm-client $(abs_srcdir) $(TEST_NM_BIN); \ - dbus-launch --exit-with-session $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN); \ + dbus-launch --exit-with-session $(abs_builddir)/test-nm-client $(abs_srcdir) $(TEST_NM_SERVICE); \ + dbus-launch --exit-with-session $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_NM_SERVICE); \ else \ - $(abs_builddir)/test-nm-client $(abs_srcdir) $(TEST_NM_BIN); \ - $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN); \ + $(abs_builddir)/test-nm-client $(abs_srcdir) $(TEST_NM_SERVICE); \ + $(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_NM_SERVICE); \ fi; endif diff --git a/libnm-glib/tests/test-remote-settings-service.py b/libnm-glib/tests/test-remote-settings-service.py deleted file mode 100755 index 439073ad28..0000000000 --- a/libnm-glib/tests/test-remote-settings-service.py +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -from __future__ import print_function - -from gi.repository import GLib, GObject -import sys -import dbus -import dbus.service -import dbus.mainloop.glib - -IFACE_SETTINGS = 'org.freedesktop.NetworkManager.Settings' -IFACE_CONNECTION = 'org.freedesktop.NetworkManager.Settings.Connection' -IFACE_DBUS = 'org.freedesktop.DBus' - -class UnknownInterfaceException(dbus.DBusException): - _dbus_error_name = IFACE_DBUS + '.UnknownInterface' - -class UnknownPropertyException(dbus.DBusException): - _dbus_error_name = IFACE_DBUS + '.UnknownProperty' - -class PermissionDeniedException(dbus.DBusException): - _dbus_error_name = IFACE_SETTINGS + '.PermissionDenied' - -mainloop = GObject.MainLoop() - -class Connection(dbus.service.Object): - def __init__(self, bus, object_path, settings, remove_func): - dbus.service.Object.__init__(self, bus, object_path) - self.path = object_path - self.settings = settings - self.remove_func = remove_func - self.visible = True - self.props = {} - self.props['Unsaved'] = False - - # Properties interface - @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') - def GetAll(self, iface): - if iface != IFACE_CONNECTION: - raise UnknownInterfaceException() - return self.props - - @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') - def Get(self, iface, name): - if iface != IFACE_CONNECTION: - raise UnknownInterfaceException() - if not name in self.props.keys(): - raise UnknownPropertyException() - return self.props[name] - - # Connection methods - @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='', out_signature='a{sa{sv}}') - def GetSettings(self): - if not self.visible: - raise PermissionDeniedException() - return self.settings - - @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='b', out_signature='') - def SetVisible(self, vis): - self.visible = vis - self.Updated() - - @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='', out_signature='') - def Delete(self): - self.remove_func(self) - self.Removed() - - @dbus.service.signal(IFACE_CONNECTION, signature='') - def Removed(self): - pass - - @dbus.service.signal(IFACE_CONNECTION, signature='') - def Updated(self): - pass - -class Settings(dbus.service.Object): - def __init__(self, bus, object_path): - dbus.service.Object.__init__(self, bus, object_path) - self.connections = {} - self.bus = bus - self.counter = 1 - self.props = {} - self.props['Hostname'] = "foobar.baz" - self.props['CanModify'] = True - - @dbus.service.method(dbus_interface=IFACE_SETTINGS, in_signature='', out_signature='ao') - def ListConnections(self): - connections = [] - return self.connections.keys() - - @dbus.service.method(dbus_interface=IFACE_SETTINGS, in_signature='a{sa{sv}}', out_signature='o') - def AddConnection(self, settings): - path = "/org/freedesktop/NetworkManager/Settings/Connection/{0}".format(self.counter) - self.counter = self.counter + 1 - self.connections[path] = Connection(self.bus, path, settings, self.delete_connection) - print("Added connection {0}".format(path)) - return path - - def delete_connection(self, connection): - del self.connections[connection.path] - - @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') - def GetAll(self, iface): - if iface != IFACE_SETTINGS: - raise UnknownInterfaceException() - return self.props - - @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') - def Get(self, iface, name): - if iface != IFACE_SETTINGS: - raise UnknownInterfaceException() - if not name in self.props.keys(): - raise UnknownPropertyException() - return self.props[name] - - @dbus.service.signal(IFACE_SETTINGS, signature='o') - def NewConnection(self, path): - pass - - @dbus.service.method(IFACE_SETTINGS, in_signature='', out_signature='') - def Quit(self): - mainloop.quit() - -def quit_cb(user_data): - mainloop.quit() - -def main(): - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - bus = dbus.SessionBus() - obj = Settings(bus, "/org/freedesktop/NetworkManager/Settings") - if not bus.request_name("org.freedesktop.NetworkManager"): - sys.exit(1) - - print("Service started") - - GLib.timeout_add_seconds(20, quit_cb, None) - - try: - mainloop.run() - except Exception as e: - pass - - print("Service stopped") - sys.exit(0) - -if __name__ == '__main__': - main() - diff --git a/tools/Makefile.am b/tools/Makefile.am index 414308fd40..f008956d9b 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,4 +3,5 @@ EXTRA_DIST = \ debug-helper.py \ doc-generator.xsl \ run-test-valgrind.sh \ + test-networkmanager-service.py \ test-sudo-wrapper.sh diff --git a/libnm-glib/tests/test-fake-nm.py b/tools/test-networkmanager-service.py similarity index 84% rename from libnm-glib/tests/test-fake-nm.py rename to tools/test-networkmanager-service.py index 46ca3ff0e6..5f1f613766 100755 --- a/libnm-glib/tests/test-fake-nm.py +++ b/tools/test-networkmanager-service.py @@ -3,15 +3,14 @@ from __future__ import print_function -from gi.repository import GLib, GObject +from gi.repository import GLib import sys import dbus import dbus.service import dbus.mainloop.glib import random -mainloop = GObject.MainLoop() -quit_id = 0 +mainloop = GLib.MainLoop() # NM State NM_STATE_UNKNOWN = 0 @@ -687,7 +686,7 @@ class NetworkManager(ExportedObj): def AddWiredDevice(self, ifname): for d in self.devices: if d.iface == ifname: - raise PermissionDeniedError("Device already added") + raise PermissionDeniedException("Device already added") dev = WiredDevice(self._bus, ifname) self.add_device(dev) return dbus.ObjectPath(dev.path) @@ -696,7 +695,7 @@ class NetworkManager(ExportedObj): def AddWifiDevice(self, ifname): for d in self.devices: if d.iface == ifname: - raise PermissionDeniedError("Device already added") + raise PermissionDeniedException("Device already added") dev = WifiDevice(self._bus, ifname) self.add_device(dev) return dbus.ObjectPath(dev.path) @@ -705,7 +704,7 @@ class NetworkManager(ExportedObj): def AddWimaxDevice(self, ifname): for d in self.devices: if d.iface == ifname: - raise PermissionDeniedError("Device already added") + raise PermissionDeniedException("Device already added") dev = WimaxDevice(self._bus, ifname) self.add_device(dev) return dbus.ObjectPath(dev.path) @@ -748,6 +747,117 @@ class NetworkManager(ExportedObj): return raise UnknownDeviceException("Device not found") +################################################################### +IFACE_CONNECTION = 'org.freedesktop.NetworkManager.Settings.Connection' + +class Connection(dbus.service.Object): + def __init__(self, bus, object_path, settings, remove_func): + dbus.service.Object.__init__(self, bus, object_path) + self.path = object_path + self.settings = settings + self.remove_func = remove_func + self.visible = True + self.props = {} + self.props['Unsaved'] = False + + # Properties interface + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') + def GetAll(self, iface): + if iface != IFACE_CONNECTION: + raise UnknownInterfaceException() + return self.props + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') + def Get(self, iface, name): + if iface != IFACE_CONNECTION: + raise UnknownInterfaceException() + if not name in self.props.keys(): + raise UnknownPropertyException() + return self.props[name] + + # Connection methods + @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='', out_signature='a{sa{sv}}') + def GetSettings(self): + if not self.visible: + raise PermissionDeniedException() + return self.settings + + @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='b', out_signature='') + def SetVisible(self, vis): + self.visible = vis + self.Updated() + + @dbus.service.method(dbus_interface=IFACE_CONNECTION, in_signature='', out_signature='') + def Delete(self): + self.remove_func(self) + self.Removed() + + @dbus.service.signal(IFACE_CONNECTION, signature='') + def Removed(self): + pass + + @dbus.service.signal(IFACE_CONNECTION, signature='') + def Updated(self): + pass + +################################################################### +IFACE_SETTINGS = 'org.freedesktop.NetworkManager.Settings' + +class Settings(dbus.service.Object): + def __init__(self, bus, object_path): + dbus.service.Object.__init__(self, bus, object_path) + self.connections = {} + self.bus = bus + self.counter = 1 + self.props = {} + self.props['Hostname'] = "foobar.baz" + self.props['CanModify'] = True + + @dbus.service.method(dbus_interface=IFACE_SETTINGS, in_signature='', out_signature='ao') + def ListConnections(self): + return self.connections.keys() + + @dbus.service.method(dbus_interface=IFACE_SETTINGS, in_signature='a{sa{sv}}', out_signature='o') + def AddConnection(self, settings): + path = "/org/freedesktop/NetworkManager/Settings/Connection/{0}".format(self.counter) + self.counter = self.counter + 1 + self.connections[path] = Connection(self.bus, path, settings, self.delete_connection) + self.NewConnection(path) + self.PropertiesChanged({ 'connections': dbus.Array(self.connections.keys(), 'o') }) + return path + + def delete_connection(self, connection): + del self.connections[connection.path] + self.PropertiesChanged({ 'connections': dbus.Array(self.connections.keys(), 'o') }) + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') + def GetAll(self, iface): + if iface != IFACE_SETTINGS: + raise UnknownInterfaceException() + return self.props + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') + def Get(self, iface, name): + if iface != IFACE_SETTINGS: + raise UnknownInterfaceException() + if not name in self.props.keys(): + raise UnknownPropertyException() + return self.props[name] + + @dbus.service.signal(IFACE_SETTINGS, signature='o') + def NewConnection(self, path): + pass + + @dbus.service.signal(IFACE_SETTINGS, signature='a{sv}') + def PropertiesChanged(self, path): + pass + + @dbus.service.method(IFACE_SETTINGS, in_signature='', out_signature='') + def Quit(self): + mainloop.quit() + +################################################################### + def quit_cb(user_data): mainloop.quit() @@ -757,12 +867,13 @@ def main(): random.seed() bus = dbus.SessionBus() - nm = NetworkManager(bus, "/org/freedesktop/NetworkManager") + manager = NetworkManager(bus, "/org/freedesktop/NetworkManager") + settings = Settings(bus, "/org/freedesktop/NetworkManager/Settings") if not bus.request_name("org.freedesktop.NetworkManager"): sys.exit(1) # quit after inactivity to ensure we don't stick around if tests fail - quit_id = GLib.timeout_add_seconds(20, quit_cb, None) + GLib.timeout_add_seconds(20, quit_cb, None) try: mainloop.run() From 8aa3b9859b24a909973f9a8d8f607868e8fabef8 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 25 Jul 2014 12:04:04 -0400 Subject: [PATCH 6/6] core: merge src/config, src/logging, src/posix-signals into src/ Some subdirectories of src/ encapsulate large chunks of functionality, but src/config/, src/logging/, and src/posix-signals/ are really only separated out because they used to be built into separate sub-libraries that were needed either for test programs, or to prevent circular dependencies. Since this is no longer relevant, simplify things by moving their files back into the main source directory. --- .gitignore | 2 +- configure.ac | 2 +- po/POTFILES.in | 4 ++-- src/Makefile.am | 16 ++++++---------- src/devices/adsl/Makefile.am | 1 - src/devices/bluetooth/Makefile.am | 1 - src/devices/team/Makefile.am | 2 -- src/devices/wifi/Makefile.am | 1 - src/devices/wifi/tests/Makefile.am | 1 - src/devices/wimax/Makefile.am | 1 - src/devices/wimax/iwmxsdk.c | 2 +- src/devices/wwan/Makefile.am | 1 - src/dhcp-manager/tests/Makefile.am | 1 - src/{config => }/nm-config.c | 0 src/{config => }/nm-config.h | 0 src/{logging => }/nm-logging.c | 0 src/{logging => }/nm-logging.h | 0 src/{posix-signals => }/nm-posix-signals.c | 0 src/{posix-signals => }/nm-posix-signals.h | 0 src/platform/tests/Makefile.am | 1 - src/rdisc/tests/Makefile.am | 1 - src/settings/plugins/example/Makefile.am | 2 -- src/settings/plugins/ifcfg-rh/Makefile.am | 3 --- src/settings/plugins/ifcfg-rh/tests/Makefile.am | 2 -- src/settings/plugins/ifnet/Makefile.am | 2 -- src/settings/plugins/ifnet/tests/Makefile.am | 2 -- src/settings/plugins/ifupdown/Makefile.am | 2 -- src/settings/plugins/ifupdown/tests/Makefile.am | 1 - src/settings/plugins/keyfile/Makefile.am | 2 -- src/settings/plugins/keyfile/tests/Makefile.am | 1 - src/tests/Makefile.am | 3 ++- src/{config/tests => tests/config}/Makefile.am | 1 - .../tests => tests/config}/NetworkManager.conf | 0 src/{config/tests => tests/config}/bad.conf | 0 .../config}/conf.d/00-overrides.conf | 0 .../tests => tests/config}/conf.d/10-more.conf | 0 .../tests => tests/config}/conf.d/90-last.conf | 0 .../tests => tests/config}/nm-test-device.c | 0 .../tests => tests/config}/nm-test-device.h | 0 src/{config/tests => tests/config}/test-config.c | 0 40 files changed, 13 insertions(+), 45 deletions(-) rename src/{config => }/nm-config.c (100%) rename src/{config => }/nm-config.h (100%) rename src/{logging => }/nm-logging.c (100%) rename src/{logging => }/nm-logging.h (100%) rename src/{posix-signals => }/nm-posix-signals.c (100%) rename src/{posix-signals => }/nm-posix-signals.h (100%) rename src/{config/tests => tests/config}/Makefile.am (95%) rename src/{config/tests => tests/config}/NetworkManager.conf (100%) rename src/{config/tests => tests/config}/bad.conf (100%) rename src/{config/tests => tests/config}/conf.d/00-overrides.conf (100%) rename src/{config/tests => tests/config}/conf.d/10-more.conf (100%) rename src/{config/tests => tests/config}/conf.d/90-last.conf (100%) rename src/{config/tests => tests/config}/nm-test-device.c (100%) rename src/{config/tests => tests/config}/nm-test-device.h (100%) rename src/{config/tests => tests/config}/test-config.c (100%) diff --git a/.gitignore b/.gitignore index 8706c98d4d..109c30be8a 100644 --- a/.gitignore +++ b/.gitignore @@ -183,12 +183,12 @@ valgrind-*.log /src/tests/test-ip6-config /src/tests/test-wifi-ap-utils /src/tests/test-resolvconf-capture +/src/tests/config/test-config /src/devices/wifi/tests/test-wifi-ap-utils /src/dnsmasq-manager/tests/test-dnsmasq-utils /src/dhcp-manager/tests/test-dhcp-dhclient /src/dhcp-manager/tests/test-dhcp-options /src/dhcp-manager/tests/test-dnsmasq-utils -/src/config/tests/test-config /src/settings/plugins/keyfile/tests/test-keyfile /src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh diff --git a/configure.ac b/configure.ac index 6d1aeb9f30..9694d88a49 100644 --- a/configure.ac +++ b/configure.ac @@ -796,7 +796,7 @@ Makefile include/Makefile src/Makefile src/tests/Makefile -src/config/tests/Makefile +src/tests/config/Makefile src/dhcp-manager/Makefile src/dhcp-manager/tests/Makefile src/dnsmasq-manager/tests/Makefile diff --git a/po/POTFILES.in b/po/POTFILES.in index c3e34f5e8d..9de406bc73 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -76,8 +76,6 @@ src/dhcp-manager/nm-dhcp-dhclient.c src/dhcp-manager/nm-dhcp-dhclient-utils.c src/dhcp-manager/nm-dhcp-manager.c src/dns-manager/nm-dns-manager.c -src/logging/nm-logging.c -src/config/nm-config.c src/devices/adsl/nm-device-adsl.c src/devices/bluetooth/nm-bluez-device.c src/devices/bluetooth/nm-device-bt.c @@ -89,6 +87,8 @@ src/devices/nm-device-vlan.c src/devices/team/nm-device-team.c src/devices/wifi/nm-device-olpc-mesh.c src/devices/wwan/nm-modem-broadband.c +src/nm-config.c +src/nm-logging.c src/nm-manager.c src/nm-sleep-monitor-systemd.c src/settings/plugins/ifcfg-rh/reader.c diff --git a/src/Makefile.am b/src/Makefile.am index d4ffab0901..681a48f15b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,6 @@ endif if ENABLE_TESTS SUBDIRS += \ - config/tests \ dhcp-manager/tests \ dnsmasq-manager/tests \ platform \ @@ -62,9 +61,6 @@ NetworkManager_LDADD = libNetworkManager.la noinst_LTLIBRARIES = libNetworkManager.la nm_sources = \ - config/nm-config.c \ - config/nm-config.h \ - \ devices/nm-device.c \ devices/nm-device.h \ devices/nm-device-bond.c \ @@ -125,9 +121,6 @@ nm_sources = \ firewall-manager/nm-firewall-manager.c \ firewall-manager/nm-firewall-manager.h \ \ - logging/nm-logging.c \ - logging/nm-logging.h \ - \ platform/nm-fake-platform.c \ platform/nm-fake-platform.h \ platform/nm-linux-platform.c \ @@ -147,9 +140,6 @@ nm_sources = \ rdisc/nm-rdisc.c \ rdisc/nm-rdisc.h \ \ - posix-signals/nm-posix-signals.c \ - posix-signals/nm-posix-signals.h \ - \ ppp-manager/nm-ppp-manager.c \ ppp-manager/nm-ppp-manager.h \ ppp-manager/nm-ppp-status.h \ @@ -207,6 +197,8 @@ nm_sources = \ nm-activation-request.h \ nm-active-connection.c \ nm-active-connection.h \ + nm-config.c \ + nm-config.h \ nm-connection-provider.c \ nm-connection-provider.h \ nm-connectivity.c \ @@ -227,6 +219,8 @@ nm_sources = \ nm-ip4-config.h \ nm-ip6-config.c \ nm-ip6-config.h \ + nm-logging.c \ + nm-logging.h \ nm-manager-auth.c \ nm-manager-auth.h \ nm-auth-subject.c \ @@ -235,6 +229,8 @@ nm_sources = \ nm-manager.h \ nm-policy.c \ nm-policy.h \ + nm-posix-signals.c \ + nm-posix-signals.h \ nm-properties-changed-signal.c \ nm-properties-changed-signal.h \ nm-rfkill-manager.c \ diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am index 1770a7fd9d..56601a3e83 100644 --- a/src/devices/adsl/Makefile.am +++ b/src/devices/adsl/Makefile.am @@ -5,7 +5,6 @@ include $(GLIB_MAKEFILE) AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ -I${top_srcdir}/include \ diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am index 41dda9ad13..cfa484e49f 100644 --- a/src/devices/bluetooth/Makefile.am +++ b/src/devices/bluetooth/Makefile.am @@ -5,7 +5,6 @@ include $(GLIB_MAKEFILE) AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am index 1358cca47e..9ad529a79d 100644 --- a/src/devices/team/Makefile.am +++ b/src/devices/team/Makefile.am @@ -5,10 +5,8 @@ include $(GLIB_MAKEFILE) AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ - -I${top_srcdir}/src/posix-signals \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-util \ -I${top_srcdir}/libnm-util \ diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am index 59f279d7f4..8c2a2771e8 100644 --- a/src/devices/wifi/Makefile.am +++ b/src/devices/wifi/Makefile.am @@ -7,7 +7,6 @@ SUBDIRS=. tests AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am index 4b9b9dc242..284908b435 100644 --- a/src/devices/wifi/tests/Makefile.am +++ b/src/devices/wifi/tests/Makefile.am @@ -2,7 +2,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/src/logging \ -I${top_srcdir}/src/platform \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/devices/wifi \ diff --git a/src/devices/wimax/Makefile.am b/src/devices/wimax/Makefile.am index 2e4524824f..bb9e15c9bb 100644 --- a/src/devices/wimax/Makefile.am +++ b/src/devices/wimax/Makefile.am @@ -1,7 +1,6 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ -I${top_srcdir}/include \ diff --git a/src/devices/wimax/iwmxsdk.c b/src/devices/wimax/iwmxsdk.c index d1ef7b683b..4cd411d946 100644 --- a/src/devices/wimax/iwmxsdk.c +++ b/src/devices/wimax/iwmxsdk.c @@ -36,7 +36,7 @@ #include #include -#include "logging/nm-logging.h" +#include "nm-logging.h" #include "iwmxsdk.h" static WIMAX_API_DEVICE_ID g_api; diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am index d483177d8f..66fed9f9ff 100644 --- a/src/devices/wwan/Makefile.am +++ b/src/devices/wwan/Makefile.am @@ -5,7 +5,6 @@ include $(GLIB_MAKEFILE) AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am index e9f9a61013..fed2dff78f 100644 --- a/src/dhcp-manager/tests/Makefile.am +++ b/src/dhcp-manager/tests/Makefile.am @@ -3,7 +3,6 @@ AM_CPPFLAGS = \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/libnm-util \ -I$(top_srcdir)/src/dhcp-manager \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/platform \ -DG_LOG_DOMAIN=\""NetworkManager"\" \ diff --git a/src/config/nm-config.c b/src/nm-config.c similarity index 100% rename from src/config/nm-config.c rename to src/nm-config.c diff --git a/src/config/nm-config.h b/src/nm-config.h similarity index 100% rename from src/config/nm-config.h rename to src/nm-config.h diff --git a/src/logging/nm-logging.c b/src/nm-logging.c similarity index 100% rename from src/logging/nm-logging.c rename to src/nm-logging.c diff --git a/src/logging/nm-logging.h b/src/nm-logging.h similarity index 100% rename from src/logging/nm-logging.h rename to src/nm-logging.h diff --git a/src/posix-signals/nm-posix-signals.c b/src/nm-posix-signals.c similarity index 100% rename from src/posix-signals/nm-posix-signals.c rename to src/nm-posix-signals.c diff --git a/src/posix-signals/nm-posix-signals.h b/src/nm-posix-signals.h similarity index 100% rename from src/posix-signals/nm-posix-signals.h rename to src/nm-posix-signals.h diff --git a/src/platform/tests/Makefile.am b/src/platform/tests/Makefile.am index 26d2476379..c5bf87ab21 100644 --- a/src/platform/tests/Makefile.am +++ b/src/platform/tests/Makefile.am @@ -3,7 +3,6 @@ AM_CPPFLAGS = \ -I${top_srcdir}/include \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/libnm-util \ -I${srcdir}/.. \ diff --git a/src/rdisc/tests/Makefile.am b/src/rdisc/tests/Makefile.am index a16f45d671..b4f2842acf 100644 --- a/src/rdisc/tests/Makefile.am +++ b/src/rdisc/tests/Makefile.am @@ -2,7 +2,6 @@ AM_CPPFLAGS = \ -I${top_srcdir} \ -I$(top_srcdir)/include \ -I${top_srcdir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/platform \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/libnm-util \ diff --git a/src/settings/plugins/example/Makefile.am b/src/settings/plugins/example/Makefile.am index f862e4d92a..b9d068a12c 100644 --- a/src/settings/plugins/example/Makefile.am +++ b/src/settings/plugins/example/Makefile.am @@ -1,7 +1,5 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/config \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am index c989617c1c..229fe7316b 100644 --- a/src/settings/plugins/ifcfg-rh/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/Makefile.am @@ -26,11 +26,8 @@ libifcfg_rh_io_la_SOURCES = \ AM_CPPFLAGS = \ -I$(top_srcdir)/src/ \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/settings \ - -I$(top_srcdir)/src/posix-signals \ - -I$(top_srcdir)/src/config \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am index 368588cd5b..3679e83510 100644 --- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am @@ -11,10 +11,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/src/ \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/settings \ - -I$(top_srcdir)/src/posix-signals \ -I$(srcdir)/../ \ -DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am index 3111dbff31..8fcabf7c9d 100644 --- a/src/settings/plugins/ifnet/Makefile.am +++ b/src/settings/plugins/ifnet/Makefile.am @@ -4,8 +4,6 @@ SUBDIRS = . tests AM_CPPFLAGS = \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/config \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am index 1a4aca7d96..b8d6f37225 100644 --- a/src/settings/plugins/ifnet/tests/Makefile.am +++ b/src/settings/plugins/ifnet/tests/Makefile.am @@ -8,8 +8,6 @@ AM_CPPFLAGS= \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/config \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/src/platform \ -DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \ diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am index 0154d38bb5..c1c0e56c32 100644 --- a/src/settings/plugins/ifupdown/Makefile.am +++ b/src/settings/plugins/ifupdown/Makefile.am @@ -4,8 +4,6 @@ SUBDIRS = . tests AM_CPPFLAGS = \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/logging \ - -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am index 994079b7b3..24f17137e2 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.am +++ b/src/settings/plugins/ifupdown/tests/Makefile.am @@ -5,7 +5,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(srcdir)/../ \ -DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \ diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am index 2066026256..2e6b510f90 100644 --- a/src/settings/plugins/keyfile/Makefile.am +++ b/src/settings/plugins/keyfile/Makefile.am @@ -4,8 +4,6 @@ SUBDIRS = . tests AM_CPPFLAGS = \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/config \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am index 114d17ac02..d46bbde268 100644 --- a/src/settings/plugins/keyfile/tests/Makefile.am +++ b/src/settings/plugins/keyfile/tests/Makefile.am @@ -9,7 +9,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(srcdir)/../ \ $(GLIB_CFLAGS) \ diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index ab7ae72b1e..eee44dccf5 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,8 +1,9 @@ +SUBDIRS = config + AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/dhcp-manager \ -I$(top_srcdir)/src \ diff --git a/src/config/tests/Makefile.am b/src/tests/config/Makefile.am similarity index 95% rename from src/config/tests/Makefile.am rename to src/tests/config/Makefile.am index 31ce724395..64dd7fcd84 100644 --- a/src/config/tests/Makefile.am +++ b/src/tests/config/Makefile.am @@ -3,7 +3,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/src/ \ - -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/devices \ -I${top_srcdir}/src/platform \ -DG_LOG_DOMAIN=\""NetworkManager"\" \ diff --git a/src/config/tests/NetworkManager.conf b/src/tests/config/NetworkManager.conf similarity index 100% rename from src/config/tests/NetworkManager.conf rename to src/tests/config/NetworkManager.conf diff --git a/src/config/tests/bad.conf b/src/tests/config/bad.conf similarity index 100% rename from src/config/tests/bad.conf rename to src/tests/config/bad.conf diff --git a/src/config/tests/conf.d/00-overrides.conf b/src/tests/config/conf.d/00-overrides.conf similarity index 100% rename from src/config/tests/conf.d/00-overrides.conf rename to src/tests/config/conf.d/00-overrides.conf diff --git a/src/config/tests/conf.d/10-more.conf b/src/tests/config/conf.d/10-more.conf similarity index 100% rename from src/config/tests/conf.d/10-more.conf rename to src/tests/config/conf.d/10-more.conf diff --git a/src/config/tests/conf.d/90-last.conf b/src/tests/config/conf.d/90-last.conf similarity index 100% rename from src/config/tests/conf.d/90-last.conf rename to src/tests/config/conf.d/90-last.conf diff --git a/src/config/tests/nm-test-device.c b/src/tests/config/nm-test-device.c similarity index 100% rename from src/config/tests/nm-test-device.c rename to src/tests/config/nm-test-device.c diff --git a/src/config/tests/nm-test-device.h b/src/tests/config/nm-test-device.h similarity index 100% rename from src/config/tests/nm-test-device.h rename to src/tests/config/nm-test-device.h diff --git a/src/config/tests/test-config.c b/src/tests/config/test-config.c similarity index 100% rename from src/config/tests/test-config.c rename to src/tests/config/test-config.c