Hello community, here is the log from the commit of package wsmancli for openSUSE:Factory checked in at Thu Jun 30 11:54:23 CEST 2011.
-------- --- wsmancli/wsmancli.changes 2010-03-08 11:36:26.000000000 +0100 +++ /mounts/work_src_done/STABLE/wsmancli/wsmancli.changes 2011-05-01 04:32:56.000000000 +0200 @@ -1,0 +2,35 @@ +Sun May 1 02:32:39 UTC 2011 - crrodrig...@opensuse.org + +- Fix build with GCC 4.6 + +------------------------------------------------------------------- +Wed Apr 20 10:48:03 UTC 2011 - kkae...@novell.com + +- Update to version 2.2.6 + Bugfix release + - fix segfault in output_file handling (Chris Poblete) + +------------------------------------------------------------------- +Wed Mar 16 11:56:50 UTC 2011 - kkae...@novell.com + +- Update to version 2.2.5 + Bugfix release + - fix integral parameters on big endian architectures (Kamil Dudka) + +------------------------------------------------------------------- +Mon Sep 13 12:24:47 UTC 2010 - kkae...@novell.com + +- Update to version 2.2.4 + Bugfix release + - fix default ports (5985/5986) + - fix --sslkey handling + - add warning if ssl used without --cacert + +- Enhance enumerate with association filter to have the ability to + specify the optional elements namely: AssociationClassName, Role, + ResultClassName, ResultRole and IncludeResultProperty. + (IncludeResultProperty is a list, specify it as a comma separated + list in the āUā option.) + (Chris Poblete) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- wsmancli-2.2.3.tar.bz2 New: ---- wsmancli-2.2.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wsmancli.spec ++++++ --- /var/tmp/diff_new_pack.mNaxY0/_old 2011-06-30 11:54:01.000000000 +0200 +++ /var/tmp/diff_new_pack.mNaxY0/_new 2011-06-30 11:54:01.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package wsmancli (Version 2.2.3) +# spec file for package wsmancli # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,13 @@ Name: wsmancli BuildRequires: gcc-c++ libwsman-devel pkgconfig -%if 0%{?suse_version} > 1020 +%if 0%{?suse_version} > 1010 BuildRequires: libcurl-devel %else +# SLE 10 BuildRequires: curl-devel %endif -Version: 2.2.3 +Version: 2.2.6 Release: 1 Url: http://www.openwsman.org/ License: BSD3c @@ -49,7 +50,7 @@ %setup -q -n %{name}-%{version} %build -%configure +%configure --disable-more-warnings make %{?jobs:-j%jobs} %install ++++++ wsmancli-2.2.3.tar.bz2 -> wsmancli-2.2.6.tar.bz2 ++++++ ++++ 11682 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/ChangeLog new/wsmancli-2.2.6/ChangeLog --- old/wsmancli-2.2.3/ChangeLog 2010-02-22 15:49:18.000000000 +0100 +++ new/wsmancli-2.2.6/ChangeLog 2011-04-20 12:24:06.000000000 +0200 @@ -1,3 +1,21 @@ +Version 2.2.6 + - fix segfault in output_file handling (Chris Poblete) + +Version 2.2.5 + - fix integral parameters on big endian architectures (Kamil Dudka) + +Version 2.2.4 + - Enhance enumerate with association filter to have the ability to + specify the optional elements namely: AssociationClassName, Role, + ResultClassName, ResultRole and IncludeResultProperty. + (IncludeResultProperty is a list, specify it as a comma separated list + in the āUā option.) + (Chris Poblete) + Bugfixes + - fix default ports (5985/5986) + - fix --sslkey handling + - add warning if ssl used without --cacert + Version 2.2.3 Bugfix release, synchronize version with openwsman - fix double free error on enumeration (Chris Poblete) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/config.h.in new/wsmancli-2.2.6/config.h.in --- old/wsmancli-2.2.3/config.h.in 2007-11-09 14:53:12.000000000 +0100 +++ new/wsmancli-2.2.6/config.h.in 2010-09-13 10:35:16.000000000 +0200 @@ -45,6 +45,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/configure.in new/wsmancli-2.2.6/configure.in --- old/wsmancli-2.2.3/configure.in 2010-02-25 13:51:34.000000000 +0100 +++ new/wsmancli-2.2.6/configure.in 2011-04-20 12:25:22.000000000 +0200 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(wsmancli, 2.2.3) +AC_INIT(wsmancli, 2.2.6) AC_CONFIG_SRCDIR(wsmancli.spec.in) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/missing new/wsmancli-2.2.6/missing --- old/wsmancli-2.2.3/missing 2007-11-09 14:53:13.000000000 +0100 +++ new/wsmancli-2.2.6/missing 2010-09-13 10:35:17.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +18,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -89,6 +87,9 @@ tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + Send bug reports to <bug-autom...@gnu.org>." exit $? ;; @@ -106,15 +107,22 @@ esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). +# the program). This is about non-GNU programs, so use $1 not +# $program. case $1 in - lex|yacc) + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) + tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -138,7 +146,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $1 in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -148,7 +156,7 @@ touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -157,7 +165,7 @@ touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -187,7 +195,7 @@ while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -210,7 +218,7 @@ fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package @@ -240,7 +248,7 @@ fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package @@ -263,7 +271,7 @@ fi ;; - help2man) + help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the @@ -277,11 +285,11 @@ else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -310,7 +318,7 @@ touch $file ;; - tar) + tar*) shift # We have already tried tar in the generic part. @@ -363,5 +371,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/src/wseventmgr.c new/wsmancli-2.2.6/src/wseventmgr.c --- old/wsmancli-2.2.3/src/wseventmgr.c 2008-06-20 13:44:22.000000000 +0200 +++ new/wsmancli-2.2.6/src/wseventmgr.c 2010-09-14 19:59:08.000000000 +0200 @@ -292,7 +292,7 @@ // set default options if (server_port == 0) { - server_port = cainfo ? 8888 : 8889; + server_port = cainfo ? 5985 : 5986; } if (url_path == NULL) { url_path = "/wsman"; @@ -454,9 +454,13 @@ } if (cert) { wsman_transport_set_cert(cl, cert); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } if (sslkey) { - wsman_transport_set_cert(cl, sslkey); + wsman_transport_set_key(cl, sslkey); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } wsman_transport_set_verify_peer(cl, !noverify_peer); wsman_transport_set_verify_host(cl, !noverify_host); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wsmancli-2.2.3/src/wsman.c new/wsmancli-2.2.6/src/wsman.c --- old/wsmancli-2.2.3/src/wsman.c 2010-02-22 15:49:18.000000000 +0100 +++ new/wsmancli-2.2.6/src/wsman.c 2011-04-20 12:18:49.000000000 +0200 @@ -57,7 +57,7 @@ extern char *getpass (const char *__prompt); #endif -static int server_port = 0; +static long int server_port = 0; static char *cainfo = NULL; static char *cert = NULL; static char *sslkey = NULL; @@ -71,15 +71,15 @@ static char noverify_peer = 0; static char noverify_host = 0; -static int transport_timeout = 0; +static long int transport_timeout = 0; static char *proxy = NULL; static char *proxy_upwd = NULL; -static int debug_level = -1; +static long int debug_level = -1; static char *encoding = NULL; static char *test_case = NULL; -static int enum_max_elements = 0; +static long int enum_max_elements = 0; char enum_optimize = 0; char enum_estimate = 0; char dump_request = 0; @@ -92,8 +92,8 @@ static char *event_delivery_mode = NULL; static char *event_delivery_sec_mode = NULL; static char *event_delivery_uri = NULL; -static int event_subscription_expire = 0; -static int event_heartbeat = 0; +static long int event_subscription_expire = 0; +static long int event_heartbeat = 0; static int event_sendbookmark =0; static char *event_subscription_id = NULL; static char *event_reference_properties = NULL; @@ -395,7 +395,7 @@ // set default options if (server_port == 0) { - server_port = cainfo ? 8888 : 8889; + server_port = cainfo ? 5985 : 5986; } if (url_path == NULL) { if (strcmp(argv[1], "anonid") == 0) @@ -424,7 +424,7 @@ return; } if (filename) { - f = fopen(filename, "w+"); + f = fopen(filename, "w"); if (f == NULL) { error("Could not open file for writing"); return; @@ -437,6 +437,27 @@ return; } +/* + * output pull results to separate files (appending "-<index>" to the name) + * + */ +static void wsman_output_pull(WsManClient * cl, WsXmlDocH doc, int index) +{ + char *strbuf, *origfile = output_file; + int count; + + if (output_file) { + count = strlen(output_file) + 16; + strbuf = (char*)calloc(count, 1); + snprintf(strbuf, count, "%s-%u.xml", output_file, index); + output_file = strbuf; + } + wsman_output(cl, doc); + if (origfile) { + output_file = origfile; + free(strbuf); + } +} static void initialize_logging(void) { @@ -484,7 +505,7 @@ hash_t *h = hash_create(HASHCOUNT_T_MAX, 0, 0); while (properties != NULL && properties[c] != NULL) { - char *cc[3]; + char *cc[3] = { NULL, NULL, NULL }; u_tokenize1(cc, 2, properties[c], '='); if (!hash_lookup(h, cc[0])) { if (!hash_alloc_insert(h, cc[0], cc[1])) { @@ -532,7 +553,7 @@ if (iniparser_find_entry(ini, "client")) { agent = iniparser_getstr(ini, "client:agent"); server_port = server_port ? - server_port : iniparser_getint(ini, "client:port", 80); + server_port : iniparser_getint(ini, "client:port", 5985); authentication_method = authentication_method ? authentication_method : iniparser_getstr(ini, "client:authentication_method"); @@ -542,6 +563,45 @@ return 1; } +static void free_include_result_property(char **resultProps) +{ + if (NULL != resultProps) { + char **tmp = resultProps; + while (*tmp != NULL) { // iterate until list terminator + u_free(*tmp); + tmp++; + } + u_free(resultProps); + } +} + +static char ** get_include_result_property(int *propNum) +{ + char **resultProps = NULL; + char *tok, *val, *copy; + int idx = 0; + + *propNum = 0; + if (NULL != enum_context) { + copy = u_strdup(enum_context); + for (tok = copy ; NULL != tok ; (*propNum)++, tok = strchr(tok, ',')) { // get count + tok++; + } + resultProps = (char **)u_calloc((*propNum + 1), sizeof(char *)); // 1 more for list terminator + val = copy; + while (val) { + tok = strchr(val, ','); + if (NULL != tok) { + *tok++ = '\0'; + } + resultProps[idx++] = u_strdup(val); + val = tok; + } + resultProps[idx] = NULL; // list terminator + u_free(copy); + } + return resultProps; +} int main(int argc, char **argv) { @@ -592,7 +652,7 @@ cl = wsmc_create(server, server_port, url_path, - cainfo? "https" : "http", + cainfo ? "https" : "http", username, password); } @@ -618,9 +678,13 @@ } if (cert) { wsman_transport_set_cert(cl, cert); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } if (sslkey) { - wsman_transport_set_cert(cl, sslkey); + wsman_transport_set_key(cl, sslkey); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } wsman_transport_set_verify_peer(cl, !noverify_peer); wsman_transport_set_verify_host(cl, !noverify_host); @@ -769,7 +833,24 @@ epr_add_selector_text(epr, CIM_NAMESPACE_SELECTOR, options->cim_ns); } if (epr) { - filter = filter_create_assoc(epr, (op == WSMAN_ACTION_REFERENCES )?0:1, NULL, NULL, NULL, NULL, NULL, 0 ); + char **resultProperties = NULL; + const char *assocClass, *resultClass, *role, *resultRole; + int propNum; + + if (NULL != (assocClass = wsman_epr_selector_by_name(epr, "AssociationClassName"))) + epr_delete_selector(epr, "AssociationClassName"); + if (NULL != (resultClass = wsman_epr_selector_by_name(epr, "ResultClassName"))) + epr_delete_selector(epr, "ResultClassName"); + if (NULL != (role = wsman_epr_selector_by_name(epr, "Role"))) + epr_delete_selector(epr, "Role"); + if (NULL != (resultRole = wsman_epr_selector_by_name(epr, "ResultRole"))) + epr_delete_selector(epr, "ResultRole"); + resultProperties = get_include_result_property(&propNum); + + filter = filter_create_assoc(epr, (op == WSMAN_ACTION_ASSOCIATORS )?0:1, + assocClass, resultClass, role, resultRole, resultProperties, propNum); + + free_include_result_property(resultProperties); } } else { error("Filter Requied"); @@ -850,11 +931,13 @@ if (step) break; + + int index = 0; while (enumContext != NULL && enumContext[0] != 0) { doc = wsmc_action_pull(cl, resource_uri, options, filter, enumContext); - wsman_output(cl, doc); + wsman_output_pull(cl, doc, ++index); if (wsmc_get_response_code(cl) != 200 && wsmc_get_response_code(cl) != 400 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org