Commit graph

10590 commits

Author SHA1 Message Date
Thomas Haller
1594ea0971 contrib/rh-utils: improve bzutil.py
- refactor handling of configuration values (supports environment variables
  to override configuration values and accepts missing config file)
- add different modes how to list and group the output
- add different levels of verbosity
- add --rh-search and --rh-search-since flag

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
9036095c8a contrib/jenkins: improve trigger_build.sh script and add RPM parameter to jenkins
Configure jenkins project to accept a boolean build parameter "RPM" to
control whether to build the RPM packages.

Also, adjust the trigger_build.sh script, to support this parameter and
accept command line arguments.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
dc7c8892bc contrib/bkr: add bkr.py script
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
36d086af43 contrib: move/rename files
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
3720dded9b contrib/jenkins: log timestamp in jenkins build script
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
05347aaba3 contrib: add build script used on the jenkins installation (current version)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
b83261f049 contrib: check that the commit is pushed upstream in trigger_build.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
5a01321aaf contrib: add script trigger_build.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
8498393266 contrib: fetch cf_fixed_in field from bugzilla in bzutil.py
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
289da6800b contrib: bugfix and improve matching of bzutil.py
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
c6b5a33ef4 contrib: add fetching data from bugzilla to bzutil.py
This is heavily borrowed from
http://git.app.eng.bos.redhat.com/rcm/dist-git-utils.git/tree/src/gitbz

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
b0eede287e contrib: refactor bzutil to extract commit parsing into a separate class
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
999c570912 contrib: initial version bgz_util.py script
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
2358aeacb0 contrib/makerepo: add default gitignore pattern to makerepo.gitignore
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
3c7675af14 contrib/makerepo: detects RELEASE_BASE_COMMIT or NetworkManager-openvpn
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
fd5365c4a9 contrib/makerepo: accepts the RELEASE_BASE_COMMIT as environment variable (only detect as fallback)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
2fbca34dbf contrib/makerepo: now works with NetworkManager-openvpn package
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
2ce4c32195 contrib/makerepo: bases branch on top of commit which created the source tarball
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
cae868f689 contrib/makerepo: check that reapplying patch succeeded in makerepo.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
0cadf0ad44 contrib/makerepo: fix portability issues of makerepo.sh
makerepo.sh failed on RHEL6, because
- realpath was not available
- git-config did not understand the --local option

Fix these issues.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
665a539f72 contrib/makerepo: fix git-add command invocation in makerepo.sh
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
879810f9d3 contrib/makerepo: takes makerepo.gitignore from .git/
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
1bb8cc8d05 contrib/makerepo: extend makerepo.sh to support libnl3 package
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
7a9a9d84c5 contrib/makerepo: configure git-notes in makerepo.sh and fetch from origin
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
2119432cdd contrib/makerepo: update makerepo.sh to better detect rhpkg/fedpkg
Also, allow makerepo.sh not to be in the root directory of the
dist-git checkout. Instead, your current working directory
must now be inside the git working copy

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
ad848122cf contrib/makerepo: update makerepo.sh to detect NetworkManager source directory
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Thomas Haller
d060be7f07 contrib/makerepo: add makerepo.sh script
This script can be used when backporting patches in dist-git for
Fedora and RHEL. Try `./makerepo.sh -h`

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:19 +02:00
Dan Williams
e80d03b5fa merge: fix DHCP 'expire' state handling (rh #1139326) (bgo #737225) 2014-10-02 15:03:00 -05:00
Dan Williams
90a77565d4 dhcp: treat lease expiry as failure (rh #1139326)
Lease expiry means that the DHCP configuration is no longer valid, and
that all attempts to renew/rebind the lease have failed.  The IP config
needs to be removed.  NetworkManager also sets prefered/valid lifetimes
on addresses, so the kernel will remove them when the lease expires
anyway.  That causes removal of the default route, if the default route
was through the device whose config has now expired.

DHCP clients will typically move to the 'renew' or 'rebind' states when
nearing lease expiry, then if no answer is received move to the 'expire'
state.  Eventually they move to the 'fail' state when all attempts to
contact the server have failed.

Previously, since NM ignored the 'expire' DHCP state it would not clear
out the DHCP IP4 config immediately when the lease expired, instead
waiting for the DHCP client to move to the 'fail' state.  But if the
DHCP server appeared between the 'expire' and 'fail' states, NM would
not notice and the device's NMIP4Config would not change, and thus the
Policy would not get the "ip4-config-changed" signal to re-add the
default route that the kernel had previously removed due to the valid
lifetime reaching zero when the lease expired.

https://bugzilla.redhat.com/show_bug.cgi?id=1139326
2014-10-02 15:02:44 -05:00
Dan Williams
acee2eb9e4 dhcp: fail the device if DHCP fails after having succeeded earlier (rh #1139326)
If DHCP fails to renew or rebind a lease, fail the device since the
IP config is no longer valid.  Commit e2b7c482 was actually wrong for
dhcp[4|6]_fail(), since (ip_state == IP_FAIL) will never be true if
DHCP has ever been started, as IP_FAIL is only set from
nm_device_activate_ip[4|6]_config_timeout(), which obviously will not
be called in DHCP code paths if DHCP has previously succeeded.
2014-10-02 15:02:43 -05:00
Dan Winship
e2f5343b08 tui: fix an NmtMacEntry bug introduced when changing hwaddrs to strings
https://bugzilla.redhat.com/show_bug.cgi?id=1148921
2014-10-02 13:18:26 -04:00
Thomas Haller
90b5b4d892 merge branch 'th/rh1061702_bond_options'
Add bonding option 'lacp_rate'.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-02 16:38:21 +02:00
Thomas Haller
b662fbf450 cli: support new bond option 'lacp_rate'
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-02 16:36:11 +02:00
Thomas Haller
47555449fa libnm: add bonding option "lacp_rate" to NMSettingBond
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-02 16:36:03 +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
ca2145bef2 core: minor fix in nm_utils_kill_child_sync() having side-effects in MIN() macro (again)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-02 11:27:22 +02:00
Thomas Haller
1e4dd48698 core: minor fix in nm_utils_kill_child_sync() having side-effects in MIN() macro
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-01 16:29:21 +02:00
Thomas Haller
aadae3256e cli: fix NetworkManager.pot after renmaing network-manager.[ch] to general.[ch]
Fixes: f585085907
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-01 14:34:56 +02:00
Jiří Klimeš
7e67fd2b24 libnm: return errors in nm_client_networking_set_enabled()
and do not print an error in the library. The caller can decide what to do
on an error.
2014-10-01 11:53:07 +02:00
Jiří Klimeš
8919a8572a cli: strip errors from D-Bus before presenting to a user 2014-10-01 11:53:07 +02:00
Jiří Klimeš
f585085907 cli: rename network-manager.[ch] to general.[ch] 2014-10-01 11:53:07 +02:00
Jiří Klimeš
cf72286421 libnm: fix argument type passed to RequestScan() D-Bus call
GLib-ERROR **: g_variant_new: expected GVariant of type `a{sv}' but received value has type `aa{sv}'
2014-10-01 11:53:07 +02:00
Michael Biebl
8f6317f88a build: support building against libsystemd >= 209 library
In systemd v209, the various libraries were merged into a single
libsystemd library [1].
Add support for building against this new library and fall back to the
old library names if not found.

[1] http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
2014-09-30 12:34:24 -05:00
Dan Winship
94c3f1f70f devices: fix default ethernet connection code
Creation of default wired connections got broken by an incomplete
rebase of dcbw/internal-device-factories after danw/libnm-props
landed.

https://bugzilla.gnome.org/show_bug.cgi?id=737273
2014-09-30 11:07:25 -04:00
Jiří Klimeš
687f319201 libnm: g_variant_new() for strings does not allow NULLs
So pass "" instead of NULL.

GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed
2014-09-30 14:13:49 +02:00
Thomas Haller
7a7075b392 core/dbus: disable verbose logging when registering object to private socket
This creates a large amount of debug logging, that is not generally useful.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-30 12:02:15 +02:00
Thomas Haller
0218f055b0 core/dbus: debug log unix file descriptor when accpeting private dbus connection
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-30 12:02:15 +02:00
Thomas Haller
31daa2cfbd core: fix assertion when comparing missing hwaddr while searching connection for device
A device (e.g. of type tun) might not have a hwaddr. Avoid the assertion
in nm_utils_hwaddr_matches().

Backtrace:

    #0  0x00007fd0920444e9 in g_logv (log_domain=0x5a5be3 "libnm", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff2551e590) at gmessages.c:989
    #1  0x00007fd09204463f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025
    #2  0x0000000000555d31 in nm_utils_hwaddr_matches (hwaddr1=0x7fff2551e6a0, hwaddr1_len=6, hwaddr2=0x0, hwaddr2_len=-1) at ../libnm-core/nm-utils.c:2414
    #3  0x000000000049e7a0 in have_connection_for_device (self=0x7fd084008710, device=0x168e5c0) at settings/nm-settings.c:1513
    #4  0x000000000049e23d in nm_settings_device_added (self=0x7fd084008710, device=0x168e5c0) at settings/nm-settings.c:1599
    #5  0x00000000004e6447 in add_device (self=0x1654150, device=0x168e5c0, try_assume=1) at nm-manager.c:1840
    #6  0x00000000004e8fb6 in platform_link_added (self=0x1654150, ifindex=6, plink=0x165c328, reason=NM_PLATFORM_REASON_INTERNAL) at nm-manager.c:2163
    #7  0x00000000004e3252 in platform_link_cb (platform=0x15b1870, ifindex=6, plink=0x165c328, change_type=NM_PLATFORM_SIGNAL_ADDED, reason=NM_PLATFORM_REASON_INTERNAL, user_data=0x1654150) at nm-manager.c:2178
    #8  0x000000381dc05d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
    #9  0x000000381dc056bc in ffi_call (cif=cif@entry=0x7fff2551ed00, fn=0x4e31e0 <platform_link_cb>, rvalue=0x7fff2551ec70, avalue=avalue@entry=0x7fff2551ebf0) at ../src/x86/ffi64.c:522
    #10 0x00007fd092331ad8 in g_cclosure_marshal_generic (closure=0x1607710, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
    #11 0x00007fd092331298 in g_closure_invoke (closure=0x1607710, return_value=return_value@entry=0x0, n_param_values=5, param_values=param_values@entry=0x7fff2551ef00, invocation_hint=invocation_hint@entry=0x7fff2551eea0)
        at gclosure.c:777
    #12 0x00007fd09234335d in signal_emit_unlocked_R (node=node@entry=0x15b03a0, detail=detail@entry=0, instance=instance@entry=0x15b1870, emission_return=emission_return@entry=0x0,
        instance_and_params=instance_and_params@entry=0x7fff2551ef00) at gsignal.c:3586
    #13 0x00007fd09234b0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff2551f0e0) at gsignal.c:3330
    #14 0x00007fd09234b3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386
    #15 0x000000000048353d in nm_platform_query_devices () at platform/nm-platform.c:345
    #16 0x00000000004e12d2 in nm_manager_start (self=0x1654150) at nm-manager.c:4170
    #17 0x000000000044349a in main (argc=1, argv=0x7fff2551f938) at main.c:661

Fixes: b019348fdd
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-30 12:02:15 +02:00
Thomas Haller
d8541d17be core/dbus: minor refactoring not to clone the string tag
Since we already intenalize the @tag to a GQuark, just use
the constant string, instead of duplicating the string.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-30 11:13:26 +02:00
Thomas Haller
4cc3c6ab71 auth: merge branch 'th/bgo734146_polkit'
Implement polkit requests by directly using the DBUS interface.
This makes NetworkManager independent from libpolkit-gobject-1 library.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:53:27 +02:00