1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-26 01:44:19 +03:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Marian Csontos
b3000598ce spec: Disable sanlock only, keep lockd_dlm enabled 2016-09-16 18:01:31 +02:00
Marian Csontos
de68e837b4 spec: Replace remaining %define by %global 2016-09-16 17:31:37 +02:00
Marian Csontos
ddec56ec3a spec: Use %global instead of %define for constants
Using %define is now discouraged by Fedora Packaging Guidelines
2016-09-16 17:31:37 +02:00
Marian Csontos
b6c3af9b6f spec: Update requirements for lockd
lockd requires sanlock >= 3.3.0
2016-09-16 17:31:37 +02:00
Marian Csontos
9c68431c5d spec: Profiles are not %confi(noreplace)
These files are just examles and should not be edited by user.
2016-09-16 17:31:36 +02:00
4 changed files with 68 additions and 63 deletions

View File

@@ -14,7 +14,7 @@
# on those systems.
# A macro to pull in an include file from an appropriate location.
%define import() %include %(test -e %{S:%1} && echo %{S:%1} || echo %{_sourcedir}/%1)
%global import() %%include %%(test -e %%{S:%%1} && echo %%{S:%%1} || echo %%{_sourcedir}/%%1)
%import source.inc

View File

@@ -14,70 +14,70 @@
%global rhel 0
%endif
%define enableif() \
%global configure_flags %{?configure_flags} --%(if test %1 -gt 0; then echo enable-%2; else echo disable-%2; fi)
%global enableif() \
%%global configure_flags %%{?configure_flags} --%%(if test %%1 -gt 0; then echo enable-%%2; else echo disable-%%2; fi)
%define with() \
%global configure_flags %(echo -n "%{?configure_flags} " | sed -e "s,--with-%1=[^ ]*,,"; test -n "%{?2}" && echo --with-%1=%2) \
%global with_flags %(echo -n "%{?with_flags} " | sed -e "s,%1,,"; test -n "%{?2}" && test "%{?2}" != none && echo %1)
%global with() \
%%global configure_flags %%(echo -n "%%{?configure_flags} " | sed -e "s,--with-%%1=[^ ]*,,"; test -n "%%{?2}" && echo --with-%%1=%%2) \
%%global with_flags %%(echo -n "%%{?with_flags} " | sed -e "s,%%1,,"; test -n "%%{?2}" && test "%%{?2}" != none && echo %%1)
%global services monitor
%define service() \
%global services %(echo -n "%{?services} " | sed -e s,%1,,; test "%2" = 1 && echo %1)
%global service() \
%%global services %%(echo -n "%%{?services} " | sed -e s,%%1,,; test "%%2" = 1 && echo %%1)
%define maybe() \
%if %(test -n "%{?2}" && echo 1 || echo 0) \
%* \
%endif
%global maybe() \
%%if %%(test -n "%%{?2}" && echo 1 || echo 0) \
%%* \
%%endif
%define have_with() %(if echo %{with_flags} | grep -q %1; then echo 1; else echo 0; fi)
%define have_service() %(if echo %{services} | grep -q %1; then echo 1; else echo 0; fi)
%global have_with() %%(if echo %%{with_flags} | grep -q %%1; then echo 1; else echo 0; fi)
%global have_service() %%(if echo %%{services} | grep -q %%1; then echo 1; else echo 0; fi)
%define daemon_reload \
%if %{enable_systemd} \
%global daemon_reload \
%%if %%{enable_systemd} \
systemctl daemon-reload > /dev/null 2>&1 || : \
%endif \
%%endif \
: \
%{nil}
%%{nil}
%define enable(s:t:) \
%if %{have_service %{-s*}} \
%if %{enable_systemd} \
%global enable(s:t:) \
%%if %%{have_service %%{-s*}} \
%%if %%{enable_systemd} \
if [ $1 = 1 ]; then \
systemctl preset lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
systemctl preset lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
fi \
%else \
/sbin/chkconfig --add lvm2-%{-s*} \
%endif \
%endif \
%%else \
/sbin/chkconfig --add lvm2-%%{-s*} \
%%endif \
%%endif \
: \
%{nil}
%%{nil}
%define disable(s:t:) \
%if %{have_service %{-s*}} \
%if %{enable_systemd} \
%global disable(s:t:) \
%%if %%{have_service %%{-s*}} \
%%if %%{enable_systemd} \
if [ $1 = 0 ]; then \
systemctl --no-reload disable lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
%if %{-t*} == socket \
systemctl --no-reload disable lvm2-%{-s*}.service > /dev/null 2>&1 || : \
%endif \
systemctl stop lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
%if %{-t*} == socket \
systemctl stop lvm2-%{-s*}.service > /dev/null 2>&1 || : \
%endif \
systemctl --no-reload disable lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
%%if %%{-t*} == socket \
systemctl --no-reload disable lvm2-%%{-s*}.service > /dev/null 2>&1 || : \
%%endif \
systemctl stop lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
%%if %%{-t*} == socket \
systemctl stop lvm2-%%{-s*}.service > /dev/null 2>&1 || : \
%%endif \
fi \
%else \
/sbin/chkconfig --del lvm2-%{-s*} \
%endif \
%endif \
%%else \
/sbin/chkconfig --del lvm2-%%{-s*} \
%%endif \
%%endif \
: \
%{nil}
%%{nil}
%define try_restart(s:t:) \
%if %{have_service %{-s*}} && %{enable_systemd} \
%global try_restart(s:t:) \
%%if %%{have_service %%{-s*}} && %%{enable_systemd} \
if [ $1 = 1 ]; then \
systemctl try-restart lvm2-%{-s*}.%{-t*} > /dev/null 2>&1 || : \
systemctl try-restart lvm2-%%{-s*}.%%{-t*} > /dev/null 2>&1 || : \
fi \
%endif \
%%endif \
: \
%{nil}
%%{nil}

View File

@@ -176,13 +176,13 @@ fi
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf
%dir %{_sysconfdir}/lvm/profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-mq.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/cache-smq.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/lvmdbusd.profile
%{_sysconfdir}/lvm/profile/command_profile_template.profile
%{_sysconfdir}/lvm/profile/metadata_profile_template.profile
%{_sysconfdir}/lvm/profile/thin-generic.profile
%{_sysconfdir}/lvm/profile/thin-performance.profile
%{_sysconfdir}/lvm/profile/cache-mq.profile
%{_sysconfdir}/lvm/profile/cache-smq.profile
%{_sysconfdir}/lvm/profile/lvmdbusd.profile
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
%dir %{_sysconfdir}/lvm/archive

View File

@@ -48,23 +48,28 @@
%global req_udev udev >= 181-1
%if %{fedora} >= 22 || %{rhel} >= 7
%if %{fedora} >= 24 || %{rhel} >= 7
%service lvmlockd 1
%define sanlock_version 3.2.4-1
%define enable_lockd_dlm 1
%define enable_lockd_sanlock 1
%global sanlock_version 3.3.0-1
%global enable_lockd_dlm 1
%global enable_lockd_sanlock 1
%if %{rhel}
%ifarch i686 x86_64 s390x
%global buildreq_lockd_dlm dlm-devel >= %{dlm_version}
%else
%define enable_lockd_dlm 0
%global enable_lockd_dlm 0
%endif
%ifarch x86_64 ppc64le ppc64 aarch64
%global buildreq_lockd_sanlock sanlock-devel >= %{sanlock_version}
%else
%define enable_lockd_sanlock 0
%global enable_lockd_sanlock 0
%endif
%endif
%else
%if %{fedora} >= 22
%service lvmlockd 1
%global enable_lockd_dlm 1
%endif
%endif
##############################################################
@@ -140,7 +145,7 @@
# same as FC 16 above, only with older udev
%if %{rhel} == 6
%define req_udev udev >= 147-2
%global req_udev udev >= 147-2
%global req_dm_persistent device-mapper-persistent-data >= 0.1.4
%endif
@@ -149,7 +154,7 @@
# Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together.
%define device_mapper_version 1.02.97
%global device_mapper_version 1.02.97
Summary: Userland logical volume management tools
Name: lvm2