Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2023-07-26 13:23:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.15225 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Wed Jul 26 13:23:53 2023 rev:303 rq:1100584 version:4.5.0+20230725.5d35bb6c Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2023-07-13 17:19:24.129419530 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.15225/crmsh.changes 2023-07-26 13:24:56.136358746 +0200 @@ -1,0 +2,14 @@ +Tue Jul 25 09:31:23 UTC 2023 - nicholas.y...@suse.com + +- Update to version 4.5.0+20230725.5d35bb6c: + * Dev: spec: Adjust spec file for Fedora + * Dev: spec: Rewrite SPEC file to use modern pip+wheel and don't use deprecated setup.py + +------------------------------------------------------------------- +Mon Jul 24 08:21:30 UTC 2023 - xli...@suse.com + +- Update to version 4.5.0+20230724.6495aa19: + * Dev: behave: add a function test for the previous change + * Fix: upgradeutil: support the change of path of upgrade_seq in crmsh-4.5 (bsc#1213050) + +------------------------------------------------------------------- Old: ---- crmsh-4.5.0+20230705.ea8c76ff.tar.bz2 New: ---- crmsh-4.5.0+20230725.5d35bb6c.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.m29JNc/_old 2023-07-26 13:24:56.956363695 +0200 +++ /var/tmp/diff_new_pack.m29JNc/_new 2023-07-26 13:24:56.960363719 +0200 @@ -32,15 +32,11 @@ %define pkg_group Productivity/Clustering/HA %endif -%if %{undefined python3_sitelib} -%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -%endif - Name: crmsh Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.5.0+20230705.ea8c76ff +Version: 4.5.0+20230725.5d35bb6c Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 @@ -58,7 +54,8 @@ Requires: python3-PyYAML Requires: python3-lxml BuildRequires: python3-lxml -BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel %if 0%{?suse_version} # only require csync2 on SUSE since bootstrap @@ -74,6 +71,9 @@ BuildRequires: python3-curses %else Requires: python3-dateutil +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools %endif # Required for core functionality @@ -83,14 +83,14 @@ BuildRequires: pkgconfig BuildRequires: python3 -%if 0%{?suse_version} > 1210 +%if 0%{?suse_version} # xsltproc is necessary for manpage generation; this is split out into # libxslt-tools as of openSUSE 12.2. Possibly strictly should be # required by asciidoc BuildRequires: libxslt-tools %endif -%if 0%{?suse_version} > 1110 || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?fedora} +%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?fedora} BuildArch: noarch %endif @@ -114,9 +114,7 @@ %endif Requires(post): python3-tox Requires(post): pacemaker -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif %if 0%{?suse_version} Requires(post): libglue-devel %else @@ -146,8 +144,14 @@ # replace the shebang in all the scripts # with ${_bindir}/python3 -find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/python[3]?][#\!%{_bindir}/python3]' {} \; -find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/env python[3]?][#\!%{_bindir}/python3]' {} \; +find . -type f -exec sed -i \ + -e "s|#!/usr/bin/python3?|#!%{__python3}|" \ + -e "s|#!/usr/bin/env python3?|#!%{__python3}|" \ + {} \; +sed -i -e '1{\@^#!%{_bindir}/python3@d}' crmsh/report/core.py + +# this is wrong FIXME +sed -i -e '/data_files/d' setup.py %build ./autogen.sh @@ -158,7 +162,22 @@ --with-version=%{version} \ --docdir=%{crmsh_docdir} -make %{_smp_mflags} VERSION="%{version}" sysconfdir=%{_sysconfdir} localstatedir=%{_var} +%if 0%{?suse_version} +%python3_pyproject_wheel +%else +%generate_buildrequires +%pyproject_buildrequires -t +%pyproject_wheel +%endif + +# Generate manpages +for manpg in doc/crm{,sh_crm_report}.8.adoc ; do + a2x -f manpage $manpg +done + +for docad in doc/crm{,sh_crm_report}.8.adoc ; do + asciidoc --unsafe --backend=xhtml11 $docad +done %if %{with regression_tests} tox @@ -169,14 +188,43 @@ %endif %install -make DESTDIR=%{buildroot} docdir=%{crmsh_docdir} install -install -Dm0644 contrib/bash_completion.sh %{buildroot}%{_datadir}/bash-completion/completions/crm +# make DESTDIR=%%{buildroot} docdir=%%{crmsh_docdir} install +%if 0%{?suse_version} +%python3_pyproject_install +%else +%pyproject_install +%endif + +# additional directories +install -d -m0770 %{buildroot}%{_localstatedir}/cache/crm +install -d -m0770 %{buildroot}%{_localstatedir}/log/crmsh +install -d -m0755 %{buildroot}%{_tmpfilesdir} + +# install configuration +install -Dm0644 -t %{buildroot}%{_sysconfdir}/crm etc/{crm.conf,profiles.yml} +install -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf + +# install manpages +install -Dpm0644 -t %{buildroot}%{_mandir}/man8 doc/*.8 +install -Dpm0644 -t %{buildroot}%{_datadir}/crmsh/ doc/crm.8.adoc + +# install data +for d in $(cat data-manifest); do + if [ -x $d ] ; then mode="0755" ; else mode="0644" ; fi + install -D -m $mode $d %{buildroot}%{_datadir}/crmsh/$d +done +mv %{buildroot}%{_datadir}/crmsh/test{,s} +install -p test/testcases/xmlonly.sh \ + %{buildroot}%{_datadir}/crmsh/tests/testcases/configbasic-xml.filter + +install -Dm0644 contrib/bash_completion.sh \ + %{buildroot}%{_datadir}/bash-completion/completions/crm + if [ -f %{buildroot}%{_bindir}/crm ]; then install -Dm0755 %{buildroot}%{_bindir}/crm %{buildroot}%{_sbindir}/crm rm %{buildroot}%{_bindir}/crm fi -install -d -m 0755 %{buildroot}%{_tmpfilesdir} -install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf + %if 0%{?suse_version} %fdupes %{buildroot} %endif @@ -220,20 +268,13 @@ %{_tmpfilesdir}/%{name}.conf -%doc %{_mandir}/man8/* -%{crmsh_docdir}/COPYING -%{crmsh_docdir}/AUTHORS -%{crmsh_docdir}/crm.8.html -%{crmsh_docdir}/crmsh_crm_report.8.html -%{crmsh_docdir}/profiles.html -%{crmsh_docdir}/ChangeLog -%{crmsh_docdir}/README.md -%{crmsh_docdir}/contrib/* +%doc doc/*.html +%doc COPYING AUTHORS ChangeLog README.md +%doc contrib/* +%{_mandir}/man8/* %config %{_sysconfdir}/crm -%dir %{crmsh_docdir} -%dir %{crmsh_docdir}/contrib %dir %attr (770, %{uname}, %{gname}) %{_var}/cache/crm %dir %attr (770, %{uname}, %{gname}) %{_var}/log/crmsh %{_datadir}/bash-completion/completions/crm ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.m29JNc/_old 2023-07-26 13:24:57.020364081 +0200 +++ /var/tmp/diff_new_pack.m29JNc/_new 2023-07-26 13:24:57.024364105 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">73c42ca0a9a6cac1cf4e5236bd9c2ea03db7e741</param> + <param name="changesrevision">5d35bb6c7915b3a158d022d3a89c698a06db9016</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.5.0+20230705.ea8c76ff.tar.bz2 -> crmsh-4.5.0+20230725.5d35bb6c.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230705.ea8c76ff/crmsh/upgradeutil.py new/crmsh-4.5.0+20230725.5d35bb6c/crmsh/upgradeutil.py --- old/crmsh-4.5.0+20230705.ea8c76ff/crmsh/upgradeutil.py 2023-07-05 15:10:28.000000000 +0200 +++ new/crmsh-4.5.0+20230725.5d35bb6c/crmsh/upgradeutil.py 2023-07-25 10:38:49.000000000 +0200 @@ -68,8 +68,21 @@ except FileNotFoundError: pass if not needed: + s = _get_file_content(SEQ_FILE_PATH, b'').strip() + if s == b'': + # try the old path + seq_file_path = os.path.expanduser('~hacluster/crmsh') + '/upgrade_seq' + s = _get_file_content(seq_file_path, b'').strip() + if s != b'': + try: + os.mkdir(DATA_DIR) + except FileExistsError: + pass + with open(SEQ_FILE_PATH, 'wb') as f: + f.write(s) + f.write(b'\n') try: - local_seq = _parse_upgrade_seq(_get_file_content(SEQ_FILE_PATH, b'').strip()) + local_seq = _parse_upgrade_seq(s) except ValueError: local_seq = (0, 0) needed = CURRENT_UPGRADE_SEQ > local_seq diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230705.ea8c76ff/crmsh.spec.in new/crmsh-4.5.0+20230725.5d35bb6c/crmsh.spec.in --- old/crmsh-4.5.0+20230705.ea8c76ff/crmsh.spec.in 2023-07-05 15:10:28.000000000 +0200 +++ new/crmsh-4.5.0+20230725.5d35bb6c/crmsh.spec.in 2023-07-25 10:38:49.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package crmsh # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,7 +38,7 @@ Group: %{pkg_group} Version: @VERSION@ Release: 0 -Url: http://crmsh.github.io +URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.tmpfiles.d.conf @@ -51,10 +51,11 @@ Requires: %{name}-scripts >= %{version}-%{release} Requires: /usr/bin/which Requires: python3 >= 3.4 +Requires: python3-PyYAML Requires: python3-lxml -Requires: python3-python-dateutil BuildRequires: python3-lxml -BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel %if 0%{?suse_version} # only require csync2 on SUSE since bootstrap @@ -63,15 +64,16 @@ %endif %if 0%{?suse_version} -Requires: python3-PyYAML # Suse splits this off into a separate package Requires: python3-curses +Requires: python3-python-dateutil BuildRequires: fdupes BuildRequires: python3-curses -%endif - -%if 0%{?fedora_version} -Requires: PyYAML +%else +Requires: python3-dateutil +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools %endif # Required for core functionality @@ -81,14 +83,14 @@ BuildRequires: pkgconfig BuildRequires: python3 -%if 0%{?suse_version} > 1210 +%if 0%{?suse_version} # xsltproc is necessary for manpage generation; this is split out into # libxslt-tools as of openSUSE 12.2. Possibly strictly should be # required by asciidoc BuildRequires: libxslt-tools %endif -%if 0%{?suse_version} > 1110 || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?fedora} +%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?fedora} BuildArch: noarch %endif @@ -103,24 +105,22 @@ Group: %{pkg_group} Requires: crmsh %if %{with regression_tests} -Requires(post): mailx -Requires(post): procps -Requires(post): python3-python-dateutil -Requires(post): python3-tox -Requires(post): pacemaker -%if 0%{?suse_version} > 1110 -BuildArch: noarch -%endif +Requires(post): mailx +Requires(post): procps %if 0%{?suse_version} -Requires(post): libglue-devel +Requires(post): python3-python-dateutil %else -Requires(post): cluster-glue-libs-devel +Requires(post): python3-dateutil %endif -%if 0%{?fedora_version} -Requires(post): PyYAML +Requires(post): python3-tox +Requires(post): pacemaker +BuildArch: noarch +%if 0%{?suse_version} +Requires(post): libglue-devel %else -Requires(post): python3-PyYAML +Requires(post): cluster-glue-libs-devel %endif +Requires(post): python3-PyYAML %endif %description test @@ -144,8 +144,14 @@ # replace the shebang in all the scripts # with ${_bindir}/python3 -find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/python[3]?][#\!%{_bindir}/python3]' {} \; -find . -type f -exec perl -pi -e 'BEGIN{undef $/};s[^#\!/usr/bin/env python[3]?][#\!%{_bindir}/python3]' {} \; +find . -type f -exec sed -i \ + -e "s|#!/usr/bin/python3?|#!%{__python3}|" \ + -e "s|#!/usr/bin/env python3?|#!%{__python3}|" \ + {} \; +sed -i -e '1{\@^#!%{_bindir}/python3@d}' crmsh/report/core.py + +# this is wrong FIXME +sed -i -e '/data_files/d' setup.py %build ./autogen.sh @@ -156,7 +162,22 @@ --with-version=%{version} \ --docdir=%{crmsh_docdir} -make %{_smp_mflags} VERSION="%{version}" sysconfdir=%{_sysconfdir} localstatedir=%{_var} +%if 0%{?suse_version} +%python3_pyproject_wheel +%else +%generate_buildrequires +%pyproject_buildrequires -t +%pyproject_wheel +%endif + +# Generate manpages +for manpg in doc/crm{,sh_crm_report}.8.adoc ; do + a2x -f manpage $manpg +done + +for docad in doc/crm{,sh_crm_report}.8.adoc ; do + asciidoc --unsafe --backend=xhtml11 $docad +done %if %{with regression_tests} tox @@ -167,14 +188,43 @@ %endif %install -make DESTDIR=%{buildroot} docdir=%{crmsh_docdir} install -install -Dm0644 contrib/bash_completion.sh %{buildroot}%{_datadir}/bash-completion/completions/crm +# make DESTDIR=%%{buildroot} docdir=%%{crmsh_docdir} install +%if 0%{?suse_version} +%python3_pyproject_install +%else +%pyproject_install +%endif + +# additional directories +install -d -m0770 %{buildroot}%{_localstatedir}/cache/crm +install -d -m0770 %{buildroot}%{_localstatedir}/log/crmsh +install -d -m0755 %{buildroot}%{_tmpfilesdir} + +# install configuration +install -Dm0644 -t %{buildroot}%{_sysconfdir}/crm etc/{crm.conf,profiles.yml} +install -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf + +# install manpages +install -Dpm0644 -t %{buildroot}%{_mandir}/man8 doc/*.8 +install -Dpm0644 -t %{buildroot}%{_datadir}/crmsh/ doc/crm.8.adoc + +# install data +for d in $(cat data-manifest); do + if [ -x $d ] ; then mode="0755" ; else mode="0644" ; fi + install -D -m $mode $d %{buildroot}%{_datadir}/crmsh/$d +done +mv %{buildroot}%{_datadir}/crmsh/test{,s} +install -p test/testcases/xmlonly.sh \ + %{buildroot}%{_datadir}/crmsh/tests/testcases/configbasic-xml.filter + +install -Dm0644 contrib/bash_completion.sh \ + %{buildroot}%{_datadir}/bash-completion/completions/crm + if [ -f %{buildroot}%{_bindir}/crm ]; then install -Dm0755 %{buildroot}%{_bindir}/crm %{buildroot}%{_sbindir}/crm rm %{buildroot}%{_bindir}/crm fi -install -d -m 0755 %{buildroot}%{_tmpfilesdir} -install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf + %if 0%{?suse_version} %fdupes %{buildroot} %endif @@ -218,20 +268,13 @@ %{_tmpfilesdir}/%{name}.conf -%doc %{_mandir}/man8/* -%{crmsh_docdir}/COPYING -%{crmsh_docdir}/AUTHORS -%{crmsh_docdir}/crm.8.html -%{crmsh_docdir}/crmsh_crm_report.8.html -%{crmsh_docdir}/profiles.html -%{crmsh_docdir}/ChangeLog -%{crmsh_docdir}/README.md -%{crmsh_docdir}/contrib/* +%doc doc/*.html +%doc COPYING AUTHORS ChangeLog README.md +%doc contrib/* +%{_mandir}/man8/* %config %{_sysconfdir}/crm -%dir %{crmsh_docdir} -%dir %{crmsh_docdir}/contrib %dir %attr (770, %{uname}, %{gname}) %{_var}/cache/crm %dir %attr (770, %{uname}, %{gname}) %{_var}/log/crmsh %{_datadir}/bash-completion/completions/crm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230705.ea8c76ff/test/features/healthcheck.feature new/crmsh-4.5.0+20230725.5d35bb6c/test/features/healthcheck.feature --- old/crmsh-4.5.0+20230705.ea8c76ff/test/features/healthcheck.feature 2023-07-05 15:10:28.000000000 +0200 +++ new/crmsh-4.5.0+20230725.5d35bb6c/test/features/healthcheck.feature 2023-07-25 10:38:49.000000000 +0200 @@ -26,3 +26,12 @@ # And File "~hacluster/.ssh/id_rsa" exists on "hanode1" # And File "~hacluster/.ssh/id_rsa" exists on "hanode2" # And File "~hacluster/.ssh/id_rsa" exists on "hanode3" + + # skip non-root as behave_agent is not able to run commands interactively with non-root sudoer + @skip_non_root + @clean + Scenario: An upgrade_seq file in ~hacluster/crmsh/ will be migrated to /var/lib/crmsh (bsc#1213050) + When Run "mv /var/lib/crmsh ~hacluster/" on "hanode1" + Then File "~hacluster/crmsh/upgrade_seq" exists on "hanode1" + When Run "crm cluster status" on "hanode1" + Then File "/var/lib/crmsh/upgrade_seq" exists on "hanode1"