Resolves: rhbz#1929710

- Bundle rubygem depedencies and python3-tornado
This commit is contained in:
Miroslav Lisik 2021-02-19 14:31:52 +01:00
parent d08a560d49
commit 3b1687aac4
5 changed files with 431 additions and 77 deletions

87
.gitignore vendored
View File

@ -51,31 +51,86 @@
/pcs-0.9.164.tar.gz
/pcs-0.10.0.1.tar.gz
/tornado-5.0.2.tar.gz
/pcs-0.10.0.alpha.1.tar.gz
/sinatra-contrib-2.0.1.gem
/pcs-0.10.0.alpha-1.tar.gz
/sinatra-contrib-2.0.3.gem
/pcs-0.10.0.alpha.1.tar.gz
/pcs-0.10.0.alpha.2.tar.gz
/pcs-0.10.0.alpha.3.tar.gz
/backports-3.11.3.gem
/ethon-0.11.0.gem
/ffi-1.9.25.gem
/json-2.1.0.gem
/multi_json-1.13.1.gem
/mustermann-1.0.2.gem
/open4-1.3.4.gem
/rack-protection-2.0.3.gem
/rack-test-1.0.0.gem
/rack-2.0.5.gem
/sinatra-2.0.3.gem
/tilt-2.0.8.gem
/pcs-0.10.0.alpha.4.tar.gz
/pcs-0.10.0.alpha.5.tar.gz
/pcs-0.10.0.alpha.6.tar.gz
/pcs-0.10.0.alpha.7.tar.gz
/pcs-0.10.0.tar.gz
/backports-3.11.4.gem
/mustermann-1.0.3.gem
/rack-2.0.6.gem
/rack-protection-2.0.4.gem
/sinatra-2.0.4.gem
/pcs-0.10.1.tar.gz
/pcs-5e01391bcf0bad88e1d72c63697d526038fef26e.tar.gz
/tilt-2.0.9.gem
/open4-1.3.4-1.gem
/pcsd-bundle-config-2
/pcs-web-ui-07f3b26262bbe96813a350d93cc27e3525223eef.tar.gz
/pcs-web-ui-node_modules-alpha.1.xz
/pcs-f556c4adb538c8a95d763472d370f3f5d27eb38a.tar.gz
/pcs-web-ui-69135120176e3c023b00eb8ba7bec59244d9bab1.tar.gz
/pcs-web-ui-node-modules-69135120176e3c023b00eb8ba7bec59244d9bab1.tar.xz
/pcs-web-ui-0.1.0.tar.gz
/pcs-web-ui-node-modules-0.1.0.tar.xz
/pcs-0.10.2.tar.gz
/pcs-web-ui-0.1.1.tar.gz
/pcs-web-ui-node-modules-0.1.1.tar.xz
/pcs-0.10.3.tar.gz
/tornado-6.0.3.tar.gz
/pcs-0.10.4.tar.gz
/pcs-0.10.5.tar.gz
/pcs-web-ui-0.1.2.tar.gz
/pcs-web-ui-node-modules-0.1.2.tar.xz
/tilt-2.0.9.gem
/dacite-1.1.0.tar.gz
/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-0.1.1.tar.gz
/pcs-web-ui-node-modules-0.1.1.tar.xz
/pcs-d96ad5b8d917d9cf3f6daf1e6b67bf7e27938e5f.tar.gz
/tornado-6.0.3.tar.gz
/pcs-5c3f35d2819b0e8be0dcbe0ee8f81b9b24b20b54.tar.gz
/pcs-0.10.4.tar.gz
/daemons-1.3.1.gem
/eventmachine-1.2.7.gem
/thin-1.7.2.gem
/pcs-web-ui-node-modules-0.1.3.tar.xz
/pcs-0.10.7.tar.gz
/pcs-web-ui-0.1.3.tar.gz
/dacite-1.5.0.tar.gz
/dataclasses-0.6.tar.gz
/tornado-6.0.4.tar.gz
/ethon-0.12.0.gem
/ffi-1.13.1.gem
/json-2.3.0.gem
/mustermann-1.1.1.gem
/rack-2.2.2.gem
/rack-protection-2.0.8.1.gem
/rack-test-1.1.0.gem
/ruby2_keywords-0.0.2.gem
/sinatra-2.0.8.1.gem
/tilt-2.0.10.gem
/backports-3.17.2.gem
/pcs-0.10.6.tar.gz
/rack-2.2.3.gem
/pcs-web-ui-0.1.4.tar.gz
/pcs-cdf5be5820446b5a96918f7e67800fa7e5396be3.tar.gz
/python-dateutil-2.8.1.tar.gz
/pcs-0b18207c3ba28d10d07ac64fe252ece46e3ef637.tar.gz
/tornado-6.1.0.tar.gz
/pcs-244ef24984089bed0406b1d69e48298183092402.tar.gz
/dacite-1.6.0.tar.gz
/pcs-0.10.8.tar.gz
/dataclasses-0.8.tar.gz
/pcs-web-ui-0.1.5.tar.gz
/pcs-web-ui-node-modules-0.1.5.tar.xz
/pcs-0.10.8.tar.gz
/rexml-3.2.4.gem
/webrick-1.7.0.gem

BIN
HAM-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,53 @@
From ab9fd9f223e805247319ac5a7318c15417197a0a Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH] do not support cluster setup with udp(u) transport
---
pcs/pcs.8 | 2 ++
pcs/usage.py | 1 +
pcsd/public/css/style.css | 3 +++
3 files changed, 6 insertions(+)
diff --git a/pcs/pcs.8 b/pcs/pcs.8
index edfdd039..8caf087f 100644
--- a/pcs/pcs.8
+++ b/pcs/pcs.8
@@ -424,6 +424,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
Transports udp and udpu:
.br
+WARNING: These transports are not supported in RHEL 8.
+.br
These transports are limited to one address per node. They do not support traffic encryption nor compression.
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index baedb347..f576eaf2 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -852,6 +852,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:
+ WARNING: These transports are not supported in RHEL 8.
These transports are limited to one address per node. They do not
support traffic encryption nor compression.
Transport options are:
diff --git a/pcsd/public/css/style.css b/pcsd/public/css/style.css
index b857cbae..b8d48d92 100644
--- a/pcsd/public/css/style.css
+++ b/pcsd/public/css/style.css
@@ -949,6 +949,9 @@ table.args-table td.reg {
width: 6ch;
text-align: right;
}
+#csetup-transport .transport-types {
+ display: none;
+}
#csetup-transport-options.udp .knet-only,
#csetup-transport-options.knet .without-knet
{
--
2.26.2

341
pcs.spec
View File

@ -1,31 +1,61 @@
Name: pcs
Version: 0.10.8
Release: 1%{?dist}
Release: 2%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# MIT: ember, handlebars, jquery, jquery-ui
License: GPLv2 and MIT
# ASL 2.0: tornado
# MIT: backports, dacite, daemons, ember, ethon, handlebars, jquery, jquery-ui,
# mustermann, rack, rack-protection, rack-test, sinatra, tilt
# GPLv2 or Ruby: eventmachne, json
# (GPLv2 or Ruby) and BSD: thin
# BSD or Ruby: open4, rexml, ruby2_keywords, webrick
# BSD and MIT: ffi
License: GPLv2 and ASL 2.0 and MIT and BSD and (GPLv2 or Ruby) and (BSD or Ruby)
URL: https://github.com/ClusterLabs/pcs
Group: System Environment/Base
Summary: Pacemaker Configuration System
#building only for architectures with pacemaker and corosync available
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_or_commit %{version}
# %%global version_or_commit 67591ed1487cb0aefa181fdfc166c8a66b55d25a
# %%global version_or_commit 508b3999eb02b4901e83b8e780af8422b522ad30
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.5
%global ui_modules_version 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.1.0
%global dacite_version 1.6.0
%global version_rubygem_backports 3.17.2
%global version_rubygem_daemons 1.3.1
%global version_rubygem_ethon 0.12.0
%global version_rubygem_eventmachine 1.2.7
%global version_rubygem_ffi 1.13.1
%global version_rubygem_json 2.3.0
%global version_rubygem_mustermann 1.1.1
%global version_rubygem_open4 1.3.4
%global version_rubygem_rack 2.2.3
%global version_rubygem_rack_protection 2.0.8.1
%global version_rubygem_rack_test 1.1.0
%global version_rubygem_rexml 3.2.4
%global version_rubygem_ruby2_keywords 0.0.2
%global version_rubygem_sinatra 2.0.8.1
%global version_rubygem_thin 1.7.2
%global version_rubygem_tilt 2.0.10
%global version_rubygem_webrick 1.7.0
# bundled libraries for old web-ui
# javascript 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
%global jquery_ui_version 1.10.1
%global jquery_version 1.9.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
@ -36,21 +66,67 @@ 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
# mangling shebang in /usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/test from /usr/bin/env ruby to #!/usr/bin/ruby
#*** ERROR: ./usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/test.ru has shebang which doesn't start with '/' (../../bin/rackup)
#mangling shebang in /usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/rackup_stub.rb from /usr/bin/env ruby to #!/usr/bin/ruby
#*** WARNING: ./usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/sample_rackup.ru is executable but has empty or no shebang, removing executable bit
#*** WARNING: ./usr/lib/pcsd/vendor/bundle/ruby/gems/rack-2.0.5/test/cgi/lighttpd.conf is executable but has empty or no shebang, removing executable bit
#*** ERROR: ambiguous python shebang in /usr/lib/pcsd/vendor/bundle/ruby/gems/ffi-1.9.25/ext/ffi_c/libffi/generate-darwin-source-and-headers.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
%undefine __brp_mangle_shebangs
# 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: HAM-logo.png
Source2: pcsd-bundle-config-2
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
Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_commit}.tar.xz
Source81: https://rubygems.org/downloads/backports-%{version_rubygem_backports}.gem
Source82: https://rubygems.org/downloads/ethon-%{version_rubygem_ethon}.gem
Source83: https://rubygems.org/downloads/ffi-%{version_rubygem_ffi}.gem
Source84: https://rubygems.org/downloads/json-%{version_rubygem_json}.gem
Source86: https://rubygems.org/downloads/mustermann-%{version_rubygem_mustermann}.gem
# We needed to re-upload open4 rubygem because of issues with sources in gating.
# Unfortunately, there was no newer version available, therefore we had to
# change its 'version' ourselves.
Source87: https://rubygems.org/downloads/open4-%{version_rubygem_open4}.gem#/open4-%{version_rubygem_open4}-1.gem
Source88: https://rubygems.org/downloads/rack-%{version_rubygem_rack}.gem
Source89: https://rubygems.org/downloads/rack-protection-%{version_rubygem_rack_protection}.gem
Source90: https://rubygems.org/downloads/rack-test-%{version_rubygem_rack_test}.gem
Source91: https://rubygems.org/downloads/sinatra-%{version_rubygem_sinatra}.gem
Source92: https://rubygems.org/downloads/tilt-%{version_rubygem_tilt}.gem
Source93: https://rubygems.org/downloads/eventmachine-%{version_rubygem_eventmachine}.gem
Source94: https://rubygems.org/downloads/daemons-%{version_rubygem_daemons}.gem
Source95: https://rubygems.org/downloads/thin-%{version_rubygem_thin}.gem
Source96: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_keywords}.gem
Source97: https://rubygems.org/downloads/rexml-%{version_rubygem_rexml}.gem
Source98: https://rubygems.org/downloads/webrick-%{version_rubygem_webrick}.gem
# Patch0: name.patch
Source100: https://github.com/idevat/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
Source101: https://github.com/idevat/pcs-web-ui/releases/download/%{ui_modules_version}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
# Patches from upstream.
# They should come before downstream patches to avoid unnecessary conflicts.
# Z-streams are exception here: they can come from upstream but should be
# applied at the end to keep z-stream changes as straightforward as possible.
# Patch1: bzNUMBER-01-name.patch
# Downstream patches do not come from upstream. They adapt pcs for specific
# RHEL needs.
Patch101: do-not-support-cluster-setup-with-udp-u-transport.patch
# git for patches
BuildRequires: make
BuildRequires: git-core
#printf from coreutils is used in makefile
BuildRequires: coreutils
@ -61,24 +137,13 @@ BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pycurl
BuildRequires: python3-pyparsing
BuildRequires: python3-tornado
# gcc for compiling custom rubygems
BuildRequires: gcc
BuildRequires: gcc-c++
# ruby and gems for pcsd
BuildRequires: ruby >= 2.2.0
BuildRequires: ruby-devel
BuildRequires: rubygem-backports
BuildRequires: rubygem-ethon
BuildRequires: rubygem-ffi
BuildRequires: rubygem-io-console
BuildRequires: rubygem-json
BuildRequires: rubygem-open4
BuildRequires: rubygem-rack
BuildRequires: rubygem-rack-protection
BuildRequires: rubygem-rack-test
%if 0%{?fedora} >= 34 || 0%{?eln} || 0%{?rhel} >= 9
BuildRequires: rubygem(rexml)
%endif
BuildRequires: rubygem-sinatra
BuildRequires: rubygem-tilt
BuildRequires: rubygems
# ruby libraries for tests
BuildRequires: rubygem-test-unit
# for touching patch files (sanitization function)
@ -91,7 +156,10 @@ BuildRequires: python3-pyOpenSSL
# pcsd fonts and font management tools for creating symlinks to fonts
BuildRequires: fontconfig
BuildRequires: liberation-sans-fonts
BuildRequires: make
BuildRequires: overpass-fonts
# Red Hat logo for creating symlink of favicon
BuildRequires: redhat-logos
# for building web ui
BuildRequires: npm
@ -103,33 +171,16 @@ Requires: python3-lxml
Requires: python3-setuptools
Requires: python3-pycurl
Requires: python3-pyparsing
Requires: python3-tornado
# ruby and gems for pcsd
Requires: ruby >= 2.2.0
Requires: rubygem-backports
Requires: rubygem-ethon
Requires: rubygem-ffi
Requires: rubygem-json
Requires: rubygem-open4
Requires: rubygem-rack
Requires: rubygem-rack-protection
Requires: rubygem-rack-test
%if 0%{?fedora} >= 34 || 0%{?eln} || 0%{?rhel} >= 9
Requires: rubygem(rexml)
Requires: rubygem(webrick)
%endif
Requires: rubygem-sinatra
Requires: rubygem-tilt
# ruby and gems for pcsd-ruby
Requires: rubygem-daemons
Requires: rubygem-eventmachine
Requires: rubygem-thin
Requires: rubygems
# for killall
Requires: psmisc
# for working with certificates (validation etc.)
Requires: openssl
Requires: python3-pyOpenSSL
# cluster stack and related packages
Requires: pcmk-cluster-manager >= 2.0.0
Suggests: pacemaker
Requires: (corosync >= 2.99 if pacemaker)
# pcs enables corosync encryption by default so we require libknet1-plugins-all
@ -145,8 +196,32 @@ Requires: pam
# pcsd fonts
Requires: liberation-sans-fonts
Requires: overpass-fonts
# favicon Red Hat logo
Requires: redhat-logos
# needs logrotate for /etc/logrotate.d/pcsd
Requires: logrotate
Provides: bundled(tornado) = %{tornado_version}
Provides: bundled(dacite) = %{dacite_version}
Provides: bundled(backports) = %{version_rubygem_backports}
Provides: bundled(daemons) = %{version_rubygem_daemons}
Provides: bundled(ethon) = %{version_rubygem_ethon}
Provides: bundled(eventmachine) = %{version_rubygem_eventmachine}
Provides: bundled(ffi) = %{version_rubygem_ffi}
Provides: bundled(json) = %{version_rubygem_json}
Provides: bundled(mustermann) = %{version_rubygem_mustermann}
Provides: bundled(open4) = %{version_rubygem_open4}
Provides: bundled(rack) = %{version_rubygem_rack}
Provides: bundled(rack_protection) = %{version_rubygem_rack_protection}
Provides: bundled(rack_test) = %{version_rubygem_rack_test}
Provides: bundled(rexml) = %{version_rubygem_rexml}
Provides: bundled(ruby2_keywords) = %{version_rubygem_ruby2_keywords}
Provides: bundled(sinatra) = %{version_rubygem_sinatra}
Provides: bundled(thin) = %{version_rubygem_thin}
Provides: bundled(tilt) = %{version_rubygem_tilt}
Provides: bundled(webrick) = %{version_rubygem_webrick}
# javascript bundled libraries for old web-ui
Provides: bundled(ember) = %{ember_version}
Provides: bundled(handlebars) = %{handlebars_version}
Provides: bundled(jquery) = %{jquery_version}
@ -158,6 +233,7 @@ easily view, modify and create pacemaker based clusters.
# pcs-snmp package definition
%package -n %{pcs_snmp_pkg_name}
Group: System Environment/Base
Summary: Pacemaker cluster SNMP agent
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
@ -196,7 +272,11 @@ update_times(){
unset file_list[0]
for fname in ${file_list[@]}; do
touch -r $reference_file $fname
# some files could be deleted by a patch therefore we test file for
# existance before touch to avoid exit with error: No such file or
# directory
# diffstat cannot create list of files without deleted files
test -e $fname && touch -r $reference_file $fname
done
}
@ -215,13 +295,44 @@ update_times_patch(){
update_times ${patch_file_name} `diffstat -p1 -l ${patch_file_name}`
}
# update_times_patch %%{PATCH0}
# update_times_patch %%{PATCH1}
update_times_patch %{PATCH101}
cp -f %SOURCE1 pcsd/public/images
# prepare dirs/files necessary for building web ui
# inside SOURCE100 is only directory %%{ui_src_name}
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 %SOURCE2 pcsd/.bundle/config
# 2) rubygems sources
mkdir -p pcsd/vendor/cache
cp -f %SOURCE81 pcsd/vendor/cache
cp -f %SOURCE82 pcsd/vendor/cache
cp -f %SOURCE83 pcsd/vendor/cache
cp -f %SOURCE84 pcsd/vendor/cache
cp -f %SOURCE86 pcsd/vendor/cache
# For reason why we are renaming open4 rubygem, see comment of source
# definition above.
cp -f %SOURCE87 pcsd/vendor/cache/open4-%{version_rubygem_open4}.gem
cp -f %SOURCE88 pcsd/vendor/cache
cp -f %SOURCE89 pcsd/vendor/cache
cp -f %SOURCE90 pcsd/vendor/cache
cp -f %SOURCE91 pcsd/vendor/cache
cp -f %SOURCE92 pcsd/vendor/cache
cp -f %SOURCE93 pcsd/vendor/cache
cp -f %SOURCE94 pcsd/vendor/cache
cp -f %SOURCE95 pcsd/vendor/cache
cp -f %SOURCE96 pcsd/vendor/cache
cp -f %SOURCE97 pcsd/vendor/cache
cp -f %SOURCE98 pcsd/vendor/cache
# 3) dir for python bundles
mkdir -p %{bundled_src_dir}
@ -233,9 +344,17 @@ 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
update_times %SOURCE44 `find %{bundled_src_dir}/dacite -follow`
cp %{bundled_src_dir}/dacite/LICENSE dacite_LICENSE
cp %{bundled_src_dir}/dacite/README.md dacite_README.md
@ -246,6 +365,57 @@ 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}
# The '-g' cflags option is needed for generation of MiniDebugInfo for shared
# libraries from rubygem extensions
# Currently used rubygems with extensions: eventmachine, ffi, json, thin
# There was rpmdiff issue with missing .gnu_debugdata section
# see https://docs.engineering.redhat.com/display/HTD/rpmdiff-elf-stripping
gem install \
--force --verbose --no-document -l --no-user-install \
-i %{rubygem_bundle_dir} \
%{rubygem_cache_dir}/backports-%{version_rubygem_backports}.gem \
%{rubygem_cache_dir}/daemons-%{version_rubygem_daemons}.gem \
%{rubygem_cache_dir}/ethon-%{version_rubygem_ethon}.gem \
%{rubygem_cache_dir}/eventmachine-%{version_rubygem_eventmachine}.gem \
%{rubygem_cache_dir}/ffi-%{version_rubygem_ffi}.gem \
%{rubygem_cache_dir}/json-%{version_rubygem_json}.gem \
%{rubygem_cache_dir}/mustermann-%{version_rubygem_mustermann}.gem \
%{rubygem_cache_dir}/open4-%{version_rubygem_open4}.gem \
%{rubygem_cache_dir}/rack-protection-%{version_rubygem_rack_protection}.gem \
%{rubygem_cache_dir}/rack-test-%{version_rubygem_rack_test}.gem \
%{rubygem_cache_dir}/rack-%{version_rubygem_rack}.gem \
%{rubygem_cache_dir}/rexml-%{version_rubygem_rexml}.gem \
%{rubygem_cache_dir}/ruby2_keywords-%{version_rubygem_ruby2_keywords}.gem \
%{rubygem_cache_dir}/sinatra-%{version_rubygem_sinatra}.gem \
%{rubygem_cache_dir}/thin-%{version_rubygem_thin}.gem \
%{rubygem_cache_dir}/tilt-%{version_rubygem_tilt}.gem \
%{rubygem_cache_dir}/webrick-%{version_rubygem_webrick}.gem \
-- '--with-ldflags=%{build_ldflags}' \
'--with-cflags=%{optflags}'
# prepare license files
# some rubygems do not have a license file (ruby2_keywords, thin)
mv %{rubygem_bundle_dir}/gems/backports-%{version_rubygem_backports}/LICENSE.txt backports_LICENSE.txt
mv %{rubygem_bundle_dir}/gems/daemons-%{version_rubygem_daemons}/LICENSE daemons_LICENSE
mv %{rubygem_bundle_dir}/gems/ethon-%{version_rubygem_ethon}/LICENSE ethon_LICENSE
mv %{rubygem_bundle_dir}/gems/eventmachine-%{version_rubygem_eventmachine}/LICENSE eventmachine_LICENSE
mv %{rubygem_bundle_dir}/gems/eventmachine-%{version_rubygem_eventmachine}/GNU eventmachine_GNU
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/COPYING ffi_COPYING
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE ffi_LICENSE
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE.SPECS ffi_LICENSE.SPECS
mv %{rubygem_bundle_dir}/gems/json-%{version_rubygem_json}/LICENSE json_LICENSE
mv %{rubygem_bundle_dir}/gems/mustermann-%{version_rubygem_mustermann}/LICENSE mustermann_LICENSE
mv %{rubygem_bundle_dir}/gems/open4-%{version_rubygem_open4}/LICENSE open4_LICENSE
mv %{rubygem_bundle_dir}/gems/rack-%{version_rubygem_rack}/MIT-LICENSE rack_MIT-LICENSE
mv %{rubygem_bundle_dir}/gems/rexml-%{version_rubygem_rexml}/LICENSE.txt rexml_LICENSE.txt
mv %{rubygem_bundle_dir}/gems/rack-protection-%{version_rubygem_rack_protection}/License rack-protection_License
mv %{rubygem_bundle_dir}/gems/rack-test-%{version_rubygem_rack_test}/MIT-LICENSE.txt rack-test_MIT-LICENSE.txt
mv %{rubygem_bundle_dir}/gems/sinatra-%{version_rubygem_sinatra}/LICENSE sinatra_LICENSE
mv %{rubygem_bundle_dir}/gems/tilt-%{version_rubygem_tilt}/COPYING tilt_COPYING
mv %{rubygem_bundle_dir}/gems/webrick-%{version_rubygem_webrick}/LICENSE.txt webrick_LICENSE.txt
# 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
@ -260,6 +430,7 @@ 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 \
@ -267,6 +438,29 @@ rm -r %{pcsd_public_dir}/%{ui_src_name}
rubyhdrdir="%{_includedir}" \
includedir="%{_includedir}"
# symlink favicon into pcsd directories
ln -fs /etc/favicon.png ${RPM_BUILD_ROOT}%{pcs_libdir}/%{pcsd_public_dir}/images/favicon.png
#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}
# We are not building debug package for pcs but we need to add MiniDebuginfo
# to the bundled shared libraries from rubygem extensions in order to satisfy
# rpmdiff's binary stripping checker.
# Therefore we call find-debuginfo.sh script manually in order to strip
# binaries and add MiniDebugInfo with .gnu_debugdata section
/usr/lib/rpm/find-debuginfo.sh -j2 -m -i -S debugsourcefiles.list
# find-debuginfo.sh generated some files into /usr/lib/debug and
# /usr/src/debug/ that we don't want in the package
rm -rf $RPM_BUILD_ROOT%{pcs_libdir}/debug
rm -rf $RPM_BUILD_ROOT%{_prefix}/src/debug
# We can remove files required for gem compilation
rm -rf $RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir}/gems/eventmachine-%{version_rubygem_eventmachine}/ext
rm -rf $RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/ext
rm -rf $RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir}/gems/json-%{version_rubygem_json}/ext
rm -rf $RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir}/gems/thin-%{version_rubygem_thin}/ext
%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
@ -283,8 +477,14 @@ run_all_tests(){
# disabled tests:
#
# pcs_test.tier0.lib.commands.test_resource_agent.DescribeAgentUtf8.test_describe
# For an unknown reason this test is failing in mock environment and
# passing outside the mock environment.
# TODO: Investigate the issue
BUNDLED_LIB_LOCATION=$RPM_BUILD_ROOT%{pcs_libdir}/pcs/bundled/packages \
%{__python3} pcs_test/suite.py --tier0 -v --vanilla --all-but \
pcs_test.tier0.lib.commands.test_resource_agent.DescribeAgentUtf8.test_describe \
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 \
@ -292,8 +492,7 @@ run_all_tests(){
#run pcsd tests and remove them
pcsd_dir=$RPM_BUILD_ROOT%{pcs_libdir}/pcsd
# GEM_HOME is not needed anymore since all required gems are in fedora
ruby \
GEM_HOME=$RPM_BUILD_ROOT%{pcs_libdir}/%{rubygem_bundle_dir} ruby \
-I${pcsd_dir} \
-I${pcsd_dir}/test \
${pcsd_dir}/test/test_all_suite.rb
@ -324,6 +523,7 @@ remove_all_tests
%{_bindir}/systemctl daemon-reload
%{_bindir}/systemctl try-restart pcsd.service
%post
%systemd_post pcsd.service
%systemd_post pcsd-ruby.service
@ -348,21 +548,44 @@ 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
# rugygem licenses
%license backports_LICENSE.txt
%license daemons_LICENSE
%license ethon_LICENSE
%license eventmachine_LICENSE
%license eventmachine_GNU
%license ffi_COPYING
%license ffi_LICENSE
%license ffi_LICENSE.SPECS
%license json_LICENSE
%license mustermann_LICENSE
%license open4_LICENSE
%license rack_MIT-LICENSE
%license rack-protection_License
%license rack-test_MIT-LICENSE.txt
%license rexml_LICENSE.txt
%license sinatra_LICENSE
%license tilt_COPYING
%license webrick_LICENSE.txt
%{python3_sitelib}/pcs
%{python3_sitelib}/pcs-%{version}-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*
%{pcs_libdir}/pcs/bundled/packages/dacite*
%{_unitdir}/pcsd.service
%{_unitdir}/pcsd-ruby.service
%{_datadir}/bash-completion/completions/pcs
%{_sharedstatedir}/pcsd
%{_sysconfdir}/pam.d/pcsd
%config(noreplace) %{_sysconfdir}/pam.d/pcsd
%dir %{_var}/log/pcsd
%config(noreplace) %{_sysconfdir}/logrotate.d/pcsd
%config(noreplace) %{_sysconfdir}/sysconfig/pcsd
@ -376,14 +599,14 @@ remove_all_tests
%{_mandir}/man8/pcs.*
%{_mandir}/man8/pcsd.*
%exclude %{pcs_libdir}/pcsd/*.debian
%exclude %{pcs_libdir}/pcsd/pcsd.service
%exclude %{pcs_libdir}/pcsd/pcsd-ruby.service
%exclude %{pcs_libdir}/pcsd/pcsd.conf
%exclude %{pcs_libdir}/pcsd/pcsd.8
%exclude %{pcs_libdir}/pcsd/public/js/dev/*
%exclude %{pcs_libdir}/pcsd/Gemfile
%exclude %{pcs_libdir}/pcsd/Gemfile.lock
%exclude %{pcs_libdir}/pcsd/Makefile
%exclude %{pcs_libdir}/pcsd/pcsd.conf
%exclude %{pcs_libdir}/pcsd/pcsd.service
%exclude %{pcs_libdir}/pcsd/pcsd-ruby.service
%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
@ -402,6 +625,10 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Fri Feb 19 2021 Miroslav Lisik <mlisik@redhat.com> - 0.10.8-2
- Bundle rubygem depedencies and python3-tornado
- Resolves: rhbz#1929710
* Thu Feb 04 2021 Miroslav Lisik <mlisik@redhat.com> - 0.10.8-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui

23
sources
View File

@ -1,5 +1,24 @@
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (open4-1.3.4-1.gem) = 838a18efcd093d55d9589ff9d5c11054618abef863224c2d9b31445dc735218c2f96d954040e2d3f8d5aab0140e54b627fcc4a1b01c17e59267402a2abdd8efb
SHA512 (pcsd-bundle-config-2) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4addf619bc4dc45a98fd48f0f7964b5400e43e84fe96f942a550d2762553fea97e63dc7ad9b8be823
SHA512 (pcs-web-ui-node-modules-0.1.5.tar.xz) = cf1ef7e9280e7a0e864407e15f33edb98dce72e93d6917b74d5833ba184be248d87f6f309a2667bb2cbba0f33d1afde6a706832473505df87ed65835512da82c
SHA512 (pcs-web-ui-0.1.5.tar.gz) = ec4adf8ca5858c1f1f82e8f58e36864805bedc6dc10674fab83498aff5422a0497703ecd96fda17b4c1f6beffa64fe5a80a82fb4f75b2102fe1a4753a5d057e9
SHA512 (daemons-1.3.1.gem) = eede065019b5e251e5b7d0959251c8591ec8c38ada6861a1c41cf85959666a4865efc69178f63bf2acfc1e993c8222d581ac5d689be439744ee3cef0ca6f5138
SHA512 (eventmachine-1.2.7.gem) = fdbcf9fc933e2414e70f8f48153e9ba6ed7a0029cdf49cdcb4ab72ab26683e727a36c099f017f20681f9c361179461743e501278ca9bd5612e693e26867cc516
SHA512 (thin-1.7.2.gem) = e9e0ad3dab77a1c6f3e413ce7ed1598da0db5fa62355a1fbbc73153d2fd810d82d5bf2e6a434429912eb885c263c674364a5dec7d878960e2dbef37ccbe1472b
SHA512 (ethon-0.12.0.gem) = 5fea666efdd5e2d568d0e074f205525656e202ecea3bb5ff8a8ab838a596cab349b869baffb7926227d6cfdae5b9c1cb86bb201b4c9585056c6671ab4feee596
SHA512 (ffi-1.13.1.gem) = 4c0b5086463c5abedc440c44fb12c62612627a2aaad60b1959ea8831d4ec2bbe3217fec0b63612730bb219748fd2bd2252dd615ca0305fb7f0e8456c63c31fbd
SHA512 (json-2.3.0.gem) = 9086a64b664f2d774439c0c9f10c2c1cd897684050eb60f8e3ad9256e0b9541deec3bd22fab0bdcf66e3d5bc795720c6923d514b6edb824c9962fc22f162b332
SHA512 (mustermann-1.1.1.gem) = 55d5fd9b8309e0b806b2fb0af409fbc71b958b8f91116991439f2c66b1f71f17647a61020b0349a86132e7d3da383121719ea330538abb8f3c8bef5fbff0b747
SHA512 (rack-protection-2.0.8.1.gem) = 264aef904d9ae1c38197ad4ad44f1638905bd180fc4bb402c47856c37168059e8e975ca2de5518b1e5cebf79b970024b7d9f5f8b8908880451357dea5e428562
SHA512 (rack-test-1.1.0.gem) = 16e291fa5a88b6866e8057b4bf1aae4ffe17dd9b0300c1ee36632c5b21ff2075cb4356f6f78437dd84ea76047a5d3abe3dda087a2c154f5e5712e62d7e57fdc9
SHA512 (ruby2_keywords-0.0.2.gem) = a7bc02980e073a899bf3de2e32711ca9820657d43cc44dede44ca31681d8586e7f808a93b6f6778aaaaf8b84da37a48c8062e69ca33477d9469e9634d616ed8d
SHA512 (sinatra-2.0.8.1.gem) = a63c8bbf468d059ce1e545c4da72208db34ef677141540b31a24a82537c15bbc020c712b9d9eb49470af45b4ce27f65ab21191ee47ebae7c45b9bbd86600ea3e
SHA512 (tilt-2.0.10.gem) = d2e0e1976da24ea4d8581d29a3ac2c0772c2e42f1cd04c48f1e3c1745a14d7cd319f14cead3e5341ec0f6c07aa216b50c29ad96984a85a9757ff9f7cc89b80df
SHA512 (backports-3.17.2.gem) = e860e4c1784b49e81294ce0bdd27226e28bbec9163398d79206c8dced3324c7625bf75c5ccf09bbcee4cf7bfa96371f37572e6d2d8a22dd2204a441eccd716fb
SHA512 (rack-2.2.3.gem) = aabda2ac4aeea6b119c5d570a6c36b5c114f879cc73678a6f385b71f2191501a86adc3bed6f0e0bacfc1e4c48c2374714588669ede898053dc7719899bf71635
SHA512 (tornado-6.1.0.tar.gz) = bd161a1c30f40f983d608297bca113735cb4baad255de71302a5b4d35be8c02afbc9820728efa912e62e1cbbfad8f92360261a69e0c8759f9e6cb477fbca31c7
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
SHA512 (pcs-0.10.8.tar.gz) = 8b9ba62279431e481d062e804d24480d2a274d2f4897a82149df6116ff3df2394d97a3ee77a6dee4c563d915bab0142124a8942524fcc4e894912086e865353c
SHA512 (pcs-web-ui-0.1.5.tar.gz) = ec4adf8ca5858c1f1f82e8f58e36864805bedc6dc10674fab83498aff5422a0497703ecd96fda17b4c1f6beffa64fe5a80a82fb4f75b2102fe1a4753a5d057e9
SHA512 (pcs-web-ui-node-modules-0.1.5.tar.xz) = cf1ef7e9280e7a0e864407e15f33edb98dce72e93d6917b74d5833ba184be248d87f6f309a2667bb2cbba0f33d1afde6a706832473505df87ed65835512da82c
SHA512 (rexml-3.2.4.gem) = 05cd28b4b4477c306a07e9eccbc226aabea0a8e5497e04ce55a6f4407cd278acdba754561265dc6f57c48d09e0a1d91e757e7bfaba67fd59bbf4d8eecdaa3459
SHA512 (webrick-1.7.0.gem) = 5f242b50300046fe7c22ecd1640a73e5815e05a72bedfebe6bc39c24c92bd61abdd180860de0d194c0eebbc640b507b6892de181d3b577c5372ace0ca6faf2a3