openSUSE Commits
Threads by month
- ----- 2024 -----
- 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
September 2014
- 1 participants
- 1675 discussions
Hello community,
here is the log from the commit of package ktp-accounts-kcm for openSUSE:Factory checked in at 2014-09-18 07:56:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ktp-accounts-kcm (Old)
and /work/SRC/openSUSE:Factory/.ktp-accounts-kcm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ktp-accounts-kcm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ktp-accounts-kcm/ktp-accounts-kcm.changes 2014-04-26 10:02:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ktp-accounts-kcm.new/ktp-accounts-kcm.changes 2014-09-18 07:56:20.000000000 +0200
@@ -1,0 +2,9 @@
+Tue Sep 16 16:13:14 UTC 2014 - hrvoje.senjan(a)gmail.com
+
+- Update to 0.8.80 (0.9 beta)
+ * OTR support
+ * Improved group chats
+ * Modernised video chats, now based on GStreamer 1.0
+ * Lots of fixes and speed improvements
+
+-------------------------------------------------------------------
Old:
----
ktp-accounts-kcm-0.8.1.tar.bz2
New:
----
ktp-accounts-kcm-0.8.80.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ktp-accounts-kcm.spec ++++++
--- /var/tmp/diff_new_pack.SHyrRa/_old 2014-09-18 07:56:21.000000000 +0200
+++ /var/tmp/diff_new_pack.SHyrRa/_new 2014-09-18 07:56:21.000000000 +0200
@@ -17,13 +17,13 @@
Name: ktp-accounts-kcm
-Version: 0.8.1
+Version: 0.8.80
Release: 0
Summary: KCM Module for configuring Telepathy Instant Messaging Accounts
License: LGPL-2.1+
Group: Productivity/Networking/Instant Messenger
Url: http://community.kde.org/Real-Time_Communication_and_Collaboration
-Source0: http://download.kde.org/stable/kde-telepathy/%{version}/src/%{name}-%{versi…
+Source: http://download.kde.org/unstable/kde-telepathy/%{version}/src/%{name}-%{ver…
BuildRequires: fdupes
BuildRequires: ktp-common-internals-devel >= %{version}
BuildRequires: libkde4-devel >= 4.7.0
++++++ ktp-accounts-kcm-0.8.1.tar.bz2 -> ktp-accounts-kcm-0.8.80.tar.bz2 ++++++
++++ 5361 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 knemo for openSUSE:Factory checked in at 2014-09-18 07:56:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/knemo (Old)
and /work/SRC/openSUSE:Factory/.knemo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knemo"
Changes:
--------
--- /work/SRC/openSUSE:Factory/knemo/knemo.changes 2014-08-01 07:08:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.knemo.new/knemo.changes 2014-09-18 07:56:19.000000000 +0200
@@ -1,0 +2,5 @@
+Sat Aug 2 15:56:17 UTC 2014 - wbauer(a)tmo.at
+
+- Add fix-show-icon-when-not-configured.patch: fixes kde#328752
+
+-------------------------------------------------------------------
New:
----
fix-show-icon-when-not-configured.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ knemo.spec ++++++
--- /var/tmp/diff_new_pack.LTOacz/_old 2014-09-18 07:56:20.000000000 +0200
+++ /var/tmp/diff_new_pack.LTOacz/_new 2014-09-18 07:56:20.000000000 +0200
@@ -26,6 +26,8 @@
Group: System/GUI/KDE
Url: http://kde-apps.org/content/show.php/KNemo?content=12956
Source: http://kde-apps.org/CONTENT/content-files/12956-knemo-%{version}.tar.bz2
+# PATCH-FIX-UPSTREAM fix-show-icon-when-not-configured.patch -- show icon when no configuration is present (kde#328752)
+Patch: fix-show-icon-when-not-configured.patch
Source1: knemo-rpmlintrc
BuildRequires: kdebase4-workspace-devel
BuildRequires: libiw-devel
@@ -43,6 +45,7 @@
%prep
%setup -q
+%patch -p4
%build
%cmake_kde4 -d build
++++++ fix-show-icon-when-not-configured.patch ++++++
--- trunk/extragear/network/knemo/src/knemod/backends/netlinkbackend.cpp 2014/04/28 20:57:26 1385643
+++ trunk/extragear/network/knemo/src/knemod/backends/netlinkbackend.cpp 2014/04/28 21:14:32 1385644
@@ -46,7 +46,7 @@
{
rtnl_addr_alloc_cache( rtsock, &addrCache );
rtnl_link_alloc_cache( rtsock, AF_UNSPEC, &linkCache );
- rtnl_route_alloc_cache( rtsock, AF_UNSPEC, NL_AUTO_PROVIDE, &routeCache );
+ rtnl_route_alloc_cache( rtsock, AF_UNSPEC, 0, &routeCache );
}
#ifdef HAVE_LIBIW
wireless.openSocket();
--
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 fence-agents for openSUSE:Factory checked in at 2014-09-18 07:12:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fence-agents (Old)
and /work/SRC/openSUSE:Factory/.fence-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fence-agents"
Changes:
--------
--- /work/SRC/openSUSE:Factory/fence-agents/fence-agents.changes 2014-07-02 15:05:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.fence-agents.new/fence-agents.changes 2014-09-18 07:12:59.000000000 +0200
@@ -0,0 +1,42 @@
+-------------------------------------------------------------------
+Tue Sep 16 07:15:30 UTC 2014 - kgronlund(a)suse.com
+
+- Backport fixes from upstream (bnc#896833):
+ + fence_brocade: Add support for 'list' action
+ + fencing: Monitor is not working correctly without 'list' or 'status'
+ + fence_apc_snmp: Add support for firmware 6.x
+ + fence_zvm: Add support for "on" and "status"
+ + fence_zvm: Add current XML metadata to test suite
+ + [build] Fix automake files, so 'make distcheck' works
+ + fencing: Add new options --ssl-secure and --ssl-insecure
+ + [tests] Update XML metadata of fence agents
+ + fence_cisco_ucs & fence_vmware_soap: Logout has to be performed even when fencing fails
+ + fence_zvm: Fixes for better upstream inclusion
+ + fence_zvm: Add support for 'on', improve documentation
+- Added patches:
+ + 0001-fence_brocade-Add-support-for-list-action.patch
+ + 0002-fencing-Monitor-is-not-working-correctly-without-lis.patch
+ + 0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch
+ + 0004-fence_zvm-Add-support-for-on-and-status.patch
+ + 0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch
+ + 0006-build-Fix-automake-files-so-make-distcheck-works.patch
+ + 0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch
+ + 0008-tests-Update-XML-metadata-of-fence-agents.patch
+ + 0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch
+ + 0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch
+ + 0011-fence_zvm-Add-support-for-on-improve-documentation.patch
+- Add dependency on python-requests
+
+-------------------------------------------------------------------
+Tue Jul 1 12:32:09 UTC 2014 - kgronlund(a)suse.com
+
+- Update to 4.0.10:
+ * fence_scsi is reimplemented on top of fencing library
+ * fence_zvm support distributed z/VM systems
+ * support for --delay was added to fence_zvm
+ * unmaintained fence agents were removed:
+ * fence_baytech, fence_bullpap, fence_cpint, fence_mcdata,
+ * fence_rackswitch, fence_vixel, fence_xcat
+ * we do not plan to remove other agents
+ * update fence_rsb to work with new firmware
+
New:
----
0001-fence_brocade-Add-support-for-list-action.patch
0002-fencing-Monitor-is-not-working-correctly-without-lis.patch
0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch
0004-fence_zvm-Add-support-for-on-and-status.patch
0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch
0006-build-Fix-automake-files-so-make-distcheck-works.patch
0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch
0008-tests-Update-XML-metadata-of-fence-agents.patch
0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch
0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch
0011-fence_zvm-Add-support-for-on-improve-documentation.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fence-agents.spec ++++++
--- /var/tmp/diff_new_pack.ysMy8r/_old 2014-09-18 07:13:00.000000000 +0200
+++ /var/tmp/diff_new_pack.ysMy8r/_new 2014-09-18 07:13:00.000000000 +0200
@@ -26,9 +26,34 @@
Release: 0
Url: http://git.fedorahosted.org/git/fence-agents.git
Source0: %{name}-%{version}.tar.xz
+
+# PATCH-FIX-UPSTREAM: fence_brocade: Add support for 'list' action
+Patch1: 0001-fence_brocade-Add-support-for-list-action.patch
+# PATCH-FIX-UPSTREAM: fencing: Monitor is not working correctly without 'list' or 'status'
+Patch2: 0002-fencing-Monitor-is-not-working-correctly-without-lis.patch
+# PATCH-FIX-UPSTREAM: fence_apc_snmp: Add support for firmware 6.x
+Patch3: 0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch
+# PATCH-FIX-UPSTREAM: fence_zvm: Add support for "on" and "status"
+Patch4: 0004-fence_zvm-Add-support-for-on-and-status.patch
+# PATCH-FIX-UPSTREAM: fence_zvm: Add current XML metadata to test suite
+Patch5: 0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch
+# PATCH-FIX-UPSTREAM: [build] Fix automake files, so 'make distcheck' works
+Patch6: 0006-build-Fix-automake-files-so-make-distcheck-works.patch
+# PATCH-FIX-UPSTREAM: fencing: Add new options --ssl-secure and --ssl-insecure
+Patch7: 0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch
+# PATCH-FIX-UPSTREAM: [tests] Update XML metadata of fence agents
+Patch8: 0008-tests-Update-XML-metadata-of-fence-agents.patch
+# PATCH-FIX-UPSTREAM: fence_cisco_ucs & fence_vmware_soap: Logout has to be performed even when fencing fails
+Patch9: 0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch
+# PATCH-FIX-UPSTREAM: fence_zvm: Fixes for better upstream inclusion
+Patch10: 0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch
+# PATCH-FIX-UPSTREAM: fence_zvm: Add support for 'on', improve documentation
+Patch11: 0011-fence_zvm-Add-support-for-on-improve-documentation.patch
+
Requires: python-curl
Requires: python-openssl
Requires: python-pexpect
+Requires: python-requests
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
@@ -45,6 +70,7 @@
BuildRequires: python
BuildRequires: python-curl
BuildRequires: python-pexpect
+BuildRequires: python-requests
BuildRequires: python-suds
BuildRequires: python-xml
BuildRequires: xz
@@ -151,6 +177,17 @@
%prep
%setup -q -n %{name}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
%build
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
++++++ 0001-fence_brocade-Add-support-for-list-action.patch ++++++
>From 98236c1c0f0f3b9d6def701e5e9cc67f35649441 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Tue, 1 Jul 2014 15:25:45 +0200
Subject: [PATCH 01/11] fence_brocade: Add support for 'list' action
---
fence/agents/brocade/fence_brocade.py | 41 +++++++++++++++++++----------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index f935280..3e5dd93 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -12,24 +12,6 @@ REDHAT_COPYRIGHT=""
BUILD_DATE="March, 20013"
#END_VERSION_GENERATION
-def get_power_status(conn, options):
- conn.send_eol("portCfgShow " + options["--plug"])
-
- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
-
- show_re = re.compile(r'^\s*Persistent Disable\s*(ON|OFF)\s*$', re.IGNORECASE)
- lines = conn.before.split("\n")
-
- for line in lines:
- res = show_re.search(line)
- if res != None:
- # We queried if it is disabled, so we have to negate answer
- if res.group(1) == "ON":
- return "off"
- else:
- return "on"
-
- fail(EC_STATUS)
def set_power_status(conn, options):
action = {
'on' : "portCfgPersistentEnable",
@@ -39,6 +21,27 @@ def set_power_status(conn, options):
conn.send_eol(action + " " + options["--plug"])
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+def get_power_status(conn, options):
+ line_re = re.compile(r'=========', re.IGNORECASE)
+ outlets = {}
+ in_index = False
+
+ conn.send_eol("switchshow")
+ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+ for line in str(conn.before).split("\n"):
+ if line_re.search(line):
+ in_index = True
+ elif in_index and line.lstrip()[0].isdigit():
+ tokens = line.lstrip().split()
+ status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
+ outlets[tokens[0]] = ("", status)
+
+ if options["--action"] == "status":
+ (_, status) = outlets[options["--plug"]]
+ return status
+ else:
+ return outlets
+
def main():
device_opt = ["ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "fabric_fencing"]
@@ -66,7 +69,7 @@ FC switch needs to be enabled. This can be done by running fence_brocade and spe
## Operate the fencing device
####
conn = fence_login(options)
- result = fence_action(conn, options, set_power_status, get_power_status, None)
+ result = fence_action(conn, options, set_power_status, get_power_status, get_power_status)
fence_logout(conn, "exit")
sys.exit(result)
--
1.8.4.5
++++++ 0002-fencing-Monitor-is-not-working-correctly-without-lis.patch ++++++
>From 5a1fd08c7cf4a4c7d41db3db0a83eed226804b40 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Tue, 1 Jul 2014 15:27:27 +0200
Subject: [PATCH 02/11] fencing: Monitor is not working correctly without
'list' or 'status'
Action monitor either executes 'status' (without --plug) or 'list' (with --plug). But
it is not required to have 'list' action. If they do not then 'monitor' has to be done
in different way, e.g. login/logout.
---
fence/agents/ovh/fence_ovh.py | 13 ++++++++++---
fence/agents/raritan/fence_raritan.py | 5 ++++-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py
index f9a1c39..14a0706 100644
--- a/fence/agents/ovh/fence_ovh.py
+++ b/fence/agents/ovh/fence_ovh.py
@@ -94,10 +94,10 @@ Poweroff is simulated with a reboot into rescue-pro mode."
docs["vendorurl"] = "http://www.ovh.net"
show_docs(options, docs)
- if options["--action"] in ["list", "status"]:
- fail_usage("Action '" + options["--action"] + "' is not supported in this fence agent")
+ if options["--action"] == "list":
+ fail_usage("Action 'list' is not supported in this fence agent")
- if not options["--plug"].endswith(".ovh.net"):
+ if options["--action"] != "monitor" and not options["--plug"].endswith(".ovh.net"):
options["--plug"] += ".ovh.net"
if not options.has_key("--email"):
@@ -107,6 +107,13 @@ Poweroff is simulated with a reboot into rescue-pro mode."
conn = soap_login(options)
+ if options["--action"] == 'monitor':
+ try:
+ conn.service.logout(options["session"])
+ except Exception:
+ pass
+ sys.exit(0)
+
# Save datetime just before changing netboot
before_netboot_reboot = datetime.now()
diff --git a/fence/agents/raritan/fence_raritan.py b/fence/agents/raritan/fence_raritan.py
index 3506e25..bb6ad52 100644
--- a/fence/agents/raritan/fence_raritan.py
+++ b/fence/agents/raritan/fence_raritan.py
@@ -79,7 +79,10 @@ block any necessary fencing actions."
except pexpect.TIMEOUT:
fail(EC_LOGIN_DENIED)
- result = fence_action(conn, options, set_power_status, get_power_status)
+ result = 0
+ if options["--action"] != "monitor":
+ result = fence_action(conn, options, set_power_status, get_power_status)
+
fence_logout(conn, "exit\n")
sys.exit(result)
--
1.8.4.5
++++++ 0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch ++++++
>From acd138f4da16067f073d40b09a16a64867ef7e8f Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Mon, 4 Aug 2014 16:29:09 +0200
Subject: [PATCH 03/11] fence_apc_snmp: Add support for firmware 6.x
Resolves: rhbz#1123897
---
fence/agents/apc_snmp/fence_apc_snmp.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index cbb6856..a2b0d18 100644
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -87,6 +87,18 @@ class ApcMS(object):
turn_off = 2
has_switches = False
+class ApcMS6(object):
+ # Master Switch with 6.x firmware
+ status_oid = '.1.3.6.1.4.1.318.1.1.4.4.2.1.3.%d'
+ control_oid = '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.%d'
+ outlet_table_oid = '1.3.6.1.4.1.318.1.1.4.4.2.1.4'
+ ident_str = "APC Master Switch with firmware v6.x"
+ state_on = 1
+ state_off = 2
+ turn_on = 1
+ turn_off = 2
+ has_switches = False
+
### FUNCTIONS ###
def apc_set_device(conn):
global device
@@ -94,6 +106,7 @@ def apc_set_device(conn):
agents_dir = {'.1.3.6.1.4.1.318.1.3.4.5':ApcRPDU,
'.1.3.6.1.4.1.318.1.3.4.4':ApcMSP,
'.1.3.6.1.4.1.850.1':TripplitePDU,
+ '.1.3.6.1.4.1.318.1.3.4.6':ApcMS6,
None:ApcMS}
# First resolve type of APC
--
1.8.4.5
++++++ 0004-fence_zvm-Add-support-for-on-and-status.patch ++++++
++++ 799 lines (skipped)
++++++ 0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch ++++++
>From c19e51064fd01d9d033452943e3d2a8dc617174b Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Wed, 27 Aug 2014 13:23:21 +0200
Subject: [PATCH 05/11] fence_zvm: Add current XML metadata to test suite
---
tests/data/metadata/fence_zvmip.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml
index e28bc1c..5a737ca 100644
--- a/tests/data/metadata/fence_zvmip.xml
+++ b/tests/data/metadata/fence_zvmip.xml
@@ -40,6 +40,8 @@
</parameters>
<actions>
<action name="off" />
+ <action name="on" />
<action name="metadata" />
+ <action name="status" />
</actions>
</resource-agent>
--
1.8.4.5
++++++ 0006-build-Fix-automake-files-so-make-distcheck-works.patch ++++++
>From 3b3a7cf2d58fd863fef21553db5715c1dfab26a0 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Wed, 27 Aug 2014 15:18:01 +0200
Subject: [PATCH 06/11] [build] Fix automake files, so 'make distcheck' works
---
Makefile.am | 2 +-
fence/agents/Makefile.am | 3 +--
fence/agents/scsi/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e70dac5..5e2e22d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ noinst_HEADERS = make/copyright.cf
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = fence doc
+SUBDIRS = fence/agents/lib fence doc
install-exec-local:
$(INSTALL) -d $(DESTDIR)/$(LOGDIR)
diff --git a/fence/agents/Makefile.am b/fence/agents/Makefile.am
index c47f5d5..3b76b9a 100644
--- a/fence/agents/Makefile.am
+++ b/fence/agents/Makefile.am
@@ -1,4 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = lib \
- $(AGENTS_LIST)
+SUBDIRS = $(AGENTS_LIST)
diff --git a/fence/agents/scsi/Makefile.am b/fence/agents/scsi/Makefile.am
index 5722e18..c113f06 100644
--- a/fence/agents/scsi/Makefile.am
+++ b/fence/agents/scsi/Makefile.am
@@ -20,4 +20,4 @@ include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
clean-local: clean-man
- rm -f $(TARGET) $(SYMTARGET)
+ rm -f $(TARGET) $(SYMTARGET) fence_scsi_check
--
1.8.4.5
++++++ 0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch ++++++
>From 39df713492714f55e9d5bf578bece4cd9fc98fef Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Mon, 1 Sep 2014 15:05:20 +0200
Subject: [PATCH 07/11] fencing: Add new options --ssl-secure and
--ssl-insecure
These new options extends current --ssl (same as --ssl-secure). Until now certificate of the fence device
was not validated what can possibly lead to attack on infrastructe. With this patch, user can decide
if certificate should (--ssl-secure) or should not (--ssl-insecure) be verified.
The default option is to validate certificate.
Resolves: rhbz#1072564
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 9 ++++++--
fence/agents/lib/fencing.py.py | 28 ++++++++++++++++++++---
fence/agents/rhevm/fence_rhevm.py | 9 ++++++--
fence/agents/vmware_soap/fence_vmware_soap.py | 33 +++++++++++++++++++++++----
4 files changed, 68 insertions(+), 11 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index f72e696..888d689 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -90,8 +90,13 @@ def send_command(opt, command, timeout):
conn.setopt(pycurl.POSTFIELDS, command)
conn.setopt(pycurl.WRITEFUNCTION, web_buffer.write)
conn.setopt(pycurl.TIMEOUT, timeout)
- conn.setopt(pycurl.SSL_VERIFYPEER, 0)
- conn.setopt(pycurl.SSL_VERIFYHOST, 0)
+ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"):
+ conn.setopt(pycurl.SSL_VERIFYPEER, 1)
+ conn.setopt(pycurl.SSL_VERIFYHOST, 2)
+
+ if opt.has_key("--ssl-insecure"):
+ conn.setopt(pycurl.SSL_VERIFYPEER, 0)
+ conn.setopt(pycurl.SSL_VERIFYHOST, 0)
conn.perform()
result = web_buffer.getvalue()
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 4520ea8..7d1d28e 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -179,6 +179,21 @@ all_opt = {
"required" : "0",
"shortdesc" : "SSL connection",
"order" : 1},
+ "ssl_insecure" : {
+ "getopt" : "9",
+ "longopt" : "ssl-insecure",
+ "help" : "--ssl-insecure Use ssl connection without verifying certificate",
+ "required" : "0",
+ "shortdesc" : "SSL connection without verifying fence device's certificate",
+ "order" : 1},
+ "ssl_secure" : {
+ "getopt" : "9",
+ "longopt" : "ssl-secure",
+ "help" : "--ssl-secure Use ssl connection with verifying certificate",
+ "required" : "0",
+ "shortdesc" : "SSL connection with verifying fence device's certificate",
+ "order" : 1},
+
"notls" : {
"getopt" : "t",
"longopt" : "notls",
@@ -385,6 +400,7 @@ DEPENDENCY_OPT = {
"secure" : ["identity_file", "ssh_options"],
"ipaddr" : ["ipport", "inet4_only", "inet6_only"],
"port" : ["separator"],
+ "ssl" : ["ssl_secure", "ssl_insecure"],
"community" : ["snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \
"snmp_priv_passwd", "snmp_priv_passwd_script"]
}
@@ -663,7 +679,7 @@ def check_input(device_opt, opt):
elif options.has_key("--ssh") or (all_opt["secure"].has_key("default") and all_opt["secure"]["default"] == '1'):
all_opt["ipport"]["default"] = 22
all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 22)"
- elif options.has_key("--ssl") or (all_opt["ssl"].has_key("default") and all_opt["ssl"]["default"] == '1'):
+ elif options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure") or (all_opt["ssl"].has_key("default") and all_opt["ssl"]["default"] == '1'):
all_opt["ipport"]["default"] = 443
all_opt["ipport"]["help"] = "-u, --ipport=[port] TCP/UDP port to use (default 443)"
elif device_opt.count("web"):
@@ -970,11 +986,17 @@ def fence_login(options, re_login_string=r"(login\s*: )|(Login Name: )|(usernam
if options.has_key("--ssl"):
gnutls_opts = ""
+ ssl_opts = ""
+
if options.has_key("--notls"):
gnutls_opts = "--priority \"NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0\""
- command = '%s %s --insecure --crlf -p %s %s' % \
- (SSL_PATH, gnutls_opts, options["--ipport"], options["--ip"])
+ # --ssl is same as the --ssl-secure
+ if options.has_key("--ssl-insecure"):
+ ssl_opts = "--insecure"
+
+ command = '%s %s %s --insecure --crlf -p %s %s' % \
+ (SSL_PATH, gnutls_opts, ssl_opts, options["--ipport"], options["--ip"])
try:
conn = fspawn(options, command)
except pexpect.ExceptionPexpect, ex:
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index a0d8d59..444fb56 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -91,8 +91,13 @@ def send_command(opt, command, method="GET"):
conn.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
conn.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"])
conn.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"]))
- conn.setopt(pycurl.SSL_VERIFYPEER, 0)
- conn.setopt(pycurl.SSL_VERIFYHOST, 0)
+ if opt.has_key("--ssl") or opt.has_key("--ssl-secure"):
+ conn.setopt(pycurl.SSL_VERIFYPEER, 1)
+ conn.setopt(pycurl.SSL_VERIFYHOST, 2)
+
+ if opt.has_key("--ssl-insecure"):
+ conn.setopt(pycurl.SSL_VERIFYPEER, 0)
+ conn.setopt(pycurl.SSL_VERIFYHOST, 0)
if method == "POST":
conn.setopt(pycurl.POSTFIELDS, "<action />")
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 53fd9ea..3217c6b 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -2,12 +2,14 @@
import sys
import shutil, tempfile, suds
-import logging
+import logging, requests
import atexit
sys.path.append("@FENCEAGENTSLIBDIR@")
from suds.client import Client
from suds.sudsobject import Property
+from suds.transport.http import HttpAuthenticated
+from suds.transport import Reply, TransportError
from fencing import *
from fencing import fail, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF
from fencing import run_delay
@@ -18,12 +20,31 @@ REDHAT_COPYRIGHT=""
BUILD_DATE="April, 2011"
#END_VERSION_GENERATION
+class RequestsTransport(HttpAuthenticated):
+ def __init__(self, **kwargs):
+ self.cert = kwargs.pop('cert', None)
+ self.verify = kwargs.pop('verify', True)
+ self.session = requests.Session()
+ # super won't work because not using new style class
+ HttpAuthenticated.__init__(self, **kwargs)
+
+ def send(self, request):
+ self.addcredentials(request)
+ resp = self.session.post(request.url, data = request.message, headers = request.headers, cert = self.cert, verify = self.verify)
+ result = Reply(resp.status_code, resp.headers, resp.content)
+ return result
+
def soap_login(options):
run_delay(options)
- if options.has_key("--ssl"):
+ if options.has_key("--ssl") or options.has_key("--ssl-secure") or options.has_key("--ssl-insecure"):
+ if options.has_key("--ssl-insecure"):
+ verify = False
+ else:
+ verify = True
url = "https://"
else:
+ verify = False
url = "http://"
url += options["--ip"] + ":" + str(options["--ipport"]) + "/sdk"
@@ -33,8 +54,8 @@ def soap_login(options):
atexit.register(remove_tmp_dir, tmp_dir)
try:
- conn = Client(url + "/vimService.wsdl")
- conn.set_options(location=url)
+ headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""}
+ conn = Client(url + "/vimService.wsdl", location = url, transport = RequestsTransport(verify = verify), headers = headers)
mo_ServiceInstance = Property('ServiceInstance')
mo_ServiceInstance._type = 'ServiceInstance'
@@ -43,6 +64,8 @@ def soap_login(options):
mo_SessionManager._type = 'SessionManager'
conn.service.Login(mo_SessionManager, options["--username"], options["--password"])
+ except requests.exceptions.SSLError, ex:
+ fail_usage("Server side certificate verification failed")
except Exception:
fail(EC_LOGIN_DENIED)
@@ -205,6 +228,8 @@ Alternatively you can always use UUID to access virtual machine."
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.CRITICAL)
+ logging.getLogger("requests").setLevel(logging.CRITICAL)
+ logging.getLogger("urllib3").setLevel(logging.CRITICAL)
##
## Operate the fencing device
--
1.8.4.5
++++++ 0008-tests-Update-XML-metadata-of-fence-agents.patch ++++++
>From 667bd9c6755e4211d42a7f03e3f28f035921cf76 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Mon, 1 Sep 2014 16:37:50 +0200
Subject: [PATCH 08/11] [tests] Update XML metadata of fence agents
added --ssl-secure, --ssl-insecure
---
tests/data/metadata/fence_cisco_ucs.xml | 10 ++++++++++
tests/data/metadata/fence_docker.xml | 10 ++++++++++
tests/data/metadata/fence_ilo.xml | 10 ++++++++++
tests/data/metadata/fence_ilo2.xml | 10 ++++++++++
tests/data/metadata/fence_rhevm.xml | 10 ++++++++++
tests/data/metadata/fence_vmware_soap.xml | 10 ++++++++++
6 files changed, 60 insertions(+)
diff --git a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml
index 30a3cb4..75e45ce 100644
--- a/tests/data/metadata/fence_cisco_ucs.xml
+++ b/tests/data/metadata/fence_cisco_ucs.xml
@@ -13,6 +13,11 @@
<content type="boolean" />
<shortdesc lang="en">Disable TLS negotiation</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="port" unique="0" required="1">
<getopt mixed="-n, --plug=[id]" />
<content type="string" />
@@ -53,6 +58,11 @@
<content type="string" />
<shortdesc lang="en">Additional path needed to access suborganization</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
diff --git a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml
index bda31d01..d100b8c 100644
--- a/tests/data/metadata/fence_docker.xml
+++ b/tests/data/metadata/fence_docker.xml
@@ -8,6 +8,11 @@
<content type="string" default="80" />
<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="port" unique="0" required="1">
<getopt mixed="-n, --plug=[id]" />
<content type="string" />
@@ -41,6 +46,11 @@
<content type="boolean" />
<shortdesc lang="en">SSL connection</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
diff --git a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml
index eb8951c..25d9d54 100644
--- a/tests/data/metadata/fence_ilo.xml
+++ b/tests/data/metadata/fence_ilo.xml
@@ -19,6 +19,11 @@
<content type="string" />
<shortdesc lang="en">Force ribcl version to use</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
@@ -54,6 +59,11 @@
<content type="boolean" default="1" />
<shortdesc lang="en">SSL connection</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="login" unique="0" required="1">
<getopt mixed="-l, --username=[name]" />
<content type="string" />
diff --git a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml
index 4d65808..47e8e28 100644
--- a/tests/data/metadata/fence_ilo2.xml
+++ b/tests/data/metadata/fence_ilo2.xml
@@ -19,6 +19,11 @@
<content type="string" />
<shortdesc lang="en">Force ribcl version to use</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
@@ -54,6 +59,11 @@
<content type="boolean" default="1" />
<shortdesc lang="en">SSL connection</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="login" unique="0" required="1">
<getopt mixed="-l, --username=[name]" />
<content type="string" />
diff --git a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml
index a47f025..c9d6eeb 100644
--- a/tests/data/metadata/fence_rhevm.xml
+++ b/tests/data/metadata/fence_rhevm.xml
@@ -13,6 +13,11 @@
<content type="boolean" />
<shortdesc lang="en">Disable TLS negotiation</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="port" unique="0" required="1">
<getopt mixed="-n, --plug=[id]" />
<content type="string" />
@@ -48,6 +53,11 @@
<content type="boolean" />
<shortdesc lang="en">SSL connection</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
diff --git a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml
index 97d8fc6..d0a465f 100644
--- a/tests/data/metadata/fence_vmware_soap.xml
+++ b/tests/data/metadata/fence_vmware_soap.xml
@@ -15,6 +15,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g
<content type="boolean" />
<shortdesc lang="en">Disable TLS negotiation</shortdesc>
</parameter>
+ <parameter name="ssl_secure" unique="0" required="0">
+ <getopt mixed="--ssl-secure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection with verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="port" unique="0" required="1">
<getopt mixed="-n, --plug=[id]" />
<content type="string" />
@@ -50,6 +55,11 @@ Name of virtual machine (-n / port) has to be used in inventory path format (e.g
<content type="boolean" />
<shortdesc lang="en">SSL connection</shortdesc>
</parameter>
+ <parameter name="ssl_insecure" unique="0" required="0">
+ <getopt mixed="--ssl-insecure" />
+ <content type="boolean" />
+ <shortdesc lang="en">SSL connection without verifying fence device's certificate</shortdesc>
+ </parameter>
<parameter name="action" unique="0" required="1">
<getopt mixed="-o, --action=[action]" />
<content type="string" default="reboot" />
--
1.8.4.5
++++++ 0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch ++++++
>From 65ae2524836e5ba5252fdc800e6276f80fdfac57 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Mon, 8 Sep 2014 15:10:05 +0200
Subject: [PATCH 09/11] fence_cisco_ucs & fence_vmware_soap: Logout has to be
performed even when fencing fails
Previously, logout was not performed in the case when fence agent was aborted e.g. timeout. What could
lead to a situation when connections were not closed correctly. In the extreme case, it was not possible
to log into device at all
Resolves: rhbz#1111599
---
fence/agents/cisco_ucs/fence_cisco_ucs.py | 35 +++++++++++++++++----------
fence/agents/vmware_soap/fence_vmware_soap.py | 29 +++++++++++++---------
2 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 888d689..f411433 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -19,6 +19,8 @@ RE_STATUS = re.compile("<lsPower .*? state=\"(.*?)\"", re.IGNORECASE)
RE_GET_DN = re.compile(" dn=\"(.*?)\"", re.IGNORECASE)
RE_GET_DESC = re.compile(" descr=\"(.*?)\"", re.IGNORECASE)
+options_global = None
+
def get_power_status(conn, options):
del conn
@@ -115,27 +117,37 @@ def define_new_opts():
"default" : "",
"order" : 1}
+def logout():
+ ### Logout; we do not care about result as we will end in any case
+ try:
+ send_command(options_global, "<aaaLogout inCookie=\"" + options_global["cookie"] + "\" />",
+ int(options_global["--shell-timeout"]))
+ except Exception:
+ pass
+
def main():
+ global options_global
device_opt = ["ipaddr", "login", "passwd", "ssl", "notls", "port", "web", "suborg"]
atexit.register(atexit_handler)
+ atexit.register(logout)
define_new_opts()
- options = check_input(device_opt, process_input(device_opt))
+ options_global = check_input(device_opt, process_input(device_opt))
docs = {}
docs["shortdesc"] = "Fence agent for Cisco UCS"
docs["longdesc"] = "fence_cisco_ucs is an I/O Fencing agent which can be \
used with Cisco UCS to fence machines."
docs["vendorurl"] = "http://www.cisco.com"
- show_docs(options, docs)
+ show_docs(options_global, docs)
- run_delay(options)
+ run_delay(options_global)
### Login
try:
- res = send_command(options, "<aaaLogin inName=\"" + options["--username"] +
- "\" inPassword=\"" + options["--password"] + "\" />", int(options["--login-timeout"]))
+ res = send_command(options_global, "<aaaLogin inName=\"" + options_global["--username"] +
+ "\" inPassword=\"" + options_global["--password"] + "\" />", int(options_global["--login-timeout"]))
result = RE_COOKIE.search(res)
if result == None:
## Cookie is absenting in response
@@ -143,22 +155,19 @@ used with Cisco UCS to fence machines."
except Exception:
fail(EC_LOGIN_DENIED)
- options["cookie"] = result.group(1)
+ options_global["cookie"] = result.group(1)
##
## Modify suborg to format /suborg
- if options["--suborg"] != "":
- options["--suborg"] = "/" + options["--suborg"].lstrip("/").rstrip("/")
+ if options_global["--suborg"] != "":
+ options_global["--suborg"] = "/" + options_global["--suborg"].lstrip("/").rstrip("/")
##
## Fence operations
####
- result = fence_action(None, options, set_power_status, get_power_status, get_list)
-
- ### Logout; we do not care about result as we will end in any case
- send_command(options, "<aaaLogout inCookie=\"" + options["cookie"] + "\" />",
- int(options["--shell-timeout"]))
+ result = fence_action(None, options_global, set_power_status, get_power_status, get_list)
+ ## Logout is done every time at atexit phase
sys.exit(result)
if __name__ == "__main__":
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 3217c6b..2cea105 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -20,6 +20,9 @@ REDHAT_COPYRIGHT=""
BUILD_DATE="April, 2011"
#END_VERSION_GENERATION
+options_global = None
+conn_global = None
+
class RequestsTransport(HttpAuthenticated):
def __init__(self, **kwargs):
self.cert = kwargs.pop('cert', None)
@@ -203,12 +206,21 @@ def set_power_status(conn, options):
def remove_tmp_dir(tmp_dir):
shutil.rmtree(tmp_dir)
+def logout():
+ try:
+ conn_global.service.Logout(options_global["mo_SessionManager"])
+ except Exception:
+ pass
+
def main():
+ global options_global
+ global conn_global
device_opt = ["ipaddr", "login", "passwd", "web", "ssl", "notls", "port"]
atexit.register(atexit_handler)
+ atexit.register(logout)
- options = check_input(device_opt, process_input(device_opt))
+ options_global = check_input(device_opt, process_input(device_opt))
##
## Fence agent specific defaults
@@ -224,7 +236,7 @@ format (e.g. /datacenter/vm/Discovered virtual machine/myMachine). \
In the cases when name of yours VM is unique you can use it instead. \
Alternatively you can always use UUID to access virtual machine."
docs["vendorurl"] = "http://www.vmware.com"
- show_docs(options, docs)
+ show_docs(options_global, docs)
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.CRITICAL)
@@ -234,18 +246,11 @@ Alternatively you can always use UUID to access virtual machine."
##
## Operate the fencing device
####
- conn = soap_login(options)
+ conn_global = soap_login(options_global)
- result = fence_action(conn, options, set_power_status, get_power_status, get_power_status)
-
- ##
- ## Logout from system
- #####
- try:
- conn.service.Logout(options["mo_SessionManager"])
- except Exception:
- pass
+ result = fence_action(conn_global, options_global, set_power_status, get_power_status, get_power_status)
+ ## Logout from system is done automatically via atexit()
sys.exit(result)
if __name__ == "__main__":
--
1.8.4.5
++++++ 0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch ++++++
>From 0595f0fd88f395041059b85b37ba846e766a5ed3 Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Fri, 12 Sep 2014 21:02:59 +0200
Subject: [PATCH 10/11] fence_zvm: Fixes for better upstream inclusion
---
fence/agents/zvm/Makefile.am | 7 +++++++
fence/agents/zvm/fence_zvm.c | 1 +
fence/agents/zvm/fence_zvmip.c | 1 +
3 files changed, 9 insertions(+)
diff --git a/fence/agents/zvm/Makefile.am b/fence/agents/zvm/Makefile.am
index 2439985..62eb862 100644
--- a/fence/agents/zvm/Makefile.am
+++ b/fence/agents/zvm/Makefile.am
@@ -1,5 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in
+TARGET = fence_zvmip
+
sbin_PROGRAMS = fence_zvm fence_zvmip
noinst_HEADERS = fence_zvm.h
@@ -12,6 +14,11 @@ fence_zvmip_CFLAGS = -D_GNU_SOURCE
dist_man_MANS = fence_zvm.8 fence_zvmip.8
+#include $(top_srcdir)/make/fencemanc.mk
+
+clean-local:
+ rm -f $(sbin_PROGRAMS)
+
FENCE_TEST_ARGS = -n test -a test -p test -u test
include $(top_srcdir)/make/agentccheck.mk
diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c
index 2ec4be9..e5a7c2b 100644
--- a/fence/agents/zvm/fence_zvm.c
+++ b/fence/agents/zvm/fence_zvm.c
@@ -599,6 +599,7 @@ zvm_metadata()
fprintf (stdout, "<longdesc>");
fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service.");
fprintf (stdout, "</longdesc>\n");
+ fprintf (stdout, "<vendor-url>http://www.ibm.com</vendor-url>\n");
fprintf (stdout, "<parameters>\n");
diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c
index 94c9e2e..3342bc6 100644
--- a/fence/agents/zvm/fence_zvmip.c
+++ b/fence/agents/zvm/fence_zvmip.c
@@ -804,6 +804,7 @@ zvm_metadata()
fprintf (stdout, "<longdesc>");
fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP");
fprintf (stdout, "</longdesc>\n");
+ fprintf (stdout, "<vendor-url>http://www.ibm.com</vendor-url>\n");
fprintf (stdout, "<parameters>\n");
--
1.8.4.5
++++++ 0011-fence_zvm-Add-support-for-on-improve-documentation.patch ++++++
>From 5d8e167cb54051ff95fcc8ac3e87d2c63209748a Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac(a)redhat.com>
Date: Mon, 15 Sep 2014 15:05:25 +0200
Subject: [PATCH 11/11] fence_zvm: Add support for 'on', improve documentation
Author: Neale Ferguson
---
fence/agents/zvm/fence_zvm.8 | 2 +-
fence/agents/zvm/fence_zvm.c | 38 +++++++++++++++++++++-----------------
fence/agents/zvm/fence_zvmip.8 | 2 +-
fence/agents/zvm/fence_zvmip.c | 38 +++++++++++++++++++++-----------------
4 files changed, 44 insertions(+), 36 deletions(-)
diff --git a/fence/agents/zvm/fence_zvm.8 b/fence/agents/zvm/fence_zvm.8
index 359436e..8c0d35a 100644
--- a/fence/agents/zvm/fence_zvm.8
+++ b/fence/agents/zvm/fence_zvm.8
@@ -52,7 +52,7 @@ forcibly terminated. Currently, this option is ignored.
This option is used by fence_node(8) and is ignored by fence_zvm.
.TP
\fIaction = < action >\fP
-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device
+Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
.TP
\fIport = < target >\fP
Name of virtual machine to recycle.
diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c
index e5a7c2b..524e21e 100644
--- a/fence/agents/zvm/fence_zvm.c
+++ b/fence/agents/zvm/fence_zvm.c
@@ -699,15 +699,15 @@ get_options_stdin (zvm_driver_t *zvm)
if (!strcasecmp (opt, "action")) {
if (strcasecmp(arg, "off") == 0) {
- fence = 0;
+ fence = 1;
} else if (strcasecmp(arg, "on") == 0) {
- fence = 1;
+ fence = 2;
} else if (strcasecmp(arg, "metadata") == 0) {
- fence = 2;
+ fence = 3;
} else if (strcasecmp(arg, "status") == 0) {
- fence = 3;
- } else {
fence = 4;
+ } else {
+ fence = 5;
}
} else if (!strcasecmp (opt, "ipaddr")) {
lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv));
@@ -738,7 +738,7 @@ get_options_stdin (zvm_driver_t *zvm)
zvm->delay = DEFAULT_DELAY;
}
} else if (!strcasecmp (opt, "help")) {
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -769,15 +769,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
break;
case 'o' :
if (strcasecmp(optarg, "off") == 0) {
- fence = 0;
+ fence = 1;
} else if (strcasecmp(optarg, "on") == 0) {
- fence = 1;
+ fence = 2;
} else if (strcasecmp(optarg, "metadata") == 0) {
- fence = 2;
+ fence = 3;
} else if (strcasecmp(optarg, "status") == 0) {
- fence = 3;
- } else {
fence = 4;
+ } else {
+ fence = 5;
}
break;
case 'a' :
@@ -807,7 +807,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
memcpy(zvm->node, optarg, lSrvNode);
break;
default :
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -874,22 +874,26 @@ main(int argc, char **argv)
fence = get_options_stdin(&zvm);
switch(fence) {
- case 0 : // OFF
+ case 0 : // OFFON
+ if ((rc = check_parm(&zvm)) == 0)
+ rc = zvm_smapi_imageRecycle(&zvm);
+ break;
+ case 1 : // OFF
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageDeactivate(&zvm);
break;
- case 1 : // ON
+ case 2 : // ON
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageActivate(&zvm);
break;
- case 2 : // METADATA
+ case 3 : // METADATA
rc = zvm_metadata();
break;
- case 3 : // STATUS
+ case 4 : // STATUS
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageQuery(&zvm);
break;
- case 4 :
+ case 5 :
rc = usage();
}
closelog();
diff --git a/fence/agents/zvm/fence_zvmip.8 b/fence/agents/zvm/fence_zvmip.8
index 8217d61..6b01425 100644
--- a/fence/agents/zvm/fence_zvmip.8
+++ b/fence/agents/zvm/fence_zvmip.8
@@ -55,7 +55,7 @@ Display usage information
This option is used by fence_node(8) and is ignored by fence_zvmip.
.TP
\fIaction = < action >\fP
-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device
+Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
.TP
\fIplug = < plug >\fP
Name of virtual machine to recycle.
diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c
index 3342bc6..bd7c536 100644
--- a/fence/agents/zvm/fence_zvmip.c
+++ b/fence/agents/zvm/fence_zvmip.c
@@ -677,15 +677,15 @@ get_options_stdin (zvm_driver_t *zvm)
if (!strcasecmp (opt, "action")) {
if (strcasecmp(arg, "off") == 0) {
- fence = 0;
+ fence = 1;
} else if (strcasecmp(arg, "on") == 0) {
- fence = 1;
+ fence = 2;
} else if (strcasecmp(arg, "metadata") == 0) {
- fence = 2;
+ fence = 3;
} else if (strcasecmp(arg, "status") == 0) {
- fence = 3;
- } else {
fence = 4;
+ } else {
+ fence = 5;
}
} else if (!strcasecmp (opt, "ipaddr")) {
lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)-1);
@@ -712,7 +712,7 @@ get_options_stdin (zvm_driver_t *zvm)
zvm->timeOut = DEFAULT_TIMEOUT;
}
} else if (!strcasecmp (opt, "help")) {
- fence = 2;
+ fence = 5;
}
}
return(fence);
@@ -746,15 +746,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
break;
case 'o' :
if (strcasecmp(optarg, "off") == 0) {
- fence = 0;
+ fence = 1;
} else if (strcasecmp(optarg, "on") == 0) {
- fence = 1;
+ fence = 2;
} else if (strcasecmp(optarg, "metadata") == 0) {
- fence = 2;
+ fence = 3;
} else if (strcasecmp(optarg, "status") == 0) {
- fence = 3;
- } else {
fence = 4;
+ } else {
+ fence = 5;
}
break;
case 'p' :
@@ -784,7 +784,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
}
break;
default :
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -944,22 +944,26 @@ main(int argc, char **argv)
fence = get_options_stdin(&zvm);
switch(fence) {
- case 0 : // OFF
+ case 0 : // OFFON
+ if ((rc = check_parm(&zvm)) == 0)
+ rc = zvm_smapi_imageRecycle(&zvm);
+ break;
+ case 1 : // OFF
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageDeactivate(&zvm);
break;
- case 1 : // ON
+ case 2 : // ON
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageActivate(&zvm);
break;
- case 2 : // METADATA
+ case 3 : // METADATA
rc = zvm_metadata();
break;
- case 3 : // STATUS
+ case 4 : // STATUS
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageQuery(&zvm);
break;
- case 4 :
+ case 5 :
rc = usage();
}
closelog();
--
1.8.4.5
--
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-matplotlib for openSUSE:Factory checked in at 2014-09-18 07:12:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-matplotlib (Old)
and /work/SRC/openSUSE:Factory/.python-matplotlib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-matplotlib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-matplotlib/python-matplotlib.changes 2014-09-17 17:26:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-matplotlib.new/python-matplotlib.changes 2014-09-18 07:12:57.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Sep 17 15:23:25 UTC 2014 - jmatejek(a)suse.com
+
+- downgrade Recommends for texlive (and other big packages) to Suggests
+ (this means texlive is not pulled in by default zypper settings)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-matplotlib.spec ++++++
--- /var/tmp/diff_new_pack.CuFGGM/_old 2014-09-18 07:12:58.000000000 +0200
+++ /var/tmp/diff_new_pack.CuFGGM/_new 2014-09-18 07:12:58.000000000 +0200
@@ -95,15 +95,15 @@
Requires: python-pytz
Requires: python-six >= 1.3
Recommends: ghostscript
-Recommends: inkscape
Recommends: libxml2-tools
Recommends: python-Pillow
Recommends: poppler-tools
Recommends: python-matplotlib-tk
-Recommends: texlive-dvipng
-Recommends: texlive-latex
-Recommends: texlive-sfmath
-Recommends: texlive-tex
+Suggests: inkscape
+Suggests: texlive-dvipng
+Suggests: texlive-latex
+Suggests: texlive-sfmath
+Suggests: texlive-tex
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
--
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-matplotlib for openSUSE:Factory checked in at 2014-09-18 07:12:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-matplotlib (Old)
and /work/SRC/openSUSE:Factory/.python3-matplotlib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-matplotlib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-matplotlib/python3-matplotlib.changes 2014-09-03 20:59:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-matplotlib.new/python3-matplotlib.changes 2014-09-18 07:12:55.000000000 +0200
@@ -1,0 +2,14 @@
+Thu Sep 11 08:53:11 UTC 2014 - toddrme2178(a)gmail.com
+
+- Add new python-cairocffi dependency. This is the recommended
+ dependency for the cairo backend upstream.
+- Split out the cairo backend into its own subpackage. It is no
+ longer tied to gtk, so people can use it on its own without
+ pulling in any gtk dependencies.
+
+-------------------------------------------------------------------
+Wed Sep 10 10:52:03 UTC 2014 - toddrme2178(a)gmail.com
+
+- Dependency and spec file cleanups
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-matplotlib.spec ++++++
--- /var/tmp/diff_new_pack.hOMtJU/_old 2014-09-18 07:12:57.000000000 +0200
+++ /var/tmp/diff_new_pack.hOMtJU/_new 2014-09-18 07:12:57.000000000 +0200
@@ -25,68 +25,81 @@
Url: http://sourceforge.net/projects/matplotlib
Source: matplotlib-%{version}.tar.gz
Source1: matplotlib-setup.cfg
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: agg-devel
BuildRequires: fdupes
BuildRequires: fltk-devel
-BuildRequires: freetype2-devel
+BuildRequires: freetype2-devel >= 2.3
BuildRequires: gcc-c++
BuildRequires: ghostscript
-BuildRequires: gtk2-devel
-BuildRequires: libgnome-devel
-BuildRequires: libpng-devel
+BuildRequires: libpng-devel >= 1.2
BuildRequires: libxml2-tools
+BuildRequires: pkg-config
BuildRequires: poppler-tools
-BuildRequires: python3-cairo
-BuildRequires: python3-cairo-devel
-BuildRequires: python3-dateutil
+BuildRequires: python3-CXX-devel >= 6.2.4
+BuildRequires: python3-Pillow
+BuildRequires: python3-dateutil >= 1.1
BuildRequires: python3-devel
-BuildRequires: python3-CXX
+BuildRequires: python3-numpy-devel >= 1.6
+BuildRequires: python3-pyparsing >= 1.5.6
+BuildRequires: python3-pytz
+BuildRequires: python3-setuptools
+BuildRequires: python3-six >= 1.3
+BuildRequires: qhull-devel >= 2003.1
+# needed for testing
+BuildRequires: python3-mock
+BuildRequires: python3-nose
+# cairo dependencies
+BuildRequires: python3-cairocffi
+# GTK dependencies
+BuildRequires: gtk2-devel
+BuildRequires: libgnome-devel
BuildRequires: python3-gobject
-BuildRequires: python3-gobject-cairo
BuildRequires: python3-gobject-devel
BuildRequires: python3-gobject2
BuildRequires: python3-gobject2-devel
-BuildRequires: python3-numpy-devel >= 1.2.1
-%if 0%{?suse_version} > 1220
+# latex dependencies
+BuildRequires: texlive-dvipng
+BuildRequires: texlive-latex
+BuildRequires: texlive-sfmath
+BuildRequires: texlive-tex
+# Qt4 dependencies
+# BuildRequires: python3-pyside
BuildRequires: python3-qt4
BuildRequires: python3-qt4-devel
-%endif
+# Qt5 dependencies
%if 0%{?suse_version} > 1310
BuildRequires: python3-qt5
BuildRequires: python3-qt5-devel
%endif
-BuildRequires: python3-pyparsing
-# BuildRequires: python3-pyside
-BuildRequires: python3-setuptools
+# tk dependencies
BuildRequires: python3-tk
-BuildRequires: python3-tornado
-BuildRequires: python3-tz
-# BuildRequires: python3-wxWidgets
BuildRequires: tcl
BuildRequires: tcl-devel
-BuildRequires: texlive-latex
-%if 0%{?suse_version} > 1220
-BuildRequires: texlive-dvipng
-BuildRequires: texlive-sfmath
-BuildRequires: texlive-tex
-%endif
BuildRequires: tk
BuildRequires: tk-devel
-# needed for testing
-BuildRequires: python3-nose
-Requires: python3-dateutil
-Requires: python3-numpy >= 1.2.1
-Requires: python3-pyparsing
+# WebAgg dependencies
+BuildRequires: python3-tornado
+# Wx Dependencies
+# BuildRequires: python3-wxWidgets
+# BuildRequires: wxWidgets-devel
+# %%define _use_internal_dependency_generator 0
+# %%define __find_requires %%wx_requires
+Requires: python3-dateutil >= 1.1
+Requires: python3-numpy >= 1.6
+Requires: python3-pyparsing >= 1.5.6
Requires: python3-pytz
+Requires: python3-six >= 1.3
Recommends: ghostscript
Recommends: inkscape
Recommends: libxml2-tools
+Recommends: python-Pillow
Recommends: poppler-tools
+Recommends: python-matplotlib-tk
Recommends: texlive-dvipng
Recommends: texlive-latex
Recommends: texlive-sfmath
Recommends: texlive-tex
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
matplotlib is a python 2D plotting library which produces publication
@@ -95,11 +108,23 @@
scripts, the python and ipython shell (ala matlab or mathematica), web
application servers, and six graphical user interface toolkits.
+%package cairo
+Summary: Cairo backend for %{name}
+License: SUSE-Matplotlib
+Group: Development/Libraries/Python
+Requires: %{name} = %{version}
+Requires: python3-cairocffi
+
+%description cairo
+This package includes the non-interactive Cairo-based backend
+for the %{name} plotting package
+
%package gtk2
Summary: GTK2 backends for %{name}
License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
+Requires: %{name}-cairo = %{version}
Requires: python3-gobject2
%description gtk2
@@ -111,9 +136,8 @@
License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
-Requires: python3-cairo
+Requires: %{name}-cairo = %{version}
Requires: python3-gobject
-Requires: python3-gobject-cairo
%description gtk3
This package includes the GTK3-based gtk3, gtk3agg, and
@@ -126,12 +150,12 @@
Requires: %{name} = %{version}
%description qt-shared
-This package includes files needed by both the Qt4-based pyqt4
-backend and the Qt5-based pyqt5 backend for the %{name}
+This package includes files needed by both the Qt4-based pyqt4 and
+pyside backends and the Qt5-based pyqt5 backend for the %{name}
plotting package
%package qt4
-Summary: Qt4 backend for %{name}
+Summary: Qt4 backends for %{name}
License: BSD-2-Clause
Group: Development/Libraries/Python
Requires: %{name} = %{version}
@@ -174,6 +198,7 @@
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: python3-tk
+Requires: tcl >= 8.3
%description tk
This package includes the Tk-based tkagg backend
@@ -203,6 +228,7 @@
%prep
%setup -q -n matplotlib-%{version}
+chmod -x lib/matplotlib/mpl-data/images/*.svg
find examples lib/matplotlib lib/mpl_toolkits/mplot3d -type f -name "*.py" -exec sed -i "s|#!\/usr\/bin\/env python||" {} \;
%build
@@ -219,8 +245,6 @@
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix}
%fdupes %{buildroot}%{python3_sitearch}
-%fdupes %{buildroot}%{py_sitedir}/matplotlib/tests/baseline_images/
-
%files
%defattr(-,root,root,-)
%doc README.rst LICENSE CHANGELOG PKG-INFO examples doc/users/license.rst
@@ -255,21 +279,23 @@
%exclude %{python3_sitearch}/matplotlib/backends/qt_compat.*
%exclude %{python3_sitearch}/matplotlib/backends/qt4_compat.*
%exclude %{python3_sitearch}/matplotlib/backends/tkagg.*
-%exclude %{python3_sitearch}/matplotlib/backends/windowing.*
%exclude %{python3_sitearch}/matplotlib/backends/qt_editor/
%exclude %{python3_sitearch}/matplotlib/backends/web_backend/
-%exclude %{python3_sitearch}/mpl_toolkits/gtktools.py*
+%exclude %{python3_sitearch}/mpl_toolkits/gtktools.*
+
+%files cairo
+%defattr(-,root,root,-)
+%{python3_sitearch}/matplotlib/backends/backend_cairo.*
%files gtk2
%defattr(-,root,root,-)
# %{python3_sitearch}/matplotlib/backends/_backend_gdk.so
# %{python3_sitearch}/matplotlib/backends/_gtkagg.so
-%{python3_sitearch}/matplotlib/backends/backend_cairo.*
%{python3_sitearch}/matplotlib/backends/backend_gdk.*
%{python3_sitearch}/matplotlib/backends/backend_gtk.*
%{python3_sitearch}/matplotlib/backends/backend_gtkagg.*
%{python3_sitearch}/matplotlib/backends/backend_gtkcairo.*
-%{python3_sitearch}/mpl_toolkits/gtktools.py*
+%{python3_sitearch}/mpl_toolkits/gtktools.*
%files gtk3
%defattr(-,root,root,-)
@@ -277,13 +303,14 @@
%{python3_sitearch}/matplotlib/backends/backend_gtk3agg.*
%{python3_sitearch}/matplotlib/backends/backend_gtk3cairo.*
-%if 0%{?suse_version} > 1220
-%files qt-shared
# IMPORTANT: the qt4 backend makes use of the qt5 backend,
# which is actually a generic qt backend.
# So we need to package all the qt5 stuff in this generic
# package, and provide a stub package which pulls in the
# python-qt5 dependency.
+
+%files qt-shared
+%defattr(-,root,root,-)
%{python3_sitearch}/matplotlib/backends/backend_qt5.*
%{python3_sitearch}/matplotlib/backends/backend_qt5agg.*
%{python3_sitearch}/matplotlib/backends/qt_compat.*
@@ -305,7 +332,6 @@
# python-qt5 dependency.
%doc README.rst
%endif
-%endif
%files tk
%defattr(-,root,root,-)
@@ -324,5 +350,4 @@
# %{python3_sitearch}/matplotlib/backends/backend_wx.*
# %{python3_sitearch}/matplotlib/backends/backend_wxagg.*
-
%changelog
--
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 kiwi-config-openSUSE for openSUSE:Factory checked in at 2014-09-18 07:12:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiwi-config-openSUSE (Old)
and /work/SRC/openSUSE:Factory/.kiwi-config-openSUSE.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiwi-config-openSUSE"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kiwi-config-openSUSE/kiwi-config-openSUSE.changes 2014-09-10 17:03:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kiwi-config-openSUSE.new/kiwi-config-openSUSE.changes 2014-09-18 07:12:53.000000000 +0200
@@ -1,0 +2,16 @@
+Wed Sep 17 04:49:28 UTC 2014 - coolo(a)suse.com
+
+- buildrequire the fixed control.xml
+
+-------------------------------------------------------------------
+Mon Sep 15 10:00:53 UTC 2014 - coolo(a)suse.com
+
+- more cleanup of old usb stuff
+
+-------------------------------------------------------------------
+Sun Sep 14 10:28:37 UTC 2014 - cyberorg(a)opensuse.org
+
+- Fix langset.service to start on boot by adding install section
+ in langset.service
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi-config-openSUSE.spec ++++++
--- /var/tmp/diff_new_pack.oTkT9n/_old 2014-09-18 07:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.oTkT9n/_new 2014-09-18 07:12:54.000000000 +0200
@@ -26,7 +26,7 @@
BuildRequires: kiwi-tools
BuildRequires: libxml2-tools
BuildRequires: libxslt
-BuildRequires: skelcd-control-openSUSE
+BuildRequires: skelcd-control-openSUSE >= 13.2.15
BuildRequires: skelcd-openSUSE-CD
BuildRequires: xdm
BuildRequires: yast2-country
@@ -110,7 +110,6 @@
;;
x11)
sed -i -e "s,@PLIST@,X11-cd," config.xml
- sed -i -e '/yast2-live-installer/d' config.xml
;;
esac
label=`echo "$volid" | sed -e 's, ,_,g'`
@@ -148,9 +147,7 @@
install -D -m 755 %{SOURCE16} usr/lib/systemd/system/langset.service
install -D -m 755 %{SOURCE11} usr/bin/correct_live_for_reboot
install -D -m 755 %{SOURCE12} usr/bin/correct_live_install
- if test $desktop != x11; then
install -m 644 %{SOURCE26} etc/YaST2/liveinstall.patch
- fi
mkdir -p var/lib/zypp/
echo livecd-$desktop > var/lib/zypp/LastDistributionFlavor
++++++ config.sh ++++++
--- /var/tmp/diff_new_pack.oTkT9n/_old 2014-09-18 07:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.oTkT9n/_new 2014-09-18 07:12:54.000000000 +0200
@@ -44,10 +44,6 @@
patch -p0 < /etc/YaST2/liveinstall.patch
fi
-if test -f /etc/YaST2/firstboot.xml -a -f /var/lib/livecd/config-firstboot.patch; then
- patch -f /etc/YaST2/firstboot.xml /var/lib/livecd/config-firstboot.patch
-fi
-
for i in /rpmkeys/gpg*.asc; do
# the import fails if kiwi already had this key
rpm --import $i || true
@@ -103,3 +99,5 @@
baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE us.map.gz
baseUpdateSysConfig /etc/sysconfig/keyboard YAST_KEYBOARD english-us,pc104
+# bug 891183 yast2 live-installer --gtk segfaults
+baseUpdateSysConfig /etc/sysconfig/yast2 WANTED_GUI qt
++++++ correct_live_install ++++++
--- /var/tmp/diff_new_pack.oTkT9n/_old 2014-09-18 07:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.oTkT9n/_new 2014-09-18 07:12:54.000000000 +0200
@@ -3,11 +3,6 @@
# this script is called from the live installer once it is done (including 2nd stage)
# So the goal of this script is to fix whatever configs were changed for the live system
-is_usb=0
-if test "$1" = usb; then
- is_usb=1
-fi
-
#======================================
# /etc/sudoers hack to fix #297695
# (Installation Live CD: no need to ask for password of root)
@@ -22,10 +17,8 @@
# reset pam config
pam-config -d --nullok
-if test "$is_usb" = 0; then
- # remove unneeded /license.tar.gz
- rm /license.tar.gz
-fi
+# remove unneeded /license.tar.gz
+rm /license.tar.gz
# remove langset stuff
rm /etc/langset.sh
@@ -38,13 +31,6 @@
# bug 391798
sed -i -e 's,DISPLAYMANAGER_AUTOLOGIN="linux",DISPLAYMANAGER_AUTOLOGIN="",' /etc/sysconfig/displaymanager
-if test "$is_usb" = 0; then
- # not good enough for usb
- # there we need something dynamic in firstboot
- /bin/cat /proc/sys/kernel/random/uuid > /etc/smolt/uuid
- rm /license.tar.gz
-fi
-
rm -f /var/lib/zypp/AnonymousUniqueId
rmdir /livecd || true
rmdir /read-only || true
++++++ langset.service ++++++
--- /var/tmp/diff_new_pack.oTkT9n/_old 2014-09-18 07:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.oTkT9n/_new 2014-09-18 07:12:54.000000000 +0200
@@ -9,3 +9,6 @@
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh /etc/langset.sh
+
+[Install]
+WantedBy=default.target
--
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-jsonpatch for openSUSE:Factory checked in at 2014-09-18 07:12:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonpatch (Old)
and /work/SRC/openSUSE:Factory/.python-jsonpatch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonpatch"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonpatch/python-jsonpatch.changes 2013-11-24 12:32:18.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-jsonpatch.new/python-jsonpatch.changes 2014-09-18 07:12:48.000000000 +0200
@@ -1,0 +2,15 @@
+Mon Sep 15 09:40:21 UTC 2014 - tbechtold(a)suse.com
+
+- update to version 1.7:
+ * bump version to 1.7
+ * [Setup] use utf-8 explicitly in setup.py
+ * bump version to 1.6
+ * Fix make_patch() when root is an array (fixes #28)
+ * Merge branch 'remove-error' of https://github.com/umago/python-json-patch
+ * Improve error message when removing non-existent objects
+ * bump version to 1.5
+ * fix test for Python 3
+ * fix make_patch where obj keys contain "/", fixes #26
+- Update Requires for python-jsonpointer
+
+-------------------------------------------------------------------
Old:
----
jsonpatch-1.3.tar.gz
New:
----
jsonpatch-1.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jsonpatch.spec ++++++
--- /var/tmp/diff_new_pack.hbDiT2/_old 2014-09-18 07:12:48.000000000 +0200
+++ /var/tmp/diff_new_pack.hbDiT2/_new 2014-09-18 07:12:48.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jsonpatch
#
-# 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
@@ -17,7 +17,7 @@
Name: python-jsonpatch
-Version: 1.3
+Version: 1.7
Release: 0
Summary: Python - JSON-Patches
License: BSD-3-Clause
@@ -26,7 +26,7 @@
Source: http://pypi.python.org/packages/source/j/jsonpatch/jsonpatch-%{version}.tar…
BuildRequires: python-devel
BuildRequires: python-jsonpointer
-Requires: python-jsonpointer >= 1.0
+Requires: python-jsonpointer >= 1.3
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ jsonpatch-1.3.tar.gz -> jsonpatch-1.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/PKG-INFO new/jsonpatch-1.7/PKG-INFO
--- old/jsonpatch-1.3/PKG-INFO 2013-10-13 15:14:53.000000000 +0200
+++ new/jsonpatch-1.7/PKG-INFO 2014-07-03 22:07:40.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: jsonpatch
-Version: 1.3
+Version: 1.7
Summary: Apply JSON-Patches (RFC 6902)
Home-page: https://github.com/stefankoegl/python-json-patch
Author: Stefan Kögl
@@ -8,3 +8,20 @@
License: Modified BSD License
Description: UNKNOWN
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/README.md new/jsonpatch-1.7/README.md
--- old/jsonpatch-1.3/README.md 2013-10-13 15:06:14.000000000 +0200
+++ new/jsonpatch-1.7/README.md 2013-12-25 12:54:46.000000000 +0100
@@ -11,9 +11,12 @@
* Website: https://github.com/stefankoegl/python-json-patch
* Repository: https://github.com/stefankoegl/python-json-patch.git
* Documentation: https://python-json-patch.readthedocs.org/
+* PyPI: https://pypi.python.org/pypi/jsonpatch
+* Travis-CI: https://travis-ci.org/stefankoegl/python-json-patch
+* Coveralls: https://coveralls.io/r/stefankoegl/python-json-patch
Running external tests
----------------------
-To run external tests (such as those from https://github.com/json-patch/json-patch-tests) use ext_test.py
+To run external tests (such as those from https://github.com/json-patch/json-patch-tests) use ext_test.py
./ext_tests.py ../json-patch-tests/tests.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/bin/jsonpatch new/jsonpatch-1.7/bin/jsonpatch
--- old/jsonpatch-1.3/bin/jsonpatch 2013-10-13 15:06:14.000000000 +0200
+++ new/jsonpatch-1.7/bin/jsonpatch 2014-03-22 11:36:01.000000000 +0100
@@ -1,12 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-from __future__ import print_function
-
import sys
import os.path
import json
import jsonpatch
+import tempfile
import argparse
@@ -15,9 +14,14 @@
parser.add_argument('ORIGINAL', type=argparse.FileType('r'),
help='Original file')
parser.add_argument('PATCH', type=argparse.FileType('r'),
- help='Patch file')
+ nargs='?', default=sys.stdin,
+ help='Patch file (read from stdin if omitted)')
parser.add_argument('--indent', type=int, default=None,
help='Indent output by n spaces')
+parser.add_argument('-b', '--backup', action='store_true',
+ help='Back up ORIGINAL if modifying in-place')
+parser.add_argument('-i', '--in-place', action='store_true',
+ help='Modify ORIGINAL in-place instead of to stdout')
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + jsonpatch.__version__)
@@ -35,7 +39,67 @@
doc = json.load(args.ORIGINAL)
patch = json.load(args.PATCH)
result = jsonpatch.apply_patch(doc, patch)
- print(json.dumps(result, indent=args.indent))
+
+ if args.in_place:
+ dirname = os.path.abspath(os.path.dirname(args.ORIGINAL.name))
+
+ try:
+ # Attempt to replace the file atomically. We do this by
+ # creating a temporary file in the same directory as the
+ # original file so we can atomically move the new file over
+ # the original later. (This is done in the same directory
+ # because atomic renames do not work across mount points.)
+
+ fd, pathname = tempfile.mkstemp(dir=dirname)
+ fp = os.fdopen(fd, 'w')
+ atomic = True
+
+ except OSError:
+ # We failed to create the temporary file for an atomic
+ # replace, so fall back to non-atomic mode by backing up
+ # the original (if desired) and writing a new file.
+
+ if args.backup:
+ os.rename(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
+ fp = open(args.ORIGINAL.name, 'w')
+ atomic = False
+
+ else:
+ # Since we're not replacing the original file in-place, write
+ # the modified JSON to stdout instead.
+
+ fp = sys.stdout
+
+ # By this point we have some sort of file object we can write the
+ # modified JSON to.
+
+ json.dump(result, fp, indent=args.indent)
+ fp.write('\n')
+
+ if args.in_place:
+ # Close the new file. If we aren't replacing atomically, this
+ # is our last step, since everything else is already in place.
+
+ fp.close()
+
+ if atomic:
+ try:
+ # Complete the atomic replace by linking the original
+ # to a backup (if desired), fixing up the permissions
+ # on the temporary file, and moving it into place.
+
+ if args.backup:
+ os.link(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
+ os.chmod(pathname, os.stat(args.ORIGINAL.name).st_mode)
+ os.rename(pathname, args.ORIGINAL.name)
+
+ except OSError:
+ # In the event we could not actually do the atomic
+ # replace, unlink the original to move it out of the
+ # way and finally move the temporary file into place.
+
+ os.unlink(args.ORIGINAL.name)
+ os.rename(pathname, args.ORIGINAL.name)
if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/jsonpatch.egg-info/PKG-INFO new/jsonpatch-1.7/jsonpatch.egg-info/PKG-INFO
--- old/jsonpatch-1.3/jsonpatch.egg-info/PKG-INFO 2013-10-13 15:14:53.000000000 +0200
+++ new/jsonpatch-1.7/jsonpatch.egg-info/PKG-INFO 2014-07-03 22:07:40.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: jsonpatch
-Version: 1.3
+Version: 1.7
Summary: Apply JSON-Patches (RFC 6902)
Home-page: https://github.com/stefankoegl/python-json-patch
Author: Stefan Kögl
@@ -8,3 +8,20 @@
License: Modified BSD License
Description: UNKNOWN
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/jsonpatch.egg-info/SOURCES.txt new/jsonpatch-1.7/jsonpatch.egg-info/SOURCES.txt
--- old/jsonpatch-1.3/jsonpatch.egg-info/SOURCES.txt 2013-10-13 15:14:53.000000000 +0200
+++ new/jsonpatch-1.7/jsonpatch.egg-info/SOURCES.txt 2014-07-03 22:07:40.000000000 +0200
@@ -12,5 +12,6 @@
jsonpatch.egg-info/PKG-INFO
jsonpatch.egg-info/SOURCES.txt
jsonpatch.egg-info/dependency_links.txt
+jsonpatch.egg-info/entry_points.txt
jsonpatch.egg-info/requires.txt
jsonpatch.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/jsonpatch.egg-info/entry_points.txt new/jsonpatch-1.7/jsonpatch.egg-info/entry_points.txt
--- old/jsonpatch-1.3/jsonpatch.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/jsonpatch-1.7/jsonpatch.egg-info/entry_points.txt 2014-07-03 22:07:40.000000000 +0200
@@ -0,0 +1,4 @@
+[console_scripts]
+jsonpatch = jsonpatch:main
+jsondiff = jsondiff:main
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/jsonpatch.egg-info/requires.txt new/jsonpatch-1.7/jsonpatch.egg-info/requires.txt
--- old/jsonpatch-1.3/jsonpatch.egg-info/requires.txt 2013-10-13 15:14:53.000000000 +0200
+++ new/jsonpatch-1.7/jsonpatch.egg-info/requires.txt 2014-07-03 22:07:40.000000000 +0200
@@ -1 +1 @@
-jsonpointer>=1.0
\ No newline at end of file
+jsonpointer>=1.3
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/jsonpatch.py new/jsonpatch-1.7/jsonpatch.py
--- old/jsonpatch-1.3/jsonpatch.py 2013-10-13 15:13:27.000000000 +0200
+++ new/jsonpatch-1.7/jsonpatch.py 2014-07-03 22:03:46.000000000 +0200
@@ -30,31 +30,32 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+""" Apply JSON-Patches (RFC 6902) """
+
from __future__ import unicode_literals
-""" Apply JSON-Patches (RFC 6902) """
+import collections
+import copy
+import functools
+import inspect
+import itertools
+import json
+import sys
+
+from jsonpointer import JsonPointer, JsonPointerException
# Will be parsed by setup.py to determine package metadata
__author__ = 'Stefan Kögl <stefan(a)skoegl.net>'
-__version__ = '1.3'
+__version__ = '1.7'
__website__ = 'https://github.com/stefankoegl/python-json-patch'
__license__ = 'Modified BSD License'
-import copy
-import sys
-import operator
-import collections
-
-import json
-
-import jsonpointer
+# pylint: disable=E0611,W0404
if sys.version_info >= (3, 0):
- basestring = (bytes, str)
+ basestring = (bytes, str) # pylint: disable=C0103,W0622
-JsonPointerException = jsonpointer.JsonPointerException
-
class JsonPatchException(Exception):
"""Base Json Patch exception"""
@@ -67,6 +68,7 @@
- etc.
"""
+
class JsonPatchTestFailed(JsonPatchException, AssertionError):
""" A Test operation failed """
@@ -74,15 +76,15 @@
def multidict(ordered_pairs):
"""Convert duplicate keys values to lists."""
# read all values into lists
- d = collections.defaultdict(list)
- for k, v in ordered_pairs:
- d[k].append(v)
-
- # unpack lists that have only 1 item
- for k, v in d.items():
- if len(v) == 1:
- d[k] = v[0]
- return dict(d)
+ mdict = collections.defaultdict(list)
+ for key, value in ordered_pairs:
+ mdict[key].append(value)
+
+ return dict(
+ # unpack lists that have only 1 item
+ (key, values[0] if len(values) == 1 else values)
+ for key, values in mdict.items()
+ )
def get_loadjson():
@@ -94,9 +96,6 @@
function with object_pairs_hook set to multidict for Python versions that
support the parameter. """
- import inspect
- import functools
-
argspec = inspect.getargspec(json.load)
if 'object_pairs_hook' not in argspec.args:
return json.load
@@ -123,12 +122,14 @@
:rtype: dict
>>> doc = {'foo': 'bar'}
- >>> other = apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}])
+ >>> patch = [{'op': 'add', 'path': '/baz', 'value': 'qux'}]
+ >>> other = apply_patch(doc, patch)
>>> doc is not other
True
>>> other == {'foo': 'bar', 'baz': 'qux'}
True
- >>> apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}], in_place=True) == {'foo': 'bar', 'baz': 'qux'}
+ >>> patch = [{'op': 'add', 'path': '/baz', 'value': 'qux'}]
+ >>> apply_patch(doc, patch, in_place=True) == {'foo': 'bar', 'baz': 'qux'}
True
>>> doc == other
True
@@ -140,6 +141,7 @@
patch = JsonPatch(patch)
return patch.apply(doc, in_place)
+
def make_patch(src, dst):
"""Generates patch by comparing of two document objects. Actually is
a proxy to :meth:`JsonPatch.from_diff` method.
@@ -230,18 +232,16 @@
def __iter__(self):
return iter(self.patch)
-
def __hash__(self):
return hash(tuple(self._ops))
-
def __eq__(self, other):
if not isinstance(other, JsonPatch):
return False
+ return self._ops == other._ops
- return len(list(self._ops)) == len(list(other._ops)) and \
- all(map(operator.eq, self._ops, other._ops))
-
+ def __ne__(self, other):
+ return not(self == other)
@classmethod
def from_string(cls, patch_str):
@@ -280,41 +280,35 @@
if value == other:
return
if isinstance(value, dict) and isinstance(other, dict):
- for operation in compare_dict(path, value, other):
+ for operation in compare_dicts(path, value, other):
yield operation
elif isinstance(value, list) and isinstance(other, list):
- for operation in compare_list(path, value, other):
+ for operation in compare_lists(path, value, other):
yield operation
else:
- yield {'op': 'replace', 'path': '/'.join(path), 'value': other}
+ ptr = JsonPointer.from_parts(path)
+ yield {'op': 'replace', 'path': ptr.path, 'value': other}
- def compare_dict(path, src, dst):
+ def compare_dicts(path, src, dst):
for key in src:
if key not in dst:
- yield {'op': 'remove', 'path': '/'.join(path + [key])}
+ ptr = JsonPointer.from_parts(path + [key])
+ yield {'op': 'remove', 'path': ptr.path}
continue
current = path + [key]
for operation in compare_values(current, src[key], dst[key]):
yield operation
for key in dst:
if key not in src:
- yield {'op': 'add', 'path': '/'.join(path + [key]), 'value': dst[key]}
+ ptr = JsonPointer.from_parts(path + [key])
+ yield {'op': 'add',
+ 'path': ptr.path,
+ 'value': dst[key]}
- def compare_list(path, src, dst):
- lsrc, ldst = len(src), len(dst)
- for idx in range(min(lsrc, ldst)):
- current = path + [str(idx)]
- for operation in compare_values(current, src[idx], dst[idx]):
- yield operation
- if lsrc < ldst:
- for idx in range(lsrc, ldst):
- current = path + [str(idx)]
- yield {'op': 'add', 'path': '/'.join(current), 'value': dst[idx]}
- elif lsrc > ldst:
- for idx in reversed(range(ldst, lsrc)):
- yield {'op': 'remove', 'path': '/'.join(path + [str(idx)])}
+ def compare_lists(path, src, dst):
+ return _compare_lists(path, src, dst)
- return cls(list(compare_dict([''], src, dst)))
+ return cls(list(compare_values([], src, dst)))
def to_string(self):
"""Returns patch set as JSON string."""
@@ -322,7 +316,7 @@
@property
def _ops(self):
- return map(self._get_operation, self.patch)
+ return tuple(map(self._get_operation, self.patch))
def apply(self, obj, in_place=False):
"""Applies the patch to given object.
@@ -355,36 +349,35 @@
raise JsonPatchException("Operation must be a string")
if op not in self.operations:
- raise JsonPatchException("Unknown operation '%s'" % op)
+ raise JsonPatchException("Unknown operation {0!r}".format(op))
cls = self.operations[op]
return cls(operation)
-
class PatchOperation(object):
"""A single operation inside a JSON Patch."""
def __init__(self, operation):
self.location = operation['path']
- self.pointer = jsonpointer.JsonPointer(self.location)
+ self.pointer = JsonPointer(self.location)
self.operation = operation
def apply(self, obj):
"""Abstract method that applies patch operation to specified object."""
raise NotImplementedError('should implement patch operation.')
-
def __hash__(self):
return hash(frozenset(self.operation.items()))
-
def __eq__(self, other):
if not isinstance(other, PatchOperation):
return False
-
return self.operation == other.operation
+ def __ne__(self, other):
+ return not(self == other)
+
class RemoveOperation(PatchOperation):
"""Removes an object property or an array element."""
@@ -393,8 +386,9 @@
subobj, part = self.pointer.to_last(obj)
try:
del subobj[part]
- except IndexError as ex:
- raise JsonPatchConflict(str(ex))
+ except (KeyError, IndexError) as ex:
+ msg = "can't remove non-existent object '{0}'".format(part)
+ raise JsonPatchConflict(msg)
return obj
@@ -406,30 +400,25 @@
value = self.operation["value"]
subobj, part = self.pointer.to_last(obj)
- # type is already checked in to_last(), so we assert here
- # for consistency
- assert isinstance(subobj, list) or isinstance(subobj, dict), \
- "invalid document type %s" (type(doc),)
-
if isinstance(subobj, list):
-
if part == '-':
- subobj.append(value)
+ subobj.append(value) # pylint: disable=E1103
elif part > len(subobj) or part < 0:
raise JsonPatchConflict("can't insert outside of list")
else:
- subobj.insert(part, value)
+ subobj.insert(part, value) # pylint: disable=E1103
elif isinstance(subobj, dict):
if part is None:
- # we're replacing the root
- obj = value
-
+ obj = value # we're replacing the root
else:
subobj[part] = value
+ else:
+ raise TypeError("invalid document type {0}".format(type(subobj)))
+
return obj
@@ -440,11 +429,6 @@
value = self.operation["value"]
subobj, part = self.pointer.to_last(obj)
- # type is already checked in to_last(), so we assert here
- # for consistency
- assert isinstance(subobj, list) or isinstance(subobj, dict), \
- "invalid document type %s" (type(doc),)
-
if part is None:
return value
@@ -454,8 +438,10 @@
elif isinstance(subobj, dict):
if not part in subobj:
- raise JsonPatchConflict("can't replace non-existant object '%s'"
- "" % part)
+ msg = "can't replace non-existent object '{0}'".format(part)
+ raise JsonPatchConflict(msg)
+ else:
+ raise TypeError("invalid document type {0}".format(type(subobj)))
subobj[part] = value
return obj
@@ -465,15 +451,27 @@
"""Moves an object property or an array element to new location."""
def apply(self, obj):
- from_ptr = jsonpointer.JsonPointer(self.operation['from'])
+ from_ptr = JsonPointer(self.operation['from'])
subobj, part = from_ptr.to_last(obj)
- value = subobj[part]
+ try:
+ value = subobj[part]
+ except (KeyError, IndexError) as ex:
+ raise JsonPatchConflict(str(ex))
- if self.pointer.contains(from_ptr):
+ if isinstance(subobj, dict) and self.pointer.contains(from_ptr):
raise JsonPatchException('Cannot move values into its own children')
- obj = RemoveOperation({'op': 'remove', 'path': self.operation['from']}).apply(obj)
- obj = AddOperation({'op': 'add', 'path': self.location, 'value': value}).apply(obj)
+ obj = RemoveOperation({
+ 'op': 'remove',
+ 'path': self.operation['from']
+ }).apply(obj)
+
+ obj = AddOperation({
+ 'op': 'add',
+ 'path': self.location,
+ 'value': value
+ }).apply(obj)
+
return obj
@@ -487,14 +485,15 @@
val = subobj
else:
val = self.pointer.walk(subobj, part)
-
except JsonPointerException as ex:
raise JsonPatchTestFailed(str(ex))
if 'value' in self.operation:
value = self.operation['value']
if val != value:
- raise JsonPatchTestFailed('%s is not equal to tested value %s (types %s and %s)' % (val, value, type(val), type(value)))
+ msg = '{0} ({1}) is not equal to tested value {2} ({3})'
+ raise JsonPatchTestFailed(msg.format(val, type(val),
+ value, type(value)))
return obj
@@ -503,8 +502,245 @@
""" Copies an object property or an array element to a new location """
def apply(self, obj):
- from_ptr = jsonpointer.JsonPointer(self.operation['from'])
+ from_ptr = JsonPointer(self.operation['from'])
subobj, part = from_ptr.to_last(obj)
- value = copy.deepcopy(subobj[part])
- obj = AddOperation({'op': 'add', 'path': self.location, 'value': value}).apply(obj)
+ try:
+ value = copy.deepcopy(subobj[part])
+ except (KeyError, IndexError) as ex:
+ raise JsonPatchConflict(str(ex))
+
+ obj = AddOperation({
+ 'op': 'add',
+ 'path': self.location,
+ 'value': value
+ }).apply(obj)
+
return obj
+
+
+def _compare_lists(path, src, dst):
+ """Compares two lists objects and return JSON patch about."""
+ return _optimize(_compare(path, src, dst, *_split_by_common_seq(src, dst)))
+
+
+def _longest_common_subseq(src, dst):
+ """Returns pair of ranges of longest common subsequence for the `src`
+ and `dst` lists.
+
+ >>> src = [1, 2, 3, 4]
+ >>> dst = [0, 1, 2, 3, 5]
+ >>> # The longest common subsequence for these lists is [1, 2, 3]
+ ... # which is located at (0, 3) index range for src list and (1, 4) for
+ ... # dst one. Tuple of these ranges we should get back.
+ ... assert ((0, 3), (1, 4)) == _longest_common_subseq(src, dst)
+ """
+ lsrc, ldst = len(src), len(dst)
+ drange = list(range(ldst))
+ matrix = [[0] * ldst for _ in range(lsrc)]
+ z = 0 # length of the longest subsequence
+ range_src, range_dst = None, None
+ for i, j in itertools.product(range(lsrc), drange):
+ if src[i] == dst[j]:
+ if i == 0 or j == 0:
+ matrix[i][j] = 1
+ else:
+ matrix[i][j] = matrix[i-1][j-1] + 1
+ if matrix[i][j] > z:
+ z = matrix[i][j]
+ if matrix[i][j] == z:
+ range_src = (i-z+1, i+1)
+ range_dst = (j-z+1, j+1)
+ else:
+ matrix[i][j] = 0
+ return range_src, range_dst
+
+
+def _split_by_common_seq(src, dst, bx=(0, -1), by=(0, -1)):
+ """Recursively splits the `dst` list onto two parts: left and right.
+ The left part contains differences on left from common subsequence,
+ same as the right part by for other side.
+
+ To easily understand the process let's take two lists: [0, 1, 2, 3] as
+ `src` and [1, 2, 4, 5] for `dst`. If we've tried to generate the binary tree
+ where nodes are common subsequence for both lists, leaves on the left
+ side are subsequence for `src` list and leaves on the right one for `dst`,
+ our tree would looks like::
+
+ [1, 2]
+ / \
+ [0] []
+ / \
+ [3] [4, 5]
+
+ This function generate the similar structure as flat tree, but without
+ nodes with common subsequences - since we're don't need them - only with
+ left and right leaves::
+
+ []
+ / \
+ [0] []
+ / \
+ [3] [4, 5]
+
+ The `bx` is the absolute range for currently processed subsequence of
+ `src` list. The `by` means the same, but for the `dst` list.
+ """
+ # Prevent useless comparisons in future
+ bx = bx if bx[0] != bx[1] else None
+ by = by if by[0] != by[1] else None
+
+ if not src:
+ return [None, by]
+ elif not dst:
+ return [bx, None]
+
+ # note that these ranges are relative for processed sublists
+ x, y = _longest_common_subseq(src, dst)
+
+ if x is None or y is None: # no more any common subsequence
+ return [bx, by]
+
+ return [_split_by_common_seq(src[:x[0]], dst[:y[0]],
+ (bx[0], bx[0] + x[0]),
+ (by[0], by[0] + y[0])),
+ _split_by_common_seq(src[x[1]:], dst[y[1]:],
+ (bx[0] + x[1], bx[0] + len(src)),
+ (bx[0] + y[1], bx[0] + len(dst)))]
+
+
+def _compare(path, src, dst, left, right):
+ """Same as :func:`_compare_with_shift` but strips emitted `shift` value."""
+ for op, _ in _compare_with_shift(path, src, dst, left, right, 0):
+ yield op
+
+
+def _compare_with_shift(path, src, dst, left, right, shift):
+ """Recursively compares differences from `left` and `right` sides
+ from common subsequences.
+
+ The `shift` parameter is used to store index shift which caused
+ by ``add`` and ``remove`` operations.
+
+ Yields JSON patch operations and list index shift.
+ """
+ if isinstance(left, list):
+ for item, shift in _compare_with_shift(path, src, dst, *left,
+ shift=shift):
+ yield item, shift
+ elif left is not None:
+ for item, shift in _compare_left(path, src, left, shift):
+ yield item, shift
+
+ if isinstance(right, list):
+ for item, shift in _compare_with_shift(path, src, dst, *right,
+ shift=shift):
+ yield item, shift
+ elif right is not None:
+ for item, shift in _compare_right(path, dst, right, shift):
+ yield item, shift
+
+
+def _compare_left(path, src, left, shift):
+ """Yields JSON patch ``remove`` operations for elements that are only
+ exists in the `src` list."""
+ start, end = left
+ if end == -1:
+ end = len(src)
+ # we need to `remove` elements from list tail to not deal with index shift
+ for idx in reversed(range(start + shift, end + shift)):
+ ptr = JsonPointer.from_parts(path + [str(idx)])
+ yield (
+ {'op': 'remove',
+ # yes, there should be any value field, but we'll use it
+ # to apply `move` optimization a bit later and will remove
+ # it in _optimize function.
+ 'value': src[idx - shift],
+ 'path': ptr.path,
+ },
+ shift - 1
+ )
+ shift -= 1
+
+
+def _compare_right(path, dst, right, shift):
+ """Yields JSON patch ``add`` operations for elements that are only
+ exists in the `dst` list"""
+ start, end = right
+ if end == -1:
+ end = len(dst)
+ for idx in range(start, end):
+ ptr = JsonPointer.from_parts(path + [str(idx)])
+ yield (
+ {'op': 'add', 'path': ptr.path, 'value': dst[idx]},
+ shift + 1
+ )
+ shift += 1
+
+
+def _optimize(operations):
+ """Optimizes operations which was produced by lists comparison.
+
+ Actually it does two kinds of optimizations:
+
+ 1. Seeks pair of ``remove`` and ``add`` operations against the same path
+ and replaces them with ``replace`` operation.
+ 2. Seeks pair of ``remove`` and ``add`` operations for the same value
+ and replaces them with ``move`` operation.
+ """
+ result = []
+ ops_by_path = {}
+ ops_by_value = {}
+ add_remove = set(['add', 'remove'])
+ for item in operations:
+ # could we apply "move" optimization for dict values?
+ hashable_value = not isinstance(item['value'], (dict, list))
+ if item['path'] in ops_by_path:
+ _optimize_using_replace(ops_by_path[item['path']], item)
+ continue
+ if hashable_value and item['value'] in ops_by_value:
+ prev_item = ops_by_value[item['value']]
+ # ensure that we processing pair of add-remove ops
+ if set([item['op'], prev_item['op']]) == add_remove:
+ _optimize_using_move(prev_item, item)
+ ops_by_value.pop(item['value'])
+ continue
+ result.append(item)
+ ops_by_path[item['path']] = item
+ if hashable_value:
+ ops_by_value[item['value']] = item
+
+ # cleanup
+ ops_by_path.clear()
+ ops_by_value.clear()
+ for item in result:
+ if item['op'] == 'remove':
+ item.pop('value') # strip our hack
+ yield item
+
+
+def _optimize_using_replace(prev, cur):
+ """Optimises JSON patch by using ``replace`` operation instead of
+ ``remove`` and ``add`` against the same path."""
+ prev['op'] = 'replace'
+ if cur['op'] == 'add':
+ prev['value'] = cur['value']
+
+
+def _optimize_using_move(prev_item, item):
+ """Optimises JSON patch by using ``move`` operation instead of
+ ``remove` and ``add`` against the different paths but for the same value."""
+ prev_item['op'] = 'move'
+ move_from, move_to = [
+ (item['path'], prev_item['path']),
+ (prev_item['path'], item['path']),
+ ][item['op'] == 'add']
+ if item['op'] == 'add': # first was remove then add
+ prev_item['from'] = move_from
+ prev_item['path'] = move_to
+ else: # first was add then remove
+ head, move_from = move_from.rsplit('/', 1)
+ # since add operation was first it incremented
+ # overall index shift value. we have to fix this
+ move_from = int(move_from) - 1
+ prev_item['from'] = head + '/%d' % move_from
+ prev_item['path'] = move_to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/requirements.txt new/jsonpatch-1.7/requirements.txt
--- old/jsonpatch-1.3/requirements.txt 2013-10-13 15:06:14.000000000 +0200
+++ new/jsonpatch-1.7/requirements.txt 2014-06-24 20:17:59.000000000 +0200
@@ -1 +1 @@
-jsonpointer>=1.0
+jsonpointer>=1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/setup.py new/jsonpatch-1.7/setup.py
--- old/jsonpatch-1.3/setup.py 2013-10-13 15:06:14.000000000 +0200
+++ new/jsonpatch-1.7/setup.py 2014-06-30 22:41:31.000000000 +0200
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
+import io
import re
import warnings
try:
@@ -10,7 +11,7 @@
from distutils.core import setup
has_setuptools = False
-src = open('jsonpatch.py').read()
+src = io.open('jsonpatch.py', encoding='utf-8').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src))
docstrings = re.findall('"""([^"]*)"""', src, re.MULTILINE | re.DOTALL)
@@ -43,6 +44,27 @@
# Extract name and e-mail ("Firstname Lastname <mail(a)example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
+CLASSIFIERS = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Console',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: Implementation :: CPython',
+ 'Programming Language :: Python :: Implementation :: PyPy',
+ 'Topic :: Software Development :: Libraries',
+ 'Topic :: Utilities',
+]
+
+
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
@@ -53,10 +75,11 @@
py_modules=MODULES,
package_data={'': ['requirements.txt']},
scripts=['bin/jsondiff', 'bin/jsonpatch'],
- entry_poimts = {
+ entry_points = {
'console_scripts': [
'jsondiff = jsondiff:main',
'jsonpatch = jsonpatch:main',
]},
+ classifiers=CLASSIFIERS,
**OPTIONS
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.3/tests.py new/jsonpatch-1.7/tests.py
--- old/jsonpatch-1.3/tests.py 2013-10-13 15:06:14.000000000 +0200
+++ new/jsonpatch-1.7/tests.py 2014-06-24 20:30:31.000000000 +0200
@@ -75,6 +75,12 @@
'value': 'boo'}])
self.assertEqual(res['foo'], ['bar', 'boo', 'baz'])
+ def test_move_object_keyerror(self):
+ obj = {'foo': {'bar': 'baz'},
+ 'qux': {'corge': 'grault'}}
+ patch_obj = [ {'op': 'move', 'from': '/foo/non-existent', 'path': '/qux/thud'} ]
+ self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, obj, patch_obj)
+
def test_move_object_key(self):
obj = {'foo': {'bar': 'baz', 'waldo': 'fred'},
'qux': {'corge': 'grault'}}
@@ -88,6 +94,18 @@
res = jsonpatch.apply_patch(obj, [{'op': 'move', 'from': '/foo/1', 'path': '/foo/3'}])
self.assertEqual(res, {'foo': ['all', 'cows', 'eat', 'grass']})
+ def test_move_array_item_into_other_item(self):
+ obj = [{"foo": []}, {"bar": []}]
+ patch = [{"op": "move", "from": "/0", "path": "/0/bar/0"}]
+ res = jsonpatch.apply_patch(obj, patch)
+ self.assertEqual(res, [{'bar': [{"foo": []}]}])
+
+ def test_copy_object_keyerror(self):
+ obj = {'foo': {'bar': 'baz'},
+ 'qux': {'corge': 'grault'}}
+ patch_obj = [{'op': 'copy', 'from': '/foo/non-existent', 'path': '/qux/thud'}]
+ self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, obj, patch_obj)
+
def test_copy_object_key(self):
obj = {'foo': {'bar': 'baz', 'waldo': 'fred'},
'qux': {'corge': 'grault'}}
@@ -279,6 +297,58 @@
}
self.assertEqual(expected, res)
+ def test_should_just_add_new_item_not_rebuild_all_list(self):
+ src = {'foo': [1, 2, 3]}
+ dst = {'foo': [3, 1, 2, 3]}
+ patch = list(jsonpatch.make_patch(src, dst))
+ self.assertEqual(len(patch), 1)
+ self.assertEqual(patch[0]['op'], 'add')
+ res = jsonpatch.apply_patch(src, patch)
+ self.assertEqual(res, dst)
+
+ def test_use_replace_instead_of_remove_add(self):
+ src = {'foo': [1, 2, 3]}
+ dst = {'foo': [3, 2, 3]}
+ patch = list(jsonpatch.make_patch(src, dst))
+ self.assertEqual(len(patch), 1)
+ self.assertEqual(patch[0]['op'], 'replace')
+ res = jsonpatch.apply_patch(src, patch)
+ self.assertEqual(res, dst)
+
+ def test_use_move_instead_of_remove_add(self):
+ src = {'foo': [4, 1, 2, 3]}
+ dst = {'foo': [1, 2, 3, 4]}
+ patch = list(jsonpatch.make_patch(src, dst))
+ self.assertEqual(len(patch), 1)
+ self.assertEqual(patch[0]['op'], 'move')
+ res = jsonpatch.apply_patch(src, patch)
+ self.assertEqual(res, dst)
+
+ def test_use_move_instead_of_add_remove(self):
+ src = {'foo': [1, 2, 3]}
+ dst = {'foo': [3, 1, 2]}
+ patch = list(jsonpatch.make_patch(src, dst))
+ self.assertEqual(len(patch), 1)
+ self.assertEqual(patch[0]['op'], 'move')
+ res = jsonpatch.apply_patch(src, patch)
+ self.assertEqual(res, dst)
+
+ def test_escape(self):
+ src = {"x/y": 1}
+ dst = {"x/y": 2}
+ patch = jsonpatch.make_patch(src, dst)
+ self.assertEqual([{"path": "/x~1y", "value": 2, "op": "replace"}], patch.patch)
+ res = patch.apply(src)
+ self.assertEqual(res, dst)
+
+ def test_root_list(self):
+ """ Test making and applying a patch of the root is a list """
+ src = [{'foo': 'bar', 'boo': 'qux'}]
+ dst = [{'baz': 'qux', 'foo': 'boo'}]
+ patch = jsonpatch.make_patch(src, dst)
+ res = patch.apply(src)
+ self.assertEqual(res, dst)
+
class InvalidInputTests(unittest.TestCase):
@@ -308,6 +378,11 @@
patch_obj = [ { "op": "remove", "path": "/foo/b"} ]
self.assertRaises(jsonpointer.JsonPointerException, jsonpatch.apply_patch, src, patch_obj)
+ def test_remove_keyerror_dict(self):
+ src = {'foo': {'bar': 'barz'}}
+ patch_obj = [ { "op": "remove", "path": "/foo/non-existent"} ]
+ self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, src, patch_obj)
+
def test_insert_oob(self):
src = {"foo": [1, 2]}
patch_obj = [ { "op": "add", "path": "/foo/10", "value": 1} ]
--
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 perl-Module-Build-XSUtil for openSUSE:Factory checked in at 2014-09-18 07:12:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-Build-XSUtil (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-Build-XSUtil.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-Build-XSUtil"
Changes:
--------
New Changes file:
--- /dev/null 2014-07-24 01:57:42.080040256 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Module-Build-XSUtil.new/perl-Module-Build-XSUtil.changes 2014-09-18 07:12:40.000000000 +0200
@@ -0,0 +1,6 @@
+-------------------------------------------------------------------
+Mon Sep 15 12:55:59 UTC 2014 - coolo(a)suse.com
+
+- initial package 0.14
+ * created by cpanspec 1.78.08
+
New:
----
Module-Build-XSUtil-0.14.tar.gz
perl-Module-Build-XSUtil.changes
perl-Module-Build-XSUtil.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-Build-XSUtil.spec ++++++
#
# spec file for package perl-Module-Build-XSUtil
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# 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/
#
Name: perl-Module-Build-XSUtil
Version: 0.14
Release: 0
%define cpan_name Module-Build-XSUtil
Summary: A Module::Build class for building XS modules
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Module-Build-XSUtil/
Source: http://www.cpan.org/authors/id/H/HI/HIDEAKIO/%{cpan_name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Capture::Tiny)
BuildRequires: perl(Cwd::Guard)
BuildRequires: perl(Devel::CheckCompiler) >= 0.02
BuildRequires: perl(Devel::PPPort) >= 3.19
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(File::Copy::Recursive)
BuildRequires: perl(Module::Build) >= 0.4005
BuildRequires: perl(Test::More) >= 0.98
BuildRequires: perl(parent)
Requires: perl(Devel::CheckCompiler) >= 0.02
Requires: perl(Devel::PPPort) >= 3.19
Requires: perl(ExtUtils::CBuilder)
Requires: perl(parent)
%{perl_requires}
%description
Module::Build::XSUtil is subclass of the Module::Build manpage for support
building XS modules.
This is a list of a new parameters in the Module::Build::new method:
* needs_compiler_c99
This option checks C99 compiler's availability. If it's not available,
Build.PL exits by 0.
* needs_compiler_cpp
This option checks C++ compiler's availability. If it's not available,
Build.PL exits by 0.
In addition, append 'extra_compiler_flags' and 'extra_linker_flags' for
C++.
* generate_ppport_h
Genereate ppport.h by the Devel::PPPort manpage.
* generate_xshelper_h
Genereate xshelper.h which is a helper header file to include EXTERN.h,
perl.h, XSUB.h and ppport.h, and defines some portability stuff which are
not supported by ppport.h.
It is porting from the Module::Install::XSUtil manpage.
* cc_warnings
Enable compiler warnings flag. It is enable by default.
* -g options
If invoke Build.PL with '-g' option, It will build with debug options.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes cpanfile LICENSE minil.tmol README.md
%changelog
--
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 linuxrc for openSUSE:Factory checked in at 2014-09-18 07:12:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
and /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2014-08-20 17:54:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2014-09-18 07:12:34.000000000 +0200
@@ -1,0 +2,26 @@
+Wed Sep 17 10:19:33 CEST 2014 - snwint(a)suse.de
+
+- don't check autoinst.xml digest (bnc #895670)
+- 5.0.19
+
+-------------------------------------------------------------------
+Mon Sep 15 13:29:22 CEST 2014 - snwint(a)suse.de
+
+- moved edd.ko loading into udev start script (bnc #871617)
+- 5.0.18
+
+-------------------------------------------------------------------
+Fri Sep 12 11:51:02 CEST 2014 - snwint(a)suse.de
+
+- finalize ifcfg option parsing
+- 5.0.17
+
+-------------------------------------------------------------------
+Thu Sep 11 11:13:59 CEST 2014 - snwint(a)suse.de
+
+- fix missing parameter to dia_input2()
+- increased memory thrreshold for loading inst-sys to RAM (bnc #893982)
+- look for autoinst.xml and keep the name (don't use autoyast.xml internally; fate #316530)
+- 5.0.16
+
+-------------------------------------------------------------------
Old:
----
linuxrc-5.0.15.tar.xz
New:
----
linuxrc-5.0.19.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.GETvOs/_old 2014-09-18 07:12:35.000000000 +0200
+++ /var/tmp/diff_new_pack.GETvOs/_new 2014-09-18 07:12:35.000000000 +0200
@@ -25,9 +25,9 @@
Summary: SUSE Installation Program
License: GPL-3.0+
Group: System/Boot
-Version: 5.0.15
+Version: 5.0.19
Release: 0
-Source: linuxrc-5.0.15.tar.xz
+Source: linuxrc-5.0.19.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
++++++ linuxrc-5.0.15.tar.xz -> linuxrc-5.0.19.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/VERSION new/linuxrc-5.0.19/VERSION
--- old/linuxrc-5.0.15/VERSION 2014-08-18 16:25:37.000000000 +0200
+++ new/linuxrc-5.0.19/VERSION 2014-09-17 10:19:26.000000000 +0200
@@ -1 +1 @@
-5.0.15
+5.0.19
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/auto2.c new/linuxrc-5.0.19/auto2.c
--- old/linuxrc-5.0.15/auto2.c 2014-08-18 15:17:24.000000000 +0200
+++ new/linuxrc-5.0.19/auto2.c 2014-09-17 10:19:00.000000000 +0200
@@ -369,18 +369,18 @@
printf("Downloading AutoYaST file: %s\n", config.autoyast2);
fflush(stdout);
}
- err = url_read_file_anywhere(url, NULL, NULL, "/download/autoyast.xml", NULL, URL_FLAG_PROGRESS + URL_FLAG_NODIGEST);
+ err = url_read_file_anywhere(url, NULL, NULL, "/download/autoinst.xml", NULL, URL_FLAG_PROGRESS + URL_FLAG_NODIGEST);
url_umount(url);
url_free(url);
if(!err) {
- fprintf(stderr, "setting AutoYaST option to file:///download/autoyast.xml\n");
- str_copy(&config.autoyast, "file:///download/autoyast.xml");
+ fprintf(stderr, "setting AutoYaST option to file:///download/autoinst.xml\n");
+ str_copy(&config.autoyast, "file:///download/autoinst.xml");
/* parse it:
* you can embed linuxrc options between lines with '# {start,end}_linuxrc_conf';
* otherwise the file content is ignored
*/
fprintf(stderr, "parsing AutoYaST file\n");
- file_read_info_file("file:/download/autoyast.xml", kf_cfg);
+ file_read_info_file("file:/download/autoinst.xml", kf_cfg);
net_update_ifcfg();
}
}
@@ -828,33 +828,35 @@
void auto2_read_repo_files(url_t *url)
{
int i;
- file_t *f0, *f;
- char *dst = NULL, *file_list = NULL;
+ char *dst = NULL;
static char *default_list[][2] = {
{ "/media.1/info.txt", "/info.txt" },
{ "/license.tar.gz", "/license.tar.gz" },
{ "/part.info", "/part.info" },
- { "/control.xml", "/control.xml" }
+ { "/control.xml", "/control.xml" },
+ { "/autoinst.xml", "/tmp/autoinst.xml" }
};
- // url_read_file(url, NULL, "/media.1/installfiles", file_list = strdup(new_download()), NULL, URL_FLAG_PROGRESS);
-
- if((f0 = file_read_file(file_list, kf_none))) {
- for(f = f0; f && !config.digests.failed; f = f->next) {
- strprintf(&dst, "/%s/%s", f->value, *f->key_str == '/' ? f->key_str + 1 : f->key_str);
- url_read_file(url, NULL, f->key_str, dst, NULL, 0 /* + URL_FLAG_PROGRESS */);
- }
- }
- else {
- for(i = 0; i < sizeof default_list / sizeof *default_list && !config.digests.failed; i++) {
- url_read_file(url, NULL, default_list[i][0], default_list[i][1], NULL, 0 /* + URL_FLAG_PROGRESS */);
- }
+ for(i = 0; i < sizeof default_list / sizeof *default_list; i++) {
+ url_read_file(url, NULL, default_list[i][0], default_list[i][1], NULL, URL_FLAG_NODIGEST);
}
- file_free_file(f0);
-
str_copy(&dst, NULL);
- str_copy(&file_list, NULL);
+
+ if(!config.autoyast) {
+ if(util_check_exist("/tmp/autoinst.xml")) rename("/tmp/autoinst.xml", "/autoinst.xml");
+ if(util_check_exist("/autoinst.xml")) {
+ fprintf(stderr, "setting AutoYaST option to file:///autoinst.xml\n");
+ str_copy(&config.autoyast, "file:///autoinst.xml");
+ /* parse it:
+ * you can embed linuxrc options between lines with '# {start,end}_linuxrc_conf';
+ * otherwise the file content is ignored
+ */
+ fprintf(stderr, "parsing AutoYaST file\n");
+ file_read_info_file("file:/autoinst.xml", kf_cfg);
+ net_update_ifcfg();
+ }
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/changelog new/linuxrc-5.0.19/changelog
--- old/linuxrc-5.0.15/changelog 2014-08-18 16:25:43.000000000 +0200
+++ new/linuxrc-5.0.19/changelog 2014-09-17 10:19:29.000000000 +0200
@@ -1,4 +1,32 @@
-2014-08-18: HEAD
+2014-09-17: HEAD
+ - Merge pull request #29 from openSUSE/sw_0016
+ - Sw 0016
+ - remove unnecessary check
+ - don't check autoinst.xml digest (bnc #895670)
+ - remove dead code
+
+2014-09-15: 5.0.18
+ - Merge pull request #28 from openSUSE/sw_0015
+ - moved edd.ko loading into udev start script (bnc #871617)
+ - moved edd.ko loading into udev start script (bnc #871617)
+ - We need to load more modules before starting udevd. Doing this in udev_setup
+ - now. See related change in installation-images.
+
+2014-09-12: 5.0.17
+ - Merge pull request #27 from openSUSE/sw_0014
+ - finalize ifcfg option parsing
+ - finalize ifcfg option parsing
+
+2014-09-11: 5.0.16
+ - fix missing parameter to dia_input2()
+ - Merge pull request #26 from openSUSE/sw_0013
+ - look for autoinst.xml and keep the name (don't use autoyast.xml internal...
+ - look for autoinst.xml and keep the name (don't use autoyast.xml internally; fate #316530)
+ - Merge pull request #25 from jsrain/master
+ - increased memory thrreshold for loading inst-sys to RAM (bnc #893982)
+ - increased memory thrreshold for loading inst-sys to RAM (bnc #893982)
+
+2014-08-18: 5.0.15
- Merge pull request #24 from openSUSE/sw_0012
- Sw 0012
- clarify return code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/install.c new/linuxrc-5.0.19/install.c
--- old/linuxrc-5.0.15/install.c 2014-08-18 16:24:46.000000000 +0200
+++ new/linuxrc-5.0.19/install.c 2014-09-11 11:09:38.000000000 +0200
@@ -297,7 +297,7 @@
switch(di) {
case di_display_x11:
- if(dia_input2("Enter the name of the host running the X11 server.", &config.net.displayip, 40)) return -1;
+ if(dia_input2("Enter the name of the host running the X11 server.", &config.net.displayip, 40, 0)) return -1;
break;
case di_display_vnc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/linuxrc.c new/linuxrc-5.0.19/linuxrc.c
--- old/linuxrc-5.0.15/linuxrc.c 2014-08-18 15:17:24.000000000 +0200
+++ new/linuxrc-5.0.19/linuxrc.c 2014-09-15 13:28:43.000000000 +0200
@@ -791,7 +791,7 @@
// default memory limits
config.memoryXXX.min_free = 12 << 20;
config.memoryXXX.min_yast = 224 << 20;
- config.memoryXXX.load_image = 350 << 20;
+ config.memoryXXX.load_image = 750 << 20;
config.swap_file_size = 1024; /* 1024 MB */
@@ -906,11 +906,6 @@
mount("devpts", "/dev/pts", "devpts", 0, 0);
}
- // we might need edd for udev
- if(util_check_exist("/modules/edd.ko")) {
- system("/sbin/insmod /modules/edd.ko 2>/dev/null");
- }
-
util_set_stderr(config.stderr_name);
time_t t = time(NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/net.c new/linuxrc-5.0.19/net.c
--- old/linuxrc-5.0.15/net.c 2014-08-18 16:24:46.000000000 +0200
+++ new/linuxrc-5.0.19/net.c 2014-09-12 11:49:50.000000000 +0200
@@ -2014,7 +2014,18 @@
// static config must be used only once
if(ifcfg->used && !ifcfg->dhcp) continue;
- ifcfg_write(ifcfg->device, ifcfg, 1);
+ if(ifcfg->device) {
+ ifcfg_write(ifcfg->device, ifcfg, 1);
+ }
+ else {
+ /*
+ * If there's no device specified we just remember the settings.
+ * So e.g. ifcfg=1.2.3.4/12,1.1.1.1 just becomes equivalent to
+ * hostip=1.2.3.4/12 gateway=1.1.1.1.
+ */
+ ifcfg_copy(config.ifcfg.manual, ifcfg);
+ ifcfg->used = 1;
+ }
}
// 2nd, all interfaces with wildcard patterns
@@ -2467,6 +2478,28 @@
}
+/*
+ * Make a (deep) copy of an ifcfg_t struct.
+ */
+void ifcfg_copy(ifcfg_t *dst, ifcfg_t *src)
+{
+ if(!dst || !src) return;
+
+ str_copy(&dst->device, src->device);
+ str_copy(&dst->type, src->type);
+ dst->dhcp = src->dhcp;
+ dst->used = src->used;
+ dst->pattern = src->pattern;
+ dst->ptp = src->ptp;
+ dst->netmask_prefix = src->netmask_prefix;
+ str_copy(&dst->vlan, src->vlan);
+ str_copy(&dst->ip, src->ip);
+ str_copy(&dst->gw, src->gw);
+ str_copy(&dst->ns, src->ns);
+ str_copy(&dst->domain, src->domain);
+}
+
+
ifcfg_t *ifcfg_append(ifcfg_t **p0, ifcfg_t *p)
{
for(; *p0; p0 = &(*p0)->next);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.15/net.h new/linuxrc-5.0.19/net.h
--- old/linuxrc-5.0.15/net.h 2014-08-18 16:24:46.000000000 +0200
+++ new/linuxrc-5.0.19/net.h 2014-09-12 11:49:50.000000000 +0200
@@ -25,6 +25,7 @@
void net_update_ifcfg(void);
ifcfg_t *ifcfg_parse(char *str);
ifcfg_t *ifcfg_append(ifcfg_t **p0, ifcfg_t *p);
+void ifcfg_copy(ifcfg_t *dst, ifcfg_t *src);
char *ifcfg_print(ifcfg_t *ifcfg);
void net_update_state(void);
void net_wicked_up(char *ifname);
--
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 autoyast2 for openSUSE:Factory checked in at 2014-09-18 07:12:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old)
and /work/SRC/openSUSE:Factory/.autoyast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2014-09-05 13:00:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.autoyast2.new/autoyast2.changes 2014-09-18 07:12:32.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Sep 12 11:35:17 UTC 2014 - ancor(a)suse.com
+
+- If keyboard tag is missing in profile, try to infer the layout
+ from the language tag (bnc#891808).
+- Updated dependency from yast2-country (>= 3.1.13) with
+ improved Keyboard.Import
+- 3.1.60
+
+-------------------------------------------------------------------
+Wed Sep 10 12:37:32 CEST 2014 - schubi(a)suse.de
+
+- Trying to mount CD only if the device has been defined.
+ (bnc#895670)
+- 3.1.59
+
+-------------------------------------------------------------------
Old:
----
autoyast2-3.1.58.tar.bz2
New:
----
autoyast2-3.1.60.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ autoyast2.spec ++++++
--- /var/tmp/diff_new_pack.3i7v9i/_old 2014-09-18 07:12:33.000000000 +0200
+++ /var/tmp/diff_new_pack.3i7v9i/_new 2014-09-18 07:12:33.000000000 +0200
@@ -17,7 +17,7 @@
Name: autoyast2
-Version: 3.1.58
+Version: 3.1.60
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -43,7 +43,7 @@
Requires: yast2
Requires: yast2 >= 2.16.36
Requires: yast2-core
-Requires: yast2-country
+Requires: yast2-country >= 3.1.13
Requires: yast2-schema
Requires: yast2-storage >= 3.1.27
Requires: yast2-transfer >= 2.21.0
++++++ autoyast2-3.1.58.tar.bz2 -> autoyast2-3.1.60.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.58/package/autoyast2.changes new/autoyast2-3.1.60/package/autoyast2.changes
--- old/autoyast2-3.1.58/package/autoyast2.changes 2014-09-03 18:10:08.000000000 +0200
+++ new/autoyast2-3.1.60/package/autoyast2.changes 2014-09-15 17:09:12.000000000 +0200
@@ -1,4 +1,20 @@
-------------------------------------------------------------------
+Fri Sep 12 11:35:17 UTC 2014 - ancor(a)suse.com
+
+- If keyboard tag is missing in profile, try to infer the layout
+ from the language tag (bnc#891808).
+- Updated dependency from yast2-country (>= 3.1.13) with
+ improved Keyboard.Import
+- 3.1.60
+
+-------------------------------------------------------------------
+Wed Sep 10 12:37:32 CEST 2014 - schubi(a)suse.de
+
+- Trying to mount CD only if the device has been defined.
+ (bnc#895670)
+- 3.1.59
+
+-------------------------------------------------------------------
Tue Sep 2 12:08:53 CEST 2014 - fehr(a)suse.de
- Fix failure to import report settings from profile introduced with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.58/package/autoyast2.spec new/autoyast2-3.1.60/package/autoyast2.spec
--- old/autoyast2-3.1.58/package/autoyast2.spec 2014-09-03 18:10:08.000000000 +0200
+++ new/autoyast2-3.1.60/package/autoyast2.spec 2014-09-15 17:09:12.000000000 +0200
@@ -17,7 +17,7 @@
Name: autoyast2
-Version: 3.1.58
+Version: 3.1.60
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -43,7 +43,7 @@
Requires: yast2
Requires: yast2 >= 2.16.36
Requires: yast2-core
-Requires: yast2-country
+Requires: yast2-country >= 3.1.13
Requires: yast2-schema
Requires: yast2-storage >= 3.1.27
Requires: yast2-transfer >= 2.21.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.58/src/clients/inst_autosetup.rb new/autoyast2-3.1.60/src/clients/inst_autosetup.rb
--- old/autoyast2-3.1.58/src/clients/inst_autosetup.rb 2014-09-03 18:10:08.000000000 +0200
+++ new/autoyast2-3.1.60/src/clients/inst_autosetup.rb 2014-09-15 17:09:12.000000000 +0200
@@ -198,8 +198,11 @@
if Builtins.haskey(Profile.current, "timezone")
Timezone.Import(Ops.get_map(Profile.current, "timezone", {}))
end
- if Builtins.haskey(Profile.current, "keyboard")
- Keyboard.Import(Ops.get_map(Profile.current, "keyboard", {}))
+ # bnc#891808: infer keyboard from language if needed
+ if Profile.current.has_key?("keyboard")
+ Keyboard.Import(Profile.current["keyboard"] || {}, :keyboard)
+ elsif Profile.current.has_key?("language")
+ Keyboard.Import(Profile.current["language"] || {}, :language)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.58/src/clients/inst_autosetup_upgrade.rb new/autoyast2-3.1.60/src/clients/inst_autosetup_upgrade.rb
--- old/autoyast2-3.1.58/src/clients/inst_autosetup_upgrade.rb 2014-09-03 18:10:08.000000000 +0200
+++ new/autoyast2-3.1.60/src/clients/inst_autosetup_upgrade.rb 2014-09-15 17:09:12.000000000 +0200
@@ -164,8 +164,11 @@
if Builtins.haskey(Profile.current, "timezone")
Timezone.Import(Ops.get_map(Profile.current, "timezone", {}))
end
- if Builtins.haskey(Profile.current, "keyboard")
- Keyboard.Import(Ops.get_map(Profile.current, "keyboard", {}))
+ # bnc#891808: infer keyboard from language if needed
+ if Profile.current.has_key?("keyboard")
+ Keyboard.Import(Profile.current["keyboard"] || {}, :keyboard)
+ elsif Profile.current.has_key?("language")
+ Keyboard.Import(Profile.current["language"] || {}, :language)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-3.1.58/src/include/autoinstall/io.rb new/autoyast2-3.1.60/src/include/autoinstall/io.rb
--- old/autoyast2-3.1.58/src/include/autoinstall/io.rb 2014-09-03 18:10:08.000000000 +0200
+++ new/autoyast2-3.1.60/src/include/autoinstall/io.rb 2014-09-15 17:09:12.000000000 +0200
@@ -177,8 +177,8 @@
"Trying to find file on installation media: %1",
Installation.boot
)
- if Installation.boot == "cd"
- cdrom = Convert.to_string(SCR.Read(path(".etc.install_inf.Cdrom")))
+ cdrom = Convert.to_string(SCR.Read(path(".etc.install_inf.Cdrom")))
+ if Installation.boot == "cd" && cdrom
cdrom_device = Ops.add("/dev/", cdrom)
already_mounted = Ops.add(
Ops.add("grep ", cdrom_device),
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0