|
|
46c64a |
# virtual provides:
|
|
|
46c64a |
# clufter -> clufter-cli
|
|
|
46c64a |
# clufter-lib -> python.+-clufter (any if multiple)
|
|
|
46c64a |
# python-clufter -> python2-clufter (subject of change)
|
|
|
46c64a |
|
|
|
46c64a |
# conditionals:
|
|
|
46c64a |
%bcond_with python2
|
|
|
46c64a |
|
|
|
46c64a |
# https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
|
|
|
46c64a |
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
|
|
46c64a |
|
|
|
46c64a |
Name: clufter
|
|
|
46c64a |
Version: 0.77.1
|
|
|
46c64a |
Release: 5%{?dist}
|
|
|
46c64a |
Summary: Tool/library for transforming/analyzing cluster configuration formats
|
|
|
46c64a |
License: GPLv2+
|
|
|
46c64a |
URL: https://pagure.io/%{name}
|
|
|
46c64a |
|
|
|
46c64a |
BuildRequires: gcc
|
|
|
46c64a |
# required for autosetup macro
|
|
|
46c64a |
BuildRequires: git-core
|
|
|
46c64a |
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
# Python 2 related
|
|
|
46c64a |
BuildRequires: python2-devel
|
|
|
46c64a |
BuildRequires: python2-setuptools
|
|
|
46c64a |
BuildRequires: python2-lxml
|
|
|
46c64a |
%endif
|
|
|
46c64a |
|
|
|
46c64a |
# Python 3 related
|
|
|
46c64a |
BuildRequires: python3-devel
|
|
|
46c64a |
BuildRequires: python3-setuptools
|
|
|
46c64a |
BuildRequires: python3-lxml
|
|
|
46c64a |
|
|
|
46c64a |
# following to ensure "which bash" (and, in extension, "which sh") works
|
|
|
46c64a |
BuildRequires: bash which
|
|
|
46c64a |
|
|
|
46c64a |
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
46c64a |
# needed for schemadir path pointer
|
|
|
46c64a |
BuildRequires: pkgconfig(pacemaker)
|
|
|
46c64a |
# needed for schemas themselves
|
|
|
46c64a |
BuildRequires: pacemaker
|
|
|
46c64a |
# needed to squash multi-file schemas to single file
|
|
|
46c64a |
BuildRequires: jing
|
|
|
46c64a |
# needed for xsltproc and xmllint respectively
|
|
|
46c64a |
BuildRequires: libxslt libxml2
|
|
|
46c64a |
|
|
|
46c64a |
#global test_version
|
|
|
46c64a |
%global testver %{?test_version}%{?!test_version:%{version}}
|
|
|
46c64a |
|
|
|
46c64a |
Source0: https://people.redhat.com/jpokorny/pkgs/%{name}/%{name}-%{version}.tar.gz
|
|
|
46c64a |
Source1: https://people.redhat.com/jpokorny/pkgs/%{name}/%{name}-%{testver}-tests.tar.xz
|
|
|
46c64a |
Source2: https://pagure.io/%{name}/raw/v%{version}/f/misc/fix-jing-simplified-rng.xsl
|
|
|
46c64a |
Source3: https://pagure.io/%{name}/raw/v%{version}/f/misc/pacemaker-borrow-schemas
|
|
|
46c64a |
|
|
|
46c64a |
%description
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
%package cli
|
|
|
46c64a |
Summary: Tool for transforming/analyzing cluster configuration formats
|
|
|
46c64a |
Provides: %{name} = %{version}-%{release}
|
|
|
46c64a |
|
|
|
46c64a |
BuildRequires: bash-completion
|
|
|
46c64a |
|
|
|
46c64a |
BuildRequires: help2man
|
|
|
46c64a |
|
|
|
46c64a |
# following for pkg_resources module
|
|
|
46c64a |
%if 0%{?rhel} > 7
|
|
|
46c64a |
Requires: platform-python-setuptools
|
|
|
46c64a |
%else
|
|
|
46c64a |
Requires: python3-setuptools
|
|
|
46c64a |
%endif
|
|
|
46c64a |
Requires: python3-%{name} = %{version}-%{release}
|
|
|
46c64a |
Requires: %{_bindir}/nano
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description cli
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
This package contains %{name} command-line interface for the underlying
|
|
|
46c64a |
library (packaged as python3-%{name}).
|
|
|
46c64a |
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%package -n python2-%{name}
|
|
|
46c64a |
Summary: Library for transforming/analyzing cluster configuration formats
|
|
|
46c64a |
License: GPLv2+ and GFDL
|
|
|
46c64a |
|
|
|
46c64a |
Provides: %{name}-lib = %{version}-%{release}
|
|
|
46c64a |
%{?python_provide:%python_provide python2-%{name}}
|
|
|
46c64a |
Requires: %{name}-bin = %{version}-%{release}
|
|
|
46c64a |
Requires: python2-lxml
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description -n python2-%{name}
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
This package contains %{name} library including built-in plugins.
|
|
|
46c64a |
%endif
|
|
|
46c64a |
|
|
|
46c64a |
%package -n python3-%{name}
|
|
|
46c64a |
Summary: Library for transforming/analyzing cluster configuration formats
|
|
|
46c64a |
License: GPLv2+ and GFDL
|
|
|
46c64a |
|
|
|
46c64a |
Provides: %{name}-lib = %{version}-%{release}
|
|
|
46c64a |
%{?python_provide:%python_provide python3-%{name}}
|
|
|
46c64a |
%if %{without python2}
|
|
|
46c64a |
Obsoletes: python-%{name} < %{version}-%{release}
|
|
|
46c64a |
Obsoletes: python2-%{name} < %{version}-%{release}
|
|
|
46c64a |
%endif
|
|
|
46c64a |
Requires: python3-lxml
|
|
|
46c64a |
Requires: %{name}-bin = %{version}-%{release}
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description -n python3-%{name}
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
This package contains %{name} library including built-in plugins.
|
|
|
46c64a |
|
|
|
46c64a |
%package bin
|
|
|
46c64a |
Summary: Common internal compiled files for %{name}
|
|
|
46c64a |
License: GPLv2+
|
|
|
46c64a |
|
|
|
46c64a |
Requires: %{name}-common = %{version}-%{release}
|
|
|
46c64a |
|
|
|
46c64a |
%description bin
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
This package contains internal, arch-specific files for %{name}.
|
|
|
46c64a |
|
|
|
46c64a |
%package common
|
|
|
46c64a |
Summary: Common internal data files for %{name}
|
|
|
46c64a |
License: GPLv2+
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description common
|
|
|
46c64a |
While primarily aimed at (CMAN,rgmanager)->(Corosync/CMAN,Pacemaker) cluster
|
|
|
46c64a |
stacks configuration conversion (as per RHEL trend), the command-filter-format
|
|
|
46c64a |
framework (capable of XSLT) offers also other uses through its plugin library.
|
|
|
46c64a |
|
|
|
46c64a |
This package contains internal, arch-agnostic files for %{name}.
|
|
|
46c64a |
|
|
|
46c64a |
%package lib-general
|
|
|
46c64a |
Summary: Extra %{name} plugins usable for/as generic/auxiliary products
|
|
|
46c64a |
Requires: %{name}-lib = %{version}-%{release}
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description lib-general
|
|
|
46c64a |
This package contains set of additional plugins targeting variety of generic
|
|
|
46c64a |
formats often serving as a byproducts in the intermediate steps of the overall
|
|
|
46c64a |
process arrangement: either experimental commands or internally unused,
|
|
|
46c64a |
reusable formats and filters.
|
|
|
46c64a |
|
|
|
46c64a |
%package lib-ccs
|
|
|
46c64a |
Summary: Extra plugins for transforming/analyzing CMAN configuration
|
|
|
46c64a |
Requires: %{name}-lib-general = %{version}-%{release}
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description lib-ccs
|
|
|
46c64a |
This package contains set of additional plugins targeting CMAN cluster
|
|
|
46c64a |
configuration: either experimental commands or internally unused, reusable
|
|
|
46c64a |
formats and filters.
|
|
|
46c64a |
|
|
|
46c64a |
%package lib-pcs
|
|
|
46c64a |
Summary: Extra plugins for transforming/analyzing Pacemaker configuration
|
|
|
46c64a |
Requires: %{name}-lib-general = %{version}-%{release}
|
|
|
46c64a |
BuildArch: noarch
|
|
|
46c64a |
|
|
|
46c64a |
%description lib-pcs
|
|
|
46c64a |
This package contains set of additional plugins targeting Pacemaker cluster
|
|
|
46c64a |
configuration: either experimental commands or internally unused, reusable
|
|
|
46c64a |
formats and filters.
|
|
|
46c64a |
|
|
|
46c64a |
%prep
|
|
|
46c64a |
%autosetup -p1 -S git -b 1
|
|
|
46c64a |
|
|
|
46c64a |
%if "%{testver}" != "%{version}"
|
|
|
46c64a |
%{__cp} -a ../"%{name}-%{testver}"/* .
|
|
|
46c64a |
%endif
|
|
|
46c64a |
|
|
|
46c64a |
## for some esoteric reason, the line above has to be empty
|
|
|
46c64a |
%{__python3} setup.py saveopts -f setup.cfg pkg_prepare \
|
|
|
46c64a |
--ccs-flatten='%{_libexecdir}/%{name}-%{version}/ccs_flatten' \
|
|
|
46c64a |
--editor='%{_bindir}/nano' \
|
|
|
46c64a |
--extplugins-shared='%{_datarootdir}/%{name}/ext-plugins' \
|
|
|
46c64a |
--ra-metadata-dir='%{_datadir}/cluster' \
|
|
|
46c64a |
--ra-metadata-ext='metadata' \
|
|
|
46c64a |
--shell-posix='%(which sh 2>/dev/null || echo /bin/SHELL-POSIX)' \
|
|
|
46c64a |
--shell-bashlike='%(which bash 2>/dev/null || echo /bin/SHELL-BASHLIKE)'
|
|
|
46c64a |
%{__python3} setup.py saveopts -f setup.cfg pkg_prepare \
|
|
|
46c64a |
--report-bugs='https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}'
|
|
|
46c64a |
|
|
|
46c64a |
%build
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%py2_build
|
|
|
46c64a |
%endif
|
|
|
46c64a |
# see https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale;
|
|
|
46c64a |
# specifically:
|
|
|
46c64a |
# File "setup.py", line 466, in _pkg_prepare_file
|
|
|
46c64a |
# content = fr.read()
|
|
|
46c64a |
# File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
|
|
|
46c64a |
# return codecs.ascii_decode(input, self.errors)[0]
|
|
|
46c64a |
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 221: ordinal not in range(128)
|
|
|
46c64a |
export LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
|
46c64a |
%py3_build
|
|
|
46c64a |
|
|
|
46c64a |
%{__python3} -I ./run-dev --skip-ext --completion-bash 2>/dev/null \
|
|
|
46c64a |
| sed 's|run[-_]dev|%{name}|g' > .bashcomp
|
|
|
46c64a |
# generate man pages (proper commands and aliases from a sorted sequence)
|
|
|
46c64a |
%{__mkdir_p} -- .manpages/man1
|
|
|
46c64a |
{ echo; %{__python3} -I ./run-dev -l | sed -n 's|^ \(\S\+\).*|\1|p' \
|
|
|
46c64a |
| sort; } > .subcmds
|
|
|
46c64a |
sed -e 's:\(.\+\):\\\&\\fIrun_dev-\1\\fR\\\|(1), :' \
|
|
|
46c64a |
-e '1s|\(.*\)|\[SEE ALSO\]\n|' \
|
|
|
46c64a |
-e '$s|\(.*\)|\1\nand perhaps more|' \
|
|
|
46c64a |
.subcmds > .see-also
|
|
|
46c64a |
help2man -N -h -H -i .see-also \
|
|
|
46c64a |
-n "$(sed -n '2s|[^(]\+(\([^)]\+\))|\1|p' README)" \
|
|
|
46c64a |
'%{__python3} -I ./run-dev' | sed 's|run\\\?[-_]dev|%{name}|g' \
|
|
|
46c64a |
> ".manpages/man1/%{name}.1"
|
|
|
46c64a |
while read cmd; do
|
|
|
46c64a |
[ -n "${cmd}" ] || continue
|
|
|
46c64a |
echo -e "#\!/bin/sh\n{ [ \$# -ge 1 ] && [ \"\$1\" = \"--version\" ] \
|
|
|
46c64a |
&& %{__python3} -I ./run-dev \"\$@\" \
|
|
|
46c64a |
|| %{__python3} -I ./run-dev \"${cmd}\" \"\$@\"; }" > ".tmp-${cmd}"
|
|
|
46c64a |
chmod +x ".tmp-${cmd}"
|
|
|
46c64a |
grep -v "^${cmd}\$" .subcmds \
|
|
|
46c64a |
| grep -e '^$' -e "$(echo ${cmd} | cut -d- -f1)\(-\|\$\)" \
|
|
|
46c64a |
| sed -e 's:\(.\+\):\\\&\\fIrun_dev-\1\\fR\\\|(1), :' \
|
|
|
46c64a |
-e '1s|\(.*\)|\[SEE ALSO\]\n\\\&\\fIrun_dev\\fR\\\|(1), \n|' \
|
|
|
46c64a |
-e '$s|\(.*\)|\1\nand perhaps more|' > .see-also
|
|
|
46c64a |
# XXX uses ";;&" bashism
|
|
|
46c64a |
case "${cmd}" in
|
|
|
46c64a |
ccs[2-]*)
|
|
|
46c64a |
sed -i \
|
|
|
46c64a |
'1s:\(.*\):\1\n\\\&\\fIcluster.conf\\fR\\\|(5), \\\&\\fIccs\\fR\\\|(7), :' \
|
|
|
46c64a |
.see-also
|
|
|
46c64a |
;;&
|
|
|
46c64a |
ccs2pcs*)
|
|
|
46c64a |
sed -i \
|
|
|
46c64a |
'1s:\(.*\):\1\n\\\&\\fI%{_pkgdocdir}/rgmanager-pacemaker\\fR\\\|, :' \
|
|
|
46c64a |
.see-also
|
|
|
46c64a |
;;&
|
|
|
46c64a |
*[2-]pcscmd*)
|
|
|
46c64a |
sed -i '1s:\(.*\):\1\n\\\&\\fIpcs\\fR\\\|(8), :' .see-also
|
|
|
46c64a |
;;&
|
|
|
46c64a |
esac
|
|
|
46c64a |
help2man -N -h -H -i .see-also -n "${cmd}" "./.tmp-${cmd}" \
|
|
|
46c64a |
| sed 's|run\\\?[-_]dev|%{name}|g' \
|
|
|
46c64a |
> ".manpages/man1/%{name}-${cmd}.1"
|
|
|
46c64a |
done < .subcmds
|
|
|
46c64a |
|
|
|
46c64a |
OUTPUTDIR=.schemas POSTPROCESS="%{SOURCE2}" sh "%{SOURCE3}" --clobber
|
|
|
46c64a |
|
|
|
46c64a |
%install
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%py2_install
|
|
|
46c64a |
%endif
|
|
|
46c64a |
# see build section
|
|
|
46c64a |
export LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
|
46c64a |
%py3_install
|
|
|
46c64a |
|
|
|
46c64a |
# following is needed due to umask 022 not taking effect(?) leading to 775
|
|
|
46c64a |
%{__chmod} -- g-w '%{buildroot}%{_libexecdir}/%{name}-%{version}/ccs_flatten'
|
|
|
46c64a |
# %%{_bindir}/%%{name} should have been created
|
|
|
46c64a |
test -f '%{buildroot}%{_bindir}/%{name}' \
|
|
|
46c64a |
|| %{__install} -D -pm 644 -- '%{buildroot}%{_bindir}/%{name}' \
|
|
|
46c64a |
'%{buildroot}%{_bindir}/%{name}'
|
|
|
46c64a |
|
|
|
46c64a |
# move data files from python-specific locations to a single common one
|
|
|
46c64a |
# and possibly symlink that back
|
|
|
46c64a |
%{__mkdir_p} -- '%{buildroot}%{_datarootdir}/%{name}/formats'
|
|
|
46c64a |
for format in cib corosync; do
|
|
|
46c64a |
%{__cp} -a -t '%{buildroot}%{_datarootdir}/%{name}/formats' \
|
|
|
46c64a |
-- "%{buildroot}%{python3_sitelib}/%{name}/formats/${format}"
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%{__rm} -f -- "%{buildroot}%{python2_sitelib}/%{name}/formats/${format}"/*
|
|
|
46c64a |
ln -s -t "%{buildroot}%{python2_sitelib}/%{name}/formats/${format}" \
|
|
|
46c64a |
-- $(pushd "%{buildroot}%{_datarootdir}/%{name}/formats/${format}" >/dev/null; \
|
|
|
46c64a |
ls -1A | sed "s:.*:%{_datarootdir}/%{name}/formats/${format}/\\0:")
|
|
|
46c64a |
%endif
|
|
|
46c64a |
%{__rm} -f -- "%{buildroot}%{python3_sitelib}/%{name}/formats/${format}"/*
|
|
|
46c64a |
ln -s -t "%{buildroot}%{python3_sitelib}/%{name}/formats/${format}" \
|
|
|
46c64a |
-- $(pushd "%{buildroot}%{_datarootdir}/%{name}/formats/${format}" >/dev/null; \
|
|
|
46c64a |
ls -1A | sed "s:.*:%{_datarootdir}/%{name}/formats/${format}/\\0:")
|
|
|
46c64a |
done
|
|
|
46c64a |
|
|
|
46c64a |
# move ext-plugins from python-specific locations to a single common one
|
|
|
46c64a |
# incl. the different sorts of precompiled bytecodes
|
|
|
46c64a |
%{__mkdir_p} -- '%{buildroot}%{_datarootdir}/%{name}/ext-plugins'
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
mv -t '%{buildroot}%{_datarootdir}/%{name}/ext-plugins' \
|
|
|
46c64a |
-- '%{buildroot}%{python2_sitelib}/%{name}'/ext-plugins/*/
|
|
|
46c64a |
%endif
|
|
|
46c64a |
%{__cp} -af -t '%{buildroot}%{_datarootdir}/%{name}/ext-plugins' \
|
|
|
46c64a |
-- '%{buildroot}%{python3_sitelib}/%{name}'/ext-plugins/*
|
|
|
46c64a |
%{__rm} -rf -- '%{buildroot}%{python3_sitelib}/%{name}'/ext-plugins/*/
|
|
|
46c64a |
|
|
|
46c64a |
# byte-compilation
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%if "%{?quote:1}" != "" && "%{?quote:1}" != "1"
|
|
|
46c64a |
%py_byte_compile %{quote:%{__python2} -Es} %{python2_sitelib}/%{name}
|
|
|
46c64a |
%py_byte_compile %{quote:%{__python2} -Es} %{buildroot}%{_datarootdir}/%{name}/ext-plugins
|
|
|
46c64a |
%else
|
|
|
46c64a |
%py_byte_compile %{__python2} %{python2_sitelib}/%{name}
|
|
|
46c64a |
%py_byte_compile %{__python2} %{buildroot}%{_datarootdir}/%{name}/ext-plugins
|
|
|
46c64a |
%endif
|
|
|
46c64a |
%endif
|
|
|
46c64a |
%if "%{?quote:1}" != "" && "%{?quote:1}" != "1"
|
|
|
46c64a |
%py_byte_compile %{quote:%{__python3} -I} %{python3_sitelib}/%{name}
|
|
|
46c64a |
%py_byte_compile %{quote:%{__python3} -I} %{buildroot}%{_datarootdir}/%{name}/ext-plugins
|
|
|
46c64a |
%else
|
|
|
46c64a |
%py_byte_compile %{__python3} %{python3_sitelib}/%{name}
|
|
|
46c64a |
%py_byte_compile %{__python3} %{buildroot}%{_datarootdir}/%{name}/ext-plugins
|
|
|
46c64a |
%endif
|
|
|
46c64a |
|
|
|
46c64a |
declare bashcompdir="$(pkg-config --variable=completionsdir bash-completion \
|
|
|
46c64a |
|| echo '%{_datadir}/bash-completion/completions')"
|
|
|
46c64a |
declare bashcomp="${bashcompdir}/%{name}"
|
|
|
46c64a |
%{__install} -D -pm 644 -- \
|
|
|
46c64a |
.bashcomp '%{buildroot}%{_sysconfdir}/%{name}/bash-completion'
|
|
|
46c64a |
%{__mkdir_p} -- "%{buildroot}${bashcompdir}"
|
|
|
46c64a |
ln -s '%{_sysconfdir}/%{name}/bash-completion' "%{buildroot}${bashcomp}"
|
|
|
46c64a |
# own %%{_datadir}/bash-completion in case of ...bash-completion/completions,
|
|
|
46c64a |
# more generally any path up to any of /, /usr, /usr/share, /etc
|
|
|
46c64a |
while true; do
|
|
|
46c64a |
test "$(dirname "${bashcompdir}")" != "/" \
|
|
|
46c64a |
&& test "$(dirname "${bashcompdir}")" != "%{_prefix}" \
|
|
|
46c64a |
&& test "$(dirname "${bashcompdir}")" != "%{_datadir}" \
|
|
|
46c64a |
&& test "$(dirname "${bashcompdir}")" != "%{_sysconfdir}" \
|
|
|
46c64a |
|| break
|
|
|
46c64a |
bashcompdir="$(dirname "${bashcompdir}")"
|
|
|
46c64a |
done
|
|
|
46c64a |
cat >.bashcomp-files <<-EOF
|
|
|
46c64a |
${bashcompdir}
|
|
|
46c64a |
%dir %{_sysconfdir}/%{name}
|
|
|
46c64a |
%verify(not size md5 mtime) %{_sysconfdir}/%{name}/bash-completion
|
|
|
46c64a |
EOF
|
|
|
46c64a |
%{__mkdir_p} -- '%{buildroot}%{_mandir}'
|
|
|
46c64a |
%{__cp} -a -t '%{buildroot}%{_mandir}' -- .manpages/*
|
|
|
46c64a |
%{__cp} -a -f -t '%{buildroot}%{_datarootdir}/%{name}/formats/cib' \
|
|
|
46c64a |
-- .schemas/pacemaker-*.*.rng
|
|
|
46c64a |
%{__mkdir_p} -- '%{buildroot}%{_pkgdocdir}'
|
|
|
46c64a |
%{__cp} -a -t '%{buildroot}%{_pkgdocdir}' \
|
|
|
46c64a |
-- gpl-2.0.txt doc/*.txt doc/rgmanager-pacemaker
|
|
|
46c64a |
|
|
|
46c64a |
%check
|
|
|
46c64a |
# just a basic sanity check
|
|
|
46c64a |
# we need to massage RA metadata files and PATH so the local run works
|
|
|
46c64a |
# XXX we could also inject buildroot's site_packages dir to PYTHONPATH
|
|
|
46c64a |
declare ret=0 \
|
|
|
46c64a |
ccs_flatten_dir="$(dirname '%{buildroot}%{_libexecdir}/%{name}-%{version}/ccs_flatten')"
|
|
|
46c64a |
ln -s '%{buildroot}%{_datadir}/cluster'/*.'metadata' \
|
|
|
46c64a |
"${ccs_flatten_dir}"
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
PATH="${PATH:+${PATH}:}${ccs_flatten_dir}" PYTHONEXEC="%{__python2} -Es" ./run-tests
|
|
|
46c64a |
%endif
|
|
|
46c64a |
# see build section
|
|
|
46c64a |
export LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
|
46c64a |
PATH="${PATH:+${PATH}:}${ccs_flatten_dir}" PYTHONEXEC="%{__python3} -I" ./run-tests
|
|
|
46c64a |
ret=$?
|
|
|
46c64a |
%{__rm} -f -- "${ccs_flatten_dir}"/*.'metadata'
|
|
|
46c64a |
[ ${ret} -eq 0 ] || exit ${ret}
|
|
|
46c64a |
|
|
|
46c64a |
%post cli
|
|
|
46c64a |
if [ $1 -gt 1 ]; then # no gain regenerating it w/ fresh install (same result)
|
|
|
46c64a |
declare bashcomp="%{_sysconfdir}/%{name}/bash-completion"
|
|
|
46c64a |
%{_bindir}/%{name} --completion-bash > "${bashcomp}" 2>/dev/null || :
|
|
|
46c64a |
fi
|
|
|
46c64a |
|
|
|
46c64a |
%post lib-general
|
|
|
46c64a |
declare bashcomp="%{_sysconfdir}/%{name}/bash-completion"
|
|
|
46c64a |
# if the completion file is not present, suppose it is not desired
|
|
|
46c64a |
test -x '%{_bindir}/%{name}' && test -f "${bashcomp}" \
|
|
|
46c64a |
&& %{_bindir}/%{name} --completion-bash > "${bashcomp}" 2>/dev/null || :
|
|
|
46c64a |
|
|
|
46c64a |
%post lib-ccs
|
|
|
46c64a |
declare bashcomp="%{_sysconfdir}/%{name}/bash-completion"
|
|
|
46c64a |
# if the completion file is not present, suppose it is not desired
|
|
|
46c64a |
test -x '%{_bindir}/%{name}' && test -f "${bashcomp}" \
|
|
|
46c64a |
&& %{_bindir}/%{name} --completion-bash > "${bashcomp}" 2>/dev/null || :
|
|
|
46c64a |
|
|
|
46c64a |
%post lib-pcs
|
|
|
46c64a |
declare bashcomp="%{_sysconfdir}/%{name}/bash-completion"
|
|
|
46c64a |
# if the completion file is not present, suppose it is not desired
|
|
|
46c64a |
test -x '%{_bindir}/%{name}' && test -f "${bashcomp}" \
|
|
|
46c64a |
&& %{_bindir}/%{name} --completion-bash > "${bashcomp}" 2>/dev/null || :
|
|
|
46c64a |
|
|
|
46c64a |
%files cli -f .bashcomp-files
|
|
|
46c64a |
%{_mandir}/man1/*.1*
|
|
|
46c64a |
%{_bindir}/%{name}
|
|
|
46c64a |
|
|
|
46c64a |
%if %{with python2}
|
|
|
46c64a |
%files -n python2-%{name}
|
|
|
46c64a |
%{python2_sitelib}/%{name}
|
|
|
46c64a |
%{python2_sitelib}/%{name}-*.egg-info
|
|
|
46c64a |
%endif
|
|
|
46c64a |
|
|
|
46c64a |
%files -n python3-%{name}
|
|
|
46c64a |
%{python3_sitelib}/%{name}
|
|
|
46c64a |
%{python3_sitelib}/%{name}-*.egg-info
|
|
|
46c64a |
|
|
|
46c64a |
%files bin
|
|
|
46c64a |
%{_libexecdir}/%{name}-%{version}
|
|
|
46c64a |
|
|
|
46c64a |
%files common
|
|
|
46c64a |
%{_datadir}/cluster
|
|
|
46c64a |
%{_datarootdir}/%{name}
|
|
|
46c64a |
%dir %{_pkgdocdir}
|
|
|
46c64a |
%{_pkgdocdir}/*[^[:digit:]]
|
|
|
46c64a |
%license %{_pkgdocdir}/*[[:digit:]].txt
|
|
|
46c64a |
|
|
|
46c64a |
%files lib-general
|
|
|
46c64a |
%{_datarootdir}/%{name}/ext-plugins/lib-general
|
|
|
46c64a |
|
|
|
46c64a |
%files lib-ccs
|
|
|
46c64a |
%{_datarootdir}/%{name}/ext-plugins/lib-ccs
|
|
|
46c64a |
|
|
|
46c64a |
%files lib-pcs
|
|
|
46c64a |
%{_datarootdir}/%{name}/ext-plugins/lib-pcs
|
|
|
46c64a |
|
|
|
46c64a |
%changelog
|
|
|
46c64a |
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 0.77.1-5
|
|
|
46c64a |
- Require platform-python-setuptools instead of python3-setuptools
|
|
|
46c64a |
- Resolves: rhbz#1650489
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Oct 24 2018 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.77.1-4
|
|
|
46c64a |
- fix missing explicit BuildRequires to ensure environment for compiling
|
|
|
46c64a |
C code per the guidelines, and to fix FTBFS: rhbz#1603658
|
|
|
46c64a |
(contributed by Igor Gnatenko <ignatenkobrain@fedoraproject.org>)
|
|
|
46c64a |
- fix a thinko in py_byte_compile space-contained argument passing
|
|
|
46c64a |
(https://github.com/rpm-software-management/rpm/issues/222#issuecomment-410026431)
|
|
|
46c64a |
- fix a violation of "unversioned docdirs" guideline
|
|
|
46c64a |
(https://fedoraproject.org//wiki/Changes/UnversionedDocdirs)
|
|
|
46c64a |
Resolves: rhbz#1638027
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Mar 19 2018 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.77.1-3
|
|
|
46c64a |
- fix previously omitted unqualified python invocations, drop no longer
|
|
|
46c64a |
needed byte-compilation products through a full grip on such a process,
|
|
|
46c64a |
and also use -I switch to python3 instead of possibly weaker -Es
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Mar 19 2018 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.77.1-2
|
|
|
46c64a |
- stop creating Python 2 packages by default (nothing in Fedora uses it)
|
|
|
46c64a |
- fix a previously omitted unqualified python invocation
|
|
|
46c64a |
|
|
|
46c64a |
* Thu Mar 15 2018 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.77.1-1
|
|
|
46c64a |
- drop no longer favoured Group tag
|
|
|
46c64a |
- replace unqualified python invocations with explicit python3
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.77.0-3
|
|
|
46c64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jan 03 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.77.0-2
|
|
|
46c64a |
- Update Python 2 dependency declarations to new packaging standards
|
|
|
46c64a |
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
46c64a |
|
|
|
46c64a |
* Sun Nov 12 2017 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.77.0-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.76.0-3
|
|
|
46c64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.76.0-2
|
|
|
46c64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Jun 06 2017 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.76.0-1
|
|
|
46c64a |
- factor "borrow validation schemas from pacemaker" out to a separate script
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Fri May 26 2017 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.75.0-1
|
|
|
46c64a |
- move nano fallback editor dependency to -cli package [PGissue#1]
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Mar 21 2017 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.70.0-1
|
|
|
46c64a |
- split -bin and -common packages, the former becoming the only arch-specific
|
|
|
46c64a |
- also move python-specific (entry points, main files) back from -cli package
|
|
|
46c64a |
- also rename python-clufter to python2-clufter (former is a legacy alias)
|
|
|
46c64a |
- also leverage the above modularization to package python3-clufter in parallel
|
|
|
46c64a |
- bump upstream package (version rolling the above changes out)
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.59.8-2
|
|
|
46c64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jan 18 2017 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.59.8-1
|
|
|
46c64a |
- bump upstream package, see
|
|
|
46c64a |
https://github.com/jnpkrn/clufter/releases/tag/v0.59.8
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Dec 12 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.59.7-1
|
|
|
46c64a |
- bump upstream package, see
|
|
|
46c64a |
https://github.com/jnpkrn/clufter/releases/tag/v0.59.7
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Oct 21 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.59.6-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Aug 09 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.59.5-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jul 27 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.59.1-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.58.0-2
|
|
|
46c64a |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Jul 18 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.58.0-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Jul 01 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.57.0-1
|
|
|
46c64a |
- bump upstream package, see https://pagure.io/clufter/releases
|
|
|
46c64a |
(cumulative update incl. 0.56.3 and 0.57.0 changes)
|
|
|
46c64a |
- make Python interpreter execution sane
|
|
|
46c64a |
- drop license compatibility macro as pointless for Fedora (and EPEL,
|
|
|
46c64a |
when it comes to it) at this point
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Mar 18 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.56.2-1
|
|
|
46c64a |
- bump upstream package, see
|
|
|
46c64a |
https://github.com/jnpkrn/clufter/releases/tag/v0.56.2
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Feb 09 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.56.1-1
|
|
|
46c64a |
- add ability to borrow validation schemas from pacemaker installed along
|
|
|
46c64a |
- bump upstream package, see
|
|
|
46c64a |
https://github.com/jnpkrn/clufter/releases/tag/v0.56.1
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Feb 02 2016 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.56.0-1
|
|
|
46c64a |
- move entry_points.txt to clufter-cli sub-package
|
|
|
46c64a |
- general spec file refresh (pagure.io as a default project base, etc.)
|
|
|
46c64a |
- bump upstream package, see
|
|
|
46c64a |
https://github.com/jnpkrn/clufter/releases/tag/v0.56.0
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Dec 21 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.55.0-1
|
|
|
46c64a |
- auto-generate SEE ALSO sections for the man pages
|
|
|
46c64a |
- bump upstream package (intentional jump on upstream front),
|
|
|
46c64a |
see https://github.com/jnpkrn/clufter/releases/tag/v0.55.0
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Oct 09 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.5-1
|
|
|
46c64a |
- generate man pages also for offered commands
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Thu Sep 10 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.4-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Sep 07 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.3-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Aug 12 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.2-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jul 15 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.1-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Jul 03 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.50.0-1
|
|
|
46c64a |
- bump upstream package (intentional jump on upstream front)
|
|
|
46c64a |
|
|
|
46c64a |
* Fri Jun 19 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.12.0-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-2
|
|
|
46c64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Jun 01 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.11.2-1
|
|
|
46c64a |
- move completion module to clufter-cli sub-package
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Tue May 19 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.11.1-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Apr 15 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.11.0-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Apr 08 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.10.4-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Mon Mar 23 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.10.3-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Mar 17 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.10.2-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
- add dependency on python-setuptools
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Mar 04 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.10.1-1
|
|
|
46c64a |
- bump upstream package
|
|
|
46c64a |
|
|
|
46c64a |
* Thu Feb 26 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.10.0-1
|
|
|
46c64a |
- packaging enhacements (structure, redundancy, ownership, scriptlets, symlink)
|
|
|
46c64a |
- version bump so as not to collide with python-clufter co-packaged with pcs
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Jan 20 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.3.5-1
|
|
|
46c64a |
- packaging enhancements (pkg-config, license tag)
|
|
|
46c64a |
|
|
|
46c64a |
* Wed Jan 14 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.3.4-1
|
|
|
46c64a |
- packaging enhancements (permissions, ownership)
|
|
|
46c64a |
- man page for CLI frontend now included
|
|
|
46c64a |
|
|
|
46c64a |
* Tue Jan 13 2015 Jan Pokorný <jpokorny+rpm-clufter@fedoraproject.org> - 0.3.3-1
|
|
|
46c64a |
- initial build
|