mirror of
git://sourceware.org/git/lvm2.git
synced 2025-09-24 21:44:22 +03:00
Compare commits
7 Commits
v2_03_17
...
dev-mcsont
Author | SHA1 | Date | |
---|---|---|---|
|
4b84dc8db2 | ||
|
df4f4c1d9e | ||
|
56b2ffddc4 | ||
|
9dc3dfe7b5 | ||
|
f8d41ae850 | ||
|
32f89f6f5b | ||
|
76848c5be9 |
@@ -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
|
||||
|
||||
|
@@ -14,70 +14,73 @@
|
||||
%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)
|
||||
# TODO: This will disable feature, even though configure could enable it if requirements were met:
|
||||
# SUGGESTION: rename this to enableiff - "if and only if" and use weaker enableif not producing disable flag
|
||||
# NOTE: It is in some cases guarded by another if, so may not produce anything...
|
||||
%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}
|
||||
|
@@ -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
|
||||
|
@@ -12,6 +12,7 @@
|
||||
%global enable_udev 1
|
||||
%global enable_systemd 1
|
||||
%global enable_cmirror 1
|
||||
# enable_lvmlockd is redefined in spec/build.inc, so are other :-/
|
||||
%global enable_lvmlockd 1
|
||||
%global enable_lvmetad 1
|
||||
%global enable_lvmpolld 1
|
||||
@@ -48,23 +49,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 +146,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 +155,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
|
||||
|
@@ -1063,7 +1063,7 @@ generate_config() {
|
||||
cat > "$config_values" <<-EOF
|
||||
activation/checks = 1
|
||||
activation/monitoring = 0
|
||||
activation/polling_interval = 1
|
||||
activation/polling_interval = 0
|
||||
activation/retry_deactivation = 1
|
||||
activation/snapshot_autoextend_percent = 50
|
||||
activation/snapshot_autoextend_threshold = 50
|
||||
|
Reference in New Issue
Block a user