pcs-0.11.7-4

- initial c10s build
- removed %{eln} macro
- support packaging change of nodejs from streams to versioned packages
- only `enable-booth-enable-authfile-unset` option is present
- removed BuildRequires: python3-setuptools_scm - was needed for bundling dateutil
- updated gating policy
- added diffstat to gating fmf plan, rpmbuild failed during patching
- fixed paths to bundled modules in prepare-env.sh, removed distro workaround
- Bundled Python dependencies: dacite, pyagentx, pycurl, tornado
  Resolves: RHEL-26339
- Bundled rubygems: backports, childprocess, ethon, ffi, mustermann, nio3r, puma, rack, rack-protection, rack-test, ruby2_keywords, sinatra, tilt
- Converted pcs and pcs-snmp to be architecture dependent, cockpit-ha-cluster remains noarch
This commit is contained in:
Michal Pospisil 2024-04-12 12:40:56 +02:00
parent 655b3251b0
commit 72da5ce3c7
7 changed files with 301 additions and 205 deletions

129
.gitignore vendored
View File

@ -1,117 +1,20 @@
/pcs-0.9.1.tar.gz
/pcs-0.9.2.tar.gz
/pcs-0.9.2.1.tar.gz
/pcs-0.9.2.4.tar.gz
/pcs-0.9.3.linux-x86_64.tar.gz
/pcs-0.9.3.1.linux-x86_64.tar.gz
/pcs-0.9.3.1.tar.gz
/pcs-0.9.12.tar.gz
/pcs-0.9.19.tar.gz
/pcs-0.9.22.tar.gz
/pcs-0.9.23.tar.gz
/pcs-0.9.24.tar.gz
/pcs-0.9.26.tar.gz
/pcsd.tar.gz
/pcs-0.9.27.tar.gz
/pcs-0.9.32.tar.gz
/pcs-0.9.33.tar.gz
/pcs-0.9.36.tar.gz
/pcs-0.9.39.tar.gz
/pcs-0.9.41.tar.gz
/pcs-0.9.44.tar.gz
/pcs-0.9.48.tar.gz
/pcs-withgems-0.9.102.tar.gz
/pcs-withgems-0.9.115.tar.gz
/pcs-withgems-0.9.139.tar.gz
/pcs-withgems-0.9.140.tar.gz
/pcs-withgems-0.9.141.tar.gz
/pcs-withgems-0.9.144.tar.gz
/pcs-0.9.149.tar.gz
/monkey-lib-0.5.4.gem
/orderedhash-0.0.6.gem
/rpam-ruby19-1.2.1.gem
/sinatra-contrib-1.4.4.gem
/sinatra-sugar-0.5.1.gem
/pcsd-bundle-config-1
/pcs-0.9.150.tar.gz
/pcs-0.9.154.tar.gz
/sinatra-contrib-1.4.7.gem
/rack-1.6.4.gem
/sinatra-1.4.7.gem
/pcs-0.9.155.tar.gz
/pcs-0.9.156.tar.gz
/sinatra-1.4.8.gem
/tilt-2.0.6.gem
/pcs-0.9.159.tar.gz
/rack-protection-1.5.3.gem
/pcs-0.9.160.tar.gz
/pcs-0.9.163.tar.gz
/pyagentx-0.4.pcs.2.tar.gz
/sinatra-contrib-2.0.0.gem
/pcs-0.9.164.tar.gz
/pcs-0.10.0.1.tar.gz
/tornado-5.0.2.tar.gz
/pcs-0.10.0.alpha.1.tar.gz
/sinatra-contrib-2.0.3.gem
/pcs-0.10.0.alpha.2.tar.gz
/tilt-2.0.8.gem
/pcs-0.10.0.alpha.6.tar.gz
/pcs-0.10.1.tar.gz
/pcs-0.10.2.tar.gz
/pcs-web-ui-0.1.1.tar.gz
/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
/backports-3.24.1.gem
/childprocess-4.1.0.gem
/dacite-1.8.1.tar.gz
/ethon-0.16.0.gem
/ffi-1.16.3.gem
/mustermann-3.0.0.gem
/nio4r-2.5.9.gem
/pcs-0.11.7.tar.gz
/pcs-web-ui-0.1.18.tar.gz
/pcs-web-ui-node-modules-0.1.18.tar.xz
/puma-6.4.0.gem
/pyagentx-0.4.pcs.2.tar.gz
/pycurl-7.45.3.tar.gz
/rack-2.2.8.1.gem
/rack-protection-3.1.0.gem
/rack-test-2.1.0.gem
/ruby2_keywords-0.0.5.gem
/sinatra-3.1.0.gem
/tilt-2.3.0.gem
/tornado-6.3.3.tar.gz

View File

@ -0,0 +1,41 @@
From b27e513fb6e17016c82b551e3a966bebc7ab327c Mon Sep 17 00:00:00 2001
From: Michal Pospisil <mpospisi@redhat.com>
Date: Thu, 11 Apr 2024 11:01:19 +0200
Subject: [PATCH] fix dependency checking
Bundling pycurl was not allowed and the check was failing during builds.
The check for setuptools_scm was also removed as we no longer bundle
dateutil anywhere with pcs-0.11.
---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5d3e28cf..5881c048 100644
--- a/configure.ac
+++ b/configure.ac
@@ -334,13 +334,11 @@ AM_CONDITIONAL([PIP_HAS_ISOLATION], [test "x$have_isolation" = xyes])
if test "x$tests_only" != "xyes"; then
PCS_CHECK_PYMOD([setuptools])
- PCS_CHECK_PYMOD([setuptools-scm])
if test "x$local_build" = "xyes"; then
PCS_CHECK_PYMOD([wheel])
fi
PCS_CHECK_PYMOD([cryptography])
PCS_CHECK_PYMOD([lxml])
- PCS_CHECK_PYMOD([pycurl])
PCS_CHECK_PYMOD([pyparsing])
# those are kind of problematic.
@@ -348,6 +346,7 @@ if test "x$tests_only" != "xyes"; then
PCS_CHECK_PYMOD([dacite], [], [yes])
PCS_CHECK_PYMOD([tornado], [>= 6.0.0], [yes])
PCS_CHECK_PYMOD([python-dateutil], [>= 2.7.0], [yes])
+ PCS_CHECK_PYMOD([pycurl], [], [yes])
# special case, because we need to download from github
AC_PIP_MODULE([pyagentx])
--
2.44.0

View File

@ -27,6 +27,7 @@ prepare:
- autoconf
- automake
- make
- diffstat
- rpm-build
- ruby-devel
- git-core

View File

@ -1,14 +1,7 @@
# recipients: idevat,mlisik,mpospisi,omular,tojeline
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
- rhel-10
decision_context: osci_compose_gate
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}
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

295
pcs.spec
View File

@ -1,15 +1,23 @@
Name: pcs
Version: 0.11.7
Release: 3%{?dist}
Release: 4%{?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
# MIT: dacite
License: GPL-2.0-only AND MIT
# Apache-2.0: tornado
# MIT: backports, childprocess, dacite, ethon, mustermann, rack,
# rack-protection, rack-test, sinatra, tilt
# MIT and (BSD-2-Clause or GPL-2.0-or-later): nio4r
# BSD-2-Clause or Ruby: ruby2_keywords
# BSD-3-Clause: puma
# BSD-3-Clause and MIT: ffi
# curl OR LGPL-2.1-or-later: python-pycurl
License: GPL-2.0-only AND Apache-2.0 AND MIT AND BSD-3-Clause AND (BSD-2-Clause OR Ruby) AND (BSD-2-Clause OR GPL-2.0-or-later) AND (curl OR LGPL-2.1-or-later)
URL: https://github.com/ClusterLabs/pcs
Group: System Environment/Base
Summary: Pacemaker/Corosync Configuration System
BuildArch: noarch
# Building only for architectures with pacemaker and corosync available
ExclusiveArch: x86_64 s390x ppc64le aarch64
# When specifying a commit, use its long hash
%global version_or_commit %{version}
@ -21,13 +29,44 @@ BuildArch: noarch
%global ui_modules_version 0.1.18
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pyagentx_version 0.4.pcs.2
%global dacite_version 1.8.1
%global dacite_version 1.8.1
%global pyagentx_version 0.4.pcs.2
%global tornado_version 6.3.3
%global pycurl_version 7.45.3
# we always need to get an URL from the PyPi
%global pycurl_src_url_prefix https://files.pythonhosted.org/packages/c9/5a/e68b8abbc1102113b7839e708ba04ef4c4b8b8a6da392832bb166d09ea72
# During its initialization, PycURL checks that the actual libcurl version
# is not lower than the one used when PycURL was built.
# Yes, that should be handled by library versioning (which would then get
# automatically reflected by rpm).
# For now, we have to reflect that dependency.
%global libcurl_sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q'
%global curlver_h /usr/include/curl/curlver.h
%global libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0)
%global version_rubygem_backports 3.24.1
%global version_rubygem_childprocess 4.1.0
%global version_rubygem_ethon 0.16.0
%global version_rubygem_ffi 1.16.3
%global version_rubygem_mustermann 3.0.0
%global version_rubygem_nio4r 2.5.9
%global version_rubygem_puma 6.4.0
%global version_rubygem_rack 2.2.8.1
%global version_rubygem_rack_protection 3.1.0
%global version_rubygem_rack_test 2.1.0
%global version_rubygem_ruby2_keywords 0.0.5
%global version_rubygem_sinatra 3.1.0
%global version_rubygem_tilt 2.3.0
%global required_pacemaker_version 2.1.0
%global pcs_bundled_dir pcs_bundled
%global pcsd_public_dir pcsd/public
%global rubygem_bundle_dir pcsd/vendor/bundle
%global rubygem_cache_dir %{rubygem_bundle_dir}/cache
%global ui_build_dir_standalone build_standalone
%global ui_build_dir_cockpit build_cockpit
%global ui_cockpit_dest ha-cluster
@ -44,20 +83,39 @@ BuildArch: noarch
# 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/konradhalas/dacite/archive/v%{dacite_version}/dacite-%{dacite_version}.tar.gz
Source21: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacite-%{dacite_version}.tar.gz
Source22: https://github.com/ondrejmular/pyagentx/archive/v%{pyagentx_version}/pyagentx-%{pyagentx_version}.tar.gz
Source23: %{pycurl_src_url_prefix}/pycurl-%{pycurl_version}.tar.gz
Source24: https://github.com/tornadoweb/tornado/archive/v%{tornado_version}/tornado-%{tornado_version}.tar.gz
Source61: https://rubygems.org/downloads/backports-%{version_rubygem_backports}.gem
Source62: https://rubygems.org/downloads/childprocess-%{version_rubygem_childprocess}.gem
Source63: https://rubygems.org/downloads/ethon-%{version_rubygem_ethon}.gem
Source64: https://rubygems.org/downloads/ffi-%{version_rubygem_ffi}.gem
Source65: https://rubygems.org/downloads/mustermann-%{version_rubygem_mustermann}.gem
Source66: https://rubygems.org/downloads/nio4r-%{version_rubygem_nio4r}.gem
Source67: https://rubygems.org/downloads/puma-%{version_rubygem_puma}.gem
Source68: https://rubygems.org/downloads/rack-%{version_rubygem_rack}.gem
Source69: https://rubygems.org/downloads/rack-protection-%{version_rubygem_rack_protection}.gem
Source70: https://rubygems.org/downloads/rack-test-%{version_rubygem_rack_test}.gem
Source71: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_keywords}.gem
Source72: https://rubygems.org/downloads/sinatra-%{version_rubygem_sinatra}.gem
Source73: 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
# pcs patches: <= 200
# Patch0: name.patch
# Patch1: name.patch
Patch1: fix-dependency-checking.patch
# ui patches: >200
# Patch201: name-web-ui.patch
Patch201: make-AppStream-metainfo-more-descriptive.patch
Patch202: metainfo-fix-outdated-extends-id.patch
# git for patches
BuildRequires: git-core
BuildRequires: make
@ -65,38 +123,28 @@ BuildRequires: make
BuildRequires: coreutils
# python for pcs
BuildRequires: python3 >= 3.9
BuildRequires: python3-cryptography
BuildRequires: python3-dateutil >= 2.7.0
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pycurl
BuildRequires: python3-lxml
BuildRequires: python3-pip
BuildRequires: python3-pyparsing
BuildRequires: python3-tornado
BuildRequires: python3-cryptography
BuildRequires: python3-lxml
BuildRequires: python3-setuptools
# for building bundled python packages
BuildRequires: python3-wheel
# for bundled python dateutil
# dateutil was unbundled in Fedora but our autotools still check for it
BuildRequires: python3-setuptools_scm
# gcc for compiling custom rubygems and python extensions
BuildRequires: gcc
BuildRequires: gcc-c++
# dependencies for pycurl
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
# ruby and gems for pcsd
BuildRequires: ruby >= 2.5.0
BuildRequires: ruby-devel
BuildRequires: rubygem-backports
BuildRequires: rubygem-childprocess
BuildRequires: rubygem-ethon
BuildRequires: rubygem-ffi
BuildRequires: rubygems
BuildRequires: rubygem-bundler
BuildRequires: rubygem-json
BuildRequires: rubygem-mustermann
BuildRequires: rubygem-puma
BuildRequires: rubygem-rack
BuildRequires: rubygem-rack-protection
BuildRequires: rubygem-rack-test
BuildRequires: rubygem-sinatra
BuildRequires: rubygem-tilt
%if 0%{?fedora} || 0%{?eln} || 0%{?rhel} >= 9
BuildRequires: rubygem(rexml)
%endif
BuildRequires: rubygem-rexml
# ruby libraries for tests
BuildRequires: rubygem-test-unit
# for touching patch files (sanitization function)
@ -116,9 +164,7 @@ BuildRequires: nodejs-npm
BuildRequires: booth
BuildRequires: corosync-qdevice-devel
BuildRequires: corosynclib-devel >= 3.0
BuildRequires: fence-agents-common
BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version}
BuildRequires: resource-agents
BuildRequires: sbd
# for validating cockpit-ha-cluster metainfo
@ -130,27 +176,15 @@ Requires: python3 >= 3.9
Requires: python3-cryptography
Requires: python3-dateutil >= 2.7.0
Requires: python3-lxml
Requires: python3-setuptools
Requires: python3-pycurl
Requires: python3-pyparsing
Requires: python3-tornado
Requires: python3-setuptools
# ruby and gems for pcsd
Requires: ruby >= 2.5.0
Requires: rubygem-backports
Requires: rubygem-childprocess
Requires: rubygem-ethon
Requires: rubygem-ffi
Requires: rubygems
Requires: rubygem-json
Requires: rubygem-mustermann
Requires: rubygem-puma
Requires: rubygem-rack
Requires: rubygem-rack-protection
Requires: rubygem-rack-test
Requires: rubygem-sinatra
Requires: rubygem-tilt
%if 0%{?fedora} || 0%{?eln} || 0%{?rhel} >= 9
Requires: rubygem(rexml)
%endif
Requires: rubygem-rexml
# for pycurl
Requires: libcurl%{?_isa} >= %{libcurl_ver}
# for killall
Requires: psmisc
# cluster stack and related packages
@ -174,6 +208,22 @@ Requires: nss-tools
Provides: bundled(dacite) = %{dacite_version}
Provides: bundled(pycurl) = %{pycurl_version}
Provides: bundled(tornado) = %{tornado_version}
Provides: bundled(backports) = %{version_rubygem_backports}
Provides: bundled(childprocess) = %{version_rubygem_childprocess}
Provides: bundled(ethon) = %{version_rubygem_ethon}
Provides: bundled(ffi) = %{version_rubygem_ffi}
Provides: bundled(mustermann) = %{version_rubygem_mustermann}
Provides: bundled(nio4r) = %{version_rubygem_nio4r}
Provides: bundled(puma) = %{version_rubygem_puma}
Provides: bundled(rack) = %{version_rubygem_rack}
Provides: bundled(rack_protection) = %{version_rubygem_rack_protection}
Provides: bundled(rack_test) = %{version_rubygem_rack_test}
Provides: bundled(ruby2_keywords) = %{version_rubygem_ruby2_keywords}
Provides: bundled(sinatra) = %{version_rubygem_sinatra}
Provides: bundled(tilt) = %{version_rubygem_tilt}
# pcs-snmp subpackage definition
@ -185,7 +235,6 @@ Summary: Pacemaker cluster SNMP agent
# BSD-2-Clause: pyagentx
License: GPL-2.0-only AND BSD-2-Clause
URL: https://github.com/ClusterLabs/pcs
BuildArch: noarch
# tar for unpacking pyagentx source tarball
BuildRequires: tar
@ -202,6 +251,7 @@ 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
BuildArch: noarch
BuildRequires: make
BuildRequires: npm
@ -222,8 +272,8 @@ SNMP agent that provides information about pacemaker cluster to the master agent
Cockpit application for managing Pacemaker based clusters. Uses
Pacemaker/Corosync Configuration System (pcs) in the background.
%prep
%prep
# -- 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
@ -276,7 +326,8 @@ update_times_patch %%{PATCH202}
# patch pcs sources
%autosetup -S git -n %{pcs_source_name} -N
%autopatch -p1 -M 200
# update_times_patch %%{PATCH0}
# update_times_patch %%{PATCH1}
update_times_patch %{PATCH1}
# 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
@ -285,26 +336,41 @@ update_times_patch %%{PATCH202}
%endif
# prepare dirs/files necessary for building python bundles
# -----------------------------------------------------
# 1) rubygems sources
mkdir -p %{rubygem_cache_dir}
cp -f %SOURCE61 %{rubygem_cache_dir}
cp -f %SOURCE62 %{rubygem_cache_dir}
cp -f %SOURCE63 %{rubygem_cache_dir}
cp -f %SOURCE64 %{rubygem_cache_dir}
cp -f %SOURCE65 %{rubygem_cache_dir}
cp -f %SOURCE66 %{rubygem_cache_dir}
cp -f %SOURCE67 %{rubygem_cache_dir}
cp -f %SOURCE68 %{rubygem_cache_dir}
cp -f %SOURCE69 %{rubygem_cache_dir}
cp -f %SOURCE70 %{rubygem_cache_dir}
cp -f %SOURCE71 %{rubygem_cache_dir}
cp -f %SOURCE72 %{rubygem_cache_dir}
cp -f %SOURCE73 %{rubygem_cache_dir}
# 2) prepare python bundles
mkdir -p %{pcs_bundled_dir}/src
cp -f %SOURCE41 rpm/
cp -f %SOURCE42 rpm/
cp -f %SOURCE21 rpm/
cp -f %SOURCE22 rpm/
cp -f %SOURCE23 rpm/
cp -f %SOURCE24 rpm/
%build
%define debug_package %{nil}
# Booth authfile fix support
# Fedora 37, 38, ELN = RHEL10: unset only
# Fedora 39+: no booth build options
%if 0%{?fedora} <= 38 || 0%{?eln}
%define booth_build_options --enable-booth-enable-authfile-unset
%endif
./autogen.sh
%{configure} --enable-local-build --enable-use-local-cache-only \
--enable-individual-bundling %{?booth_build_options} \
--enable-individual-bundling --enable-booth-enable-authfile-unset \
--with-pcsd-default-cipherlist='PROFILE=SYSTEM' \
--with-pcs-lib-dir="%{_prefix}/lib" PYTHON=%{__python3}
PYTHON=%{__python3} ruby_CFLAGS="%{optflags}" ruby_LIBS="%{build_ldflags}"
make all
# build pcs-web-ui
@ -326,9 +392,13 @@ pwd
%make_install
# RHEL-7716 - fix rubygem permissions - remove write access for owner's group
# and other users
chmod --recursive g-w,o-w ${RPM_BUILD_ROOT}%{_libdir}/%{rubygem_bundle_dir}
# install standalone pcs-web-ui
cp -r %{_builddir}/%{ui_src_name}/%{ui_build_dir_standalone} \
${RPM_BUILD_ROOT}%{_prefix}/lib/%{pcsd_public_dir}/ui
${RPM_BUILD_ROOT}%{_libdir}/%{pcsd_public_dir}/ui
# install cockpit pcs-web-ui
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/cockpit/%{ui_cockpit_dest}
@ -340,12 +410,53 @@ cp -r %{_builddir}/%{ui_src_name}/packages/app/%{ui_appstream_metainfo} \
${RPM_BUILD_ROOT}%{_datadir}/metainfo/
# prepare license files
mv %{rubygem_bundle_dir}/gems/backports-%{version_rubygem_backports}/LICENSE.txt backports_LICENSE.txt
mv %{rubygem_bundle_dir}/gems/childprocess-%{version_rubygem_childprocess}/LICENSE childprocess_LICENSE
mv %{rubygem_bundle_dir}/gems/ethon-%{version_rubygem_ethon}/LICENSE ethon_LICENSE
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/COPYING ffi_COPYING
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE ffi_LICENSE
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE.SPECS ffi_LICENSE.SPECS
mv %{rubygem_bundle_dir}/gems/mustermann-%{version_rubygem_mustermann}/LICENSE mustermann_LICENSE
mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/license.md nio4r_license.md
mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/ext/libev/LICENSE nio4r_libev_LICENSE
mv %{rubygem_bundle_dir}/gems/puma-%{version_rubygem_puma}/LICENSE puma_LICENSE
mv %{rubygem_bundle_dir}/gems/rack-%{version_rubygem_rack}/MIT-LICENSE rack_MIT-LICENSE
mv %{rubygem_bundle_dir}/gems/rack-protection-%{version_rubygem_rack_protection}/License rack-protection_License
mv %{rubygem_bundle_dir}/gems/rack-test-%{version_rubygem_rack_test}/MIT-LICENSE.txt rack-test_MIT-LICENSE.txt
mv %{rubygem_bundle_dir}/gems/ruby2_keywords-%{version_rubygem_ruby2_keywords}/LICENSE ruby2_keywords_LICENSE
mv %{rubygem_bundle_dir}/gems/sinatra-%{version_rubygem_sinatra}/LICENSE sinatra_LICENSE
mv %{rubygem_bundle_dir}/gems/tilt-%{version_rubygem_tilt}/COPYING tilt_COPYING
cp %{pcs_bundled_dir}/src/dacite-*/LICENSE dacite_LICENSE
cp %{pcs_bundled_dir}/src/dacite-*/README.md dacite_README.md
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
cp %{pcs_bundled_dir}/src/pycurl-*/COPYING-LGPL pycurl_COPYING-LGPL
cp %{pcs_bundled_dir}/src/pycurl-*/COPYING-MIT pycurl_COPYING-MIT
cp %{pcs_bundled_dir}/src/pycurl-*/README.rst pycurl_README.rst
cp %{pcs_bundled_dir}/src/tornado-*/LICENSE tornado_LICENSE
cp %{pcs_bundled_dir}/src/tornado-*/README.rst tornado_README.rst
# We are not building debug package for pcs but we need to add MiniDebuginfo
# to the bundled shared libraries from rubygem extensions in order to satisfy
# rpminspect's binary stripping checker.
# Therefore we call find-debuginfo from debugedit manually in order to strip
# binaries and add MiniDebugInfo with .gnu_debugdata section
find-debuginfo -j2 -m -i -S debugsourcefiles.list
# find-debuginfo generated some files into /usr/lib/debug and
# /usr/src/debug/ that we don't want in the package
rm -rf $RPM_BUILD_ROOT%{_libdir}/debug
rm -rf $RPM_BUILD_ROOT/usr/lib/debug
rm -rf $RPM_BUILD_ROOT%{_prefix}/src/debug
# We can remove files required for gem compilation
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/ext
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/ext
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{rubygem_bundle_dir}/gems/puma-%{version_rubygem_puma}/ext
%check
@ -367,6 +478,8 @@ run_all_tests(){
# disabled tests:
#
# pcs_test.tier0.daemon.app.test_app_remote.SyncConfigMutualExclusive
# disabled due to race conditions on slower machines
%{__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 \
@ -374,8 +487,8 @@ run_all_tests(){
test_result_python=$?
#run pcsd tests and remove them
ruby \
-I$RPM_BUILD_ROOT%{_prefix}/lib/pcsd \
GEM_HOME=$RPM_BUILD_ROOT%{_libdir}/%{rubygem_bundle_dir} ruby \
-I$RPM_BUILD_ROOT%{_libdir}/pcsd \
-Ipcsd/test \
pcsd/test/test_all_suite.rb
test_result_ruby=$?
@ -417,17 +530,41 @@ run_all_tests
%postun -n %{pkg_pcs_snmp}
%systemd_postun_with_restart pcs_snmp_agent.service
%files
%doc CHANGELOG.md
%doc README.md
%doc dacite_README.md
%license dacite_LICENSE
%doc tornado_README.rst
%doc pycurl_README.rst
%license COPYING
# python dependency licenses
%license dacite_LICENSE
%license tornado_LICENSE
%license pycurl_COPYING-LGPL
%license pycurl_COPYING-MIT
# rubygem licenses
%license backports_LICENSE.txt
%license childprocess_LICENSE
%license ethon_LICENSE
%license ffi_COPYING
%license ffi_LICENSE
%license ffi_LICENSE.SPECS
%license mustermann_LICENSE
%license nio4r_license.md
%license nio4r_libev_LICENSE
%license puma_LICENSE
%license rack_MIT-LICENSE
%license rack-protection_License
%license rack-test_MIT-LICENSE.txt
%license ruby2_keywords_LICENSE
%license sinatra_LICENSE
%license tilt_COPYING
%{python3_sitelib}/*
%{_sbindir}/pcs
%{_sbindir}/pcsd
%{_prefix}/lib/pcs/*
%{_prefix}/lib/pcsd/*
%{_libdir}/pcs/*
%{_libdir}/pcsd/*
%{_unitdir}/pcsd.service
%{_unitdir}/pcsd-ruby.service
%{_datadir}/bash-completion/completions/pcs
@ -445,14 +582,14 @@ run_all_tests
%ghost %config(noreplace) %attr(0644,root,root) %{_sharedstatedir}/pcsd/pcs_users.conf
%{_mandir}/man8/pcs.*
%{_mandir}/man8/pcsd.*
%exclude %{_prefix}/lib/pcs/pcs_snmp_agent
%exclude %{_prefix}/lib/pcs/%{pcs_bundled_dir}/packages/pyagentx*
%exclude %{_libdir}/pcs/pcs_snmp_agent
%exclude %{_libdir}/pcs/%{pcs_bundled_dir}/packages/pyagentx*
%exclude %{_datadir}/cockpit
%exclude %{_datadir}/metainfo/%{ui_appstream_metainfo}
%files -n %{pkg_pcs_snmp}
%{_prefix}/lib/pcs/pcs_snmp_agent
%{_prefix}/lib/pcs/%{pcs_bundled_dir}/packages/pyagentx*
%{_libdir}/pcs/pcs_snmp_agent
%{_libdir}/pcs/%{pcs_bundled_dir}/packages/pyagentx*
%{_unitdir}/pcs_snmp_agent.service
%{_datadir}/snmp/mibs/PCMK-PCS*-MIB.txt
%{_mandir}/man8/pcs_snmp_agent.*
@ -469,6 +606,12 @@ run_all_tests
%changelog
* Wed Apr 10 2024 Michal Pospíšil <mpospisi@redhat.com> - 0.11.7-4
- Bundled Python dependencies: dacite, pyagentx, pycurl, tornado
Resolves: RHEL-26339
- Bundled rubygems: backports, childprocess, ethon, ffi, mustermann, nio4r, puma, rack, rack-protection, rack-test, ruby2_keywords, sinatra, tilt
- Converted pcs and pcs-snmp to be architecture dependent, cockpit-ha-cluster remains noarch
* 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

View File

@ -10,9 +10,9 @@ rm -rfv builddir/*SPECPARTS
rm -rf builddir/pcs-web-ui-*
cd builddir/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/
export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/
export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/
./autogen.sh
./configure --with-pcs-lib-dir=/usr/lib --with-distro=fedora
./configure
# Remove pcs sources to make sure tests are not using any of those files
rm -rf pcs

19
sources
View File

@ -1,5 +1,20 @@
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (backports-3.24.1.gem) = b2eeb76ebf8ddfc7e349e125c6b9cffcabe3d184533579dbf2abb5f663ce85f4a6f8b01b67be4030c98f4782c63511046a1a1efa4d573a9aeb700dcbb9f9f566
SHA512 (childprocess-4.1.0.gem) = e635c3acfa5ad85891c3879f240c7e96d47d7d5ec3f472f4ce6661552b0fb7bd72c5e3b9fb73f4f9312b749fbe554b4be388e56a31a3c63c39743d055d774def
SHA512 (dacite-1.8.1.tar.gz) = 4b40c0bdcf5490bcc77de9e7f04b7267642bcfd41e4168607a5457f38abe3ad4b3041d8a23cb43af76de14eabee45f900ad5ddf7af8f70a2be4850bccc2d3af1
SHA512 (pcs-0.11.7.tar.gz) = 29d61bb945b25ced67e3a05f742ab6f557da8c4d3e8ee04db8caa9a51bb1c64e64cd5382f801173d95e9d62c53a52ad86f823c475ba790cb86b777a1eff658cc
SHA512 (ethon-0.16.0.gem) = 3b31affcee0d5a5be05b5497d4a8d13515f8393f54579a3a9c8de49f78d3f065bb92659434b023f0a8bf8e0cccfbc94b617695b93c4d3f744cccd1eff2e68905
SHA512 (ffi-1.16.3.gem) = b3d823a03055412a85ae3dbc10c3b50615614f0b66830e144ca47610b1f93f588ff693a95d364b4f686968b79bba91f9f9fa60b932479c6bf9ceb10e15575b98
SHA512 (mustermann-3.0.0.gem) = c33d41281fe2ac80c0af0c5c31dbab2068c73b9da19a4b82b387bbe551019fc115675634d932a8e56b070c3a06a85d830c982a103e6c5193aff8647f599be6e3
SHA512 (nio4r-2.5.9.gem) = d1c52896f186d19eb089a94d74ccadb427e64c204af149aa83a5a4dda3f0edd1bd2bae94afd21fcd58e3c2b9e2c17278a18717c0905de80e45540d13eeefd9e5
SHA512 (pcs-0.11.7.tar.gz) = cbe81acb14680948cfe642930012c896e617d976b33ebbb5c202f85d02ec1c0e22f901e73766628926caef2d5568fc6c36d7f9cf4091714f207911b7d4d1c1ef
SHA512 (pcs-web-ui-0.1.18.tar.gz) = edbe88d113e967b2d3f345e74e8c4409b013fb8474fe70a8813a1aba5ea8b4deb61a3bb8c4cd4b4d1a9dc9e67216e518ee5bf832a25188e95173317533d7bf69
SHA512 (pcs-web-ui-node-modules-0.1.18.tar.xz) = 237ff976d67a7bf881e45334261af1da32c6330fbf9e7436dcf33e63c9373f85f36db52622676f77e27bb6a853c046223cfe0cca25de68bd004c6535aa077fd7
SHA512 (puma-6.4.0.gem) = 3f481bd2bd34ed0d66d86f61d7522a48b4d8bfd36b807a1c47bb3b640bc6050a72f4f710fd4fad16260b560f98050e34faad044a54cb759c7ffe8371c3548c18
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (pycurl-7.45.3.tar.gz) = 12a55070602a1fd22b160ad582a4001bdd28531d2b2ccd365ff0136bc13dd23af80b19488bdbbc60a902a3a362b64383b9ae6acce6ed328c74dcffc8a6a3f4ad
SHA512 (rack-2.2.8.1.gem) = 98a92950a4ca81c51313bca88cdb2a299aa570c3818e8372014b521ef0f6d2347594d456a7ad30eaa972b0bae864d3eb324263870cdcb8f2ffdc5ba08594aada
SHA512 (rack-protection-3.1.0.gem) = 18a5ffe614a906ca876926bff3e4d1657f0b6963005ee32de80d0ab987b9465f603b30d69f07fd8d8a1ebf4fa85eb89bfd0b607d72387b360d13bea113a63ef7
SHA512 (rack-test-2.1.0.gem) = e349ce61c3d787e0a772980db697e92212d4d9592ce33f55516d1f85fba55cbe666496c76392679b057786d6dab603d74b83e7bb773ab54940343e36dbf05d6f
SHA512 (ruby2_keywords-0.0.5.gem) = f6b9078b111e68c0017e0025ecdccb976c7a32f35c1a8adf9fd879db0c91f89eb9bd799f9527a846e28056f2a5fbf0f3610cda9538570288c493613c35c83a6f
SHA512 (sinatra-3.1.0.gem) = e2b1f72f6ac57ce56006b6c39c72bec8135a448b2b235d6fd061fe3d02bd32b6bd8521c8083975e2ec758b8ba9634d6bc2e90b0f5ffae954437ffb26f808b50b
SHA512 (tilt-2.3.0.gem) = 78a3de34e3d096e40cb245807bad07cc3ebfa192986addbd228c25153166808b379f3ce086ff68fa5959997946187fe8923e84100653b2b109007390969875b3
SHA512 (tornado-6.3.3.tar.gz) = d4813de111139da2f5bd390bdd8d456797a48ba2ebe730946aabd66d9269ce4425d9b70ce62aa443ea5590d667b9056766841d99dcb0f383b2c9acd409474c8d