From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 56E8615808E for ; Sun, 24 Apr 2022 16:01:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D28B1E088F; Sun, 24 Apr 2022 16:01:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5F58E0894 for ; Sun, 24 Apr 2022 16:01:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 113B634175A for ; Sun, 24 Apr 2022 16:01:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B12F3C7 for ; Sun, 24 Apr 2022 16:01:16 +0000 (UTC) From: "Alessandro Barbieri" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alessandro Barbieri" Message-ID: <1650816074.7236c8a1ef5340e1d2401bf566ee061271b739d0.Alessandro-Barbieri@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-cluster/pcs/files/, sys-cluster/pcs/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch sys-cluster/pcs/files/remove_bashism.patch sys-cluster/pcs/pcs-0.11.2.ebuild X-VCS-Directories: sys-cluster/pcs/ sys-cluster/pcs/files/ X-VCS-Committer: Alessandro-Barbieri X-VCS-Committer-Name: Alessandro Barbieri X-VCS-Revision: 7236c8a1ef5340e1d2401bf566ee061271b739d0 X-VCS-Branch: dev Date: Sun, 24 Apr 2022 16:01:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a891610-f52b-4c91-bf2e-bec9b10a078b X-Archives-Hash: 205c08a1faf885c89fabf57c56722f15 commit: 7236c8a1ef5340e1d2401bf566ee061271b739d0 Author: Alessandro Barbieri gmail com> AuthorDate: Sun Apr 24 15:10:16 2022 +0000 Commit: Alessandro Barbieri gmail com> CommitDate: Sun Apr 24 16:01:14 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7236c8a1 sys-cluster/pcs: various fixes Signed-off-by: Alessandro Barbieri gmail.com> .../pcs/files/pcs-0.11-gentoo-support.patch | 60 +++++++++------------- sys-cluster/pcs/files/remove_bashism.patch | 6 --- sys-cluster/pcs/pcs-0.11.2.ebuild | 33 ++++++------ 3 files changed, 40 insertions(+), 59 deletions(-) diff --git a/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch b/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch index d2e6fb804..142eca091 100644 --- a/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch +++ b/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch @@ -1,6 +1,5 @@ -diff -uPNr pcs-0.11.2/configure.ac pcs-0.11.2-openrc/configure.ac ---- pcs-0.11.2/configure.ac 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/configure.ac 2022-04-02 16:47:45.968552397 +0200 +--- a/configure.ac ++++ b/configure.ac @@ -89,17 +89,17 @@ ]) @@ -58,16 +57,14 @@ diff -uPNr pcs-0.11.2/configure.ac pcs-0.11.2-openrc/configure.ac fi fi -diff -uPNr pcs-0.11.2/pcs/common/services/drivers/__init__.py pcs-0.11.2-openrc/pcs/common/services/drivers/__init__.py ---- pcs-0.11.2/pcs/common/services/drivers/__init__.py 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs/common/services/drivers/__init__.py 2022-04-01 20:20:31.536218481 +0200 +--- a/pcs/common/services/drivers/__init__.py ++++ b/pcs/common/services/drivers/__init__.py @@ -1,2 +1,3 @@ from .systemd import SystemdDriver from .sysvinit_rhel import SysVInitRhelDriver +from .openrc_gentoo import OpenRCGentooDriver -diff -uPNr pcs-0.11.2/pcs/common/services/drivers/openrc_gentoo.py pcs-0.11.2-openrc/pcs/common/services/drivers/openrc_gentoo.py ---- pcs-0.11.2/pcs/common/services/drivers/openrc_gentoo.py 1970-01-01 01:00:00.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs/common/services/drivers/openrc_gentoo.py 2022-04-01 19:52:57.765788816 +0200 +--- a/pcs/common/services/drivers/openrc_gentoo.py ++++ b/pcs/common/services/drivers/openrc_gentoo.py @@ -0,0 +1,87 @@ +import os.path +from typing import ( @@ -156,9 +153,8 @@ diff -uPNr pcs-0.11.2/pcs/common/services/drivers/openrc_gentoo.py pcs-0.11.2-op + os.path.isfile(binary) + for binary in (self._rc_service_bin, self._rc_config_bin) + ) -diff -uPNr pcs-0.11.2/pcs/lib/services.py pcs-0.11.2-openrc/pcs/lib/services.py ---- pcs-0.11.2/pcs/lib/services.py 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs/lib/services.py 2022-04-01 20:02:05.023001421 +0200 +--- a/pcs/lib/services.py ++++ b/pcs/lib/services.py @@ -84,6 +84,9 @@ services.drivers.SysVInitRhelDriver( executor, settings.service_binary, settings.chkconfig_binary @@ -169,9 +165,8 @@ diff -uPNr pcs-0.11.2/pcs/lib/services.py pcs-0.11.2-openrc/pcs/lib/services.py ] for driver in drivers: -diff -uPNr pcs-0.11.2/pcs/Makefile.am pcs-0.11.2-openrc/pcs/Makefile.am ---- pcs-0.11.2/pcs/Makefile.am 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs/Makefile.am 2022-04-01 20:22:42.198605061 +0200 +--- a/pcs/Makefile.am ++++ b/pcs/Makefile.am @@ -131,6 +131,7 @@ common/services/drivers/__init__.py \ common/services/drivers/systemd.py \ @@ -180,9 +175,8 @@ diff -uPNr pcs-0.11.2/pcs/Makefile.am pcs-0.11.2-openrc/pcs/Makefile.am common/services_dto.py \ common/services/errors.py \ common/services/__init__.py \ -diff -uPNr pcs-0.11.2/pcs/settings.py.in pcs-0.11.2-openrc/pcs/settings.py.in ---- pcs-0.11.2/pcs/settings.py.in 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs/settings.py.in 2022-04-03 14:09:08.438232140 +0200 +--- a/pcs/settings.py.in ++++ b/pcs/settings.py.in @@ -4,6 +4,8 @@ systemd_unit_path = "@SYSTEMD_UNIT_PATH@".split(":") chkconfig_binary = "/sbin/chkconfig" @@ -212,18 +206,16 @@ diff -uPNr pcs-0.11.2/pcs/settings.py.in pcs-0.11.2-openrc/pcs/settings.py.in pcsd_default_port = 2224 pcsd_config = "@CONF_DIR@/pcsd" cib_dir = "@PCMK_CIB_DIR@" -diff -uPNr pcs-0.11.2/pcsd/logrotate/pcsd.in pcs-0.11.2-openrc/pcsd/logrotate/pcsd.in ---- pcs-0.11.2/pcsd/logrotate/pcsd.in 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcsd/logrotate/pcsd.in 2022-04-02 18:35:15.265764389 +0200 +--- a/pcsd/logrotate/pcsd.in ++++ b/pcsd/logrotate/pcsd.in @@ -1,4 +1,4 @@ -@localstatedir@/log/pcsd/*.log { +/var/log/pcsd/*.log { rotate 5 weekly missingok -diff -uPNr pcs-0.11.2/pcsd/Makefile.am pcs-0.11.2-openrc/pcsd/Makefile.am ---- pcs-0.11.2/pcsd/Makefile.am 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcsd/Makefile.am 2022-04-02 18:34:42.609049415 +0200 +--- a/pcsd/Makefile.am ++++ b/pcsd/Makefile.am @@ -80,8 +80,8 @@ cp -rp ../${PCSD_BUNDLED_DIR_ROOT_LOCAL}/* $(DESTDIR)${GEM_HOME} rm -rf $(DESTDIR)${GEM_HOME}/cache @@ -243,18 +235,16 @@ diff -uPNr pcs-0.11.2/pcsd/Makefile.am pcs-0.11.2-openrc/pcsd/Makefile.am - rmdir $(DESTDIR)/$(localstatedir)/lib/pcsd 2>/dev/null || : + rmdir $(DESTDIR)/var/log/pcsd 2>/dev/null || : + rmdir $(DESTDIR)/var/lib/pcsd 2>/dev/null || : -diff -uPNr pcs-0.11.2/pcsd/pam/pcsd.gentoo pcs-0.11.2-openrc/pcsd/pam/pcsd.gentoo ---- pcs-0.11.2/pcsd/pam/pcsd.gentoo 1970-01-01 01:00:00.000000000 +0100 -+++ pcs-0.11.2-openrc/pcsd/pam/pcsd.gentoo 2022-04-02 12:58:06.249036062 +0200 +--- a/pcsd/pam/pcsd.gentoo ++++ b/pcsd/pam/pcsd.gentoo @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +password include system-auth +session include system-auth -diff -uPNr pcs-0.11.2/pcsd/settings.rb.in pcs-0.11.2-openrc/pcsd/settings.rb.in ---- pcs-0.11.2/pcsd/settings.rb.in 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcsd/settings.rb.in 2022-04-03 14:08:03.767014211 +0200 +--- a/pcsd/settings.rb.in ++++ b/pcsd/settings.rb.in @@ -2,9 +2,9 @@ PCS_EXEC = '@SBINDIR@/pcs' PCS_INTERNAL_EXEC = '@LIB_DIR@/pcs/pcs_internal' @@ -267,9 +257,8 @@ diff -uPNr pcs-0.11.2/pcsd/settings.rb.in pcs-0.11.2-openrc/pcsd/settings.rb.in CRT_FILE = File.join(PCSD_VAR_LOCATION, 'pcsd.crt') KEY_FILE = File.join(PCSD_VAR_LOCATION, 'pcsd.key') -diff -uPNr pcs-0.11.2/pcs_test/Makefile.am pcs-0.11.2-openrc/pcs_test/Makefile.am ---- pcs-0.11.2/pcs_test/Makefile.am 2022-02-03 13:37:44.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs_test/Makefile.am 2022-04-01 20:23:35.837945885 +0200 +--- a/pcs_test/Makefile.am ++++ b/pcs_test/Makefile.am @@ -101,6 +101,7 @@ tier0/common/services/drivers/__init__.py \ tier0/common/services/drivers/test_systemd.py \ @@ -278,9 +267,8 @@ diff -uPNr pcs-0.11.2/pcs_test/Makefile.am pcs-0.11.2-openrc/pcs_test/Makefile.a tier0/common/services/__init__.py \ tier0/common/test_file.py \ tier0/common/test_host.py \ -diff -uPNr pcs-0.11.2/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py pcs-0.11.2-openrc/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py ---- pcs-0.11.2/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py 1970-01-01 01:00:00.000000000 +0100 -+++ pcs-0.11.2-openrc/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py 2022-04-01 20:29:57.272257820 +0200 +--- a/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py ++++ b/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py @@ -0,0 +1,232 @@ +from unittest import mock, TestCase + diff --git a/sys-cluster/pcs/files/remove_bashism.patch b/sys-cluster/pcs/files/remove_bashism.patch index a54d612f0..cfed6026c 100644 --- a/sys-cluster/pcs/files/remove_bashism.patch +++ b/sys-cluster/pcs/files/remove_bashism.patch @@ -4,12 +4,6 @@ Date: Thu, 7 Apr 2022 17:02:55 +0200 Subject: [PATCH] remove bashisms `==` is not POSIX ---- - m4/ac_compare_versions.m4 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/m4/ac_compare_versions.m4 b/m4/ac_compare_versions.m4 -index 77d03330a..74846704e 100644 --- a/m4/ac_compare_versions.m4 +++ b/m4/ac_compare_versions.m4 @@ -6,7 +6,7 @@ dnl op can be: diff --git a/sys-cluster/pcs/pcs-0.11.2.ebuild b/sys-cluster/pcs/pcs-0.11.2.ebuild index aeeddbed6..fdf6faf20 100644 --- a/sys-cluster/pcs/pcs-0.11.2.ebuild +++ b/sys-cluster/pcs/pcs-0.11.2.ebuild @@ -16,12 +16,11 @@ S="${WORKDIR}/all/${P}" LICENSE="GPL-2" KEYWORDS="~amd64" -IUSE="systemd" SLOT=0 DEPEND=" - dev-libs/libffi - sys-apps/coreutils + dev-libs/libffi + sys-apps/coreutils " RDEPEND=" ${DEPEND} @@ -56,19 +55,23 @@ ruby_add_rdepend " dev-ruby/daemons dev-ruby/ethon dev-ruby/eventmachine + dev-ruby/json dev-ruby/mustermann dev-ruby/open4 dev-ruby/rack dev-ruby/rack-protection dev-ruby/rack-test dev-ruby/sinatra - www-servers/thin + dev-ruby/test-unit dev-ruby/webrick - dev-ruby/json" + www-servers/thin +" REQUIRED_USE="${PYTHON_REQUIRED_USE}" -PATCHES="${FILESDIR}/pcs-0.11-gentoo-support.patch - ${FILESDIR}/remove_bashism.patch" +PATCHES=" + ${FILESDIR}/pcs-0.11-gentoo-support.patch + ${FILESDIR}/remove_bashism.patch +" src_prepare() { default @@ -97,18 +100,14 @@ src_install() { keepdir /var/lib/pcsd #fix statedir - sed -i "${D}/usr/share/pcsd/pcsd" -e 's/\/var\/lib\/lib\//\/var\/lib\//g' + sed -i "${D}/usr/share/pcsd/pcsd" -e 's/\/var\/lib\/lib\//\/var\/lib\//g' || die # custom service file for openRC - if ! use systemd ; then - newinitd "${FILESDIR}/pcs-0.11.initd" pcs - newinitd "${FILESDIR}/pcsd-0.11.initd" pcsd - fi - - if use systemd ; then - systemd_newunit "${S}/pcsd/pcsd.service.in" "pcs.service" - systemd_newunit "${S}/pcsd/pcsd-ruby.service.in" "pcsd.service" - fi + newinitd "${FILESDIR}/pcs-0.11.initd" pcs + newinitd "${FILESDIR}/pcsd-0.11.initd" pcsd + + systemd_newunit "${S}/pcsd/pcsd.service.in" "pcs.service" + systemd_newunit "${S}/pcsd/pcsd-ruby.service.in" "pcsd.service" python_optimize }