update lvm2 & split thin-provisioning-tools &fix bsc#960044 OBS-URL: https://build.opensuse.org/request/show/356420 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=145
514 lines
14 KiB
RPMSpec
514 lines
14 KiB
RPMSpec
#
|
|
# spec file for package lvm2
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX Products 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/
|
|
#
|
|
|
|
|
|
%define lvm2_version 2.02.141
|
|
%define device_mapper_version 1.02.115
|
|
|
|
%bcond_without clvm
|
|
|
|
Name: lvm2
|
|
Version: %{lvm2_version}
|
|
Release: 0
|
|
Summary: Logical Volume Manager Tools
|
|
License: GPL-2.0 and LGPL-2.1
|
|
Group: System/Base
|
|
Url: http://www.sourceware.org/lvm2/
|
|
|
|
Source: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz
|
|
Source42: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz.asc
|
|
Source1: lvm.conf
|
|
Source8: clvmd.ocf
|
|
Source10: cmirrord.ocf
|
|
Source14: baselibs.conf
|
|
Source16: csm-converter.tar.gz
|
|
|
|
# Upstream patches first
|
|
|
|
# SUSE patches 1000- for LVM, 2000- for device mapper
|
|
Patch1001: improve_probing.diff
|
|
Patch1002: no-inc-audit.diff
|
|
Patch1004: sys_mount_instead_linux_fs.diff
|
|
|
|
#suse
|
|
Patch1005: display-dm-name-for-lv-name.diff
|
|
Patch1006: device-mapper-type_punning.diff
|
|
|
|
#fate312248, patch6,7
|
|
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
|
|
|
|
#suse, bnc873538
|
|
Patch1015: fix-closedown-before-thread-finish.patch
|
|
#suse, bnc#870824
|
|
Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch
|
|
|
|
Patch1017: version-plugins-in-libdir
|
|
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
|
|
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
|
|
|
# device-mapper patches
|
|
#suse, bnc#707253(also merged patch for bnc#479104)
|
|
Patch2000: device-mapper-dmsetup-export.patch
|
|
Patch2001: device-mapper-gcc-warnings.patch
|
|
Patch2002: device-mapper-static.patch
|
|
Patch2003: device-mapper-link
|
|
#suse, bnc#78902,bnc#789019,bnc#789020
|
|
Patch2004: udev_rules-update.diff
|
|
#suse, bnc#875233
|
|
Patch2005: udev-Check-for-DM_NR_VALID_PATHS.patch
|
|
Patch2007: fsadm-add-support-for-btrfs.patch
|
|
Patch2008: Import-ID_FS_XXX-variables-bnc909358.patch
|
|
Patch2009: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: libaio-devel
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: readline-devel
|
|
BuildRequires: suse-module-tools
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: pkgconfig(udev)
|
|
Requires: device-mapper >= 1.02.90
|
|
Requires(post): coreutils
|
|
Requires(postun): coreutils
|
|
Provides: lvm = %version-%release
|
|
# Not a real replacement but we drop evms
|
|
Provides: evms = 2.5.5
|
|
Provides: evms-devel = 2.5.5
|
|
Provides: evms-gui = 2.5.5
|
|
Provides: evms-ha = 2.5.5
|
|
Obsoletes: evms <= 2.5.5
|
|
Obsoletes: evms-devel <= 2.5.5
|
|
Obsoletes: evms-gui <= 2.5.5
|
|
Obsoletes: evms-ha <= 2.5.5
|
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
|
|
|
%if %{defined systemd_requires}
|
|
%{systemd_requires}
|
|
%endif
|
|
|
|
%description
|
|
Programs and man pages for configuring and using the LVM2 Logical
|
|
Volume Manager.
|
|
|
|
|
|
%prep
|
|
%setup -q -n LVM2.%{version} -a 16
|
|
|
|
%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
|
|
%if %{with clvm}
|
|
%patch1016 -p1
|
|
%endif
|
|
%patch1017 -p1
|
|
%patch1018 -p1
|
|
%patch1019 -p1
|
|
|
|
%patch2000 -p1
|
|
%patch2001 -p1
|
|
%patch2002 -p1
|
|
%patch2003 -p1
|
|
%patch2004 -p1
|
|
%patch2005 -p1
|
|
%patch2007 -p1
|
|
%patch2008 -p1
|
|
%patch2009 -p1
|
|
|
|
%build
|
|
#set path so that thin_check can be found
|
|
#export before configure due to bnc#779965
|
|
export MODPROBE_CMD=/sbin/modprobe
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
export PATH=$PATH:/sbin:/usr/sbin
|
|
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
|
|
autoreconf -fvi
|
|
%configure \
|
|
--prefix=/ \
|
|
--bindir=/bin \
|
|
--libdir=/%_lib \
|
|
--with-usrlibdir=%_libdir \
|
|
--with-usrsbindir=%_sbindir \
|
|
--sbindir=/sbin \
|
|
--enable-dmeventd \
|
|
--enable-udev_sync \
|
|
--enable-udev_rules \
|
|
--enable-cmdlib \
|
|
--enable-applib \
|
|
--enable-dmeventd \
|
|
--enable-realtime \
|
|
--enable-pkgconfig \
|
|
--enable-selinux \
|
|
%if %{with clvm}
|
|
--with-clvmd=corosync \
|
|
--with-cluster=internal \
|
|
--enable-cmirrord \
|
|
%endif
|
|
--datarootdir="%_datadir" \
|
|
--enable-lvmetad \
|
|
--with-default-locking-dir=/run/lock/lvm \
|
|
--with-default-pid-dir=/run \
|
|
--with-default-dm-run-dir=/run \
|
|
--with-default-run-dir=/run/lvm \
|
|
--with-tmpfilesdir=%{_tmpfilesdir} \
|
|
--with-thin=internal \
|
|
--with-device-gid=6 \
|
|
--with-device-mode=0640 \
|
|
--with-device-uid=0 \
|
|
--with-dmeventd-path=/sbin/dmeventd \
|
|
--with-thin-check=%{_sbindir}/thin_check \
|
|
--with-thin-dump=%{_sbindir}/thin_dump \
|
|
--with-thin-repair=%{_sbindir}/thin_repair \
|
|
--with-udev-prefix="%_prefix/"
|
|
|
|
export SUSE_ASNEEDED=0
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%if %{with clvm}
|
|
#csm convert
|
|
pushd bnz
|
|
make %{?_smp_mflags}
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
%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"
|
|
# Is this directory used anymore?
|
|
install -d -m 755 "%buildroot/%_sysconfdir/lvm/metadata"
|
|
install -m 644 %{SOURCE1} "%buildroot/%_sysconfdir/lvm/"
|
|
mkdir -p "%buildroot/%_initddir"
|
|
mkdir -p "%buildroot/%_sbindir"
|
|
%if %{with clvm}
|
|
install -m755 -D %{S:8} "%buildroot/%_prefix/lib/ocf/resource.d/lvm2/clvmd"
|
|
install -m755 -D %{S:10} "%buildroot/%_prefix/lib/ocf/resource.d/lvm2/cmirrord"
|
|
|
|
#csm-convert
|
|
pushd bnz
|
|
install -m755 -D csm-converter "%buildroot/%_sbindir/csm-converter"
|
|
install -m755 -D csm-converter-helper "%buildroot/%_sbindir/csm-converter-helper"
|
|
mv README.csm-converter ..
|
|
popd
|
|
%endif
|
|
|
|
# Make sure libdevmapper.so.1.02 libdevmapper-event.so.1.02 still available
|
|
# on Tumbleweed, as virtualbox.org didn't update their RPMs yet.
|
|
rm -f libdm/ioctl/libdevmapper.so daemons/dmeventd/libdevmapper-event.so
|
|
sed -i "s/1.03.01/%{device_mapper_version}/" VERSION_DM
|
|
make device-mapper
|
|
make install_device-mapper DESTDIR=%{buildroot}
|
|
|
|
pushd "%buildroot/%_lib"
|
|
ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so
|
|
ln -sf liblvm2app.so.2.2 liblvm2app.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.02"
|
|
done
|
|
popd
|
|
|
|
pushd "%buildroot/%_sbindir"
|
|
ln -sf ../../sbin/lvm lvm
|
|
popd
|
|
|
|
%pre
|
|
%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
%{?regenerate_initrd_post}
|
|
%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service
|
|
|
|
%posttrans
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
%preun
|
|
%service_del_preun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
%{?regenerate_initrd_post}
|
|
%service_del_postun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README WHATS_NEW doc/*
|
|
%dir %{_sysconfdir}/lvm
|
|
%dir %{_sysconfdir}/lvm/backup
|
|
%dir %{_sysconfdir}/lvm/archive
|
|
%dir %{_sysconfdir}/lvm/metadata
|
|
%dir %{_sysconfdir}/lvm/profile
|
|
%dir %{_sysconfdir}/lvm/cache
|
|
%dir /usr/lib/systemd/system-generators
|
|
%dir /usr/lib/tmpfiles.d
|
|
%ghost %{_sysconfdir}/lvm/cache/.cache
|
|
%{_sysconfdir}/lvm/profile/*.profile
|
|
%{_sysconfdir}/lvm/lvmlocal.conf
|
|
%{_udevdir}/rules.d/11-dm-lvm.rules
|
|
%{_udevdir}/rules.d/69-dm-lvm-metad.rules
|
|
%{_unitdir}/blk-availability.service
|
|
%{_unitdir}/lvm2-monitor.service
|
|
%{_unitdir}/lvm2-lvmetad.socket
|
|
%{_unitdir}/lvm2-lvmetad.service
|
|
%{_unitdir}/lvm2-pvscan@.service
|
|
%{_tmpfilesdir}/lvm2.conf
|
|
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
|
|
/usr/lib/systemd/system-generators/lvm2-activation-generator
|
|
/sbin/blkdeactivate
|
|
/sbin/fsadm
|
|
/sbin/lv*
|
|
/sbin/pv*
|
|
/sbin/vg*
|
|
%_sbindir/lvm
|
|
%dir /%_lib/device-mapper
|
|
/%_lib/device-mapper/libdevmapper-event-lvm2*.so
|
|
/%_lib/libdevmapper-event-lvm2*.so
|
|
/%_lib/liblvm2cmd.so
|
|
/%_lib/liblvm2cmd.so.2.02
|
|
/%_lib/liblvm2app.so
|
|
/%_lib/liblvm2app.so.2.2
|
|
/%_libdir/liblvm2app.so
|
|
/%_libdir/liblvm2cmd.so
|
|
/%_lib/libdevmapper-event-lvm2*.so.2.02
|
|
/%_libdir/libdevmapper-event-lvm2.so
|
|
%_mandir/man5/lvm.conf.5.gz
|
|
%_mandir/man8/blkdeactivate.8.gz
|
|
%_mandir/man8/fsadm.8.gz
|
|
%_mandir/man8/lv*.8*
|
|
%_mandir/man8/pv*.8*
|
|
%_mandir/man8/vg*.8*
|
|
%_mandir/man7/lvm*.7*
|
|
|
|
%if %{with clvm}
|
|
%package clvm
|
|
Url: http://sources.redhat.com/cluster/clvm/
|
|
Version: %{lvm2_version}
|
|
Release: 0
|
|
BuildRequires: libcorosync-devel
|
|
BuildRequires: libdlm-devel
|
|
Requires: corosync
|
|
Requires: device-mapper >= 1.02.25
|
|
Requires: lvm2 = %{version}
|
|
Requires: lvm2-cmirrord
|
|
Obsoletes: cmirrord < %{version}
|
|
Provides: cmirrord = %{version}
|
|
Summary: Clustered LVM2
|
|
Group: Productivity/Clustering/HA
|
|
|
|
%description clvm
|
|
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
|
|
|
%pre clvm
|
|
%service_add_pre lvm2-cluster-activation.service lvm2-clvmd.service
|
|
|
|
%post clvm
|
|
%service_add_post lvm2-cluster-activation.service lvm2-clvmd.service
|
|
|
|
%preun clvm
|
|
%service_del_preun lvm2-cluster-activation.service lvm2-clvmd.service
|
|
|
|
%postun clvm
|
|
%service_del_postun lvm2-cluster-activation.service lvm2-clvmd.service
|
|
|
|
%files clvm
|
|
%defattr(-,root,root)
|
|
%{_sbindir}/clvmd
|
|
%dir /usr/lib/ocf
|
|
%dir /usr/lib/ocf/resource.d
|
|
%dir /usr/lib/ocf/resource.d/lvm2
|
|
/usr/lib/ocf/resource.d/lvm2/clvmd
|
|
%{_mandir}/man8/clvmd.8.gz
|
|
%doc README.csm-converter
|
|
%{_sbindir}/csm-converter
|
|
%{_sbindir}/csm-converter-helper
|
|
%{_unitdir}/lvm2-clvmd.service
|
|
%{_unitdir}/lvm2-cluster-activation.service
|
|
/usr/lib/systemd/lvm2-cluster-activation
|
|
|
|
%package cmirrord
|
|
Url: http://www.sourceware.org/lvm2/
|
|
Version: %{lvm2_version}
|
|
Release: 0
|
|
Requires: corosync
|
|
Requires: device-mapper >= 1.02.25
|
|
Requires: lvm2 = %{version}
|
|
Requires: lvm2-clvm
|
|
Summary: Clustered RAID 1 support using device-mapper and corosync
|
|
Group: Productivity/Clustering/HA
|
|
|
|
%description cmirrord
|
|
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
|
|
|
%pre cmirrord
|
|
%service_add_pre lvm2-cmirrord.service lvm2-cluster-activation.service
|
|
|
|
%post cmirrord
|
|
%service_add_post lvm2-cmirrord.service lvm2-cluster-activation.service
|
|
|
|
%preun cmirrord
|
|
%service_del_preun lvm2-cmirrord.service lvm2-cluster-activation.service
|
|
|
|
%postun cmirrord
|
|
%service_del_postun lvm2-cmirrord.service lvm2-cluster-activation.service
|
|
|
|
%files cmirrord
|
|
%defattr(-,root,root)
|
|
%{_sbindir}/cmirrord
|
|
/usr/lib/ocf/resource.d/lvm2/cmirrord
|
|
%{_mandir}/man8/cmirrord.8.gz
|
|
/usr/lib/systemd/system/lvm2-cmirrord.service
|
|
%endif
|
|
|
|
%package devel
|
|
Version: %{lvm2_version}
|
|
Release: 0
|
|
Requires: lvm2 = %{version}
|
|
Summary: Development files for LVM2
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%description devel
|
|
This package provides development files for the LVM2 Logical Volume Manager.
|
|
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%_includedir/lvm2cmd.h
|
|
%_includedir/lvm2app.h
|
|
%_libdir/pkgconfig/lvm2app.pc
|
|
|
|
##########################################
|
|
# Subpackage: device-mapper
|
|
##########################################
|
|
%package -n device-mapper
|
|
|
|
%ifarch ppc64
|
|
Obsoletes: device-mapper-64bit
|
|
%endif
|
|
Version: %{device_mapper_version}
|
|
Release: 0
|
|
Summary: Device Mapper Tools
|
|
Group: System/Base
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: boost-devel
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: libsepol-devel
|
|
BuildRequires: libstdc++-devel
|
|
BuildRequires: suse-module-tools
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: pkgconfig(libudev)
|
|
Requires: expat
|
|
Requires: thin-provisioning-tools >= 0.5.6
|
|
Requires(post): coreutils
|
|
Requires(postun): coreutils
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
|
|
%description -n device-mapper
|
|
Programs, libraries, and man pages for configuring and using the device
|
|
mapper.
|
|
|
|
%post -n device-mapper
|
|
%service_add_post dm-event.service dm-event.socket
|
|
/sbin/ldconfig
|
|
%{?regenerate_initrd_post}
|
|
|
|
%posttrans -n device-mapper
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
%pre -n device-mapper
|
|
%service_add_pre dm-event.service dm-event.socket
|
|
|
|
%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}
|
|
/sbin/ldconfig
|
|
|
|
%files -n device-mapper
|
|
%defattr(-,root,root)
|
|
%doc INSTALL COPYING COPYING.LIB README
|
|
%doc udev/12-dm-permissions.rules
|
|
/%_lib/libdevmapper.so.1.03
|
|
/%_lib/libdevmapper-event.so.1.03
|
|
/%_lib/libdevmapper.so.1.02
|
|
/%_lib/libdevmapper-event.so.1.02
|
|
/sbin/dmsetup
|
|
/sbin/dmeventd
|
|
/sbin/dmstats
|
|
%_mandir/man8/dmstats.8.*
|
|
%_mandir/man8/dmsetup.8.gz
|
|
%_mandir/man8/dmeventd.8.gz
|
|
%_udevrulesdir/10-dm.rules
|
|
%_udevrulesdir/13-dm-disk.rules
|
|
%_udevrulesdir/95-dm-notify.rules
|
|
%_unitdir/dm-event.socket
|
|
%_unitdir/dm-event.service
|
|
|
|
%package -n device-mapper-devel
|
|
Summary: Development package for the device mapper
|
|
Group: Development/Libraries/C and C++
|
|
Version: %{device_mapper_version}
|
|
Release: 0
|
|
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
|
|
%defattr(-,root,root)
|
|
%_libdir/libdevmapper.so
|
|
%_libdir/libdevmapper-event.so
|
|
%_libdir/libdevmapper.a
|
|
%_includedir/libdevmapper*.h
|
|
%_libdir/pkgconfig/devmapper*.pc
|
|
|
|
%changelog
|