lvm2/lvm2.spec
Gang He d0810cf04c Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory
- update lvm2 from LVM2.03.10 to LVM2.2.03.12 (bsc#1187010)
  *** WHATS_NEW from 2.03.11 to 2.03.12 ***
  Version 2.03.12 - 07th May 2021
  ===============================
    Allow attaching cache to thin data volume.
    Fix memleak when generating list of outdated pvs.
    Better hyphenation usage in man pages.
    Replace use of deprecated security_context_t with char*.
    Configure supports AIO_LIBS and AIO_CFLAGS.
    Improve build process for static builds.
    New --setautoactivation option to modify LV or VG auto activation.
    New metadata based autoactivation property for LVs and VGs.
    Improve signal handling with lvmpolld.
    Signal handler can interrupt command also for SIGTERM.
    Lvreduce --yes support.
    Add configure option --with/out-symvers for non-glibc builds.
    Report error when the filesystem is missing on fsadm resized volume.
    Handle better blockdev with --getsize64 support for fsadm.
    Do not include editline/history.h when using editline library.
    Support error and zero segtype for thin-pool data for testing.
    Support mixed extension for striped, error and zero segtypes.
    Support resize also for stacked virtual volumes.
    Skip dm-zero devices just like with dm-error target.
    Reduce ioctl() calls when checking target status.
    Merge polling does not fail, when LV is found to be already merged.
    Poll volumes with at least 100ms delays.
    Do not flush dm cache when cached LV is going to be removed.
    New lvmlockctl_kill_command configuration option.
    Support interruption while waiting on device close before deactivation.
    Flush thin-pool messages before removing more thin volumes.
    Improve hash function with less collisions and make it faster.
    Reduce ioctl count when deactivating volumes.
    Reduce number of metadata parsing.
    Enhance performance of lvremove and vgremove commands.
    Support interruption when taking archive and backup.
    Accelerate large lvremoves.
    Speedup search for cached device nodes.
    Speedup command initialization.
    Add devices file feature, off by default for now.
    Support extension of writecached volumes.
    Fix problem with unbound variable usage within fsadm.
    Fix IMSM MD RAID detection on 4k devices.
    Check for presence of VDO target before starting any conversion.
    Support metatadata profiles with volume VDO pool conversions.
    Support -Zn for conversion of already formated VDO pools.
    Avoid removing LVs on error path of lvconvert during creation volumes.
    Fix crashing lvdisplay when thin volume was waiting for merge.
    Support option --errorwhenfull when converting volume to thin-pool.
    Improve thin-performance profile support conversion to thin-pool.
    Add workaround to avoid read of internal 'converted' devices.
    Prohibit merging snapshot into the read-only thick snapshot origin.
    Restore support for flipping rw/r permissions for thin snapshot origin.
    Support resize of cached volumes.
    Disable autoactivation with global/event_activation=0.
    Check if lvcreate passes read_only_volume_list with tags and skips zeroing.
    Allocation prints better error when metadata cannot fit on a single PV.
    Pvmove can better resolve full thin-pool tree move.
    Limit pool metadata spare to 16GiB.
    Improves conversion and allocation of pool metadata.
    Support thin pool metadata 15.88GiB, adds 64MiB, thin_pool_crop_metadata=0.
    Enhance lvdisplay to report raid available/partial.
    Support online rename of VDO pools.
    Improve removal of pmspare when last pool is removed.
    Fix problem with wiping of converted LVs.
    Fix memleak in scanning  (2.03.11).
    Fix corner case allocation for thin-pools.
  
  Version 2.03.11 - 08th January 2021
  ===================================
    Fix pvck handling MDA at offset different from 4096.
    Partial or degraded activation of writecache is not allowed.
    Enhance error handling for fsadm and handle correct fsck result.
    Dmeventd lvm plugin ignores higher reserved_stack lvm.conf values.
    Support using BLKZEROOUT for clearing devices.
    Support interruption when wipping LVs.
    Support interruption for bcache waiting.
    Fix bcache when device has too many failing writes.
    Fix bcache waiting for IO completion with failing disks.
    Configure use own python path name order to prefer using python3.
    Add configure --enable-editline support as an alternative to readline.
    Enhance reporting and error handling when creating thin volumes.
    Enable vgsplit for VDO volumes.
    Lvextend of vdo pool volumes ensure at least 1 new VDO slab is added.
    Use revert_lv() on reload error path after vg_revert().
    Configure --with-integrity enabled.
    Restore lost signal blocking while VG lock is held.
    Improve estimation of needed extents when creating thin-pool.
    Use extra 1% when resizing thin-pool metadata LV with --use-policy.
    Enhance --use-policy percentage rounding.
    Configure --with-vdo and --with-writecache as internal segments.
    Improving VDO man page examples.
    Allow pvmove of writecache origin.
    Report integrity fields.
    Integrity volumes defaults to journal mode.
    Switch code base to use flexible array syntax.
    Fix 64bit math when calculation cachevol size.
    Preserve uint32_t for seqno handling.
    Switch from mmap to plain read when loading regular files.
    Update lvmvdo man page and better explain DISCARD usage.
  *** WHATS_NEW_DM from 1.02.175 to 1.02.177 ***
  Version 1.02.177 - 07th May 2021
  ================================
    Configure proceeds without libaio to allow build of device-mapper only.
    Fix symbol versioning build with -O2 -flto.
    Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support.
- Drop patches that have been merged into upstream
  - bug-1175565_01-tools-move-struct-element-before-variable-lenght-lis.patch
  - bug-1175565_02-gcc-change-zero-sized-array-to-fexlible-array.patch
  - bug-1175565_03-gcc-zero-sized-array-to-fexlible-array-C99.patch
  - bug-1178680_add-metadata-based-autoactivation-property-for-VG-an.patch
  - bug-1185190_01-pvscan-support-disabled-event_activation.patch
  - bug-1185190_02-config-improve-description-for-event_activation.patch
- Add patch
  + 0001-lvmlockd-idm-Introduce-new-locking-scheme.patch
  + 0002-lvmlockd-idm-Hook-Seagate-IDM-wrapper-APIs.patch
  + 0003-lib-locking-Add-new-type-idm.patch
  + 0004-lib-locking-Parse-PV-list-for-IDM-locking.patch
  + 0005-tools-Add-support-for-idm-lock-type.patch
  + 0006-configure-Add-macro-LOCKDIDM_SUPPORT.patch
  + 0007-enable-command-syntax-for-thin-and-writecache.patch
  + 0008-lvremove-fix-removing-thin-pool-with-writecache-on-d.patch
  + 0009-vdo-fix-preload-of-kvdo.patch
  + 0010-writecache-fix-lv_on_pmem.patch
  + 0011-writecache-don-t-pvmove-device-used-by-writecache.patch
  + 0012-pvchange-fix-file-locking-deadlock.patch
  + 0013-tests-Enable-the-testing-for-IDM-locking-scheme.patch
  + 0014-tests-Support-multiple-backing-devices.patch
  + 0015-tests-Cleanup-idm-context-when-prepare-devices.patch
  + 0016-tests-Add-checking-for-lvmlockd-log.patch
  + 0017-tests-stress-Add-single-thread-stress-testing.patch
  + 0018-tests-stress-Add-multi-threads-stress-testing-for-VG.patch
  + 0019-tests-stress-Add-multi-threads-stress-testing-for-PV.patch
  + 0020-tests-Support-idm-failure-injection.patch
  + 0021-tests-Add-testing-for-lvmlockd-failure.patch
  + 0022-tests-idm-Add-testing-for-the-fabric-failure.patch
  + 0023-tests-idm-Add-testing-for-the-fabric-failure-and-tim.patch
  + 0024-tests-idm-Add-testing-for-the-fabric-s-half-brain-fa.patch
  + 0025-tests-idm-Add-testing-for-IDM-lock-manager-failure.patch
  + 0026-tests-multi-hosts-Add-VG-testing.patch
  + 0027-tests-multi-hosts-Add-LV-testing.patch
  + 0028-tests-multi-hosts-Test-lease-timeout-with-LV-exclusi.patch
  + 0029-tests-multi-hosts-Test-lease-timeout-with-LV-shareab.patch
  + 0030-fix-empty-mem-pool-leak.patch
  + 0031-tests-writecache-blocksize-add-dm-cache-tests.patch
  + 0032-tests-rename-test.patch
  + 0033-tests-add-writecache-cache-blocksize-2.patch
  + 0034-lvmlockd-Fix-the-compilation-warning.patch
  + 0035-devices-don-t-use-deleted-loop-backing-file-for-devi.patch
  + 0036-man-help-fix-common-option-listing.patch
  + 0037-archiving-take-archive-automatically.patch
  + 0038-backup-automatically-store-data-on-vg_unlock.patch
  + 0039-archive-avoid-abuse-of-internal-flag.patch
  + 0040-pvck-add-lock_global-before-clean_hint_file.patch
  + 0041-lvmdevices-add-deviceidtype-option.patch
- Update patch
  - bug-1184687_Add-nolvm-for-kernel-cmdline.patch
  - fate-31841_fsadm-add-support-for-btrfs.patch
- lvm.conf
  - trim tail space
  - fix typo
  - [new item] devices/use_devicesfile
  - [new item] devices/devicesfile
  - [new item] devices/search_for_devnames
  - [new item] allocation/thin_pool_crop_metadata
  - [new item] global/lvmlockctl_kill_command
  - [new item] global/vdo_disabled_features

OBS-URL: https://build.opensuse.org/request/show/900342
OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 09:38:53 +00:00

825 lines
25 KiB
RPMSpec

#
# spec file for package lvm2
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define _unpackaged_files_terminate_build 0
%define libname libdevmapper1_03
%define libname_event libdevmapper-event1_03
%define _udevdir %(pkg-config --variable=udevdir udev)
%define cmdlib liblvm2cmd2_03
%define lvm2_version 2.03.12
%define device_mapper_version 1.02.177
%define thin_provisioning_version 0.7.0
%define _supportsanlock 0
%define dlm_version 4.0.9
# from lvm2 version 2.03, suse obsoleted clvm, cmirrord, liblvm2app & liblvm2cmd.
# so the obseletes version is 2.03
%define lvm2_clvm_version 2.03
%define lvm2_cmirrord_version 2.03
%define liblvm2app2_2_version 2.03
%define liblvm2cmd2_02_version 2.03
%if 0%{_supportsanlock} == 1
%define sanlock_version 3.3.0
%endif
%global flavor @BUILD_FLAVOR@%{nil}
%define psuffix %{nil}
%if "%{flavor}" == "devicemapper"
%define psuffix -device-mapper
%bcond_without devicemapper
%else
%bcond_with devicemapper
%endif
%if "%{flavor}" == "lockd"
%define psuffix -lvmlockd
%bcond_without lockd
%else
%bcond_with lockd
%endif
Name: lvm2%{psuffix}
Version: %{lvm2_version}
Release: 0
Summary: Logical Volume Manager Tools
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: System/Base
URL: https://www.sourceware.org/lvm2/
Source: ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz
Source1: lvm.conf
Source42: ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz.asc
Source99: baselibs.conf
# Upstream patches
Patch0001: 0001-lvmlockd-idm-Introduce-new-locking-scheme.patch
Patch0002: 0002-lvmlockd-idm-Hook-Seagate-IDM-wrapper-APIs.patch
Patch0003: 0003-lib-locking-Add-new-type-idm.patch
Patch0004: 0004-lib-locking-Parse-PV-list-for-IDM-locking.patch
Patch0005: 0005-tools-Add-support-for-idm-lock-type.patch
Patch0006: 0006-configure-Add-macro-LOCKDIDM_SUPPORT.patch
Patch0007: 0007-enable-command-syntax-for-thin-and-writecache.patch
Patch0008: 0008-lvremove-fix-removing-thin-pool-with-writecache-on-d.patch
Patch0009: 0009-vdo-fix-preload-of-kvdo.patch
Patch0010: 0010-writecache-fix-lv_on_pmem.patch
Patch0011: 0011-writecache-don-t-pvmove-device-used-by-writecache.patch
Patch0012: 0012-pvchange-fix-file-locking-deadlock.patch
Patch0013: 0013-tests-Enable-the-testing-for-IDM-locking-scheme.patch
Patch0014: 0014-tests-Support-multiple-backing-devices.patch
Patch0015: 0015-tests-Cleanup-idm-context-when-prepare-devices.patch
Patch0016: 0016-tests-Add-checking-for-lvmlockd-log.patch
Patch0017: 0017-tests-stress-Add-single-thread-stress-testing.patch
Patch0018: 0018-tests-stress-Add-multi-threads-stress-testing-for-VG.patch
Patch0019: 0019-tests-stress-Add-multi-threads-stress-testing-for-PV.patch
Patch0020: 0020-tests-Support-idm-failure-injection.patch
Patch0021: 0021-tests-Add-testing-for-lvmlockd-failure.patch
Patch0022: 0022-tests-idm-Add-testing-for-the-fabric-failure.patch
Patch0023: 0023-tests-idm-Add-testing-for-the-fabric-failure-and-tim.patch
Patch0024: 0024-tests-idm-Add-testing-for-the-fabric-s-half-brain-fa.patch
Patch0025: 0025-tests-idm-Add-testing-for-IDM-lock-manager-failure.patch
Patch0026: 0026-tests-multi-hosts-Add-VG-testing.patch
Patch0027: 0027-tests-multi-hosts-Add-LV-testing.patch
Patch0028: 0028-tests-multi-hosts-Test-lease-timeout-with-LV-exclusi.patch
Patch0029: 0029-tests-multi-hosts-Test-lease-timeout-with-LV-shareab.patch
Patch0030: 0030-fix-empty-mem-pool-leak.patch
Patch0031: 0031-tests-writecache-blocksize-add-dm-cache-tests.patch
Patch0032: 0032-tests-rename-test.patch
Patch0033: 0033-tests-add-writecache-cache-blocksize-2.patch
Patch0034: 0034-lvmlockd-Fix-the-compilation-warning.patch
Patch0035: 0035-devices-don-t-use-deleted-loop-backing-file-for-devi.patch
Patch0036: 0036-man-help-fix-common-option-listing.patch
Patch0037: 0037-archiving-take-archive-automatically.patch
Patch0038: 0038-backup-automatically-store-data-on-vg_unlock.patch
Patch0039: 0039-archive-avoid-abuse-of-internal-flag.patch
Patch0040: 0040-pvck-add-lock_global-before-clean_hint_file.patch
Patch0041: 0041-lvmdevices-add-deviceidtype-option.patch
# SUSE patches: 1000+ for LVM
# Never upstream
Patch1001: cmirrord_remove_date_time_from_compilation.patch
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
Patch1005: bug-998893_make_pvscan_service_after_multipathd.patch
Patch1006: bug-1179691_config-set-external_device_info_source-none.patch
Patch1007: bug-1184687_Add-nolvm-for-kernel-cmdline.patch
# SUSE patches 2000+ for device mapper, udev rules
Patch2001: bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
# SUSE patches 3000+ for test code
Patch3001: bug-1184124-link-tests-as-PIE.patch
# SUSE patches 4000+ for lvm2.spec
Patch4001: bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch
# To detect modprobe during build
BuildRequires: kmod-compat
BuildRequires: libaio-devel
BuildRequires: pkgconfig
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(libudev)
Requires: device-mapper >= %{device_mapper_version}
Requires: modutils
Requires(post): coreutils
Requires(postun):coreutils
Provides: lvm = %{version}
Obsoletes: lvm2-cmirrord <= %{lvm2_cmirrord_version}
%{?systemd_requires}
%if %{with devicemapper}
BuildRequires: gcc-c++
BuildRequires: suse-module-tools
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libsepol)
BuildRequires: pkgconfig(systemd)
%else
BuildRequires: libcorosync-devel
BuildRequires: pkgconfig(blkid)
%if %{with lockd}
BuildRequires: libdlm-devel >= %{dlm_version}
BuildRequires: pkgconfig(libsystemd)
%if 0%{_supportsanlock} == 1
BuildRequires: sanlock-devel >= %{sanlock_version}
%endif
%else
BuildRequires: gcc-c++
BuildRequires: libselinux-devel
BuildRequires: readline-devel
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
%endif
%endif
%description
Programs and man pages for configuring and using the LVM2 Logical
Volume Manager.
%prep
%setup -q -n LVM2.%{version}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%patch0009 -p1
%patch0010 -p1
%patch0011 -p1
%patch0012 -p1
%patch0013 -p1
%patch0014 -p1
%patch0015 -p1
%patch0016 -p1
%patch0017 -p1
%patch0018 -p1
%patch0019 -p1
%patch0020 -p1
%patch0021 -p1
%patch0022 -p1
%patch0023 -p1
%patch0024 -p1
%patch0025 -p1
%patch0026 -p1
%patch0027 -p1
%patch0028 -p1
%patch0029 -p1
%patch0030 -p1
%patch0031 -p1
%patch0032 -p1
%patch0033 -p1
%patch0034 -p1
%patch0035 -p1
%patch0036 -p1
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch1006 -p1
%patch1007 -p1
%patch2001 -p1
%patch3001 -p1
%if !%{with lockd}
%patch4001 -p1
%endif
%build
%if !%{with devicemapper} && !%{with lockd}
extra_opts="
--enable-blkid_wiping
--enable-lvmpolld
--enable-realtime
--with-cache=internal
--with-writecache=internal
--with-default-locking-dir=/run/lock/lvm
--with-default-pid-dir=/run
--with-default-run-dir=/run/lvm
--enable-cmirrord
--enable-fsadm
--disable-silent-rules
--enable-write_install
--with-vdo=internal
--with-vdo-format=%{_bindir}/vdoformat
"
%endif
%if %{with lockd}
extra_opts="
--enable-blkid_wiping
--enable-lvmpolld
--enable-realtime
--with-default-locking-dir=/run/lock/lvm
--with-default-pid-dir=/run
--with-default-run-dir=/run/lvm
--enable-lvmlockd-dlm
--enable-lvmlockd-dlmcontrol
%if 0%{_supportsanlock} == 1
--enable-lvmlockd-sanlock
%endif
--disable-silent-rules
"
%endif
### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_sbindir}
# Why this messy fix here? someone released a wrong version...
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 ###
%if %{with devicemapper}
%make_build device-mapper
%else
%make_build
%endif
%install
%if %{with devicemapper}
make DESTDIR=%{buildroot} \
install_device-mapper \
install_systemd_units
ln -s service %{buildroot}/%{_sbindir}/rcdm-event
# provide 1.02 compat links for the shared libraries
# this is needed for various binary packages
ln -s libdevmapper.so.1.03 %{buildroot}/%{_libdir}/libdevmapper.so.1.02
ln -s libdevmapper-event.so.1.03 %{buildroot}/%{_libdir}/libdevmapper-event.so.1.02
# remove blkd, will be in lvm2 proper
# without force on purpose to detect changes and fail if it happens
rm %{buildroot}%{_sbindir}/blkdeactivate
rm %{buildroot}%{_unitdir}/blk-availability.service
rm %{buildroot}%{_unitdir}/lvm2-monitor.service
rm %{buildroot}%{_mandir}/man8/blkdeactivate.8
# compat symlinks in /sbin remove with Leap 43
%if !0%{?usrmerged}
mkdir -p %{buildroot}/sbin
ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%endif
%else
%if %{with lockd}
make DESTDIR=%{buildroot} \
install_systemd_units install_systemd_generators
make DESTDIR=%{buildroot} install -C daemons/lvmlockd
# 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
# rc services symlinks
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlockd
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlocking
# 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}%{_systemdgeneratordir}/lvm2-activation-generator
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.service
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.socket
rm %{buildroot}%{_unitdir}/lvm2-pvscan@.service
%else
%make_install
make install_system_dirs DESTDIR=%{buildroot}
make install_systemd_units DESTDIR=%{buildroot}
make install_systemd_generators DESTDIR=%{buildroot}
make install_tmpfiles_configuration DESTDIR=%{buildroot}
# Install configuration file
install -m 644 %{SOURCE1} "%{buildroot}/%{_sysconfdir}/lvm/"
# Install testsuite
make -C test install DESTDIR=%{buildroot}
pushd "%{buildroot}/%{_libdir}"
ln -sf liblvm2cmd.so.2.03 liblvm2cmd.so
for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do
ln -sf "device-mapper/$i.so" "$i.so"
ln -sf "device-mapper/$i.so" "$i.so.2.03"
done
popd
#rc compat symlinks
ln -s service %{buildroot}%{_sbindir}/rcblk-availability
ln -s service %{buildroot}%{_sbindir}/rclvm2-monitor
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmpolld
# Remove devicemapper binaries, plain rm so we fail if something change
rm %{buildroot}%{_sbindir}/dmsetup
rm %{buildroot}%{_sbindir}/dmeventd
rm %{buildroot}%{_sbindir}/dmstats
rm %{buildroot}%{_udevrulesdir}/10-dm.rules
rm %{buildroot}%{_udevrulesdir}/13-dm-disk.rules
rm %{buildroot}%{_udevrulesdir}/95-dm-notify.rules
rm %{buildroot}%{_unitdir}/dm-event.socket
rm %{buildroot}%{_unitdir}/dm-event.service
# See bsc#1037309 for more info
rm %{buildroot}%{_unitdir}/lvmlockd.service
rm %{buildroot}%{_unitdir}/lvmlocks.service
rm %{buildroot}%{_includedir}/libdevmapper*.h
rm %{buildroot}%{_libdir}/libdevmapper.so.*
rm %{buildroot}%{_libdir}/libdevmapper-event.so.*
rm %{buildroot}%{_libdir}/libdevmapper.so
rm %{buildroot}%{_libdir}/libdevmapper-event.so
rm %{buildroot}%{_libdir}/pkgconfig/devmapper*.pc
rm %{buildroot}%{_mandir}/man8/lvmlockctl.8
rm %{buildroot}%{_mandir}/man8/lvmlockd.8
rm %{buildroot}%{_mandir}/man8/dmstats.8
rm %{buildroot}%{_mandir}/man8/dmsetup.8
rm %{buildroot}%{_mandir}/man8/dmeventd.8
%if !0%{?usrmerged}
# compat symlinks in /sbin remove with Leap 43
mkdir -p %{buildroot}/sbin
pushd %{buildroot}/%{_sbindir}
for i in {vg,pv,lv}*; do
ln -s %{_sbindir}/$i %{buildroot}/sbin/$i
done
popd
%endif
%endif
%endif
%if %{with devicemapper}
%package -n device-mapper
Version: %{device_mapper_version}
Release: 0
Summary: Device Mapper Tools
Group: System/Base
Requires: thin-provisioning-tools >= %{thin_provisioning_version}
Requires(post): coreutils
%description -n device-mapper
Programs and man pages for configuring and using the device mapper.
%pre -n device-mapper
%service_add_pre dm-event.service dm-event.socket
%post -n device-mapper
%service_add_post dm-event.service dm-event.socket
%{?regenerate_initrd_post}
%posttrans -n device-mapper
%{?regenerate_initrd_posttrans}
%preun -n device-mapper
%service_del_preun dm-event.service dm-event.socket
%postun -n device-mapper
%service_del_postun dm-event.service dm-event.socket
%{?regenerate_initrd_post}
%files -n device-mapper
%license COPYING COPYING.LIB
%doc README
%doc udev/12-dm-permissions.rules
%if !0%{?usrmerged}
/sbin/dmsetup
%endif
%{_sbindir}/dmsetup
%{_sbindir}/dmeventd
%{_sbindir}/dmstats
%{_mandir}/man8/dmstats.8%{?ext_man}
%{_mandir}/man8/dmsetup.8%{?ext_man}
%{_mandir}/man8/dmeventd.8%{?ext_man}
%{_udevrulesdir}/10-dm.rules
%{_udevrulesdir}/13-dm-disk.rules
%{_udevrulesdir}/95-dm-notify.rules
%{_unitdir}/dm-event.socket
%{_sbindir}/rcdm-event
%{_unitdir}/dm-event.service
%package -n %{libname}
Version: %{device_mapper_version}
Release: 0
Summary: Library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname}
Device mapper main shared library
%files -n %{libname}
%{_libdir}/libdevmapper.so.1.03
%{_libdir}/libdevmapper.so.1.02
%post -n %{libname}
%if !0%{?usrmerged}
# in usrmerged scenario we better don't remove ourselves :-)
if [ -f /%{_lib}/libdevmapper.so.1.03 ]; then
# Special migration - the library is now in %{_libdir}, but up to the point where
# zypp removes the 'old' device-mapper package, the old library 'wins' the ldloader race
# resulting in binaries asking for the newer version still getting the old one.
# This in turn results in funny bugs like boo#1045396
# Remove /%{_lib}/libdevmapper.so.1.02 - and the run ldconfig
rm /%{_lib}/libdevmapper.so.1.03
fi
%endif
/sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%package -n %{libname_event}
Version: %{device_mapper_version}
Release: 0
Summary: Event library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname_event}
Device mapper event daemon shared library
%files -n %{libname_event}
%{_libdir}/libdevmapper-event.so.1.03
%{_libdir}/libdevmapper-event.so.1.02
%post -n %{libname_event} -p /sbin/ldconfig
%postun -n %{libname_event} -p /sbin/ldconfig
%package -n device-mapper-devel
Version: %{device_mapper_version}
Release: 0
Summary: Development package for the device mapper
Group: Development/Libraries/C and C++
Requires: %{libname_event} = %{device_mapper_version}
Requires: %{libname} = %{device_mapper_version}
Requires: device-mapper = %{device_mapper_version}
%description -n device-mapper-devel
Files needed for software development using the device mapper
%files -n device-mapper-devel
%{_libdir}/libdevmapper.so
%{_libdir}/libdevmapper-event.so
%{_includedir}/libdevmapper.h
%{_includedir}/libdevmapper-event.h
%{_libdir}/pkgconfig/devmapper.pc
%{_libdir}/pkgconfig/devmapper-event.pc
%else
%if %{with lockd}
%package -n lvm2-lockd
Summary: LVM locking daemon
Group: System/Base
Requires: corosync
Requires: device-mapper >= %{device_mapper_version}
Requires: libdlm >= %{dlm_version}
Requires: lvm2 = %{version}
Obsoletes: lvm2-clvm <= %{lvm2_clvm_version}
%{?systemd_requires}
%if 0%{_supportsanlock} == 1
Requires: sanlock >= %{sanlock_version}
%endif
%description -n lvm2-lockd
LVM commands use lvmlockd to coordinate access to shared storage.
%pre -n lvm2-lockd
%service_add_pre lvmlockd.service lvmlocks.service
%post -n lvm2-lockd
%service_add_post lvmlockd.service lvmlocks.service
%preun -n lvm2-lockd
%service_del_preun lvmlockd.service lvmlocks.service
%postun -n lvm2-lockd
%service_del_postun lvmlockd.service lvmlocks.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}/lvmlockd.service
%{_unitdir}/lvmlocks.service
%{_sbindir}/rclvm2-lvmlockd
%{_sbindir}/rclvm2-lvmlocking
%else
%pre
%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
%post
/sbin/ldconfig
%{?regenerate_initrd_post}
%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
# Use %%tmpfiles_create when 13.2 is oldest in support scope
%{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/lvm2.conf || :
%posttrans
%{?regenerate_initrd_posttrans}
%preun
%service_del_preun blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
%postun
/sbin/ldconfig
%{?regenerate_initrd_post}
%service_del_postun lvm2-lvmpolld.service lvm2-lvmpolld.socket
%service_del_postun_without_restart blk-availability.service lvm2-monitor.service
%files
%license COPYING COPYING.LIB
%doc README VERSION WHATS_NEW
%doc doc/lvm_fault_handling.txt
# Main binaries
%{_sbindir}/blkdeactivate
%{_sbindir}/fsadm
%{_sbindir}/lvm
%{_sbindir}/lvmconfig
%{_sbindir}/lvmdump
%{_sbindir}/lvmpolld
# Other files
%{_sbindir}/lvchange
%{_sbindir}/lvconvert
%{_sbindir}/lvcreate
%{_sbindir}/lvdisplay
%{_sbindir}/lvextend
%{_sbindir}/lvmdiskscan
%{_sbindir}/lvmsadc
%{_sbindir}/lvmsar
%{_sbindir}/lvreduce
%{_sbindir}/lvremove
%{_sbindir}/lvrename
%{_sbindir}/lvresize
%{_sbindir}/lvs
%{_sbindir}/lvscan
%{_sbindir}/pvchange
%{_sbindir}/pvck
%{_sbindir}/pvcreate
%{_sbindir}/pvdisplay
%{_sbindir}/pvmove
%{_sbindir}/pvremove
%{_sbindir}/pvresize
%{_sbindir}/pvs
%{_sbindir}/pvscan
%{_sbindir}/vgcfgbackup
%{_sbindir}/vgcfgrestore
%{_sbindir}/vgchange
%{_sbindir}/vgck
%{_sbindir}/vgconvert
%{_sbindir}/vgcreate
%{_sbindir}/vgdisplay
%{_sbindir}/vgexport
%{_sbindir}/vgextend
%{_sbindir}/vgimport
%{_sbindir}/vgimportclone
%{_sbindir}/vgmerge
%{_sbindir}/vgmknodes
%{_sbindir}/vgreduce
%{_sbindir}/vgremove
%{_sbindir}/vgrename
%{_sbindir}/vgs
%{_sbindir}/vgscan
%{_sbindir}/vgsplit
%{_sbindir}/rcblk-availability
%{_sbindir}/rclvm2-lvmpolld
%{_sbindir}/rclvm2-monitor
# compat symlinks in /sbin
%if !0%{?usrmerged}
/sbin/lvm
/sbin/lvmconfig
/sbin/lvmdump
/sbin/lvmpolld
/sbin/lvchange
/sbin/lvconvert
/sbin/lvcreate
/sbin/lvdisplay
/sbin/lvextend
/sbin/lvmdiskscan
/sbin/lvmsadc
/sbin/lvmsar
/sbin/lvreduce
/sbin/lvremove
/sbin/lvrename
/sbin/lvresize
/sbin/lvs
/sbin/lvscan
/sbin/pvchange
/sbin/pvck
/sbin/pvcreate
/sbin/pvdisplay
/sbin/pvmove
/sbin/pvremove
/sbin/pvresize
/sbin/pvs
/sbin/pvscan
/sbin/vgcfgbackup
/sbin/vgcfgrestore
/sbin/vgchange
/sbin/vgck
/sbin/vgconvert
/sbin/vgcreate
/sbin/vgdisplay
/sbin/vgexport
/sbin/vgextend
/sbin/vgimport
/sbin/vgimportclone
/sbin/vgmerge
/sbin/vgmknodes
/sbin/vgreduce
/sbin/vgremove
/sbin/vgrename
/sbin/vgs
/sbin/vgscan
/sbin/vgsplit
%endif
%{_mandir}/man5/lvm.conf.5%{?ext_man}
%{_mandir}/man7/lvmcache.7%{?ext_man}
%{_mandir}/man7/lvmraid.7%{?ext_man}
%{_mandir}/man7/lvmreport.7%{?ext_man}
%{_mandir}/man7/lvmthin.7%{?ext_man}
%{_mandir}/man7/lvmsystemid.7%{?ext_man}
%{_mandir}/man7/lvmvdo.7%{?ext_man}
%{_mandir}/man8/fsadm.8%{?ext_man}
%{_mandir}/man8/lvchange.8%{?ext_man}
%{_mandir}/man8/lvconvert.8%{?ext_man}
%{_mandir}/man8/lvcreate.8%{?ext_man}
%{_mandir}/man8/lvdisplay.8%{?ext_man}
%{_mandir}/man8/lvextend.8%{?ext_man}
%{_mandir}/man8/lvm.8%{?ext_man}
%{_mandir}/man8/lvm2-activation-generator.8%{?ext_man}
%{_mandir}/man8/lvm-config.8%{?ext_man}
%{_mandir}/man8/lvmconfig.8%{?ext_man}
%{_mandir}/man8/lvm-dumpconfig.8%{?ext_man}
%{_mandir}/man8/lvmdiskscan.8%{?ext_man}
%{_mandir}/man8/lvmdump.8%{?ext_man}
%{_mandir}/man8/lvm-fullreport.8%{?ext_man}
%{_mandir}/man8/lvmsadc.8%{?ext_man}
%{_mandir}/man8/lvmsar.8%{?ext_man}
%{_mandir}/man8/lvreduce.8%{?ext_man}
%{_mandir}/man8/lvremove.8%{?ext_man}
%{_mandir}/man8/lvrename.8%{?ext_man}
%{_mandir}/man8/lvresize.8%{?ext_man}
%{_mandir}/man8/lvs.8%{?ext_man}
%{_mandir}/man8/lvscan.8%{?ext_man}
%{_mandir}/man8/pvchange.8%{?ext_man}
%{_mandir}/man8/pvck.8%{?ext_man}
%{_mandir}/man8/pvcreate.8%{?ext_man}
%{_mandir}/man8/pvdisplay.8%{?ext_man}
%{_mandir}/man8/pvmove.8%{?ext_man}
%{_mandir}/man8/pvremove.8%{?ext_man}
%{_mandir}/man8/pvresize.8%{?ext_man}
%{_mandir}/man8/pvs.8%{?ext_man}
%{_mandir}/man8/pvscan.8%{?ext_man}
%{_mandir}/man8/vgcfgbackup.8%{?ext_man}
%{_mandir}/man8/vgcfgrestore.8%{?ext_man}
%{_mandir}/man8/vgchange.8%{?ext_man}
%{_mandir}/man8/vgck.8%{?ext_man}
%{_mandir}/man8/vgconvert.8%{?ext_man}
%{_mandir}/man8/vgcreate.8%{?ext_man}
%{_mandir}/man8/vgdisplay.8%{?ext_man}
%{_mandir}/man8/vgexport.8%{?ext_man}
%{_mandir}/man8/vgextend.8%{?ext_man}
%{_mandir}/man8/vgimport.8%{?ext_man}
%{_mandir}/man8/vgimportclone.8%{?ext_man}
%{_mandir}/man8/vgmerge.8%{?ext_man}
%{_mandir}/man8/vgmknodes.8%{?ext_man}
%{_mandir}/man8/vgreduce.8%{?ext_man}
%{_mandir}/man8/vgremove.8%{?ext_man}
%{_mandir}/man8/vgrename.8%{?ext_man}
%{_mandir}/man8/vgs.8%{?ext_man}
%{_mandir}/man8/vgscan.8%{?ext_man}
%{_mandir}/man8/vgsplit.8%{?ext_man}
%{_mandir}/man8/blkdeactivate.8%{?ext_man}
%{_mandir}/man8/lvmpolld.8%{?ext_man}
%{_mandir}/man8/lvm-lvpoll.8%{?ext_man}
%{_udevdir}/rules.d/11-dm-lvm.rules
%{_udevdir}/rules.d/69-dm-lvm-metad.rules
%dir %{_sysconfdir}/lvm
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
%config(noreplace) %{_sysconfdir}/lvm/lvmlocal.conf
%dir %{_sysconfdir}/lvm/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
%{_sysconfdir}/lvm/profile/vdo-small.profile
%dir %{_sysconfdir}/lvm/cache
%ghost %{_sysconfdir}/lvm/cache/.cache
%dir %{_sysconfdir}/lvm/archive
%dir %{_sysconfdir}/lvm/backup
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/blk-availability.service
%{_unitdir}/lvm2-monitor.service
%{_unitdir}/lvm2-pvscan@.service
%{_unitdir}/lvm2-lvmpolld.socket
%{_unitdir}/lvm2-lvmpolld.service
%{_systemdgeneratordir}/lvm2-activation-generator
%dir %{_libdir}/device-mapper
%{_libdir}/device-mapper/libdevmapper-event-lvm2*.so
%{_libdir}/libdevmapper-event-lvm2*.so
%{_libdir}/libdevmapper-event-lvm2*.so.2.03
%package -n %{cmdlib}
Summary: LVM2 command line library
Group: System/Libraries
Conflicts: %{name} < %{version}
Obsoletes: liblvm2app2_2 <= %{liblvm2app2_2_version}
Obsoletes: liblvm2cmd2_02 <= %{liblvm2cmd2_02_version}
%description -n %{cmdlib}
The lvm2 command line library allows building programs that manage
lvm devices without invoking a separate program.
%post -n %{cmdlib} -p /sbin/ldconfig
%postun -n %{cmdlib} -p /sbin/ldconfig
%files -n %{cmdlib}
%{_libdir}/liblvm2cmd.so.*
%package devel
Summary: Development files for LVM2
Group: Development/Libraries/C and C++
Requires: %{cmdlib} = %{version}
Requires: device-mapper-devel
Requires: lvm2 = %{version}
%description devel
This package provides development files for the LVM2 Logical Volume Manager.
%files devel
%{_includedir}/lvm2cmd.h
%{_libdir}/liblvm2cmd.so
%package testsuite
Summary: LVM2 Testsuite
Group: Development/Libraries/C and C++
Requires: %{cmdlib} = %{version}
Requires: lvm2 = %{version}
%description testsuite
An extensive functional testsuite for the LVM2 Logical Volume Manager.
%files testsuite
%{_datarootdir}/lvm2-testsuite/
%{_libexecdir}/lvm2-testsuite/
%{_bindir}/lvm2-testsuite
%endif
%endif
%changelog