mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
spec: Update python bindings and dbus-service
The workaround for python3 is no longer needed.
This commit is contained in:
parent
a89ddda1a2
commit
04ab1fa572
@ -31,20 +31,12 @@
|
|||||||
%enableif %{enable_lockd_sanlock} lockd-sanlock
|
%enableif %{enable_lockd_sanlock} lockd-sanlock
|
||||||
%endif
|
%endif
|
||||||
%enableif %{enable_python} python2-bindings
|
%enableif %{enable_python} python2-bindings
|
||||||
|
%enableif %{enable_python3} python3-bindings
|
||||||
%enableif %{enable_python} applib
|
%enableif %{enable_python} applib
|
||||||
|
%enableif %{enable_dbusd} dbus-service
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%if %{enable_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%configure %{configure_flags} --disable-python2-bindings --enable-python3-bindings PYTHON=/usr/bin/python3 PYTHON_CONFIG=/usr/bin/python3-config
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%configure %{configure_flags}
|
%configure %{configure_flags}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
@ -442,7 +442,49 @@ Python 3 module to allow the creation and use of LVM
|
|||||||
logical volumes, physical volumes, and volume groups.
|
logical volumes, physical volumes, and volume groups.
|
||||||
|
|
||||||
%files python3-libs
|
%files python3-libs
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*.so
|
||||||
|
%{python3_sitearch}/*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# LVM D-Bus daemon
|
||||||
|
##############################################################################
|
||||||
|
%if %{enable_dbusd}
|
||||||
|
%package dbusd
|
||||||
|
Summary: LVM2 D-Bus daemon
|
||||||
|
License: GPLv2
|
||||||
|
Group: System Environment/Base
|
||||||
|
Requires: lvm2 >= %{version}-%{release}
|
||||||
|
Requires: dbus
|
||||||
|
Requires: python3-dbus
|
||||||
|
Requires: python3-pyudev
|
||||||
|
Requires(post): systemd-units >= %{systemd_version}
|
||||||
|
Requires(preun): systemd-units >= %{systemd_version}
|
||||||
|
Requires(postun): systemd-units >= %{systemd_version}
|
||||||
|
|
||||||
|
%description dbusd
|
||||||
|
|
||||||
|
Daemon for access to LVM2 functionality through a D-Bus interface.
|
||||||
|
|
||||||
|
%post dbusd
|
||||||
|
%systemd_post lvm2-lvmdbusd.service
|
||||||
|
|
||||||
|
%preun dbusd
|
||||||
|
%systemd_preun lvm2-lvmdbusd.service
|
||||||
|
|
||||||
|
%postun dbusd
|
||||||
|
%systemd_postun lvm2-lvmdbusd.service
|
||||||
|
|
||||||
|
%files dbusd
|
||||||
|
%defattr(555,root,root,-)
|
||||||
|
%{_sbindir}/lvmdbusd
|
||||||
|
%defattr(444,root,root,-)
|
||||||
|
%{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf
|
||||||
|
%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service
|
||||||
|
%{_mandir}/man8/lvmdbusd.8.gz
|
||||||
|
%{_unitdir}/lvm2-lvmdbusd.service
|
||||||
|
%{python3_sitelib}/lvmdbusd/*
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
%global enable_python 1
|
%global enable_python 1
|
||||||
# Off by default - <= does not work well with or:
|
# Off by default - <= does not work well with or:
|
||||||
%global enable_python3 0
|
%global enable_python3 0
|
||||||
|
%global enable_dbusd 0
|
||||||
%global enable_udev 1
|
%global enable_udev 1
|
||||||
%global enable_systemd 1
|
%global enable_systemd 1
|
||||||
%global enable_cmirror 1
|
%global enable_cmirror 1
|
||||||
@ -87,6 +88,22 @@
|
|||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
|
%if %{rhel} >= 8 || %{fedora} >= 23
|
||||||
|
%if %{enable_python3}
|
||||||
|
%global enable_dbusd 1
|
||||||
|
%else
|
||||||
|
# dbusd requires python3
|
||||||
|
false
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{enable_dbusd}
|
||||||
|
%global buildreq_python3_dbus python3-dbus
|
||||||
|
%global buildreq_python3_pyudev python3-pyudev
|
||||||
|
%endif
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
%if %{fedora} == 16 || %{rhel} == 6
|
%if %{fedora} == 16 || %{rhel} == 6
|
||||||
%global enable_systemd 0
|
%global enable_systemd 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user