From 653a8d61e0cf548afededdc41ebfeaf77288dc22 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Mon, 6 Sep 2021 16:33:53 +0800 Subject: [PATCH] Delete python2 sub-package and add python3 sub-package --- sanlock.spec | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sanlock.spec b/sanlock.spec index 2cfc77a..71cd659 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -1,12 +1,12 @@ Name: sanlock Version: 3.8.1 -Release: 1 +Release: 2 Summary: A shared storage lock manager License: GPLv2 and GPLv2+ and LGPLv2+ URL: https://pagure.io/sanlock/ Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz -BuildRequires: libblkid-devel libaio-devel python2 python2-devel systemd-units +BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units Requires(pre): shadow Requires(post): systemd-units systemd-sysv Requires(preun): systemd-units @@ -38,19 +38,18 @@ Requires: %{name} = %{version}-%{release} The sanklock-help package contains maninfo for sanlock. -%package -n python2-sanlock -%{?python_provide:%python_provide python2-sanlock} +%package -n python3-sanlock +%{?python_provide:%python_provide python3-sanlock} Provides: %{name}-python = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python bindings for the sanlock library Requires: %{name} = %{version}-%{release} -%description -n python2-sanlock -The python2-sanlock package contains a module that +%description -n python3-sanlock +The python3-sanlock package contains a module that permits applications written in the Python programming language to use the interface supplied by the sanlock library. - %package -n sanlk-reset Summary: Host reset daemon and client using sanlock Requires: sanlock = %{version}-%{release} @@ -68,13 +67,13 @@ common sanlock lockspace. %set_build_flags CFLAGS=$RPM_OPT_FLAGS make -C wdmd CFLAGS=$RPM_OPT_FLAGS make -C src -CFLAGS=$RPM_OPT_FLAGS make -C python +CFLAGS=$RPM_OPT_FLAGS make -C python PY_VERSION=3 CFLAGS=$RPM_OPT_FLAGS make -C reset %install make -C src install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT make -C wdmd install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT -make -C python install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT +make -C python install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT PY_VERSION=3 make -C reset install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service @@ -141,10 +140,10 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \ %{_includedir}/sanlock*.h %{_libdir}/pkgconfig/libsanlock*.pc -%files -n python2-sanlock +%files -n python3-sanlock %defattr(-,root,root,-) -%{python_sitearch}/sanlock_python-*.egg-info -%{python_sitearch}/sanlock.so +%{python3_sitearch}/sanlock_python-*.egg-info +%{python3_sitearch}/sanlock*.so %files -n sanlk-reset %defattr(-,root,root,-) @@ -154,6 +153,9 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \ %changelog +* Mon Sep 6 2021 liyanan - 3.8.1-2 +- Delete python2 sub-package and add python3 sub-package + * Thu Jul 30 2020 yanglongkang - 3.8.1-1 - update to 3.8.1 version