Commit Graph

251 Commits

Author SHA1 Message Date
Dan Williams
7491198138 build: clean up dbus-glib checks
dbus_glib_global_set_disable_legacy_property_access() was added in dbus-glib
0.88, and since we require 0.94 we can remove this check.
2013-01-30 11:19:15 -06:00
Dan Williams
9495331a22 build: fix PolicyKit modify.system configure message
It wasn't actually checking the value, which it should have
been doing.  Thus the wrong message was printed.
2013-01-29 13:47:31 -06:00
Pavel Šimerda
663859c180 build: drop libnl 1.x and 2.x support, require libnl >= 3.2.7 2013-01-24 19:47:53 +01:00
Colin Walters
ae627737d5 Remove SIGSEGV/SIGFPE etc. handling
Modern operating systems come with systemwide "crash catching"
facilities; for example, the Linux kernel can now pipe core dumps out
to userspace, and programs like "systemd-coredump" and "abrt" record
these.

In this model, it's actively counterproductive for individual
processes to catch SIGSEGV because:

1) Trying to unwind from inside the process after arbitrary
   corruption is destined to fail.
2) It hides the fact that a crash happened at all - my OS test
   framework wants to know if any process crashed, and I don't
   want to guess by running regexps against /var/log/Xorg.0.log
   or whatever.

Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692032
2013-01-22 12:49:48 -05:00
Dan Williams
750147f94d release: bump version to 0.9.7.995 (0.9.8-beta1) 2013-01-15 17:34:39 -06:00
Pavel Šimerda
998f4ccc88 build: add code coverage support
Use the following in Makefile.am to enable code coverage for individual modules:

@GNOME_CODE_COVERAGE_RULES@
my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
2013-01-08 13:30:56 +01:00
Alban Browaeys
e78c3e83d2 build: negate the grep result. Not the echo result.
https://bugzilla.gnome.org/show_bug.cgi?id=690991
2013-01-02 12:50:32 -05:00
Alban Browaeys
338f1e4e6a build: Fix with_session_tracking check vs consolkit.
Fix with_session_tracking check vs consolkit,
missing dollar before identifier.

https://bugzilla.gnome.org/show_bug.cgi?id=690991
2013-01-02 12:50:32 -05:00
Pavel Šimerda
a787e5c585 build: cleanups 2012-12-28 19:21:25 +01:00
Guido Günther
1208f6e512 build: various session tracking fixes 2012-12-28 19:00:07 +01:00
Pavel Šimerda
a596db45f0 build: add --enable-tests=root to enable tests that require uid=0 2012-12-18 14:15:13 +01:00
Pavel Šimerda
aa52ca327a build: enable silent rules 2012-12-05 23:22:21 +01:00
Pavel Šimerda
13b8301fda build: clean up --with-session-tracking 2012-12-05 23:22:21 +01:00
Daniel Drake
c6fb063e09 core: don't enumerate uninitialized devices from udev (fdo #56929)
When enumerating devices, libgudev's matching by default will return
devices which udev has not yet finished initializing.

This was frequently causing boot-time races on the OLPC XO, where
NetworkManager would bring a device up before udev had renamed it,
causing the later rename to fail.

To solve this, filter the enumeration matches to only include
initialized devices. The devices that are present but uninitialized
at this time will arrive a short time later, via a uevent.

https://bugs.freedesktop.org/show_bug.cgi?id=56929

(dcbw: update gudev version check in configure.ac)
2012-11-26 16:09:23 -06:00
Pavel Šimerda
423d766b03 build: implement libnl version selection
Until we remove libnl-1.x and libnl-2.x support, it should be
possible to choose the libnl version at build time. This is
mostly important for testing legacy libnl support but it also
helps distributions that ship other tools built agains them.

(https://bugs.gentoo.org/show_bug.cgi?id=441750)
2012-11-22 18:03:16 +01:00
Aleksander Morgado
52c993dd65 build: new `--with-modem-manager-1' to check for new ModemManager1 support
The new switch will run in 'auto' mode when not explicitly specified. In this
case the new ModemManager1 support will only be available if it finds libmm-glib
through pkg-config.

Other than the 'auto' mode, 'yes' and 'no' are allowed in order to specify
explicit requirements.
2012-11-21 11:48:25 -06:00
Pavel Šimerda
449ca34cb0 initscripts: remove Gentoo initscript
The Gentoo initscript is being patched downstream anyway. It
will be easier to maintain it in just one place.

See discussion at bugs.gentoo.org:

https://bugs.gentoo.org/show_bug.cgi?id=441754
2012-11-18 14:56:39 +01:00
Pavel Šimerda
ffb60cdba4 dhcp: improve DHCP client selection in configure.ac
This patch is mostly just a cleanup. It removes some obsolete processing
related to DHCP client support.
2012-11-16 15:27:22 -06:00
Pavel Šimerda
9e7eceeca5 build: fix nmdatadir in configure.ac
And print NetworkManager directories.
2012-11-15 10:41:41 +01:00
Pavel Šimerda
2750b0759f build: don't write systemd unit file outside of prefix 2012-11-15 10:40:50 +01:00
Pavel Šimerda
86f857325e trivial: quote configure.ac string so that vim's highlighting works 2012-11-14 23:55:08 +01:00
Pavel Šimerda
ec1bd3a936 build: fix bad AM_CONDITIONAL
Introduced by commit faa1bcb.
2012-11-13 20:48:22 +01:00
Pavel Šimerda
faa1bcb540 build: improve documentation and test configure options
Use --enable-doc and --enable-tests instead of --with-docs and
--with-tests. This is consistent with other features and with
--enable-gtk-doc option. Support current variants as fallback.

Don't build tests unless --enable-tests is specified.
2012-11-13 20:23:06 +01:00
Pavel Šimerda
c225a6397f build: fix nl80211.h check 2012-11-13 15:39:03 +01:00
Dan Williams
3f179d74e2 build: decouple systemd session tracking from systemd suspend/resume
New option --with-suspend-resume=[upower|systemd] which defaults
to systemd if you have systemd >= 183 with the inhibit support,
otherwise upower.  Allows you to use systemd session tracking
simultaneously with upower for suspend/resume if you don't have
system >= 183.
2012-11-06 15:10:03 -06:00
Dan Williams
0180f461ef build: clarify systemd-login build flags
systemd gets used for more than just systemd-login.
2012-11-06 14:11:05 -06:00
Pavel Šimerda
d82669d3fd build: unify NetworkManager path handling (some paths are changed)
Use autoconf/automake variables for NetworkManager paths. Use
NetworkManager subdirectory where appropriate.

Files in /var/run (or /run on some distros) are moved into a separate
directory as is usual with other daemons. It makes the filesystem
more readable and file prefixing unnecessary.

/var/run/NetworkManager.pid -> /var/run/NetworkManager/NetworkManager.pid
/var/run/nm-dns-dnsmasq.pid -> /var/run/NetworkManager/dnsmasq.pid
/var/run/nm-dns-dnsmasq.conf -> /var/run/NetworkManager/dnsmasq.conf

The /var/run/NetworkManager directory is created at runtime, if it doesn't
exist.

Note: Path-based security policies like SELinux and AppArmor may need to
be adapted.
2012-11-05 14:01:47 +01:00
Pavel Šimerda
5980cae149 distro: fix configure error affecting SUSE netconfig support
Configure now doesn't complain about too many arguments to test.

Bug introduced in my commit:
71e5437: distro: add --with-netconfig option for SUSE
2012-11-01 13:27:44 +01:00
Colin Walters
ceba6bf4c5 build: target GLib 2.34 (bgo #687218)
By specifying GLIB_VERSION_MAX_ALLOWED=GLIB_2_34, we tell GLib not to
warn us about e.g. g_type_init() being deprecated in 2.36.

This avoids the NM build blowing up with the default -Werror
configuration if we happen to have a newer GLib in the buildroot.
2012-10-31 22:01:36 +01:00
Colin Walters
1977fb6c49 build: clean up GLib-related pkg-config usage (bgo #687218)
We had separate checks for glib-2.0, gobject-2.0, gmodule-2.0, and
gio-unix-2.0.  It doesn't make sense to link a binary against all 4
because gio-unix-2.0 depends on glib-2.0 and gobject-2.0.  Doing this
actually breaks things in unusual circumstances.

Generally, few bits of NM actually just use glib, and not gio.  We
might as well coalesce those requirements together, even if it means
in some cases we "overlink".  Additionally, I chose for now to fold
gmodule-2.0 in as well, even though many fewer programs need it.  The
cost of overlinking is quite small.

The benefit of this is less repeated junk in Makefile.am, as well as
more centralized control over GLib.  A followup patch will allow us to
set -DGLIB_VERSION_MIN_REQUIRED in just one place, rather than having
to replicate it 4 times.

The NM configure is still suboptimal - for example, libpolkit-1
depends on gio-2.0, so really we should determine the compiler flags
all in one pass.  But it doesn't matter too much for now.
2012-10-31 21:08:18 +01:00
Colin Walters
59f2cd0f8d build: remove G_DISABLE_DEPRECATED
This functionality is (mostly) obsoleted by the newer
GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED defines.  With
this, your build doesn't all of a sudden blow up if we deprecate
something in GLib - you have to explicitly opt-in to the newer
version.

G_DISABLE_DEPRECATED does still apply for macros and things that can't
take __attribute__((deprecated)), but it's not really worth the pain
and cargo culting around just for that.
2012-10-31 19:41:07 +01:00
Pavel Šimerda
012c5f4b27 distro: replace --with-distro with feature-based options (bgo #663602)
Distribution-specific builds are now handled by feature and not by
distro. This allows you to fine-tune the options to your liking and
also allowed us to reduce the number of specific values.

The default values of these options are still derived from *-version
and *-release files in /etc.

The following five distribution-specific features are now available
(and default on distributions in parenthesis):

  --enable-ifcfg-rh (Fedora, RHEL and Mandriva)
  --enable-ifcfg-suse (SUSE)
  --enable-ifupdown (Debian and Ubuntu)
  --enable-ifnet (Gentoo)
  --with-netconfig (SUSE)

Since --with-distro is now removed, there is nothing to prevent generic
builds. If you build on an unknown distribution, all of the features
above will be disabled by default.
2012-10-30 00:36:05 +01:00
Pavel Šimerda
3ee36a6f74 distro: don't install initscripts
It doesn't make much sense to install initscripts in current distributions. Most
of them either don't use initscripts at all, locally patch the initscripts or
supply their own. This allows us to eventually drop the --with-distro configure
option.

Many current distributions support multiple init systems and it doesn't make
sense for upstream to make the choice for them. Distributors can still make
their scripts copy one of the initscripts from the source tree if they wish so.
2012-10-30 00:36:04 +01:00
Pavel Šimerda
71e5437f18 distro: add --with-netconfig option for SUSE
NetworkManager can use resolvconf and netconfig as alternatives
to direct modifications to /etc/resolv.conf. You can now choose
whether to build with netconfig or not.

The default is --with-netconfig=yes on SUSE and --with-netconfig=no
on other distributions. Default --with-resolvconf=no still applies
on any distribution.
2012-10-30 00:35:57 +01:00
Colin Walters
6a14c4ad58 build: drop subdir-objects from automake options
This breaks a future libgsystem patch.  The original use dates
to:

    commit ae6f88b3dd
    Author: Dan Williams <dcbw@redhat.com>
    Date:   Tue Aug 24 00:31:47 2004 +0000

Which who knows where it came from or why.
2012-10-16 12:08:03 -05:00
Matthias Clasen
ea0c3a3e0f core: add a systemd suspend/resume monitor (bgo #677694)
This implementation uses a delay inhibitor to get systemd to
emit PrepareForSleep, and then emits ::Sleeping and ::Resuming
when receiving the before/after PrepareForSleep emissions.
2012-10-13 09:20:00 -05:00
Dan Winship
14b19982f6 policy: add a configure option for a permissive modify.system default
Add --enable-modify-system, to change the default for
org.freedesktop.NetworkManager.settings.modify.system to allow users
to edit system connections without needing to authenticate.
2012-09-28 08:45:05 -04:00
Pavel Šimerda
bbbf9ad37b distro: remove src/backends
It is no longer used. Also remove an obsolete comment about backends
in nm-system.h.
2012-09-25 16:44:12 -05:00
Dan Williams
aaa5d2f70f examples: add dispatcher example for exclusive wired/wifi 2012-09-20 10:19:11 -05:00
Dan Williams
ce1a7bd5cb release: bump version to 0.9.7.0 (development) 2012-08-07 12:04:54 -05:00
Dan Williams
504a83ea02 release: bump version to 0.9.6.0 2012-08-07 11:39:34 -05:00
Dan Williams
aab6de97bb docs: auto-version documentation and fix up copyright and authorship 2012-08-06 22:04:06 -05:00
Dan Williams
5d87030c26 release: bump version to 0.9.5.96 (0.9.6-rc2) 2012-07-23 18:13:19 -05:00
Dan Williams
01cea4722f build: require dbus-glib >= 0.94
There are known issues with object registration and other functions
in earlier dbus-glib versions.
2012-07-19 12:58:24 -05:00
Dan Williams
ab6267748e build: clean up some configure options 2012-07-19 09:40:50 -05:00
Armin K
b37ed68e18 backends: add Linux From Scratch (LFS) support (bgo #679202) 2012-07-02 12:54:12 +02:00
Dan Williams
772d03fa79 release: bump version to 0.9.5.95 (0.9.6-rc1) 2012-06-27 10:40:03 -05:00
Alberto Ruiz
330998a837 vala: bumped the VAPIGEN version to 0.17.1.24 to make sure it includes the dbus-glib-1.vapi fixes 2012-06-13 13:07:56 -05:00
Alberto Ruiz
b1e1ee79bd vala: add vala bindings for libnm-util and libnm-glib
This patch adds the autotools facilities to generate vapi files so that
libnm-util and libnm-glib can be consumed from Vala.

It depends on vapigen and it is a soft dependency.
2012-06-12 16:31:20 -05:00
Jiří Klimeš
78dda3b093 core: unblock signals for child processes we spawn out of NM (rh #739836)
Commit 217c5bf6ac fixed processing of unix
signals: signals are blocked in all threads and a dedicated thread handles the
signals using sigwait().
However, the commit forgot that child processes inherit signal mask as well.
That is why we have to unblock signals for child processes we spawn from NM, so
that they can receive signals.
2012-05-21 15:00:51 +02:00