Commit graph

18 commits

Author SHA1 Message Date
Thomas Haller 10353a996f examples: add examples/python/gi/nm-update2.py example script
This is useful for manually testing Update2() D-Bus API.
2019-07-25 22:02:00 +02:00
Thomas Haller 360d26e27c examples: add examples/python/gi/nm-add-connection2.py example script
This is useful for manually testing AddConnection2() D-Bus API.
2019-07-25 15:26:49 +02:00
Thomas Haller debd022a6d examples: add python example script "nm-wg-set" for modifying WireGuard profile
Use the script to test how GObject introspection with libnm's WireGuard
support works.

Also, since support for WireGuard peers is not yet implemented in nmcli
(or other clients), this script is rather useful.
2019-02-22 11:00:11 +01:00
Lubomir Rintel 59ccf5dc89 examples/python: drop nmex.py
It's not an example and not actually used.

https://github.com/NetworkManager/NetworkManager/pull/141
2018-06-29 20:05:39 +02:00
Thomas Haller d14b9b8215 examples: add python utils for examples
We need common operations from the python scripts.
For example, to print the boot-time.

Move such utils to a separate nmex.py file ("ex" for
example). This file should contain helper functions that
are pure python (or, if the have requirements, load them
only on demand, so that examples that need those have
additional dependencies). It should also be simple to extract
individual helpers from nmex, so that the user can take an
example, merge parts of nmex.py in, and modify it to his needs.
2018-04-04 14:02:13 +02:00
Thomas Haller 9ef17869b5 version: drop NM_VERSION_MAX_ALLOWED defines for internal build
It already defaults to the right value. We only need to define
NM_VERSION_MIN_REQUIRED, so that parts of our internal build
can make use of deprecated API.
2018-01-23 10:50:34 +01:00
Thomas Haller 8a040c6883 version: combine NM_VERSION_CUR_STABLE and NM_VERSION_NEXT_STABLE
We don't need to have two version defines "CUR" and "NEXT".

The main purpose of these macros (if not their only), is to
make NM_AVAILABLE_IN_* and NM_DEPRECATED_IN_* macros work.

1) At the precise commit of a release, "CUR" and "NEXT" must be identical,
because whenever the user configures NM_VERSION_MIN_REQUIRED and
NM_VERSION_MAX_ALLOWED, then they both compare against the current
version, at which point "CUR" == "NEXT".

2) Every other commit aside the release, is a development version that leads
up the the next coming release. But as far as versioning is concerned, such
a development version should be treated like that future release. It's unstable
API and it may or may not be close to later API of the release. But
we shall treat it as that version. Hence, also in this case, we want to
set both "NM_VERSION_CUR_STABLE" and again NEXT to the future version.

This makes NM_VERSION_NEXT_STABLE redundant.

Previously, the separation between current and next version would for
example allow that NM_VERSION_CUR_STABLE is the previously release
stable API, and NM_VERSION_NEXT_STABLE is the version of the next upcoming
stable API. So, we could allow "examples" to make use of development
API, but other(?) internal code still restrict to unstable API. But it's
unclear which other code would want to avoid current development.

Also, the points 1) and 2) were badly understood. Note that for our
previousy releases, we usually didn't bump the macros at the stable
release (and if we did, we didn't set them to be the same). While using
two macros might be more powerful, it is hard to grok and easy to
forget to bump the macros a the right time. One macro shall suffice.

All this also means, that *immediately* after making a new release, we shall
bump the version number in `configure.ac` and "NM_VERSION_CUR_STABLE".
2018-01-23 10:50:34 +01:00
Iñigo Martínez 97f06c3a6d build: Add meson build files to distributable files
Although it is possible to generate distributable files on meson
since version 0.41 by using the `ninja dist` command, autotools does
different things that end up creating a different distributable
file.

meson build files have been added to autotools build files as
distributable files, so the whole meson port would also be
distributed.

https://mail.gnome.org/archives/networkmanager-list/2018-January/msg00047.html
2018-01-10 06:27:50 +01:00
Thomas Haller 8388f4ea1d examples: add python/gi example nm-connection-update-stable-id.py
The example script touches the stable-id of a connection.
It does so blocking autoconnect, and was originally written
to test that functionality.
2017-12-05 19:57:24 +01:00
Lubomir Rintel d529641756 examples/js: add a javascript example
Converted from python/gi/get_ip.py.
2017-11-06 11:47:05 +01:00
Thomas Haller adcbcb15e5 examples: add setting-user-data.py
Add an example python script to show and set setting's
user-data. This is useful, as nmcli still doesn't support
user data.

(cherry picked from commit 447c766f52)
2017-05-06 14:53:09 +02:00
Thomas Haller 6198c2a5a4 build: declare build dependencies requiring "nm-core-enum-types.h"
cat <<-EOF > /tmp/glib-mkenums
	#!/bin/bash
	sleep 15 && /usr/bin/glib-mkenums "\$@"
	EOF

	chmod +x /tmp/glib-mkenums

	(export PATH="/tmp:$PATH" &&
	 git clean -fdx &&
	 ./autogen.sh &&
	 make -j20 all-am)

(cherry picked from commit 68ab166f38)
2017-03-29 11:26:27 +02:00
Thomas Haller b869d9cc0d device: add spec "driver:" to match devices
Changing the MAC address of devices is known to fail with
certain drivers. Add a device-spec to allow disabling it
for for such devices.

Related: https://bugzilla.gnome.org/show_bug.cgi?id=777523
2017-03-17 17:40:00 +01:00
Thomas Haller 6fa069fad1 example: add example configuration snippet '30-anon.conf' 2017-01-09 14:50:33 +01:00
Thomas Haller ec4a1b7540 build: avoid some uses of BUILT_SOURCES in Makefile.am
BUILT_SOURCES only matters during `make all`, `make check`
and `make install`.

It would be nice to be able to build every target specifically
from an empty git-tree.

Drop the use of BUILT_SOURCES where we already have the explicit
dependencies declared.
2016-11-24 16:52:27 +01:00
Thomas Haller 351851cf27 build: merge "examples/Makefile.am" into toplevel Makefile 2016-10-21 17:37:57 +02:00
Thomas Haller b648772fc4 build: merge "examples/C/qt/Makefile.am" into toplevel Makefile 2016-10-21 17:37:57 +02:00
Thomas Haller 742d36c476 build: merge "examples/C/glib/Makefile.am" into toplevel Makefile 2016-10-21 17:37:57 +02:00