lvm2/device-mapper.spec

233 lines
7.2 KiB
RPMSpec
Raw Normal View History

2016-05-11 05:42:15 +02:00
#
# spec file for package device-mapper
#
# Copyright (c) 2018 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 libname libdevmapper1_03
%define libname_event libdevmapper-event1_03
2016-05-11 05:42:15 +02:00
### COMMON-DEF-BEGIN ###
Accepting request 630677 from home:ganghe:branches:openSUSE:Factory - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch OBS-URL: https://build.opensuse.org/request/show/630677 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=227
2018-08-21 05:13:03 +02:00
%define lvm2_version 2.02.180
%define device_mapper_version 1.02.149
%define thin_provisioning_version 0.7.0
2016-05-11 05:42:15 +02:00
### COMMON-DEF-END ###
Name: device-mapper
Version: %{device_mapper_version}
Release: 0
Summary: Device Mapper Tools
License: GPL-2.0-or-later AND LGPL-2.1-or-later
2016-05-11 05:42:15 +02:00
Group: System/Base
Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
Source99: baselibs.conf
Accepting request 630677 from home:ganghe:branches:openSUSE:Factory - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch OBS-URL: https://build.opensuse.org/request/show/630677 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=227
2018-08-21 05:13:03 +02:00
# To detect modprobe during build
BuildRequires: gcc-c++
Accepting request 630677 from home:ganghe:branches:openSUSE:Factory - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch - Update to LVM2.2.02.180 - Drop the upstream patches - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch - bug-1095960_dev_io-no-discard-in-testmode.patch - Refresh patches + bsc1080299-detect-clvm-properly.patch + bug-950089_test-fix-lvm2-testsuite-build-error.patch - Fix cmirrord LV creation/activation failure (bsc#1091863) - Fix that pvmove does not work (bsc#1080299) - Fix package name for modprobe during build (bsc#1102668) - Fix building error due to the script interpreter + tests-specify-python3-as-the-script-interpreter.patch OBS-URL: https://build.opensuse.org/request/show/630677 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=227
2018-08-21 05:13:03 +02:00
BuildRequires: kmod-compat
BuildRequires: libaio-devel
BuildRequires: pkgconfig
BuildRequires: suse-module-tools
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libsepol)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
Requires: thin-provisioning-tools >= %{thin_provisioning_version}
Requires(post): coreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
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
Patch1005: bsc1080299-detect-clvm-properly.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
Programs and man pages for configuring and using the device mapper.
%prep
%setup -q -n LVM2.%{lvm2_version}
### COMMON-PREP-BEGIN ###
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
2016-05-11 05:42:15 +02:00
%patch1004 -p1
%patch1005 -p1
%patch2001 -p1
2016-05-11 05:42:15 +02:00
### COMMON-PREP-END ###
%build
extra_opts=""
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} device-mapper
%install
make DESTDIR=%{buildroot} \
install_device-mapper \
install_systemd_units install_systemd_generators
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
rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
# compat symlinks in /sbin remove with Leap 43
mkdir -p %{buildroot}/sbin
ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%pre
%service_add_pre dm-event.service dm-event.socket
2016-05-11 05:42:15 +02:00
%post
%service_add_post dm-event.service dm-event.socket
%{?regenerate_initrd_post}
%posttrans
%{?regenerate_initrd_posttrans}
%preun
%service_del_preun dm-event.service dm-event.socket
%postun
%service_del_postun dm-event.service dm-event.socket
%{?regenerate_initrd_post}
%files
%defattr(-,root,root)
%doc COPYING COPYING.LIB README
%doc udev/12-dm-permissions.rules
/sbin/dmsetup
2016-05-11 05:42:15 +02:00
%{_sbindir}/dmsetup
%{_sbindir}/dmeventd
%{_sbindir}/dmstats
%{_mandir}/man8/dmstats.8%{ext_man}
%{_mandir}/man8/dmsetup.8%{ext_man}
%{_mandir}/man8/dmeventd.8%{ext_man}
2016-05-11 05:42:15 +02:00
%{_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}
Summary: Library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname}
Device mapper main shared library
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libdevmapper.so.1.03
%{_libdir}/libdevmapper.so.1.02
%post -n %{libname}
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
/sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%package -n %{libname_event}
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}
%defattr(-,root,root)
%{_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 devel
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 devel
Files needed for software development using the device mapper
2016-05-11 05:42:15 +02:00
%files devel
%defattr(-,root,root)
%{_libdir}/libdevmapper.so
%{_libdir}/libdevmapper-event.so
%{_includedir}/libdevmapper.h
%{_includedir}/libdevmapper-event.h
%{_libdir}/pkgconfig/devmapper.pc
%{_libdir}/pkgconfig/devmapper-event.pc
2016-05-11 05:42:15 +02:00
%changelog