|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
Name: pcs
|
|
|
|
|
Version: 0.12.0~b1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
|
|
|
|
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
|
|
|
|
# GPL-2.0-only: pcs
|
|
|
|
@ -20,15 +20,30 @@ ExclusiveArch: x86_64 s390x ppc64le aarch64
|
|
|
|
|
|
|
|
|
|
# Remove a tilde used by RPM to get the correct upstream version
|
|
|
|
|
%global clean_version %(echo %{version} | sed 's/~//')
|
|
|
|
|
# When specifying a commit, use its long hash
|
|
|
|
|
%global version_or_commit %{clean_version}
|
|
|
|
|
# %%global version_or_commit 5b7d498915e0cc876b29fe9ebd709c061ac754db
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
%if "x{?branch_or_commit}" == "x"
|
|
|
|
|
%global version_or_commit %{clean_version}
|
|
|
|
|
%else
|
|
|
|
|
%global version_or_commit %{branch_or_commit}
|
|
|
|
|
%endif
|
|
|
|
|
%global pcs_source_name %{name}-%{version_or_commit}
|
|
|
|
|
|
|
|
|
|
# ui_commit can be determined by hash, tag or branch
|
|
|
|
|
%global ui_commit 0.1.21
|
|
|
|
|
# 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.21
|
|
|
|
|
# Use long commit hash or branch name to build an unreleased version
|
|
|
|
|
%global ui_branch_or_commit 34372d1268f065ed186546f55216aaa2d7e76b54
|
|
|
|
|
%if "x{?ui_branch_or_commit}" == "x"
|
|
|
|
|
%global ui_version_or_commit %{ui_version}
|
|
|
|
|
%else
|
|
|
|
|
%global ui_version_or_commit %{ui_branch_or_commit}
|
|
|
|
|
%endif
|
|
|
|
|
%global ui_src_name pcs-web-ui-%{ui_version_or_commit}
|
|
|
|
|
|
|
|
|
|
%global ui_modules_version 0.1.21
|
|
|
|
|
%global ui_src_name pcs-web-ui-%{ui_commit}
|
|
|
|
|
|
|
|
|
|
%global dacite_version 1.8.1
|
|
|
|
|
%global pyagentx_version 0.4.pcs.2
|
|
|
|
@ -68,7 +83,9 @@ ExclusiveArch: x86_64 s390x ppc64le aarch64
|
|
|
|
|
%global rubygem_cache_dir %{rubygem_bundle_dir}/cache
|
|
|
|
|
|
|
|
|
|
%global cockpit_dir %{_datadir}/cockpit/
|
|
|
|
|
%global ui_appstream_metainfo org.clusterlabs.cockpit_pcs_web_ui.metainfo.xml
|
|
|
|
|
%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_cockpit_ha_cluster cockpit-ha-cluster
|
|
|
|
@ -101,13 +118,14 @@ Source73: https://rubygems.org/downloads/rackup-%{version_rubygem_rackup}.gem
|
|
|
|
|
Source75: https://rubygems.org/downloads/sinatra-%{version_rubygem_sinatra}.gem
|
|
|
|
|
Source76: https://rubygems.org/downloads/tilt-%{version_rubygem_tilt}.gem
|
|
|
|
|
|
|
|
|
|
Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_commit}/%{ui_src_name}.tar.gz
|
|
|
|
|
Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
|
|
|
|
|
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: do-not-support-cluster-setup-with-udp-u-transport.patch
|
|
|
|
|
Patch2: show-info-page-instead-of-webui.patch
|
|
|
|
|
|
|
|
|
|
# ui patches: >200
|
|
|
|
|
# Patch201: name-web-ui.patch
|
|
|
|
@ -274,7 +292,7 @@ SNMP agent that provides information about pacemaker cluster to the master agent
|
|
|
|
|
(snmpd).
|
|
|
|
|
|
|
|
|
|
%description -n %{pkg_cockpit_ha_cluster}
|
|
|
|
|
Cockpit application for managing Pacemaker based clusters. Uses
|
|
|
|
|
RHEL web console add-on for managing Pacemaker based clusters. Uses
|
|
|
|
|
Pacemaker/Corosync Configuration System (pcs) in the background.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -322,21 +340,17 @@ update_times_patch(){
|
|
|
|
|
# * 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
|
|
|
|
|
# -q limits verbosity of %setup macro. Only tar -xof is executed instead of tar
|
|
|
|
|
# -xvvof. This option has to be used as first.
|
|
|
|
|
# This option is used to suppress a listing of all node_modules files that is
|
|
|
|
|
# too long and exceeds capacity of CI log
|
|
|
|
|
# -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).
|
|
|
|
|
%setup -q -T -b 100 -a 101 -n %{ui_src_name}
|
|
|
|
|
# patching is handled by applying the individual patches
|
|
|
|
|
# %%patch -P201
|
|
|
|
|
%autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
|
|
|
|
|
%autopatch -p1 -m 201
|
|
|
|
|
|
|
|
|
|
# update_times_patch %%{PATCH201}
|
|
|
|
|
|
|
|
|
@ -345,6 +359,7 @@ update_times_patch(){
|
|
|
|
|
%autopatch -p1 -M 200
|
|
|
|
|
# update_times_patch %%{PATCH1}
|
|
|
|
|
update_times_patch %{PATCH1}
|
|
|
|
|
update_times_patch %{PATCH2}
|
|
|
|
|
|
|
|
|
|
# generate .tarball-version if building from an untagged commit, not a released version
|
|
|
|
|
# autogen uses git-version-gen which uses .tarball-version for generating version number
|
|
|
|
@ -352,6 +367,10 @@ update_times_patch %{PATCH1}
|
|
|
|
|
echo "%{clean_version}+$(echo "%{version_or_commit}" | head -c 8)" > %{_builddir}/%{pcs_source_name}/.tarball-version
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
# 1) rubygems sources
|
|
|
|
@ -399,7 +418,8 @@ cd ../%{ui_src_name}
|
|
|
|
|
./autogen.sh
|
|
|
|
|
%{configure} \
|
|
|
|
|
--disable-standalone \
|
|
|
|
|
--with-cockpit-dir=%{cockpit_dir}
|
|
|
|
|
--with-cockpit-dir=%{cockpit_dir} \
|
|
|
|
|
--with-metainfo-dir=%{metainfo_dir}
|
|
|
|
|
make all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -411,10 +431,6 @@ pwd
|
|
|
|
|
# Install cockpit pcs-web-ui
|
|
|
|
|
cd ../%{ui_src_name}
|
|
|
|
|
%make_install
|
|
|
|
|
# Workaround - metainfo should be installed by make install
|
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/metainfo
|
|
|
|
|
cp -r %{_builddir}/%{ui_src_name}/packages/app/%{ui_appstream_metainfo} \
|
|
|
|
|
%{buildroot}%{_datadir}/metainfo/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Install pcs
|
|
|
|
@ -488,7 +504,7 @@ rm -fv %{buildroot}/%{_libdir}/pcsd/vendor/bundle/gems/tilt-*/bin/tilt
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# Run validation of cockpit metainfo
|
|
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{ui_appstream_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
|
|
|
|
@ -613,7 +629,7 @@ run_all_tests
|
|
|
|
|
%exclude %{_libdir}/pcs/pcs_snmp_agent
|
|
|
|
|
%exclude %{_libdir}/pcs/%{pcs_bundled_dir}/packages/pyagentx*
|
|
|
|
|
%exclude %{_datadir}/cockpit
|
|
|
|
|
%exclude %{_datadir}/metainfo/%{ui_appstream_metainfo}
|
|
|
|
|
%exclude %{ui_metainfo}
|
|
|
|
|
|
|
|
|
|
%files -n %{pkg_pcs_snmp}
|
|
|
|
|
%{_libdir}/pcs/pcs_snmp_agent
|
|
|
|
@ -630,10 +646,17 @@ run_all_tests
|
|
|
|
|
|
|
|
|
|
%files -n %{pkg_cockpit_ha_cluster}
|
|
|
|
|
%{cockpit_dir}
|
|
|
|
|
%{_datadir}/metainfo/%{ui_appstream_metainfo}
|
|
|
|
|
%{ui_metainfo}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Dec 12 2024 Michal Pospíšil <mpospisi@redhat.com> - 0.12.0~b1-2
|
|
|
|
|
- Rebased pcs to the latest sources (see CHANGELOG.md)
|
|
|
|
|
Resolves: RHEL-7602, RHEL-12709, RHEL-44719
|
|
|
|
|
- Rebased HA Cluster Management add-on to the latest sources
|
|
|
|
|
- Point users from pcs-web-ui to HA Cluster Management add-on
|
|
|
|
|
Resolves: RHEL-68363
|
|
|
|
|
|
|
|
|
|
* Wed Nov 13 2024 Michal Pospíšil <mpospisi@redhat.com> - 0.12.0~b1-1
|
|
|
|
|
- Rebased to the latest sources (see CHANGELOG.md)
|
|
|
|
|
Resolves: RHEL-21047, RHEL-33386, RHEL-38483, RHEL-44432, RHEL-48220, RHEL-49520, RHEL-49521, RHEL-49524, RHEL-49527, RHEL-55723, RHEL-61747, RHEL-61889, RHEL-62719
|
|
|
|
|