Rebased to latest upstream sources
This commit is contained in:
parent
84c984d7f5
commit
7e17d16d64
1
.gitignore
vendored
1
.gitignore
vendored
@ -56,3 +56,4 @@
|
||||
/pcs-0.10.0.alpha.2.tar.gz
|
||||
/tilt-2.0.8.gem
|
||||
/pcs-0.10.0.alpha.6.tar.gz
|
||||
/pcs-0.10.1.tar.gz
|
||||
|
@ -0,0 +1,47 @@
|
||||
From 49ab32a69a3ce2b5e093b4997f01a4de9042b0b2 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Jelinek <tojeline@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 10:15:17 +0100
|
||||
Subject: [PATCH] drop removed command "pcs resource show" from help
|
||||
|
||||
---
|
||||
pcs/pcs.8 | 4 ++--
|
||||
pcs/usage.py | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/pcs/pcs.8 b/pcs/pcs.8
|
||||
index 47d0dda7..aa72aa91 100644
|
||||
--- a/pcs/pcs.8
|
||||
+++ b/pcs/pcs.8
|
||||
@@ -961,10 +961,10 @@ Authenticate current user to local pcsd. This is requiered to run some pcs comma
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
Show all resources
|
||||
-.B # pcs resource show
|
||||
+.B # pcs resource config
|
||||
.TP
|
||||
Show options specific to the 'VirtualIP' resource
|
||||
-.B # pcs resource show VirtualIP
|
||||
+.B # pcs resource config VirtualIP
|
||||
.TP
|
||||
Create a new resource called 'VirtualIP' with options
|
||||
.B # pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.0.99 cidr_netmask=32 nic=eth2 op monitor interval=30s
|
||||
diff --git a/pcs/usage.py b/pcs/usage.py
|
||||
index 21c6e486..4487d844 100644
|
||||
--- a/pcs/usage.py
|
||||
+++ b/pcs/usage.py
|
||||
@@ -558,10 +558,10 @@ Commands:
|
||||
|
||||
Examples:
|
||||
|
||||
- pcs resource show
|
||||
+ pcs resource config
|
||||
Show all resources.
|
||||
|
||||
- pcs resource show VirtualIP
|
||||
+ pcs resource config VirtualIP
|
||||
Show options specific to the 'VirtualIP' resource.
|
||||
|
||||
|
||||
--
|
||||
2.17.0
|
||||
|
108
pcs.spec
108
pcs.spec
@ -1,14 +1,11 @@
|
||||
# This package depends on automagic byte compilation
|
||||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||
%global _python_bytecompile_extra 1
|
||||
|
||||
Name: pcs
|
||||
Version: 0.10.0.alpha.6
|
||||
Version: 0.10.1
|
||||
Release: 1%{?dist}
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPLv2: pcs
|
||||
# ASL 2.0: tornado
|
||||
License: GPLv2 and ASL 2.0
|
||||
# MIT: handlebars
|
||||
License: GPLv2 and ASL 2.0 and MIT
|
||||
URL: https://github.com/ClusterLabs/pcs
|
||||
Group: System Environment/Base
|
||||
Summary: Pacemaker Configuration System
|
||||
@ -20,6 +17,13 @@ Summary: Pacemaker Configuration System
|
||||
%global tornado_version 5.0.2
|
||||
%global rubygem_tilt_version 2.0.8
|
||||
|
||||
# We do not use _libdir macro because upstream is not prepared for it.
|
||||
# Pcs does not include binaries and thus it should live in /usr/lib. Tornado
|
||||
# and gems include binaries and thus it should live in /usr/lib64. But the
|
||||
# path to tornado/gems is hardcoded in pcs sources. Modify hard links in pcs
|
||||
# sources is not the way since then rpmdiff complains that the same file has
|
||||
# different content in different architectures.
|
||||
%global pcs_libdir %{_prefix}/lib
|
||||
%global bundled_src_dir pcs/bundled
|
||||
%global rubygem_cache_dir pcsd/vendor/cache
|
||||
%global rubygem_bundle_dir pcsd/vendor/bundle/ruby
|
||||
@ -29,10 +33,10 @@ Summary: Pacemaker Configuration System
|
||||
# Use /usr/bin/python3 or /usr/bin/python2
|
||||
# /usr/bin/python will be removed or switched to Python 3 in the future.
|
||||
%global __python %{__python3}
|
||||
# This package depends on automagic byte compilation
|
||||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||
%global _python_bytecompile_extra 1
|
||||
|
||||
# we cannot use macro %%{_libdir} (which may point to lib64) as some paths to
|
||||
# /usr/lib are hardcoded in settings.py and settings.rb
|
||||
%global pcs_libdir %{_prefix}/lib
|
||||
|
||||
#part after last slash is recognized as filename in look-aside repository
|
||||
#desired name is achived by trick with hash anchor
|
||||
@ -44,15 +48,13 @@ Source11: https://rubygems.org/downloads/tilt-%{rubygem_tilt_version}.gem
|
||||
Source41: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}.tar.gz#/pyagentx-%{pyagentx_version}.tar.gz
|
||||
Source42: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}.tar.gz#/tornado-%{tornado_version}.tar.gz
|
||||
|
||||
Patch0: disable-gui.patch
|
||||
Patch1: exclude-tests-from-python-package.patch
|
||||
Patch2: skip-tests-which-require-root-user.patch
|
||||
Patch3: exclude-test-resources-from-python-package.patch
|
||||
Patch0: bz1656953-01-drop-removed-command-pcs-resource-show-from-help.patch
|
||||
|
||||
# git for patches
|
||||
BuildRequires: git
|
||||
#printf from coreutils is used in makefile
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: execstack
|
||||
# python for pcs
|
||||
BuildRequires: python3 >= 3.6
|
||||
BuildRequires: python3-devel
|
||||
@ -77,27 +79,14 @@ BuildRequires: rubygem-rack-test
|
||||
BuildRequires: rubygem-sinatra
|
||||
# ruby libraries for tests
|
||||
BuildRequires: rubygem-test-unit
|
||||
# for UpdateTimestamps sanitization function
|
||||
# for touching patch files (sanitization function)
|
||||
BuildRequires: diffstat
|
||||
# for post, preun and postun macros
|
||||
BuildRequires: systemd
|
||||
# for tests
|
||||
BuildRequires: python3-lxml
|
||||
BuildRequires: python3-pyOpenSSL
|
||||
BuildRequires: corosync >= 2.99
|
||||
BuildRequires: pacemaker >= 2.0.0
|
||||
BuildRequires: pacemaker-cli
|
||||
|
||||
# fence-agents-all disabled because of problems:
|
||||
# """
|
||||
# Error:
|
||||
# Problem: package fence-agents-all-4.2.1-2.fc29.x86_64 requires fence-agents-sbd, but none of the providers can be installed
|
||||
# - package fence-agents-sbd-4.2.1-2.fc29.x86_64 requires sbd, but none of the providers can be installed
|
||||
# - conflicting requests
|
||||
# - nothing provides libcib.so.4()(64bit) needed by sbd-1.2.1-4.fc28.1.x86_64
|
||||
# """
|
||||
# BuildRequires: fence-agents-all
|
||||
# Use only necessary fence agents
|
||||
BuildRequires: pacemaker-cli >= 2.0.0
|
||||
BuildRequires: fence-virt
|
||||
BuildRequires: fence-agents-apc
|
||||
BuildRequires: fence-agents-scsi
|
||||
@ -134,9 +123,11 @@ Requires: psmisc
|
||||
Requires: openssl
|
||||
Requires: python3-pyOpenSSL
|
||||
# cluster stack and related packages
|
||||
Requires: corosync >= 2.99
|
||||
Requires: pacemaker >= 2.0.0
|
||||
Requires: pacemaker-cli
|
||||
Suggests: pacemaker
|
||||
Requires: (corosync >= 2.99 if pacemaker)
|
||||
# pcs enables corosync encryption by default so we require libknet1-plugins-all
|
||||
Requires: libknet1-plugins-all
|
||||
Requires: pacemaker-cli >= 2.0.0
|
||||
# for post, preun and postun macros
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
@ -213,9 +204,6 @@ update_times_patch(){
|
||||
}
|
||||
|
||||
update_times_patch %{PATCH0}
|
||||
update_times_patch %{PATCH1}
|
||||
update_times_patch %{PATCH2}
|
||||
update_times_patch %{PATCH3}
|
||||
|
||||
# prepare dirs/files necessary for building all bundles
|
||||
# -----------------------------------------------------
|
||||
@ -233,6 +221,7 @@ mkdir -p %{bundled_src_dir}
|
||||
# 4) sources for pyagentx
|
||||
tar -xzf %SOURCE41 -C %{bundled_src_dir}
|
||||
mv %{bundled_src_dir}/pyagentx-%{pyagentx_version} %{bundled_src_dir}/pyagentx
|
||||
update_times %SOURCE41 `find %{bundled_src_dir}/pyagentx -follow`
|
||||
cp %{bundled_src_dir}/pyagentx/LICENSE.txt pyagentx_LICENSE.txt
|
||||
cp %{bundled_src_dir}/pyagentx/CONTRIBUTORS.txt pyagentx_CONTRIBUTORS.txt
|
||||
cp %{bundled_src_dir}/pyagentx/README.md pyagentx_README.md
|
||||
@ -240,10 +229,10 @@ cp %{bundled_src_dir}/pyagentx/README.md pyagentx_README.md
|
||||
# 5) sources for tornado
|
||||
tar -xzf %SOURCE42 -C %{bundled_src_dir}
|
||||
mv %{bundled_src_dir}/tornado-%{tornado_version} %{bundled_src_dir}/tornado
|
||||
update_times %SOURCE42 `find %{bundled_src_dir}/tornado -follow`
|
||||
cp %{bundled_src_dir}/tornado/LICENSE tornado_LICENSE
|
||||
cp %{bundled_src_dir}/tornado/README.rst tornado_README.rst
|
||||
|
||||
|
||||
%build
|
||||
%define debug_package %{nil}
|
||||
|
||||
@ -252,10 +241,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
pwd
|
||||
|
||||
# build bundled rubygems (in main install it is disabled by BUILD_GEMS=false)
|
||||
# comment from 9b7a65231 Mamoru TASAKA:
|
||||
# So it seems that with rubygems 2.7.3 --install-dir option always
|
||||
# needs --no-user-install???
|
||||
|
||||
mkdir -p %{rubygem_bundle_dir}
|
||||
gem install \
|
||||
--force --verbose --no-rdoc --no-ri -l --no-user-install \
|
||||
@ -279,8 +264,14 @@ make install \
|
||||
rubyhdrdir="%{_includedir}" \
|
||||
includedir="%{_includedir}"
|
||||
|
||||
# With this file there is "File is not stripped" problem during rpmdiff
|
||||
# See https://docs.engineering.redhat.com/display/HTD/rpmdiff-elf-stripping
|
||||
for fname in `find ${RPM_BUILD_ROOT}%{pcs_libdir}/pcs/bundled/packages/tornado/ -type f -name "*.so"`; do
|
||||
strip ${fname}
|
||||
done
|
||||
|
||||
#after the ruby gem compilation we do not need ruby gems in the cache
|
||||
rm -r -v $RPM_BUILD_ROOT/%{pcs_libdir}/%{rubygem_cache_dir}
|
||||
rm -r -v $RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_cache_dir}
|
||||
|
||||
%check
|
||||
# In the building environment LC_CTYPE is set to C which causes tests to fail
|
||||
@ -301,28 +292,8 @@ run_all_tests(){
|
||||
|
||||
# disabled tests:
|
||||
#
|
||||
# pcs.test.cib_resource.test_create.Success.test_base_create_with_agent_name_including_systemd_instance
|
||||
# It requires systemd to be running so pacemaker can connect to it via dbus.
|
||||
# This is not possible during building.
|
||||
# pcs.test.test_stonith.StonithTest.testStonithCreation
|
||||
# requires fence_ilo which cannot be installed at the time because of
|
||||
# issues with dependencies
|
||||
# pcs.common.test.test_node_communicator.RequestDataUrlEncodeTest.test_with_data
|
||||
# ======================================================================
|
||||
# FAIL: test_with_data (pcs.common.test.test_node_communicator.RequestDataUrlEncodeTest)
|
||||
# ----------------------------------------------------------------------
|
||||
# Traceback (most recent call last):
|
||||
# File "/builddir/build/BUILDROOT/pcs-0.10.0.alpha.1-1.fc29.x86_64/usr/lib/python3.7/site-packages/pcs/common/test/test_node_communicator.py", line 80, in test_with_data
|
||||
# self.assertEqual(expected_raw_data, data.data)
|
||||
# AssertionError: 'key1[44 chars]3F%27%22%3B%5B%5D%28%29%2A%5E%24%23%40%21%7E%60%7B%3A%7D%3C%3E' != 'key1[44 chars]3F%27%22%3B%5B%5D%28%29%2A%5E%24%23%40%21~%60%7B%3A%7D%3C%3E'
|
||||
# - key1=value1&spacial+characters=%2B-%2B%2F%25%26%3F%27%22%3B%5B%5D%28%29%2A%5E%24%23%40%21%7E%60%7B%3A%7D%3C%3E
|
||||
# ? ^^^
|
||||
# + key1=value1&spacial+characters=%2B-%2B%2F%25%26%3F%27%22%3B%5B%5D%28%29%2A%5E%24%23%40%21~%60%7B%3A%7D%3C%3E
|
||||
# ? ^
|
||||
%{__python3} pcs/test/suite.py -v --vanilla --all-but \
|
||||
pcs.common.test.test_node_communicator.RequestDataUrlEncodeTest.test_with_data \
|
||||
pcs.test.cib_resource.test_create.Success.test_base_create_with_agent_name_including_systemd_instance \
|
||||
pcs.test.test_stonith.StonithTest.testStonithCreation \
|
||||
%{__python3} pcs/test/suite.py -v --vanilla \
|
||||
# --all-but \
|
||||
|
||||
test_result_python=$?
|
||||
|
||||
@ -336,6 +307,9 @@ run_all_tests(){
|
||||
#remove pcsd tests, we do not distribute them in the rpm
|
||||
rm -r -v ${pcsd_dir}/test
|
||||
|
||||
# remove javascript testing files
|
||||
rm -r -v ${pcsd_dir}/public/js/dev
|
||||
|
||||
if [ $test_result_python -ne 0 ]; then
|
||||
return $test_result_python
|
||||
fi
|
||||
@ -369,12 +343,10 @@ run_all_tests
|
||||
%license tornado_LICENSE
|
||||
%license COPYING
|
||||
%{python3_sitelib}/pcs
|
||||
# version temporary hardcoded because setup.py:
|
||||
# UserWarning: Normalizing '0.10.0.alpha.1' to '0.10.0a1'
|
||||
# so we keep veriosn 0.10.0 in sources
|
||||
%{python3_sitelib}/pcs-0.10.0-py3.*.egg-info
|
||||
%{python3_sitelib}/pcs-0.10.1-py3.*.egg-info
|
||||
%{_sbindir}/pcs
|
||||
%{_sbindir}/pcsd
|
||||
%{pcs_libdir}/pcs/pcs_internal
|
||||
%{pcs_libdir}/pcsd/*
|
||||
%{pcs_libdir}/pcsd/.bundle/config
|
||||
%{pcs_libdir}/pcs/bundled/packages/tornado*
|
||||
@ -398,6 +370,7 @@ run_all_tests
|
||||
%exclude %{pcs_libdir}/pcsd/pcsd.service
|
||||
%exclude %{pcs_libdir}/pcsd/pcsd.conf
|
||||
%exclude %{pcs_libdir}/pcsd/pcsd.8
|
||||
%exclude %{pcs_libdir}/pcsd/public/js/dev/*
|
||||
%exclude %{python3_sitelib}/pcs/bash_completion
|
||||
%exclude %{python3_sitelib}/pcs/pcs.8
|
||||
%exclude %{python3_sitelib}/pcs/pcs
|
||||
@ -416,6 +389,9 @@ run_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Wed Jan 09 2019 Ivan Devát <idevat@redhat.com> - 0.10.1-1
|
||||
- Rebased to latest upstream sources (see CHANGELOG.md)
|
||||
|
||||
* Tue Oct 09 2018 Ondrej Mular <omular@redhat.com> - 0.10.0.alpha.6-1
|
||||
- Rebased to latest upstream sources (see CHANGELOG.md)
|
||||
- Resolves: rhbz#1618911
|
||||
|
2
sources
2
sources
@ -2,4 +2,4 @@ SHA512 (pcsd-bundle-config-1) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4
|
||||
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
|
||||
SHA512 (tornado-5.0.2.tar.gz) = 8e6d2757ef4179fc8f23efa63f6b22e5c303a8a1da1efda6a8df4a2acc22f0e67bed2ca504eac82c491c5bd0a087f9dcc76c4b6bd27afdf2fdc8c988f1dc1096
|
||||
SHA512 (tilt-2.0.8.gem) = 1767f2e5ce45afe95d84d32de7c2b6fe24ff7cb6f7ee8485d84344820b2f6e969ae60a6fbaa7141f7fe135c6540d96fa5b27fd8010b95c0ded5d049a315001d5
|
||||
SHA512 (pcs-0.10.0.alpha.6.tar.gz) = 5c12e95384ebcbfe3be481afa1807b3db770e177fce55b3edd9049690fb8833e58a27c3302f25ac2f4c5c60cead028ab31fdfb8f1c683b018d79201c2446ceeb
|
||||
SHA512 (pcs-0.10.1.tar.gz) = fe028b562453e45602d1d91a6014761f0118ac13ad6a387eaed48535f38a34308c0fed6586929fda514eccabdc632d243644816339e442b217c653890fc05e65
|
||||
|
Loading…
Reference in New Issue
Block a user