Rebased to latest upstream sources
This commit is contained in:
parent
beb8bbb8e0
commit
779e837f54
1
.gitignore
vendored
1
.gitignore
vendored
@ -42,3 +42,4 @@
|
|||||||
/pcs-0.9.156.tar.gz
|
/pcs-0.9.156.tar.gz
|
||||||
/sinatra-1.4.8.gem
|
/sinatra-1.4.8.gem
|
||||||
/tilt-2.0.6.gem
|
/tilt-2.0.6.gem
|
||||||
|
/pcs-0.9.159.tar.gz
|
||||||
|
@ -1,138 +0,0 @@
|
|||||||
From c5f8001c6f8aad82a6c54311d39111cfa64cd2b9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
|
||||||
Date: Mon, 20 Mar 2017 17:11:32 +0100
|
|
||||||
Subject: [PATCH 1/3] cli: skip superfluous text -> bytes conversion on
|
|
||||||
clufter's output
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Respective outputs are already represented with bytes (as 'bytestring'
|
|
||||||
protocol suggests), and moreover, such bytes cannot be "encoded" in
|
|
||||||
Python 3 otherwise leading to AttributeError (bytes object has no
|
|
||||||
attribute encode) exception.
|
|
||||||
|
|
||||||
Note that this is only relevant in Python 3 context, which pcs uses
|
|
||||||
by default in python3-charged distros (e.g. Fedora) and which is now
|
|
||||||
supported in clufter (which enabled a discovery of this discrepancy):
|
|
||||||
http://oss.clusterlabs.org/pipermail/users/2017-March/005323.html
|
|
||||||
|
|
||||||
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
||||||
---
|
|
||||||
pcs/config.py | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcs/config.py b/pcs/config.py
|
|
||||||
index d7c30a21..8b5bb166 100644
|
|
||||||
--- a/pcs/config.py
|
|
||||||
+++ b/pcs/config.py
|
|
||||||
@@ -698,14 +698,14 @@ def config_import_cman(argv):
|
|
||||||
config_backup_add_version_to_tarball(tarball)
|
|
||||||
utils.tar_add_file_data(
|
|
||||||
tarball,
|
|
||||||
- clufter_args_obj.cib["passout"].encode("utf-8"),
|
|
||||||
+ clufter_args_obj.cib["passout"],
|
|
||||||
"cib.xml",
|
|
||||||
**file_list["cib.xml"]["attrs"]
|
|
||||||
)
|
|
||||||
if output_format == "cluster.conf":
|
|
||||||
utils.tar_add_file_data(
|
|
||||||
tarball,
|
|
||||||
- clufter_args_obj.ccs_pcmk["passout"].encode("utf-8"),
|
|
||||||
+ clufter_args_obj.ccs_pcmk["passout"],
|
|
||||||
"cluster.conf",
|
|
||||||
**file_list["cluster.conf"]["attrs"]
|
|
||||||
)
|
|
||||||
@@ -726,7 +726,7 @@ def config_import_cman(argv):
|
|
||||||
)("bytestring")
|
|
||||||
utils.tar_add_file_data(
|
|
||||||
tarball,
|
|
||||||
- corosync_conf_data.encode("utf-8"),
|
|
||||||
+ corosync_conf_data,
|
|
||||||
"corosync.conf",
|
|
||||||
**file_list["corosync.conf"]["attrs"]
|
|
||||||
)
|
|
||||||
@@ -744,7 +744,7 @@ def config_import_cman(argv):
|
|
||||||
)("bytestring")
|
|
||||||
utils.tar_add_file_data(
|
|
||||||
tarball,
|
|
||||||
- uidgid_data.encode("utf-8"),
|
|
||||||
+ uidgid_data,
|
|
||||||
"uidgid.d/" + filename,
|
|
||||||
**file_list["uidgid.d"]["attrs"]
|
|
||||||
)
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
||||||
|
|
||||||
From 647fc814f482f14c70fb569fd4fd3b494e57d7c9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Wed, 22 Mar 2017 18:41:33 +0100
|
|
||||||
Subject: [PATCH 2/3] fix writing clufter output to file with Python 3
|
|
||||||
|
|
||||||
---
|
|
||||||
pcs/config.py | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcs/config.py b/pcs/config.py
|
|
||||||
index 8b5bb166..b42c5983 100644
|
|
||||||
--- a/pcs/config.py
|
|
||||||
+++ b/pcs/config.py
|
|
||||||
@@ -676,7 +676,7 @@ def config_import_cman(argv):
|
|
||||||
if output_format in ("pcs-commands", "pcs-commands-verbose"):
|
|
||||||
ok, message = utils.write_file(
|
|
||||||
dry_run_output,
|
|
||||||
- clufter_args_obj.output["passout"]
|
|
||||||
+ clufter_args_obj.output["passout"].decode()
|
|
||||||
)
|
|
||||||
if not ok:
|
|
||||||
utils.err(message)
|
|
||||||
@@ -845,7 +845,7 @@ def config_export_pcs_commands(argv, verbose=False):
|
|
||||||
if output_file:
|
|
||||||
ok, message = utils.write_file(
|
|
||||||
output_file,
|
|
||||||
- clufter_args_obj.output["passout"]
|
|
||||||
+ clufter_args_obj.output["passout"].decode()
|
|
||||||
)
|
|
||||||
if not ok:
|
|
||||||
utils.err(message)
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
||||||
|
|
||||||
From c5d73581c8bacfe992f863b49e5902fc33198503 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Wed, 22 Mar 2017 18:03:09 +0100
|
|
||||||
Subject: [PATCH 3/3] do not colorize clufter output if saved to a file
|
|
||||||
|
|
||||||
Clufter improved detecting if the color mode should be enabled so we can
|
|
||||||
left the decision to clufter completely.
|
|
||||||
---
|
|
||||||
pcs/config.py | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcs/config.py b/pcs/config.py
|
|
||||||
index b42c5983..04ef02f1 100644
|
|
||||||
--- a/pcs/config.py
|
|
||||||
+++ b/pcs/config.py
|
|
||||||
@@ -627,8 +627,6 @@ def config_import_cman(argv):
|
|
||||||
"batch": True,
|
|
||||||
"sys": "linux",
|
|
||||||
"dist": dist,
|
|
||||||
- # Make it work on RHEL6 as well for sure
|
|
||||||
- "color": "always" if sys.stdout.isatty() else "never"
|
|
||||||
}
|
|
||||||
if interactive:
|
|
||||||
if "EDITOR" not in os.environ:
|
|
||||||
@@ -802,8 +800,6 @@ def config_export_pcs_commands(argv, verbose=False):
|
|
||||||
"batch": True,
|
|
||||||
"sys": "linux",
|
|
||||||
"dist": dist,
|
|
||||||
- # Make it work on RHEL6 as well for sure
|
|
||||||
- "color": "always" if sys.stdout.isatty() else "never",
|
|
||||||
"coro": settings.corosync_conf_file,
|
|
||||||
"ccs": settings.cluster_conf_file,
|
|
||||||
"start_wait": "60",
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
From 3b23bdc378b6b5a7a5d254e3b4a35bcc10b7e81a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ondrej Mular <omular@redhat.com>
|
|
||||||
Date: Sat, 4 Mar 2017 14:01:43 +0100
|
|
||||||
Subject: [PATCH] web UI: fixed XSS vulnerability CVE-2017-2661
|
|
||||||
|
|
||||||
---
|
|
||||||
pcsd/public/js/nodes-ember.js | 4 ++--
|
|
||||||
pcsd/public/js/pcsd.js | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcsd/public/js/nodes-ember.js b/pcsd/public/js/nodes-ember.js
|
|
||||||
index cb2f4d16..41fede89 100644
|
|
||||||
--- a/pcsd/public/js/nodes-ember.js
|
|
||||||
+++ b/pcsd/public/js/nodes-ember.js
|
|
||||||
@@ -75,7 +75,7 @@ Pcs = Ember.Application.createWithMixins({
|
|
||||||
var banned_options = ["SBD_OPTS", "SBD_WATCHDOG_DEV", "SBD_PACEMAKER"];
|
|
||||||
$.each(this.get("sbd_config"), function(opt, val) {
|
|
||||||
if (banned_options.indexOf(opt) == -1) {
|
|
||||||
- out += '<tr><td>' + opt + '</td><td>' + val + '</td></tr>\n';
|
|
||||||
+ out += '<tr><td>' + htmlEncode(opt) + '</td><td>' + htmlEncode(val) + '</td></tr>\n';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return out + '</table>';
|
|
||||||
@@ -879,7 +879,7 @@ Pcs.ResourceObj = Ember.Object.extend({
|
|
||||||
}.property("status_val"),
|
|
||||||
show_status: function() {
|
|
||||||
return '<span style="' + this.get('status_style') + '">'
|
|
||||||
- + this.get('status') + (this.get("is_unmanaged") ? " (unmanaged)" : "")
|
|
||||||
+ + htmlEncode(this.get('status')) + (this.get("is_unmanaged") ? " (unmanaged)" : "")
|
|
||||||
+ '</span>';
|
|
||||||
}.property("status_style", "disabled"),
|
|
||||||
status_class: function() {
|
|
||||||
diff --git a/pcsd/public/js/pcsd.js b/pcsd/public/js/pcsd.js
|
|
||||||
index c96f9baa..6f57de0f 100644
|
|
||||||
--- a/pcsd/public/js/pcsd.js
|
|
||||||
+++ b/pcsd/public/js/pcsd.js
|
|
||||||
@@ -821,7 +821,7 @@ function auth_nodes_dialog(unauth_nodes, callback_success, callback_success_one)
|
|
||||||
|
|
||||||
dialog_obj.find('#auth_nodes_list').empty();
|
|
||||||
unauth_nodes.forEach(function(node) {
|
|
||||||
- dialog_obj.find('#auth_nodes_list').append("\t\t\t<tr><td>" + node + '</td><td><input type="password" name="' + node + '-pass"></td></tr>\n');
|
|
||||||
+ dialog_obj.find('#auth_nodes_list').append("\t\t\t<tr><td>" + htmlEncode(node) + '</td><td><input type="password" name="' + htmlEncode(node) + '-pass"></td></tr>\n');
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
47
fedfix.patch
47
fedfix.patch
@ -1,18 +1,18 @@
|
|||||||
From 76751bb5483683ef7c928878fe3307e13b3e4ee3 Mon Sep 17 00:00:00 2001
|
From 0e0a738cbe1a361e548a31a5a9aaf9b4acfec7cb Mon Sep 17 00:00:00 2001
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
From: Ondrej Mular <omular@redhat.com>
|
||||||
Date: Thu, 22 Sep 2016 12:55:20 +0200
|
Date: Sat, 1 Jul 2017 20:21:26 +0200
|
||||||
Subject: [PATCH] fedfix
|
Subject: [PATCH] fedfix
|
||||||
|
|
||||||
---
|
---
|
||||||
pcs/pcs | 2 +-
|
pcs/pcs | 2 +-
|
||||||
pcs/test/suite.py | 2 +-
|
pcs/test/suite.py | 2 +-
|
||||||
pcsd/Makefile | 25 +++----------------------
|
pcsd/Makefile | 30 +++---------------------------
|
||||||
pcsd/pcsd.rb | 1 +
|
pcsd/pcsd.rb | 1 +
|
||||||
pcsd/pcsd.service-runner | 3 ++-
|
pcsd/pcsd.service-runner | 3 ++-
|
||||||
5 files changed, 8 insertions(+), 25 deletions(-)
|
5 files changed, 8 insertions(+), 30 deletions(-)
|
||||||
|
|
||||||
diff --git a/pcs/pcs b/pcs/pcs
|
diff --git a/pcs/pcs b/pcs/pcs
|
||||||
index 4585fd57..d35933e4 100755
|
index 4585fd5..d35933e 100755
|
||||||
--- a/pcs/pcs
|
--- a/pcs/pcs
|
||||||
+++ b/pcs/pcs
|
+++ b/pcs/pcs
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -22,7 +22,7 @@ index 4585fd57..d35933e4 100755
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
import os.path
|
import os.path
|
||||||
diff --git a/pcs/test/suite.py b/pcs/test/suite.py
|
diff --git a/pcs/test/suite.py b/pcs/test/suite.py
|
||||||
index 064b47e0..cf660d9e 100755
|
index fcac586..ec4b864 100755
|
||||||
--- a/pcs/test/suite.py
|
--- a/pcs/test/suite.py
|
||||||
+++ b/pcs/test/suite.py
|
+++ b/pcs/test/suite.py
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
@ -32,17 +32,23 @@ index 064b47e0..cf660d9e 100755
|
|||||||
absolute_import,
|
absolute_import,
|
||||||
division,
|
division,
|
||||||
diff --git a/pcsd/Makefile b/pcsd/Makefile
|
diff --git a/pcsd/Makefile b/pcsd/Makefile
|
||||||
index 4b197669..ad21cb3d 100644
|
index 2ecd4de..24ce1fe 100644
|
||||||
--- a/pcsd/Makefile
|
--- a/pcsd/Makefile
|
||||||
+++ b/pcsd/Makefile
|
+++ b/pcsd/Makefile
|
||||||
@@ -1,30 +1,11 @@
|
@@ -1,33 +1,9 @@
|
||||||
|
-FFI_VERSION="1.9.17"
|
||||||
|
-FFI_C_DIR=vendor/bundle/ruby/gems/ffi-${FFI_VERSION}/ext/ffi_c
|
||||||
|
-
|
||||||
-build_gems: get_gems
|
-build_gems: get_gems
|
||||||
- bundle install --local --deployment
|
- bundle install --local --deployment
|
||||||
-#ffi makes symlink with absolute path. Let's change it to relative path.
|
- #ffi makes symlink with absolute path. Let's change it to relative path.
|
||||||
- rm vendor/bundle/ruby/gems/ffi-1.9.17/ext/ffi_c/libffi-x86_64-linux/include/ffitarget.h
|
- for fname in `ls ${FFI_C_DIR}/libffi-*/include/ffitarget.h`; do \
|
||||||
- ln -s \
|
- if [[ -L "$$fname" ]]; then \
|
||||||
- ../../libffi/src/x86/ffitarget.h \
|
- target=$$(readlink $$fname | sed "s~.*/${FFI_C_DIR}\(/libffi/src/[^/]\+/ffitarget.h\)~../..\1~"); \
|
||||||
- vendor/bundle/ruby/gems/ffi-1.9.17/ext/ffi_c/libffi-x86_64-linux/include/ffitarget.h
|
- rm $$fname; \
|
||||||
|
- ln -s $$target $$fname; \
|
||||||
|
- fi; \
|
||||||
|
- done;
|
||||||
-
|
-
|
||||||
-# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7
|
-# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7
|
||||||
-# also bundler is not available on RHEL6 in rpm
|
-# also bundler is not available on RHEL6 in rpm
|
||||||
@ -52,7 +58,7 @@ index 4b197669..ad21cb3d 100644
|
|||||||
- gem install --verbose --no-rdoc --no-ri -l -i vendor/bundle/ruby \
|
- gem install --verbose --no-rdoc --no-ri -l -i vendor/bundle/ruby \
|
||||||
- vendor/cache/backports-3.6.8.gem \
|
- vendor/cache/backports-3.6.8.gem \
|
||||||
- vendor/cache/ethon-0.9.1.gem \
|
- vendor/cache/ethon-0.9.1.gem \
|
||||||
- vendor/cache/ffi-1.9.14.gem \
|
- vendor/cache/ffi-${FFI_VERSION}.gem \
|
||||||
- vendor/cache/json-2.0.3.gem \
|
- vendor/cache/json-2.0.3.gem \
|
||||||
- vendor/cache/multi_json-1.12.1.gem \
|
- vendor/cache/multi_json-1.12.1.gem \
|
||||||
- vendor/cache/open4-1.3.4.gem \
|
- vendor/cache/open4-1.3.4.gem \
|
||||||
@ -65,12 +71,9 @@ index 4b197669..ad21cb3d 100644
|
|||||||
+ vendor/cache/rpam-ruby19-1.2.1.gem \
|
+ vendor/cache/rpam-ruby19-1.2.1.gem \
|
||||||
vendor/cache/sinatra-1.4.8.gem \
|
vendor/cache/sinatra-1.4.8.gem \
|
||||||
vendor/cache/sinatra-contrib-1.4.7.gem \
|
vendor/cache/sinatra-contrib-1.4.7.gem \
|
||||||
- vendor/cache/tilt-2.0.6.gem \
|
vendor/cache/tilt-2.0.6.gem \
|
||||||
-- '--with-ldflags="-Wl,-z,now -Wl,-z,relro"'
|
|
||||||
|
|
||||||
get_gems:
|
|
||||||
diff --git a/pcsd/pcsd.rb b/pcsd/pcsd.rb
|
diff --git a/pcsd/pcsd.rb b/pcsd/pcsd.rb
|
||||||
index f45011e0..a07fc3c3 100644
|
index 1026a36..ac1b3b9 100644
|
||||||
--- a/pcsd/pcsd.rb
|
--- a/pcsd/pcsd.rb
|
||||||
+++ b/pcsd/pcsd.rb
|
+++ b/pcsd/pcsd.rb
|
||||||
@@ -1,3 +1,4 @@
|
@@ -1,3 +1,4 @@
|
||||||
@ -79,7 +82,7 @@ index f45011e0..a07fc3c3 100644
|
|||||||
require 'sinatra/reloader' if development?
|
require 'sinatra/reloader' if development?
|
||||||
require 'sinatra/cookies'
|
require 'sinatra/cookies'
|
||||||
diff --git a/pcsd/pcsd.service-runner b/pcsd/pcsd.service-runner
|
diff --git a/pcsd/pcsd.service-runner b/pcsd/pcsd.service-runner
|
||||||
index 883d2908..712913ea 100644
|
index 883d290..712913e 100644
|
||||||
--- a/pcsd/pcsd.service-runner
|
--- a/pcsd/pcsd.service-runner
|
||||||
+++ b/pcsd/pcsd.service-runner
|
+++ b/pcsd/pcsd.service-runner
|
||||||
@@ -3,8 +3,9 @@
|
@@ -3,8 +3,9 @@
|
||||||
@ -94,5 +97,5 @@ index 883d2908..712913ea 100644
|
|||||||
|
|
||||||
# change current directory (ruby -C)
|
# change current directory (ruby -C)
|
||||||
--
|
--
|
||||||
2.11.0
|
2.9.4
|
||||||
|
|
||||||
|
@ -1,107 +0,0 @@
|
|||||||
From 44d20a50848a4a915f85087f8521413dad7df159 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Tue, 21 Feb 2017 16:37:57 +0100
|
|
||||||
Subject: [PATCH] fix libcurl issues in python3
|
|
||||||
|
|
||||||
---
|
|
||||||
pcs/lib/external.py | 21 ++++++++++-----------
|
|
||||||
pcs/test/test_lib_external.py | 5 ++---
|
|
||||||
pcs/utils.py | 19 +++++++++----------
|
|
||||||
3 files changed, 21 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcs/lib/external.py b/pcs/lib/external.py
|
|
||||||
index 0b2b5edc..5e3133dd 100644
|
|
||||||
--- a/pcs/lib/external.py
|
|
||||||
+++ b/pcs/lib/external.py
|
|
||||||
@@ -572,18 +572,17 @@ class NodeCommunicator(object):
|
|
||||||
"""
|
|
||||||
def __debug_callback(data_type, debug_data):
|
|
||||||
prefixes = {
|
|
||||||
- pycurl.DEBUG_TEXT: "* ",
|
|
||||||
- pycurl.DEBUG_HEADER_IN: "< ",
|
|
||||||
- pycurl.DEBUG_HEADER_OUT: "> ",
|
|
||||||
- pycurl.DEBUG_DATA_IN: "<< ",
|
|
||||||
- pycurl.DEBUG_DATA_OUT: ">> ",
|
|
||||||
+ pycurl.DEBUG_TEXT: b"* ",
|
|
||||||
+ pycurl.DEBUG_HEADER_IN: b"< ",
|
|
||||||
+ pycurl.DEBUG_HEADER_OUT: b"> ",
|
|
||||||
+ pycurl.DEBUG_DATA_IN: b"<< ",
|
|
||||||
+ pycurl.DEBUG_DATA_OUT: b">> ",
|
|
||||||
}
|
|
||||||
if data_type in prefixes:
|
|
||||||
- debug_output.write("{prefix}{data}{suffix}".format(
|
|
||||||
- prefix=prefixes[data_type],
|
|
||||||
- data=debug_data,
|
|
||||||
- suffix="" if debug_data.endswith("\n") else "\n"
|
|
||||||
- ).encode("utf-8"))
|
|
||||||
+ debug_output.write(prefixes[data_type])
|
|
||||||
+ debug_output.write(debug_data)
|
|
||||||
+ if not debug_data.endswith(b"\n"):
|
|
||||||
+ debug_output.write(b"\n")
|
|
||||||
|
|
||||||
output = io.BytesIO()
|
|
||||||
debug_output = io.BytesIO()
|
|
||||||
@@ -681,7 +680,7 @@ class NodeCommunicator(object):
|
|
||||||
else:
|
|
||||||
raise NodeConnectionException(host, request, reason)
|
|
||||||
finally:
|
|
||||||
- debug_data = debug_output.getvalue().decode("utf-8")
|
|
||||||
+ debug_data = debug_output.getvalue().decode("utf-8", "ignore")
|
|
||||||
self._logger.debug(
|
|
||||||
(
|
|
||||||
"Communication debug info for calling: {url}\n"
|
|
||||||
diff --git a/pcs/test/test_lib_external.py b/pcs/test/test_lib_external.py
|
|
||||||
index e8b0dc34..3868b0f2 100644
|
|
||||||
--- a/pcs/test/test_lib_external.py
|
|
||||||
+++ b/pcs/test/test_lib_external.py
|
|
||||||
@@ -506,8 +506,8 @@ class NodeCommunicatorTest(TestCase):
|
|
||||||
},
|
|
||||||
expected_response_data.encode("utf-8"),
|
|
||||||
[
|
|
||||||
- (pycurl.DEBUG_TEXT, "text"),
|
|
||||||
- (pycurl.DEBUG_DATA_OUT, "data out")
|
|
||||||
+ (pycurl.DEBUG_TEXT, b"text"),
|
|
||||||
+ (pycurl.DEBUG_DATA_OUT, b"data out")
|
|
||||||
]
|
|
||||||
)
|
|
||||||
mock_pycurl_init.return_value = mock_pycurl_obj
|
|
||||||
@@ -1952,4 +1952,3 @@ class IsProxySetTest(TestCase):
|
|
||||||
"no_proxy": "*",
|
|
||||||
"all_proxy": "test.proxy",
|
|
||||||
}))
|
|
||||||
-
|
|
||||||
diff --git a/pcs/utils.py b/pcs/utils.py
|
|
||||||
index 8190fa82..858cb3c1 100644
|
|
||||||
--- a/pcs/utils.py
|
|
||||||
+++ b/pcs/utils.py
|
|
||||||
@@ -346,18 +346,17 @@ def sendHTTPRequest(
|
|
||||||
|
|
||||||
def __debug_callback(data_type, debug_data):
|
|
||||||
prefixes = {
|
|
||||||
- pycurl.DEBUG_TEXT: "* ",
|
|
||||||
- pycurl.DEBUG_HEADER_IN: "< ",
|
|
||||||
- pycurl.DEBUG_HEADER_OUT: "> ",
|
|
||||||
- pycurl.DEBUG_DATA_IN: "<< ",
|
|
||||||
- pycurl.DEBUG_DATA_OUT: ">> ",
|
|
||||||
+ pycurl.DEBUG_TEXT: b"* ",
|
|
||||||
+ pycurl.DEBUG_HEADER_IN: b"< ",
|
|
||||||
+ pycurl.DEBUG_HEADER_OUT: b"> ",
|
|
||||||
+ pycurl.DEBUG_DATA_IN: b"<< ",
|
|
||||||
+ pycurl.DEBUG_DATA_OUT: b">> ",
|
|
||||||
}
|
|
||||||
if data_type in prefixes:
|
|
||||||
- debug_output.write("{prefix}{data}{suffix}".format(
|
|
||||||
- prefix=prefixes[data_type],
|
|
||||||
- data=debug_data,
|
|
||||||
- suffix="" if debug_data.endswith("\n") else "\n"
|
|
||||||
- ).encode("utf-8"))
|
|
||||||
+ debug_output.write(prefixes[data_type])
|
|
||||||
+ debug_output.write(debug_data)
|
|
||||||
+ if not debug_data.endswith(b"\n"):
|
|
||||||
+ debug_output.write(b"\n")
|
|
||||||
|
|
||||||
output = BytesIO()
|
|
||||||
debug_output = BytesIO()
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 4d19c6b7ad538032b9718635baa311394fd9b3b8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Wed, 22 Feb 2017 13:17:22 +0100
|
|
||||||
Subject: [PATCH] fix linking fonts to pcsd
|
|
||||||
|
|
||||||
fc-list can return more than one font therefore the resulting symlink is
|
|
||||||
pointing to a wrong path. fc-match returns one best match.
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 443290ef..003c78c7 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -160,7 +160,7 @@ endif
|
|
||||||
$(foreach font,$(pcsd_fonts),\
|
|
||||||
$(eval font_file = $(word 1,$(subst ;, ,$(font)))) \
|
|
||||||
$(eval font_def = $(word 2,$(subst ;, ,$(font)))) \
|
|
||||||
- $(eval font_path = $(shell fc-list '--format=%{file}' '$(font_def)')) \
|
|
||||||
+ $(eval font_path = $(shell fc-match '--format=%{file}' '$(font_def)')) \
|
|
||||||
$(if $(font_path),ln -s -f $(font_path) ${DESTDIR}${PCSD_PARENT_DIR}/pcsd/public/css/$(font_file);,$(error Font $(font_def) not found)) \
|
|
||||||
)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
27
fix-setuptools.patch
Normal file
27
fix-setuptools.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 83b9ac91fbd68f0361280460e9e1928f45b71d12 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ondrej Mular <omular@redhat.com>
|
||||||
|
Date: Wed, 12 Jul 2017 13:40:12 +0200
|
||||||
|
Subject: [PATCH] fix for new setuptools
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 0e4dff4..10934ec 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -100,7 +100,9 @@ pcsd_fonts = \
|
||||||
|
|
||||||
|
install:
|
||||||
|
# make Python interpreter execution sane (via -Es flags)
|
||||||
|
- echo -e "[build]\nexecutable = $(PYTHON) -Es\n" > setup.cfg
|
||||||
|
+ # in fedora 26 setuptools uses parameter executable from install section
|
||||||
|
+ # instead of setup
|
||||||
|
+ echo -e "[install]\nexecutable = $(PYTHON) -Es\n" > setup.cfg
|
||||||
|
$(PYTHON) setup.py install --root=$(or ${DESTDIR}, /) ${EXTRA_SETUP_OPTS}
|
||||||
|
# fix excessive script interpreting "executable" quoting with old setuptools:
|
||||||
|
# https://github.com/pypa/setuptools/issues/188
|
||||||
|
--
|
||||||
|
2.9.4
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From 04bb882073f15148c4bd466fd7b1157fac7a5755 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Fri, 19 May 2017 15:28:21 +0200
|
|
||||||
Subject: [PATCH] fix tests
|
|
||||||
|
|
||||||
---
|
|
||||||
pcsd/test/test_config.rb | 17 ++++++-----------
|
|
||||||
1 file changed, 6 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pcsd/test/test_config.rb b/pcsd/test/test_config.rb
|
|
||||||
index 755e35c2..bf75d2b9 100644
|
|
||||||
--- a/pcsd/test/test_config.rb
|
|
||||||
+++ b/pcsd/test/test_config.rb
|
|
||||||
@@ -122,17 +122,12 @@ class TestConfig < Test::Unit::TestCase
|
|
||||||
]
|
|
||||||
}'
|
|
||||||
cfg = PCSConfig.new(text)
|
|
||||||
- if JSON::VERSION_MAJOR >= 2
|
|
||||||
- parser_error = "Unable to parse pcs_settings file: 409: unexpected token at '\"rh71-node2\"\n ]\n }\n ]\n}'"
|
|
||||||
- else
|
|
||||||
- parser_error = "Unable to parse pcs_settings file: 399: unexpected token at '\"rh71-node2\"\n ]\n }\n ]\n}'"
|
|
||||||
- end
|
|
||||||
- assert_equal(
|
|
||||||
- [[
|
|
||||||
- 'error',
|
|
||||||
- parser_error
|
|
||||||
- ]],
|
|
||||||
- $logger.log
|
|
||||||
+ assert_equal(1, $logger.log.length)
|
|
||||||
+ assert_equal('error', $logger.log[0][0])
|
|
||||||
+ assert_match(
|
|
||||||
+ # the number is based on JSON gem version
|
|
||||||
+ /Unable to parse pcs_settings file: \d+: unexpected token/,
|
|
||||||
+ $logger.log[0][1]
|
|
||||||
)
|
|
||||||
assert_equal(fixture_empty_config, cfg.text)
|
|
||||||
end
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 054d0ae696beb6e6436da43313ef43da4a45b9cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Tue, 21 Feb 2017 14:45:59 +0100
|
|
||||||
Subject: [PATCH] fix test
|
|
||||||
|
|
||||||
---
|
|
||||||
pcsd/test/test_config.rb | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pcsd/test/test_config.rb b/pcsd/test/test_config.rb
|
|
||||||
index 9ae520a4..755e35c2 100644
|
|
||||||
--- a/pcsd/test/test_config.rb
|
|
||||||
+++ b/pcsd/test/test_config.rb
|
|
||||||
@@ -122,7 +122,7 @@ class TestConfig < Test::Unit::TestCase
|
|
||||||
]
|
|
||||||
}'
|
|
||||||
cfg = PCSConfig.new(text)
|
|
||||||
- if Gem.loaded_specs['json'] and Gem.loaded_specs['json'].version >= Gem::Version.create('2.0')
|
|
||||||
+ if JSON::VERSION_MAJOR >= 2
|
|
||||||
parser_error = "Unable to parse pcs_settings file: 409: unexpected token at '\"rh71-node2\"\n ]\n }\n ]\n}'"
|
|
||||||
else
|
|
||||||
parser_error = "Unable to parse pcs_settings file: 399: unexpected token at '\"rh71-node2\"\n ]\n }\n ]\n}'"
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
29
pcs.spec
29
pcs.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pcs
|
Name: pcs
|
||||||
Version: 0.9.156
|
Version: 0.9.159
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/ClusterLabs/pcs
|
URL: https://github.com/ClusterLabs/pcs
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -19,13 +19,7 @@ Source15: https://rubygems.org/downloads/sinatra-contrib-1.4.7.gem
|
|||||||
Source16: https://rubygems.org/downloads/tilt-2.0.6.gem
|
Source16: https://rubygems.org/downloads/tilt-2.0.6.gem
|
||||||
|
|
||||||
Patch0: fedfix.patch
|
Patch0: fedfix.patch
|
||||||
Patch1: fix-test.patch
|
Patch1: fix-setuptools.patch
|
||||||
Patch2: fix-libcurl-issues-in-python3.patch
|
|
||||||
Patch3: fix-linking-fonts-to-pcsd.patch
|
|
||||||
Patch4: bz1434111-01-web-UI-fixed-XSS-vulnerability-CVE-2017-2661.patch
|
|
||||||
Patch5: bz1428350-01-clufter.patch
|
|
||||||
Patch6: fix-test-2.patch
|
|
||||||
Patch7: readd-tilt.patch
|
|
||||||
|
|
||||||
# git for patches
|
# git for patches
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
@ -141,18 +135,6 @@ UpdateTimestamps() {
|
|||||||
UpdateTimestamps -p1 %{PATCH0}
|
UpdateTimestamps -p1 %{PATCH0}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
UpdateTimestamps -p1 %{PATCH1}
|
UpdateTimestamps -p1 %{PATCH1}
|
||||||
%patch2 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH2}
|
|
||||||
%patch3 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH3}
|
|
||||||
%patch4 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH4}
|
|
||||||
%patch5 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH5}
|
|
||||||
%patch6 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH6}
|
|
||||||
%patch7 -p1
|
|
||||||
UpdateTimestamps -p1 %{PATCH7}
|
|
||||||
|
|
||||||
mkdir -p pcsd/.bundle
|
mkdir -p pcsd/.bundle
|
||||||
cp -f %SOURCE1 pcsd/.bundle/config
|
cp -f %SOURCE1 pcsd/.bundle/config
|
||||||
@ -294,14 +276,19 @@ end
|
|||||||
%ghost %config(noreplace) /var/lib/pcsd/pcs_users.conf
|
%ghost %config(noreplace) /var/lib/pcsd/pcs_users.conf
|
||||||
%ghost %config(noreplace) /var/lib/pcsd/tokens
|
%ghost %config(noreplace) /var/lib/pcsd/tokens
|
||||||
%{_mandir}/man8/pcs.*
|
%{_mandir}/man8/pcs.*
|
||||||
|
%{_mandir}/man8/pcsd.*
|
||||||
%exclude /usr/lib/pcsd/*.debian
|
%exclude /usr/lib/pcsd/*.debian
|
||||||
%exclude /usr/lib/pcsd/pcsd.service
|
%exclude /usr/lib/pcsd/pcsd.service
|
||||||
%exclude /usr/lib/pcsd/pcsd.conf
|
%exclude /usr/lib/pcsd/pcsd.conf
|
||||||
|
%exclude /usr/lib/pcsd/pcsd.8
|
||||||
%exclude %{python3_sitelib}/pcs/bash_completion
|
%exclude %{python3_sitelib}/pcs/bash_completion
|
||||||
%exclude %{python3_sitelib}/pcs/pcs.8
|
%exclude %{python3_sitelib}/pcs/pcs.8
|
||||||
%exclude %{python3_sitelib}/pcs/pcs
|
%exclude %{python3_sitelib}/pcs/pcs
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 12 2017 Ondrej Mular <omular@redhat.com> - 0.9.159-1
|
||||||
|
- Rebased to latest upstream sources (see CHANGELOG.md)
|
||||||
|
|
||||||
* Tue May 23 2017 Tomas Jelinek <tojeline@redhat.com> - 0.9.156-3
|
* Tue May 23 2017 Tomas Jelinek <tojeline@redhat.com> - 0.9.156-3
|
||||||
- Fixed python locales issue preventing build-time tests to pass
|
- Fixed python locales issue preventing build-time tests to pass
|
||||||
- Bundle rubygem-tilt which is being retired from Fedora
|
- Bundle rubygem-tilt which is being retired from Fedora
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
From 92664dedc2d4cd6944b6a6967d5b79057e1f34c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Jelinek <tojeline@redhat.com>
|
|
||||||
Date: Fri, 19 May 2017 16:06:39 +0200
|
|
||||||
Subject: [PATCH 2/2] readd tilt rubygem which is now orphaned in fedora
|
|
||||||
|
|
||||||
---
|
|
||||||
pcsd/Makefile | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/pcsd/Makefile b/pcsd/Makefile
|
|
||||||
index ad21cb3d..24ce1fe8 100644
|
|
||||||
--- a/pcsd/Makefile
|
|
||||||
+++ b/pcsd/Makefile
|
|
||||||
@@ -6,6 +6,7 @@ build_gems:
|
|
||||||
vendor/cache/rpam-ruby19-1.2.1.gem \
|
|
||||||
vendor/cache/sinatra-1.4.8.gem \
|
|
||||||
vendor/cache/sinatra-contrib-1.4.7.gem \
|
|
||||||
+ vendor/cache/tilt-2.0.6.gem \
|
|
||||||
-- '--with-ldflags="-Wl,-z,now -Wl,-z,relro"'
|
|
||||||
|
|
||||||
get_gems:
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
2
sources
2
sources
@ -1,4 +1,4 @@
|
|||||||
SHA512 (pcs-0.9.156.tar.gz) = 8f2097a17db9028010b0edaa7a21976d4e55ec6b5791ad549320755348aabe414e339ce5e089885ed45e2849eb040fceae1ece416cc68dffeab9c2edc31d1e99
|
SHA512 (pcs-0.9.159.tar.gz) = 23ed7897dc5c865b4f6634b7ac0dcbe4237d022cd9423ef3e3e01a922800533922c9c17a0db626c15d90fcca1d6aa8a207420dd2f356eb596f693a63dc6cf156
|
||||||
SHA512 (pcsd-bundle-config-1) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4addf619bc4dc45a98fd48f0f7964b5400e43e84fe96f942a550d2762553fea97e63dc7ad9b8be823
|
SHA512 (pcsd-bundle-config-1) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4addf619bc4dc45a98fd48f0f7964b5400e43e84fe96f942a550d2762553fea97e63dc7ad9b8be823
|
||||||
SHA512 (orderedhash-0.0.6.gem) = b2dae648187437ea7d9d9be47b9ff8d0e1a96bc2ff9e50117033d5bd4cf09cfff3c0740c99c322910138cac90f33b425705ee7a30be84aa193e6afd9f576f64a
|
SHA512 (orderedhash-0.0.6.gem) = b2dae648187437ea7d9d9be47b9ff8d0e1a96bc2ff9e50117033d5bd4cf09cfff3c0740c99c322910138cac90f33b425705ee7a30be84aa193e6afd9f576f64a
|
||||||
SHA512 (rack-1.6.4.gem) = 304a6ae21bfd38008fd7d147f82c44397f3a1d2e689bd01de689aedc6ea0e8784605207fd314bc796974edc5dfcab81636664ea2becb0489302999f99501d41a
|
SHA512 (rack-1.6.4.gem) = 304a6ae21bfd38008fd7d147f82c44397f3a1d2e689bd01de689aedc6ea0e8784605207fd314bc796974edc5dfcab81636664ea2becb0489302999f99501d41a
|
||||||
|
Loading…
Reference in New Issue
Block a user