lvm2/lvm2-clvm.spec

218 lines
7.0 KiB
RPMSpec
Raw Normal View History

2016-05-11 05:42:15 +02:00
#
# spec file for package lvm2-clvm
#
# 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/
#
%define dlm_version 3.99.1
%define sanlock_version 3.3.0
2016-05-11 05:42:15 +02:00
### COMMON-DEF-BEGIN ###
Accepting request 558347 from network:ha-clustering:Unstable - device-mapper.spec: fix wrong replacement of DM_VERSION (bsc#1072524) - Fixes failure of some testcases caused by nc behavior change (bsc#1072624) + bug-1072624_test-lvmetad_dump-always-timed-out-when-using-nc.patch - Refreshed fate-31841_fsadm-add-support-for-btrfs.patch - Update to LVM2.2.02.177 When writing text metadata content, use complete 4096 byte blocks. Change text format metadata alignment from 512 to 4096 bytes. When writing metadata, consistently skip mdas marked as failed. Refactor and adjust text format metadata alignment calculation. Ensure _node_send_message always uses clean status of thin pool. Fix lvmlockd to use pool lock when accessing _tmeta volume. Report expected sanlock_convert errors only when retries fail. Avoid blocking in sanlock_convert on SH to EX lock conversion. Deactivate missing raid LV legs (_rimage_X-missing_Y_Z) on decativation. Categorise I/O with reason annotations in debug messages. Allow extending of raid LVs created with --nosync after a failed repair. Command will lock memory only when suspending volumes. Merge segments when pvmove is finished. Activation code for pvmove automatically discovers holding LVs for resume. Make a pvmove LV locking holder. Do not change critical section counter on resume path without real resume. Enhance activation code to automatically suspend pvmove participants. Prevent conversion of thin volumes to snapshot origin when lvmlockd is used. Add support for pvmove of cache and snapshot origins. Avoid using precommitted metadata for suspending pvmove tree. Deactivate activated LVs on error path when pvmove activation fails. Add "io" to log/debug_classes for logging low-level I/O. Avoid importing persistent filter in vgscan/pvscan/vgrename. Fix memleak of string buffer when vgcfgbackup runs in secure mode. Do not print error when clvmd cannot find running clvmd. OBS-URL: https://build.opensuse.org/request/show/558347 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=212
2017-12-19 11:40:00 +01:00
%define lvm2_version 2.02.177
%define device_mapper_version 1.02.146
%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
Accepting request 426139 from home:scarabeus_iv:branches:Base:System - This is sync commit from Leap/SLE12 only - Add patch pvcreate-enhance-the-error-message.patch bsc#960744 - Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid license conflict with thin-provisioning-tools which is using GPL-3.0 - Also contains fix for bsc#969310 - Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod (bsc#971334) - Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon when locking_type is not 3 or use_lvmetad is 1 in setting (bsc#970439) - Modified spec to enable blkid-wiping (fate#319908) - Fix clvmd binary not found in case that users still use RA from ocf:lvm2:clvm (bsc#980200) Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf - The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr migration code - Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329) - Remove lvm2-clvmd/cmirrord.service and related activation services from %service_add _pre/post/preun/postun because we start clvmd /clmirrord and activate via pacemaker and RA. (bsc#980296) - Lvchange improve refresh by trying to deactivate snapshot thinLV in case it's preventing merge process change integrated upstream. (bsc#984321) - Fixed in past bsc#992843 - Fixed by upstream bsc#984321 - Fixed by upstream bsc#970943 - 69-dm-lvm-metad.rules: Do not process rules for multipath devices (bsc#bsc#990538, bsc#986734) Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch - Rewrite patches to include patch header: OBS-URL: https://build.opensuse.org/request/show/426139 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=158
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
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel >= %{dlm_version}
BuildRequires: pkgconfig
BuildRequires: sanlock-devel >= %{sanlock_version}
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(blkid)
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 ###
# Upstream patches
# SUSE patches: 1000+ for LVM
2016-05-11 05:42:15 +02:00
# Never upstream
Patch1001: cmirrord_remove_date_time_from_compilation.patch
Accepting request 535958 from network:ha-clustering:Unstable - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch - Drop resource agents for clvmd and cmirror (bsc#1058680) - clvmd.ocf - cmirrord.ocf - Drop all patches for cmirror (bsc#1058661) - cluster_support_mirrord_log.diff - cmirrord_improvment_performance.patch - lvconvert-cluster-mirrored-disk-failed.patch - improve-mirror-legs-on-different-tag-pvs.patch - make-mirror-legs-on-different-tag-pvs.patch - use-mirrortype-asdefault-whenclvmdrunning.patch - lvm2-testsuite.patch - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch OBS-URL: https://build.opensuse.org/request/show/535958 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=204
2017-10-23 13:56:11 +02:00
Patch1002: fate-309425_display-dm-name-for-lv-name.patch
Patch1003: fate-31841_fsadm-add-support-for-btrfs.patch
Patch1004: bug-935623_dmeventd-fix-dso-name-wrong-compare.patch
#SUSE patches 2000+ for device mapper, udev rules
Patch2001: bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
2016-05-11 05:42:15 +02:00
### COMMON-PATCH-END ###
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}
2016-05-11 05:42:15 +02:00
### COMMON-PREP-BEGIN ###
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
2016-05-11 05:42:15 +02:00
%patch1004 -p1
%patch2001 -p1
2016-05-11 05:42:15 +02:00
### COMMON-PREP-END ###
%build
extra_opts="
--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
--enable-lvmlockd-dlm
--enable-lvmlockd-sanlock
2016-05-11 05:42:15 +02:00
"
2016-05-11 05:42:15 +02:00
### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_prefix}/sbin
Accepting request 535958 from network:ha-clustering:Unstable - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch - Drop resource agents for clvmd and cmirror (bsc#1058680) - clvmd.ocf - cmirrord.ocf - Drop all patches for cmirror (bsc#1058661) - cluster_support_mirrord_log.diff - cmirrord_improvment_performance.patch - lvconvert-cluster-mirrored-disk-failed.patch - improve-mirror-legs-on-different-tag-pvs.patch - make-mirror-legs-on-different-tag-pvs.patch - use-mirrortype-asdefault-whenclvmdrunning.patch - lvm2-testsuite.patch - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch OBS-URL: https://build.opensuse.org/request/show/535958 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=204
2017-10-23 13:56:11 +02:00
# Why this messy fix here? someone released a wrong version...
Accepting request 558347 from network:ha-clustering:Unstable - device-mapper.spec: fix wrong replacement of DM_VERSION (bsc#1072524) - Fixes failure of some testcases caused by nc behavior change (bsc#1072624) + bug-1072624_test-lvmetad_dump-always-timed-out-when-using-nc.patch - Refreshed fate-31841_fsadm-add-support-for-btrfs.patch - Update to LVM2.2.02.177 When writing text metadata content, use complete 4096 byte blocks. Change text format metadata alignment from 512 to 4096 bytes. When writing metadata, consistently skip mdas marked as failed. Refactor and adjust text format metadata alignment calculation. Ensure _node_send_message always uses clean status of thin pool. Fix lvmlockd to use pool lock when accessing _tmeta volume. Report expected sanlock_convert errors only when retries fail. Avoid blocking in sanlock_convert on SH to EX lock conversion. Deactivate missing raid LV legs (_rimage_X-missing_Y_Z) on decativation. Categorise I/O with reason annotations in debug messages. Allow extending of raid LVs created with --nosync after a failed repair. Command will lock memory only when suspending volumes. Merge segments when pvmove is finished. Activation code for pvmove automatically discovers holding LVs for resume. Make a pvmove LV locking holder. Do not change critical section counter on resume path without real resume. Enhance activation code to automatically suspend pvmove participants. Prevent conversion of thin volumes to snapshot origin when lvmlockd is used. Add support for pvmove of cache and snapshot origins. Avoid using precommitted metadata for suspending pvmove tree. Deactivate activated LVs on error path when pvmove activation fails. Add "io" to log/debug_classes for logging low-level I/O. Avoid importing persistent filter in vgscan/pvscan/vgrename. Fix memleak of string buffer when vgcfgbackup runs in secure mode. Do not print error when clvmd cannot find running clvmd. OBS-URL: https://build.opensuse.org/request/show/558347 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=212
2017-12-19 11:40:00 +01:00
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
2016-05-11 05:42:15 +02:00
%configure \
--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 ###
2016-05-11 05:42:15 +02:00
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} \
install_cluster \
install_systemd_units install_systemd_generators
make DESTDIR=%{buildroot} install -C daemons/lvmlockd
2016-05-11 05:42:15 +02:00
make DESTDIR=%{buildroot} install -C daemons/cmirrord
# 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
# 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
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
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
%{_unitdir}/lvm2-clvmd.service
%{_unitdir}/lvm2-cluster-activation.service
%{_libexecdir}/systemd/lvm2-cluster-activation
%{_mandir}/man8/clvmd.8%{ext_man}
%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}/systemd/system/lvm2-cmirrord.service
%{_sbindir}/rclvm2-cmirrord
%{_mandir}/man8/cmirrord.8%{ext_man}
2016-05-11 05:42:15 +02:00
%package -n lvm2-lockd
Summary: LVM locking daemon
Group: Productivity/Clustering/HA
Accepting request 535958 from network:ha-clustering:Unstable - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch - Drop resource agents for clvmd and cmirror (bsc#1058680) - clvmd.ocf - cmirrord.ocf - Drop all patches for cmirror (bsc#1058661) - cluster_support_mirrord_log.diff - cmirrord_improvment_performance.patch - lvconvert-cluster-mirrored-disk-failed.patch - improve-mirror-legs-on-different-tag-pvs.patch - make-mirror-legs-on-different-tag-pvs.patch - use-mirrortype-asdefault-whenclvmdrunning.patch - lvm2-testsuite.patch - Update to LVM2.2.02.175 - Use week dependency for lvm2-lockd on libdlm and sanlock - Rename/refresh patches: - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch OBS-URL: https://build.opensuse.org/request/show/535958 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=204
2017-10-23 13:56:11 +02:00
Recommends: libdlm >= %{dlm_version}
Requires: lvm2 = %{version}
Requires: sanlock >= %{sanlock_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