Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
747fab5801 | ||
|
|
542cbafe5b |
7 changed files with 73 additions and 372 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -118,10 +118,10 @@
|
|||
/pcs-0.11.8.tar.gz
|
||||
/pcs-web-ui-0.1.20.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.20.tar.xz
|
||||
/pcs-0.12.0.tar.gz
|
||||
/pcs-web-ui-0.1.22.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.22.tar.xz
|
||||
/pcs-0.11.9.tar.gz
|
||||
/dacite-1.9.2.tar.gz
|
||||
/pcs-0.12.1.tar.gz
|
||||
/pcs-web-ui-0.1.23.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.23.tar.xz
|
||||
/pcs-web-ui-0.1.23.tar.gz
|
||||
/pcs-0.11.10.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
From 72588f150e89b6f06810321245a13157b7e00b09 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Tue, 29 Jul 2025 23:42:00 +0200
|
||||
Subject: [PATCH] Do not require wheel when setuptools is new enough
|
||||
|
||||
Current version of setuptools creates wheels on its own.
|
||||
---
|
||||
README.md | 2 +-
|
||||
configure.ac | 7 +++++--
|
||||
rpm/pcs.spec.in | 2 +-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index a06143eba..636485be6 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -47,7 +47,7 @@ Apart from the dependencies listed above, these are also required for
|
||||
installation:
|
||||
|
||||
* python development files (packages python3-devel, python3-setuptools 66.1+,
|
||||
- python3-pip, python3-wheel)
|
||||
+ python3-pip, python3-wheel if python3-setuptools < 71)
|
||||
* ruby development files (package ruby-devel)
|
||||
* rubygems
|
||||
* rubygem bundler (package rubygem-bundler or ruby-bundler or bundler)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4e7d36599..0a782bfa7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -347,12 +347,15 @@ AC_SUBST([PYAGENTX_VERSION])
|
||||
|
||||
# pip 19.0 required for PEP517 support
|
||||
PCS_CHECK_PYMOD([pip], [>= 23.0])
|
||||
-# pip builds a wheel first
|
||||
-PCS_CHECK_PYMOD([wheel])
|
||||
|
||||
if test "x$tests_only" != "xyes"; then
|
||||
# setuptools 61.0.0 required for PEP621 support
|
||||
PCS_CHECK_PYMOD([setuptools], [>= 66.1])
|
||||
+ # wheel is required if setuptools < 71
|
||||
+ AC_PIP_MODULE([setuptools], [>= 71], [], [], [need_wheel=yes])
|
||||
+ if test "x$need_wheel" = "xyes"; then
|
||||
+ PCS_CHECK_PYMOD([wheel])
|
||||
+ fi
|
||||
PCS_CHECK_PYMOD([cryptography])
|
||||
PCS_CHECK_PYMOD([lxml])
|
||||
PCS_CHECK_PYMOD([pyparsing], [>= 3.0.0])
|
||||
diff --git a/rpm/pcs.spec.in b/rpm/pcs.spec.in
|
||||
index 55881a398..639a3e974 100644
|
||||
--- a/rpm/pcs.spec.in
|
||||
+++ b/rpm/pcs.spec.in
|
||||
@@ -86,7 +86,7 @@ BuildRequires: python%{python3_version}-pip >= 23
|
||||
BuildRequires: python%{python3_version}-setuptools >= 66.1
|
||||
|
||||
# for building wheel during make install
|
||||
-BuildRequires: python%{python3_version}-wheel
|
||||
+BuildRequires: (python%{python3_version}-wheel if python%{python3_version}-setuptools < 71)
|
||||
|
||||
# for bundling dateutil
|
||||
%if "@cirpmworkarounds@" != "yes"
|
||||
--
|
||||
2.50.1
|
||||
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
From a2899ef0e20bb638f47e74077281e73f4f18faf3 Mon Sep 17 00:00:00 2001
|
||||
From ad83707072df9e9f2bcfece27342ab361fddc8fa Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lisik <mlisik@redhat.com>
|
||||
Date: Thu, 10 Jul 2025 19:48:28 +0200
|
||||
Subject: [PATCH 2/2] fix ruby NameError exception in pcsd/pcsd.rb occuring
|
||||
with older rack
|
||||
Subject: [PATCH] fix ruby NameError exception in pcsd/pcsd.rb occuring with
|
||||
older rack
|
||||
|
||||
---
|
||||
pcsd/pcsd.rb | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pcsd/pcsd.rb b/pcsd/pcsd.rb
|
||||
index e8ae9f106..c9f668851 100644
|
||||
index a62434c62..c7b5357ef 100644
|
||||
--- a/pcsd/pcsd.rb
|
||||
+++ b/pcsd/pcsd.rb
|
||||
@@ -74,9 +74,11 @@ configure do
|
||||
|
|
@ -26,7 +26,7 @@ index e8ae9f106..c9f668851 100644
|
|||
+ end
|
||||
end
|
||||
|
||||
get '/remote/?:command?' do
|
||||
def run_cfgsync
|
||||
--
|
||||
2.50.1
|
||||
|
||||
|
|
|
|||
210
pcs.spec
210
pcs.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: pcs
|
||||
Version: 0.12.1
|
||||
Release: 5%{?dist}
|
||||
Version: 0.11.10
|
||||
Release: 1%{?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
|
||||
|
|
@ -17,10 +17,10 @@ BuildArch: noarch
|
|||
# To build an official pcs release, comment out branch_or_commit
|
||||
# Use long commit hash or branch name to build an unreleased version
|
||||
# %%global branch_or_commit 1353dfbb3af82d77f4de17a3fa4cbde185bb2b2d
|
||||
%global version_or_commit %{clean_version}
|
||||
%if 0%{?branch_or_commit:1}
|
||||
%global version_or_commit %{branch_or_commit}
|
||||
%global tarball_version %{clean_version}+%(echo %{branch_or_commit} | head -c 8)
|
||||
%else
|
||||
%global version_or_commit %{clean_version}
|
||||
%endif
|
||||
%global pcs_source_name %{name}-%{version_or_commit}
|
||||
|
||||
|
|
@ -30,10 +30,10 @@ BuildArch: noarch
|
|||
%global ui_modules_version 0.1.23
|
||||
# Use long commit hash or branch name to build an unreleased version
|
||||
# %%global ui_branch_or_commit 34372d1268f065ed186546f55216aaa2d7e76b54
|
||||
%global ui_version_or_commit %{ui_version}
|
||||
%if 0%{?ui_branch_or_commit:1}
|
||||
%global ui_version_or_commit %{ui_branch_or_commit}
|
||||
%global ui_tarball_version %{ui_version}-%(echo %{ui_branch_or_commit} | head -c 8)
|
||||
%else
|
||||
%global ui_version_or_commit %{ui_version}
|
||||
%endif
|
||||
%global ui_src_name pcs-web-ui-%{ui_version_or_commit}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ BuildArch: noarch
|
|||
%global pyagentx_version 0.4.pcs.2
|
||||
%global dacite_version 1.9.2
|
||||
|
||||
%global required_pacemaker_version 3.0.0
|
||||
%global required_pacemaker_version 2.1.0
|
||||
|
||||
%global pcs_bundled_dir pcs_bundled
|
||||
%global pcsd_webui_dir %{_prefix}/lib/pcsd/public/ui
|
||||
|
|
@ -52,7 +52,6 @@ BuildArch: noarch
|
|||
%global ui_metainfo %{metainfo_dir}/%{ui_metainfo_name}
|
||||
|
||||
%global pkg_pcs_snmp pcs-snmp
|
||||
%global pkg_pcs_web_ui pcs-web-ui
|
||||
%global pkg_cockpit_ha_cluster cockpit-ha-cluster
|
||||
|
||||
# prepend v for folder in GitHub link when using tagged tarball
|
||||
|
|
@ -69,28 +68,13 @@ Source42: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacit
|
|||
Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_version_or_commit}/%{ui_src_name}.tar.gz
|
||||
Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_version_or_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
|
||||
|
||||
|
||||
# pcs patches: <= 200
|
||||
# Patch1: name.patch
|
||||
Patch1: show-info-page-instead-of-webui.patch
|
||||
Patch2: fix-pcsd-not-starting-with-older-rack.patch
|
||||
Patch3: do-not-require-wheel.patch
|
||||
Patch1: fix-pcsd-not-starting-with-older-rack.patch
|
||||
|
||||
# ui patches: >200
|
||||
# Patch201: name-web-ui.patch
|
||||
|
||||
|
||||
# Split pcs to pcs and pcs-web-ui, all packages that replace pcs must obsolete
|
||||
# the old monolithic package
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_one_to_many_replacement
|
||||
Obsoletes: pcs < 0.12.0
|
||||
# Web UI is an add-on that doesn't need to be installed for pcs to function.
|
||||
# Upgrades from before 0.12 will install it thanks to Obsoletes. But it will
|
||||
# be possible to uninstall web UI to disable it and then it will not be
|
||||
# installed during upgrades because it is a weak dependency.
|
||||
Recommends: %{pkg_pcs_web_ui} == %{version}-%{release}
|
||||
|
||||
|
||||
# git for patches
|
||||
BuildRequires: git-core
|
||||
# for building pcs tarballs
|
||||
|
|
@ -102,6 +86,7 @@ BuildRequires: coreutils
|
|||
# find is used in Makefile and also somewhere else
|
||||
BuildRequires: findutils
|
||||
# python for pcs
|
||||
BuildRequires: python3 >= 3.9
|
||||
BuildRequires: python3-dateutil >= 2.7.0
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
|
@ -112,8 +97,7 @@ BuildRequires: python3-tornado
|
|||
BuildRequires: python3-cryptography
|
||||
BuildRequires: python3-lxml
|
||||
# for building bundled python packages
|
||||
# setuptools 71+ builds wheels by itself
|
||||
BuildRequires: (python3-wheel if python3-setuptools < 71)
|
||||
BuildRequires: python3-wheel
|
||||
# ruby and gems for pcsd
|
||||
BuildRequires: ruby >= 2.5.0
|
||||
BuildRequires: ruby-devel
|
||||
|
|
@ -124,7 +108,7 @@ BuildRequires: rubygem-ffi
|
|||
BuildRequires: rubygem-json
|
||||
BuildRequires: rubygem-mustermann
|
||||
BuildRequires: rubygem-puma
|
||||
BuildRequires: (rubygem(rack) < 3 or (rubygem(rack) >= 3 and rubygem(rackup)))
|
||||
BuildRequires: rubygem-rack
|
||||
BuildRequires: rubygem-rack-protection
|
||||
BuildRequires: rubygem-rack-test
|
||||
BuildRequires: rubygem-sinatra
|
||||
|
|
@ -146,6 +130,9 @@ BuildRequires: nss-tools
|
|||
# pcs now provides a pc file
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
# for building web ui
|
||||
BuildRequires: nodejs-npm
|
||||
|
||||
|
||||
# cluster stack packages for pkg-config
|
||||
# corosync has different package names on distributions but all provide
|
||||
|
|
@ -165,11 +152,12 @@ BuildRequires: libappstream-glib
|
|||
Requires: python3-cryptography
|
||||
Requires: python3-dateutil >= 2.7.0
|
||||
Requires: python3-lxml
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-pycurl
|
||||
Requires: python3-pyparsing
|
||||
Requires: python3-tornado
|
||||
# ruby and gems for pcsd
|
||||
Requires: ruby >= 3.3.0
|
||||
Requires: ruby >= 2.5.0
|
||||
Requires: rubygem-backports
|
||||
Requires: rubygem-childprocess
|
||||
Requires: rubygem-ethon
|
||||
|
|
@ -177,7 +165,7 @@ Requires: rubygem-ffi
|
|||
Requires: rubygem-json
|
||||
Requires: rubygem-mustermann
|
||||
Requires: rubygem-puma
|
||||
Requires: (rubygem(rack) < 3 or (rubygem(rack) >= 3 and rubygem(rackup)))
|
||||
Requires: rubygem-rack
|
||||
Requires: rubygem-rack-protection
|
||||
Requires: rubygem-sinatra
|
||||
Requires: rubygem-tilt
|
||||
|
|
@ -204,6 +192,8 @@ Requires: nss-tools
|
|||
|
||||
Provides: bundled(dacite) = %{dacite_version}
|
||||
|
||||
|
||||
|
||||
# pcs-snmp subpackage definition
|
||||
%package -n %{pkg_pcs_snmp}
|
||||
Group: System Environment/Base
|
||||
|
|
@ -224,24 +214,6 @@ Requires: net-snmp
|
|||
|
||||
Provides: bundled(pyagentx) = %{pyagentx_version}
|
||||
|
||||
# pcs-web-ui subpackage definition
|
||||
%package -n %{pkg_pcs_web_ui}
|
||||
Summary: Standalone web UI for Pacemaker/Corosync Configuration System
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPL-2.0-only: pcs
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/ClusterLabs/pcs-web-ui
|
||||
|
||||
# Split pcs to pcs and pcs-web-ui, all packages that replace pcs must obsolete
|
||||
# the old monolithic package
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_one_to_many_replacement
|
||||
Obsoletes: pcs < 0.12.0
|
||||
|
||||
Requires: pcs = %{version}-%{release}
|
||||
|
||||
Provides: bundled(pcs-web-ui) = %{!?ui_tarball_version:%{ui_version}}%{?ui_tarball_version}
|
||||
|
||||
# cockpit-ha-cluster subpackage definition
|
||||
%package -n %{pkg_cockpit_ha_cluster}
|
||||
Group: System Environment/Base
|
||||
|
|
@ -255,20 +227,14 @@ BuildRequires: nodejs-npm
|
|||
Requires: pcs = %{version}-%{release}
|
||||
Requires: cockpit-bridge
|
||||
|
||||
Provides: bundled(pcs-web-ui) = %{!?ui_tarball_version:%{ui_version}}%{?ui_tarball_version}
|
||||
|
||||
|
||||
|
||||
%description
|
||||
pcs is a configuration tool for Corosync and Pacemaker. It permits users to
|
||||
easily view, modify and create high availability clusters based on Pacemaker.
|
||||
This package contains the pcs command-line utility and its server pcsd.
|
||||
|
||||
%description -n %{pkg_pcs_web_ui}
|
||||
Provides standalone web UI for Pacemaker/Corosync Configuration System (pcs).
|
||||
pcs is a corosync and pacemaker configuration tool. It permits users to
|
||||
easily view, modify and create pacemaker based clusters.
|
||||
|
||||
%description -n %{pkg_pcs_snmp}
|
||||
SNMP agent that provides information about Pacemaker cluster to the main agent
|
||||
SNMP agent that provides information about pacemaker cluster to the master agent
|
||||
(snmpd).
|
||||
|
||||
%description -n %{pkg_cockpit_ha_cluster}
|
||||
|
|
@ -327,9 +293,9 @@ update_times_patch(){
|
|||
# -a <n> — Unpack The nth Sources After Changing Directory
|
||||
# -N — disables automatic patch application, use autopatch to apply patches
|
||||
#
|
||||
# 1. unpack sources (-b 0)
|
||||
# 1. unpack sources (-b 100)
|
||||
# 2. then cd into sources tree (the setup macro itself)
|
||||
# 3. then unpack node_modules into sources tree (-a 1).
|
||||
# 3. then unpack node_modules into sources tree (-a 101).
|
||||
%autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
|
||||
%autopatch -p1 -m 201
|
||||
# update_times_patch %%{PATCH201}
|
||||
|
|
@ -339,17 +305,16 @@ update_times_patch(){
|
|||
%autopatch -p1 -M 200
|
||||
# update_times_patch %%{PATCH1}
|
||||
update_times_patch %{PATCH1}
|
||||
update_times_patch %{PATCH2}
|
||||
update_times_patch %{PATCH3}
|
||||
|
||||
|
||||
# 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
|
||||
%if 0%{?tarball_version:1}
|
||||
echo %{tarball_version} > %{_builddir}/%{pcs_source_name}/.tarball-version
|
||||
%if "%{clean_version}" != "%{version_or_commit}"
|
||||
echo "%{clean_version}+$(echo "%{version_or_commit}" | head -c 8)" > %{_builddir}/%{pcs_source_name}/.tarball-version
|
||||
%endif
|
||||
|
||||
%if 0%{?ui_tarball_version:1}
|
||||
echo %{ui_tarball_version} > %{_builddir}/%{ui_src_name}/.tarball-version
|
||||
%if "x%{?ui_branch_or_commit}" != "x"
|
||||
echo "%{ui_version}+$(echo "%{ui_branch_or_commit}" | head -c 8)" > %{_builddir}/%{ui_src_name}/.tarball-version
|
||||
%endif
|
||||
|
||||
# prepare dirs/files necessary for building python bundles
|
||||
|
|
@ -362,7 +327,6 @@ cp -f %SOURCE42 rpm/
|
|||
%build
|
||||
%define debug_package %{nil}
|
||||
|
||||
# We left off by setting up pcs, so we are in its directory now
|
||||
./autogen.sh
|
||||
%{configure} --enable-local-build --enable-use-local-cache-only \
|
||||
--enable-individual-bundling --enable-webui \
|
||||
|
|
@ -390,22 +354,6 @@ pwd
|
|||
cd ../%{ui_src_name}
|
||||
%make_install
|
||||
|
||||
# prepare pcs-web-ui files (not needed for pcs as pcs installs them in Makefile)
|
||||
mkdir -p %{buildroot}/%{_defaultlicensedir}/%{pkg_cockpit_ha_cluster}
|
||||
mkdir -p %{buildroot}/%{_defaultlicensedir}/%{pkg_pcs_web_ui}
|
||||
|
||||
cp COPYING %{buildroot}/%{_defaultlicensedir}/%{pkg_cockpit_ha_cluster}/COPYING_WUI.md
|
||||
mv COPYING %{buildroot}/%{_defaultlicensedir}/%{pkg_pcs_web_ui}/COPYING_WUI.md
|
||||
|
||||
mkdir -p %{buildroot}/%{_docdir}/%{pkg_cockpit_ha_cluster}
|
||||
mkdir -p %{buildroot}/%{_docdir}/%{pkg_pcs_web_ui}
|
||||
|
||||
cp CHANGELOG.md %{buildroot}/%{_docdir}/%{pkg_cockpit_ha_cluster}/CHANGELOG_WUI.md
|
||||
mv CHANGELOG.md %{buildroot}/%{_docdir}/%{pkg_pcs_web_ui}/CHANGELOG_WUI.md
|
||||
|
||||
cp README.md %{buildroot}/%{_docdir}/%{pkg_cockpit_ha_cluster}/README_WUI.md
|
||||
mv README.md %{buildroot}/%{_docdir}/%{pkg_pcs_web_ui}/README_WUI.md
|
||||
|
||||
# Install pcs
|
||||
cd ../%{pcs_source_name}
|
||||
%make_install
|
||||
|
|
@ -461,28 +409,34 @@ run_all_tests(){
|
|||
run_all_tests
|
||||
|
||||
|
||||
# Mark pcsd and pcs_snmp_agent for restart after upgrade
|
||||
|
||||
%posttrans
|
||||
%systemd_posttrans_with_restart pcsd.service
|
||||
# Make sure the new version of the daemon is running.
|
||||
# Also, make sure to start pcsd-ruby if it hasn't been started or even
|
||||
# installed before. This is done by restarting pcsd.service.
|
||||
%{_bindir}/systemctl daemon-reload
|
||||
%{_bindir}/systemctl try-restart pcsd.service
|
||||
|
||||
%posttrans -n %{pkg_pcs_snmp}
|
||||
%systemd_posttrans_with_restart pcs_snmp_agent.service
|
||||
%post
|
||||
%systemd_post pcsd.service
|
||||
%systemd_post pcsd-ruby.service
|
||||
|
||||
# Restart pcsd if it is running to reload the Tornado app so it detects
|
||||
# presence or absence of the webui backend handler on install/update
|
||||
# of pcs-web-ui that contains it
|
||||
# Systemd will not pick-up on this change because pcs-web-ui doesn't contain
|
||||
# a unit file that would mark it for restart
|
||||
# https://fedoraproject.org/wiki/Changes/Restart_services_at_end_of_rpm_transaction
|
||||
%posttrans -n %{pkg_pcs_web_ui}
|
||||
systemctl try-restart pcsd.service
|
||||
%post -n %{pkg_pcs_snmp}
|
||||
%systemd_post pcs_snmp_agent.service
|
||||
|
||||
# Runs only on pcs-web-ui uninstall
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/
|
||||
%postun -n %{pkg_pcs_web_ui}
|
||||
if [ $1 -eq 0 ] ; then
|
||||
systemctl try-restart pcsd.service
|
||||
fi
|
||||
%preun
|
||||
%systemd_preun pcsd.service
|
||||
%systemd_preun pcsd-ruby.service
|
||||
|
||||
%preun -n %{pkg_pcs_snmp}
|
||||
%systemd_preun pcs_snmp_agent.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart pcsd.service
|
||||
%systemd_postun_with_restart pcsd-ruby.service
|
||||
|
||||
%postun -n %{pkg_pcs_snmp}
|
||||
%systemd_postun_with_restart pcs_snmp_agent.service
|
||||
|
||||
|
||||
|
||||
|
|
@ -493,8 +447,8 @@ fi
|
|||
%license dacite_LICENSE
|
||||
%license COPYING
|
||||
%{python3_sitelib}/*
|
||||
%{_bindir}/pcs
|
||||
%{_bindir}/pcsd
|
||||
%{_sbindir}/pcs
|
||||
%{_sbindir}/pcsd
|
||||
%{_prefix}/lib/pcs/*
|
||||
%{_prefix}/lib/pkgconfig/pcs.pc
|
||||
%{_prefix}/lib/pcsd/*
|
||||
|
|
@ -519,17 +473,6 @@ fi
|
|||
%exclude %{_prefix}/lib/pcs/%{pcs_bundled_dir}/packages/pyagentx*
|
||||
%exclude %{cockpit_dir}
|
||||
%exclude %{ui_metainfo}
|
||||
%exclude %{python3_sitelib}/pcs/daemon/app/webui
|
||||
%exclude %{pcsd_webui_dir}
|
||||
|
||||
%files -n %{pkg_pcs_web_ui}
|
||||
%doc CHANGELOG.md
|
||||
%doc %{_docdir}/%{pkg_pcs_web_ui}/CHANGELOG_WUI.md
|
||||
%doc %{_docdir}/%{pkg_pcs_web_ui}/README_WUI.md
|
||||
%license COPYING
|
||||
%license %{_defaultlicensedir}/%{pkg_pcs_web_ui}/COPYING_WUI.md
|
||||
%{python3_sitelib}/pcs/daemon/app/webui
|
||||
%{pcsd_webui_dir}
|
||||
|
||||
%files -n %{pkg_pcs_snmp}
|
||||
%{_prefix}/lib/pcs/pcs_snmp_agent
|
||||
|
|
@ -545,50 +488,19 @@ fi
|
|||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%files -n %{pkg_cockpit_ha_cluster}
|
||||
%doc %{_docdir}/%{pkg_cockpit_ha_cluster}/CHANGELOG_WUI.md
|
||||
%doc %{_docdir}/%{pkg_cockpit_ha_cluster}/README_WUI.md
|
||||
%license %{_defaultlicensedir}/%{pkg_cockpit_ha_cluster}/COPYING_WUI.md
|
||||
%{cockpit_dir}
|
||||
%{ui_metainfo}
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.12.1-5
|
||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
||||
* Tue Sep 16 2025 Michal Pospíšil <mpospisi@redhat.com> - 0.11.10-1
|
||||
- Rebased to the latest sources (see CHANGELOG.md)
|
||||
- Updated pcs-web-ui to 0.1.23
|
||||
|
||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.12.1-4
|
||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
||||
|
||||
* Wed Jul 30 2025 Michal Pospíšil <mpospisi@redhat.com> - 0.12.1-3
|
||||
- Remove BuildRequires: python3-wheel when using setuptools 71+
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jul 18 2025 Michal Pospíšil <mpospisi@redhat.com> - 0.12.1-1
|
||||
- Rebased pcs to the newest major version (see CHANGELOG.md)
|
||||
Resolves: rhbz#2371770
|
||||
- Updated standalone web UI and HA Cluster Management Cockpit application to pcs-web-ui 0.1.23 (see CHANGELOG_WUI.md)
|
||||
- There is now a changelog for the HA Cluster Management Cockpit application and the standalone web UI in both packages
|
||||
- The upstream version of pcs-web-ui can now be queried through RPM in both packages - see bundled(pcs-web-ui)
|
||||
- Updated bundled Python dependency dacite
|
||||
- Compatibility with rubygem-rack >= 3
|
||||
Resolves: rhbz#2372462
|
||||
|
||||
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.12.0-2
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Mon Jan 27 2025 Michal Pospíšil <mpospisi@redhat.com> - 0.12.0-1
|
||||
- Rebased pcs to the newest major version (see CHANGELOG.md)
|
||||
Resolves: rhbz#2341012
|
||||
- New subpackage pcs-web-ui - enables standalone web UI when the subpackage is installed on the system (default), uninstall the subpackage to disable the web UI
|
||||
- Updated standalone web UI and HA Cluster Management Cockpit application to pcs-web-ui 0.1.22
|
||||
- Fixes for compatibility with Ruby 3.4
|
||||
Resolves: rhbz#2331005
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.8-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
* Mon Feb 10 2025 Michal Pospíšil <mpospisi@redhat.com> - 0.11.9-1
|
||||
- Rebased to the latest sources (see CHANGELOG.md)
|
||||
- Updated pcs-web-ui to 0.1.22
|
||||
|
||||
* Tue Aug 6 2024 Michal Pospíšil <mpospisi@redhat.com> - 0.11.8-1
|
||||
- Rebased to the latest sources (see CHANGELOG.md)
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ export GEM_HOME=/usr/lib/pcsd/vendor/bundle/
|
|||
# We need to use cd pcs-* because when pcs-web-ui starts using autotools, running
|
||||
# autogen and configure with expanded TMT_SOURCE_DIR will match that too
|
||||
./autogen.sh
|
||||
./configure --enable-webui --enable-local-build --enable-use-local-cache-only \
|
||||
--enable-individual-bundling --with-pcs-lib-dir=/usr/lib
|
||||
./configure --enable-local-build --enable-use-local-cache-only \
|
||||
--enable-individual-bundling --enable-webui --with-pcs-lib-dir=/usr/lib
|
||||
# Remove pcs sources to make sure tests are not using any of those files
|
||||
rm -rf pcs
|
||||
touch ../tests-prepared-stamp
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
From e7fa056f582c992d3d2b289911be20440fb839ac Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Devat <idevat@redhat.com>
|
||||
Date: Tue, 5 Nov 2024 16:35:02 +0100
|
||||
Subject: [PATCH 1/2] show info page instead of webui
|
||||
|
||||
---
|
||||
pcs/Makefile.am | 1 +
|
||||
pcs/daemon/app/webui_info_handler.py | 31 ++++++++++++++++++++++++++++
|
||||
pcs/daemon/run.py | 4 +++-
|
||||
pcs_test/smoke.sh.in | 4 ++--
|
||||
pcsd/public/ui_instructions.html | 24 ++++++++++-----------
|
||||
5 files changed, 48 insertions(+), 16 deletions(-)
|
||||
create mode 100644 pcs/daemon/app/webui_info_handler.py
|
||||
|
||||
diff --git a/pcs/Makefile.am b/pcs/Makefile.am
|
||||
index 1297473ff..8d4b93073 100644
|
||||
--- a/pcs/Makefile.am
|
||||
+++ b/pcs/Makefile.am
|
||||
@@ -219,6 +219,7 @@ EXTRA_DIST = \
|
||||
daemon/app/webui/core.py \
|
||||
daemon/app/webui/session.py \
|
||||
daemon/app/webui/sinatra_ui.py \
|
||||
+ daemon/app/webui_info_handler.py \
|
||||
daemon/async_tasks/__init__.py \
|
||||
daemon/async_tasks/scheduler.py \
|
||||
daemon/async_tasks/task.py \
|
||||
diff --git a/pcs/daemon/app/webui_info_handler.py b/pcs/daemon/app/webui_info_handler.py
|
||||
new file mode 100644
|
||||
index 000000000..3ab8275bf
|
||||
--- /dev/null
|
||||
+++ b/pcs/daemon/app/webui_info_handler.py
|
||||
@@ -0,0 +1,31 @@
|
||||
+from pcs.daemon.app.common import (
|
||||
+ BaseHandler,
|
||||
+ RoutesType,
|
||||
+)
|
||||
+
|
||||
+
|
||||
+class _WebuiInfoHandler(BaseHandler):
|
||||
+ __path = None
|
||||
+
|
||||
+ def initialize(self, path):
|
||||
+ self.__path = path
|
||||
+
|
||||
+ def get(self):
|
||||
+ self.set_status(404)
|
||||
+ self.render(self.__path)
|
||||
+
|
||||
+
|
||||
+def get_routes(path: str) -> RoutesType:
|
||||
+ return [
|
||||
+ # The following two rules can be compressed into one: r"/(ui/?)?".
|
||||
+ # However, the content of the parentheses used here should be captured
|
||||
+ # and passed in to the handler’s get method as an argument.
|
||||
+ # Unfortunately, it seems that tornado version 6.4.1 don't pass this
|
||||
+ # argument (unlike version 6.3.3). Maybe it's a bug (it needs further
|
||||
+ # inspection). These rules are a safe way to avoid surprises.
|
||||
+ # Moreover, the captured parameter is irrelevant to the functionality
|
||||
+ # of the handler.
|
||||
+ (r"/", _WebuiInfoHandler, dict(path=path)),
|
||||
+ (r"/ui/?", _WebuiInfoHandler, dict(path=path)),
|
||||
+ (r"/ui/.*", _WebuiInfoHandler, dict(path=path)),
|
||||
+ ]
|
||||
diff --git a/pcs/daemon/run.py b/pcs/daemon/run.py
|
||||
index 558315c23..cfe9999fc 100644
|
||||
--- a/pcs/daemon/run.py
|
||||
+++ b/pcs/daemon/run.py
|
||||
@@ -33,6 +33,7 @@ from pcs.daemon.app import (
|
||||
auth,
|
||||
sinatra_remote,
|
||||
sinatra_ui,
|
||||
+ webui_info_handler,
|
||||
)
|
||||
from pcs.daemon.app import capabilities as capabilities_app
|
||||
|
||||
@@ -168,7 +169,8 @@ def configure_app( # noqa: PLR0913
|
||||
# Even with disabled (standalone) webui the following routes must be
|
||||
# provided because they can be used via unix socket from cockpit.
|
||||
routes.extend(
|
||||
- sinatra_ui.get_routes(auth_provider, ruby_pcsd_wrapper)
|
||||
+ webui_info_handler.get_routes(webui_fallback)
|
||||
+ + sinatra_ui.get_routes(auth_provider, ruby_pcsd_wrapper)
|
||||
)
|
||||
|
||||
return Application(
|
||||
diff --git a/pcs_test/smoke.sh.in b/pcs_test/smoke.sh.in
|
||||
index fdfe8be2c..a9bb83447 100755
|
||||
--- a/pcs_test/smoke.sh.in
|
||||
+++ b/pcs_test/smoke.sh.in
|
||||
@@ -71,10 +71,10 @@ if [ "$webui_http_code_response" = "200" ]; then
|
||||
curl --insecure --cookie ${cookie_file} --header "X-Requested-With: XMLHttpRequest" --data "hidden[hidden_input]=&config[stonith-enabled]=false" https://localhost:2224/managec/${cluster_name}/update_cluster_settings > "${output_file}"
|
||||
cat "${output_file}"; echo ""
|
||||
[ "$(cat ${output_file})" = "Update Successful" ]
|
||||
-elif [ "$webui_http_code_response" = "401" ]; then
|
||||
+elif [ "$webui_http_code_response" = "404" ]; then
|
||||
curl --insecure https://localhost:2224/ui/ > "${output_file}"
|
||||
cat "${output_file}"; echo ""
|
||||
- [ "$(cat "${output_file}")" = '{"notauthorized":"true"}' ]
|
||||
+ grep "HA cluster management has been moved" "${output_file}"
|
||||
else
|
||||
echo "Unexpected response from https://localhost:2224/ui/ - http code: '${webui_http_code_response}'"
|
||||
exit 1
|
||||
diff --git a/pcsd/public/ui_instructions.html b/pcsd/public/ui_instructions.html
|
||||
index a120ed3d4..b9c1c3152 100644
|
||||
--- a/pcsd/public/ui_instructions.html
|
||||
+++ b/pcsd/public/ui_instructions.html
|
||||
@@ -1,27 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
- <title>Pcs WebUI instructions</title>
|
||||
+ <title>Web UI is disabled</title>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
- <h1>Pcs WebUI instructions</h1>
|
||||
+ <h1>Package <code>pcs-web-ui</code> is not installed</h1>
|
||||
<p>
|
||||
- WebUI is not a part of pcs repository but it has its own
|
||||
- <a href="https://github.com/ClusterLabs/pcs-web-ui">repository</a>.
|
||||
+ Since Fedora 42, pcsd web UI is distributed with pcs as <code>pcs-web-ui
|
||||
+ </code> package. This<br>package can be uninstalled to disable the web UI.
|
||||
</p>
|
||||
<p>
|
||||
- You can clone <a href="https://github.com/ClusterLabs/pcs-web-ui">WebUI repository</a>
|
||||
- and build the web application into pcs by:
|
||||
+ To re-enable pcsd web UI, install the <code>pcs-web-ui</code> RPM package.
|
||||
</p>
|
||||
- <pre><code>
|
||||
- $ npm install
|
||||
- $ npm run build
|
||||
- $ mv ./build [/path/to/]pcs/pcsd/public/ui
|
||||
- </code></pre>
|
||||
<p>
|
||||
- For more details, see instructions in
|
||||
- <a href="https://github.com/ClusterLabs/pcs-web-ui/blob/main/README.md">README.md</a>.
|
||||
+ Another option is to try pcsd web UI as an application for
|
||||
+ <a href="https://cockpit-project.org/">Cockpit</a>
|
||||
+ - a web-based<br>graphical interface for servers. The HA Cluster Management
|
||||
+ application can be<br>installed from within the Applications pane in
|
||||
+ Cockpit or by installing the<br><code>cockpit-ha-cluster</code> RPM
|
||||
+ package.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
--
|
||||
2.50.1
|
||||
|
||||
4
sources
4
sources
|
|
@ -1,5 +1,5 @@
|
|||
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
|
||||
SHA512 (dacite-1.9.2.tar.gz) = 69513bc1acd43e45a208ce4b4186072f92d9057a6a88c77d56f21405fbed7964d94fe4f6a37c99754a793caa2bd0584664dfab69169ef0d3564bb09d37769e59
|
||||
SHA512 (pcs-0.12.1.tar.gz) = 4f17a8d9c15b8c9208c94a264f5f79f03abc451e3f4ae4ba0fb338055a26407d4961466dd8f3565f6882c2c00f1d6a1ec8fd15dadcb0cf1a5586d37c56c77238
|
||||
SHA512 (pcs-web-ui-0.1.23.tar.gz) = 6bc709926f26a02d33fb3865d15a1cf15db51a07dd9b25c63f33277c427c3403c189e2ac5e7adc795b254ad0bdb50f1bc4be70f1385bc8522ca502142d41fc26
|
||||
SHA512 (pcs-web-ui-node-modules-0.1.23.tar.xz) = f39dd1fd391f10b874b5fec34da1a2f2496d66b31af736ee1dfc2ef6e0b518efd03053fd00312c84e10a33ffda492e12d48a898a21efb6241e5459828e500e80
|
||||
SHA512 (pcs-web-ui-0.1.23.tar.gz) = 6bc709926f26a02d33fb3865d15a1cf15db51a07dd9b25c63f33277c427c3403c189e2ac5e7adc795b254ad0bdb50f1bc4be70f1385bc8522ca502142d41fc26
|
||||
SHA512 (pcs-0.11.10.tar.gz) = 2b2cd6f0bc03f7c0096460b44e8779b2eba228581682feee87a9695b97409bd61cf0fa7dfd049336e17417c4cf4578d0ab0e3bf1d3d3f68b10a80174ec06c82f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue