From 7bbab365c26971fbf30ec980bbdff93342fbcff9 Mon Sep 17 00:00:00 2001 From: Miroslav Lisik Date: Mon, 20 Jul 2020 20:29:10 +0200 Subject: [PATCH] Rebased to latest upstream sources (see CHANGELOG.md) - Updated pcs-web-ui - Stopped bundling tornado (use distribution package instead) - Stopped bundling rubygem-tilt (use distribution package instead) - Removed rubygem bundling - Removed unneeded BuildRequires: execstack, gcc, gcc-c++ - Excluded some tests for tornado daemon --- .gitignore | 3 ++ pcs.spec | 91 ++++++++++++++---------------------------------------- sources | 9 ++---- 3 files changed, 30 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index e73ece1..b00b7e6 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,6 @@ /pcs-67591ed1487cb0aefa181fdfc166c8a66b55d25a.tar.gz /dacite-1.5.0.python3.9.fix.tar.gz /dacite-1.5.1.tar.gz +/pcs-0.10.6.tar.gz +/pcs-web-ui-0.1.3.tar.gz +/pcs-web-ui-node-modules-0.1.3.tar.xz diff --git a/pcs.spec b/pcs.spec index e827abb..7825a3b 100644 --- a/pcs.spec +++ b/pcs.spec @@ -1,28 +1,25 @@ Name: pcs -Version: 0.10.5 -Release: 8%{?dist} +Version: 0.10.6 +Release: 1%{?dist} # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses # GPLv2: pcs -# ASL 2.0: tornado # MIT: handlebars -License: GPLv2 and ASL 2.0 and MIT +License: GPLv2 and MIT URL: https://github.com/ClusterLabs/pcs Summary: Pacemaker Configuration System -# %%global version_or_commit %%{version} -%global version_or_commit 67591ed1487cb0aefa181fdfc166c8a66b55d25a +%global version_or_commit %{version} +# %%global version_or_commit 67591ed1487cb0aefa181fdfc166c8a66b55d25a %global pcs_source_name %{name}-%{version_or_commit} # ui_commit can be determined by hash, tag or branch -%global ui_commit 0.1.2 +%global ui_commit 0.1.3 %global ui_src_name pcs-web-ui-%{ui_commit} %global pcs_snmp_pkg_name pcs-snmp %global pyagentx_version 0.4.pcs.2 -%global tornado_version 6.0.3 %global dacite_version 1.5.1 -%global rubygem_tilt_version 2.0.9 # 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 @@ -33,24 +30,12 @@ Summary: Pacemaker Configuration System %global pcs_libdir %{_prefix}/lib %global bundled_src_dir pcs/bundled %global pcsd_public_dir pcsd/public -%global rubygem_cache_dir pcsd/vendor/cache -%global rubygem_bundle_dir pcsd/vendor/bundle/ruby -# https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Python_bytecompilation -# Enforce python3 because bytecompilation of tornado produced warnings: -# DEPRECATION WARNING: python2 invoked with /usr/bin/python. -# 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} #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_or_commit}/%{pcs_source_name}.tar.gz -Source1: pcsd-bundle-config-1 - -Source11: https://rubygems.org/downloads/tilt-%{rubygem_tilt_version}.gem Source41: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}/pyagentx-%{pyagentx_version}.tar.gz -Source42: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}/tornado-%{tornado_version}.tar.gz Source44: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacite-%{dacite_version}.tar.gz Source100: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz @@ -62,15 +47,12 @@ Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/p BuildRequires: git #printf from coreutils is used in makefile BuildRequires: coreutils -BuildRequires: execstack # python for pcs BuildRequires: python3 >= 3.6 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pycurl -# gcc for compiling custom rubygems -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: python3-tornado # ruby and gems for pcsd BuildRequires: ruby >= 2.2.0 BuildRequires: ruby-devel @@ -84,6 +66,7 @@ BuildRequires: rubygem-rack BuildRequires: rubygem-rack-protection BuildRequires: rubygem-rack-test BuildRequires: rubygem-sinatra +BuildRequires: rubygem-tilt # ruby libraries for tests BuildRequires: rubygem-test-unit # for touching patch files (sanitization function) @@ -107,6 +90,7 @@ Requires: python3-lxml Requires: python3-setuptools Requires: python3-clufter => 0.70.0 Requires: python3-pycurl +Requires: python3-tornado # ruby and gems for pcsd Requires: ruby >= 2.2.0 Requires: rubygem-backports @@ -118,6 +102,7 @@ Requires: rubygem-rack Requires: rubygem-rack-protection Requires: rubygem-rack-test Requires: rubygem-sinatra +Requires: rubygem-tilt # ruby and gems for pcsd-ruby Requires: rubygem-daemons Requires: rubygem-eventmachine @@ -144,9 +129,7 @@ Requires: pam Requires: liberation-sans-fonts Requires: overpass-fonts -Provides: bundled(tornado) = %{tornado_version} Provides: bundled(dacite) = %{dacite_version} -Provides: bundled(rubygem-tilt) = %{rubygem_tilt_version} %description pcs is a corosync and pacemaker configuration tool. It permits users to @@ -218,16 +201,6 @@ update_times_patch(){ tar -xzf %SOURCE100 -C %{pcsd_public_dir} tar -xf %SOURCE101 -C %{pcsd_public_dir}/%{ui_src_name} -# prepare dirs/files necessary for building all bundles -# ----------------------------------------------------- -# 1) configuration for rubygems -mkdir -p pcsd/.bundle -cp -f %SOURCE1 pcsd/.bundle/config - -# 2) rubygems sources -mkdir -p %{rubygem_cache_dir} -cp -f %SOURCE11 %{rubygem_cache_dir} - # 3) dir for python bundles mkdir -p %{bundled_src_dir} @@ -239,13 +212,6 @@ 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 -# 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 - # 7) sources for python dacite tar -xzf %SOURCE44 -C %{bundled_src_dir} mv %{bundled_src_dir}/dacite-%{dacite_version} %{bundled_src_dir}/dacite @@ -259,13 +225,6 @@ cp %{bundled_src_dir}/dacite/README.md dacite_README.md rm -rf $RPM_BUILD_ROOT pwd -# build bundled rubygems (in main install it is disabled by BUILD_GEMS=false) -mkdir -p %{rubygem_bundle_dir} -gem install \ - --force --verbose --no-document -l --no-user-install \ - -i %{rubygem_bundle_dir} \ - %{rubygem_cache_dir}/tilt-%{rubygem_tilt_version}.gem \ - # build web ui and put it to pcsd make -C %{pcsd_public_dir}/%{ui_src_name} build mv %{pcsd_public_dir}/%{ui_src_name}/build pcsd/public/ui @@ -280,7 +239,6 @@ rm -r %{pcsd_public_dir}/%{ui_src_name} PYTHON_SITELIB=%{python3_sitelib} \ BASH_COMPLETION_DIR=%{_datadir}/bash-completion/completions \ BUNDLE_PYAGENTX_SRC_DIR=`readlink -f %{bundled_src_dir}/pyagentx` \ - BUNDLE_TORNADO_SRC_DIR=`readlink -f %{bundled_src_dir}/tornado` \ BUNDLE_DACITE_SRC_DIR=`readlink -f %{bundled_src_dir}/dacite` \ BUILD_GEMS=false \ SYSTEMCTL_OVERRIDE=true \ @@ -288,15 +246,6 @@ rm -r %{pcsd_public_dir}/%{ui_src_name} 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} - %check # In the building environment LC_CTYPE is set to C which causes tests to fail # due to python prints a warning about it to stderr. The following environment @@ -314,13 +263,16 @@ run_all_tests(){ # disabled tests: # BUNDLED_LIB_LOCATION=$RPM_BUILD_ROOT%{pcs_libdir}/pcs/bundled/packages \ - %{__python3} pcs_test/suite.py --tier0 -v --vanilla + %{__python3} pcs_test/suite.py --tier0 -v --vanilla --all-but \ + pcs_test.tier0.daemon.app.test_app_remote.SyncConfigMutualExclusive.test_get_not_locked \ + pcs_test.tier0.daemon.app.test_app_remote.SyncConfigMutualExclusive.test_post_not_locked \ test_result_python=$? #run pcsd tests and remove them pcsd_dir=$RPM_BUILD_ROOT%{pcs_libdir}/pcsd - GEM_HOME=$RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir} ruby \ + # GEM_HOME is not needed anymore since all required gems are in fedora + ruby \ -I${pcsd_dir} \ -I${pcsd_dir}/test \ ${pcsd_dir}/test/test_all_suite.rb @@ -375,9 +327,7 @@ remove_all_tests %files %doc CHANGELOG.md %doc README.md -%doc tornado_README.rst %doc dacite_README.md -%license tornado_LICENSE %license dacite_LICENSE %license COPYING %{python3_sitelib}/pcs @@ -386,8 +336,6 @@ remove_all_tests %{_sbindir}/pcsd %{pcs_libdir}/pcs/pcs_internal %{pcs_libdir}/pcsd/* -%{pcs_libdir}/pcsd/.bundle/config -%{pcs_libdir}/pcs/bundled/packages/tornado* %{pcs_libdir}/pcs/bundled/packages/dacite* %{_unitdir}/pcsd.service %{_unitdir}/pcsd-ruby.service @@ -433,6 +381,15 @@ remove_all_tests %license pyagentx_LICENSE.txt %changelog +* Tue Jul 21 2020 Miroslav Lisik - 0.10.6-1 +- Rebased to latest upstream sources (see CHANGELOG.md) +- Updated pcs-web-ui +- Stopped bundling tornado (use distribution package instead) +- Stopped bundling rubygem-tilt (use distribution package instead) +- Removed rubygem bundling +- Removed unneeded BuildRequires: execstack, gcc, gcc-c++ +- Excluded some tests for tornado daemon + * Tue Jul 21 2020 Tom Stellard - 0.10.5-8 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro diff --git a/sources b/sources index 84b4f8e..01ac62a 100644 --- a/sources +++ b/sources @@ -1,8 +1,5 @@ -SHA512 (pcsd-bundle-config-1) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4addf619bc4dc45a98fd48f0f7964b5400e43e84fe96f942a550d2762553fea97e63dc7ad9b8be823 SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a -SHA512 (tornado-6.0.3.tar.gz) = 8caaa64d14edcb3993dffea3175685d82afb0068a8e8834cbb6eb9e15883fe113bb57cd98d99c25362bef0a6ee2762f2baf24effd645ecd77f035583cc4de756 -SHA512 (pcs-web-ui-0.1.2.tar.gz) = 2fcb1c600cc644234036b47d7d277bb083945f3827c3f561d4301d901f2df579bf3f15da9f185ed3067951b76d17d102088d64aa921be2caa29d393d8342fb2a -SHA512 (pcs-web-ui-node-modules-0.1.2.tar.xz) = 48bc9e60170e8aedf744c57d78813b5a2e241a104c9a309f551aeaaa808f1a2bd77c6bae46a5833e1502a0bf222774b2604dfd4f75b4ddc461e50f49bf73f468 -SHA512 (tilt-2.0.9.gem) = 522b2b40ca1eefc7df66cb421c66734699a2ffb1e7d1797181c2718f7ca018d3376c1a2b3617b5d3549115af69108db4c3c4632e2682329d5baf24bfdae92b42 -SHA512 (pcs-67591ed1487cb0aefa181fdfc166c8a66b55d25a.tar.gz) = ee2f38b3c13c338ad9b36e26f21d704ac278ed9efa466a4030279afadcbb7c755ae444d8967911ad24c99c1114bfe1d8538f9b74114850be63e20b20fa71195c SHA512 (dacite-1.5.1.tar.gz) = ac1a3ffcd7e75fe99e6a3baf8623d3caee8940f0d2a8e455f86d71f71e1ff76b0bfad0c112a2ebdf2a81d4be9c9bd99adea94603f674c28e68959cb299d0039d +SHA512 (pcs-0.10.6.tar.gz) = e2e4ddc100a93d97ba8ecda1d3b4aa75f7a88be1f8aa9cc3de72cf67268b679f34007374129781cfc2567f091e472c3fa7a83e15037d68a3ea47edabcfd0b0ad +SHA512 (pcs-web-ui-0.1.3.tar.gz) = caf28046e11d75f77ab96ab27fe3eb8b09bf767a0daee0155dbc7999ede2ae80f937328cc7fd6c0620caafbb6fda61d8076ec30ed2e2911fbf5dc6a0e1eb915b +SHA512 (pcs-web-ui-node-modules-0.1.3.tar.xz) = 61cb28e7a6fe1253da24537101d502b3116d148db6eb81512067a0d6bdbafb7a93e3c546fb020515921ee846254be20dabbab79198c6e9bcfc3a18e7ebb5fdca