openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2014
- 1 participants
- 1147 discussions
Hello community,
here is the log from the commit of package yate for openSUSE:Factory checked in at 2014-06-01 19:40:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yate (Old)
and /work/SRC/openSUSE:Factory/.yate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yate"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yate/yate.changes 2013-12-23 22:22:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yate.new/yate.changes 2014-06-01 19:40:47.000000000 +0200
@@ -1,0 +2,12 @@
+Wed May 28 09:02:55 UTC 2014 - tchvatal(a)suse.com
+
+- Fix source url
+
+-------------------------------------------------------------------
+Tue May 20 14:43:58 UTC 2014 - mardnh(a)gmx.de
+
+- update to 5.3.0:
+ - removed patch: yate-fix-ssl-detection.patch (fixed upstream)
+ - upstream does not provide changelog
+
+-------------------------------------------------------------------
Old:
----
yate-4.3.0-1.tar.gz
yate-fix-ssl-detection.patch
New:
----
yate-5.3.0-1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yate.spec ++++++
--- /var/tmp/diff_new_pack.KkETCg/_old 2014-06-01 19:40:49.000000000 +0200
+++ /var/tmp/diff_new_pack.KkETCg/_new 2014-06-01 19:40:49.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yate
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011, Sascha Peilicke <saschpe(a)gmx.de>
# Copyright (c) 2011, Pascal Bleser <pascal.bleser(a)opensuse.org>
#
@@ -19,17 +19,16 @@
Name: yate
-Version: 4.3.0
+Version: 5.3.0
Release: 0
Summary: Yet Another Telephony Engine
License: GPL-2.0+
Group: Productivity/Telephony/Clients
Url: http://www.yate.null.ro/
-Source0: http://yate.null.ro/tarballs/yate4/yate-%{version}-1.tar.gz
+Source0: http://yate.null.ro/tarballs/yate5/yate-%{version}-1.tar.gz
Patch1: yate-3.3.2-ppc64-libdir.patch
Patch2: yate-ppc64.patch
Patch3: dont-mess-with-cflags.patch
-Patch4: yate-fix-ssl-detection.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: gcc-c++
@@ -111,7 +110,6 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4
%build
rm configure
@@ -149,6 +147,7 @@
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/data
%{_libdir}/lib%{name}.so.*
+%{_libdir}/libyategsm.so.*
%{_libdir}/libyatejabber.so.*
%{_libdir}/libyatesig.so.*
%{_libdir}/libyatemgcp.so.*
@@ -159,11 +158,13 @@
%{_libdir}/%{name}/callgen.yate
%{_libdir}/%{name}/cdrbuild.yate
%{_libdir}/%{name}/cdrfile.yate
+%{_libdir}/%{name}/cdrcombine.yate
%{_libdir}/%{name}/client
%{_libdir}/%{name}/conference.yate
%{_libdir}/%{name}/dumbchan.yate
%{_libdir}/%{name}/enumroute.yate
%{_libdir}/%{name}/extmodule.yate
+%{_libdir}/%{name}/fileinfo.yate
%{_libdir}/%{name}/filetransfer.yate
%if 0%{?suse_version} && 0%{?suse_version} <= 1210 && ! 0%{?sles_version}
%{_libdir}/%{name}/faxchan.yate
@@ -225,6 +226,7 @@
%config(noreplace) %{_sysconfdir}/%{name}/eventlogs.conf
%config(noreplace) %{_sysconfdir}/%{name}/extmodule.conf
%config(noreplace) %{_sysconfdir}/%{name}/filetransfer.conf
+%config(noreplace) %{_sysconfdir}/%{name}/fileinfo.conf
%config(noreplace) %{_sysconfdir}/%{name}/gvoice.conf
%config(noreplace) %{_sysconfdir}/%{name}/h323chan.conf
%config(noreplace) %{_sysconfdir}/%{name}/heartbeat.conf
++++++ yate-4.3.0-1.tar.gz -> yate-5.3.0-1.tar.gz ++++++
++++ 112985 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package apache2-mod_authn_otp for openSUSE:Factory checked in at 2014-06-01 19:40:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache2-mod_authn_otp (Old)
and /work/SRC/openSUSE:Factory/.apache2-mod_authn_otp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache2-mod_authn_otp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/apache2-mod_authn_otp/apache2-mod_authn_otp.changes 2014-03-23 21:07:56.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.apache2-mod_authn_otp.new/apache2-mod_authn_otp.changes 2014-06-01 19:40:46.000000000 +0200
@@ -1,0 +2,14 @@
+Wed May 28 08:59:41 UTC 2014 - tchvatal(a)suse.com
+
+- Fix source download url.
+
+-------------------------------------------------------------------
+Sat May 17 16:41:52 UTC 2014 - archie(a)dellroad.org
+
+- Update to version 1.1.7
+ + Fixed bug where users file could get deleted when using Apache worker MPM (issue #22)
+ + Added "OTPAuthFallThrough" to allow fall through to other auth providers (issue #23)
+ + Allow "logout" by sending empty password (issue #24)
+ + Count PINs against OTPAuthMaxOTPFailure even when they have the wrong length
+
+-------------------------------------------------------------------
Old:
----
mod_authn_otp-1.1.6.tar.gz
New:
----
mod_authn_otp-1.1.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ apache2-mod_authn_otp.spec ++++++
--- /var/tmp/diff_new_pack.njlZAB/_old 2014-06-01 19:40:47.000000000 +0200
+++ /var/tmp/diff_new_pack.njlZAB/_new 2014-06-01 19:40:47.000000000 +0200
@@ -1,6 +1,7 @@
#
# spec file for package apache2-mod_authn_otp
#
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Archie L. Cobbs <archie(a)dellroad.org>
#
# All modifications and additions to the file contributed by third parties
@@ -11,25 +12,27 @@
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-#
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%define mod_name mod_authn_otp
%define apxs /usr/sbin/apxs2
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
Name: apache2-%{mod_name}
-Version: 1.1.6
+Version: 1.1.7
Release: 0
-License: Apache-2.0
Summary: Apache module for one-time password authentication
+License: Apache-2.0
Group: Productivity/Networking/Web/Servers
-Source: http://mod-authn-otp.googlecode.com/files/%{mod_name}-%{version}.tar.gz
-URL: http://mod-authn-otp.googlecode.com/
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Source: https://s3.amazonaws.com/archie-public/mod-authn-otp/%{mod_name}-%{version}…
+Url: http://mod-authn-otp.googlecode.com/
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1100
-BuildRequires: libopenssl-devel openssl
+BuildRequires: libopenssl-devel
+BuildRequires: openssl
%else
BuildRequires: openssl-devel
%endif
++++++ mod_authn_otp-1.1.6.tar.gz -> mod_authn_otp-1.1.7.tar.gz ++++++
++++ 2700 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/mod_authn_otp-1.1.6/CHANGES new/mod_authn_otp-1.1.7/CHANGES
--- old/mod_authn_otp-1.1.6/CHANGES 2013-04-03 04:10:05.000000000 +0200
+++ new/mod_authn_otp-1.1.7/CHANGES 2014-05-17 18:26:14.000000000 +0200
@@ -1,3 +1,11 @@
+
+Version 1.1.7 (r147) released 17 May 2014
+
+ - Fixed bug where users file could get deleted when using Apache worker MPM (issue #22)
+ - Added "OTPAuthFallThrough" to allow fall through to other auth providers (issue #23)
+ - Allow "logout" by sending empty password (issue #24)
+ - Count PINs against OTPAuthMaxOTPFailure even when they have the wrong length
+
Version 1.1.6 (r131) released 2 Apr 2013
- Detect errors when writing to the new users.txt file
@@ -40,4 +48,4 @@
- Initial release
-$Id: CHANGES 131 2013-04-03 02:10:00Z archie.cobbs $
+$Id: CHANGES 147 2014-05-17 16:26:13Z archie.cobbs $
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/mod_authn_otp-1.1.6/configure.ac new/mod_authn_otp-1.1.7/configure.ac
--- old/mod_authn_otp-1.1.6/configure.ac 2013-04-03 03:56:40.000000000 +0200
+++ new/mod_authn_otp-1.1.7/configure.ac 2013-11-18 20:36:24.000000000 +0100
@@ -19,7 +19,7 @@
# $Id$
#
-AC_INIT([mod_authn_otp Apache2 authentication module supporting one-time passwords], [1.1.6], [http://mod-auth-otp.googlecode.com/] [mod_authn_otp])
+AC_INIT([mod_authn_otp Apache2 authentication module supporting one-time passwords], [1.1.7], [http://mod-auth-otp.googlecode.com/] [mod_authn_otp])
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE
dnl AM_MAINTAINER_MODE
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/mod_authn_otp-1.1.6/mod_authn_otp.c new/mod_authn_otp-1.1.7/mod_authn_otp.c
--- old/mod_authn_otp-1.1.6/mod_authn_otp.c 2012-12-21 23:59:59.000000000 +0100
+++ new/mod_authn_otp-1.1.7/mod_authn_otp.c 2014-04-28 23:55:54.000000000 +0200
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mod_authn_otp.c 129 2012-12-21 22:59:54Z archie.cobbs $
+ * $Id: mod_authn_otp.c 146 2014-04-28 21:55:52Z archie.cobbs $
*/
#include "apr_lib.h"
@@ -90,6 +90,7 @@
#define DEFAULT_MAX_OFFSET 4
#define DEFAULT_MAX_LINGER (10 * 60) /* 10 minutes */
#define DEFAULT_LOGOUT_IP_CHANGE 0
+#define DEFAULT_ALLOW_FALLTHROUGH 0
/* PIN configuration */
#define PIN_CONFIG_LITERAL 0
@@ -117,6 +118,7 @@
int max_linger; /* Maximum time for which the same OTP can be used repeatedly */
u_int max_otp_failures; /* Maximum wrong OTP values before account becomes locked, or zero for no limit */
int logout_ip_change; /* Auto-logout user if IP address changes */
+ int allow_fallthrough; /* Allow fall-through if OTP auth fails */
authn_provider_list *provlist; /* Authorization providers for checking PINs */
};
@@ -158,13 +160,16 @@
/* Powers of ten */
static const int powers10[] = { 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 1000000000 };
+/* Mutex to augment file locking for multi-threaded processes */
+static apr_thread_mutex_t *mutex;
+
/*
* Find/update a user in the users file.
*
* Note: finding, the "user" structure must be initialized with zeroes.
*/
static authn_status
-find_update_user(request_rec *r, const char *usersfile, struct otp_user *const user, int update)
+find_update_user(request_rec *r, const char *usersfile, struct otp_user *const user, const int update)
{
char invalid_reason[128];
char newusersfile[APR_PATH_MAX];
@@ -174,11 +179,12 @@
apr_file_t *newfile = NULL;
apr_file_t *lockfile = NULL;
apr_status_t status;
+ int got_mutex = 0;
char errbuf[64];
int found = 0;
int linenum;
- /* If updating, open and lock lockfile */
+ /* If updating, open and lock lockfile and grab mutex */
if (update) {
apr_snprintf(lockusersfile, sizeof(lockusersfile), "%s%s", usersfile, LOCKFILE_SUFFIX);
if ((status = apr_file_open(&lockfile, lockusersfile,
@@ -192,6 +198,15 @@
lockusersfile, apr_strerror(status, errbuf, sizeof(errbuf)));
goto fail;
}
+ if (mutex == NULL) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "can't acquire OTP mutex: %s", "no mutex exists");
+ goto fail;
+ }
+ if ((status = apr_thread_mutex_lock(mutex)) != 0) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "can't acquire OTP mutex: %s", apr_strerror(status, errbuf, sizeof(errbuf)));
+ goto fail;
+ }
+ got_mutex = 1;
}
/* Open existing users file */
@@ -375,6 +390,7 @@
AP_DEBUG_ASSERT(!update);
AP_DEBUG_ASSERT(newfile == NULL);
AP_DEBUG_ASSERT(lockfile == NULL);
+ AP_DEBUG_ASSERT(!got_mutex);
apr_file_close(file);
return AUTH_USER_FOUND;
@@ -416,9 +432,11 @@
goto fail;
}
- /* Close (and implicitly unlock) lock file */
+ /* Close (and implicitly unlock) lock file and release mutex */
apr_file_close(lockfile);
lockfile = NULL;
+ AP_DEBUG_ASSERT(got_mutex);
+ apr_thread_mutex_unlock(mutex);
/* Done updating */
return found ? AUTH_USER_FOUND : AUTH_USER_NOT_FOUND;
@@ -436,6 +454,8 @@
}
if (lockfile != NULL)
apr_file_close(lockfile);
+ if (got_mutex)
+ apr_thread_mutex_unlock(mutex);
return AUTH_GENERAL_ERROR;
}
@@ -689,11 +709,13 @@
username, pentry->provider_name);
break;
case AUTH_DENIED:
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" gave incorrect PIN according to PIN auth provider \"%s\"",
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r,
+ "user \"%s\" gave incorrect PIN according to PIN auth provider \"%s\"",
username, pentry->provider_name);
break;
case AUTH_USER_NOT_FOUND:
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" is not known by any configured PIN auth provider", username);
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r,
+ "user \"%s\" is not known by any configured PIN auth provider", username);
break;
case AUTH_GENERAL_ERROR: /* assume the auth provider logged something interesting */
break;
@@ -719,7 +741,7 @@
switch (user->pincfg) {
case PIN_CONFIG_NONE: /* User has no PIN, so provided PIN must be the empty string */
if (*pin != '\0') {
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r,
"user \"%s\" supplied a PIN but none is configured in the users file", user->username);
return AUTH_DENIED;
}
@@ -728,7 +750,8 @@
return authn_otp_check_pin_external(r, conf, user->username, pin);
case PIN_CONFIG_LITERAL: /* User's PIN was given explicitly in the users file */
if (strcmp(pin, user->pin) != 0) {
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" PIN does not match value in users file", user->username);
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r,
+ "user \"%s\" PIN does not match value in users file", user->username);
return AUTH_DENIED;
}
return AUTH_GRANTED;
@@ -772,7 +795,17 @@
if (conf->max_otp_failures != 0 && user->num_otp_failures >= conf->max_otp_failures) {
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" has reached the maximum wrong OTP limit of %u",
user->username, conf->max_otp_failures);
- return AUTH_DENIED;
+ return conf->allow_fallthrough ? AUTH_USER_NOT_FOUND : AUTH_DENIED;
+ }
+
+ /* Check for a "logout" via empty password */
+ if (*otp_given == '\0' && *user->last_otp != '\0' && *user->last_ip != '\0' && strcmp(user->last_ip, USER_AGENT_IP(r)) == 0) {
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "logout for user \"%s\" via empty password", user->username);
+
+ /* Forget previous OTP */
+ *user->last_otp = '\0';
+ find_update_user(r, conf->users_file, user, 1);
+ return conf->allow_fallthrough ? AUTH_USER_NOT_FOUND : AUTH_DENIED;
}
/* Check PIN prefix (if appropriate) */
@@ -783,8 +816,8 @@
/* Determine the length of the PIN that the user supplied */
pinlen = strlen(otp_given) - user->num_digits;
if (pinlen < 0) {
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" provided a too-short OTP", user->username);
- return AUTH_DENIED;
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r, "user \"%s\" provided a too-short OTP", user->username);
+ return conf->allow_fallthrough ? AUTH_USER_NOT_FOUND : AUTH_DENIED;
}
/* Extract the PIN from the password given */
@@ -792,15 +825,18 @@
otp_given += pinlen;
/* Check the PIN */
- if ((status = authn_otp_check_pin(r, conf, user, pinbuf)) != AUTH_GRANTED)
+ if ((status = authn_otp_check_pin(r, conf, user, pinbuf)) != AUTH_GRANTED) {
+ if (status == AUTH_DENIED && conf->allow_fallthrough)
+ status = AUTH_USER_NOT_FOUND;
return status;
+ }
}
/* Check OTP length */
if (strlen(otp_given) != user->num_digits) {
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" OTP has the wrong length %d != %d",
+ ap_log_rerror(APLOG_MARK, conf->allow_fallthrough ? APLOG_INFO : APLOG_NOTICE, 0, r, "user \"%s\" OTP has the wrong length %d != %d",
user->username, (int)strlen(otp_given), user->num_digits);
- return AUTH_DENIED;
+ return conf->allow_fallthrough ? AUTH_USER_NOT_FOUND : AUTH_DENIED;
}
/* Check for reuse of previous OTP */
@@ -936,7 +972,7 @@
if (conf->max_otp_failures != 0 && user->num_otp_failures >= conf->max_otp_failures) {
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "user \"%s\" has reached the maximum wrong OTP limit of %u",
user->username, conf->max_otp_failures);
- return AUTH_DENIED;
+ return conf->allow_fallthrough ? AUTH_USER_NOT_FOUND : AUTH_DENIED;
}
/* The user's PIN must be known to us */
@@ -1028,6 +1064,7 @@
conf->max_linger = dir_conf->max_linger;
conf->max_otp_failures = dir_conf->max_otp_failures;
conf->logout_ip_change = dir_conf->logout_ip_change;
+ conf->allow_fallthrough = dir_conf->allow_fallthrough;
copy_provider_list(r->pool, &conf->provlist, dir_conf->provlist);
/* Apply defaults for any unset values */
@@ -1037,6 +1074,8 @@
conf->max_linger = DEFAULT_MAX_LINGER;
if (conf->logout_ip_change == -1)
conf->logout_ip_change = DEFAULT_LOGOUT_IP_CHANGE;
+ if (conf->allow_fallthrough == -1)
+ conf->allow_fallthrough = DEFAULT_ALLOW_FALLTHROUGH;
/* Done */
return conf;
@@ -1055,6 +1094,7 @@
conf->max_linger = -1;
conf->max_otp_failures = 0;
conf->logout_ip_change = -1;
+ conf->allow_fallthrough = -1;
conf->provlist = NULL;
return conf;
}
@@ -1074,6 +1114,7 @@
conf->max_linger = conf2->max_linger != -1 ? conf2->max_linger : conf1->max_linger;
conf->max_otp_failures = conf2->max_otp_failures != 0 ? conf2->max_otp_failures : conf1->max_otp_failures;
conf->logout_ip_change = conf2->logout_ip_change != -1 ? conf2->logout_ip_change : conf1->logout_ip_change;
+ conf->allow_fallthrough = conf2->allow_fallthrough != -1 ? conf2->allow_fallthrough : conf1->allow_fallthrough;
copy_provider_list(p, &conf->provlist, conf2->provlist != NULL ? conf2->provlist : conf1->provlist);
return conf;
}
@@ -1143,6 +1184,14 @@
register_hooks(apr_pool_t *p)
{
ap_register_provider(p, AUTHN_PROVIDER_GROUP, OTP_AUTHN_PROVIDER_NAME, AUTHN_PROVIDER_VERSION, &authn_otp_provider);
+ apr_status_t status;
+ char errbuf[64];
+
+ /* Initialize mutex */
+ if (mutex == NULL && (status = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, p)) != 0) {
+ ap_log_perror(APLOG_MARK, APLOG_ERR, 0, p, "can't create OTP mutex: %s", apr_strerror(status, errbuf, sizeof(errbuf)));
+ return;
+ }
}
/* Configuration directives */
@@ -1178,6 +1227,11 @@
NULL,
OR_AUTHCFG,
"specify auth provider(s) to be used for PIN verification for a directory or location"),
+ AP_INIT_FLAG("OTPAuthFallThrough",
+ ap_set_flag_slot,
+ (void *)APR_OFFSETOF(struct otp_config, allow_fallthrough),
+ OR_AUTHCFG,
+ "allow failed auth attempts to fall through to the next auth provider (if any)"),
{ NULL }
};
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/mod_authn_otp-1.1.6/scripts/missing new/mod_authn_otp-1.1.7/scripts/missing
--- old/mod_authn_otp-1.1.6/scripts/missing 2013-04-03 04:10:32.000000000 +0200
+++ new/mod_authn_otp-1.1.7/scripts/missing 2014-05-17 18:29:27.000000000 +0200
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-06-26.16; # UTC
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard(a)iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard(a)iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,61 +29,33 @@
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -98,228 +70,141 @@
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
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). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- 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
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- 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
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- 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
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- 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
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
- ;;
-esac
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package php5-pear-Mail for openSUSE:Factory checked in at 2014-06-01 19:40:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php5-pear-Mail (Old)
and /work/SRC/openSUSE:Factory/.php5-pear-Mail.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php5-pear-Mail"
Changes:
--------
--- /work/SRC/openSUSE:Factory/php5-pear-Mail/php5-pear-Mail.changes 2012-02-14 11:26:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.php5-pear-Mail.new/php5-pear-Mail.changes 2014-06-01 19:40:45.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 19 12:35:27 UTC 2014 - aj(a)ajaissle.de
+
+- Generic spec cleanup
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ php5-pear-Mail.spec ++++++
--- /var/tmp/diff_new_pack.lWz09M/_old 2014-06-01 19:40:45.000000000 +0200
+++ /var/tmp/diff_new_pack.lWz09M/_new 2014-06-01 19:40:45.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package php5-pear-Mail
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: php5-pear-Mail
%define pear_name Mail
%define pear_sname mail
@@ -26,22 +27,27 @@
BuildArch: noarch
Url: http://pear.php.net/package/%{pear_name}
Source: %{pear_name}-%{version}.tgz
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: php >= 4.4.9
+%if 0%{?sles_version} == 10
BuildRequires: php-macros
-BuildRequires: php5-pear
+%else
+BuildRequires: php-devel >= 4.4.9
+%endif
+BuildRequires: php-pear >= 1.5.6
Requires: php >= 4.4.9
-Requires: php5-pear
+Requires: php-pear >= 1.5.6
# optional
Suggests: php-pear-Net_SMTP >= 1.4.1
+
Provides: php-pear-%{pear_name} pear-%{pear_name}
-# Fix for renaming (package convention)
-Provides: php5-pear-%{pear_sname} = %{version}
-Provides: php-pear-%{pear_sname} = %{version}
Provides: pear-%{pear_sname} = %{version}
-Obsoletes: php5-pear-%{pear_sname} < %{version}
-Obsoletes: php-pear-%{pear_sname} < %{version}
+Provides: php-pear-%{pear_sname} = %{version}
+Provides: php5-pear-%{pear_sname} = %{version}
Obsoletes: pear-%{pear_sname} < %{version}
+Obsoletes: php-pear-%{pear_sname} < %{version}
+Obsoletes: php5-pear-%{pear_sname} < %{version}
%description
PEAR's Mail package defines an interface for implementing mailers under the PEAR
@@ -90,9 +96,6 @@
%{__pear} uninstall --nodeps --ignore-errors --register-only pear.php.net/%{pear_name}
fi
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
%defattr(-, root, root)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-tornado for openSUSE:Factory checked in at 2014-06-01 19:40:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-tornado (Old)
and /work/SRC/openSUSE:Factory/.python3-tornado.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-tornado"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-tornado/python3-tornado.changes 2013-12-23 22:19:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-tornado.new/python3-tornado.changes 2014-06-01 19:40:43.000000000 +0200
@@ -1,0 +2,7 @@
+Sun May 11 14:00:00 UTC 2014 - andrea(a)opensuse.org
+
+- new upstream version 3.2.1
+ - several new modules and bugfixes check website for details
+ http://www.tornadoweb.org/en/stable/releases.html
+
+-------------------------------------------------------------------
Old:
----
tornado-3.1.1.tar.gz
New:
----
tornado-3.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-tornado.spec ++++++
--- /var/tmp/diff_new_pack.dHyHtd/_old 2014-06-01 19:40:44.000000000 +0200
+++ /var/tmp/diff_new_pack.dHyHtd/_new 2014-06-01 19:40:44.000000000 +0200
@@ -17,7 +17,7 @@
Name: python3-tornado
-Version: 3.1.1
+Version: 3.2.1
Release: 0
Url: http://www.tornadoweb.org
Summary: Open source version of scalable, non-blocking web server that power FriendFeed
@@ -32,7 +32,6 @@
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
-BuildArch: noarch
%description
Tornado is an open source version of the scalable, non-blocking web server and
@@ -52,21 +51,22 @@
%prep
%setup -q -n tornado-%{version}
+# Fix non-executable script rpmlint issue:
+find demos tornado -name "*.py" -exec sed -i "/#\!\/usr\/bin\/.*/d" {} \;
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%if 0%{?suse_version}
%fdupes demos
-# fix executability rpmlint warning
-chmod +x %{buildroot}%{python3_sitelib}/tornado/*.py
-chmod +x %{buildroot}%{python3_sitelib}/tornado/*/*.py
+%endif
%files
%defattr(-,root,root,-)
%doc demos
-%{python3_sitelib}/tornado
-%{python3_sitelib}/tornado-%{version}-py%{py3_ver}.egg-info
+%{python3_sitearch}/tornado
+%{python3_sitearch}/tornado-%{version}-py%{py3_ver}.egg-info
%changelog
++++++ tornado-3.1.1.tar.gz -> tornado-3.2.1.tar.gz ++++++
++++ 11827 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-rtslib for openSUSE:Factory checked in at 2014-06-01 19:40:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rtslib (Old)
and /work/SRC/openSUSE:Factory/.python-rtslib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rtslib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rtslib/python-rtslib.changes 2014-01-02 18:30:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-rtslib.new/python-rtslib.changes 2014-06-01 19:40:42.000000000 +0200
@@ -1,0 +2,17 @@
+Mon May 19 08:16:42 CEST 2014 - hare(a)suse.de
+
+- Add pyparsing to requires
+- README got renamed to README.md
+
+-------------------------------------------------------------------
+Fri May 16 15:48:28 CEST 2014 - hare(a)suse.de
+
+- Update to latest git commit
+ * Update README
+ * Minor fixes
+ * Add support for nullio ramdisks
+ * Update copyright notice
+ * Build fixes
+ * Add rtslib-git-update.patch
+
+-------------------------------------------------------------------
New:
----
rtslib-git-update.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rtslib.spec ++++++
--- /var/tmp/diff_new_pack.00wJvu/_old 2014-06-01 19:40:43.000000000 +0200
+++ /var/tmp/diff_new_pack.00wJvu/_new 2014-06-01 19:40:43.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-rtslib
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -28,13 +28,16 @@
Url: https://github.com/Datera/rtslib
# Source: https://github.com/Datera/%{oname}/archive/%{version}.tar.gz
Source: %{oname}-%{version}.tar.bz2
+Patch0: %{oname}-git-update.patch
Requires: python-configobj
Requires: python-ipaddr
Requires: python-netifaces
+Requires: python-pyparsing
BuildRequires: python-configobj
BuildRequires: python-devel
BuildRequires: python-ipaddr
BuildRequires: python-netifaces
+BuildRequires: python-pyparsing
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: %{name}-doc = %{version}
@@ -64,6 +67,7 @@
%prep
%setup -q -n %{oname}-%{version}
+%patch0 -p1
%build
python setup.py build
@@ -73,7 +77,7 @@
%files
%defattr(-,root,root,-)
-%doc README COPYING
+%doc README.md COPYING
%{python_sitelib}/*
%changelog
++++++ rtslib-git-update.patch ++++++
++++ 8917 lines (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package libnova for openSUSE:Factory checked in at 2014-06-01 19:40:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libnova (Old)
and /work/SRC/openSUSE:Factory/.libnova.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libnova"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libnova/libnova.changes 2013-03-24 21:59:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libnova.new/libnova.changes 2014-06-01 19:40:41.000000000 +0200
@@ -1,0 +2,5 @@
+Wed May 28 05:29:26 UTC 2014 - crrodriguez(a)opensuse.org
+
+- disable doxyegn timestamps that break build-compare.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libnova.spec ++++++
--- /var/tmp/diff_new_pack.p4H86D/_old 2014-06-01 19:40:42.000000000 +0200
+++ /var/tmp/diff_new_pack.p4H86D/_new 2014-06-01 19:40:42.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libnova
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -66,7 +66,7 @@
%build
# Regenerate build system because of errors about libtool during compilation
autoreconf -vif
-
+echo 'HTML_TIMESTAMP=NO' >> doc/doxyfile.in
%configure --disable-static --with-pic
make CFLAGS+="%{optflags}" %{?_smp_mflags}
cd doc
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package openwsman for openSUSE:Factory checked in at 2014-06-01 19:40:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openwsman (Old)
and /work/SRC/openSUSE:Factory/.openwsman.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openwsman"
Changes:
--------
--- /work/SRC/openSUSE:Factory/openwsman/openwsman.changes 2014-05-15 19:13:00.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openwsman.new/openwsman.changes 2014-06-01 19:40:39.000000000 +0200
@@ -1,0 +2,21 @@
+Wed May 21 08:18:22 UTC 2014 - kkaempf(a)suse.com
+
+- Update to 2.4.7
+ - Bugfixes
+ - file authenticator: allow password hash of up to 128 characters
+ - libu: don't exit() on malloc errors
+
+-------------------------------------------------------------------
+Tue May 20 07:55:35 UTC 2014 - kkaempf(a)suse.com
+
+- Update to 2.4.6
+ - Features
+ - Support large hashes (like SHA512) in file authentication
+ - use constant-time password compare to prevent brute-force attacks
+ - Create server-plugin-ruby as separate RPM
+ - Add Unisys namespace and CIM class prefix 'SPAR'
+ - Bugfixes
+ - Fix crash on invalide resource URI
+ - Fix resource namespace for DCIM_ classes
+
+-------------------------------------------------------------------
Old:
----
openwsman-2.4.5.tar.bz2
New:
----
openwsman-2.4.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openwsman.spec ++++++
--- /var/tmp/diff_new_pack.Mk50ms/_old 2014-06-01 19:40:40.000000000 +0200
+++ /var/tmp/diff_new_pack.Mk50ms/_new 2014-06-01 19:40:40.000000000 +0200
@@ -114,7 +114,7 @@
%endif
Requires(pre): sed coreutils grep /bin/hostname
-Version: 2.4.5
+Version: 2.4.7
Release: 0
# Mandriva:
# Release %mkrel 1
++++++ openwsman-2.4.5.tar.bz2 -> openwsman-2.4.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/ChangeLog new/openwsman-2.4.7/ChangeLog
--- old/openwsman-2.4.5/ChangeLog 2014-03-14 11:03:31.000000000 +0100
+++ new/openwsman-2.4.7/ChangeLog 2014-05-21 09:46:52.000000000 +0200
@@ -1,3 +1,21 @@
+2.4.7
+- Bugfixes
+ - file authenticator: allow password hash of up to 128 characters
+ - libu: don't exit() on malloc errors
+
+2.4.6
+- Features
+ - Support large hashes (like SHA512) in file authentication
+ - use constant-time password compare to prevent brute-force attacks
+ - Create server-plugin-ruby as separate RPM
+ - Add Unisys namespace and CIM class prefix 'SPAR'
+ - Alias openwsman and openwsmand systemd services
+ - Also create respective rc-commands: rcopenwsman, rcopenwsmand
+ (SUSE only)
+- Bugfixes
+ - Fix crash on invalide resource URI
+ - Fix resource namespace for DCIM_ classes
+
2.4.5
- Features
- enforce SSL operation in systemd service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/VERSION.cmake new/openwsman-2.4.7/VERSION.cmake
--- old/openwsman-2.4.5/VERSION.cmake 2014-03-14 11:03:31.000000000 +0100
+++ new/openwsman-2.4.7/VERSION.cmake 2014-05-21 09:44:53.000000000 +0200
@@ -44,10 +44,10 @@
# set COMPATMINOR to MINOR. (binary incompatible change)
#
-# Package version 2.4.4
+# Package version 2.4.7
SET(OPENWSMAN_MAJOR "2")
SET(OPENWSMAN_MINOR "4")
-SET(OPENWSMAN_PATCH "5")
+SET(OPENWSMAN_PATCH "7")
# Plugin API 2.2
SET(OPENWSMAN_PLUGIN_API_MAJOR "2")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/bindings/openwsman.i new/openwsman-2.4.7/bindings/openwsman.i
--- old/openwsman-2.4.5/bindings/openwsman.i 2013-08-30 12:02:30.000000000 +0200
+++ new/openwsman-2.4.7/bindings/openwsman.i 2014-04-29 10:38:51.000000000 +0200
@@ -271,7 +271,9 @@
/* Microsoft HyperV */
{ 4, "Msvm", "http://schemas.microsoft.com/wbem/wsman/1/wmi" },
/* Dell DRAC */
- { 4, "DCIM", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2" },
+ { 4, "DCIM", "http://schemas.dell.com/wbem/wscim/1/cim-schema/2" },
+ /* Unisys */
+ { 4, "SPAR", "http://schema.unisys.com/wbem/wscim/1/cim-schema/2" },
{ 0, NULL, NULL }
};
const char *schema_end;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/etc/openwsman.conf new/openwsman-2.4.7/etc/openwsman.conf
--- old/openwsman-2.4.5/etc/openwsman.conf 2013-09-24 08:50:34.000000000 +0200
+++ new/openwsman-2.4.7/etc/openwsman.conf 2014-04-29 10:38:51.000000000 +0200
@@ -91,7 +91,7 @@
#indication_profile_implementation_ns = root/interop
# The following are in part fake namespaces for some publicly available CIM implementations.
-vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://…
+vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://…
# CIMOM host, default is localhost
# host = localhost
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/package/openwsman.spec.in new/openwsman-2.4.7/package/openwsman.spec.in
--- old/openwsman-2.4.5/package/openwsman.spec.in 2014-03-11 08:14:31.000000000 +0100
+++ new/openwsman-2.4.7/package/openwsman.spec.in 2014-05-07 09:04:35.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package openwsman
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -197,6 +197,16 @@
Openwsman Server and service libraries
+%package server-plugin-ruby
+Requires: openwsman-server
+Summary: Openwsman Server Plugin for Ruby extensions
+Group: System/Management
+
+%description server-plugin-ruby
+This package provides a Openwsman server plugin to write a
+WS-Management resource handler in Ruby
+
+
%package python
Summary: Python bindings for openwsman client API
Group: Development/Libraries/Python
@@ -339,14 +349,17 @@
rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/authenticators/*.la
[ -d $RPM_BUILD_ROOT%{ruby_sitelib} ] && rm -f $RPM_BUILD_ROOT%{ruby_sitelib}/openwsmanplugin.rb
[ -d $RPM_BUILD_ROOT%{ruby_vendorlib} ] && rm -f $RPM_BUILD_ROOT%{ruby_vendorlib}/openwsmanplugin.rb
-%if 0%{?suse_version} <= 1220
+%if 0%{?has_systemd}
+install -D -m 644 %{S:4} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+# alias openwsman and openwsmand
+ln -s %{_unitdir}/%{name}.service $RPM_BUILD_ROOT%{_unitdir}/%{name}d.service
+# rcopenwsman, rcopenwsmand
+ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
+ln -sf %{_sbindir}/rcopenwsman $RPM_BUILD_ROOT%{_sbindir}/rc%{name}d
+%else
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -m 755 build/etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openwsmand
ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
-%else
-# rcopenwsmand for systemd
-ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcopenwsman
-ln -sf %{_sbindir}/rcopenwsman $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
%endif
install -m 644 etc/openwsman.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
install -m 644 etc/openwsman_client.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
@@ -355,9 +368,6 @@
%if 0%{?suse_version} > 1010
install -D -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openwsman
%endif
-%if 0%{?has_systemd}
-install -D -m 644 %{S:4} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
-%endif
%post -n libwsman1 -p /sbin/ldconfig
@@ -476,10 +486,13 @@
%if 0%{?suse_version} > 1010
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openwsman
%endif
-%if 0%{?suse_version} <= 1210
-%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
+%if 0%{?has_systemd}
+%{_unitdir}/%{name}.service
+%{_unitdir}/%{name}d.service
+%{_sbindir}/rc%{name}
+%{_sbindir}/rc%{name}d
%else
-%{_sbindir}/rcopenwsman
+%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
%endif
# backwards compatibility
%{_sbindir}/rcopenwsmand
@@ -490,11 +503,13 @@
%dir %{_libdir}/openwsman/plugins
%{_libdir}/openwsman/plugins/*.so
%{_libdir}/openwsman/plugins/*.so.*
+%exclude %{_libdir}/openwsman/plugins/*ruby*.so*
%{_sbindir}/openwsmand
%{_libdir}/libwsman_server.so.*
-%if 0%{?has_systemd}
-%{_unitdir}/%{name}.service
-%endif
+
+%files server-plugin-ruby
+%defattr(-,root,root)
+%{_libdir}/openwsman/plugins/*ruby*.so
%files -n libwsman_clientpp1
%defattr(-,root,root)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/src/authenticators/file/file_auth.c new/openwsman-2.4.7/src/authenticators/file/file_auth.c
--- old/openwsman-2.4.5/src/authenticators/file/file_auth.c 2010-09-29 15:17:53.000000000 +0200
+++ new/openwsman-2.4.7/src/authenticators/file/file_auth.c 2014-05-21 09:43:25.000000000 +0200
@@ -70,14 +70,31 @@
return 0;
}
+/*
+ * constant-time comparison to prevent brute-force attacks on authorize()
+ *
+ * returns zero only if s1 and s2 are bit-wise identical for the first len characters.
+ */
+static int
+safe_cmp(unsigned const char *s1, unsigned const char *s2, size_t len)
+{
+ size_t i = 0;
+ unsigned char result = 0;
+ while (i++ < len) {
+ result |= *s1++ ^ *s2++;
+ }
+ return result;
+}
int
authorize(char *username, const char *password)
{
int authorized = 0;
- char l[256], u[65], passwd[65];
+ char l[256], u[65], passwd[129];
char *newpw = NULL ;
+ size_t username_l;
+ size_t min_len;
debug( "Checking basic for user: %s; password XXXXX",
username);
@@ -88,6 +105,7 @@
username);
return 0;
}
+ username_l = strlen(username);
FILE *fp = fopen(filename, "r");
if (!fp) {
debug( "Couldn't open basic passwd file %s",
@@ -96,13 +114,23 @@
}
while (fgets(l, sizeof(l), fp) != NULL) {
- if (sscanf(l, "%64[^:]:%64s", u, passwd) != 2)
+ if (sscanf(l, "%64[^:]:%128s", u, passwd) != 2)
continue; /* Ignore malformed lines */
debug( "user: %s, passwd: XXXX", u);
- if (!strcmp(username, u)) {
+ min_len = strlen(u);
+ if (username_l < min_len) {
+ min_len = username_l;
+ }
+ if (!safe_cmp(username, u, min_len)) {
+ size_t newpw_l;
+ min_len = strlen(passwd);
newpw = crypt(password, passwd);
+ newpw_l = strlen(newpw);
+ if (newpw_l < min_len) {
+ min_len = newpw_l;
+ }
debug( "user: %s, passwd: XXXXX", u );
- authorized = ( strcmp (newpw, passwd) == 0 );
+ authorized = ( safe_cmp (newpw, passwd, min_len) == 0 );
break;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/src/lib/u/iniparser.c new/openwsman-2.4.7/src/lib/u/iniparser.c
--- old/openwsman-2.4.5/src/lib/u/iniparser.c 2014-02-27 15:21:20.000000000 +0100
+++ new/openwsman-2.4.7/src/lib/u/iniparser.c 2014-05-20 11:53:13.000000000 +0200
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>
#ifndef WIN32
#include <unistd.h>
#endif
@@ -320,10 +321,12 @@
content to NULL is equivalent to deleting the variable from the
dictionary. It is not possible (in this implementation) to have a key in
the dictionary without value.
+
+ return 0 on success, non-zero on failure.
*/
/*--------------------------------------------------------------------------*/
-static void dictionary_set(dictionary * d, char * key, char * val)
+static int dictionary_set(dictionary * d, char * key, char * val)
{
int i ;
unsigned hash ;
@@ -355,14 +358,20 @@
/* Reached maximum size: reallocate blackboard */
d->val = (char **)mem_double(d->val, d->size * sizeof(char*)) ;
- if (d->val == NULL)
- exit(1);
+ if (d->val == NULL) {
+ errno = -ENOMEM;
+ return 1;
+ }
d->key = (char **)mem_double(d->key, d->size * sizeof(char*)) ;
- if (d->key == NULL)
- exit(1);
+ if (d->key == NULL) {
+ errno = -ENOMEM;
+ return 1;
+ }
d->hash = (unsigned int *)mem_double(d->hash, d->size * sizeof(unsigned)) ;
- if (d->hash == NULL)
- exit(1);
+ if (d->hash == NULL) {
+ errno = -ENOMEM;
+ return 1;
+ }
/* Double size */
d->size *= 2 ;
@@ -377,10 +386,21 @@
}
/* Copy key */
d->key[i] = strdup(key);
- d->val[i] = val ? strdup(val) : NULL ;
+ if (d->key[i] == NULL) {
+ return 1;
+ }
+ if (val) {
+ d->val[i] = strdup(val);
+ if (d->val[i] == NULL) {
+ return 1;
+ }
+ }
+ else {
+ d->val[i] = NULL;
+ }
d->hash[i] = hash;
d->n ++ ;
- return ;
+ return 0;
}
/*-------------------------------------------------------------------------*/
@@ -466,8 +486,10 @@
#define ASCIILINESZ 1024
#define INI_INVALID_KEY ((char*)-1)
-/* Private: add an entry to the dictionary */
-static void iniparser_add_entry(
+/* Private: add an entry to the dictionary
+ return 0 on success, non-zero on error
+ */
+static int iniparser_add_entry(
dictionary * d,
char * sec,
char * key,
@@ -483,8 +505,7 @@
}
/* Add (key,val) to dictionary */
- dictionary_set(d, longkey, val);
- return ;
+ return dictionary_set(d, longkey, val);
}
@@ -833,8 +854,7 @@
int iniparser_setstr(dictionary * ini, char * entry, char * val)
{
- dictionary_set(ini, strlwc(entry), val);
- return 0 ;
+ return dictionary_set(ini, strlwc(entry), val);
}
/*-------------------------------------------------------------------------*/
@@ -901,7 +921,9 @@
if (sscanf(where, "[%[^]]", sec)==1) {
/* Valid section name */
strcpy(sec, strlwc(sec));
- iniparser_add_entry(d, sec, NULL, NULL);
+ if (iniparser_add_entry(d, sec, NULL, NULL) != 0) {
+ return NULL;
+ }
} else if (sscanf (where, "%[^=] = \"%[^\"]\"", key, val) == 2
|| sscanf (where, "%[^=] = '%[^\']'", key, val) == 2
|| sscanf (where, "%[^=] = %[^;#]", key, val) == 2) {
@@ -915,7 +937,9 @@
} else {
strcpy(val, strcrop(val));
}
- iniparser_add_entry(d, sec, key, val);
+ if (iniparser_add_entry(d, sec, key, val) != 0) {
+ return NULL;
+ }
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/src/lib/u/uoption.c new/openwsman-2.4.7/src/lib/u/uoption.c
--- old/openwsman-2.4.5/src/lib/u/uoption.c 2010-09-29 15:17:53.000000000 +0200
+++ new/openwsman-2.4.7/src/lib/u/uoption.c 2014-05-21 10:11:12.000000000 +0200
@@ -199,8 +199,6 @@
print_help_buf(&help_buf);
free_help_buf(&help_buf);
-
- exit (0);
}
static void print_long_help(u_option_context_t *ctx, char *hoption)
@@ -260,8 +258,6 @@
print_help_buf(&help_buf);
free_help_buf(&help_buf);
-
- exit (0);
}
static unsigned int context_get_number_entries(u_option_context_t *ctx)
@@ -418,6 +414,7 @@
if (!strncmp(option, "help", strlen("help")) ) {
if (ctx->mode & U_OPTION_CONTEXT_HELP_ENABLED) {
print_long_help(ctx, option);
+ return NULL;
}
}
@@ -455,6 +452,7 @@
if (option == '?') {
if (ctx->mode & U_OPTION_CONTEXT_HELP_ENABLED) {
print_short_help(ctx);
+ return NULL;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openwsman-2.4.5/src/plugins/cim/sfcc-interface.c new/openwsman-2.4.7/src/plugins/cim/sfcc-interface.c
--- old/openwsman-2.4.5/src/plugins/cim/sfcc-interface.c 2013-08-08 09:46:43.000000000 +0200
+++ new/openwsman-2.4.7/src/plugins/cim/sfcc-interface.c 2014-03-20 13:50:56.000000000 +0100
@@ -1141,7 +1141,14 @@
epr_t *epr;
if (filter) {
epr = (epr_t *)filter->epr;
- class = strrchr(epr->refparams.uri, '/') + 1;
+ class = strrchr(epr->refparams.uri, '/');
+ if (class == NULL) {
+ /* oops, resource uri has no slash ?! */
+ status->fault_code = WSA_ENDPOINT_UNAVAILABLE;
+ status->fault_detail_code = WSMAN_DETAIL_INVALID_RESOURCEURI;
+ goto cleanup;
+ }
+ class++; /* inc behind slash */
objectpath = newCMPIObjectPath(client->cim_namespace,
class, NULL);
wsman_epr_selector_cb(filter->epr,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package virtualbox for openSUSE:Factory checked in at 2014-06-01 19:40:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virtualbox (Old)
and /work/SRC/openSUSE:Factory/.virtualbox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virtualbox"
Changes:
--------
--- /work/SRC/openSUSE:Factory/virtualbox/virtualbox.changes 2014-05-06 17:43:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.virtualbox.new/virtualbox.changes 2014-06-01 19:40:37.000000000 +0200
@@ -1,0 +2,31 @@
+Tue May 27 18:46:58 UTC 2014 - mseben(a)gmail.com
+
+- Update ot version 4.3.12:
+ + VMM: fixed an occasional Guru Meditation (Mac OS X hosts only; bugs #12727, #12954)
+ + VMM: fixed a rare condition that would fail to invalidate guest TLB entries or would invalidate them when not required (Windows hosts only)
+ + VMM: fixed a VERR_NOT_SUPPORTED Guru Meditation seen with certain guests, e.g. OpenServer 5.0.7
+ + VMM: more fixes for MSR emulation on certain hardware (tickets #12240, #12875)
+ + GUI: fixed mouse positioning with mouse integration disabled and multiple guest screens (Windows hosts only; bug #9059)
+ + GUI: fixed crash in VM manager (bug #12878)
+ + GUI: fixed crash under rare conditions on entering/exiting fullscreen/seamless mode
+ + Shared Clipboard: don't stop working after taking a snapshot (bug #12700)
+ + AHCI: fixed a crash under rare circumstances
+ + API: fixed a hang during VM shutdown under rare conditions
+ + NAT: fixed generation of malformed ICMP error datagrams (4.3.10 regression)
+ + NAT: fixed potential crash in DNS proxy
+ + NAT Network: don't drop port forwarding rules after some time
+ + NAT: fixed ARP cache corruption and network loss in Windows guest caused by iSCSI service activity
+ + USB: improved check if a storage device is currently mounted to the host when the device is about to be attached to the VM (Mac OS X hosts only; #11038)
+ + 3D support: several fixes, including better support for Ubuntu 14.04
+ + VRDP: fixed a potential crash on client disconnect (bug #12858)
+ + VBoxSVC: fixed a race when a new client is started a few seconds after the last client terminated (Windows hosts only; bugs #11309, #12509)
+ + VBoxSVC: fixed VirtualBox.xml registry corruption after VM renaming
+ + VBoxSVC: fixed a potential crash caused by incorrect USB device filter (Mac OS X hosts only; #11038)
+ + Windows hosts: partly support 32-bit COM on 64-bit systems
+ + Windows host installer: implemented merge module (msm) support
+ + Linux hosts: fixed dependency of boot script on older Debian systems (bug #12262)
+ + Linux guests: fix symbolic link to shared folder helper (bug #12879)
+ + Linux Additions: don't crash VBoxService during guest execute for users without a password (bug #12994)
+ + Linux Additions: fixed a bug in guest execution where the guest process terminated with VERR_INTERRUPTED to the host
+
+-------------------------------------------------------------------
Old:
----
VirtualBox-4.3.10-patched.tar.bz2
virtualbox-4.3.10-UserManual.pdf
New:
----
VirtualBox-4.3.12-patched.tar.bz2
virtualbox-4.3.12-UserManual.pdf
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virtualbox.spec ++++++
--- /var/tmp/diff_new_pack.1vEHv6/_old 2014-06-01 19:40:39.000000000 +0200
+++ /var/tmp/diff_new_pack.1vEHv6/_new 2014-06-01 19:40:39.000000000 +0200
@@ -94,7 +94,7 @@
%endif
#
ExclusiveArch: %ix86 x86_64
-Version: 4.3.10
+Version: 4.3.12
Release: 0
Summary: VirtualBox is an Emulator
License: GPL-2.0+
++++++ VirtualBox-4.3.10-patched.tar.bz2 -> VirtualBox-4.3.12-patched.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/virtualbox/VirtualBox-4.3.10-patched.tar.bz2 /work/SRC/openSUSE:Factory/.virtualbox.new/VirtualBox-4.3.12-patched.tar.bz2 differ: char 11, line 1
++++++ virtualbox-4.3.10-UserManual.pdf -> virtualbox-4.3.12-UserManual.pdf ++++++
(binary differes)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package lio-utils for openSUSE:Factory checked in at 2014-06-01 19:40:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lio-utils (Old)
and /work/SRC/openSUSE:Factory/.lio-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lio-utils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/lio-utils/lio-utils.changes 2014-05-02 13:59:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lio-utils.new/lio-utils.changes 2014-06-01 19:40:29.000000000 +0200
@@ -1,0 +2,5 @@
+Wed May 21 12:11:25 UTC 2014 - jsegitz(a)novell.com
+
+- added necessary macros for systemd files
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lio-utils.spec ++++++
--- /var/tmp/diff_new_pack.dmxhQX/_old 2014-06-01 19:40:32.000000000 +0200
+++ /var/tmp/diff_new_pack.dmxhQX/_new 2014-06-01 19:40:32.000000000 +0200
@@ -224,6 +224,16 @@
%insserv_cleanup target
%endif
+%pre
+%if 0%{?suse_version} > 1220
+ %service_add_pre target.service
+%endif
+
+%post
+%if 0%{?suse_version} > 1220
+ %service_add_post target.service
+%endif
+
%files
%defattr(-,root,root,-)
%if %{?suse_version} > 1220
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2014-06-01 19:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
and /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh"
Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2014-05-23 07:51:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2014-06-01 19:40:23.000000000 +0200
@@ -1,0 +2,9 @@
+Tue May 27 18:13:25 UTC 2014 - kgronlund(a)suse.com
+
+- high: cibconfig: adjust attributes when adding operations (bnc#880052)
+- high: parse: Support id-ref in nvpairs (fate#316118)
+- low: ui_configure: Add --force flag to configure delete
+- low: ui_resource: Allow untrace without explicit interval
+- upstream: 2.0.0-93-g29c4073
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.e9PSHG/_old 2014-06-01 19:40:25.000000000 +0200
+++ /var/tmp/diff_new_pack.e9PSHG/_new 2014-06-01 19:40:25.000000000 +0200
@@ -41,7 +41,7 @@
Summary: High Availability cluster command-line interface
License: GPL-2.0+
Group: %{pkg_group}
-Version: 2.0+git88
+Version: 2.0+git93
Release: %{?crmsh_release}%{?dist}
Url: http://crmsh.github.io
Source0: crmsh.tar.bz2
++++++ crmsh.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/doc/crm.8.txt new/crmsh/doc/crm.8.txt
--- old/crmsh/doc/crm.8.txt 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/doc/crm.8.txt 2014-05-27 20:11:56.000000000 +0200
@@ -2146,6 +2146,79 @@
true, explicitly set `sequential` in a parenthesis set:
`A B ( C D sequential=true )`.
+==== References in attribute lists
+
+Attribute lists are used to set attributes and parameters for
+resources, constraints and property definitions. For example, to set
+the virtual IP used by an `IPAddr` resource the attribute `ip` can be
+set in an attribute list for that resource.
+
+Attribute lists can have identifiers that name them, and other
+resources can reuse the same attribute list by referring to that name
+using an `$id-ref`. For example, the following statement defines a
+simple dummy resource with an attribute list which sets the parameter
+`state to the value 1 and sets the identifier for the attribute list
+to `on-state`:
+
+..............
+primitive dummy-1 Dummy params $id=on-state state=1
+..............
+
+To refer to this attribute list from a different resource, refer to
+the `on-state` name using an id-ref:
+
+..............
+primitive dummy-2 Dummy params $id-ref=on-state
+..............
+
+The resource `dummy-2` will now also have the parameter `state` set to the value 1.
+
+===== Referencing individual attributes
+
+In some cases, referencing complete attribute lists is too
+coarse-grained, for example if two different parameters with different
+names should have the same value set. Instead of having to copy the
+value in multiple places, it is possible to create references to
+individual attributes in attribute lists.
+
+To name an attribute in order to be able to refer to it later, prefix
+the attribute name with a `$` character (as seen above with the
+special names `$id` and `$id-ref`:
+
+............
+primitive dummy-1 Dummy params $state=1
+............
+
+The identifier `state` can now be used to refer to this attribute from other
+primitives, using the `@<id>` syntax:
+
+............
+primitive dummy-2 Dummy params @state
+............
+
+In some cases, using the attribute name as the identifier doesn't work
+due to name clashes. In this case, the syntax `$<id>:<name>=<value>`
+can be used to give the attribute a different identifier:
+
+............
+primitive dummy-1 params $dummy-state-on:state=1
+primitive dummy-2 params @state
+............
+
+There is also the possibility that two resources both use the same
+attribute value but with different names. For example, a web server
+may have a parameter `server_ip` for setting the IP address where it
+listens for incoming requests, and a virtual IP resource may have a
+parameter called `ip` which sets the IP address it creates. To
+configure these two resources with an IP without repeating the value,
+the reference can be given a name using the syntax `@<id>:<name>`.
+
+Example:
+............
+primitive virtual-ip IPaddr2 params $vip:ip=192.168.1.100
+primitive webserver apache params @vip:server_ip
+............
+
[[cmdhelp_configure_node,define a cluster node]]
==== `node`
@@ -2861,9 +2934,12 @@
in that container, then the container is deleted as well. Any
related constraints are removed as well.
+If the object is a started resource, it will not be deleted unless the
+`--force` flag is passed to the command, or the `force` option is set.
+
Usage:
...............
-delete <id> [<id>...]
+delete [--force] <id> [<id>...]
...............
[[cmdhelp_configure_default-timeouts,set timeouts for operations to minimums from the meta-data]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cibconfig.py new/crmsh/modules/cibconfig.py
--- old/crmsh/modules/cibconfig.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/cibconfig.py 2014-05-27 20:11:56.000000000 +0200
@@ -41,7 +41,7 @@
from utils import ext_cmd, safe_open_w, pipe_string, safe_close_w, crm_msec
from utils import ask, lines2cli, olist
from utils import page_string, cibadmin_can_patch, str2tmp
-from utils import run_ptest, is_id_valid, edit_file, get_boolean, filter_string, find_value
+from utils import run_ptest, is_id_valid, edit_file, get_boolean, filter_string
from ordereddict import odict
from xmlutil import is_child_rsc, rsc_constraint, sanitize_cib, rename_id, get_interesting_nodes
from xmlutil import is_pref_location, get_topnode, new_cib, get_rscop_defaults_meta_node
@@ -56,7 +56,7 @@
from xmlutil import get_rsc_operations, delete_rscref, xml_equals, lookup_node, RscState
from xmlutil import cibtext2elem
from cliformat import get_score, nvpairs2list, abs_pos_score, cli_acl_roleref, nvpair_format
-from cliformat import cli_acl_rule, rsc_set_constraint, get_kind, head_id_format
+from cliformat import cli_nvpair, cli_acl_rule, rsc_set_constraint, get_kind, head_id_format
from cliformat import cli_operations, simple_rsc_constraint, cli_rule, cli_format
@@ -197,21 +197,19 @@
tonode.append(copy.deepcopy(cnode))
def copy_nvpair(nvp):
+ if 'value' not in nvp:
+ tonode.append(copy.deepcopy(nvp))
+ return
n = nvp.get('name')
for nvp2 in tonode:
if nvp2.get('name') == n:
nvp2.set('value', nvp.get('value'))
break
else:
- m = etree.SubElement(tonode,
- 'nvpair',
- name=n,
- value=nvp.get('value'))
- if 'id' in nvp.attrib:
- m.set('id', nvp.get('id'))
- else:
- m.set('id', idmgmt.new(m, id_hint))
+ m = copy.deepcopy(nvp)
tonode.append(m)
+ if 'id' not in m.attrib:
+ m.set('id', idmgmt.new(m, id_hint))
def copy_id(node):
nid = node.get('id')
@@ -469,18 +467,19 @@
for a in r_node.iterchildren("instance_attributes"):
for p in a.iterchildren("nvpair"):
name = p.get("name")
+ value = p.get("value")
# don't fail if the meta-data doesn't contain the
# expected attributes
- try:
- if ra_params[name].get("unique") == "1":
- value = p.get("value")
- k = (ra_class, ra_provider, ra_type, name, value)
- try:
- clash_dict[k].append(ra_id)
- except KeyError:
- clash_dict[k] = [ra_id]
- except KeyError:
- pass
+ if value is not None:
+ try:
+ if ra_params[name].get("unique") == "1":
+ k = (ra_class, ra_provider, ra_type, name, value)
+ try:
+ clash_dict[k].append(ra_id)
+ except KeyError:
+ clash_dict[k] = [ra_id]
+ except KeyError:
+ pass
return
# we check the whole CIB for clashes as a clash may originate between
# an object already committed and a new one
@@ -764,12 +763,42 @@
recurse(node, oldnode, hint_map.get(node.tag, ''))
+def resolve_idref(node):
+ """
+ resolve id-ref references that refer
+ to object ids, not attribute lists
+ """
+ id_ref = node.get('id-ref')
+ attr_list_type = node.tag
+ obj = cib_factory.find_object(id_ref)
+ if obj:
+ nodes = obj.node.xpath(".//%s" % attr_list_type)
+ if len(nodes) > 1:
+ common_warn("%s contains more than one %s, using first" %
+ (obj.obj_id, attr_list_type))
+ if len(nodes) > 0:
+ node_id = nodes[0].get("id")
+ if node_id:
+ return node_id
+ target = cib_factory.get_cib().xpath('.//*[@id="%s"]' % (id_ref))
+ if len(target) == 0:
+ common_err("Reference not found: %s" % id_ref)
+ elif len(target) > 1:
+ common_err("Ambiguous reference to %s" % id_ref)
+ return id_ref
+
+
def resolve_references(node):
"""
In the output from parse(), there are
possible references to other nodes in
the CIB. This resolves those references.
"""
+ idrefnodes = node.xpath('.//*[@id-ref]')
+ if 'id-ref' in node.attrib:
+ idrefnodes += [node]
+ for ref in idrefnodes:
+ ref.set('id-ref', resolve_idref(ref))
for ref in node.iterchildren('crmsh-ref'):
child_id = ref.get('id')
obj = cib_factory.find_object(child_id)
@@ -1002,9 +1031,9 @@
for c in node.iterchildren():
if c.tag == "rule":
- ret += "%s %s " % (clidisplay.keyword("rule"), cli_rule(c, cib_factory.is_id_refd))
+ ret += "%s %s " % (clidisplay.keyword("rule"), cli_rule(c))
elif c.tag == "nvpair":
- ret += "%s " % (nvpair_format(c.get("name"), c.get("value")))
+ ret += "%s " % (cli_nvpair(c))
if ret[-1] == ' ':
ret = ret[:-1]
return ret
@@ -1338,7 +1367,8 @@
for p in self.node.xpath("instance_attributes/nvpair"):
n = p.get("name")
v = p.get("value")
- self.set_attr(n, v)
+ if n is not None and v is not None:
+ self.set_attr(n, v)
def mkxml(self):
# create an xml node
@@ -1348,8 +1378,9 @@
idmgmt.remove_xml(self.node)
self.node = etree.Element(self.elem_type)
inst_attr = {}
+ valid_attrs = olist(schema.get('attr', 'op', 'a'))
for n, v in self.attr_d.iteritems():
- if n in olist(schema.get('attr', 'op', 'a')):
+ if n in valid_attrs:
self.node.set(n, v)
else:
inst_attr[n] = v
@@ -1408,6 +1439,20 @@
# create an xml node
if 'id' not in node.attrib:
idmgmt.set(node, None, self.obj_id)
+ valid_attrs = olist(schema.get('attr', 'op', 'a'))
+ inst_attr = {}
+ for attr in node.attrib.keys():
+ if attr not in valid_attrs:
+ inst_attr[attr] = node.attrib[attr]
+ del node.attrib[attr]
+ if inst_attr:
+ attr_nodes = node.xpath('./instance_attributes')
+ if len(attr_nodes) == 1:
+ fill_nvpairs("instance_attributes", attr_nodes[0], inst_attr, node.get("id"))
+ else:
+ nia = mkxmlnvpairs("instance_attributes", inst_attr, node.get("id"))
+ node.append(nia)
+
self._append_op(node)
comments = find_comment_nodes(node)
for comment in comments:
@@ -1635,7 +1680,7 @@
def _repr_cli_child(self, c, format):
if c.tag == "rule":
return "%s %s" % \
- (clidisplay.keyword("rule"), cli_rule(c, cib_factory.is_id_refd))
+ (clidisplay.keyword("rule"), cli_rule(c))
def check_sanity(self):
'''
@@ -1836,9 +1881,9 @@
def _repr_cli_child(self, c, format):
if c.tag == "rule":
return ' '.join((clidisplay.keyword("rule"),
- cli_rule(c, cib_factory.is_id_refd)))
+ cli_rule(c)))
elif c.tag == "nvpair":
- return nvpair_format(c.get("name"), c.get("value"))
+ return cli_nvpair(c)
else:
return ''
@@ -2034,11 +2079,7 @@
def can_migrate(node):
- for c in node.iterchildren("meta_attributes"):
- pl = nvpairs2list(c)
- if find_value(pl, "allow-migrate") == "true":
- return True
- return False
+ return 'true' in node.xpath('.//nvpair[@name="allow-migrate"]/@value')
cib_upgrade = "cibadmin --upgrade --force"
@@ -2648,7 +2689,10 @@
return rc
def is_id_refd(self, attr_list_type, id):
- '''Is this ID referenced anywhere?'''
+ '''
+ Is this ID referenced anywhere?
+ Used from cliformat
+ '''
try:
return self.id_refs[id] == attr_list_type
except KeyError:
@@ -2661,36 +2705,32 @@
one, i.e. if the former is the case to find the right
id to reference.
'''
- obj = self.find_object(id_ref)
self.id_refs[id_ref] = attr_list_type
+ obj = self.find_object(id_ref)
if obj:
- node_l = obj.node.xpath(".//%s" % attr_list_type)
- if node_l:
- if len(node_l) > 1:
- common_warn("%s contains more than one %s, using first" %
- (obj.obj_id, attr_list_type))
- id = node_l[0].get("id")
- if not id:
- common_err("%s reference not found" % id_ref)
- return id_ref # hope that user will fix that
- return id
- # verify if id_ref exists
- node_l = self.cib_elem.xpath(".//%s" % attr_list_type)
- for node in node_l:
- if node.get("id") == id_ref:
- return id_ref
- common_err("%s reference not found" % id_ref)
- return id_ref # hope that user will fix that
+ nodes = obj.node.xpath(".//%s" % attr_list_type)
+ if len(nodes) > 1:
+ common_warn("%s contains more than one %s, using first" %
+ (obj.obj_id, attr_list_type))
+ if len(nodes) > 0:
+ node_id = nodes[0].get("id")
+ if node_id:
+ return node_id
+ target = self.cib_elem.xpath('.//*[@id="%s"]' % (id_ref))
+ if len(target) == 0:
+ common_err("Reference not found: %s" % id_ref)
+ elif len(target) > 1:
+ common_err("Ambiguous reference to %s" % id_ref)
+ return id_ref
def _get_attr_value(self, obj_type, attr):
if not self.is_cib_sane():
return None
for obj in self.cib_objects:
if obj.obj_type == obj_type and obj.node is not None:
- pl = nvpairs2list(obj.node)
- v = find_value(pl, attr)
- if v:
- return v
+ for n in nvpairs2list(obj.node):
+ if n.get('name') == attr:
+ return n.get('value')
return None
def get_property(self, property):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cliformat.py new/crmsh/modules/cliformat.py
--- old/crmsh/modules/cliformat.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/cliformat.py 2014-05-27 20:11:56.000000000 +0200
@@ -17,7 +17,6 @@
import constants
import clidisplay
-from msg import common_err, node_debug
import utils
import xmlutil
@@ -68,61 +67,74 @@
return '%s="%s"' % (clidisplay.attr_name(n), clidisplay.attr_value(v))
-def cli_pairs(pl):
- 'Return a string of name="value" pairs (passed in a list of pairs).'
- l = []
- for n, v in pl:
- l.append(nvpair_format(n, v))
- return ' '.join(l)
+def cli_nvpair(nvp):
+ 'Converts an nvpair tag to CLI syntax'
+ from cibconfig import cib_factory
+ nodeid = nvp.get('id')
+ idref = nvp.get('id-ref')
+ name = nvp.get('name')
+ if idref is not None:
+ if name is not None:
+ return '@%s:%s' % (idref, name)
+ return '@%s' % (idref)
+ elif nodeid is not None and cib_factory.is_id_refd(nvp.tag, nodeid):
+ return '$%s:%s' % (nodeid, nvpair_format(name, nvp.get('value')))
+ return nvpair_format(name, nvp.get('value'))
+
+
+def cli_nvpairs(nvplist):
+ 'Return a string of name="value" pairs (passed in a list of nvpairs).'
+ return ' '.join([cli_nvpair(nvp) for nvp in nvplist])
def nvpairs2list(node, add_id=False):
'''
- Convert nvpairs to a list of pairs.
+ Convert an attribute node to a list of nvpairs.
+ Also converts an id-ref or id into plain nvpairs.
The id attribute is normally skipped, since they tend to be
long and therefore obscure the relevant content. For some
elements, however, they are included (e.g. properties).
'''
- pl = []
- # if there's id-ref, there can be then _only_ id-ref
- value = node.get("id-ref")
- if value:
- pl.append(["$id-ref", value])
- return pl
- if add_id or \
- (not len(node) and len(node.attrib) == 1):
- value = node.get("id")
- if value:
- pl.append(["$id", value])
- for c in node.iterchildren():
- if c.tag == "attributes":
- pl = nvpairs2list(c)
- elif c.tag == "rule" or xmlutil.is_comment(c):
- # skip rule expressions and comments
- continue
- elif c.tag != "nvpair":
- node_debug("expected nvpair got", c)
- continue
- pl.append([c.get("name"), c.get("value")])
- return pl
+ import xmlbuilder
+
+ ret = []
+ if 'id-ref' in node:
+ ret.append(xmlbuilder.nvpair('$id-ref', node.get('id-ref')))
+ nvpairs = node.xpath('./nvpair | ./attributes/nvpair')
+ if 'id' in node and (add_id or len(nvpairs) == 0):
+ ret.append(xmlbuilder.nvpair('$id', node.get('id')))
+ ret.extend(nvpairs)
+ return ret
+
+
+def cli_attributes(node, add_id=False):
+ '''
+ Convert an attribute tag to CLI syntax
+ Does not honor possible <rule> tags
+ '''
+ return ' '.join([cli_nvpair(nvp)
+ for nvp in nvpairs2list(node, add_id=add_id)])
def op_instattr(node):
+ """
+ Return nvpairs in <op><instance_attributes>...
+ """
pl = []
- for c in node.iterchildren():
- if c.tag != "instance_attributes":
- common_err("only instance_attributes are supported in operations")
- else:
- pl += nvpairs2list(c)
+ for c in node.xpath('./instance_attributes'):
+ pl.extend(nvpairs2list(c))
return pl
def cli_op(node):
+ "CLI format for an <op> tag"
action, pl = xmlutil.op2list(node)
if not action:
return ""
- pl += op_instattr(node)
- return "%s %s %s" % (clidisplay.keyword("op"), action, cli_pairs(pl))
+ ret = ["%s %s" % (clidisplay.keyword("op"), action)]
+ ret += [nvpair_format(n, v) for n, v in pl]
+ ret += [cli_nvpair(v) for v in op_instattr(node)]
+ return ' '.join(ret)
def date_exp2cli(node):
@@ -137,16 +149,12 @@
else:
if operation == 'in_range':
for name in constants.in_range_attrs:
- v = node.get(name)
- if v:
- l.append(nvpair_format(name, v))
+ if name in node.attrib:
+ l.append(nvpair_format(name, node.attrib[name]))
for c in node.iterchildren():
if c.tag in ("duration", "date_spec"):
- pl = []
- for name in c.keys():
- if name != "id":
- pl.append([name, c.get(name)])
- l.append(cli_pairs(pl))
+ l.extend([nvpair_format(name, c.get(name))
+ for name in c.keys() if name != 'id'])
return ' '.join(l)
@@ -214,10 +222,11 @@
return (" %s " % clidisplay.keyword(bool_op)).join(exp)
-def cli_rule(node, is_id_refd):
+def cli_rule(node):
+ from cibconfig import cib_factory
s = []
node_id = node.get("id")
- if node_id and is_id_refd(node.tag, node_id):
+ if node_id and cib_factory.is_id_refd(node.tag, node_id):
s.append('$id="%s"' % node_id)
else:
idref = node.get("id-ref")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/parse.py new/crmsh/modules/parse.py
--- old/crmsh/modules/parse.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/parse.py 2014-05-27 20:11:56.000000000 +0200
@@ -37,7 +37,9 @@
class BaseParser(object):
- _NVPAIR_RE = re.compile(r'([^=]+)=(.+)$')
+ _NVPAIR_RE = re.compile(r'([^=(a)$][^=]*)=(.+)$')
+ _NVPAIR_ID_RE = re.compile(r'\$([^:=]+)(?::(.+))?=(.+)$')
+ _NVPAIR_REF_RE = re.compile(r'@([^:]+)(?::(.+))?$')
_IDENT_RE = re.compile(r'([a-z0-9_#$-][^=]*)$', re.IGNORECASE)
_DISPATCH_RE = re.compile(r'[a-z0-9_]+$', re.IGNORECASE)
_DESC_RE = re.compile(r'description=(.+)$', re.IGNORECASE)
@@ -170,13 +172,13 @@
def match_nvpairs_bykey(self, valid_keys, minpairs=1):
"""
- matches string of p=v tokens, but only
- if p is in valid_keys
+ matches string of p=v tokens, but only if p is in valid_keys
+ Returns list of <nvpair> tags
"""
_KEY_RE = re.compile(r'(%s)=(.+)$' % '|'.join(valid_keys))
ret = []
while self.try_match(_KEY_RE):
- ret.append([self.matched(1), self.matched(2)])
+ ret.append(xmlbuilder.nvpair(self.matched(1), self.matched(2)))
if len(ret) < minpairs:
if minpairs == 1:
self.err("Expected at least one name-value pair")
@@ -187,10 +189,22 @@
def match_nvpairs(self, minpairs=1):
"""
Matches string of p=v tokens
+ Returns list of <nvpair> tags
"""
ret = []
- while self.try_match(self._NVPAIR_RE):
- ret.append([self.matched(1), self.matched(2)])
+ while True:
+ if self.try_match(self._NVPAIR_REF_RE):
+ ret.append(xmlbuilder.nvpair_ref(self.matched(1),
+ self.matched(2)))
+ elif self.try_match(self._NVPAIR_ID_RE):
+ ret.append(xmlbuilder.nvpair_id(self.matched(1),
+ self.matched(2),
+ self.matched(3)))
+ elif self.try_match(self._NVPAIR_RE):
+ ret.append(xmlbuilder.nvpair(self.matched(1),
+ self.matched(2)))
+ else:
+ break
if len(ret) < minpairs:
if minpairs == 1:
self.err("Expected at least one name-value pair")
@@ -544,19 +558,17 @@
op_type = self.match(self._OPTYPE_RE, errmsg="Expected operation type")
all_attrs = self.match_nvpairs(minpairs=0)
node = xmlbuilder.new('op', name=op_type)
- if not any(k.lower() == 'interval' for k, _ in all_attrs):
- all_attrs.append(('interval', '0'))
- valid_attrs = set(self.validation.op_attributes())
+ if not any(nvp.get('name') == 'interval' for nvp in all_attrs):
+ all_attrs.append(xmlbuilder.nvpair('interval', '0'))
+ valid_attrs = self.validation.op_attributes()
inst_attrs = None
- for n, v in all_attrs:
- if n in valid_attrs:
- node.set(n, v)
-
- for n, v in all_attrs:
- if n not in valid_attrs:
+ for nvp in all_attrs:
+ if nvp.get('name') in valid_attrs:
+ node.set(nvp.get('name'), nvp.get('value'))
+ else:
if inst_attrs is None:
inst_attrs = xmlbuilder.child(node, 'instance_attributes')
- inst_attrs.append(xmlbuilder.nvpair(n, v))
+ inst_attrs.append(nvp)
out.append(node)
def match_operations(self, out, match_id):
@@ -905,8 +917,8 @@
attrs.set(idkey, idval)
for rule in self.match_rules():
attrs.append(rule)
- for n, v in self.match_nvpairs():
- attrs.append(xmlbuilder.nvpair(n, v))
+ for nvp in self.match_nvpairs():
+ attrs.append(nvp)
return root
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ra.py new/crmsh/modules/ra.py
--- old/crmsh/modules/ra.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/ra.py 2014-05-27 20:11:56.000000000 +0200
@@ -557,16 +557,17 @@
return True
return False
- def sanity_check_params(self, id, pl, existence_only=False):
+ def sanity_check_params(self, id, nvpairs, existence_only=False):
'''
- pl is a list of (attribute, value) pairs.
+ nvpairs is a list of <nvpair> tags.
- are all required parameters defined
- do all parameters exist
'''
rc = 0
d = {}
- for p, v in pl:
- d[p] = v
+ for nvp in nvpairs:
+ if 'name' in nvp.attrib and 'value' in nvp.attrib:
+ d[nvp.get('name')] = nvp.get('value')
if not existence_only:
for p in self.reqd_params_list():
if self.unreq_param(p):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_configure.py new/crmsh/modules/ui_configure.py
--- old/crmsh/modules/ui_configure.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/ui_configure.py 2014-05-27 20:11:56.000000000 +0200
@@ -446,11 +446,28 @@
rc = set_obj.graph_img(gtype, outf, ftype)
return rc
+ def _stop_if_running(self, rscs):
+ rscstate = xmlutil.RscState()
+ to_stop = [rsc for rsc in rscs if rscstate.is_running(rsc)]
+ from ui_resource import set_deep_meta_attr
+ if len(to_stop) > 0:
+ ok = all(set_deep_meta_attr(rsc, 'target-role', 'Stopped',
+ commit=False) for rsc in to_stop)
+ if not ok or not cib_factory.commit():
+ raise ValueError("Failed to stop one or more running resources: %s" %
+ (', '.join(to_stop)))
+
@command.skill_level('administrator')
@command.completers_repeating(_id_list)
def do_delete(self, context, *args):
- "usage: delete <id> [<id>...]"
- return cib_factory.delete(*args)
+ "usage: delete [-f|--force] <id> [<id>...]"
+ argl = list(args)
+ arg_force = argl and argl[0] == '--force'
+ if arg_force:
+ del argl[0]
+ if arg_force or config.core.force:
+ self._stop_if_running(argl)
+ return cib_factory.delete(*argl)
@command.name('default-timeouts')
@command.alias('default_timeouts')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_node.py new/crmsh/modules/ui_node.py
--- old/crmsh/modules/ui_node.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/ui_node.py 2014-05-27 20:11:56.000000000 +0200
@@ -23,7 +23,7 @@
import utils
import xmlutil
from msg import common_err, syntax_err, no_prog_err, common_info, common_warn
-from cliformat import nvpairs2list
+from cliformat import cli_nvpair, nvpairs2list
def _oneline(s):
@@ -50,9 +50,8 @@
id = v
else:
other[attr] = v
- for elem in node.iterchildren():
- if elem.tag == "instance_attributes":
- inst_attr += nvpairs2list(elem)
+ inst_attr = [cli_nvpair(nvpairs2list(elem))
+ for elem in node.xpath('./instance_attributes')]
return uname, id, type, other, inst_attr, is_offline(uname)
@@ -60,8 +59,8 @@
"""
Try to pretty print a node from the cib. Sth like:
uname(id): node_type
- attr1: v1
- attr2: v2
+ attr1=v1
+ attr2=v2
"""
s_offline = offline and "(offline)" or ""
if not node_type:
@@ -72,8 +71,8 @@
print "%s(%s): %s%s" % (uname, id, node_type, s_offline)
for a in other:
print "\t%s: %s" % (a, other[a])
- for a, v in inst_attr:
- print "\t%s: %s" % (a, v)
+ for s in inst_attr:
+ print "\t%s" % (s)
class NodeMgmt(command.UI):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_resource.py new/crmsh/modules/ui_resource.py
--- old/crmsh/modules/ui_resource.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/ui_resource.py 2014-05-27 20:11:56.000000000 +0200
@@ -496,11 +496,9 @@
rsc = self._get_trace_rsc(rsc_id)
if not rsc:
return False
- if not interval:
- interval = op == "monitor" and "non-0" or "0"
if op == "probe":
op = "monitor"
- op_node = xmlutil.find_operation(rsc.node, op, interval)
+ op_node = xmlutil.find_operation(rsc.node, op, interval=interval)
if op_node is None:
common_err("operation %s does not exist in %s" % (op, rsc.obj_id))
return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/xmlbuilder.py new/crmsh/modules/xmlbuilder.py
--- old/crmsh/modules/xmlbuilder.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/xmlbuilder.py 2014-05-27 20:11:56.000000000 +0200
@@ -52,22 +52,43 @@
return new("nvpair", name=name, value=value)
+def nvpair_id(nvpairid, name, value):
+ """
+ <nvpair id="" name="" value="" />
+ """
+ if name is None:
+ name = nvpairid
+ return new("nvpair", id=nvpairid, name=name, value=value)
+
+
+def nvpair_ref(idref, name=None):
+ """
+ <nvpair id-ref=<idref> [name=<name>]/>
+ """
+ print "nvpair_ref:", repr(idref), repr(name)
+ nvp = new("nvpair")
+ nvp.set('id-ref', idref)
+ if name is not None:
+ nvp.set('name', name)
+ return nvp
+
+
def set_date_expression(expr, tag, values):
"""
Fill in date_expression tag for date_spec/in_range operations
expr: <date_expression/>
- values: [(name, value)...]
+ values: [nvpair...]
"""
- if set(k for k, _ in values) == set(constants.in_range_attrs):
- for k, v in values:
- expr.set(k, v)
+ if set(nvp.get('name') for nvp in values) == set(constants.in_range_attrs):
+ for nvp in values:
+ expr.set(nvp.get('name'), nvp.get('value'))
return expr
subtag = child(expr, tag)
- for k, v in values:
- if k in constants.in_range_attrs:
- expr.set(k, v)
+ for nvp in values:
+ if nvp.get('name') in constants.in_range_attrs:
+ expr.set(nvp.get('name'), nvp.get('value'))
else:
- subtag.set(k, v)
+ subtag.set(nvp.get('name'), nvp.get('value'))
return expr
@@ -91,6 +112,6 @@
e.set("score", score)
for rule in rules:
e.append(rule)
- for name, value in values:
- e.append(nvpair(name, value))
+ for nvp in values:
+ e.append(nvp)
return e
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/xmlutil.py new/crmsh/modules/xmlutil.py
--- old/crmsh/modules/xmlutil.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/modules/xmlutil.py 2014-05-27 20:11:56.000000000 +0200
@@ -740,11 +740,12 @@
return None
-def find_operation(rsc_node, name, interval="0"):
+def find_operation(rsc_node, name, interval=None):
'''
Setting interval to "non-0" means get the first op with interval
different from 0.
'''
+ interval = interval or "0"
op_node_l = rsc_node.findall("operations")
for ops in op_node_l:
for c in ops.iterchildren("op"):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/unittests/test_cliformat.py new/crmsh/test/unittests/test_cliformat.py
--- old/crmsh/test/unittests/test_cliformat.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/test/unittests/test_cliformat.py 2014-05-27 20:11:56.000000000 +0200
@@ -38,12 +38,9 @@
print xml
obj.nocli = False
s = obj.repr_cli(format=-1)
- if s != cli:
+ if (s != cli) or debug:
print "GOT:", s
print "EXP:", cli
- if debug:
- print s
- print cli
assert obj.cli_use_validate()
eq_(cli, s)
assert not debug
@@ -103,6 +100,16 @@
roundtrip("# comment 1\n# comment 2\n# comment 3\nprimitive d0 ocf:pacemaker:Dummy")
+def test_nvpair_ref1():
+ factory.create_from_cli("primitive dummy-0 Dummy params $fiz:buz=bin")
+ roundtrip('primitive dummy-1 Dummy params @fiz:boz')
+
+
+def test_idresolve():
+ factory.create_from_cli("primitive dummy-5 Dummy params buz=bin")
+ roundtrip('primitive dummy-1 Dummy params @dummy-5-instance_attributes-buz')
+
+
def test_ordering():
xml = """<primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy"> \
<operations> \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/unittests/test_parse.py new/crmsh/test/unittests/test_parse.py
--- old/crmsh/test/unittests/test_parse.py 2014-05-22 19:04:46.000000000 +0200
+++ new/crmsh/test/unittests/test_parse.py 2014-05-27 20:11:56.000000000 +0200
@@ -180,6 +180,18 @@
self.assertEqual(len(out), 1)
self.assertEqual(['b'], out.xpath('/group/instance_attributes/nvpair[@name="a"]/@value'))
+ def test_nvpair_ref(self):
+ out = self.parser.parse('primitive dummy-0 Dummy params @foo')
+ self.assertEqual(out.get('id'), 'dummy-0')
+ self.assertEqual(out.get('class'), 'ocf')
+ self.assertEqual(['foo'], out.xpath('.//nvpair/@id-ref'))
+
+ out = self.parser.parse('primitive dummy-0 Dummy params @fiz:buz')
+ self.assertEqual(out.get('id'), 'dummy-0')
+ self.assertEqual(out.get('class'), 'ocf')
+ self.assertEqual(['fiz'], out.xpath('.//nvpair/@id-ref'))
+ self.assertEqual(['buz'], out.xpath('.//nvpair/@name'))
+
def test_location(self):
out = self.parser.parse('location loc-1 resource inf: foo')
self.assertEqual(out.get('id'), 'loc-1')
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0