Commit graph

131 commits

Author SHA1 Message Date
Thomas Haller
625033a285 travis: fix setting NMTST_DEBUG for travis-check.sh script
(cherry picked from commit 7ec5acdc66)
2016-02-25 15:18:06 +01:00
Lubomir Rintel
873e6564a0 travis: decouple the build from the test run
It looks better in the .yml file as well as in the travis UI.

(cherry picked from commit 1408b8c0a2)
[bgalvani: dropped the coverity part]
2016-02-25 15:17:55 +01:00
Thomas Haller
0907ad6cd8 travis: move build script to a separate script and improve debugging for failed tests
(cherry picked from commit 34050e9c0b)
2016-02-25 15:09:51 +01:00
Thomas Haller
b81e8ca537 contrib/rpm: add rpm_version in spec file
and rename realversion to real_version to follow the pattern.

(cherry picked from commit 6490dc154c)
2016-02-03 15:49:04 +01:00
Thomas Haller
3d15ab9616 contrib/rpm: update comment for patches in spec file
We don't want to create backups of original files when
patching. Update the comment in the spec file to indicate
that.

(cherry picked from commit 455b981215)
2016-02-03 15:43:24 +01:00
Thomas Haller
6807fcc5be contrib/rpm: remove dbus-glib dependancy
Only libnm-glib still requires dbus-glib.

(cherry picked from commit 804ec6fbcd)
2016-02-02 19:02:40 +01:00
Dan Williams
b880c9040b contrib: remove dbus/dbus-glib requires from libnm sub-package
libnm doesn't use dbus-glib or dbus at all.

(cherry picked from commit 5e892819fc)
2016-02-02 19:02:40 +01:00
Thomas Haller
6d342fb4c7 contrib/rpm: make build more configurable by using conditionals
Also add a new conditional "debug" to enable more assertions and
more logging, which is disabled by default.

Also add a conditional "test" to disable running the unit tests
(make check) while building the package.

http://rpm.org/wiki/PackagerDocs/ConditionalBuilds
(cherry picked from commit 87dc14476b)
2016-02-02 19:02:40 +01:00
Dan Winship
4037b6c8bb contrib: sync fedora/rpm/NetworkManager.spec
We're building the plugins on s390 these days

(cherry picked from commit 20a56fa9a2)
2016-02-02 19:02:40 +01:00
Thomas Haller
d6f2e6b0dd contrib/rpm: remove NetworkManager-devel package
NetworkManager-devel package contained development headers that
are useful without libnm-glib and without glib. But it is also
based on the legacy libnm-glib library as it has headers like
"/usr/include/NetworkManager/NetworkManager.h".

A glib-free devel package based on the new libnm library would
be needed to provide "/usr/include/libnm/nm-dbus-interface.h".

But that would amount to 4 devel packages. Instead, just move
the content of NetworkManager-devel into NetworkManager-glib-devel
package.

Note that NetworkManager-devel already contained several truely
libnm-glib dependent files, like the vala bindings (which require
libnm-glib). So that was another bug in the packaging and is fixed
by moving it all to NetworkManager-glib-devel.

https://bugzilla.gnome.org/show_bug.cgi?id=755938
(cherry picked from commit e01c17523a)
2016-02-02 19:02:40 +01:00
Lubomir Rintel
1a0850934b contrib/rpm: sync from Fedora git
(cherry picked from commit de5d98197f)
2016-02-02 19:02:40 +01:00
Thomas Haller
162dd7874f contrib/rpm: add comment to NetworkManager.conf about debug logfiles
(cherry picked from commit bb78d14467)
2016-02-02 18:21:08 +01:00
Thomas Haller
fb8ede6525 contrib/rpm: add --no-build option to build_clean.sh
Option to skip building the source package. Useful if you already
have a source tarball from a previous run.

(cherry picked from commit 3b01d25561)
2016-02-02 18:19:48 +01:00
Thomas Haller
e0ca2bdb63 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
(cherry picked from commit 7bf10a75db)
2015-09-30 23:35:52 +02:00
Lubomir Rintel
f909ce18dc contrib/rpm: regenerate automake with locally present version
The modification of po/Makefile.in.in may trigger re-run of autotools and it
would fail if the versions differ.

Fixes: 2318c0de92
(cherry picked from commit 8e6a839d93)
2015-09-28 19:50:58 +02:00
Jiří Klimeš
19bcc95d48 contrib/rpm: fix creating proper po/Makefile.in.in (rh #1265117)
Without that DATADIRNAME was not present in po/Makefile.in.in
and it resulted in /usr/\@DATADIRNAME\@/locale/cs/LC_MESSAGES/ path instead of
/usr/share/locale/cs/LC_MESSAGES/.

https://bugzilla.redhat.com/show_bug.cgi?id=1265117

(cherry picked from commit 2318c0de92)
2015-09-22 13:05:37 +02:00
Jiří Klimeš
239bb736bc nm-import-openvpn: import 'keepalive' option
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=6afd16bcacd87a019e12f4df0d63a9e0e8c94e9e
(cherry picked from commit 02cfeac668)
2015-08-19 13:15:17 +02:00
Jiří Klimeš
22902cc31d nm-import-openvpn: import 'ping', 'ping-exit' and 'ping-restart' options
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=054cc997ca38e5d786859fa6d032c4404af3d28a
(cherry picked from commit e655358d44)
2015-08-19 13:15:17 +02:00
Jiří Klimeš
75934cb13c nm-import-openvpn: improve error checking
(cherry picked from commit bde1cd342e)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
753e668c48 nm-import-openvpn: fix importing OpenVPN configuration with 'tls-client'
(cherry picked from commit a646870684)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
1cac4ed5b8 nm-import-openvpn: import 'float' OpenVPN option
https://bugzilla.gnome.org/show_bug.cgi?id=737108

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
(cherry picked from commit a5e43ab510)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
9543f2ef73 contrib/scripts: fix importing 'remote' and 'remote-random' options for openvpn
see https://bugzilla.redhat.com/show_bug.cgi?id=1194643

(cherry picked from commit 466515e953)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
6b8dee613f contrib/scripts: nm-import-openconnect - script for importing OpenConnect VPN configs to NM
(cherry picked from commit 29473f1bc4)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
946e157d85 contrib/scripts: nm-import-vpnc - script for importing Cisco VPN configs to NM
(cherry picked from commit db0cf1e7f6)
2015-08-19 13:15:16 +02:00
Jiří Klimeš
701bb6d846 contrib/scripts: nm-import-openvpn - script for importing OpenVPN configs to NM
Synopsis:
 $ nm-import-openvpn -i <infile1> <infile2> ...

 $ nm-import-openvpn <infile> <outfile>

Put the file to NetworkManager:
 # cp <outfile> /etc/NetworkManager/system-connections/
 # chmod 600 /etc/NetworkManager/system-connections/<outfile>
 # nmcli con load /etc/NetworkManager/system-connections/<outfile>

(cherry picked from commit 1a2798d1a4)
2015-08-19 13:15:15 +02:00
Thomas Haller
5316d4dec7 config/rpm: use plain HTTP URI for connectivity checking
https://bugzilla.gnome.org/show_bug.cgi?id=747866
(cherry picked from commit 2a3a4eb16f)
2015-07-16 16:52:56 +02:00
Dan Horák
13320ba35c contrib/rpm: WEXT depends on enabled wifi
(cherry picked from commit 97cf6e47dd)
2015-07-14 19:03:10 +02:00
Lubomir Rintel
6f6a8a85c9 contrib/rpm: always drag in bluez-libs-devel
We don't really know which version it's going to be -- and thus if we're going
to actually need it (version 5), or not (version 4). It's going to be decided
at configure time.

Also, drop the bogus Fedora 19 conditionals; Fedora < 20 has ModemManager that's
too old for the WWAN code anyway.

(cherry picked from commit db44539912)
2015-07-09 18:11:52 +02:00
Jiří Klimeš
c73eeb39f5 supplicant: allow with_system_ca_path to be a file name (rh #1236548)
NetworkManager uses wpa_supplicant, which in turn calls OpenSSL for verifying
certificates. wpa_supplicant calls
SSL_CTX_load_verify_locations(ctx, CAfile, CApath)
using its ca_cert and ca_path options as CAfile and CApath parameters.

We have a configure time option with_system_ca_path to override ca_path.
However, it doesn't work when a system (like Fedora) only uses bundled PEM
certificates instead of a directory with hashed certificates ([1], [2]).

So this commit allows setting --with_system_ca_path to a file name (the
trusted certificate bundle). Then the name is used to populate wpa_supplicant's
ca_cert instead of ca_path.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1053882
[2] https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/

https://bugzilla.redhat.com/show_bug.cgi?id=1236548

(cherry picked from commit 640eb8f284)
2015-07-08 17:12:19 +02:00
Thomas Haller
e23fda7a07 contrib/rpm: let NetworkManager package own '/etc/NetworkManager/' directory
(cherry picked from commit acef8c6a1b)
2015-06-22 09:56:06 +02:00
Thomas Haller
060f7a463e build: add compile option to disable building of Wi-Fi plugin
Before, the Wi-Fi plugin was always build. Users who didn't want
to use it would simply drop "libnm-device-plugin-wifi.so".

Add a compile time option to disable needlessly building the plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=743388
(cherry picked from commit 5439fbd77c)
2015-06-19 12:05:50 +02:00
Lubomir Rintel
8be448cc9d contrib: ensure udev rules from RPM package are applied
We install udev rules and need to ensure that correct ones are in effect when
the package is installed, updated or removed.

(cherry picked from commit b3667afa22)
2015-06-17 13:39:41 +02:00
Thomas Haller
ab9e4deb2d contrib/rpm: add comment to NetworkManager.conf file
https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00036.html
(cherry picked from commit 36fc5cac83)
2015-04-17 10:44:01 +02:00
Thomas Haller
da7a47a33e contrib/rpm: add 10-ibft-plugin.conf config file
Taken from rhel-7.1 package

(cherry picked from commit 8eba28b9bd)
2015-01-28 13:24:21 +01:00
Dan Winship
d21c282f40 contrib: fix NetworkManager.spec after the dispatcher script change
(cherry picked from commit 9d3e0cff9f)
2015-01-28 12:19:37 +01:00
Dan Winship
3e1b09b19f dispatcher: fix ifcfg-rh example dispatcher script (rh #1160013)
Routing table entries for a device get flushed when the device is
deactivated, but rules table entries don't, so we have to flush them
by hand.

(cherry picked from commit 8de1bec803)
2015-01-27 13:52:16 -05:00
Dan Winship
c9d4c3c110 ifcfg-rh: allow handling complex routing rules via dispatcher (rh #1160013)
If a connection has an associated "rule-NAME" or "rule6-NAME" file,
don't try to read in the routes, since NetworkManager won't be able to
parse them correctly. Instead, log a warning that they will need to be
applied via a dispatcher script, and provide a script that would do
that in examples/dispatcher/.

(cherry picked from commit f79d62692e)
2015-01-14 11:35:17 -05:00
Dan Williams
a5508a0965 release: remove "nano" version
Now that NM is >= 1.0 there is no need for a "nano" version.
2014-12-19 11:14:20 -06:00
Thomas Haller
b6ab9744cd contrib/rpm: exclude device plugins for ADSL and Wi-Fi on s390
s390 does not enable several device plugins, but ADSL and Wi-Fi
plugins are still build. They must be excluded in the spec file,
otherwise rpmbuild fails.

This partly reverts commit 1f631cd08d.

  Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/NetworkManager-1.1.0-11242.9709d009d5.el7.s390x
  RPM build errors:
  error: Installed (but unpackaged) file(s) found:
     /usr/lib64/NetworkManager/libnm-device-plugin-adsl.so
     /usr/lib64/NetworkManager/libnm-device-plugin-wifi.so
      Installed (but unpackaged) file(s) found:
     /usr/lib64/NetworkManager/libnm-device-plugin-adsl.so
     /usr/lib64/NetworkManager/libnm-device-plugin-wifi.so
  Child returncode was: 1

(cherry picked from commit 2fc37ce895)
2014-12-19 14:06:05 +01:00
Thomas Haller
5672093dcf contrib/rpm: fix spec file for s390/s390x
On s390/s390x we would disable hardware plugins, especially %{with_bluetooth} and
%{with_wwan}. Depending on that we would set 'BuildRequires: ModemManager-glib-devel'.

This was not corresponding to the '--with-modem-manager-1' configure
option, hence we did not have ModemManager-glib-devel, but
'--with-modem-manager-1=yes'

(cherry picked from commit 6f343b866e)
2014-12-19 14:06:05 +01:00
Thomas Haller
4b8f789773 contrib/rpm: fix --srpm option of build_clean.sh
Forgot to export the $BUILDTYPE variable. Hence --srpm did not
work.

(cherry picked from commit c5e998441c)
2014-12-19 12:36:02 +01:00
Thomas Haller
09130c5693 contrib/rpm: ignore libgsystem/ repository in build_clean.sh 2014-12-03 15:01:12 +01:00
Lubomir Rintel
ae829a88ce contrib: Enable PolicyKit agent in RPM 2014-11-13 18:57:04 +01:00
Lubomir Rintel
84c8558622 contrib: Require libselinux for RPM build
It ensures ifcfg-rh doesn't mess up the labels.
2014-11-13 18:57:04 +01:00
Thomas Haller
1e8b681d4f man: add manual page for nmtui(1)
https://bugzilla.gnome.org/show_bug.cgi?id=739710

Branch: th/bgo739710_man_nmtui
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-11 16:01:38 +01:00
Thomas Haller
b1e26735a0 contrib/rpm: add option to only building SRPM
Set environment variable BUILDTYPE=SRPM or call
`build_clean.sh --srpm`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-07 21:31:12 +01:00
Dan Williams
5149fd120d iface-helper: add nm-iface-helper for dynamic configure-then-quit support
When quitting, the Manager asks each device to spawn the interface helper,
which persists and manages dynamic address on the interface after NetworkManager
is gone.  If the dynamic address cannot be maintaned, the helper quits and
the interface's address may be removed when their lifetime runs out.

To keep the helper as simple as possible, NetworkManager passes most of the
configuration on the command-line, including some properties of the device's
current state, which are necessary for the helper to maintain DHCP leases
or IPv6 SLAAC addresses.
2014-11-07 12:18:33 -06:00
Lubomir Rintel
48b4f6f830 Merge branch 'lr/rpm-make-check'
https://bugzilla.gnome.org/show_bug.cgi?id=739127
2014-10-30 14:40:47 +01:00
Lubomir Rintel
9db55be9a1 contrib/rpm: Run make check 2014-10-30 14:39:08 +01:00
Thomas Haller
4545b6cb1e config: set a compile time default for the main.plugins configuration option
In case of a missing NetworkManager.conf (or a missing configuration option
main.plugins), allow to determine the fallback at compile time

https://bugzilla.gnome.org/show_bug.cgi?id=738611

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-29 15:17:55 +01:00