From ab63e3981499c4809c4b188a47748d34b8f694c4 Mon Sep 17 00:00:00 2001 From: Ivan Devat Date: Jan 08 2019 12:10:36 +0000 Subject: Rebased to latest upstream sources --- diff --git a/.gitignore b/.gitignore index eb3f5e5..ad27814 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bz1656953-01-drop-removed-command-pcs-resource-show-from-help.patch b/bz1656953-01-drop-removed-command-pcs-resource-show-from-help.patch new file mode 100644 index 0000000..0cfbe44 --- /dev/null +++ b/bz1656953-01-drop-removed-command-pcs-resource-show-from-help.patch @@ -0,0 +1,47 @@ +From 49ab32a69a3ce2b5e093b4997f01a4de9042b0b2 Mon Sep 17 00:00:00 2001 +From: Tomas Jelinek +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 + diff --git a/pcs.spec b/pcs.spec index 9d1f856..3540f95 100644 --- a/pcs.spec +++ b/pcs.spec @@ -1,10 +1,11 @@ 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 @@ -16,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 @@ -26,10 +34,6 @@ Summary: Pacemaker Configuration System # /usr/bin/python will be removed or switched to Python 3 in the future. %global __python %{__python3} -# 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 Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -40,15 +44,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 @@ -73,27 +75,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 @@ -130,9 +119,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 @@ -209,9 +200,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 # ----------------------------------------------------- @@ -229,6 +217,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 @@ -236,10 +225,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} @@ -248,10 +237,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 \ @@ -275,8 +260,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 @@ -297,28 +288,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=$? @@ -332,6 +303,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 @@ -365,12 +339,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* @@ -394,6 +366,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 @@ -412,6 +385,9 @@ run_all_tests %license pyagentx_LICENSE.txt %changelog +* Tue Jan 08 2019 Ivan Devát - 0.10.1-1 +- Rebased to latest upstream sources (see CHANGELOG.md) + * Tue Oct 09 2018 Ondrej Mular - 0.10.0.alpha.6-1 - Rebased to latest upstream sources (see CHANGELOG.md) - Resolves: rhbz#1618911 diff --git a/sources b/sources index b2c89f9..58ce498 100644 --- a/sources +++ b/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