Commit graph

156 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 9de4cc53a5 gitignore: Fix *.stamp ignore
ripgrep complains about the invalid `**`.

(cherry picked from commit 1fad494c34)
2018-09-13 14:33:11 +02:00
Thomas Haller a75ab799e4 build: create "config-extra.h" header instead of passing directory variables via CFLAGS
1) the command line gets shorter. I frequently run `make V=1` to see
   the command line arguments for the compiler, and there is a lot
   of noise.

2) define each of these variables at one place. This makes it easy
   to verify that for all compilation units, a particular
   define has the same value. Previously that was not obvious or
   even not the case (see commit e5d1a71396
   and commit d63cf1ef2f).
   The point is to avoid redundancy.

3) not all compilation units need all defines. In fact, most modules
   would only need a few of these defines. We aimed to pass the necessary
   minium of defines to each compilation unit, but that was non-obvious
   to get right and often we set a define that wasn't used. See for example
   "src_settings_plugins_ibft_cppflags" which needlessly had "-DSYSCONFDIR".
   This question is now entirely avoided by just defining all variables in
   a header. We don't care to find the minimum, because every component
   gets anyway all defines from the header.

4) this also avoids the situation, where a module that previously did
   not use a particular define gets modified to require it. Previously,
   that would have required to identify the missing define, and add
   it to the CFLAGS of the complation unit. Since every compilation
   now includes "config-extra.h", all defines are available everywhere.

5) the fact that each define is now available in all compilation units
   could be perceived as a downside. But it isn't, because these defines
   should have a unique name and one specific value. Defining the same
   name with different values, or refer to the same value by different
   names is a bug, not a desirable feature. Since these defines should
   be unique accross the entire tree, there is no problem in providing
   them to every compilation unit.

6) the reason why we generate "config-extra.h" this way, instead of using
   AC_DEFINE() in configure.ac, is due to the particular handling of
   autoconf for directory variables. See [1].
   With meson, it would be trivial to put them into "config.h.meson".
   While that is not easy with autoconf, the "config-extra.h" workaround
   seems still preferable to me.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
2018-07-17 17:46:39 +02:00
Beniamino Galvani 3886cc8e0c core: rename 'arping' to 'acd'
Now that the ACD functionality is no longer using arping, rename
nm-arping-manager to nm-acd-manager and other occurences of arping as
well.
2018-04-18 15:22:34 +02:00
Thomas Haller 33d2d8850b gitignore: ignore *.pyc files 2018-04-04 14:57:07 +02:00
Thomas Haller 868c3cedfd dhcp: remove unused nm_utils_resolve_conf_parse() function 2018-03-20 21:03:20 +01:00
Thomas Haller 2f85fe0adf gitignore: ignore generated clients/common/settings-docs.h file 2018-01-12 09:51:12 +01:00
Thomas Haller 0474441e22 settings: drop unmaintained ifnet settings plugin of Gentoo
Even Gentoo disables this plugin since before 0.9.8 release
of NetworkManager. Time to say goodbye.

If somebody happens to show up to maintain it, we may resurrect it
later.

If "$distro_plugins=ifnet" was set, configure.ac would use that
to autodetect --with-hostname-persist=gentoo. Replace that autodetect
part by checking for /etc/gentoo-release file.
2017-12-21 10:50:33 +01:00
Thomas Haller 58c07d33a4 gitignore: ignore default meson build directory "build" 2017-12-15 09:36:45 +01:00
Thomas Haller d5d4911b58 gitignore: readd removed libnm-core/tests/test-setting* programs
Although removed, they show up whenever switching to an
old branch. Keep ignoring them.
2017-12-08 08:45:51 +01:00
Francesco Giudici 540b7b3dfd gitignore: ignore libnm-core/tests/test-setting
We now have merged in libnm-core/tests/test-setting test file the test
files for 8021x, bond and dcb... add the new test file to .gitignore and
remove the old ones.
2017-12-08 00:46:27 +01:00
Lubomir Rintel 4d1f090aed libnm: register empty NMClient and NetworkManager when loading libnm with GIR
Register empty "NMClient" and "NetworkManager" GIR modules as soon as libnm is
loaded witch gnome-introspection. This prevents the real modules from being
loaded because they would in turn load libnm-glib and abort() and crash.

In particular this prevents the GNOME shell from crashing with
libnm-glib abort and allows gracefully disabling the extensions which
use the obsolete library.

Test:

  $ cat test.js
  const NM = imports.gi.NM;
  print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);

  const NMClient = imports.gi.NMClient;
  print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);

Before:

  $ gjs test.js
  1

  (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
  Trace/breakpoint trap (core dumped)
  $

After:

  $ gjs test.js
  1
  Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags"

  (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined
  @test.js:5:1

  JS_EvaluateScript() failed
2017-11-06 11:47:05 +01:00
Thomas Haller 6dbc390302 gitignore: ignore temporary ifcfg-rh tests directory 2017-06-29 14:52:09 +02:00
Thomas Haller 8df944c7e4 libnm: add testable libnm/nm-libnm-utils.c file
Previously, internal parts of libnm were not testable.
Instead, add "libnm/nm-libnm-utils.c" and "libnm/libnm-utils.la"
to contain code that can be statically linked with a new
test "libnm/tests/test-general".
2017-05-19 12:45:45 +02:00
Thomas Haller b4b8e81153 gitignore: ignore .zanata-cache directory 2017-04-19 11:52:26 +02:00
Thomas Haller 022117ff36 cli/tests: add "clients/common/tests/test-general.c" 2017-04-05 16:53:06 +02:00
Thomas Haller b044b306d2 gitignore: fix ignoring "clients/common/settings-docs.c" (2)
Fixes: d720f0955f
2017-03-30 18:07:35 +02:00
Thomas Haller 1b2da4b5f3 gitignore: fix ignoring "clients/common/settings-docs.c"
Fixes: d720f0955f
2017-03-30 17:29:21 +02:00
Thomas Haller 2ac6c5a981 build: rename intermediate doc xmls
Allows to use pattern rules by making the
related files having a common naming scheme.

This commit only renames files.
2016-11-24 16:54:17 +01:00
Lubomir Rintel 972e0d2803 all: rename the introspection data to use the interface paths in names
This makes it easier to install the files with proper names.
Also, it makes the makefile rules slightly simpler.

Lastly, the documentation is now generated into docs/api, which makes it
possible to get rid of the awkward relative file names in docbook.
2016-11-23 15:43:42 +01:00
Thomas Haller 8c7f5e2653 build: rename "src/dnsmasq-manager" to "src/dnsmasq"
The dnsmasq directory does not only contain the manager
instance, but various files related to dnsmasq.

Rename.
2016-11-21 14:07:47 +01:00
Thomas Haller e053996881 build: rename "src/dhcp-manager" to "src/dhcp"
The dhcp directory does not only contain the manager
instance, but various files related to DHCP.

Rename.
2016-11-21 14:07:47 +01:00
Thomas Haller 1706366351 build: rename "src/supplicant-manager" to "src/supplicant"
The supplicant directory does not only contain the manager
instance, but various files related to wpa-supplicant.

Rename.
2016-11-21 14:07:47 +01:00
Thomas Haller 7b78a931df build: generate src/NetworkManager.ver during build
This adds 0.4 seconds to the build time.

You can disable it by setting $NM_BUILD_NO_CREATE_EXPORTS environment
variable. This is useful in the unexpected case that the script
is broken.
Or, if you just want to use a different, non-generated version-script.
Or, if you want to save 0.4 seconds build-time.
2016-11-10 18:30:38 +01:00
Lubomir Rintel 44fca246a7 rdisc: rename to ndisc
We'll soon not only do the router discovery, but announce ourselves as a
reouter. "Neighbor discovery" sounds to be a more appropriate name for
the class than "Router discovery".
2016-11-09 17:16:47 +01:00
Thomas Haller 4be9b4a2cb build: move policy file from "policy/" to "data/" 2016-11-03 14:18:23 +01:00
Thomas Haller 3c2a49df2f build: merge "introspection/Makefile.am" into toplevel Makefile.am 2016-10-19 15:26:30 +02:00
Thomas Haller f42466215a callouts/dispatcher: rename directory callouts
Originally, the "callouts" directory contained various programs
that NetworkManager would call, for example the dhcp helper.

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

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

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

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

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

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

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

Just remove them.

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

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

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

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

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

Fixes: 4545a7fe96
2015-09-30 23:10:29 +02:00
Lubomir Rintel d7614d0bda gitignore: ignore GDBus generated glue 2015-09-18 13:53:30 +02:00
Lubomir Rintel 60372f1090 build: create xz compressed by default
GNOME release tooling repacks the bz2 to a xz anyway. This makes it easier for
packagers to use tarballs created with "make dist" in place of distribution
tarballs.
2015-08-13 17:22:44 +02:00