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