2007-01-16 00:25:57 +01:00
|
|
|
#
|
2011-04-05 18:02:12 +02:00
|
|
|
# spec file for package multipath-tools
|
2007-01-16 00:25:57 +01:00
|
|
|
#
|
2015-07-13 12:55:17 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:25:57 +01:00
|
|
|
#
|
2008-08-29 00:55:27 +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.
|
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-04-30 00:47:42 +02:00
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
Name: multipath-tools
|
2012-04-20 10:35:35 +02:00
|
|
|
BuildRequires: device-mapper-devel
|
|
|
|
BuildRequires: libaio-devel
|
2013-02-01 11:10:56 +01:00
|
|
|
BuildRequires: libudev-devel
|
2012-04-20 10:35:35 +02:00
|
|
|
BuildRequires: readline-devel
|
2014-01-29 11:09:28 +01:00
|
|
|
BuildRequires: systemd-devel
|
2014-03-03 10:00:19 +01:00
|
|
|
BuildRequires: udev
|
2015-07-13 12:55:17 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
BuildRequires: pkgconfig(udev)
|
2007-09-20 14:15:32 +02:00
|
|
|
Url: http://christophe.varoqui.free.fr/
|
2014-03-27 15:52:32 +01:00
|
|
|
Requires: device-mapper >= 1.2.78
|
2012-04-20 10:35:35 +02:00
|
|
|
Requires: kpartx
|
2013-02-01 11:10:56 +01:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq coreutils grep
|
2014-01-29 11:09:28 +01:00
|
|
|
Version: 0.5.0
|
2012-04-20 10:35:35 +02:00
|
|
|
Release: 0
|
2007-01-16 00:25:57 +01:00
|
|
|
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
2013-02-15 15:25:42 +01:00
|
|
|
License: GPL-2.0
|
2012-04-20 10:35:35 +02:00
|
|
|
Group: System/Base
|
2012-11-04 03:57:33 +01:00
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
2013-04-17 10:05:51 +02:00
|
|
|
Source: http://christophe.varoqui.free.fr/multipath-tools/multipath-tools-%{version}.tar.bz2
|
2013-02-01 11:10:56 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-01-29 11:09:28 +01:00
|
|
|
Patch0: %{name}-%{version}-sles12.diff.bz2
|
2015-07-13 12:55:17 +02:00
|
|
|
%global _sysdir %(pkg-config --variable=systemdutildir systemd | sed -r 's@/systemd$@@')
|
2007-01-16 00:25:57 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides the tools to manage multipathed devices by
|
|
|
|
instructing the device-mapper multipath module what to do. The tools
|
|
|
|
are:
|
|
|
|
|
|
|
|
- multipath: scans the system for multipathed devices, assembles
|
|
|
|
them, and updates the device-mapper's maps
|
|
|
|
|
|
|
|
- multipathd: waits for maps events then execs multipath
|
|
|
|
|
|
|
|
- devmap-name: provides a meaningful device name to udev for devmaps
|
|
|
|
|
|
|
|
- kpartx: maps linear devmaps to device partitions, which makes
|
|
|
|
multipath maps partionable
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-21 18:10:25 +02:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Christophe Varoqui <christophe.varoqui@free.fr>
|
|
|
|
|
|
|
|
%package -n kpartx
|
|
|
|
Summary: Manages partition tables on device-mapper devices
|
|
|
|
Group: System/Base
|
2007-08-02 22:50:38 +02:00
|
|
|
Requires: device-mapper
|
2007-05-21 18:10:25 +02:00
|
|
|
|
|
|
|
%description -n kpartx
|
|
|
|
The kpartx program maps linear devmaps to device partitions, which
|
|
|
|
makes multipath maps partionable.
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-01 11:10:56 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Christophe Varoqui <christophe.varoqui@free.fr>
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development libraries for multipath-tools
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Requires: device-mapper
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the development libraries for multipath-tools
|
|
|
|
and libmpath_persist.
|
|
|
|
|
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Christophe Varoqui <christophe.varoqui@free.fr>
|
|
|
|
|
|
|
|
%prep
|
2014-01-29 11:09:28 +01:00
|
|
|
%setup -q -n multipath-tools-%{version}
|
2007-01-16 00:25:57 +01:00
|
|
|
%patch0 -p1
|
2015-07-13 12:55:17 +02:00
|
|
|
echo %{_udevrulesdir}
|
|
|
|
echo %{_sysdir}
|
2013-02-01 11:10:56 +01:00
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
%build
|
2015-07-13 12:55:17 +02:00
|
|
|
make CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} SYSTEMDPATH=%{_sysdir} SYSTEMD=yes
|
2007-01-16 00:25:57 +01:00
|
|
|
|
|
|
|
%install
|
2015-07-13 12:55:17 +02:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT LIB=%{_lib} SYSTEMDPATH=%{_sysdir} install SYSTEMD=yes
|
2007-01-16 00:25:57 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/cache/multipath/
|
2012-05-30 17:33:50 +02:00
|
|
|
rm $RPM_BUILD_ROOT/%_lib/libmpathpersist.so
|
2014-09-18 11:03:03 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
|
|
|
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcmultipathd
|
2007-01-16 00:25:57 +01:00
|
|
|
|
|
|
|
%clean
|
2012-11-04 03:57:33 +01:00
|
|
|
rm -rf $RPM_BUILD_ROOT;
|
2007-01-16 00:25:57 +01:00
|
|
|
|
2010-07-06 16:27:45 +02:00
|
|
|
%pre
|
|
|
|
[ -f /.buildenv ] && exit 0
|
|
|
|
if [ -f /etc/init.d/multipathd ] && dmsetup --target multipath table | grep -q multipath ; then
|
2013-02-01 11:10:56 +01:00
|
|
|
/etc/init.d/multipathd stop
|
2015-04-22 15:52:56 +02:00
|
|
|
%service_add_pre multipathd.socket
|
2013-02-01 11:10:56 +01:00
|
|
|
%service_add_pre multipathd.service
|
2010-07-06 16:27:45 +02:00
|
|
|
fi
|
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
%post
|
2010-07-06 16:27:45 +02:00
|
|
|
[ -f /.buildenv ] && exit 0
|
2013-02-01 11:10:56 +01:00
|
|
|
%{run_ldconfig}
|
2010-07-06 16:27:45 +02:00
|
|
|
if dmsetup --target multipath table | grep -q multipath ; then
|
2015-04-22 15:52:56 +02:00
|
|
|
%service_add_post multipathd.socket
|
2013-02-01 11:10:56 +01:00
|
|
|
%service_add_post multipathd.service
|
2010-07-06 16:27:45 +02:00
|
|
|
fi
|
2014-09-04 10:41:18 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2008-09-06 00:44:23 +02:00
|
|
|
exit 0
|
2012-04-20 10:35:35 +02:00
|
|
|
|
2007-08-02 22:50:38 +02:00
|
|
|
%preun
|
2012-11-04 03:57:33 +01:00
|
|
|
%service_del_preun multipathd.service
|
2015-04-22 15:52:56 +02:00
|
|
|
%service_del_preun multipathd.socket
|
2007-08-02 22:50:38 +02:00
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
%postun
|
2014-09-18 11:03:03 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2012-11-04 03:57:33 +01:00
|
|
|
%service_del_postun multipathd.service
|
2015-04-22 15:52:56 +02:00
|
|
|
%service_del_postun multipathd.socket
|
2013-02-01 11:10:56 +01:00
|
|
|
%{run_ldconfig}
|
2007-01-16 00:25:57 +01:00
|
|
|
|
2014-09-18 11:03:03 +02:00
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
2007-01-16 00:25:57 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-01-29 11:09:28 +01:00
|
|
|
%doc AUTHOR COPYING README ChangeLog
|
2007-01-16 00:25:57 +01:00
|
|
|
%doc multipath.conf*
|
2014-03-17 14:42:12 +01:00
|
|
|
%{_udevrulesdir}/11-dm-mpath.rules
|
2014-04-12 23:32:45 +02:00
|
|
|
%{_udevrulesdir}/56-multipath.rules
|
2010-07-06 16:27:45 +02:00
|
|
|
/%{_lib}/libmultipath.so.0
|
2012-05-30 17:00:14 +02:00
|
|
|
/%{_lib}/libmpathpersist.so.0
|
2009-08-22 03:49:00 +02:00
|
|
|
/%{_lib}/multipath
|
2007-01-16 00:25:57 +01:00
|
|
|
/sbin/multipath
|
|
|
|
/sbin/multipathd
|
2012-05-30 17:00:14 +02:00
|
|
|
/sbin/mpathpersist
|
2014-09-18 11:03:03 +02:00
|
|
|
/usr/sbin/rcmultipathd
|
2007-01-16 00:25:57 +01:00
|
|
|
%attr (0700, root, root) /var/cache/multipath
|
2013-02-15 13:31:32 +01:00
|
|
|
%dir /%{_sysdir}/systemd/system
|
|
|
|
/%{_sysdir}/systemd/system/multipathd.service
|
2014-01-29 11:09:28 +01:00
|
|
|
/%{_sysdir}/systemd/system/multipathd.socket
|
2007-01-16 00:25:57 +01:00
|
|
|
%{_mandir}/man8/multipath.8*
|
2007-05-17 11:47:22 +02:00
|
|
|
%{_mandir}/man5/multipath.conf.5*
|
2007-01-16 00:25:57 +01:00
|
|
|
%{_mandir}/man8/multipathd.8*
|
2012-05-30 17:33:50 +02:00
|
|
|
%{_mandir}/man8/mpathpersist.8*
|
2013-02-01 11:10:56 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/include/mpath_persist.h
|
2012-05-30 17:33:50 +02:00
|
|
|
%{_mandir}/man3/mpath_persistent_*
|
2007-01-16 00:25:57 +01:00
|
|
|
|
2007-05-21 18:10:25 +02:00
|
|
|
%files -n kpartx
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/sbin/kpartx
|
2014-03-03 10:00:19 +01:00
|
|
|
%{_udevrulesdir}/66-kpartx.rules
|
|
|
|
%{_udevrulesdir}/67-kpartx-compat.rules
|
2013-02-15 13:31:32 +01:00
|
|
|
/%{_sysdir}/udev/kpartx_id
|
2007-05-21 18:10:25 +02:00
|
|
|
%{_mandir}/man8/kpartx.8*
|
2008-04-30 00:47:42 +02:00
|
|
|
|
2007-05-17 11:47:22 +02:00
|
|
|
%changelog
|