pcs-0.10.17-6

- Rebased to the latest upstream sources (see CHANGELOG.md)
- Remove the preview of the new pcs web interface
  Resolves: RHEL-17280
This commit is contained in:
Michal Pospisil 2023-12-08 16:26:23 +01:00
parent 7591091ec7
commit 96b260a433
6 changed files with 71 additions and 39 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@
/rexml-3.2.6.gem
/tilt-2.3.0.gem
/pcs-bfeff6d16605a7274e7b99bb751e98856e8eae1f.tar.gz
/pcs-1fa11fa39029896939a5545968ed60ede714b992.tar.gz

View File

@ -0,0 +1,55 @@
From ea7c7eea0dab84d8dc37da412f8d18e9b1c32af5 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 5 Dec 2023 15:18:35 +0100
Subject: [PATCH 2/2] disable alternative webui routes
This commit is intended to be downstream only.
The new web ui was part of rhel8 as a technical preview. But new web ui
is now the main in rhel9 and there is no need to keep it in rhel8.
To prevent unnecessary maintenance burden it is disabled now.
No handler code is removed, just routing disabled.
---
pcs/daemon/run.py | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/pcs/daemon/run.py b/pcs/daemon/run.py
index 7fdeda2a..0a6b1b21 100644
--- a/pcs/daemon/run.py
+++ b/pcs/daemon/run.py
@@ -81,16 +81,22 @@ def configure_app(
routes.extend(
# old web ui by default
[(r"/", RedirectHandler, dict(url="/manage"))]
- + [(r"/ui", RedirectHandler, dict(url="/ui/"))]
- + ui.get_routes(
- url_prefix="/ui/",
- app_dir=os.path.join(public_dir, "ui"),
- fallback_page_path=os.path.join(
- public_dir,
- "ui_instructions.html",
- ),
- session_storage=session_storage,
- )
+ # The following disabled routes was for the new web ui. The new
+ # web ui was here as a technical preview. But new web ui is now
+ # the main in rhel9 and there is no need to keep it in rhel8.
+ # To prevent unnecessary maintenance burden it is disabled now.
+ # No handler code is removed, just routing disabled.
+ #
+ # + [(r"/ui", RedirectHandler, dict(url="/ui/"))]
+ # + ui.get_routes(
+ # url_prefix="/ui/",
+ # app_dir=os.path.join(public_dir, "ui"),
+ # fallback_page_path=os.path.join(
+ # public_dir,
+ # "ui_instructions.html",
+ # ),
+ # session_storage=session_storage,
+ # )
+ sinatra_ui.get_routes(
session_storage, ruby_pcsd_wrapper, public_dir
)
--
2.41.0

View File

@ -1,7 +1,7 @@
From bc1db4cec21452a99f1bc07be01704ad11fd58b2 Mon Sep 17 00:00:00 2001
From f6481d591edcd2c0a8c4026c1444bf28374a7eff 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
Subject: [PATCH 1/2] do not support cluster setup with udp(u) transport
---
pcs/pcs.8.in | 2 ++
@ -10,7 +10,7 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport
3 files changed, 6 insertions(+)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index 8712f7b9..ed751933 100644
index d504e8b4..93202d05 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -438,6 +438,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
@ -23,7 +23,7 @@ index 8712f7b9..ed751933 100644
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index 79be6970..a5d02212 100644
index f4b84202..ee10370a 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -1038,6 +1038,7 @@ Commands:

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.10.17
Release: 5%{?dist}
Release: 6%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPL-2.0-only: pcs
@ -22,14 +22,9 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
# When specifying a commit, use its long hash
# %%global version_or_commit %%{version}
%global version_or_commit bfeff6d16605a7274e7b99bb751e98856e8eae1f
%global version_or_commit 1fa11fa39029896939a5545968ed60ede714b992
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.13
%global ui_modules_version 0.1.13
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pcs_snmp_pkg_name pcs-snmp
%global pyagentx_version 0.4.pcs.2
@ -116,15 +111,10 @@ Source93: https://rubygems.org/downloads/nio4r-%{version_rubygem_nio4r}.gem
Source94: https://rubygems.org/downloads/puma-%{version_rubygem_puma}.gem
Source95: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_keywords}.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_modules_version}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
# pcs patches: <= 200
# Patch1: bzNUMBER-01-name.patch
Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch
# ui patches: >200
# Patch201: bzNUMBER-01-name.patch
Patch2: RHEL-17280-01-disable-new-webui-routes.patch
# git for patches
BuildRequires: git-core
@ -169,9 +159,6 @@ BuildRequires: overpass-fonts
# Red Hat logo for creating symlink of favicon
BuildRequires: redhat-logos
# for building web ui
BuildRequires: npm
# cluster stack packages for pkg-config
BuildRequires: booth
BuildRequires: corosync-qdevice-devel
@ -311,16 +298,12 @@ update_times_patch(){
# 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}
# patch pcs sources
%autosetup -S git -n %{pcs_source_name} -N
%autopatch -p1 -M 200
# update_times_patch %%{PATCH1}
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
# generate .tarball-version if building from an untagged commit, not a released version
# autogen uses git-version-gen which uses .tarball-version for generating version number
@ -328,9 +311,6 @@ update_times_patch %{PATCH1}
echo "%version+$(echo "%{version_or_commit}" | head -c 8)" > %{_builddir}/%{pcs_source_name}/.tarball-version
%endif
%if 0%{?skip_bundle_prep}
echo "Skipping copying bundled dependencies."
%else
cp -f %SOURCE1 %{pcsd_public_dir}/images
# prepare dirs/files necessary for building all bundles
@ -364,7 +344,6 @@ cp -f %SOURCE42 rpm/
cp -f %SOURCE43 rpm/
cp -f %SOURCE44 rpm/
cp -f %SOURCE45 rpm/
%endif
%build
%define debug_package %{nil}
@ -376,9 +355,6 @@ cp -f %SOURCE45 rpm/
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
@ -389,9 +365,6 @@ pwd
# and other users
chmod --recursive g-w,o-w ${RPM_BUILD_ROOT}%{_libdir}/%{rubygem_bundle_dir}
# something like make install for pcs-web-ui
cp -r %{_builddir}/%{ui_src_name}/build ${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/ui
# prepare license files
# some rubygems do not have a license file (thin)
mv %{rubygem_bundle_dir}/gems/backports-%{version_rubygem_backports}/LICENSE.txt backports_LICENSE.txt
@ -587,6 +560,11 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Fri Dec 8 2023 Michal Pospisil <mpospisi@redhat.com> - 0.10.17-6
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Remove the preview of the new pcs web interface
Resolves: RHEL-17280
* Tue Nov 14 2023 Michal Pospisil <mpospisi@redhat.com> - 0.10.17-5
- Rebased to the latest upstream sources (see CHANGELOG.md)
Resolves: RHEL-7584, RHEL-7668, RHEL-7729, RHEL-7731, RHEL-7732, RHEL-7741, RHEL-7742, RHEL-7743, RHEL-7745, RHEL-8467

View File

@ -14,6 +14,6 @@ export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/
export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/
./autogen.sh
# Workaround until configure.ac is prepared for centos-stream-*
./configure --with-distro=rhel --enable-tests-only
./configure --enable-tests-only
# Remove pcs sources to make sure tests are not using any of those files
rm -rf pcs

View File

@ -3,8 +3,6 @@ SHA512 (ethon-0.16.0.gem) = 3b31affcee0d5a5be05b5497d4a8d13515f8393f54579a3a9c8d
SHA512 (json-2.6.3.gem) = 10795b67403b03bf0780f9a34f3f1dd59cb797380bc28e8176890502b18fc064ad775b1472856400a1f75a75346fab1e9f63f799b6685d10363495c6a36b6911
SHA512 (mustermann-2.0.2.gem) = ed72ec2e376e160cd315cdd8fb0693993b02d6898167dc6f158049bd8e0a6ad4f98e604108992e5787067ea951be793d2a7e6e47df2d582907868300aaa74e5a
SHA512 (open4-1.3.4-1.gem) = 838a18efcd093d55d9589ff9d5c11054618abef863224c2d9b31445dc735218c2f96d954040e2d3f8d5aab0140e54b627fcc4a1b01c17e59267402a2abdd8efb
SHA512 (pcs-web-ui-0.1.13.tar.gz) = e8ccb07467f0c5d959f8ba1d541615836e9c88dc5793b3dfd1bee14cf96c4107a90251026f26e5dd0cf3d9ceb285c4da4b25dd77f3f0971e0d2c7d15899bce88
SHA512 (pcs-web-ui-node-modules-0.1.13.tar.xz) = 5e56644d6a4444856e5b15d0717aad9f12249bf365af50a0509fe29c0945fc94b8b26cb1a71231836dcc6c310ba91f1921086012ade073ed6c05715e6ca44983
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (python-dateutil-2.8.2.tar.gz) = 6538858e4a3e2d1de1bf25b6d8b25e3a8d20bf60fb85e32d07ac491c90ce193e268bb5641371b8a79fb0f033a184bac9896b3bc643c1aca9ee9c6478286ac20c
SHA512 (rack-protection-2.2.4.gem) = 0b965f651f9bc9e6daeec86cce8cdc87a503e8b14afb84bdb2c6dd130cf82ce6d3f5d23c1ed8b85afb76858ade992b60340130923c14b4a2b1bf1aeabaec9267
@ -20,4 +18,4 @@ SHA512 (puma-6.4.0.gem) = 3f481bd2bd34ed0d66d86f61d7522a48b4d8bfd36b807a1c47bb3b
SHA512 (rack-2.2.8.gem) = 8d12f6ce307f0474529218086c25d9f043b7787c65fab919bf9d706c00b3d61e2460e2fef02134e6e76b721b97cc86d80fa1a22d8adda89b19fc29b21694c15d
SHA512 (rexml-3.2.6.gem) = 6e4539f6de381be6a90e236cee7ef65622e18c88e4c4f3ee0b2c7501623b92bba046c22cd4de5f50a3067527fbe90a57f28fb4a5206754e957368a5d330b5458
SHA512 (tilt-2.3.0.gem) = 78a3de34e3d096e40cb245807bad07cc3ebfa192986addbd228c25153166808b379f3ce086ff68fa5959997946187fe8923e84100653b2b109007390969875b3
SHA512 (pcs-bfeff6d16605a7274e7b99bb751e98856e8eae1f.tar.gz) = 3a715edb6b88ef0701d84201892d48362bdf195a5113ecdac522612b9ea2b11bb2a85de17b6cb62379ebd2d733ef88b547eab81d0b4b201822b3d44627a83dc9
SHA512 (pcs-1fa11fa39029896939a5545968ed60ede714b992.tar.gz) = 5397b094cfa1da57dcb45d7f74d37e5660aaa32bc5e108fe0652c48f9082b2dca770d5a93b5dc7da971580ff36abcd074f6e08ef4f17ddf25eecf49547a64d4f