Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui - Removed old web gui
This commit is contained in:
parent
183fef8a1e
commit
f8c8ea2492
3
.gitignore
vendored
3
.gitignore
vendored
@ -94,3 +94,6 @@
|
||||
/pcs-0.10.11.tar.gz
|
||||
/pcs-web-ui-0.1.9.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.9.tar.xz
|
||||
/pcs-web-ui-0.1.12.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.12.tar.xz
|
||||
/pcs-0.11.2.tar.gz
|
||||
|
23
fix-backend-parameter-all-in-cluster-destroy.patch
Normal file
23
fix-backend-parameter-all-in-cluster-destroy.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From fa75f40361bc39cbd645b8014713e4c0ad0cda18 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Devat <idevat@redhat.com>
|
||||
Date: Mon, 24 Jan 2022 14:08:54 +0100
|
||||
Subject: [PATCH 2/2] fix backend parameter "all" in cluster destroy
|
||||
|
||||
---
|
||||
src/app/backend/calls/destroyCluster.ts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/app/backend/calls/destroyCluster.ts b/src/app/backend/calls/destroyCluster.ts
|
||||
index b6e83a41..cf41ea42 100644
|
||||
--- a/src/app/backend/calls/destroyCluster.ts
|
||||
+++ b/src/app/backend/calls/destroyCluster.ts
|
||||
@@ -4,5 +4,5 @@ const { url } = endpoints.destroyCluster;
|
||||
|
||||
export const destroyCluster = (clusterName: string): CallResult =>
|
||||
http.post(url({ clusterName }), {
|
||||
- params: [["--all", "1"]],
|
||||
+ params: [["all", "1"]],
|
||||
});
|
||||
--
|
||||
2.34.1
|
||||
|
92
pcs.spec
92
pcs.spec
@ -1,6 +1,6 @@
|
||||
Name: pcs
|
||||
Version: 0.10.11
|
||||
Release: 3%{?dist}
|
||||
Version: 0.11.2
|
||||
Release: 1%{?dist}
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPLv2: pcs
|
||||
@ -17,8 +17,8 @@ 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.9
|
||||
%global ui_modules_version 0.1.9
|
||||
%global ui_commit 0.1.12
|
||||
%global ui_modules_version 0.1.12
|
||||
%global ui_src_name pcs-web-ui-%{ui_commit}
|
||||
|
||||
%global pcs_snmp_pkg_name pcs-snmp
|
||||
@ -28,11 +28,7 @@ Summary: Pacemaker Configuration System
|
||||
|
||||
%global version_rubygem_thin 1.8.1
|
||||
|
||||
# javascript bundled libraries for old web-ui
|
||||
%global ember_version 1.4.0
|
||||
%global handlebars_version 1.2.1
|
||||
%global jquery_ui_version 1.12.1
|
||||
%global jquery_version 3.6.0
|
||||
%global required_pacemaker_version 2.1.0
|
||||
|
||||
%global pcs_bundled_dir pcs_bundled
|
||||
%global pcsd_public_dir pcsd/public
|
||||
@ -51,15 +47,21 @@ Source88: https://rubygems.org/downloads/thin-%{version_rubygem_thin}.gem
|
||||
Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
|
||||
Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
|
||||
|
||||
# pcs patches: <= 200
|
||||
# Patch0: name.patch
|
||||
|
||||
# ui patches: >200
|
||||
# Patch201: name.patch
|
||||
Patch201: simplify-ternar-expression.patch
|
||||
Patch202: fix-backend-parameter-all-in-cluster-destroy.patch
|
||||
|
||||
# git for patches
|
||||
BuildRequires: git-core
|
||||
BuildRequires: make
|
||||
#printf from coreutils is used in makefile
|
||||
BuildRequires: coreutils
|
||||
# python for pcs
|
||||
BuildRequires: python3 >= 3.6
|
||||
BuildRequires: python3 >= 3.9
|
||||
BuildRequires: python3-dateutil >= 2.7.0
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -75,7 +77,7 @@ BuildRequires: python3-wheel
|
||||
BuildRequires: python3-setuptools_scm
|
||||
BuildRequires: python3-distro
|
||||
# ruby and gems for pcsd
|
||||
BuildRequires: ruby >= 2.2.0
|
||||
BuildRequires: ruby >= 2.5.0
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: rubygem-backports
|
||||
BuildRequires: rubygem-daemons
|
||||
@ -102,15 +104,10 @@ BuildRequires: rubygems
|
||||
BuildRequires: rubygem-bundler
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: openssl
|
||||
# for touching patch files (sanitization function)
|
||||
BuildRequires: diffstat
|
||||
# for post, preun and postun macros
|
||||
BuildRequires: systemd
|
||||
# pcsd fonts and font management tools for creating symlinks to fonts
|
||||
BuildRequires: fontconfig
|
||||
BuildRequires: liberation-sans-fonts
|
||||
BuildRequires: overpass-fonts
|
||||
|
||||
# for building web ui
|
||||
BuildRequires: npm
|
||||
@ -120,12 +117,12 @@ BuildRequires: booth
|
||||
BuildRequires: corosync-qdevice-devel
|
||||
BuildRequires: corosynclib-devel >= 3.0
|
||||
BuildRequires: fence-agents-common
|
||||
BuildRequires: pacemaker-libs-devel >= 2.0.0
|
||||
BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version}
|
||||
BuildRequires: resource-agents
|
||||
BuildRequires: sbd
|
||||
|
||||
# python and libraries for pcs, setuptools for pcs entrypoint
|
||||
Requires: python3 >= 3.6
|
||||
Requires: python3 >= 3.9
|
||||
Requires: python3-cryptography
|
||||
Requires: python3-dateutil >= 2.7.0
|
||||
Requires: python3-lxml
|
||||
@ -134,7 +131,7 @@ Requires: python3-pycurl
|
||||
Requires: python3-pyparsing
|
||||
Requires: python3-tornado
|
||||
# ruby and gems for pcsd
|
||||
Requires: ruby >= 2.2.0
|
||||
Requires: ruby >= 2.5.0
|
||||
Requires: rubygem-backports
|
||||
Requires: rubygem-daemons
|
||||
Requires: rubygem-ethon
|
||||
@ -156,12 +153,12 @@ Requires: rubygem(webrick)
|
||||
# for killall
|
||||
Requires: psmisc
|
||||
# cluster stack and related packages
|
||||
Requires: pcmk-cluster-manager >= 2.0.0
|
||||
Requires: pcmk-cluster-manager >= %{required_pacemaker_version}
|
||||
Suggests: pacemaker
|
||||
Requires: (corosync >= 2.99 if pacemaker)
|
||||
Requires: (corosync >= 3.0 if pacemaker)
|
||||
# pcs enables corosync encryption by default so we require libknet1-plugins-all
|
||||
Requires: (libknet1-plugins-all if corosync)
|
||||
Requires: pacemaker-cli >= 2.0.0
|
||||
Requires: pacemaker-cli >= %{required_pacemaker_version}
|
||||
# for post, preun and postun macros
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
@ -169,21 +166,12 @@ Requires(postun): systemd
|
||||
# pam is used for authentication inside daemon (python ctypes)
|
||||
# more details: https://bugzilla.redhat.com/show_bug.cgi?id=1717113
|
||||
Requires: pam
|
||||
# pcsd fonts
|
||||
Requires: liberation-sans-fonts
|
||||
Requires: overpass-fonts
|
||||
# needs logrotate for /etc/logrotate.d/pcsd
|
||||
Requires: logrotate
|
||||
|
||||
Provides: bundled(dacite) = %{dacite_version}
|
||||
# bundled rubygems
|
||||
Provides: bundled(thin) = %{version_rubygem_thin}
|
||||
# javascript bundled libraries for old web-ui
|
||||
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
|
||||
easily view, modify and create pacemaker based clusters.
|
||||
@ -211,7 +199,6 @@ Provides: bundled(pyagentx) = %{pyagentx_version}
|
||||
SNMP agent that provides information about pacemaker cluster to the master agent (snmpd)
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -S git -n %{pcs_source_name}
|
||||
|
||||
# -- following is inspired by python-simplejon.el5 --
|
||||
# Update timestamps on the files touched by a patch, to avoid non-equal
|
||||
@ -252,12 +239,20 @@ update_times_patch(){
|
||||
update_times ${patch_file_name} `diffstat -p1 -l ${patch_file_name}`
|
||||
}
|
||||
|
||||
# update_times_patch %{PATCH0}
|
||||
# documentation for setup/autosetup/autopatch:
|
||||
# * http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
||||
# * https://rpm-software-management.github.io/rpm/manual/autosetup.html
|
||||
# patch web-ui sources
|
||||
%autosetup -D -T -b 100 -a 101 -S git -n %{ui_src_name} -N
|
||||
%autopatch -p1 -m 201
|
||||
# update_times_patch %%{PATCH201}
|
||||
update_times_patch %{PATCH201}
|
||||
update_times_patch %{PATCH202}
|
||||
|
||||
# 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}
|
||||
# patch pcs sources
|
||||
%autosetup -S git -n %{pcs_source_name} -N
|
||||
%autopatch -p1 -M 200
|
||||
# update_times_patch %%{PATCH0}
|
||||
|
||||
# prepare dirs/files necessary for building all bundles
|
||||
# -----------------------------------------------------
|
||||
@ -275,21 +270,23 @@ cp -f %SOURCE42 rpm/
|
||||
%define debug_package %{nil}
|
||||
|
||||
./autogen.sh
|
||||
%{configure} --enable-local-build --enable-use-local-cache-only --enable-individual-bundling PYTHON=%{__python3}
|
||||
%{configure} --enable-local-build --enable-use-local-cache-only --enable-individual-bundling PYTHON=%{__python3} ruby_CFLAGS="%{optflags}" ruby_LIBS="%{build_ldflags}"
|
||||
make all
|
||||
|
||||
# build pcs-web-ui
|
||||
make -C %{_builddir}/%{ui_src_name} build BUILD_USE_EXISTING_NODE_MODULES=true
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
pwd
|
||||
|
||||
%make_install
|
||||
|
||||
# build web ui and put it to pcsd
|
||||
make -C %{pcsd_public_dir}/%{ui_src_name} build BUILD_USE_EXISTING_NODE_MODULES=true
|
||||
mv %{pcsd_public_dir}/%{ui_src_name}/build ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/ui
|
||||
rm -r %{pcsd_public_dir}/%{ui_src_name}
|
||||
# install pcs-web-ui
|
||||
cp -r %{_builddir}/%{ui_src_name}/build ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/ui
|
||||
|
||||
# symlink favicon into pcsd directories
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/images/
|
||||
ln -fs /etc/favicon.png ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/images/favicon.png
|
||||
|
||||
# prepare license files
|
||||
@ -351,13 +348,7 @@ run_all_tests(){
|
||||
return $test_result_ruby
|
||||
}
|
||||
|
||||
remove_all_tests() {
|
||||
# remove javascript testing files
|
||||
rm -r -v $RPM_BUILD_ROOT%{_libdir}/%{pcsd_public_dir}/js/dev
|
||||
}
|
||||
|
||||
run_all_tests
|
||||
remove_all_tests
|
||||
|
||||
%posttrans
|
||||
# Make sure the new version of the daemon is runnning.
|
||||
@ -434,6 +425,11 @@ remove_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Fri Feb 04 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.2-1
|
||||
- Rebased to latest upstream sources (see CHANGELOG.md)
|
||||
- Updated pcs-web-ui
|
||||
- Removed old web gui
|
||||
|
||||
* Thu Jan 27 2022 Vít Ondruch <vondruch@redhat.com> - 0.10.11-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.1
|
||||
|
||||
|
26
simplify-ternar-expression.patch
Normal file
26
simplify-ternar-expression.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From f44cdc871a39da3960bd04565b4d1d5ffa19bd23 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Devat <idevat@redhat.com>
|
||||
Date: Thu, 20 Jan 2022 13:32:49 +0100
|
||||
Subject: [PATCH 1/2] simplify ternar expression
|
||||
|
||||
The motivation for this is that covscan complains about it.
|
||||
---
|
||||
src/app/view/share/useUrlTabs.ts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/app/view/share/useUrlTabs.ts b/src/app/view/share/useUrlTabs.ts
|
||||
index 7278dad8..a1136bf3 100644
|
||||
--- a/src/app/view/share/useUrlTabs.ts
|
||||
+++ b/src/app/view/share/useUrlTabs.ts
|
||||
@@ -13,7 +13,7 @@ export const useUrlTabs = <TABS extends ReadonlyArray<string>>(
|
||||
|
||||
return {
|
||||
currentTab,
|
||||
- matchedContext: tab !== null ? tab.matched : `/${defaultTab}`,
|
||||
+ matchedContext: tab?.matched ?? `/${defaultTab}`,
|
||||
tabList,
|
||||
};
|
||||
};
|
||||
--
|
||||
2.34.1
|
||||
|
6
sources
6
sources
@ -1,6 +1,6 @@
|
||||
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
|
||||
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
|
||||
SHA512 (thin-1.8.1.gem) = c200ea03b7876b2a17b5875557fa967b8d01db20cc401811f314f3285f8249b8793e4709b7bc033a9c5813b9a51e3093c55f717b4a98b8fda171aa82813b7419
|
||||
SHA512 (pcs-0.10.11.tar.gz) = 220dcba99c479a6a7c6d35c7a4c04e46a336c0ff6454da997560c1e9c8fd39f41d16cbcc247502baa9508ac7e6a4cf7357f4d5bfccafc3d36164dbc7334877a4
|
||||
SHA512 (pcs-web-ui-0.1.9.tar.gz) = 6572c9afcc31cac4be89e474e6abb31f0e21ebbc4ebf6cbcff4d391496003b8abbfb44e99752447741b3ca8bab551d55ddd442a7ead94fa44240f9879776fc60
|
||||
SHA512 (pcs-web-ui-node-modules-0.1.9.tar.xz) = de1adaeb0c6e93f9487ccfa20f6c517d71d0a3d40ede98c09dac2fa4d7f3f1e58eb4d47b598b56e4d07ace5faf157229c53878e095eb0d11806dfa539e90261d
|
||||
SHA512 (pcs-web-ui-0.1.12.tar.gz) = 0c1e3e71ce4cf5a1a39319b379985267642ed36d54bc18c6b0c4c5c9f8cd24e59c4f6137a64ffe704fe22a056960c3a205308dba17060680f3bbd92abe9ab9f4
|
||||
SHA512 (pcs-web-ui-node-modules-0.1.12.tar.xz) = 4f72f5f239613ab93ce1f32126050fae1b1c00ec3b73799a1ace3687c1a35370168ff1b6e070c2b661ece84e3ed4463189453247a2799f20dac1028b0c9b83f6
|
||||
SHA512 (pcs-0.11.2.tar.gz) = 65ba7e1e73c1e0462b2afb1c5321a4c97916b73410ef37fb262e10779b9fd4b7906ac4567bdab632abd6d470b6fc033cca754ba72567b03c07139eb9ad811b97
|
||||
|
@ -37,14 +37,10 @@
|
||||
- fence-agents-ipmilan
|
||||
- fence-agents-scsi
|
||||
- fence-virt
|
||||
- fontconfig
|
||||
- openssl
|
||||
- pcs
|
||||
- pcs-snmp
|
||||
- python3-pip
|
||||
- python3-setuptools_scm
|
||||
- python3-wheel
|
||||
- rubygem-json
|
||||
- rubygem-test-unit
|
||||
- wget
|
||||
required_services:
|
||||
@ -54,12 +50,14 @@
|
||||
- prepare-source:
|
||||
dir: ./
|
||||
run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source"
|
||||
# pcs-web-ui sources are deleted because there are conflicts during move of sources
|
||||
# pcs-web-ui sources aren't needed during testing
|
||||
- flatten-source:
|
||||
dir: ./
|
||||
run: shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
|
||||
run: rm -rf {{tenv_workdir}}/source/pcs-web-ui-*; shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
|
||||
- build_sources:
|
||||
dir: ./source
|
||||
run: "export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/; export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/; ./autogen.sh && ./configure"
|
||||
run: "export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/; export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/; ./autogen.sh && ./configure --enable-tests-only"
|
||||
- remove_sources:
|
||||
dir: ./source
|
||||
run: rm -rfv pcs
|
||||
|
Loading…
Reference in New Issue
Block a user