From 4a4e844c87a734c8281e5554020dfa1b9e3c0d5b Mon Sep 17 00:00:00 2001 From: guangyee Date: Thu, 2 Mar 2023 09:40:47 -0800 Subject: [PATCH] Use proper naming macros for sushy-tools Change-Id: I913dfdfaab0f29316cc3351b1e72b13f98796b56 --- openstack/sushy-tools/sushy-tools.spec.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openstack/sushy-tools/sushy-tools.spec.j2 b/openstack/sushy-tools/sushy-tools.spec.j2 index f7e68eb06..0af58e5fd 100644 --- a/openstack/sushy-tools/sushy-tools.spec.j2 +++ b/openstack/sushy-tools/sushy-tools.spec.j2 @@ -34,14 +34,14 @@ Requires(preun): systemd %description A set of tools to support the development and test of the Sushy library -%package -n python3-{{ py2name() }} +%package -n {{ py2name(py_versions='py3') }} Summary: A set of tools to support the development and test of the Sushy library Requires: {{ py3('Flask') }} Requires: {{ py3('pbr') }} Requires: {{ py3('requests') }} Requires: {{ py3('tenacity') }} -%description -n python3-{{ py2name() }} +%description -n {{ py2name(py_versions='py3') }} A set of tools to support the development and test of the Sushy library %if 0%{?with_doc} @@ -51,7 +51,7 @@ BuildRequires: {{ py3('Sphinx') }} BuildRequires: {{ py3('openstackdocstheme') }} BuildRequires: {{ py3('sphinxcontrib-apidoc') }} -%description -n python3-{{ py2name() }}-doc +%description -n {{ py2name() }}-doc Summary: sushy-tools documentation %endif @@ -87,7 +87,7 @@ mkdir -p %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %endif -%files -n python3-{{ py2name() }} +%files -n {{ py2name(py_versions='py3') }} %license LICENSE %{_bindir}/sushy-emulator %{_bindir}/sushy-static @@ -101,24 +101,24 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %{_sbindir}/rc%{name} %endif -%pre -n python3-{{ py2name() }} +%pre -n {{ py2name(py_versions='py3') }} getent group sushy-tools >/dev/null || groupadd -r sushy-tools getent passwd sushy-tools >/dev/null || useradd -r \ -g sushy-tools -M -s /sbin/nologin -c "Redfish Emulator" sushy-tools %if 0%{?with_doc} -%files -n python-{{ py2name() }}-doc +%files -n {{ py2name() }}-doc %license LICENSE %doc doc/build/html README.rst %endif -%post -n python3-{{ py2name() }} +%post -n {{ py2name(py_versions='py3') }} %systemd_post sushy-emulator.service -%preun -n python3-{{ py2name() }} +%preun -n {{ py2name(py_versions='py3') }} %systemd_preun sushy-emulator.service -%postun -n python3-{{ py2name() }} +%postun -n {{ py2name(py_versions='py3') }} %systemd_postun_with_restart sushy-emulator.service %changelog