From d1e56785648493b1675140633b2592797d11a18f Mon Sep 17 00:00:00 2001 From: 19909236985 Date: Fri, 30 Oct 2020 14:44:26 +0800 Subject: [PATCH] remove python2 dependency --- sanlock.spec | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sanlock.spec b/sanlock.spec index db6db0e..720e593 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 @@ -36,21 +36,17 @@ Requires: %{name} = %{version}-%{release} %description help The sanklock-help package contains maninfo for sanlock. - - -%package -n python2-sanlock -%{?python_provide:%python_provide python2-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 + +%package -n python3-sanlock +%{?python_provide:%python_provide python3-sanlock} +Summary: Python bindings for the sanlock library +Requires: %{name} = %{version}-%{release} + +%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 +64,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 +137,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 +150,9 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \ %changelog +* Fri Oct 30 2020 yanglongkang - 3.8.1-2 +- remove python2 dependency + * Thu Jul 16 2020 yanglongkang - 3.8.1-1 - update package to 3.8.1