# # spec file for package lvm2-clvm # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # 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/ # ### COMMON-DEF-BEGIN ### %define lvm2_version 2.02.168 %define device_mapper_version 1.02.137 %define thin_provisioning_version 0.5.6 %define dlm_version 3.99.1 %define sanlock_version 3.3.0 ### COMMON-DEF-END ### Name: lvm2-clvm Version: %{lvm2_version} Release: 0 Summary: Clustered LVM2 License: GPL-2.0+ and LGPL-2.1+ 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 BuildRequires: libcorosync-devel BuildRequires: libdlm-devel BuildRequires: pkgconfig BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version} 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} ### COMMON-PATCH-BEGIN ### # Upstream patches # SUSE patches: 1000+ for LVM, 2000+ for device mapper Patch1001: improve_probing.diff Patch1002: no-inc-audit.diff #bsc#952300 Patch1004: sys_mount_instead_linux_fs.diff Patch1005: display-dm-name-for-lv-name.diff Patch1006: device-mapper-type_punning.diff #fate312248, patch7,8 Patch1007: make-mirror-legs-on-different-tag-pvs.patch Patch1008: improve-mirror-legs-on-different-tag-pvs.patch #fate#315092 Patch1009: cmirrord_improvment_performance.patch #fate#314367, patch10,11 Patch1010: cluster_support_mirrord_log.diff Patch1011: lvconvert-cluster-mirrored-disk-failed.patch #forward-port from sle11 Patch1012: suppress_format1_size_warning.diff Patch1013: pvmove_support_clustered_vg.diff # Never upstream Patch1014: cmirrord_remove_date_time_from_compilation.patch #bnc873538 Patch1015: fix-closedown-before-thread-finish.patch #bnc#870824 Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch Patch1017: version-plugins-in-libdir.patch #bsc#935623 Patch1018: dmeventd-fix-dso-name-wrong-compare.patch #bsc#960044 Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch #bsc#479104,bnc#707253 Patch2000: device-mapper-dmsetup-export.patch Patch2001: device-mapper-gcc-warnings.patch Patch2002: device-mapper-link.patch #bnc#78902,bnc#789019,bnc#789020 Patch2003: udev_rules-update.diff #bnc#875233 Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch #FATE#318413 Patch2005: fsadm-add-support-for-btrfs.patch #bnc909358 Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch #bsc#932300 Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch #bsc#940298 Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch #bnc#960744 Patch2009: pvcreate-enhance-the-error-message.patch #bnc#990538,bnc#986734 Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch #bnc#950089 Patch2011: lvm2-testsuite.patch #bsc#1012973 Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch ### COMMON-PATCH-END ### %description A daemon for using LVM2 Logival Volumes in a clustered environment. %prep %setup -q -n LVM2.%{lvm2_version} ### COMMON-PREP-BEGIN ### %patch1001 -p1 %patch1002 -p1 %patch1004 -p1 %patch1005 -p1 %patch1006 -p1 %patch1007 -p1 %patch1008 -p1 %patch1009 -p1 %patch1010 -p1 %patch1011 -p1 %patch1012 -p1 %patch1013 -p1 %patch1014 -p1 %patch1015 -p1 %patch1016 -p1 %patch1017 -p1 %patch1018 -p1 %patch1019 -p1 %patch2000 -p1 %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 %patch2005 -p1 %patch2006 -p1 %patch2007 -p1 %patch2008 -p1 %patch2009 -p1 %patch2010 -p1 %patch2011 -p1 %patch2012 -p1 ### COMMON-PREP-END ### %build extra_opts=" --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 " ### COMMON-CONFIG-BEGIN ### export PATH=$PATH:/sbin:%{_prefix}/sbin sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM %configure \ --enable-dmeventd \ --enable-cmdlib \ --enable-udev_rules \ --enable-udev_sync \ --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 ### make %{?_smp_mflags} %install make DESTDIR=%{buildroot} \ install_cluster \ install_systemd_units install_systemd_generators make DESTDIR=%{buildroot} install -C daemons/cmirrord # 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 # 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 %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 %{_mandir}/man8/clvmd.8%{ext_man} ############################################################################## # Clustered RAID 1 support using device-mapper and corosync ############################################################################## %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. %files -n lvm2-cmirrord %defattr(-,root,root) %{_sbindir}/cmirrord %{_libexecdir}/ocf/resource.d/lvm2/cmirrord %{_libexecdir}/systemd/system/lvm2-cmirrord.service %{_sbindir}/rclvm2-cmirrord %{_mandir}/man8/cmirrord.8%{ext_man} %changelog