3 %bcond_with initrd # build initrd version (very broken)
5 Summary: Tools to manage multipathed devices with the device-mapper
6 Summary(pl.UTF-8): Implementacja wielotrasowego dostępu do zasobów przy użyciu device-mappera
12 Source0: http://christophe.varoqui.free.fr/multipath-tools/%{name}-%{version}.tar.bz2
13 # Source0-md5: faf261d4cc717bf4c979557dc7bf5f52
15 Source1: multipathd.init
16 Source2: multipathd.sysconfig
17 Source3: %{name}-bindings
18 Patch0: %{name}-format.patch
19 Patch1: %{name}-kpartx-udev.patch
21 URL: http://christophe.varoqui.free.fr/
22 BuildRequires: device-mapper-devel >= 1.02.08
23 BuildRequires: libaio-devel
24 BuildRequires: linux-libc-headers >= 2.6.12.0-5
25 BuildRequires: readline-devel
26 BuildRequires: rpmbuild(macros) >= 1.647
27 BuildRequires: sed >= 4.0
28 BuildRequires: sysfsutils-devel >= 2.0.0
29 BuildRequires: systemd-devel
30 BuildRequires: udev-devel
32 BuildRequires: device-mapper-initrd-devel
33 BuildRequires: klibc-static
35 Requires(post,preun): /sbin/chkconfig
36 Requires(post,preun,postun): systemd-units >= 38
37 Requires: device-mapper >= 1.02.08
38 Requires: kpartx = %{version}-%{release}
39 Requires: libaio >= 0.3.106-2
41 Requires: systemd-units >= 38
42 %if "%{pld_release}" == "th"
43 Requires: udev-core >= 1:127
45 %if "%{pld_release}" == "ti"
46 Conflicts: udev < 1:124-3
48 %if "%{pld_release}" == "ac"
49 Requires: udev-core >= 1:079-10
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define skip_post_check_so libmultipath.so.0 libmpathpersist.so.0
54 %define _sbindir /sbin
57 multipath-tools provides the tools to manage multipathed devices by
58 instructing the device-mapper multipath module what to do. The tools
60 - multipath: scan the system for multipathed devices, assembles them
61 and update the device-mapper's maps
62 - multipathd: wait for maps events, then execs multipath
63 - devmap-name: provides a meaningful device name to udev for devmaps
65 %description -l pl.UTF-8
66 multipath-tools zawierają narzędzia do zarządzania wielotrasowym
67 dostępem do urządzeń poprzez instruowanie modułu multipath
68 device-mappera. Narzędzia to:
69 - multipath - przeszukuje system pod kątem urządzeń z dostępem
70 wielotrasowym, łączy je i uaktualnia odwzorowania device-mappera
71 - multipathd - oczekuje na zdarzenia odwzorowań, po których uruchamia
73 - devmap-name - dostarcza do udev znaczącą nazwę urządzenia dla map
77 Summary: Partition device manager for device-mapper devices
78 Summary(pl.UTF-8): Zarządca urządzeń partycji dla urządzeń device-mappera
80 %if "%{pld_release}" == "th"
81 Conflicts: udev-core < 1:127
83 %if "%{pld_release}" == "ti"
84 Conflicts: udev-core < 1:124-3
86 %if "%{pld_release}" == "ac"
87 Conflicts: udev-core < 1:079-10
90 %description -n kpartx
91 kpartx maps linear devmaps upon device partitions, which makes
92 multipath maps partionable.
94 %description -n kpartx -l pl.UTF-8
95 kpartx odwzorowuje liniowe mapy urządzeń na partycje urządzeń, co
96 umożliwia tworzenie partycji na odwzorowaniach wielotrasowych.
109 OPTFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -Wunused -Wstrict-prototypes" \
110 BUILDDIRS='multipath pathx' \
111 klibcdir=%{_libdir}/klibc \
112 libdm='$(klibcdir)/libdevmapper.a'
119 OPTFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -Wunused -Wstrict-prototypes %{?debug:-DDEBUG=1}" \
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_sysconfdir}/multipath}
127 DESTDIR=$RPM_BUILD_ROOT \
129 unitdir=%{systemdunitdir}
131 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/multipathd
132 cp -p multipath.conf.defaults $RPM_BUILD_ROOT%{_sysconfdir}/multipath.conf
133 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/multipathd
134 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/multipath/bindings
136 # no -devel, so remove
137 %{__rm} $RPM_BUILD_ROOT%{_includedir}/mpath_persist.h
138 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/mpath_persistent_reserve_in.3*
139 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/mpath_persistent_reserve_out.3*
140 %{__rm} $RPM_BUILD_ROOT/%{_lib}/libmpathpersist.so
143 rm -rf $RPM_BUILD_ROOT
146 /sbin/chkconfig --add multipathd
147 %service multipathd restart
148 %systemd_post multipathd.service
151 if [ "$1" = "0" ]; then
152 %service multipathd stop
153 /sbin/chkconfig --del multipathd
155 %systemd_preun multipathd.service
160 %triggerpostun -- %{name} < 0.4.9-7
161 %systemd_trigger multipathd.service
164 %defattr(644,root,root,755)
165 %doc AUTHOR ChangeLog FAQ README TODO
166 %doc multipath.conf.{annotated,defaults,synthetic}
167 %attr(755,root,root) %{_sbindir}/mpathpersist
168 %attr(755,root,root) %{_sbindir}/multipath
169 %attr(755,root,root) %{_sbindir}/multipathd
170 %dir /%{_lib}/multipath
171 %attr(755,root,root) /%{_lib}/multipath/lib*.so
172 %attr(755,root,root) /%{_lib}/libmpathpersist.so.0
173 %attr(755,root,root) /%{_lib}/libmultipath.so.0
174 %attr(754,root,root) /etc/rc.d/init.d/multipathd
175 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/multipathd
176 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/multipath.conf
177 %dir %{_sysconfdir}/multipath
178 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/multipath/bindings
179 %{systemdunitdir}/multipathd.service
180 %{systemdunitdir}/multipathd.socket
181 %{_mandir}/man5/multipath.conf.5*
182 %{_mandir}/man8/mpathpersist.8*
183 %{_mandir}/man8/multipath.8*
184 %{_mandir}/man8/multipathd.8*
187 %defattr(644,root,root,755)
189 %attr(755,root,root) %{_sbindir}/kpartx
190 %attr(755,root,root) /lib/udev/kpartx_id
191 /etc/udev/rules.d/kpartx.rules
192 %{_mandir}/man8/kpartx.8*