2016-05-11 05:42:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package lvm2-clvm
|
|
|
|
#
|
2017-01-10 10:43:13 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-05-11 05:42:15 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-04-10 13:36:47 +02:00
|
|
|
%define dlm_version 3.99.1
|
|
|
|
%define sanlock_version 3.3.0
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-DEF-BEGIN ###
|
2017-08-07 09:53:46 +02:00
|
|
|
%define lvm2_version 2.02.173
|
|
|
|
%define device_mapper_version 1.02.142
|
2017-07-04 14:31:34 +02:00
|
|
|
%define thin_provisioning_version 0.7.0
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-DEF-END ###
|
|
|
|
Name: lvm2-clvm
|
|
|
|
Version: %{lvm2_version}
|
|
|
|
Release: 0
|
|
|
|
Summary: Clustered LVM2
|
2016-09-14 11:43:37 +02:00
|
|
|
License: GPL-2.0+ and LGPL-2.1+
|
2016-05-11 05:42:15 +02:00
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
Url: http://sources.redhat.com/cluster/clvm/
|
|
|
|
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
|
|
|
|
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
|
|
|
|
Source2: clvmd.ocf
|
|
|
|
Source3: cmirrord.ocf
|
2017-04-10 12:40:22 +02:00
|
|
|
BuildRequires: libcorosync-devel
|
2017-04-10 13:36:47 +02:00
|
|
|
BuildRequires: libdlm-devel >= %{dlm_version}
|
2017-04-10 12:40:22 +02:00
|
|
|
BuildRequires: pkgconfig
|
2017-04-10 13:36:47 +02:00
|
|
|
BuildRequires: sanlock-devel >= %{sanlock_version}
|
2017-04-10 12:40:22 +02:00
|
|
|
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
|
2017-04-10 13:36:47 +02:00
|
|
|
BuildRequires: pkgconfig(blkid)
|
2017-04-10 12:40:22 +02:00
|
|
|
BuildRequires: pkgconfig(devmapper)
|
|
|
|
BuildRequires: pkgconfig(libudev)
|
|
|
|
Requires: corosync
|
|
|
|
Requires: device-mapper >= %{device_mapper_version}
|
|
|
|
Requires: lvm2 = %{version}
|
|
|
|
Requires: lvm2-cmirrord
|
|
|
|
Obsoletes: cmirrord < %{version}
|
|
|
|
Provides: cmirrord = %{version}
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-PATCH-BEGIN ###
|
2017-03-01 03:49:19 +01:00
|
|
|
# Upstream patches
|
2017-06-17 17:47:00 +02:00
|
|
|
|
|
|
|
# SUSE patches: 1000+ for LVM
|
2016-05-11 05:42:15 +02:00
|
|
|
# Never upstream
|
2017-05-04 04:45:40 +02:00
|
|
|
Patch1001: cmirrord_remove_date_time_from_compilation.patch
|
|
|
|
#fate#309425
|
|
|
|
Patch1002: display-dm-name-for-lv-name.diff
|
|
|
|
#fate#312248
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1003: make-mirror-legs-on-different-tag-pvs.patch
|
|
|
|
Patch1004: improve-mirror-legs-on-different-tag-pvs.patch
|
2017-05-04 04:45:40 +02:00
|
|
|
#fate#315092
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1005: cmirrord_improvment_performance.patch
|
2017-05-04 04:45:40 +02:00
|
|
|
#fate#314367
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1006: cluster_support_mirrord_log.diff
|
|
|
|
Patch1007: lvconvert-cluster-mirrored-disk-failed.patch
|
2017-06-17 17:47:00 +02:00
|
|
|
#FATE#318413
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1008: fsadm-add-support-for-btrfs.patch
|
2017-03-01 03:49:19 +01:00
|
|
|
#bnc#870824
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1009: use-mirrortype-asdefault-whenclvmdrunning.patch
|
2017-03-01 03:49:19 +01:00
|
|
|
#bsc#935623
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1010: dmeventd-fix-dso-name-wrong-compare.patch
|
2017-03-01 03:49:19 +01:00
|
|
|
#bsc#960044
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch1011: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
2017-06-17 17:47:00 +02:00
|
|
|
|
|
|
|
#SUSE patches 2000+ for device mapper, udev rules
|
2017-03-01 03:49:19 +01:00
|
|
|
#bsc#1012973
|
2017-08-07 09:53:46 +02:00
|
|
|
Patch2006: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-PATCH-END ###
|
2017-03-01 03:49:19 +01:00
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
%description
|
|
|
|
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n LVM2.%{lvm2_version}
|
2017-03-01 03:49:19 +01:00
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-PREP-BEGIN ###
|
|
|
|
%patch1001 -p1
|
|
|
|
%patch1002 -p1
|
2017-05-04 04:45:40 +02:00
|
|
|
%patch1003 -p1
|
2016-05-11 05:42:15 +02:00
|
|
|
%patch1004 -p1
|
|
|
|
%patch1005 -p1
|
|
|
|
%patch1006 -p1
|
|
|
|
%patch1007 -p1
|
|
|
|
%patch1008 -p1
|
|
|
|
%patch1009 -p1
|
|
|
|
%patch1010 -p1
|
|
|
|
%patch1011 -p1
|
|
|
|
%patch2006 -p1
|
|
|
|
### COMMON-PREP-END ###
|
|
|
|
|
|
|
|
%build
|
|
|
|
extra_opts="
|
2017-04-10 13:36:47 +02:00
|
|
|
--enable-applib
|
|
|
|
--enable-blkid_wiping
|
|
|
|
--enable-cmdlib
|
|
|
|
--enable-lvmetad
|
|
|
|
--enable-lvmpolld
|
|
|
|
--enable-realtime
|
2016-05-11 05:42:15 +02:00
|
|
|
--with-default-locking-dir=/run/lock/lvm
|
|
|
|
--with-default-pid-dir=/run
|
|
|
|
--with-default-run-dir=/run/lvm
|
|
|
|
--with-clvmd=corosync
|
|
|
|
--with-cluster=internal
|
|
|
|
--enable-cmirrord
|
2017-07-04 14:31:34 +02:00
|
|
|
--enable-lvmlockd-dlm
|
|
|
|
--enable-lvmlockd-sanlock
|
2016-05-11 05:42:15 +02:00
|
|
|
"
|
2017-03-01 03:49:19 +01:00
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
### COMMON-CONFIG-BEGIN ###
|
|
|
|
export PATH=$PATH:/sbin:%{_prefix}/sbin
|
|
|
|
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
|
|
|
|
%configure \
|
2017-04-10 12:41:54 +02:00
|
|
|
--enable-dmeventd \
|
|
|
|
--enable-cmdlib \
|
|
|
|
--enable-udev_rules \
|
|
|
|
--enable-udev_sync \
|
2016-05-11 05:42:15 +02:00
|
|
|
--with-udev-prefix="%{_prefix}/" \
|
|
|
|
--enable-selinux \
|
|
|
|
--enable-pkgconfig \
|
|
|
|
--with-usrlibdir=%{_libdir} \
|
|
|
|
--with-usrsbindir=%{_sbindir} \
|
|
|
|
--with-default-dm-run-dir=/run \
|
|
|
|
--with-tmpfilesdir=%{_tmpfilesdir} \
|
|
|
|
--with-thin=internal \
|
|
|
|
--with-device-gid=6 \
|
|
|
|
--with-device-mode=0640 \
|
|
|
|
--with-device-uid=0 \
|
|
|
|
--with-dmeventd-path=%{_sbindir}/dmeventd \
|
|
|
|
--with-thin-check=%{_sbindir}/thin_check \
|
|
|
|
--with-thin-dump=%{_sbindir}/thin_dump \
|
|
|
|
--with-thin-repair=%{_sbindir}/thin_repair \
|
|
|
|
$extra_opts
|
|
|
|
### COMMON-CONFIG-END ###
|
2017-03-01 03:49:19 +01:00
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=%{buildroot} \
|
|
|
|
install_cluster \
|
|
|
|
install_systemd_units install_systemd_generators
|
2017-04-10 13:36:47 +02:00
|
|
|
make DESTDIR=%{buildroot} install -C daemons/lvmlockd
|
2016-05-11 05:42:15 +02:00
|
|
|
make DESTDIR=%{buildroot} install -C daemons/cmirrord
|
|
|
|
|
2017-04-10 13:36:47 +02:00
|
|
|
# lvmlockd does not have separate target install the mans by hand for now
|
|
|
|
install -m0644 -D man/lvmlockd.8 %{buildroot}%{_mandir}/man8/lvmlockd.8
|
|
|
|
install -m0644 -D man/lvmlockctl.8 %{buildroot}%{_mandir}/man8/lvmlockctl.8
|
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
# ocf files
|
|
|
|
install -m755 -D %{SOURCE2} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/clvmd"
|
|
|
|
install -m755 -D %{SOURCE3} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/cmirrord"
|
|
|
|
|
|
|
|
# rc services symlinks
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rclvm2-cluster-activation
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rclvm2-clvmd
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rclvm2-cmirrord
|
2017-04-10 13:36:47 +02:00
|
|
|
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlockd
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlocking
|
2016-05-11 05:42:15 +02:00
|
|
|
|
|
|
|
# remove files from lvm2 split due to systemd_generators picking them up
|
|
|
|
rm %{buildroot}%{_unitdir}/blk-availability.service
|
|
|
|
rm %{buildroot}%{_unitdir}/dm-event.service
|
|
|
|
rm %{buildroot}%{_unitdir}/dm-event.socket
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-monitor.service
|
|
|
|
rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
|
2017-04-10 13:36:47 +02:00
|
|
|
rm %{buildroot}%{_libexecdir}/systemd/system-generators/lvm2-activation-generator
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-lvmetad.service
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-lvmetad.socket
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.service
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.socket
|
|
|
|
rm %{buildroot}%{_unitdir}/lvm2-pvscan@.service
|
2016-05-11 05:42:15 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/clvmd
|
|
|
|
%{_sbindir}/rclvm2-cluster-activation
|
|
|
|
%{_sbindir}/rclvm2-clvmd
|
|
|
|
%dir %{_libexecdir}/ocf
|
|
|
|
%dir %{_libexecdir}/ocf/resource.d
|
|
|
|
%dir %{_libexecdir}/ocf/resource.d/lvm2
|
|
|
|
%{_libexecdir}/ocf/resource.d/lvm2/clvmd
|
|
|
|
%{_unitdir}/lvm2-clvmd.service
|
|
|
|
%{_unitdir}/lvm2-cluster-activation.service
|
|
|
|
%{_libexecdir}/systemd/lvm2-cluster-activation
|
2017-04-10 12:40:22 +02:00
|
|
|
%{_mandir}/man8/clvmd.8%{ext_man}
|
2017-03-01 03:49:19 +01:00
|
|
|
|
|
|
|
%package -n lvm2-cmirrord
|
|
|
|
Summary: Clustered RAID 1 support using device-mapper and corosync
|
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
Requires: corosync
|
|
|
|
Requires: device-mapper >= %{device_mapper_version}
|
|
|
|
Requires: lvm2 = %{version}
|
|
|
|
Requires: lvm2-clvm
|
|
|
|
|
|
|
|
%description -n lvm2-cmirrord
|
|
|
|
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
2016-05-11 05:42:15 +02:00
|
|
|
|
|
|
|
%files -n lvm2-cmirrord
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/cmirrord
|
|
|
|
%{_libexecdir}/ocf/resource.d/lvm2/cmirrord
|
|
|
|
%{_libexecdir}/systemd/system/lvm2-cmirrord.service
|
2017-03-01 03:49:19 +01:00
|
|
|
%{_sbindir}/rclvm2-cmirrord
|
2017-04-10 12:40:22 +02:00
|
|
|
%{_mandir}/man8/cmirrord.8%{ext_man}
|
2016-05-11 05:42:15 +02:00
|
|
|
|
2017-04-10 13:36:47 +02:00
|
|
|
%package -n lvm2-lockd
|
|
|
|
Summary: LVM locking daemon
|
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
Requires: libdlm >= %{dlm_version}
|
|
|
|
Requires: libsanlock1 >= %{sanlock_version}
|
|
|
|
Requires: lvm2 = %{version}
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
|
|
%description -n lvm2-lockd
|
|
|
|
LVM commands use lvmlockd to coordinate access to shared storage.
|
|
|
|
|
|
|
|
%pre -n lvm2-lockd
|
|
|
|
%service_add_pre lvm2-lvmlockd.service lvm2-lvmlocking.service
|
|
|
|
|
|
|
|
%post -n lvm2-lockd
|
|
|
|
%service_add_post lvm2-lvmlockd.service lvm2-lvmlocking.service
|
|
|
|
|
|
|
|
%preun -n lvm2-lockd
|
|
|
|
%service_del_preun lvm2-lvmlockd.service lvm2-lvmlocking.service
|
|
|
|
|
|
|
|
%postun -n lvm2-lockd
|
|
|
|
%service_del_postun lvm2-lvmlockd.service lvm2-lvmlocking.service
|
|
|
|
|
|
|
|
%files -n lvm2-lockd
|
|
|
|
%defattr(-,root,root,)
|
|
|
|
%{_sbindir}/lvmlockd
|
|
|
|
%{_sbindir}/lvmlockctl
|
|
|
|
%{_mandir}/man8/lvmlockd.8%{ext_man}
|
|
|
|
%{_mandir}/man8/lvmlockctl.8%{ext_man}
|
|
|
|
%{_unitdir}/lvm2-lvmlockd.service
|
|
|
|
%{_unitdir}/lvm2-lvmlocking.service
|
|
|
|
%{_sbindir}/rclvm2-lvmlockd
|
|
|
|
%{_sbindir}/rclvm2-lvmlocking
|
|
|
|
|
2016-05-11 05:42:15 +02:00
|
|
|
%changelog
|