Commit graph

793 commits

Author SHA1 Message Date
Thomas Haller 7eafd1d833 travis: don't check for setting-docs.c file
Fixes: b3e2808c32
2017-04-05 19:09:25 +02:00
Thomas Haller 29a47f40f8 build: configure explicit paths for dist tarball during "build_clean.sh"
"build_clean.sh" is used to generate a distribution tarball. The tarball
contains pregenerated man pages with default values for paths, which in
turn depend on the configure options when creating the tarball.

Previously, the man page would have paths like "usr/local/etc/NetworkManager/...",
which doesn't seem the best choice for a default man page.

Explicitly set the installation paths.

Also, --disable-dependency-tracking in this mode. It may speed up the
build.
2017-03-24 11:20:00 +01:00
Lubomir Rintel faad17f9e8 contrib/rpm: enable libpsl on Fedora only 2017-03-22 13:01:23 +01:00
Thomas Haller e32839838e udev: drop libgudev in favor of libudev
libgudev is just a wrapper around libudev. We can
use libudev directly and drop the dependency for
libgudev.
2017-03-22 12:41:06 +01:00
Francesco Giudici 7307dea9c4 connectivity: switch connectivity checking to libcurl
[lkundrak@v3.sk: removed libsoup altogether, implemented TODOs and fixed
the poll condition handling]

Co-authored-by: Lubomir Rintel <lkundrak@v3.sk>
2017-03-22 12:09:39 +01:00
Lubomir Rintel c05befd5aa dns-manager: use libpsl directly
...instead of via libsoup. This makes it possible to do gTLD suffix checking
even if we're building without libsoup support.
2017-03-22 12:09:39 +01:00
Thomas Haller e72b43e01f contrib/rpm: reorder spec file and move bcond definitions together 2017-03-06 20:23:15 +01:00
Thomas Haller 560801e237 contrib/rpm: remove unused default_with_* variables
They are unused since commit d2fd1b9fb7.
2017-03-06 20:23:14 +01:00
Thomas Haller 2b6f3ba3cf contrib/rpm: add explicit libxslt build dependency
We configurably use --enable-gtk-doc/--disable-gtk-doc, but
we always require --enable-introspection (due to --enable-vala).

Add the missing build requirement to the "xsltproc" binary, which is in
libxslt package.
2017-03-06 19:59:29 +01:00
Lubomir Rintel d2fd1b9fb7 contrib/rpm: drop EOL versions of Fedora
These are history and noone should be using them; special casing them is
essentially line noise.
2017-03-02 15:51:46 +01:00
Lubomir Rintel ef8c292881 contrib/rpm: install D-Bus service files to /usr if we can
This is in fact the correct location, but dbus in RHEL 7 is still too
old to be able to use that.
2017-03-02 15:51:46 +01:00
Thomas Haller 5caa9d877b contrit/rpm: create source tarball from git immidiately in SOURCES directory
Instead of first creating it as "$TEMP/NetworkManager-${VERSION}.tar.xz"
and then copy it to "$TEMP/SOURCES".
2017-02-16 11:32:53 +01:00
Thomas Haller b04868cb52 contrit/rpm: print the used "$SOURCE" tarball in the summary output of build.sh 2017-02-16 11:04:00 +01:00
Thomas Haller 432717cf47 contrib/rpm: add explict configure options for building NetworkManager in "build_clean.sh"
When we create a source tarball, documentation and other generated files
are disted. Those files depend on the configure options when creating
the tarball. For example, the generated man pages contain the compile time
configurable default values.

For that reason, it is generally better to regenerate the documentation when
building NetworkManager. However, let's set explict configure options to
have a more reproducible way to generate the tarball.

When doing a release, you should not just call `make dist`. Instead, the
proper way of creating an official source tarball is:

  $ ./contrib/fedora/rpm/build_clean.sh --srpm
2017-02-15 23:27:39 +01:00
Thomas Haller 97cdb690f2 contrib/rpm: no longer package the Changelog with the libnm-devel/glib-devel packages 2017-02-14 17:39:46 +01:00
Lubomir Rintel cc1491401f contrib/rpm: don't recreate files that make install installs 2017-01-29 12:28:55 +01:00
Lubomir Rintel a1464f0cfa contrib/rpm: don't own the legacy VPN directory
The plugins should own it instead.
2017-01-29 12:28:55 +01:00
Thomas Haller 0fd3ec81fd contrib/rpm: let NetworkManager-libnm and NetworkManager-glib of differing version conflict
Since commit "c920909 contrib/rpm: put translations in
NetworkManager-libnm and NetworkManager-glib packages", both
subpackages install the same translation files without a direct
dependency between the two packages. Thus, if a user tries
to update only one of the two subpackages, it will fail
during the installation due to conflicting files.

Fix that by having the subpackages conflict (per version).
This way, the conflict is detected before starting the
installation.

https://bugzilla.redhat.com/show_bug.cgi?id=1406454
(cherry picked from commit b85b8ed6fa)
2017-01-20 17:11:55 +01:00
Thomas Haller daf935fb1b contrib/rpm: fix code comment in default "NetworkManager.conf" 2017-01-17 14:26:30 +01:00
Beniamino Galvani c46627e1dc contrib: add macsec test script 2017-01-16 17:47:10 +01:00
Thomas Haller f5100d0681 contrib/rpm: fix obsoletes_ppp_plugin version
The ppp package split was introduced during 1.5.3 development. Thus,
we obsolete packages < 1:1.5.3.

Also, add conditionals around ppp-devel build-requirement.
2016-12-16 09:51:48 +01:00
Lubomir Rintel 8768978751 contrib/rpm: obsolete the pre-ppp-split version from the main package
To ensure smooth upgrade path. While at it, move the BR to a more usual
place.
2016-12-15 20:29:46 +01:00
Thomas Haller 0fce208a8b contrib/rpm: add note to NetworkManager.conf about rate-limiting in logging 2016-12-14 12:51:06 +01:00
Beniamino Galvani bdc61c4e95 contrib/rpm: split PPP support into a separate package
This allows to remove from the main package the PPP dependency.
2016-12-06 11:08:11 +01:00
Lubomir Rintel a96c819f6f contrib/travis: the test outputs are now logged more sanely
Adjust the travis script accordingly.
2016-12-05 13:54:35 +01:00
Lubomir Rintel a0aea99bd7 contrib/rpm: mark the config packages noarch 2016-12-05 13:24:51 +01:00
Thomas Haller a80ba4ea09 build: fix gtk-doc/introspection handling for build
- `make dist` requires --enable-gtk-doc --enable-introspection --with-libnm-glib
- --enable-gtk-doc requires --enable-introspection
- --with-nmcli requires either --enable-introspection or pregenerated
   settings-docs.c files from the dist tarball. It does not require
   --enable-gtk-doc.

There is a bit of a problem in that --enable-introspection requires
now xsltproc. However, gobject-introspection does itself not depend
on xsltproc. So, more correct might be a special --enable-doc argument,
that combines --enable-introspection --with-xsltproc. Anyway, that
seems to make it more complicated then it already is so just implicitly
(and surprisingly?) require xsltproc with --enable-introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=775003
2016-11-28 12:43:51 +01:00
Thomas Haller 7729d85c8c contrib/rpm: let RPM package own %{systemd_dir}/network-online.target.wants
# rpm -qf /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service
  NetworkManager-1.5.2-16352.e0c50a9703.fc24.x86_64
  # rpm -qf /usr/lib/systemd/system/network-online.target.wants
  file /usr/lib/systemd/system/network-online.target.wants is not owned by any package
2016-11-24 12:57:27 +01:00
Lubomir Rintel 88f3f29882 build: install the D-Bus introspection data
This would make it easier to develop against NetworkManager D-Bus API.
2016-11-23 15:43:42 +01:00
Lubomir Rintel 612351471c contrib/rpm: drop XML::Parser BR
We don't depend on it already.
2016-11-21 18:34:47 +01:00
Lubomir Rintel d3f7f7abca all: drop YAML dependency 2016-11-21 18:15:42 +01:00
Thomas Haller 8804a5df1d contrib/rpm: no longer manually pre-build parts for make dist
`make dist` should have now the proper dependencies to build everything
that is needed automatically. No need for manually calling make first.
2016-11-20 18:14:37 +01:00
Jiří Klimeš c391fb299b nm-import-openvpn: sort the options alphabetically 2016-11-10 20:56:44 +01:00
Jiří Klimeš 3219bb3b76 nm-import-openvpn: remove old code for 'dev' option 2016-11-10 20:56:44 +01:00
Jiří Klimeš 79643ce28a nm-import-openvpn: parse quoted string as a single word
It is necessary, for example, for this to work:
verify-x509-name "C=US, L=Cambridge, CN=GNOME, emailAddress=networkmanager-list@gnome.org" subject
2016-11-10 20:56:44 +01:00
Jiří Klimeš c4ed2483b2 nm-import-openvpn: import 'verify-x509-name' option
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=b51b3562ce079cc0be426e968fe1c90faadc0efd
2016-11-10 20:56:44 +01:00
Jiří Klimeš bc446c3ab8 nm-import-openvpn: improve importing 'comp-lzo' option
https://bugzilla.gnome.org/show_bug.cgi?id=769177
https://bugzilla.redhat.com/show_bug.cgi?id=1355688
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833166
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=62bdd278d69cc396479af9d05a0b776d5ad386bf
2016-11-10 20:56:44 +01:00
Jiří Klimeš e58cfa4fc1 nm-import-openvpn: improve parsing and checking 'route' option 2016-11-10 20:56:44 +01:00
Jiří Klimeš f7e4b748e1 nm-import-openvpn: import 'ns-cert-type' option
https://bugzilla.gnome.org/show_bug.cgi?id=719430
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=644e55ed404edbc953e323d13c57297b53cc0f8b
2016-11-10 20:56:44 +01:00
Jiří Klimeš 978328712b nm-import-openvpn: import 'tls-cipher' option
https://bugzilla.gnome.org/show_bug.cgi?id=763484
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=d7a84afe1d1948c7990a08b18913e65550c222a0
2016-11-10 20:56:44 +01:00
Jiří Klimeš 367d13a7dd nm-import-openvpn: import 'max-routes' option
https://bugzilla.gnome.org/show_bug.cgi?id=720097
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=c4d45e51280d5b0cb8c5e8f826d68c3262162080
2016-11-10 20:56:44 +01:00
Jiří Klimeš 966e0fb50e nm-import-openvpn: import 'tun-ipv6' option
https://bugzilla.gnome.org/show_bug.cgi?id=761907
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=ffda527d8a932f2e3419d6c64623540e5b190d9e
2016-11-10 20:56:44 +01:00
Thomas Haller 5f00a20f38 contrib/rpm: fix wrong configure options in spec file 2016-11-10 18:30:38 +01:00
Thomas Haller c9209093b4 contrib/rpm: put translations in NetworkManager-libnm and NetworkManager-glib packages
One can install the libraries without NetworkManager. Thus, the
translations should be there.

Doing this increases the package size of the libraries significantly.

For a user who only has libnm without NetworkManager installed, this
is acceptable, because the whole point of the change is to ensure such
a user also gets translations.

For a user who requires libnm and libnm-glib packages, this
unfortunately increases the additional package size as the translations
are now present twice.

What would be better is if NetworkManager-libnm would only contain
translations for libnm/NetworkManager, and NetworkManager-glib only
translations for libnm-util/libnm-glib.
2016-11-08 10:21:44 +01:00
Lubomir Rintel 9d31cc916f Revert "contrib/rpm: regenerate the linker version script NetworkManager.ver while building the package"
Back this out. It breaks i686 build unnecessarily now and also is
something that proabably that should run on distcheck and not package
build.

This reverts commit cf678811b5.
2016-11-06 15:19:16 +01:00
Lubomir Rintel 9bd0ea7954 contrib/rpm: drop dhclient requirement
We fall back to the internal client for the very minimal installations.
Based on: 209b5a57fd
2016-11-03 17:56:38 +01:00
Lubomir Rintel b8785c8c3c Revert "contrib/rpm: add NetworkManager-config-dhcp-dhclient package"
This probably needs more discussion, maybe there's a better solution
than a separate RPM package for a single line of configuration.

Related: https://pagure.io/fedora-comps/pull-request/62

This reverts commit 209b5a57fd.
2016-11-03 17:56:13 +01:00
Lubomir Rintel dcc13cfcd8 contrib/rpm: drop udev dependency
We happily run in containers without udev.
2016-11-03 16:01:23 +01:00
Lubomir Rintel ef0a68b942 contrib/rpm: drop iptables and dnsmasq dependencies
We just fail ipv4.method=shared without it, no need to drag it in for
configurations that don't share IPv4.
2016-11-03 16:01:23 +01:00
Lubomir Rintel 64770ee518 contrib/rpm: drop explicit readline dependency
RPM auto-generates a SONAME dependency.
2016-11-03 16:01:23 +01:00
Lubomir Rintel 5f4be85742 contrib/rpm: drop iproute dependency
We don't actually ever need it.
2016-11-03 16:01:23 +01:00
Thomas Haller 0fa2cf19e5 vapi: add vapi NM-1.0 for libnm
Initial vala API for libnm. Consider it unstable, it probably needs
improvements.

https://bugzilla.gnome.org/show_bug.cgi?id=773588
2016-11-03 10:15:42 +01:00
Thomas Haller 1c1da147c9 contrib/rpm: update comments in NetworkManager.conf explaining /var/lib/NetworkManager/conf.d 2016-10-27 11:50:24 +02:00
Thomas Haller 209b5a57fd contrib/rpm: add NetworkManager-config-dhcp-dhclient package
This allows to get rid of the dhclient requirement of NetworkManager
package and moves the package dependency to the new sub package
NetworkManager-config-dhcp-dhclient.

For the moment, I think dhclient should still be the default choice for
regular users due to dhclient providing better better previledge separation
of network facing code. A user who knows that he's doing, can now however
remove dhclient while keeping NetworkManager.

https://bugzilla.redhat.com/show_bug.cgi?id=1204226
2016-10-27 11:46:15 +02:00
Thomas Haller 2238ccb48b travis: run tests in parallel 2016-10-21 17:37:56 +02:00
Thomas Haller 491aad08a9 contrib/rpm: run make check in parallel (again)
Revert commit f551c91d33 and restore
parallel `make check`. It should work.
2016-10-19 15:26:30 +02:00
Thomas Haller f551c91d33 Revert "contrib/rpm: run make check in parallel"
`make check -C libnm/tests` is not yet ready to run in
parallel. Revert.

This reverts commit 0a1508358d.
2016-10-14 15:48:27 +02:00
Thomas Haller 5ea3196376 contrib/rpm: rename obsoletes_nmver to obsoletes_version_device_plugins
We will have multiple obsoletes
2016-10-14 11:26:13 +02:00
Thomas Haller c4325f6494 contrib/rpm: force compilation with "--enable-ld-gc"
It should already be autodetected. Just be explicit about it.
2016-10-14 10:33:30 +02:00
Thomas Haller 0a1508358d contrib/rpm: run make check in parallel 2016-10-14 10:33:30 +02:00
Thomas Haller cf678811b5 contrib/rpm: regenerate the linker version script NetworkManager.ver while building the package 2016-10-14 10:33:30 +02:00
Thomas Haller 54f701b95c contrib/rpm: fix build_clean.sh --quick after removing shared/Makefile.am
Fixes: 24f566afa0
2016-10-14 10:02:46 +02:00
Lubomir Rintel 790e23df67 build: fix required packages list 2016-10-10 18:51:23 +02:00
Lubomir Rintel e59ed6451f contrib/rpm: require at least the version of glib we built against
glib neither versions its symbols nor bumps SONAME on API changes, so rpm can't
figure out the correct dependencies itself.

https://bugzilla.redhat.com/show_bug.cgi?id=1378809
2016-09-23 12:20:23 +02:00
Thomas Haller 4cce0b7cf4 contrib/rpm: fix wrong argument to configure script
Fixes: aff491b6f3
(cherry picked from commit 5d09d45b42)
2016-08-18 14:54:04 +02:00
Thomas Haller 959e151722 contrib/rpm: update spec file to make it more similar to RHEL's version
(cherry picked from commit aff491b6f3)
2016-08-18 12:40:08 +02:00
Thomas Haller cfd3e1a13c contrib/rpm: improve detection of ppp_version from spec file
https://bugzilla.redhat.com/show_bug.cgi?id=1334913
2016-07-07 12:33:09 +02:00
Thomas Haller c87e1ef525 contrib/rpm: fix %{snap} define to have snapshot before git-sha
In case, where both
  %global snapshot git20160606
  %global git_sha b769b4df
is set, they version number should be
  .git20160606.b769b4df
not
  .b769b4df.git20160606
2016-07-07 12:33:09 +02:00
Thomas Haller 24430e4b07 contrib/rpm: don't enable sanitizer for debug build
There are valid failures, for which sanitizer would kill
NetworkManager:

  audit[1380]: AVC avc:  denied  { setrlimit } for  pid=1380 comm="NetworkManager" scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:system_r:NetworkManager_t:s0 tclass=process permissive=0
  NetworkManager[1380]: ==1380==ERROR: AddressSanitizer setrlimit() failed 13

Disable sanitizer to make debug builds working again, at least for now.
2016-06-07 09:15:26 +02:00
Beniamino Galvani 01540cf1d3 build: add options to compile with address/undefined sanitizers
This adds two new options to the configure scripts to compile NM,
clients and libraries with the address and undefined-behavior
sanitizers available in recent GCC versions. Clang is not supported at
moment.
2016-06-03 22:19:38 +02:00
Thomas Haller 5dea2efd9e contrib/rpm: add Requires to exact wwan version for NetworkManager-bluetooth subpackage
rpmdiff complains:

  Subpackage NetworkManager-bluetooth on aarch64 x86_64 ppc64 ppc64le s390x
  consumes library libnm-wwan.so()(64bit) from subpackage NetworkManager-wwan
  but does not have explicit package version requirement.
  Please add Requires: NetworkManager-wwan = %{version}-%{release} to
  NetworkManager-bluetooth in the specfile to avoid the need to test
  interoperability between the various combinations of old and new subpackages.

And indeed, device plugins don't have a stable API/ABI, and requires
exact NetworkManager and wwan versions. This was already enforced implicitly,
because all device plugins require the same exact NetworkManager version.
2016-06-02 09:44:37 +02:00
Thomas Haller aae89ab8bb contrib: update REQUIRED_PACKAGES list
Needed to build contrib/rpm.
2016-05-31 16:54:47 +02:00
Thomas Haller 13ab20fe8c contrib/rpm: refactor specifying package version in spec file
Similar to what we do for RHEL and Fedora's spec file.
2016-05-06 15:54:19 +02:00
Thomas Haller a38aa2fdb2 contrib/rpm: make package "NetworkManager-dispatcher-routing-rules" as "BuildArch: noarch" 2016-05-05 19:43:32 +02:00
Thomas Haller a447942fc0 contrib/rpm: rename package "NetworkManager-config-routing-rules" to "NetworkManager-dispatcher-routing-rules" 2016-05-05 19:25:53 +02:00
Thomas Haller 781e9603ca contrib/rpm: split "10-ifcfg-rh-routes.sh" script to NetworkManager-config-routing-rules package
Like we do on RHEL. The package-split was originally necessary because
installing a pre-up dispatcher script would block activation (even if there
were no relevant route files.

Even if we have now the no-wait.d/ directory for dispatchers, still
split the package. It makes sense to have the routing-rules in a
separate RPM.

For contrib/rpm, we don't properly obsolete an older version of
NetworkManager package and thus the upgrade path will be broken.
2016-05-05 19:18:45 +02:00
Beniamino Galvani 7e5b0c94e6 contrib/fedora: add dependency on jansson 2016-04-18 21:50:36 +02:00
Lubomir Rintel 0fc0cc68fc man: move nmcli-examples to section 7
It really is not a configuration file and doesn't belong to section 5.
2016-04-05 14:37:51 +02:00
Thomas Haller 4be28b3916 contrib/rpm: fix logic in build.sh about specifying source
When the user neither specifies SOURCE or SOURCE_FROM_GIT,
we first want to detect a tarball in the current directory,
and as second fallback to SOURCE_FROM_GIT=1.

If either SOURCE or SOURCE_FROM_GIT is set, we want to do
that and not detect anything.

The logic was wrong.
2016-04-01 15:54:06 +02:00
Thomas Haller 6fb80e1060 contrib/rpm: improve build_clean.sh to explicitly set $SOURCE_FROM_GIT
Presiouvly, when there was a tarball file in the top git-tree, it would
have been choosen and no easy way to overwrite the decision to build
from a git-archive. Now you can safely build current HEAD by simply calling

  ./contrib/fedora/rpm/build_clean.sh -g

Contrary to the regular build which calls `make dist`, this doesn't
require a clean working copy and no need to purge it with git-clean.
2016-04-01 09:25:11 +02:00
Thomas Haller 3b6fc5cbda contrib/rpm: add comments to build.sh to list script arguments 2016-03-30 15:00:02 +02:00
Thomas Haller a348bda6ea contrib/rpm: fix obtaining SOURCE via git-archive
- when user provided a $SOURCE argument, do call abs_path on
  it. abs_path allows the user to provide relative paths in
  the original directory.

- don't call abs_path on "$GITDIR/NetworkManager-$VERSION".tar.xz
  abs_path is there to verify user input and it will abort the script
  if the file doesn't exist.

- when creating a temporary tarball via git-archive, put it
  into the output directory and not overwriting files in
  $GITDIR.

- fix abs_path to return an error code and let callers abort
  the script

- add a new parameter $SOURCE_FROM_GIT so that you can control
  whether git-archive is used. You can now specify either $SOURCE
  or $SOURCE_FROM_GIT. In case of absence of both, it tries to
  detect a tar file in the $GITDIR directory.

Fixes: 9e9ec1a3da
2016-03-30 14:50:55 +02:00
Lubomir Rintel 9e9ec1a3da contrib/rpm: allow building of a git archive
No need for a make dist.
2016-03-30 13:25:49 +02:00
Lubomir Rintel e3e0a49075 contrib/rpm: allow building w/o prebuilt documentation 2016-03-30 13:25:49 +02:00
Lubomir Rintel 6da97a8c48 contrib/rpm: with-udev-dir now has a sensible default 2016-03-14 16:32:15 +01:00
Lubomir Rintel df9ac197c0 contrib/rpm: macro cosmetics 2016-03-05 18:56:28 +01:00
Lubomir Rintel c0d7810271 contrib/rpm: include the valgrind suppression file in debuginfo package 2016-03-05 18:56:28 +01:00
Thomas Haller 6adf25c53c contrib/rpm: print dnf-install command at the end of build.sh 2016-02-26 14:36:49 +01:00
Thomas Haller 0685780566 contrib/rpm: add README, improve usage output and rename --no-build option to --no-dist 2016-02-17 11:44:09 +01:00
Thomas Haller 7ec5acdc66 travis: fix setting NMTST_DEBUG for travis-check.sh script 2016-02-12 16:54:40 +01:00
Thomas Haller ac97715688 contrib/rpm: create dnsmasq-shared.d configuration directory 2016-02-12 13:01:53 +01:00
Thomas Haller e58b3dac80 contrib/rpm: wrap long description lines
rpmlint warns description-line-too-long if the line exceeds 79 characters.
2016-02-04 18:04:43 +01:00
Thomas Haller 0661f66c40 contrib/rpm: minor cleanup 2016-02-04 17:59:05 +01:00
Thomas Haller 05b34e11d6 contrib/rpm: update comment in 00-server.conf 2016-02-03 16:25:19 +01:00
Thomas Haller b4d1e3eb7b contrib/rpm: remove unneeded chkconfig and systemd-sysv requirements 2016-02-03 16:19:02 +01:00
Thomas Haller 5344a3297b contrib/rpm: remove unused 10-ibft-plugin.conf file
Fixes: 6f0036151f
2016-02-03 15:57:58 +01:00
Thomas Haller 6490dc154c contrib/rpm: add rpm_version in spec file
and rename realversion to real_version to follow the pattern.
2016-02-03 15:47:28 +01:00
Thomas Haller 455b981215 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.
2016-02-03 15:42:19 +01:00
Thomas Haller 87dc14476b 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
2016-02-02 16:09:24 +01:00
Thomas Haller 3b01d25561 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.
2016-02-02 16:05:23 +01:00
Thomas Haller bb78d14467 contrib/rpm: add comment to NetworkManager.conf about debug logfiles 2016-01-27 14:11:24 +01:00
Lubomir Rintel 1408b8c0a2 travis: add coverity submission
Also, decouple the build from the test run; it looks better in the .yml file as
well as in the travis UI.
2016-01-22 22:12:43 +01:00
Thomas Haller 34050e9c0b travis: move build script to a separate script and improve debugging for failed tests 2016-01-22 11:06:09 +01:00
Thomas Haller bc7ad75d99 contrib/rpm: install pre-up dispatcher script "10-ifcfg-rh-routes.sh" as no-wait
The main reason to introduce the "no-wait.d" dispatcher directory was
"10-ifcfg-rh-routes.sh", which (as a pre-up script) delays activation.
We even extracted the script to a separate package on RHEL to avoid
delays by default.

Invoke the script via no-wait.d.
2016-01-08 14:27:18 +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
Jiří Klimeš acaf7cf641 nm-import-openvpn: import 'route' option
https://bugzilla.gnome.org/show_bug.cgi?id=753578
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=4eb5f3ad43cdc62c6d4d254731e24c90b87ba91a
2015-12-07 12:22:45 +01:00
Thomas Haller e01c17523a 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
2015-10-23 12:41:55 +02:00
Thomas Haller 804ec6fbcd contrib/rpm: remove dbus-glib dependancy
Only libnm-glib still requires dbus-glib.
2015-09-30 23:10:56 +02: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 8e6a839d93 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
2015-09-28 19:50:09 +02:00
Jiří Klimeš 2318c0de92 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
2015-09-22 12:50:55 +02:00
Lubomir Rintel de5d98197f contrib/rpm: sync from Fedora git 2015-09-03 17:48:04 +02:00
Beniamino Galvani 1999723241 nm-dispatcher: allow scripts to be marked as no-wait
When a script is a symbolic link to the 'no-wait.d' subdirectory, the
dispatcher now schedules it immediately and in parallel with other
no-wait scripts.

https://bugzilla.gnome.org/show_bug.cgi?id=746703
2015-08-25 15:27:18 +02:00
Jiří Klimeš 02cfeac668 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
2015-08-19 12:39:06 +02:00
Jiří Klimeš e655358d44 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
2015-08-19 12:23:04 +02:00
Jiří Klimeš bde1cd342e nm-import-openvpn: improve error checking 2015-08-19 12:23:04 +02:00
Jiří Klimeš a646870684 nm-import-openvpn: fix importing OpenVPN configuration with 'tls-client' 2015-08-19 10:58:29 +02:00
Dan Winship c699f8c32e contrib: add emacs config for hacking on NM
https://bugzilla.gnome.org/show_bug.cgi?id=753411
2015-08-11 13:42:26 -04:00
Thomas Haller c0138fa7e7 contrib/rpm: compile audit support but disable by default
The default SELinux policy on current RHEL and Fedora distributions
does not allow for NetworkManager to use audit. Hence, unless the user
changes the SELinux policy it will not work.

Disable auditing by default, but have it compiled so that the user can
enable it via "NetworkManager.conf".
2015-08-05 17:05:01 +02:00
Beniamino Galvani be49a59fb6 core: add audit support
Introduce some primitives to deliver messages about relevant
configuration changes to the Linux audit subsystem through libaudit
(if enabled at build time) and to the logging system.
2015-08-04 09:32:12 +02:00
Thomas Haller d6226bd987 libnm: add NMVpnPluginInfo class
NMVpnPluginInfo is little more then a wrapper around
the GKeyFile that describes the VPN plugin settings,
i.e. the name files under "/etc/NetworkManager/VPN/".

Add this class to make the VPN API more explicit. Clients
now can use NMVpnPluginInfo instead of concerning themselves
with loading the keyfile and the meaning of its properties.

Also add support for a new VPN plugins directory
"/usr/lib/NetworkManager/VPN", which should replace
"/etc/NetworkManager/VPN" in the future. But we have to
consider both locations for backward compatibility.

The content of the VPN directory is not user configuration,
hence it should not be under "/etc". See related bug 738853.
2015-07-29 22:34:35 +02:00
Thomas Haller 2a3a4eb16f config/rpm: use plain HTTP URI for connectivity checking
https://bugzilla.gnome.org/show_bug.cgi?id=747866
2015-07-16 16:44:49 +02:00
Dan Horák 97cf6e47dd contrib/rpm: WEXT depends on enabled wifi 2015-07-14 19:02:35 +02:00
Lubomir Rintel db44539912 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.
2015-07-09 17:56:20 +02:00
Jiří Klimeš 640eb8f284 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
2015-07-08 17:07:02 +02:00
Thomas Haller 6f0036151f settings: enable "ibft" plugin by default together with "ifcfg-rh"
Originally, ibft settings were handled by "ifcfg-rh" plugin. Later, we added
a separate "ibft" plugin and moved the functionality there.

The problem was that users quite possibly had a configuration like
  [main]
  plugins=ifcfg-rh
in their "NetworkManager.conf". That meant, after upgrade users would
no longer have ibft support.

We fixed that by installing "/etc/NetworkManager/conf.d/10-ibft-plugin.conf"
which was read after the main file and contained:
  [main]
  plugins+=ibft

We no longer want to install configuration snippets with our core packages to
/etc. Avoid the regression by changing the meaning of "ifcfg-rh". By enabling
"ifcfg-rh" you now implicitly enable "ibft" plugin as well. This can be
turned off via "no-ibft". And you can continue to enable "ibft" plugin
alone.
2015-07-02 16:01:20 +02:00
Thomas Haller 98dd29e4ae config: fix setting default configuration for 'main.plugins'
'main.plugins' is the only configuration options for which we
have a default value and which we always want to set.

This property has a compile time default and can be set via command line,
fix the logic to set the value.

The proper way is:

  - first set it (always) to the compile time default
  - then read the configuration files, which potentially modify
    the value.
  - finally, if set via command line, overwrite it because
    command line always wins.

Also comment-out the setting from our default file in
"contrib/fedora/rpm/NetworkManager.conf". We don't really need it to be
configured there, as we have a compile time default. Commenting it out
makes this clearer to the user.

Note that we cannot drop "10-ibft-plugin.conf" snippet from
NetworkManager package, because many users might have an old
"NetworkManager.conf" file with "plugin=ifcfg-rh".

This is a change in behavior if the user has no explicit
"plugins=ifcfg-rh" setting but followed by "plugins+=ibft".
2015-07-02 16:01:20 +02:00
Thomas Haller ffa70203fd contrib/rpm: update spec file to install configuration snippets in "/usr/lib/NetworkManager/conf.d"
Don't move "10-ibft-plugin.conf", because we need it to be
read *after* "NetworkManager.conf". Many users might have
an old "NetworkManager.conf" file that contains "plugin=ifcfg-rh".
2015-07-02 16:01:20 +02:00
Thomas Haller d783742b22 config: read configuration directory "/usr/lib/NetworkManager/conf.d"
This allows packages to install their configuration snippets to
"/usr/", which is a better place for system-provided configuration
files then "/etc".

"/usr/lib/NetworkManager/conf.d/" is read first, so that the values
in /etc have higher priority.

In general, we want to move system-provided configuration away from
/etc, so that a user can do a "factory-reset" by purging /etc.

https://bugzilla.gnome.org/show_bug.cgi?id=738853
2015-07-02 16:01:20 +02:00
Thomas Haller acef8c6a1b contrib/rpm: let NetworkManager package own '/etc/NetworkManager/' directory 2015-06-08 17:48:33 +02:00
Jiří Klimeš a5e43ab510 nm-import-openvpn: import 'float' OpenVPN option
https://bugzilla.gnome.org/show_bug.cgi?id=737108

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2015-05-28 12:04:58 +02:00
Jiří Klimeš 466515e953 contrib/scripts: fix importing 'remote' and 'remote-random' options for openvpn
see https://bugzilla.redhat.com/show_bug.cgi?id=1194643
2015-05-19 09:21:50 +02:00
Jiří Klimeš 29473f1bc4 contrib/scripts: nm-import-openconnect - script for importing OpenConnect VPN configs to NM 2015-05-19 09:21:50 +02:00
Jiří Klimeš db0cf1e7f6 contrib/scripts: nm-import-vpnc - script for importing Cisco VPN configs to NM 2015-05-19 09:21:50 +02:00
Jiří Klimeš 1a2798d1a4 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>
2015-05-19 09:21:50 +02:00
Beniamino Galvani db923366b2 contrib/rpm: remove avahi-autoipd dependency and files 2015-05-11 10:48:48 +02:00
Dan Winship 721e917cb6 wimax: drop WiMAX support (bgo #747846)
Even Fedora is no longer shipping the WiMAX SDK, so it's likely we'll
eventually accidentally break some of the code in src/devices/wimax/
(if we haven't already). Discussion on the list showed a consensus for
dropping support for WiMAX.

So, remove the SDK checks from configure.ac, remove the WiMAX device
plugin and associated manager support, and deprecate all the APIs.

For compatibility reasons, it is still possible to create and save
WiMAX connections, to toggle the software WiMAX rfkill state, and to
change the "WIMAX" log level, although none of these have any effect,
since no NMDeviceWimax will ever be created.

nmcli was only compiling in support for most WiMAX operations when NM
as a whole was built with WiMAX support, so that code has been removed
now as well. (It is still possible to use nmcli to create and edit
WiMAX connections, but those connections will never be activatable.)
2015-04-17 12:42:23 -04:00
Thomas Haller 36fc5cac83 contrib/rpm: add comment to NetworkManager.conf file
https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00036.html
2015-04-16 18:43:03 +02:00
Thomas Haller af060e7c22 contrib/fedora: update REQUIRED_PACKAGES file with perl-YAML package 2015-03-29 13:21:16 +02:00
Lubomir Rintel b3667afa22 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.
2015-03-20 19:09:01 +01:00
Thomas Haller 5439fbd77c 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
2015-01-30 22:20:13 +01:00
Thomas Haller 8eba28b9bd contrib/rpm: add 10-ibft-plugin.conf config file
Taken from rhel-7.1 package
2015-01-28 13:20:19 +01:00
Dan Winship 9d3e0cff9f contrib: fix NetworkManager.spec after the dispatcher script change 2015-01-27 16:45:27 -05:00
Dan Winship 8de1bec803 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.
2015-01-27 13:51:45 -05:00
Dan Winship f79d62692e 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/.
2015-01-12 09:53:24 -05:00
Dan Williams 5e892819fc contrib: remove dbus/dbus-glib requires from libnm sub-package
libnm doesn't use dbus-glib or dbus at all.
2015-01-09 17:12:01 -06:00
Dan Winship 20a56fa9a2 contrib: sync fedora/rpm/NetworkManager.spec
We're building the plugins on s390 these days
2015-01-09 11:30:50 -05:00
Dan Williams 3aede80152 contrib: fix team sub-package obsoletes
Team was split out between NM 0.9.10 and NM 1.0 after the other
sub-packages, so the existing obsoletes won't work for it (they
would cause all upgrades to install all sub-packages, instead
of replacing existing sub-packages without adding uninstalled
ones).  We only want to unconditionally add the team sub-package.
2014-12-22 10:29:09 -06:00
Thomas Haller 4882b09975 contrib/fedora: add file REQUIRED_PACKAGES listing fedora packages for development 2014-12-19 17:26:55 +01:00
Thomas Haller 2fc37ce895 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
2014-12-19 13:52:07 +01:00
Thomas Haller 6f343b866e 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'
2014-12-19 12:35:36 +01:00
Thomas Haller c5e998441c contrib/rpm: fix --srpm option of build_clean.sh
Forgot to export the $BUILDTYPE variable. Hence --srpm did not
work.
2014-12-19 12:35:36 +01:00
Dan Williams 471375a3e1 release: remove "nano" version
Now that NM is >= 1.0 there is no need for a "nano" version.
2014-12-12 15:06:39 -06: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
Lubomir Rintel 5f840abd7f contrib/rpm: Avoid unowned directories 2014-10-24 19:29:27 +02:00
Jiří Klimeš 5d66f91de8 contrib/rpm: do not override configuration files on updates (rh #1153901)
Rather leave modified configuration files untouched and save the new files
with .rpmnew suffix.

http://stackoverflow.com/questions/14511334/rpm-upgrade-handling-of-config-files

https://bugzilla.redhat.com/show_bug.cgi?id=1153901
2014-10-21 15:15:46 +02:00
Lubomir Rintel 479dd171ae contrib/rpm: Count all predecessors in revision number
The revision number of the RPM (as build by contrib/rpm) should
be increasing so that newer packages can be installed using
`yum install` and older packages can be downgraded using
`yum downgrade`.
By counting only --first-parent, the following example turns
out wrong. Note the duplicate revision numbers.

  -- A(100)----------------------------F(101)----G(102)
      \                               /
       B(101)----C(102)----D(103)----E(104)

Just count *all* parent commits
2014-10-20 12:38:00 +02:00
Lubomir Rintel 5d763a8375 contrib/rpm: Fix Fedora 19 build
Too old to have recent enough ModemManager.
2014-10-20 11:53:43 +02:00
Lubomir Rintel 1f631cd08d contrib/rpm: Don't exclude files that are not built
RPM still insist that they need to exist in order to be excluded.
2014-10-20 11:53:43 +02:00
Lubomir Rintel f1c9595311 bluez: re-add DUN support for Bluez5
This adds service discovery via SDP and RFCOMM tty management to
NetworkManager, as it was dropped from Bluez.

Based on work by Dan Williams <dcbw@redhat.com>.
The SDP discovery is based on code from Bluez project.
2014-10-13 14:27:33 +02:00
Thomas Haller 71c5e5dea1 contrib/nm-live-vm: install perl dependancy (YAML) in mock build
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-10 20:52:38 +02:00
Thomas Haller a64de150c3 contrib/rpm: detect ppp version based on installed package
Also fixes build failure if user had no /sbin/pppd in its $PATH.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 12:49:19 +02:00
Thomas Haller 20a746f68a contrib/rpm: fix --quick option of build_clean.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 11:02:46 +02:00
Lubomir Rintel 53b9504544 contrib/rpm: don't hardwire a single ppp version
Build against whatever is actually present.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-02 16:31:05 +02:00
Thomas Haller eabe7d856c auth: rework polkit autorization to use DBUS interface directly
This makes NetworkManager independent of <polkit/polkit.h>
development headers and libpolkit-gobject-1.so library.
Instead communicate directly with polkit using its DBUS
interface.

PolicyKit support is now always compiled in. You can control
polkit authorization with the configuration option
  [main]
  auth-polkit=yes|no

If the configure option is omitted, a build time default
value is used. This default value can be set with the
configure option --enable-polkit.

This commit adds a new class NMAuthManager that reimplements the
relevant DBUS client parts. It takes source code from the polkit
library.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:51:11 +02:00
Lubomir Rintel b769c059f3 contrib/rpm: libnm-vpn is no more
Removed in: [280b1e506] libnm: merge libnm-vpn into libnm

https://bugzilla.gnome.org/show_bug.cgi?id=736954
2014-09-19 08:35:21 -04:00
Jiří Klimeš aee8eb837b contrib/rpm: use HTTPS for connectivity check URL (rh #1135777)
https://bugzilla.redhat.com/show_bug.cgi?id=1135777
2014-09-05 23:24:08 +02:00
Jiří Klimeš bc18992dd8 contrib/rpm: add BuildRequires for perl YAML module in spec
The module is used for building man pages by generate-plugin-docs.pl script.
1c2174a libnm-util: generate-plugin-docs.pl script for extracting plugin docs
2014-08-29 14:38:12 +02:00
Thomas Haller 68653de291 contrib/rpm: fix --quick option of build_clean.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-14 00:17:07 +02:00
Dan Winship 058915a9ae contrib: update NetworkManager.spec for libnm
Add libnm to NetworkManager.spec, and try to update the descriptions
of NetworkManager-devel, NetworkManager-glib, and
NetworkManager-glib-devel to make sense in the libnm world...
2014-08-01 14:34:05 -04:00
Dan Winship 3d25d70461 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/.
2014-07-30 15:56:19 -04:00
Dan Williams 25dac5760b contrib/rpm: fix up sub-package dependencies
There are three fixes:

1) the config packages shouldn't require the main NetworkManager
package.  We explicitly make NetworkManager-glib not
depend on NM itself to ensure that clients can link to it (and thus
have an RPM dependency on -glib) without pulling in NetworkManager
itself.  The same should hold true for the config packages, since
consumers of NetworkManager may want to pull them in, but not
necessarily pull NetworkManager in.

For example, GNOME Shell wants to make use of NetworkManager's
connectivity detection *if NM is available*, and this requires
pulling in NM-config-connectivity-fedora, but that shouldn't
pull in NetworkManager itself.

Similarly, we had a problem with RHEL7 making sure that
NM-config-server was installed by default on Server variants but
not on other variants; removing the dependency from the -config
subpackage was the cleanest way to fix that.

Furthermore, nothing in the config sub-packages actually
requires NetworkManager anyway since they are simply config files.

2) nmtui doesn't care what architecture the running NM is since
it communicates solely over D-Bus.  So skip the %{?_isa}, just
like we do for other clients (nm-applet, GNOME Shell, etc)

3) Requiring NetworkManager.%{?_isa} from the -devel package
has problems with multilib (see rh #1112367).  This is an issue
if you install a 32-bit development environment and try to build
something that uses NetworkManager.  Since the -devel package
requires the main package, you can end up either having *both*
NetworkManager.i686 and NetworkManager.x86_64 installed, or you
end up having NetworkManager.i686 replace NetworkManager.x86_64.
Neither one is good. So remove the %{?_isa} bit.
2014-07-30 09:35:02 -05:00
Elad Alfassa 9060e1ab1a contrib/rpm: set connectivity interval in 20-connectivity-fedora.conf (rh #1123772)
Without the interval, connectivity checking doesn't actually happen.

https://bugzilla.redhat.com/show_bug.cgi?id=1123772
2014-07-30 08:40:59 -05:00
Thomas Haller 40a3e20006 contrib/rpm: add --quick argument to build_clean.sh script
Before, build_clean.sh always required building all NetworkManager
and doing another `make distcheck` before calling rpmbuild.

That is still a good idea, to ensure that we get a proper build.
For some quick testing however, lets speed this up with a new
--dist argument that only calls `make dist`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 19:59:08 +02:00
Thomas Haller d2be2ac78d contrib/rpm: update spec file to make ppp_version dependent on fedora version
Fedora 21 (rawhide) needs ppp version 2.4.6.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 13:44:44 +02:00
Thomas Haller 3cfd8b8eec contrib/rpm: add new package NetworkManager-config-connectivity-fedora
Provides config file 20-connectivity-fedora.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 12:25:51 +02:00
Thomas Haller 031142000a contrib/nm-live-vm: install required packages readline, gobject-introspection, and pygobject3
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 04591cfa2e contrib/nm-live-vm: fix run.sh script to into script directory
run.sh refers to the image file via relative path.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller c274725dc3 contrib/nm-live-vm: start the VM with less memory (1024 mb)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 6a5c05e61a contrib/nm-live-vm: install wget and setup bashrc and git
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller acfb0b1bbf contrib/nm-live-vm: enable option main.debug for NM in VM
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller cd7c97eb1d contrib/nm-live-vm: write /etc/fstab
Everytime you call mock again, the fstab file will be reset.
So, we have to write it shortly before creating the image.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 0178d73699 contrib/nm-live-vm: disable rate limiting in the journal of the VM
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 0689efc768 contrib/nm-live-vm: don't remove the temporary directory with the extracted VM image
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller fe267b0fd2 contrib/nm-live-vm: enable ssh server and add port forward from localhost:10022
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 78f94726a7 contrib/nm-live-vm: share a directory with the live-vm
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller fbc9c41e96 contrib/nm-live-vm: include the NetworkManager source in the live-mv file for debugging
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller f2878b7633 contrib/nm-live-vm: compile live-vm build without compiler optimization
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš ef052ead88 contrib/nm-live-vm: add dnsmasq to the VM 2014-06-30 17:42:09 +02:00
Jiří Klimeš 84b3e924df contrib/nm-live-vm: fix build - libndp-devel is now required 2014-06-30 17:42:09 +02:00
Jiří Klimeš f20f706d34 contrib/nm-live-vm: also build nmtui 2014-06-30 17:42:09 +02:00
Jiří Klimeš dc872b7e52 contrib/nm-live-vm: add rootfstype=ramfs kernel parameter to run.sh
Kernel changed default filesystem for roots from ramfs to tmpfs.
See http://lwn.net/Articles/559176/ for more information.
The change caused our initramfs to be mounted with size= parameter that equals
to the actual size of unpacked initramfs. That's why mounted / was full and no
space was available (without manual remounting: mount -o remount,size=100% /).

So we explicitly require usage of ramfs to have all RAM of the virtual machine
available for /.

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš 26626c75c3 contrib/nm-live-vm: put qemu network-related options into a variable
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš 9b3922390c contrib/nm-live-vm: update scripts to make VM based on Fedora 20
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller e9ed87a920 contrib/nm-live-vm: adjust build script to enable DEBUG logging
Enable more logging when starting NM.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller 7b43e0526e contrib/nm-live-vm: change scripts to be run by unprevileged user
The user must still be member of the 'mock' group though.

Also, hack something, that the current git repositoy will be reused, so
that we don't have to fetch the entire repositoy from upstream.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš b0f9302e1f contrib/nm-live-vm: add 'teamd' and 'libteam' packages to the VM for teaming to work 2014-06-30 17:42:09 +02:00
Jiří Klimeš b22b063f97 contrib/nm-live-vm: add some debugging tools and useful utilities 2014-06-30 17:42:09 +02:00
Jiří Klimeš c976724571 contrib/nm-live-vm: correct and simplify paths for configure 2014-06-30 17:42:08 +02:00
Jiří Klimeš ebc1183542 contrib/nm-live-vm: documentation/man pages now depend on '--enable-gtk-doc' 2014-06-30 17:42:08 +02:00
Jiří Klimeš f1c0a1a85b contrib/nm-live-vm: put the archive name explicitly inside the bundled script
Getting the archive name from the bundled script file name is fragile.
2014-06-30 17:42:08 +02:00
Jiří Klimeš 514d594e9d contrib/nm-live-vm: add 'gdb' to the VM
It is very helful for testing the size doesn't hurt (~ 2 MB)
2014-06-30 17:42:08 +02:00
Jiří Klimeš 39fdae3799 contrib/nm-live-vm: set of scripts for building a live initramfs for NM testing
The scripts use Fedora to build a Fedora 18 (i386) live image, and pack
it into a single self-extracting script, that can be easily distributed.

$ sudo ./build [-n name] [-b branch/commit]
will create name-bundle.sh with NM built of a specified NM branch(commit).
(defaults are: name="nm-live-vm"; branch="master")

Resulting nm-live-vm-bundle.sh can be run with almost any distro.
The only requirement is qemu-kvm (and VNC (tigervnc) on RHEL).
2014-06-30 17:42:08 +02:00
Thomas Haller 38a83e15a2 team: make team support a plugin
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller adb3e37c74 contrib/rpm: cleanup of NetworkManager.spec by adding %{epoch_version} and %{git_sha_version}
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 22:11:57 +02:00
Thomas Haller ca85ecd145 contrib/rpm: fix typo in spec file (wrong option --enable-teamdctl)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-19 12:49:14 +02:00
Thomas Haller bf0b08ad55 contrib/rpm: improve usage output of build_clean.sh script
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-18 10:49:51 +02:00
Dan Williams 7c256586da contrib/rpm: misc specfile updates
Unify the obsoletes so they don't have to be changed every time.

Clarify the WWAN package description, since it really applies to
2G/3G/4G devices, not just 3G.

Also sync the glib and dbus-glib required versions with actual
NetworkManager requirements from configure.ac.
2014-06-09 10:45:29 -05:00
Jiří Klimeš 3dccef6631 contrib/rpm: update NetworkManager description in spec file
Text by dcbw.
2014-06-09 11:07:00 +02:00
Thomas Haller fb88ec99f1 build: create dispatcher directories pre-down.d and pre-up.d
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-07 01:17:16 +02:00
Dan Williams 4cc13befd3 dispatcher: rename executable to 'nm-dispatcher' 2014-06-06 13:43:45 -05:00
Thomas Haller 69dc3f96c5 contrib/build: require readline library for nmcli in NetworkManager.spec
This is needed since commit 13b10607d4.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-04 12:05:03 +02:00
Thomas Haller 070e19dc31 contrib/build: cleanup build.sh script and improve build_clean.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-31 19:27:42 +02:00
Thomas Haller 7857043195 contrib/build: cleanup build.sh script by adding write_changelog() function
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-31 19:27:42 +02:00
Thomas Haller dbed9e5378 contrib/build: remove external NMTUI source from build.sh
nmtui is long part of the NM main source. Remove the code from the build.sh
script to add 'nmtui' from an external tarball.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-31 19:27:38 +02:00
Thomas Haller c98b3fcd52 contrib/build: fix spec file after creating network-online.target.wants link in Makefile
Fix NetworkManager.spec file after changing `make install` in commit
afd30f5f3b.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-31 14:55:52 +02:00
Jiří Klimeš 5aefa120f8 contrib/rpm: own some missing directories (rh #1099789)
https://bugzilla.redhat.com/show_bug.cgi?id=1099789

Based on hint from jpopelka@redhat.com
2014-05-21 16:23:23 +02:00
Thomas Haller 0d09472e45 contrib/rpm: adjust required bluez version in SPEC file for NetworkManager-bluetooth plugin
rhel-7.0 comes with bluez4, not bluez5

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-20 13:58:49 +02:00
Dan Williams 93fb403e10 contrib/rpm: clean up dependencies and plugins in NetworkManager.spec
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 18:55:59 +02:00
Tore Anderson c2e99b181f contrib/rpm: force POSIX changelog date locale
Ensure the date in the generated changelog entry is in the POSIX locale
format. Otherwise rpmbuild might fail with "bad date in %changelog" due
to it not liking localised date formats.

https://mail.gnome.org/archives/networkmanager-list/2014-May/msg00034.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 14:51:48 +02:00
Thomas Haller 66164c480d contrib/rpm: update build_clean.sh script to work with older version of git
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 15:19:24 +02:00
Thomas Haller 08e8b3bd13 contrib/rpm: update spec file adding new wifi plugin NetworkManager-wifi
Commit a544aa374e extracts the wifi device
into a shared library. Update the (currently broken) default spec file to
build the new package NetworkManager-wifi.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 14:31:57 +02:00
Thomas Haller a2430f01d6 contrib/rpm: update spec file to exclude disabled plugin files
When plugins are disabled (which is configurable), the additional files
must be excluded. Otherwise rpmbuild fails with:
  Installed (but unpackaged) file(s) found:

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 14:31:02 +02:00
Thomas Haller 4e8a91e6f8 Revert "contrib: fix "Illegal sequence '..' in Fedora specfile Release"
This reverts commit 8f44bf047f.

This spec file is not intended to be passed directly to rpmbuild,
because it contains placeholders that are substituted by the build.sh
script.

As such, the version we want to get is
  NetworkManager-0.9.9.1-7922.66eb52b53d.fc20.src.rpm
instead of
  NetworkManager-0.9.9.1-792266eb52b53d.fc20.src.rpm

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 13:00:27 +02:00
poma 8f44bf047f contrib: fix "Illegal sequence '..' in Fedora specfile Release
$ rpmbuild -bp NetworkManager.spec
error: line 47: Illegal sequence ".." in: Release: 10.git20140508..429023b.fc21

Signed-off-by: poma <pomidorabelisima@gmail.com>
2014-05-09 11:56:30 -05:00
Thomas Haller fb8a5f7ac9 contrib/rpm: update spec file to explicitly --disable-gtk-doc
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:37 +02:00
Thomas Haller b322642a03 contrib/rpm: add script build_clean.sh to create clean RPM files 2014-05-07 18:16:36 +02:00
Thomas Haller 886366d0fd contrib/rpm: update spec file after renaming NM plugins
Rename NetworkManager-atm to NetworkManager-adsl
and NetworkManager-bt to NetworkManager-bluetooth.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:36 +02:00
Thomas Haller f9229a33c7 contrib/rpm: modify spec file to create packages for NM plugins
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:36 +02:00
Thomas Haller b057d5179e contrib/rpm: build.sh uses the number of git commits as RELEASE_VERSION
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:36 +02:00
Thomas Haller a9ed313956 contrib/rpm: fix release version in rpm change log
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:36 +02:00
Thomas Haller 6db1d68e3f contrib/rpm: update NetworkManager.spec
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 18:16:13 +02:00
Thomas Haller 8b6966bfe7 contrib/rpm: fix spec file for fc20
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 17:14:36 +02:00
Thomas Haller 8871aad554 contrib/rpm: update spec file to build nmtui from in-tree source
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 17:14:36 +02:00
Thomas Haller cc45fe0a7e contrib/rpm: add spec file and script to build a RPM package
This one spec file is intended to build packages for F18, F19, F20, and
rhel-7.0.

The build script can be tweaked by setting environment variables, but it
is supposed to choose the right default values on it's own.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-07 17:14:36 +02:00