update to 0.10.8
(cherry picked from commit 7baf79e0e60b374ced73326b0dd8898a2219bc0b)
This commit is contained in:
parent
7854b2d9de
commit
c7695ed670
184
0001-Resolve-the-failure-of-field-matching-in-test-cases.patch
Normal file
184
0001-Resolve-the-failure-of-field-matching-in-test-cases.patch
Normal file
@ -0,0 +1,184 @@
|
||||
From ff5b952ef785af34429b2560bb11d4ec7c7e07fa Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Thu, 10 Mar 2022 16:45:14 +0800
|
||||
Subject: [PATCH] Resolve-the-failure-of-field-matching-in-test-cases
|
||||
|
||||
---
|
||||
pcs_test/tier0/lib/cib/rule/test_parser.py | 64 +++++++++----------
|
||||
pcs_test/tier0/lib/cib/test_nvpair_multi.py | 2 +-
|
||||
.../tier0/lib/commands/test_cib_options.py | 2 +-
|
||||
3 files changed, 34 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/pcs_test/tier0/lib/cib/rule/test_parser.py b/pcs_test/tier0/lib/cib/rule/test_parser.py
|
||||
index ccedfee..e9b567f 100644
|
||||
--- a/pcs_test/tier0/lib/cib/rule/test_parser.py
|
||||
+++ b/pcs_test/tier0/lib/cib/rule/test_parser.py
|
||||
@@ -782,8 +782,8 @@ class Parser(TestCase):
|
||||
def test_not_valid_rule(self):
|
||||
test_data = [
|
||||
# node attr misc
|
||||
- ("#uname", (1, 7, 6, 'Expected "eq"')),
|
||||
- ("string node1", (1, 8, 7, 'Expected "eq"')),
|
||||
+ ("#uname", (1, 7, 6, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("string node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
# node attr unary
|
||||
("defined", (1, 8, 7, "Expected <attribute name>")),
|
||||
("not_defined", (1, 12, 11, "Expected <attribute name>")),
|
||||
@@ -791,58 +791,58 @@ class Parser(TestCase):
|
||||
("defined date-spec hours=1", (1, 19, 18, "Expected end of text")),
|
||||
("defined duration hours=1", (1, 18, 17, "Expected end of text")),
|
||||
# node attr binary
|
||||
- ("eq", (1, 3, 2, 'Expected "eq"')),
|
||||
+ ("eq", (1, 3, 2, "Expected CaselessKeyword 'eq'")),
|
||||
("#uname eq", (1, 10, 9, "Expected <attribute value>")),
|
||||
- ("#uname node1", (1, 8, 7, 'Expected "eq"')),
|
||||
- ("eq #uname", (1, 4, 3, 'Expected "eq"')),
|
||||
+ ("#uname node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("eq #uname", (1, 4, 3, "Expected CaselessKeyword 'eq'")),
|
||||
("eq lt", (1, 6, 5, "Expected <attribute value>")),
|
||||
- ("string #uname eq node1", (1, 8, 7, 'Expected "eq"')),
|
||||
+ ("string #uname eq node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
("date-spec hours=1 eq node1", (1, 19, 18, "Expected end of text")),
|
||||
(
|
||||
"#uname eq date-spec hours=1",
|
||||
(1, 21, 20, "Expected end of text"),
|
||||
),
|
||||
- ("duration hours=1 eq node1", (1, 10, 9, 'Expected "eq"')),
|
||||
+ ("duration hours=1 eq node1", (1, 10, 9, "Expected CaselessKeyword 'eq'")),
|
||||
("#uname eq duration hours=1", (1, 20, 19, "Expected end of text")),
|
||||
# node attr binary with optional parts
|
||||
- ("string", (1, 7, 6, 'Expected "eq"')),
|
||||
+ ("string", (1, 7, 6, "Expected CaselessKeyword 'eq'")),
|
||||
("#uname eq string", (1, 17, 16, "Expected <attribute value>")),
|
||||
- ("string #uname eq node1", (1, 8, 7, 'Expected "eq"')),
|
||||
+ ("string #uname eq node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
# resource, op
|
||||
- ("resource", (1, 9, 8, 'Expected "eq"')),
|
||||
- ("op", (1, 3, 2, 'Expected "eq"')),
|
||||
+ ("resource", (1, 9, 8, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("op", (1, 3, 2, "Expected CaselessKeyword 'eq'")),
|
||||
("resource ::rA and", (1, 15, 14, "Expected end of text")),
|
||||
("resource ::rA and op ", (1, 15, 14, "Expected end of text")),
|
||||
("resource ::rA and (", (1, 15, 14, "Expected end of text")),
|
||||
# and, or
|
||||
- ("and", (1, 4, 3, 'Expected "eq"')),
|
||||
- ("or", (1, 3, 2, 'Expected "eq"')),
|
||||
- ("#uname and node1", (1, 8, 7, 'Expected "eq"')),
|
||||
- ("#uname or node1", (1, 8, 7, 'Expected "eq"')),
|
||||
- ("#uname or eq", (1, 8, 7, 'Expected "eq"')),
|
||||
+ ("and", (1, 4, 3, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("or", (1, 3, 2, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("#uname and node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("#uname or node1", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("#uname or eq", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
("#uname eq node1 and node2", (1, 17, 16, "Expected end of text")),
|
||||
("#uname eq node1 and", (1, 17, 16, "Expected end of text")),
|
||||
(
|
||||
"#uname eq node1 and #uname eq",
|
||||
(1, 17, 16, "Expected end of text"),
|
||||
),
|
||||
- ("and #uname eq node1", (1, 5, 4, 'Expected "eq"')),
|
||||
+ ("and #uname eq node1", (1, 5, 4, "Expected CaselessKeyword 'eq'")),
|
||||
(
|
||||
"#uname ne node1 and duration hours=1",
|
||||
(1, 17, 16, "Expected end of text"),
|
||||
),
|
||||
(
|
||||
"duration monthdays=1 or #uname ne node1",
|
||||
- (1, 10, 9, 'Expected "eq"'),
|
||||
+ (1, 10, 9, "Expected CaselessKeyword 'eq'"),
|
||||
),
|
||||
# date
|
||||
- ("date in_range", (1, 14, 13, 'Expected "to"')),
|
||||
- ("date in_range 2014-06-26", (1, 15, 14, 'Expected "to"')),
|
||||
+ ("date in_range", (1, 14, 13, "Expected CaselessKeyword 'to'")),
|
||||
+ ("date in_range 2014-06-26", (1, 15, 14, "Expected CaselessKeyword 'to'")),
|
||||
("date in_range 2014-06-26 to", (1, 28, 27, "Expected <date>")),
|
||||
- ("in_range 2014-06-26 to 2014-07-26", (1, 10, 9, 'Expected "eq"')),
|
||||
+ ("in_range 2014-06-26 to 2014-07-26", (1, 10, 9, "Expected CaselessKeyword 'eq'")),
|
||||
(
|
||||
"date in_range #uname eq node1 to 2014-07-26",
|
||||
- (1, 15, 14, 'Expected "to"'),
|
||||
+ (1, 15, 14, "Expected CaselessKeyword 'to'"),
|
||||
),
|
||||
(
|
||||
"date in_range 2014-06-26 to #uname eq node1",
|
||||
@@ -850,7 +850,7 @@ class Parser(TestCase):
|
||||
),
|
||||
(
|
||||
"date in_range defined pingd to 2014-07-26",
|
||||
- (1, 15, 14, 'Expected "to"'),
|
||||
+ (1, 15, 14, "Expected CaselessKeyword 'to'"),
|
||||
),
|
||||
(
|
||||
"date in_range 2014-06-26 to defined pingd",
|
||||
@@ -858,11 +858,11 @@ class Parser(TestCase):
|
||||
),
|
||||
(
|
||||
"string date in_range 2014-06-26 to 2014-07-26",
|
||||
- (1, 8, 7, 'Expected "eq"'),
|
||||
+ (1, 8, 7, "Expected CaselessKeyword 'eq'"),
|
||||
),
|
||||
(
|
||||
"date in_range string 2014-06-26 to 2014-07-26",
|
||||
- (1, 15, 14, 'Expected "to"'),
|
||||
+ (1, 15, 14, "Expected CaselessKeyword 'to'"),
|
||||
),
|
||||
(
|
||||
"date in_range 2014-06-26 to string 2014-07-26",
|
||||
@@ -870,19 +870,19 @@ class Parser(TestCase):
|
||||
),
|
||||
(
|
||||
"date in_range 2014-06-26 string to 2014-07-26",
|
||||
- (1, 15, 14, 'Expected "to"'),
|
||||
+ (1, 15, 14, "Expected CaselessKeyword 'to'"),
|
||||
),
|
||||
(
|
||||
"#uname in_range 2014-06-26 to 2014-07-26",
|
||||
- (1, 8, 7, 'Expected "eq"'),
|
||||
+ (1, 8, 7, "Expected CaselessKeyword 'eq'"),
|
||||
),
|
||||
# braces
|
||||
- ("(#uname)", (1, 8, 7, 'Expected "eq"')),
|
||||
- ("(", (1, 2, 1, 'Expected "date"')),
|
||||
- ("()", (1, 2, 1, 'Expected "date"')),
|
||||
- ("(#uname", (1, 8, 7, 'Expected "eq"')),
|
||||
+ ("(#uname)", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
+ ("(", (1, 2, 1, "Expected CaselessKeyword 'date'")),
|
||||
+ ("()", (1, 2, 1, "Expected CaselessKeyword 'date'")),
|
||||
+ ("(#uname", (1, 8, 7, "Expected CaselessKeyword 'eq'")),
|
||||
("(#uname eq", (1, 11, 10, "Expected <attribute value>")),
|
||||
- ("(#uname eq node1", (1, 17, 16, 'Expected ")"')),
|
||||
+ ("(#uname eq node1", (1, 17, 16, "Expected ')'")),
|
||||
]
|
||||
for rule_string, exception_data in test_data:
|
||||
with self.subTest(rule_string=rule_string):
|
||||
diff --git a/pcs_test/tier0/lib/cib/test_nvpair_multi.py b/pcs_test/tier0/lib/cib/test_nvpair_multi.py
|
||||
index ff5ed68..6d9cc76 100644
|
||||
--- a/pcs_test/tier0/lib/cib/test_nvpair_multi.py
|
||||
+++ b/pcs_test/tier0/lib/cib/test_nvpair_multi.py
|
||||
@@ -531,7 +531,7 @@ class ValidateNvsetAppendNew(TestCase):
|
||||
fixture.error(
|
||||
reports.codes.RULE_EXPRESSION_PARSE_ERROR,
|
||||
rule_string="bad rule",
|
||||
- reason='Expected "eq"',
|
||||
+ reason="Expected CaselessKeyword 'eq'",
|
||||
rule_line="bad rule",
|
||||
line_number=1,
|
||||
column_number=5,
|
||||
diff --git a/pcs_test/tier0/lib/commands/test_cib_options.py b/pcs_test/tier0/lib/commands/test_cib_options.py
|
||||
index df2716c..84dc008 100644
|
||||
--- a/pcs_test/tier0/lib/commands/test_cib_options.py
|
||||
+++ b/pcs_test/tier0/lib/commands/test_cib_options.py
|
||||
@@ -329,7 +329,7 @@ class DefaultsCreateMixin:
|
||||
fixture.error(
|
||||
reports.codes.RULE_EXPRESSION_PARSE_ERROR,
|
||||
rule_string="bad rule",
|
||||
- reason='Expected "eq"',
|
||||
+ reason="Expected CaselessKeyword 'eq'",
|
||||
rule_line="bad rule",
|
||||
line_number=1,
|
||||
column_number=5,
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
dacite-1.6.0.tar.gz
Normal file
BIN
dacite-1.6.0.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
pcs-0.10.8.tar.gz
Normal file
BIN
pcs-0.10.8.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
pcs-web-ui-0.1.5.tar.gz
Normal file
BIN
pcs-web-ui-0.1.5.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
136
pcs.spec
136
pcs.spec
@ -1,5 +1,5 @@
|
||||
Name: pcs
|
||||
Version: 0.10.5
|
||||
Version: 0.10.8
|
||||
Release: 1
|
||||
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
|
||||
URL: https://github.com/ClusterLabs/pcs
|
||||
@ -9,15 +9,19 @@ Summary: Pacemaker Configuration System
|
||||
%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.5
|
||||
%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.1.0
|
||||
%global rubygem_tilt_version 2.0.9
|
||||
%global dacite_version 1.6.0
|
||||
|
||||
# bundled libraries for old web-ui
|
||||
%global ember_version 1.4.0
|
||||
%global jquery_version 1.9.1
|
||||
%global jquery_ui_version 1.10.1
|
||||
%global handlebars_version 1.2.1
|
||||
|
||||
# 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
|
||||
@ -28,43 +32,29 @@ 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}
|
||||
# This package depends on automagic byte compilation
|
||||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||
%global _python_bytecompile_extra 1
|
||||
|
||||
|
||||
#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
|
||||
Source2: https://rubygems.org/downloads/tilt-%{rubygem_tilt_version}.gem
|
||||
Source3: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}/pyagentx-%{pyagentx_version}.tar.gz
|
||||
Source4: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}/tornado-%{tornado_version}.tar.gz
|
||||
Source5: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacite-%{dacite_version}.tar.gz
|
||||
Source6: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
|
||||
Source7: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_commit}.tar.xz
|
||||
Source1: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}/pyagentx-%{pyagentx_version}.tar.gz
|
||||
Source2: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacite-%{dacite_version}.tar.gz
|
||||
Source3: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
|
||||
Source4: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_commit}.tar.xz
|
||||
|
||||
Patch0: 0001-Resolve-the-failure-of-field-matching-in-test-cases.patch
|
||||
# git for patches
|
||||
BuildRequires: git
|
||||
BuildRequires: make
|
||||
BuildRequires: git-core
|
||||
#printf from coreutils is used in makefile
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: execstack
|
||||
# python for pcs
|
||||
BuildRequires: python3 >= 3.6
|
||||
BuildRequires: python3-dateutil >= 2.7.0
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pycurl
|
||||
# gcc for compiling custom rubygems
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python3-pyparsing
|
||||
BuildRequires: python3-tornado
|
||||
# ruby and gems for pcsd
|
||||
BuildRequires: ruby >= 2.2.0
|
||||
BuildRequires: ruby-devel
|
||||
@ -78,6 +68,8 @@ BuildRequires: rubygem-rack
|
||||
BuildRequires: rubygem-rack-protection
|
||||
BuildRequires: rubygem-rack-test
|
||||
BuildRequires: rubygem-sinatra
|
||||
BuildRequires: rubygem(rexml)
|
||||
BuildRequires: rubygem-tilt
|
||||
# ruby libraries for tests
|
||||
BuildRequires: rubygem-test-unit
|
||||
# for touching patch files (sanitization function)
|
||||
@ -87,14 +79,6 @@ BuildRequires: systemd
|
||||
# for tests
|
||||
BuildRequires: python3-lxml
|
||||
BuildRequires: python3-pyOpenSSL
|
||||
BuildRequires: pacemaker-cli >= 2.0.0
|
||||
BuildRequires: fence-virt
|
||||
BuildRequires: fence-agents-apc
|
||||
BuildRequires: fence-agents-scsi
|
||||
BuildRequires: fence-agents-ipmilan
|
||||
# fence-agents-ilo2 issue with dependencies
|
||||
# BuildRequires: fence-agents-ilo2
|
||||
BuildRequires: booth-site
|
||||
# pcsd fonts and font management tools for creating symlinks to fonts
|
||||
BuildRequires: fontconfig
|
||||
BuildRequires: liberation-sans-fonts
|
||||
@ -107,8 +91,10 @@ BuildRequires: npm
|
||||
Requires: python3 >= 3.6
|
||||
Requires: python3-lxml
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-clufter => 0.70.0
|
||||
Requires: python3-pycurl
|
||||
Requires: python3-dateutil >= 2.7.0
|
||||
Requires: python3-pyparsing
|
||||
Requires: python3-tornado
|
||||
# ruby and gems for pcsd
|
||||
Requires: ruby >= 2.2.0
|
||||
Requires: rubygem-backports
|
||||
@ -119,6 +105,9 @@ Requires: rubygem-open4
|
||||
Requires: rubygem-rack
|
||||
Requires: rubygem-rack-protection
|
||||
Requires: rubygem-rack-test
|
||||
Requires: rubygem(rexml)
|
||||
Requires: rubygem(webrick)
|
||||
Requires: rubygem-tilt
|
||||
Requires: rubygem-sinatra
|
||||
# ruby and gems for pcsd-ruby
|
||||
Requires: rubygem-daemons
|
||||
@ -146,9 +135,11 @@ 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}
|
||||
Provides: bundled(ember) = %{ember_version}
|
||||
Provides: bundled(handlebars) = %{handlebars_version}
|
||||
Provides: bundled(jquery) = %{jquery_version}
|
||||
Provides: bundled(jquery-ui) = %{jquery_ui_version}
|
||||
|
||||
%description
|
||||
pcs is a corosync and pacemaker configuration tool. It permits users to
|
||||
@ -212,40 +203,23 @@ update_times_patch(){
|
||||
# update_times_patch %%{PATCH0}
|
||||
|
||||
# prepare dirs/files necessary for building web ui
|
||||
# inside SOURCE6 is only directory %%{ui_src_name}
|
||||
tar -xzf %SOURCE6 -C %{pcsd_public_dir}
|
||||
tar -xf %SOURCE7 -C %{pcsd_public_dir}/%{ui_src_name}
|
||||
# inside SOURCE3 is only directory %%{ui_src_name}
|
||||
tar -xzf %SOURCE3 -C %{pcsd_public_dir}
|
||||
tar -xf %SOURCE4 -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 %SOURCE2 %{rubygem_cache_dir}
|
||||
|
||||
# 3) dir for python bundles
|
||||
# dir for python bundles
|
||||
mkdir -p %{bundled_src_dir}
|
||||
|
||||
# 4) sources for pyagentx
|
||||
tar -xzf %SOURCE3 -C %{bundled_src_dir}
|
||||
# sources for pyagentx
|
||||
tar -xzf %SOURCE1 -C %{bundled_src_dir}
|
||||
mv %{bundled_src_dir}/pyagentx-%{pyagentx_version} %{bundled_src_dir}/pyagentx
|
||||
update_times %SOURCE3 `find %{bundled_src_dir}/pyagentx -follow`
|
||||
update_times %SOURCE1 `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
|
||||
|
||||
# 5) sources for tornado
|
||||
tar -xzf %SOURCE4 -C %{bundled_src_dir}
|
||||
mv %{bundled_src_dir}/tornado-%{tornado_version} %{bundled_src_dir}/tornado
|
||||
update_times %SOURCE4 `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 %SOURCE5 -C %{bundled_src_dir}
|
||||
# sources for python dacite
|
||||
tar -xzf %SOURCE2 -C %{bundled_src_dir}
|
||||
mv %{bundled_src_dir}/dacite-%{dacite_version} %{bundled_src_dir}/dacite
|
||||
cp %{bundled_src_dir}/dacite/LICENSE dacite_LICENSE
|
||||
cp %{bundled_src_dir}/dacite/README.md dacite_README.md
|
||||
@ -257,21 +231,13 @@ 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
|
||||
rm -r %{pcsd_public_dir}/%{ui_src_name}
|
||||
|
||||
# main pcs install
|
||||
make install \
|
||||
DESTDIR=$RPM_BUILD_ROOT \
|
||||
%make_install \
|
||||
PREFIX=%{_prefix} \
|
||||
SYSTEMD_UNIT_DIR=%{_unitdir} \
|
||||
LIB_DIR=%{pcs_libdir} \
|
||||
@ -279,7 +245,6 @@ make install \
|
||||
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 \
|
||||
@ -287,15 +252,6 @@ 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}
|
||||
|
||||
%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
|
||||
@ -313,8 +269,7 @@ run_all_tests(){
|
||||
# disabled tests:
|
||||
#
|
||||
BUNDLED_LIB_LOCATION=$RPM_BUILD_ROOT%{pcs_libdir}/pcs/bundled/packages \
|
||||
%{__python3} pcs_test/suite.py -v --vanilla \
|
||||
--all-but \
|
||||
%{__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 \
|
||||
|
||||
@ -377,9 +332,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
|
||||
@ -388,8 +341,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
|
||||
@ -435,6 +386,9 @@ remove_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Thu Mar 10 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 0.10.8-1
|
||||
- update to 0.10.8
|
||||
|
||||
* Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 0.10.5-1
|
||||
- Upgrade the pcs package version to 0.10.5-1
|
||||
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
BUNDLE_FROZEN: '1'
|
||||
BUNDLE_PATH: vendor/bundle
|
||||
BUNDLE_DISABLE_SHARED_GEMS: '1'
|
||||
BUNDLE_BUILD: --with-ldflags="-Wl,-z,now -Wl,-z,relro"
|
||||
BIN
tilt-2.0.9.gem
BIN
tilt-2.0.9.gem
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user