Hello community, here is the log from the commit of package wicked for openSUSE:Factory checked in at 2014-08-07 08:08:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wicked (Old) and /work/SRC/openSUSE:Factory/.wicked.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "wicked" Changes: -------- --- /work/SRC/openSUSE:Factory/wicked/wicked.changes 2014-08-05 10:24:25.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.wicked.new/wicked.changes 2014-08-07 08:08:21.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Aug 6 18:06:58 UTC 2014 - kmroz@suse.com + +- version 0.6.1 +- nanny: Do not call link monitor on enable() (bnc#884012, bnc#890643) +- bridge,bond: Add only device-ready ports/slaves +- ifup,ifdown,ifreload: correct command status display messages +- fsm: Add new, free, clone functions for ifworker arrays +- client-state: Allow printing empty origin and UUID (bnc#890084) + +------------------------------------------------------------------- Old: ---- wicked-0.6.0.tar.bz2 New: ---- wicked-0.6.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wicked.spec ++++++ --- /var/tmp/diff_new_pack.v5zJh2/_old 2014-08-07 08:08:22.000000000 +0200 +++ /var/tmp/diff_new_pack.v5zJh2/_new 2014-08-07 08:08:22.000000000 +0200 @@ -18,7 +18,7 @@ %define release_prefix %{?snapshot:%{snapshot}}%{!?snapshot:0} Name: wicked -Version: 0.6.0 +Version: 0.6.1 Release: %{release_prefix}.0.0 Summary: Network configuration infrastructure License: GPL-2.0 ++++++ wicked-0.6.0.tar.bz2 -> wicked-0.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/ChangeLog new/wicked-0.6.1/ChangeLog --- old/wicked-0.6.0/ChangeLog 2014-08-01 15:02:01.000000000 +0200 +++ new/wicked-0.6.1/ChangeLog 2014-08-06 20:15:15.000000000 +0200 @@ -1,3 +1,51 @@ +commit 44d951dd7f831f04f5e3552d4dd5ad85f249cd2e +Author: Karol Mroz <kmroz@suse.de> +Date: Wed Aug 6 20:10:20 2014 +0200 + + version 0.6.1 + +commit 0b3c96ec25c305e7e455ab4cc3080cf90ba2c296 +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Wed Aug 6 12:04:24 2014 +0200 + + nanny: Do not call link monitor on enable() (bnc#884012, bnc#890643) + +commit 35faea99a7a79658b1190825c06890905523d5ed +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Tue Aug 5 19:38:15 2014 +0200 + + bridge,bond: Add only device-ready ports/slaves + +commit bf4d9e9ad8f24c707be68bda610222bd8ebe0733 +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Tue Aug 5 13:33:09 2014 +0200 + + ifup,ifreload,ifdown: Two parameters for status display functions + +commit 3e5babe75bc5a29f0eb0b3d693279324c42d9aea +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Tue Aug 5 13:32:32 2014 +0200 + + ifup: Marked array clone for monitor + +commit 24b414e77111d025405e81c3a8f2934ac709980c +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Tue Aug 5 13:30:07 2014 +0200 + + fsm: Add new, free, clone functions for ifworker arrays + +commit e1635c007dfa3f9f86ece5313a86e5a697828cd1 +Author: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de> +Date: Tue Aug 5 13:29:14 2014 +0200 + + client-state: Allow printing empty origin and UUID (bnc#890084) + +commit 759075aa7513aea31c2d8ab73e94880c0f7225ea +Author: Marius Tomaschewski <mt@suse.de> +Date: Fri Aug 1 16:35:17 2014 +0200 + + doc: updated release mini howto + commit a2af3aa6d09b79793de95fdb786387b42dd69825 Author: Marius Tomaschewski <mt@suse.de> Date: Fri Aug 1 14:50:41 2014 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/VERSION new/wicked-0.6.1/VERSION --- old/wicked-0.6.0/VERSION 2014-08-01 15:00:25.000000000 +0200 +++ new/wicked-0.6.1/VERSION 2014-08-06 20:07:33.000000000 +0200 @@ -1 +1 @@ -0.6.0 +0.6.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/aclocal.m4 new/wicked-0.6.1/aclocal.m4 --- old/wicked-0.6.0/aclocal.m4 2014-08-01 15:00:51.000000000 +0200 +++ new/wicked-0.6.1/aclocal.m4 2014-08-06 20:14:25.000000000 +0200 @@ -1326,7 +1326,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1340,7 +1340,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1359,7 +1362,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/client/ifdown.c new/wicked-0.6.1/client/ifdown.c --- old/wicked-0.6.0/client/ifdown.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/client/ifdown.c 2014-08-06 19:57:55.000000000 +0200 @@ -118,6 +118,7 @@ ni_ifmatcher_t ifmatch; ni_ifmarker_t ifmarker; ni_ifworker_array_t ifmarked; + ni_string_array_t ifnames = NI_STRING_ARRAY_INIT; unsigned int nmarked, max_state = NI_FSM_STATE_DEVICE_DOWN; unsigned int timeout = NI_IFWORKER_DEFAULT_TIMEOUT; ni_stringbuf_t sb = NI_STRINGBUF_INIT_DYNAMIC; @@ -233,6 +234,15 @@ ifmatch.name = argv[optind++]; ifmatch.ifdown = TRUE; ni_fsm_get_matching_workers(fsm, &ifmatch, &ifmarked); + + if (ni_string_eq(ifmatch.name, "all") || + ni_string_empty(ifmatch.name)) { + ni_string_array_destroy(&ifnames); + break; + } + + if (ni_string_array_index(&ifnames, ifmatch.name) == -1) + ni_string_array_append(&ifnames, ifmatch.name); } /* Mark and start selected workers */ @@ -253,9 +263,10 @@ if (ni_fsm_schedule(fsm) != 0) ni_fsm_mainloop(fsm); - status = ni_ifstatus_shutdown_result(fsm, &ifmarked); + status = ni_ifstatus_shutdown_result(fsm, &ifnames, &ifmarked); } + ni_string_array_destroy(&ifnames); ni_ifworker_array_destroy(&ifmarked); return status; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/client/ifreload.c new/wicked-0.6.1/client/ifreload.c --- old/wicked-0.6.0/client/ifreload.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/client/ifreload.c 2014-08-06 19:57:55.000000000 +0200 @@ -230,7 +230,7 @@ break; } - if (ni_string_array_index(&ifnames, ifmatch.name) == -1) + if (ni_string_array_index(&ifnames, ifmatch.name) < 0) ni_string_array_append(&ifnames, ifmatch.name); } @@ -310,7 +310,7 @@ if (ni_fsm_schedule(fsm) != 0) ni_fsm_mainloop(fsm); - status = ni_ifstatus_shutdown_result(fsm, &down_marked); + status = ni_ifstatus_shutdown_result(fsm, &ifnames, &down_marked); } } else { @@ -330,7 +330,8 @@ if (ni_fsm_schedule(fsm) != 0) ni_fsm_mainloop(fsm); - status = ni_ifstatus_display_result(fsm, &ifnames, opt_transient); + status = ni_ifstatus_display_result(fsm, &ifnames, &up_marked, + opt_transient); /* Do not report any transient errors to systemd (e.g. dhcp * or whatever not ready in time) -- returning an error may @@ -532,7 +533,7 @@ break; } - if (ni_string_array_index(&ifnames, ifmatch.name) == -1) + if (ni_string_array_index(&ifnames, ifmatch.name) < 0) ni_string_array_append(&ifnames, ifmatch.name); } @@ -556,7 +557,6 @@ } /* Remember all changed devices */ - /* Remember all changed devices */ if (ni_ifcheck_worker_config_exists(w) && !ni_string_eq_nocase(w->control.mode, "off")) { ni_ifworker_array_append(&up_marked, w); @@ -610,7 +610,7 @@ if (ni_fsm_schedule(fsm) != 0) ni_fsm_mainloop(fsm); - status = ni_ifstatus_shutdown_result(fsm, &down_marked); + status = ni_ifstatus_shutdown_result(fsm, &ifnames, &down_marked); } } else { @@ -637,7 +637,8 @@ /* Wait for device up-transition progress events */ ni_nanny_fsm_monitor_run(monitor, &up_marked, status); - status = ni_ifstatus_display_result(fsm, &ifnames, opt_transient); + status = ni_ifstatus_display_result(fsm, &ifnames, &up_marked, + opt_transient); /* Do not report any transient errors to systemd (e.g. dhcp * or whatever not ready in time) -- returning an error may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/client/ifstatus.c new/wicked-0.6.1/client/ifstatus.c --- old/wicked-0.6.0/client/ifstatus.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/client/ifstatus.c 2014-08-06 19:57:55.000000000 +0200 @@ -728,34 +728,42 @@ } int -ni_ifstatus_shutdown_result(ni_fsm_t *fsm, ni_ifworker_array_t *marked) +ni_ifstatus_shutdown_result(ni_fsm_t *fsm, ni_string_array_t *names, ni_ifworker_array_t *marked) { - if (marked && marked->count) { - const ni_ifworker_t *w; - const char *state; - unsigned int i; - - for (i = 0; i < marked->count; ++i) { - if (!(w = marked->data[i])) - continue; - - state = ni_ifworker_state_name(w->fsm.state); - if (ni_string_empty(w->name) || - ni_string_empty(state)) - continue; + unsigned int i; - if_printf(w->name, "", "%s\n", state); + ni_assert(fsm); + for (i = 0; i < fsm->workers.count; i++) { + const ni_ifworker_t *w = fsm->workers.data[i]; + + if (!w || ni_string_empty(w->name)) + continue; + + if (!w->kickstarted) + continue; + + if (marked && ni_ifworker_array_index(marked, w) < 0) + continue; + + if (names && names->count != 0 && + ni_string_array_index(names, w->name) < 0) { + continue; } + + if (!ni_ifworker_is_valid_state(w->fsm.state)) + continue; + + if_printf(w->name, "", "%s\n", ni_ifworker_state_name(w->fsm.state)); } - if (!fsm || ni_fsm_fail_count(fsm)) + if (ni_fsm_fail_count(fsm)) return NI_WICKED_RC_ERROR; return NI_WICKED_RC_SUCCESS; } int -ni_ifstatus_display_result(ni_fsm_t *fsm, ni_string_array_t *names, ni_bool_t opt_transient) +ni_ifstatus_display_result(ni_fsm_t *fsm, ni_string_array_t *names, ni_ifworker_array_t *marked, ni_bool_t opt_transient) { ni_uint_array_t stcodes = NI_UINT_ARRAY_INIT; ni_uint_array_t stflags = NI_UINT_ARRAY_INIT; @@ -763,25 +771,40 @@ ni_bool_t multiple; unsigned int i; + ni_assert(fsm); if (!ni_fsm_refresh_state(fsm)) { /* Severe error we always explicitly return */ return NI_WICKED_ST_ERROR; } - multiple = names->count != 1 ? TRUE : FALSE; + if (names && names->count == 1) + multiple = FALSE; + else if (marked && marked->count == 1) + multiple = FALSE; + else + multiple = TRUE; for (i = 0; i < fsm->workers.count; i++ ) { ni_ifworker_t *w = fsm->workers.data[i]; unsigned int st = NI_WICKED_ST_NO_DEVICE; ni_bool_t mandatory = TRUE; - if (names->count == 0 || ni_string_array_index(names, w->name) != -1) { - st = ni_ifstatus_of_worker(w, &mandatory); - ni_uint_array_append(&stcodes, st); - ni_uint_array_append(&stflags, mandatory); + if (!w || ni_string_empty(w->name)) + continue; - ni_ifstatus_show_status(w->name, st); + if (marked && ni_ifworker_array_index(marked, w) < 0) + continue; + + if (names && names->count != 0 && + ni_string_array_index(names, w->name) < 0) { + continue; } + + st = ni_ifstatus_of_worker(w, &mandatory); + ni_uint_array_append(&stcodes, st); + ni_uint_array_append(&stflags, mandatory); + + ni_ifstatus_show_status(w->name, st); } if (!stcodes.count) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/client/ifstatus.h new/wicked-0.6.1/client/ifstatus.h --- old/wicked-0.6.0/client/ifstatus.h 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/client/ifstatus.h 2014-08-06 19:57:55.000000000 +0200 @@ -28,7 +28,7 @@ #define __WICKED_CLIENT_IFSTATUS_H__ extern int ni_do_ifstatus(int argc, char **argv); -extern int ni_ifstatus_display_result(ni_fsm_t *, ni_string_array_t *, ni_bool_t); -extern int ni_ifstatus_shutdown_result(ni_fsm_t *, ni_ifworker_array_t *); +extern int ni_ifstatus_display_result(ni_fsm_t *, ni_string_array_t *, ni_ifworker_array_t *, ni_bool_t); +extern int ni_ifstatus_shutdown_result(ni_fsm_t *, ni_string_array_t *, ni_ifworker_array_t *); #endif /* __WICKED_CLIENT_IFSTATUS_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/client/ifup.c new/wicked-0.6.1/client/ifup.c --- old/wicked-0.6.0/client/ifup.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/client/ifup.c 2014-08-06 19:57:55.000000000 +0200 @@ -350,7 +350,7 @@ if (!monitor || monitor->marked || !marked) return; - monitor->marked = marked; + monitor->marked = ni_ifworker_array_clone(marked); while (!ni_caught_terminal_signal()) { long timeout; @@ -381,6 +381,7 @@ ni_timer_cancel(monitor->timer); monitor->timer = NULL; } + ni_ifworker_array_free(monitor->marked); monitor->marked = NULL; } } @@ -599,7 +600,7 @@ break; } - if (ni_string_array_index(&ifnames, ifmatch.name) == -1) + if (ni_string_array_index(&ifnames, ifmatch.name) < 0) ni_string_array_append(&ifnames, ifmatch.name); } @@ -612,7 +613,8 @@ /* Wait for device up-transition progress events */ ni_nanny_fsm_monitor_run(monitor, &ifmarked, status); - status = ni_ifstatus_display_result(fsm, &ifnames, opt_transient); + status = ni_ifstatus_display_result(fsm, &ifnames, &ifmarked, + opt_transient); /* Do not report any transient errors to systemd (e.g. dhcp * or whatever not ready in time) -- returning an error may @@ -858,7 +860,7 @@ break; } - if (ni_string_array_index(&ifnames, ifmatch.name) == -1) + if (ni_string_array_index(&ifnames, ifmatch.name) < 0) ni_string_array_append(&ifnames, ifmatch.name); } @@ -875,7 +877,8 @@ if (ni_fsm_schedule(fsm) != 0) ni_fsm_mainloop(fsm); - status = ni_ifstatus_display_result(fsm, &ifnames, opt_transient); + status = ni_ifstatus_display_result(fsm, &ifnames, &ifmarked, + opt_transient); /* Do not report any transient errors to systemd (e.g. dhcp * or whatever not ready in time) -- returning an error may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/configure new/wicked-0.6.1/configure --- old/wicked-0.6.0/configure 2014-08-01 15:00:51.000000000 +0200 +++ new/wicked-0.6.1/configure 2014-08-06 20:14:26.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for wicked 0.6.0. +# Generated by GNU Autoconf 2.69 for wicked 0.6.1. # # Report bugs to http://bugs.opensuse.org. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='wicked' PACKAGE_TARNAME='wicked' -PACKAGE_VERSION='0.6.0' -PACKAGE_STRING='wicked 0.6.0' +PACKAGE_VERSION='0.6.1' +PACKAGE_STRING='wicked 0.6.1' PACKAGE_BUGREPORT='http://bugs.opensuse.org' PACKAGE_URL='https://github.com/openSUSE/wicked' @@ -1378,7 +1378,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -`configure' configures wicked 0.6.0 to adapt to many kinds of systems. +`configure' configures wicked 0.6.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1448,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of wicked 0.6.0:";; + short | recursive ) echo "Configuration of wicked 0.6.1:";; esac cat <<_ACEOF @@ -1598,7 +1598,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<_ACEOF -wicked configure 0.6.0 +wicked configure 0.6.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2197,7 +2197,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by wicked $as_me 0.6.0, which was +It was created by wicked $as_me 0.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3060,7 +3060,7 @@ # Define the identity of the package. PACKAGE='wicked' - VERSION='0.6.0' + VERSION='0.6.1' cat >>confdefs.h <<_ACEOF @@ -8093,7 +8093,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -8111,7 +8111,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8130,7 +8133,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -14784,7 +14790,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by wicked $as_me 0.6.0, which was +This file was extended by wicked $as_me 0.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14851,7 +14857,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\""`$]/\\&/g'`" ac_cs_version="\ -wicked config.status 0.6.0 +wicked config.status 0.6.1 configured by $0, generated by GNU Autoconf 2.69, with options \"$ac_cs_config\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/include/wicked/fsm.h new/wicked-0.6.1/include/wicked/fsm.h --- old/wicked-0.6.0/include/wicked/fsm.h 2014-07-31 14:26:18.000000000 +0200 +++ new/wicked-0.6.1/include/wicked/fsm.h 2014-08-06 19:57:55.000000000 +0200 @@ -316,6 +316,9 @@ extern ni_ifworker_control_t * ni_ifworker_control_clone(const ni_ifworker_control_t *); extern void ni_ifworker_control_free(ni_ifworker_control_t *); +extern ni_ifworker_array_t * ni_ifworker_array_new(void); +extern void ni_ifworker_array_free(ni_ifworker_array_t *); +extern ni_ifworker_array_t * ni_ifworker_array_clone(ni_ifworker_array_t *); extern void ni_ifworker_array_append(ni_ifworker_array_t *, ni_ifworker_t *); extern ni_bool_t ni_ifworker_array_remove(ni_ifworker_array_t *, ni_ifworker_t *); extern void ni_ifworker_array_remove_with_children(ni_ifworker_array_t *, ni_ifworker_t *); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/nanny/interface.c new/wicked-0.6.1/nanny/interface.c --- old/wicked-0.6.0/nanny/interface.c 2014-07-31 14:26:18.000000000 +0200 +++ new/wicked-0.6.1/nanny/interface.c 2014-08-06 19:57:55.000000000 +0200 @@ -54,18 +54,16 @@ ni_nanny_t *mgr = mdev->nanny; ni_ifworker_t *w = mdev->worker; + if (!w) + return FALSE; + if (mdev->rfkill_blocked) { - ni_debug_nanny("%s: radio disabled, will enable scanning later", w->name); + ni_debug_nanny("%s: radio disabled, will enable scanning later", + w->name); mdev->monitor = TRUE; return TRUE; } - /* bring it to state "UP" so that we can monitor for link status */ - if (ni_call_link_monitor(w->object) < 0) { - ni_error("Failed to enable monitoring on %s", w->name); - return FALSE; - } - ni_nanny_schedule_recheck(&mgr->recheck, w); ni_nanny_unschedule(&mgr->down, w); if (ni_ifworker_complete(w)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/samples/Makefile new/wicked-0.6.1/samples/Makefile --- old/wicked-0.6.0/samples/Makefile 2014-06-27 16:46:48.000000000 +0200 +++ new/wicked-0.6.1/samples/Makefile 1970-01-01 01:00:00.000000000 +0100 @@ -1,159 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.8 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The program to use to edit the cache. -CMAKE_EDIT_COMMAND = /usr/bin/ccmake - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /space/mt/work/wicked/git - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /space/mt/work/wicked/git - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: install/local -.PHONY : install/local/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: "Unspecified"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /space/mt/work/wicked/git && $(CMAKE_COMMAND) -E cmake_progress_start /space/mt/work/wicked/git/CMakeFiles /space/mt/work/wicked/git/samples/CMakeFiles/progress.marks - cd /space/mt/work/wicked/git && $(MAKE) -f CMakeFiles/Makefile2 samples/all - $(CMAKE_COMMAND) -E cmake_progress_start /space/mt/work/wicked/git/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /space/mt/work/wicked/git && $(MAKE) -f CMakeFiles/Makefile2 samples/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /space/mt/work/wicked/git && $(MAKE) -f CMakeFiles/Makefile2 samples/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /space/mt/work/wicked/git && $(MAKE) -f CMakeFiles/Makefile2 samples/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /space/mt/work/wicked/git && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... list_install_components" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /space/mt/work/wicked/git && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/src/client/client_state.c new/wicked-0.6.1/src/client/client_state.c --- old/wicked-0.6.0/src/client/client_state.c 2014-07-31 14:26:18.000000000 +0200 +++ new/wicked-0.6.1/src/client/client_state.c 2014-08-06 19:57:55.000000000 +0200 @@ -104,15 +104,13 @@ if (!(parent = xml_node_new(NI_CLIENT_STATE_XML_CONFIG_NODE, node))) return FALSE; - if (!(ptr = ni_uuid_print(&conf->uuid)) || - !xml_node_new_element(NI_CLIENT_STATE_XML_CONFIG_UUID_NODE, parent, ptr)) { + ptr = ni_uuid_print(&conf->uuid); + if (!xml_node_new_element(NI_CLIENT_STATE_XML_CONFIG_UUID_NODE, parent, ptr)) return FALSE; - } - if (!(ptr = conf->origin) || - !xml_node_new_element(NI_CLIENT_STATE_XML_CONFIG_ORIGIN_NODE, parent, ptr)) { + ptr = conf->origin; + if (!xml_node_new_element(NI_CLIENT_STATE_XML_CONFIG_ORIGIN_NODE, parent, ptr)) return FALSE; - } ni_string_printf(&tmp, "%u", conf->owner); if (!xml_node_new_element(NI_CLIENT_STATE_XML_CONFIG_OWNER_NODE, parent, tmp)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/src/fsm.c new/wicked-0.6.1/src/fsm.c --- old/wicked-0.6.0/src/fsm.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/src/fsm.c 2014-08-06 19:57:55.000000000 +0200 @@ -522,6 +522,15 @@ return TRUE; } +ni_ifworker_array_t * +ni_ifworker_array_new(void) +{ + ni_ifworker_array_t *array; + + array = xcalloc(1, sizeof(*array)); + return array; +} + void ni_ifworker_array_append(ni_ifworker_array_t *array, ni_ifworker_t *w) { @@ -545,10 +554,19 @@ void ni_ifworker_array_destroy(ni_ifworker_array_t *array) { - while (array->count) - ni_ifworker_release(array->data[--(array->count)]); - free(array->data); - array->data = NULL; + if (array) { + while (array->count) + ni_ifworker_release(array->data[--(array->count)]); + free(array->data); + array->data = NULL; + } +} + +void +ni_ifworker_array_free(ni_ifworker_array_t *array) +{ + ni_ifworker_array_destroy(array); + free(array); } static ni_ifworker_t * @@ -568,6 +586,22 @@ return NULL; } +ni_ifworker_array_t * +ni_ifworker_array_clone(ni_ifworker_array_t *array) +{ + unsigned int i; + ni_ifworker_array_t *clone; + + if (!array) + return NULL; + + clone = ni_ifworker_array_new(); + for (i = 0; i < array->count; ++i) + ni_ifworker_array_append(clone, array->data[i]); + + return clone; +} + ni_bool_t ni_ifworker_array_remove(ni_ifworker_array_t *array, ni_ifworker_t *w) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/src/ifconfig.c new/wicked-0.6.1/src/ifconfig.c --- old/wicked-0.6.0/src/ifconfig.c 2014-08-01 14:48:05.000000000 +0200 +++ new/wicked-0.6.1/src/ifconfig.c 2014-08-06 19:57:55.000000000 +0200 @@ -782,11 +782,18 @@ pif = ni_netdev_by_name(nc, port->ifname); if (pif == NULL) { - ni_error("%s: cannot add port - interface not known", brdev->name); + ni_error("%s: cannot add port - interface not known", + brdev->name); + return -NI_ERROR_DEVICE_NOT_KNOWN; + } + if (!ni_netdev_device_is_ready(pif)) { + ni_error("%s: cannot add port %s - interface is not ready", + brdev->name, pif->name); return -NI_ERROR_DEVICE_NOT_KNOWN; } if (pif->link.ifindex == 0) { - ni_error("%s: cannot add port - %s has no ifindex?!", brdev->name, pif->name); + ni_error("%s: cannot add port - %s has no ifindex?!", + brdev->name, pif->name); return -NI_ERROR_DEVICE_NOT_KNOWN; } @@ -794,13 +801,15 @@ * the other, or we create a loop. */ if (pif == brdev) { - ni_error("%s: cannot add interface as its own bridge port", brdev->name); + ni_error("%s: cannot add interface as its own bridge port", + brdev->name); return -NI_ERROR_DEVICE_BAD_HIERARCHY; } if (pif->link.masterdev.index && pif->link.masterdev.index != brdev->link.ifindex) { - ni_error("%s: interface %s already has a master", brdev->name, pif->name); + ni_error("%s: interface %s already has a master", + brdev->name, pif->name); return -NI_ERROR_DEVICE_BAD_HIERARCHY; } @@ -830,8 +839,8 @@ /* Now configure the newly added port */ if ((rv = ni_sysfs_bridge_port_update_config(pif->name, port)) < 0) { - ni_error("%s: failed to configure port %s: %s", brdev->name, pif->name, - ni_strerror(rv)); + ni_error("%s: failed to configure port %s: %s", + brdev->name, pif->name, ni_strerror(rv)); return rv; } @@ -985,6 +994,12 @@ if (name && (sdev = ni_netdev_by_name(nc, name))) { int ret; + if (!ni_netdev_device_is_ready(sdev)) { + ni_error("%s: cannot enslave %s, device is not ready", + dev->name, sdev->name); + continue; + } + if (sdev->link.masterdev.index) { if (sdev->link.masterdev.index == dev->link.ifindex) continue; @@ -1100,12 +1115,20 @@ slave_dev = ni_netdev_by_index(nc, slave_idx); if (slave_dev == NULL) { - ni_error("%s: trying to add unknown interface to bond %s", __func__, dev->name); + ni_error("%s: trying to add unknown interface to bond %s", + __func__, dev->name); + return -NI_ERROR_DEVICE_NOT_KNOWN; + } + + if (!ni_netdev_device_is_ready(slave_dev)) { + ni_error("%s: trying to enslave %s, which is not ready", + dev->name, slave_dev->name); return -NI_ERROR_DEVICE_NOT_KNOWN; } if (ni_netdev_network_is_up(slave_dev)) { - ni_error("%s: trying to enslave %s, which is in use", dev->name, slave_dev->name); + ni_error("%s: trying to enslave %s, which is in use", + dev->name, slave_dev->name); return -NI_ERROR_DEVICE_NOT_DOWN; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wicked-0.6.0/wicked.spec new/wicked-0.6.1/wicked.spec --- old/wicked-0.6.0/wicked.spec 2014-08-01 15:00:58.000000000 +0200 +++ new/wicked-0.6.1/wicked.spec 2014-08-06 20:14:34.000000000 +0200 @@ -18,7 +18,7 @@ %define release_prefix %{?snapshot:%{snapshot}}%{!?snapshot:0} Name: wicked -Version: 0.6.0 +Version: 0.6.1 Release: %{release_prefix}.0.0 Summary: Network configuration infrastructure License: GPL-2.0 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org