Compare commits

...
Sign in to create a new pull request.

67 commits

Author SHA1 Message Date
Python Maint
97846a528f Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:36:02 +02:00
Python Maint
267ae8ba0c Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:05:31 +02:00
Michal Pospíšil
2e5063b78a bump release
Forgotten to bump release in previous commit (096aab9).
2025-07-30 18:11:15 +02:00
Michal Pospíšil
096aab967f pcs-0.12.1-3
- Remove BuildRequires: python3-wheel when using setuptools 71+
2025-07-30 12:47:35 +02:00
Fedora Release Engineering
5830580f12 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 00:03:19 +00:00
Michal Pospíšil
8cd0772e80 pcs-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
- Updated bundled Python dependency dacite
2025-07-22 17:56:27 +02:00
Michal Pospíšil
1351fa3026 report pcs-web-ui version and simplify version macros
The original goal was to report the pcs-web-ui upstream version through
rpm to simplify reporting bugs upstream because subpackages inherit the
pcs version from the main package.

When pcs-web-ui is built from unreleased version, I needed a mechanism
to include the git revision in the version string. This mechanism
already existed for generating .tarball-version. I didn't want to
duplicate the code so I moved it to a macro. With this approach I was
also able to simplify conditions for generating .tarball-version file.

On top of that, as I was adding the new tarball_version macro, I noticed
that the if conditions could be simplified by updating the existing
variables instead of using the else branch.
2025-07-22 17:56:27 +02:00
Michal Pospíšil
2f443108e0 add --enable-webui switch to tests
The switch alters the test suite behavior - we want it enabled since we
want pcsd to support webui in standalone mode if the user chooses to
install pcs-web-ui package.
2025-07-22 17:56:27 +02:00
Michal Pospíšil
2cc50341f9 package licenses and docs for pcs-web-ui
Pcs-web-ui added a changelog upstream, so I'm adding it downstream as
well. It turns out that I forgot to package the readme and license
before, so adding them too. In Fedora, I have to copy the files to the
cockpit package and pcs-web-ui package since they both include the
pcs-web-ui upstream code.

For pcs, readme and changelog are installed via automake variable
`dist_doc_DATA` [1] which gets automatically converted to its own target
ran during `make install`. The target installs it to %docdir/%TARNAME
(automake variables). This happens to align with RPM default of
%_docdir/%name (spec macros). This is rendered completely useless as
these later get replaced by RPM anyway. The path is therefore
/usr/share/doc/pcs.

RPM %doc directive has two modes. If there is a relative path, the %doc
directive runs a script that goes into builddir/BUILD/<Source0> and
copies the file to %_docdir. If there is an absolute path, the file is
only marked as a doc file in the RPM database. The same goes for
%license directive, except for it getting copied to %_defaultlicensedir.
[2][3]

The problem arises for pcs-web-ui files as they neither come from the
pcs tarball nor are to be owned by the pcs package. Additionally, the
package name changes for different downstreams. Because the package name
changes, it is not desirable to install the files in the upstream
Makefile which is not aware of RPM package names. I made a decision to
handle file copying entirely in the specfile for these reasons. It seems
like for relative paths, RPM searches the Source0 tarball, but ours are
located in Source100. Therefore, I explicitly used %_docdir and
%_defaultlicensedir in %install and %files.

[1]: https://www.gnu.org/software/automake/manual/html_node/amhello_0027s-Makefile_002eam-Setup-Explained.html
[2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
[3]: https://web.archive.org/web/20160927094629/https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s05s03.html
2025-07-22 17:56:27 +02:00
Michal Pospíšil
959addae3b use virtual provides for rack and rackup
This fixes commit 825b175. Dnf5 cannot resolve the rpm name for some
reason. Switching to virtual provides rubygem(rack) instead of
rubygem-rack solves the issue. As a troubleshooting attempt, I also
tried a different approach to declaring the dependency with "and" and
"or". This provides a more complete picture and is less hacky than the
if boolean dependency [1].

This might have something to do with how provides are defined:
rpm -qP -p ./rubygem-rack-3.1.16-1.fc43.noarch.rpm
rubygem(rack) = 3.1.16
rubygem-rack = 1:3.1.16-1.fc43

[1] https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html
2025-07-22 17:51:40 +02:00
Michal Pospíšil
825b1756ac depend on rackup with rack 3+
Since rack 3, rack handlers were moved to a new gem called rackup. As
a part of update to rack 3 in Fedora, a new package rubygem-rackup is
included [1]. No upstream changes are needed, we already have a
mechanism to require rackup when rack >= 3.

Resolves: rhbz#2372462

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2338474
2025-07-18 19:08:01 +02:00
Michal Pospíšil
db939b8274 fix URL of pcs-web-ui package 2025-07-18 17:19:31 +02:00
Python Maint
0ab16a578c Rebuilt for Python 3.14 2025-06-03 23:35:19 +02:00
Michal Pospíšil
c3de7d7354 - 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

- Support tilde in version - for correct sorting of prerelease upstream version by RPM - %{version} expands with the tilde, use %{clean_version} to get upstream version
- Added pkgconfig file for pcs
- Added previously omitted autotools as build dependencies
- Changed BuildRequires for cluster stack components to use pkgconfig virtual provides to prevent breakage if pkgconfig is ever moved to a different package
- Removed BuildRequires: nodejs-npm from main package and fixed the name in cockpit-ha-cluster subpackage - the idea is that BuildRequires become Requires of the srpm which are then used during the main build phase when subpackages are built (so BuildRequires are effectively inherited by this logic)
- Removed Requires: python3-setuptools. With overhauled setup, new setuptools create entrypoints that do not import setuptools.
- Removed Requires: rubygem-rack-test - this is a build requirement.
- Improved BuildRequires for systemd scriptlet macros according to packaging guidelines
- Replaced ${RPM_BUILD_ROOT} in favor of %buildroot to match the upstream spec
- Revamped and unified tarball version management between pcs and pcs-web-ui - version numbers are needed for untagged releases, as git-version-gen takes the version from a git tag present in official released tarballs. To build an unreleased version of pcs, a commit hash is declared in a macro and .tarball-version is generated from rpm version and the hash. For tagged releases, .tarball-version is not generated but rpm version is used for file names and such. Pcs-web-ui uses a different version than pcs, so the rpm version cannot be used. Instead, pcs-web-ui version always has to be declared in the spec file anyway, so it will now serve as the fallback version for generating the .tarball-version for pcs-web-ui.
- Added BuildRequires: pkgconf as autotools need to process pc files from cluster packages
- Removal of all %post macros for all subpackages, because these are run automatically by systemd via %filetriggerin [1]. The need to restart is from now on indicated by running %posttrans systemd macros which set restart markers, see systemd 248 release notes [2]. This is implementation of a Fedora change proposal [3]. There are %posttrans and %postun macros for pcs-web-ui subpackage since pcsd needs to be restarted to start/stop providing webui or update webui on its installation/update/uninstall.
- The path to webui_public_dir passed to pcs-web-ui autotools is hardcoded. The pcs.pc file is not available since pcs is built in the same SRPM. It is not possible to get the path from compiled pc file after running configure from pcs because the %files section is not shell interpreted. It only accepts RPM macros which are replaced by the preprocessor before pcs is compiled. Technically, %files accept a file with paths and pkg-config could be run manually after pcs is compiled outputiing the directory to a temporary file. This hack is too ugly. Another solution would be to hardcode the paths both to pcs and ps-web-ui via autotools. This however doesn;t change the structure of the pcs tarball and is not safe either.
- Stopped using sbindir macro due to: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

[1] 1ffa7bf7c7/f/triggers.systemd
[2] https://github.com/systemd/systemd/blob/v248-rc1/NEWS#L360
[3] https://fedoraproject.org/wiki/Changes/Restart_services_at_end_of_rpm_transaction
2025-02-03 22:21:46 +01:00
Fedora Release Engineering
a62e4a77c3 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 22:35:25 +00:00
Michal Pospisil
dd5c28916c rpm induced gating changes
Changes to builddir structure in RPM 4.20 broke the old script for
patching sources. Luckily, we can now patch sources with tmt.
Gone is also list of packages needed for testing,
build dependencies will be installed by tmt instead.

Name of the gating plan was changed to remove confusion with
gating.yaml. The prepare script was also renamed to better reflect what
it does.

The prepare script should be run in prepare, but TMT_SOURCE_DIR doesn't
exist in that step yet. The workaround is to run the prepre script
before every test to allow for running all tests by itself. However, the
script can only run once because it removes pcs folder which breaks
autotools. This is done by creating a stamp file that prevents the
script from running if it already ran.
2024-08-06 17:46:08 +02:00
Michal Pospisil
9fee6b2969 pcs-0.11.8-1
- Rebased to the latest sources (see CHANGELOG.md)
- Updated pcs-web-ui to 0.1.20

- Removed extraneous Requires and BuildRequires
2024-08-06 17:40:30 +02:00
Fedora Release Engineering
234d9718a9 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 21:39:00 +00:00
Yaakov Selkowitz
232b9c52ef Drop eln macro usage
The %eln macro should only be used where absolutely necessary and with
approval from ELN SIG.  ELN builds also define the %rhel macro, set to the
next version to be branched, which covers almost all cases. Fedora 38 is
EOL, so there is no further need to conditionalize for it.
2024-06-23 22:34:41 -04:00
Python Maint
43ad532686 Rebuilt for Python 3.13 2024-06-09 03:06:50 +02:00
Michal Pospisil
655b3251b0 pcs-0.11.7-3
- Fixed a bug preventing the Cockpit Application from being installed from Cockpit
2024-02-05 10:51:21 +01:00
Fedora Release Engineering
b68e4b6701 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 12:20:13 +00:00
Michal Pospisil
3a06ce659f pcs-0.11.7-1
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui to 0.1.18
- TLS cipher setting in pcsd now follows system-wide crypto policies by default
- Added cockpit-pcs-web-ui subpackage that adds pcs-web-ui as a Cockpit application
- Removed BuildRequires: python3-distro - was used to bundle dateutil
- Replaced STI tests with fmf tests for gating
- Change to prepare-env.sh script for rpm 4.19+ that creates SPECPARTS
  directories
- Workaround used for distro in autotools
2024-01-19 14:23:26 +01:00
Fedora Release Engineering
d102aae88e Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 18:51:05 +00:00
Yaakov Selkowitz
2d244b8d72 Fix build with Python 3.12
Patch submitted upstream: https://github.com/ClusterLabs/pcs/pull/713
2023-07-10 13:02:11 -04:00
Python Maint
11e6bb08f8 Rebuilt for Python 3.12 2023-06-28 11:42:02 +02:00
Michal Pospisil
71c95f418e Resolves: rhbz#2109852 rhbz#2170648
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Removed dependency fedora-logos - favicon is now correctly provided by pcs-web-ui
2023-06-22 13:43:50 +02:00
Michal Pospisil
52c9289b49 Resolves: rhbz#2179837
- Fix displaying differences between configuration checkpoints in “pcs config checkpoint diff” command
- Fix “pcs stonith update-scsi-devices” command which was broken since Pacemaker-2.1.5-rc1
- Fixed loading of cluster status in the web interface when fencing levels are configured
- Fixed a vulnerability in pcs-web-ui-node-modules
- Swapped BuildRequires: npm for BuildRequires: nodejs-npm in Fedora 37 because of NodeJS packaging change
- Removed BuildRequires: rubygem-io-console
- Removed dependency rubygem-eventmachine
2023-04-13 13:01:04 +02:00
Michal Pospisil
2287b8ba7d Resolves: rhbz#2166266
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Fixed broken filtering in create resource/fence device wizards in the web interface
- Converted package to noarch
- Added creation of .tarball-version file needed by autotools when building from untagged commits and fixed Source0 link to the tarball on GitHub
- Modified build options of pcs for booth authfile fix for all Fedora versions
- Added BuildRequires: pam for tier0 tests during build
- Added BuildRequires: nodejs-npm for NodeJS packaging change since Fedora 38
- Removed bundled rubygem thin and its associated BuildRequires: rubygems, rubygem-bundler, rubygem-daemons, gcc, gcc-c++
- Added dependency rubygem-puma - replacement for rubygem thin
- Added dependency nss-tools - for working with qdevice certificates
- Added dependency fedora-logos - for the web interface favicon
- Removed dependencies: rubygem-daemons, rubygem(webrick)
2023-03-01 15:29:41 +01:00
Fedora Release Engineering
514efad418 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 23:33:26 +00:00
Mamoru TASAKA
7315593416 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
Workaround for dnf dependency resolution confusion between nodejs16 vs nodejs
Workaround for find-debuginfo.sh failure wrt ruby3.2 gem install change
2023-01-04 15:01:32 +09:00
Michal Pospisil
dc07da9166 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Added rubygem dependency: childprocess
- Removed rubygem dependency: open4
2022-12-13 10:50:06 +01:00
Mamoru TASAKA
b937466e5b Backport upstream patch for rubygem-json 2.6.3 error message format change 2022-12-12 21:54:19 +09:00
Miroslav Lisik
09490deee9 Resolves: rhbz#2123389
- Fixed ruby socket permissions
2022-09-07 16:37:27 +02:00
Fedora Release Engineering
e364a48be5 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 02:52:52 +00:00
Zbigniew Jędrzejewski-Szmek
d88d1a37b2 Rebuilt for pyparsing-3.0.9 2022-07-19 11:12:48 +02:00
Miroslav Lisik
478964bb97 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Resolves: rhbz#2068452
2022-06-28 10:48:56 +02:00
Python Maint
a6e4f795a7 Rebuilt for Python 3.11 2022-06-14 09:03:59 +02:00
Miroslav Lisik
d172d46e44 Resolves: rhbz#bz2093935
- Python 3.11 related fixes
2022-06-09 11:01:20 +02:00
Miroslav Lisik
f8c8ea2492 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Removed old web gui
2022-02-04 18:12:04 +01:00
Vít Ondruch
183fef8a1e Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.1 2022-01-27 19:00:48 +01:00
Fedora Release Engineering
026b429ce0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 23:04:13 +00:00
Miroslav Lisik
c8e365c715 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Stop bundling rubygems daemons eventmachine mustermann rack rack-protection ruby2_keywords sinatra tilt
2021-10-05 18:40:50 +02:00
Miroslav Lisik
b82abfd36d Resolves: rhbz#1983359
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Bundle rubygem-sinatra, rubygem-thin and their dependencies because they were orphaned
2021-08-16 20:54:38 +02:00
Fedora Release Engineering
d6820b5189 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 17:52:13 +00:00
Python Maint
0edfcc78db Rebuilt for Python 3.10 2021-06-04 20:14:54 +02:00
Zbigniew Jędrzejewski-Szmek
c125a1634e Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:06 +01:00
Miroslav Lisik
eff9068c43 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Updated bundled python dependency: dacite
- Changed BuildRequires from git to git-core
- Added conditional (Build)Requires: rubygem(rexml)
- Added conditional Requires: rubygem(webrick)
2021-02-04 17:10:46 +01:00
Fedora Release Engineering
7247eb7cfb - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 23:06:16 +00:00
Tom Stellard
f5aa58717c Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 01:11:38 +00:00
Vít Ondruch
415687d70d Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0 2021-01-07 18:46:03 +01:00
Ondrej Mular
f00a25ef21 Python 3.10 related fix 2020-11-26 09:40:35 +01:00
Miroslav Lisik
08d2960343 Rebased to latest upstream sources (see CHANGELOG.md)
- Added dependency on python packages pyparsing and dateutil
- Fixed virtual bundle provides for ember, handelbars, jquery and jquery-ui
- Removed dependency on python3-clufter
2020-10-02 10:09:31 +02:00
Fedora Release Engineering
2755aa818b - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 13:19:25 +00:00
Miroslav Lisik
7bbab365c2 Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Stopped bundling tornado (use distribution package instead)
- Stopped bundling rubygem-tilt (use distribution package instead)
- Removed rubygem bundling
- Removed unneeded BuildRequires: execstack, gcc, gcc-c++
- Excluded some tests for tornado daemon
2020-07-22 08:43:45 +02:00
Tom Stellard
2aa2099244 Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-21 10:21:42 +02:00
Ondrej Mular
68ffc62879 fix date in changelog 2020-07-16 10:19:37 +02:00
Ondrej Mular
ebc60dd1fe Switch to the latest upstream version of dacite 2020-07-15 16:18:02 +02:00
Ondrej Mular
92ce8561ab Resolves: rhbz#1838327 2020-07-03 14:51:42 +02:00
Miro Hrončok
c2ddcd2f48 Rebuilt for Python 3.9 2020-05-26 02:55:52 +02:00
Ondrej Mular
3b2f88a991 Rebased to latest upstream sources 2020-05-07 10:12:07 +02:00
Ondrej Mular
704acb797e Enable gating 2020-04-03 15:14:10 +02:00
Ondrej Mular
48169244fa Resolves: rhbz#1817695 2020-03-27 14:39:00 +01:00
Miroslav Lisik
a85960601d Rebased to latest upstream sources 2020-03-18 15:16:26 +01:00
Fedora Release Engineering
bb6d268d06 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 21:06:14 +00:00
Miroslav Lisik
737f32d653 Rebased to latest upstream sources 2019-11-28 16:08:24 +01:00
Miro Hrončok
15c352599d Rebuilt for Python 3.8.0rc1 (#1748018) 2019-10-03 13:58:19 +02:00
11 changed files with 990 additions and 235 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

63
.gitignore vendored
View file

@ -62,3 +62,66 @@
/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-node-modules-0.1.3.tar.xz
/pcs-0.10.7.tar.gz
/dacite-1.6.0.tar.gz
/pcs-0.10.8.tar.gz
/pcs-web-ui-0.1.5.tar.gz
/pcs-web-ui-node-modules-0.1.5.tar.xz
/daemons-1.4.0.gem
/eventmachine-1.2.7.gem
/mustermann-1.1.1.gem
/rack-2.2.3.gem
/rack-protection-2.0.8.1.gem
/ruby2_keywords-0.0.5.gem
/sinatra-2.0.8.1.gem
/thin-1.8.1.gem
/tilt-2.0.10.gem
/pcs-0.10.9.tar.gz
/pcs-web-ui-0.1.6.tar.gz
/pcs-web-ui-node-modules-0.1.6-fips-fix.tar.xz
/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
/pcs-0.11.3.tar.gz
/pcs-web-ui-0.1.14.tar.gz
/pcs-web-ui-node-modules-0.1.14.tar.xz
/pcs-0.11.4.15-f7301.tar.gz
/pcs-web-ui-0.1.16.tar.gz
/pcs-web-ui-node-modules-0.1.16.tar.xz
/pcs-ee602830794f09a06880cd7e37a802b27113f185.tar.gz
/dacite-1.8.0.tar.gz
/pcs-0.11.5.tar.gz
/pcs-web-ui-0.1.16.1.tar.gz
/pcs-web-ui-node-modules-0.1.16.1.tar.xz
/pcs-0.11.6.tar.gz
/pcs-web-ui-node-modules-0.1.17.tar.xz
/pcs-web-ui-0.1.17.tar.gz
/dacite-1.8.1.tar.gz
/pcs-0.11.7.tar.gz
/pcs-web-ui-0.1.18.tar.gz
/pcs-web-ui-node-modules-0.1.18.tar.xz
/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
/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

View file

@ -0,0 +1,63 @@
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

View file

@ -0,0 +1,32 @@
From a2899ef0e20bb638f47e74077281e73f4f18faf3 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
---
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
--- a/pcsd/pcsd.rb
+++ b/pcsd/pcsd.rb
@@ -74,9 +74,11 @@ configure do
CAPABILITIES_PCSD = capabilities_pcsd.freeze
end
-error Rack::QueryParser::QueryLimitError do
- $logger.warn(env['sinatra.error'].message)
- return 400, env['sinatra.error'].message
+if Rack.const_defined?(:QueryParser) and Rack::QueryParser.const_defined?(:QueryLimitError)
+ error Rack::QueryParser::QueryLimitError do
+ $logger.warn(env['sinatra.error'].message)
+ return 400, env['sinatra.error'].message
+ end
end
get '/remote/?:command?' do
--
2.50.1

14
gating.yaml Normal file
View file

@ -0,0 +1,14 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

832
pcs.spec
View file

@ -1,172 +1,221 @@
Name: pcs
Version: 0.10.3
Release: 1%{?dist}
Version: 0.12.1
Release: 5%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# ASL 2.0: tornado
# MIT: handlebars
License: GPLv2 and ASL 2.0 and MIT
# GPL-2.0-only: pcs
# MIT: dacite
License: GPL-2.0-only AND MIT
URL: https://github.com/ClusterLabs/pcs
Summary: Pacemaker Configuration System
Group: System Environment/Base
Summary: Pacemaker/Corosync Configuration System
BuildArch: noarch
%global version_or_commit %{version}
# %%global version_or_commit f556c4adb538c8a95d763472d370f3f5d27eb38a
# Remove a tilde used by RPM to get the correct upstream version
%global clean_version %(echo %{version} | sed 's/~//')
# 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)
%endif
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.1
%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 rubygem_tilt_version 2.0.8
# 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
# and gems include binaries and thus it should live in /usr/lib64. But the
# path to tornado/gems is hardcoded in pcs sources. Modify hard links in pcs
# sources is not the way since then rpmdiff complains that the same file has
# different content in different architectures.
%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
# To build an official pcs-web-ui release, comment out ui_branch_or_commit
# Last tagged version, also used as fallback version for untagged tarballs
%global ui_version 0.1.23
%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)
%endif
%global ui_src_name pcs-web-ui-%{ui_version_or_commit}
#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
%global pyagentx_version 0.4.pcs.2
%global dacite_version 1.9.2
Source11: https://rubygems.org/downloads/tilt-%{rubygem_tilt_version}.gem
%global required_pacemaker_version 3.0.0
%global pcs_bundled_dir pcs_bundled
%global pcsd_webui_dir %{_prefix}/lib/pcsd/public/ui
%global cockpit_dir %{_datadir}/cockpit/
%global metainfo_dir %{_datadir}/metainfo
%global ui_metainfo_name org.clusterlabs.cockpit_pcs_web_ui.metainfo.xml
%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
%if "%{clean_version}" == "%{version_or_commit}"
%global v_prefix v
%endif
# part after the last slash is recognized as filename in look-aside cache
Source0: %{url}/archive/%{?v_prefix}%{version_or_commit}/%{pcs_source_name}.tar.gz
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
Source42: 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
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
# 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}
# Patch0: bz1656953-01-drop-removed-command-pcs-resource-show-from-help.patch
# git for patches
BuildRequires: git
#printf from coreutils is used in makefile
BuildRequires: git-core
# for building pcs tarballs
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: make
# printf from coreutils is used in makefile, head is used in spec
BuildRequires: coreutils
BuildRequires: execstack
# find is used in Makefile and also somewhere else
BuildRequires: findutils
# 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-pip
BuildRequires: python3-pyparsing
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)
# ruby and gems for pcsd
BuildRequires: ruby >= 2.2.0
BuildRequires: ruby >= 2.5.0
BuildRequires: ruby-devel
BuildRequires: rubygem-backports
BuildRequires: rubygem-childprocess
BuildRequires: rubygem-ethon
BuildRequires: rubygem-ffi
BuildRequires: rubygem-io-console
BuildRequires: rubygem-json
BuildRequires: rubygem-open4
BuildRequires: rubygem-rack
BuildRequires: rubygem-mustermann
BuildRequires: rubygem-puma
BuildRequires: (rubygem(rack) < 3 or (rubygem(rack) >= 3 and rubygem(rackup)))
BuildRequires: rubygem-rack-protection
BuildRequires: rubygem-rack-test
BuildRequires: rubygem-sinatra
BuildRequires: rubygem-tilt
%if 0%{?fedora} || 0%{?rhel} >= 9
BuildRequires: rubygem(rexml)
%endif
# ruby libraries for tests
BuildRequires: rubygem-test-unit
# for touching patch files (sanitization function)
BuildRequires: diffstat
# for post, preun and postun macros
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
BuildRequires: overpass-fonts
# for systemd scriptlet macros
BuildRequires: systemd-rpm-macros
# pam is used for authentication inside daemon (python ctypes)
# needed for tier0 tests during build
BuildRequires: pam
# for working with qdevice certificates (certutil) - used in configure.ac
BuildRequires: nss-tools
# pcs now provides a pc file
BuildRequires: pkgconfig
# cluster stack packages for pkg-config
# corosync has different package names on distributions but all provide
# corosync-devel
# corosync and pacemaker need versions and it's not working in virtual provides
BuildRequires: corosync-devel >= 3.0
BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version}
BuildRequires: pkgconfig(booth)
BuildRequires: pkgconfig(corosync-qdevice)
BuildRequires: pkgconfig(sbd)
# for validating cockpit-ha-cluster metainfo
BuildRequires: libappstream-glib
# for building web ui
BuildRequires: npm
# python and libraries for pcs, setuptools for pcs entrypoint
Requires: python3 >= 3.6
Requires: python3-cryptography
Requires: python3-dateutil >= 2.7.0
Requires: python3-lxml
Requires: python3-setuptools
Requires: python3-clufter => 0.70.0
Requires: python3-pycurl
Requires: python3-pyparsing
Requires: python3-tornado
# ruby and gems for pcsd
Requires: ruby >= 2.2.0
Requires: ruby >= 3.3.0
Requires: rubygem-backports
Requires: rubygem-childprocess
Requires: rubygem-ethon
Requires: rubygem-ffi
Requires: rubygem-json
Requires: rubygem-open4
Requires: rubygem-rack
Requires: rubygem-mustermann
Requires: rubygem-puma
Requires: (rubygem(rack) < 3 or (rubygem(rack) >= 3 and rubygem(rackup)))
Requires: rubygem-rack-protection
Requires: rubygem-rack-test
Requires: rubygem-sinatra
Requires: rubygem-tilt
%if 0%{?fedora} || 0%{?rhel} >= 9
Requires: rubygem(rexml)
%endif
# for killall
Requires: psmisc
# for working with certificates (validation etc.)
Requires: openssl
Requires: python3-pyOpenSSL
# cluster stack and related packages
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
# for post, preun and postun macros
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: pacemaker-cli >= %{required_pacemaker_version}
# 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
# for working with qdevice certificates (certutil)
Requires: nss-tools
Provides: bundled(tornado) = %{tornado_version}
Provides: bundled(rubygem-tilt) = %{rubygem_tilt_version}
%description
pcs is a corosync and pacemaker configuration tool. It permits users to
easily view, modify and create pacemaker based clusters.
Provides: bundled(dacite) = %{dacite_version}
# pcs-snmp package definition
%package -n %{pcs_snmp_pkg_name}
# pcs-snmp subpackage definition
%package -n %{pkg_pcs_snmp}
Group: System Environment/Base
Summary: Pacemaker cluster SNMP agent
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# GPL-2.0-only: pcs
# BSD-2-Clause: pyagentx
License: GPLv2 and BSD-2-Clause
License: GPL-2.0-only AND BSD-2-Clause
URL: https://github.com/ClusterLabs/pcs
BuildArch: noarch
# tar for unpacking pyagetx source tar ball
# tar for unpacking pyagentx source tarball
BuildRequires: tar
Requires: pcs = %{version}-%{release}
@ -175,12 +224,60 @@ Requires: net-snmp
Provides: bundled(pyagentx) = %{pyagentx_version}
%description -n %{pcs_snmp_pkg_name}
SNMP agent that provides information about pacemaker cluster to the master agent (snmpd)
# 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
Summary: Cockpit application for managing Pacemaker based clusters
License: GPL-2.0-only AND CC0-1.0
URL: https://github.com/ClusterLabs/pcs-web-ui
BuildRequires: make
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).
%description -n %{pkg_pcs_snmp}
SNMP agent that provides information about Pacemaker cluster to the main agent
(snmpd).
%description -n %{pkg_cockpit_ha_cluster}
Cockpit application for managing Pacemaker based clusters. Uses
Pacemaker/Corosync Configuration System (pcs) in the background.
%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
# .pyc/.pyo files across the multilib peers within a build
@ -197,7 +294,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
}
@ -216,87 +317,113 @@ 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
# -n <name> — Set Name of Build Directory
# -T — Do Not Perform Default Archive Unpacking
# -b <n> — Unpack The nth Sources Before Changing Directory
# -a <n> — Unpack The nth Sources After Changing Directory
# -N — disables automatic patch application, use autopatch to apply patches
#
# 1. unpack sources (-b 0)
# 2. then cd into sources tree (the setup macro itself)
# 3. then unpack node_modules into sources tree (-a 1).
%autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
%autopatch -p1 -m 201
# update_times_patch %%{PATCH201}
# 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 %%{PATCH1}
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
# prepare dirs/files necessary for building all bundles
# -----------------------------------------------------
# 1) configuration for rubygems
mkdir -p pcsd/.bundle
cp -f %SOURCE1 pcsd/.bundle/config
# 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
%endif
# 2) rubygems sources
mkdir -p %{rubygem_cache_dir}
cp -f %SOURCE11 %{rubygem_cache_dir}
%if 0%{?ui_tarball_version:1}
echo %{ui_tarball_version} > %{_builddir}/%{ui_src_name}/.tarball-version
%endif
# 3) dir for python bundles
mkdir -p %{bundled_src_dir}
# prepare dirs/files necessary for building python bundles
mkdir -p %{pcs_bundled_dir}/src
cp -f %SOURCE41 rpm/
cp -f %SOURCE42 rpm/
# 4) sources for pyagentx
tar -xzf %SOURCE41 -C %{bundled_src_dir}
mv %{bundled_src_dir}/pyagentx-%{pyagentx_version} %{bundled_src_dir}/pyagentx
update_times %SOURCE41 `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 %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
%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 \
--with-pcsd-default-cipherlist='PROFILE=SYSTEM' \
--with-pcs-lib-dir="%{_prefix}/lib" PYTHON=%{__python3}
make all
# Web UI installation
# Switch to web ui folder first
cd ../%{ui_src_name}
./autogen.sh
%{configure} \
--with-pcsd-webui-dir=%{pcsd_webui_dir} \
--with-cockpit-dir=%{cockpit_dir} \
--with-metainfo-dir=%{metainfo_dir}
make all
%install
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
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 \
# Install cockpit pcs-web-ui
cd ../%{ui_src_name}
%make_install
# 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}
# 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}
# main pcs install
make install \
DESTDIR=$RPM_BUILD_ROOT \
PREFIX=%{_prefix} \
SYSTEMD_UNIT_DIR=%{_unitdir} \
LIB_DIR=%{pcs_libdir} \
PYTHON=%{__python3} \
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` \
BUILD_GEMS=false \
SYSTEMCTL_OVERRIDE=true \
hdrdir="%{_includedir}" \
rubyhdrdir="%{_includedir}" \
includedir="%{_includedir}"
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
# prepare license files
cp %{pcs_bundled_dir}/src/pyagentx-*/LICENSE.txt pyagentx_LICENSE.txt
cp %{pcs_bundled_dir}/src/pyagentx-*/CONTRIBUTORS.txt pyagentx_CONTRIBUTORS.txt
cp %{pcs_bundled_dir}/src/pyagentx-*/README.md pyagentx_README.md
cp %{pcs_bundled_dir}/src/dacite-*/LICENSE dacite_LICENSE
cp %{pcs_bundled_dir}/src/dacite-*/README.md dacite_README.md
# 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
# Run validation of cockpit metainfo
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{ui_metainfo_name}
# 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
# variable disables the warning.
@ -312,18 +439,17 @@ 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 --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 \
test_result_python=$?
#run pcsd tests and remove them
pcsd_dir=$RPM_BUILD_ROOT%{pcs_libdir}/pcsd
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
ruby \
-I%{buildroot}%{_prefix}/lib/pcsd \
-Ipcsd/test \
pcsd/test/test_all_suite.rb
test_result_ruby=$?
if [ $test_result_python -ne 0 ]; then
@ -332,54 +458,51 @@ run_all_tests(){
return $test_result_ruby
}
remove_all_tests() {
pcsd_dir=$RPM_BUILD_ROOT%{pcs_libdir}/pcsd
#remove pcsd tests, we do not distribute them in the rpm
rm -r -v ${pcsd_dir}/test
# remove javascript testing files
rm -r -v ${pcsd_dir}/public/js/dev
}
run_all_tests
remove_all_tests
%post
%systemd_post pcsd.service
%post -n %{pcs_snmp_pkg_name}
%systemd_post pcs_snmp_agent.service
# Mark pcsd and pcs_snmp_agent for restart after upgrade
%posttrans
%systemd_posttrans_with_restart pcsd.service
%preun
%systemd_preun pcsd.service
%posttrans -n %{pkg_pcs_snmp}
%systemd_posttrans_with_restart pcs_snmp_agent.service
%preun -n %{pcs_snmp_pkg_name}
%systemd_preun pcs_snmp_agent.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
# 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
%postun
%systemd_postun_with_restart pcsd.service
%postun -n %{pcs_snmp_pkg_name}
%systemd_postun_with_restart pcs_snmp_agent.service
%files
%doc CHANGELOG.md
%doc README.md
%doc tornado_README.rst
%license tornado_LICENSE
%doc dacite_README.md
%license dacite_LICENSE
%license COPYING
%{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*
%{python3_sitelib}/*
%{_bindir}/pcs
%{_bindir}/pcsd
%{_prefix}/lib/pcs/*
%{_prefix}/lib/pkgconfig/pcs.pc
%{_prefix}/lib/pcsd/*
%{_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
@ -392,21 +515,25 @@ remove_all_tests
%ghost %config(noreplace) %attr(0644,root,root) %{_sharedstatedir}/pcsd/pcs_users.conf
%{_mandir}/man8/pcs.*
%{_mandir}/man8/pcsd.*
%exclude %{pcs_libdir}/pcsd/*.debian
%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.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
%exclude %{_prefix}/lib/pcs/pcs_snmp_agent
%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 %{pcs_snmp_pkg_name}
%{pcs_libdir}/pcs/pcs_snmp_agent
%{pcs_libdir}/pcs/bundled/packages/pyagentx*
%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
%{_prefix}/lib/pcs/%{pcs_bundled_dir}/packages/pyagentx*
%{_unitdir}/pcs_snmp_agent.service
%{_datadir}/snmp/mibs/PCMK-PCS*-MIB.txt
%{_mandir}/man8/pcs_snmp_agent.*
@ -417,7 +544,254 @@ remove_all_tests
%license COPYING
%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
* 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
* Tue Aug 6 2024 Michal Pospíšil <mpospisi@redhat.com> - 0.11.8-1
- Rebased to the latest sources (see CHANGELOG.md)
- Updated pcs-web-ui to 0.1.20
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 0.11.7-4
- Rebuilt for Python 3.13
* Mon Feb 5 2024 Michal Pospisil <mpospisi@redhat.com> - 0.11.7-3
- Fixed a bug preventing the Cockpit Application from being installed from Cockpit
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 8 2024 Michal Pospisil <mpospisi@redhat.com> - 0.11.7-1
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui to 0.1.18
- TLS cipher setting in pcsd now follows system-wide crypto policies by default
- Added cockpit-ha-cluster subpackage that adds pcs-web-ui as a Cockpit application
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 0.11.6-2
- Rebuilt for Python 3.12
* Wed Jun 21 2023 Michal Pospisil <mpospisi@redhat.com> - 0.11.6-1
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Removed dependency fedora-logos - favicon is now correctly provided by pcs-web-ui
- Resolves: rhbz#2109852 rhbz#2170648
* Wed Apr 12 2023 Michal Pospisil <mpospisi@redhat.com> - 0.11.5-2
- Fix displaying differences between configuration checkpoints in “pcs config checkpoint diff” command
- Fix “pcs stonith update-scsi-devices” command which was broken since Pacemaker-2.1.5-rc1
- Fixed loading of cluster status in the web interface when fencing levels are configured
- Fixed a vulnerability in pcs-web-ui-node-modules
- Swapped BuildRequires: npm for BuildRequires: nodejs-npm in Fedora 37 because of NodeJS packaging change
- Removed BuildRequires: rubygem-io-console
- Removed dependency rubygem-eventmachine
* Thu Feb 16 2023 Michal Pospisil <mpospisi@redhat.com> - 0.11.5-1
- Rebased to the latest upstream sources (see CHANGELOG.md)
- Fixed broken filtering in create resource/fence device wizards in the web interface
- Converted package to noarch
- Added creation of .tarball-version file needed by autotools when building from untagged commits and fixed Source0 link to the tarball on GitHub
- Modified build options of pcs for booth authfile fix for all Fedora versions
- Added BuildRequires: pam for tier0 tests during build
- Added BuildRequires: nodejs-npm for NodeJS packaging change since Fedora 38
- Removed bundled rubygem thin and its associated BuildRequires: rubygems, rubygem-bundler, rubygem-daemons, gcc, gcc-c++
- Added dependency rubygem-puma - replacement for rubygem thin
- Added dependency nss-tools - for working with qdevice certificates
- Added dependency fedora-logos - for the web interface favicon
- Removed dependencies: rubygem-daemons, rubygem(webrick)
- Resolves: rhbz#2166266
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.11.4-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
- Workaround for dnf dependency resolution confusion between nodejs16 vs nodejs
- Workaround for find-debuginfo.sh failure wrt ruby3.2 gem install change
* Mon Dec 12 2022 Michal Pospisil <mpospisi@redhat.com> - 0.11.4-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Added dependency rubygem-childprocess
- Removed dependency rubygem-open4
* Mon Dec 12 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.11.3-5
- Backport upstream patch for rubygem-json 2.6.3 error message format change
* Wed Sep 07 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-4
- Fixed ruby socket permissions
- Resolves: rhbz#2123389
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.11.3-2
- Rebuilt for pyparsing-3.0.9
* Tue Jun 28 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Resolves: rhbz#2068452
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.11.2-3
- Rebuilt for Python 3.11
* Thu Jun 09 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.2-2
- Python 3.11 related fixes
- Resolves: rhbz#bz2093935
* 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
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Oct 05 2021 Miroslav Lisik <mlisik@redhat.com> - 0.10.11-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Stop bundling rubygems daemons eventmachine mustermann rack rack-protection ruby2_keywords sinatra tilt
* Mon Aug 16 2021 Miroslav Lisik <mlisik@redhat.com> - 0.10.9-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Bundle rubygem-sinatra, rubygem-thin and their dependencies because they were orphaned
- Resolves: rhbz#1983359
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.10.8-3
- Rebuilt for Python 3.10
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.10.8-2
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* 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
- Updated bundled python dependency: dacite
- Changed BuildRequires from git to git-core
- Added conditional (Build)Requires: rubygem(rexml)
- Added conditional Requires: rubygem(webrick)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 7 2021 Vít Ondruch <vondruch@redhat.com> - 0.10.7-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0
* Thu Nov 26 2020 Ondrej Mular <omular@redhat.com> - 0.10.7-2
- Python 3.10 related fix
* Wed Sep 30 2020 Miroslav Lisik <mlisik@redhat.com> - 0.10.7-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Added dependency on python packages pyparsing and dateutil
- Fixed virtual bundle provides for ember, handelbars, jquery and jquery-ui
- Removed dependency on python3-clufter
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 21 2020 Miroslav Lisik <mlisik@redhat.com> - 0.10.6-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Stopped bundling tornado (use distribution package instead)
- Stopped bundling rubygem-tilt (use distribution package instead)
- Removed rubygem bundling
- Removed unneeded BuildRequires: execstack, gcc, gcc-c++
- Excluded some tests for tornado daemon
* Tue Jul 21 2020 Tom Stellard <tstellar@redhat.com> - 0.10.5-8
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jul 15 2020 Ondrej Mular <omular@redhat.com> - 0.10.5-7
- Use fixed upstream version of dacite with Python 3.9 support
- Split upstream tests in gating into tiers
* Fri Jul 03 2020 Ondrej Mular <omular@redhat.com> - 0.10.5-6
- Use patched version of dacite compatible with Python 3.9
- Resolves: rhbz#1838327
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.10.5-5
- Rebuilt for Python 3.9
* Thu May 07 2020 Ondrej Mular <omular@redhat.com> - 0.10.5-4
- Rebased to latest upstream sources (see CHANGELOG.md)
- Run only tier0 tests in check section
* Fri Apr 03 2020 Ondrej Mular <omular@redhat.com> - 0.10.5-3
- Enable gating
* Fri Mar 27 2020 Ondrej Mular <omular@redhat.com> - 0.10.5-2
- Remove usage of deprecated module xml.etree.cElementTree
- Resolves: rhbz#1817695
* Wed Mar 18 2020 Miroslav Lisik <mlisik@redhat.com> - 0.10.5-1
- Rebased to latest upstream sources (see CHANGELOG.md)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Nov 28 2019 Miroslav Lisik <mlisik@redhat.com> - 0.10.4-1
- Rebased to latest upstream sources (see CHANGELOG.md)
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.10.3-2
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Fri Aug 23 2019 Ondrej Mular <omular@redhat.com> - 0.10.3-1
- Rebased to latest upstream sources (see CHANGELOG.md)

32
plan-gating.fmf Normal file
View file

@ -0,0 +1,32 @@
summary: PCS gating test plan
description: Runs upstream tier0, tier1 and smoke tests
discover:
dist-git-source: true
dist-git-install-builddeps: true
how: shell
tests:
- name: tier0
test: |
./prepare-tests.sh
$TMT_SOURCE_DIR/pcs-*/pcs_test/suite --tier0 -v --vanilla --installed
duration: 10m
tier: 0
tag: fast
- name: tier1
test: |
./prepare-tests.sh
$TMT_SOURCE_DIR/pcs-*/pcs_test/suite --tier1 -v --vanilla --installed
duration: 2h
tier: 1
- name: smoke
test: |
systemctl start pcsd
./prepare-tests.sh
$TMT_SOURCE_DIR/pcs-*/pcs_test/smoke.sh
duration: 10m
tier: smoke
tag: fast
execute:
how: tmt

22
prepare-tests.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
set -eo xtrace
cd $TMT_SOURCE_DIR
# Use stamp file to abort if this script already ran
if [ -e tests-prepared-stamp ]; then exit 0; fi
# RPM 4.20 changed the builddir structure - unpacked sources go to *-build but
# tmt copies them back to pcs-*, so the pcs-*-build folder is empty
# Remove pcs-web-ui, pcs-*-build for "cd pcs-*" to have exactly one match
rm -rf pcs-web-ui-* pcs-*-build
cd pcs-*/
# Run autotools, use bundled dependencies from the system
export PYTHONPATH=/usr/lib/pcs/pcs_bundled/packages/
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
# Remove pcs sources to make sure tests are not using any of those files
rm -rf pcs
touch ../tests-prepared-stamp

8
rpminspect.yaml Normal file
View file

@ -0,0 +1,8 @@
xml:
# exclude ruby templates from checks
exclude_path: .*\.erb$
shellsyntax:
# exclude ruby templates from checks
ignore:
- /usr/lib*/pcsd/vendor/bundle/gems/thin*/lib/thin/controllers/*.erb

View file

@ -0,0 +1,148 @@
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 handlers 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

10
sources
View file

@ -1,7 +1,5 @@
SHA512 (pcsd-bundle-config-1) = f2a2df2dab39c2012cc6a91517716dde8f5a48788d1069c4addf619bc4dc45a98fd48f0f7964b5400e43e84fe96f942a550d2762553fea97e63dc7ad9b8be823
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (tilt-2.0.8.gem) = 1767f2e5ce45afe95d84d32de7c2b6fe24ff7cb6f7ee8485d84344820b2f6e969ae60a6fbaa7141f7fe135c6540d96fa5b27fd8010b95c0ded5d049a315001d5
SHA512 (pcs-web-ui-0.1.1.tar.gz) = 470356be3f934b078c10ac7027db9bc690511249909c3439c86ebbf93926e1047c128b8ec9e10d09f99b67d7657dfbf77f016bf2e6ddb32c97dccc5285dd7d64
SHA512 (pcs-web-ui-node-modules-0.1.1.tar.xz) = 8d8d53ebeca697bce5085c539a27cac5a17a7eaf35ec69b6e1412f95d64a2f3c876e77996e3c1d8c1edb1ebaf7dd3e7638dbe4ce94533738428b34a72acb8d42
SHA512 (pcs-0.10.3.tar.gz) = 57bb4fe57ce0170ae2e328b4305533ae9b2106bead4d8f35dfcbf80bff91daa99321ed917aeee8824acc029b80e28e8df17c684398b1f88f21eeadee611d53f7
SHA512 (tornado-6.0.3.tar.gz) = 8caaa64d14edcb3993dffea3175685d82afb0068a8e8834cbb6eb9e15883fe113bb57cd98d99c25362bef0a6ee2762f2baf24effd645ecd77f035583cc4de756
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