3 ##############################################################
4 # Defaults (rawhide)...
6 %global enable_profiling 0
7 %global enable_testsuite 1
10 %global enable_systemd 1
11 %global enable_cmirror 1
12 %global enable_lvmlockd 1
13 %global enable_lvmpolld 1
14 %global enable_dmfilemapd 0
15 #%global enable_lvmlockd_dlm 0
16 #%global enable_lvmlockd_sanlock 0
22 ########################################################
23 # Normally clustering is maintained via resource agents
25 # enable service only if you know what you are doing
31 %global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
32 %global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
34 # TODO %global req_dm_persistent device-mapper-persistent-data >= 0.1.4
37 %with thin_check %{_sbindir}/thin_check
38 %with thin_repair %{_sbindir}/thin_repair
39 %with thin_dump %{_sbindir}/thin_dump
40 # TODO disable vdo and writecache for older releases
42 %with vdo-format %{_bindir}/vdoformat
43 %with writecache internal
44 %with integrity internal
46 %global buildreq_udev systemd-devel
47 %global req_udev udev >= 181-1
50 %if %{fedora} >= 35 || %{rhel} >= 9
51 %global enable_readline 0
52 %global enable_editline 1
54 %global enable_readline 1
55 %global enable_editline 0
58 %if %{fedora} >= 24 || %{rhel} >= 7
60 %global sanlock_version 3.3.0-1
61 %global enable_lvmlockd_dlm 1
62 %global enable_lvmlockd_sanlock 1
64 %ifarch i686 x86_64 s390x
65 %global buildreq_lvmlockd_dlm dlm-devel >= %{dlm_version}
67 %global enable_lvmlockd_dlm 0
69 %ifarch x86_64 ppc64le ppc64 aarch64
70 %global buildreq_lvmlockd_sanlock sanlock-devel >= %{sanlock_version}
72 %global enable_lvmlockd_sanlock 0
78 %global enable_lvmlockd_dlm 1
82 ##############################################################
84 %if %{rhel} >= 7 || %{fedora} >= 25
85 %global enable_dmfilemapd 1
88 ##############################################################
90 %if %{rhel} >= 8 || %{fedora} >= 23
91 %global enable_dbusd 1
95 %global buildreq_python3_devel python3-devel
96 %global buildreq_python3_setuptools python3-setuptools
97 %global buildreq_python3_dbus python3-dbus
98 %global buildreq_python3_pyudev python3-pyudev
101 ##############################################################
103 %if %{fedora} == 16 || %{rhel} == 6
104 %global enable_systemd 0
106 %global buildreq_udev libudev-devel
107 %global buildreq_cluster openaislib-devel >= 1.1.1-1, clusterlib-devel >= 3.0.6-1, corosynclib-devel >= 1.2.0-1
109 %global req_udev udev >= 158-1
110 %global req_cluster openais >= 1.1.1-1, cman >= 3.0.6-1, corosync >= 1.2.0-1
112 %global _udevbasedir /lib/udev
113 %global _udevdir %{_udevbasedir}/rules.d
125 %with default-use-devices-file 1
128 ##############################################################
131 %global buildreq_udev systemd-devel
132 %global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
134 %global req_udev udev >= 181-1
135 %global req_dm_persistent device-mapper-persistent-data >= 0.1.4
136 %global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
139 ##############################################################
140 # same as FC 16 above, only with older udev
143 %global req_udev udev >= 147-2
144 %global req_dm_persistent device-mapper-persistent-data >= 0.1.4
147 ##############################################################
149 # Do not reset Release to 1 unless both lvm2 and device-mapper
150 # versions are increased together.
152 %global device_mapper_version 1.02.97
154 Summary: Userland logical volume management tools
159 Group: System Environment/Base
160 URL: http://sources.redhat.com/lvm2
161 Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
164 Source93: packages.inc
167 BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
168 BuildRequires: ncurses-devel
169 %if %{enable_readline}
170 BuildRequires: readline-devel
172 %if %{enable_editline}
173 BuildRequires: libedit-devel
175 BuildRequires: module-init-tools
176 BuildRequires: pkgconfig
178 # Expands to nothing unless at least 2 arguments are given
180 %if %(test -n "%{?2}" && echo 1 || echo 0) \
184 %if %(if echo %{with_flags} | grep -q %1; then echo 1; else echo 0; fi)
186 %maybe BuildRequires: %{?buildreq_udev}
187 %maybe BuildRequires: %{?buildreq_cluster}
188 %maybe BuildRequires: %{?buildreq_lvmlockd_dlm}
189 %maybe BuildRequires: %{?buildreq_lvmlockd_sanlock}
190 %maybe BuildRequires: %{?buildreq_python3_devel}
191 %maybe BuildRequires: %{?buildreq_python3_setuptools}
194 LVM2 includes all of the support for handling read/write operations on
195 physical volumes (hard disks, RAID-Systems, magneto optical, etc.,
196 multiple devices (MD), see mdadd(8) or even loop devices, see
197 losetup(8)), creating volume groups (kind of virtual disks) from one
198 or more physical volumes and creating one or more logical volumes
199 (kind of logical partitions) in volume groups.