device-mapper-multipath-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. %bcond_with systemd
  2. Summary: Tools to manage multipath devices using device-mapper
  3. Summary(ja): Device-mapper を使用してマルチパスデバイスを管理するためのツール集
  4. Name: device-mapper-multipath
  5. Version: 0.8.2
  6. Release: 2%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: System Environment/Base
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: daisuke
  11. License: GPLv2+
  12. URL: http://christophe.varoqui.free.fr/
  13. # The source for this package was pulled from upstream's git repo. Use the
  14. # following command to generate the tarball
  15. # curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=refs/tags/0.8.2;sf=tgz" -o multipath-tools-0.8.2.tgz
  16. Source0: multipath-tools-%{version}.tgz
  17. Source1: multipath.conf
  18. Source2: multipathd.init
  19. Patch0001: 0001-libmultipath-make-vector_foreach_slot_backwards-work.patch
  20. Patch0002: 0002-libmultipath-add-marginal-paths-and-groups-infrastru.patch
  21. Patch0003: 0003-tests-add-path-grouping-policy-unit-tests.patch
  22. Patch0004: 0004-libmultipath-add-wrapper-function-around-pgpolicyfn.patch
  23. Patch0005: 0005-tests-update-pgpolicy-tests-to-work-with-group_paths.patch
  24. Patch0006: 0006-libmultipath-fix-double-free-in-pgpolicyfn-error-pat.patch
  25. Patch0007: 0007-libmultipath-consolidate-group_by_-functions.patch
  26. Patch0008: 0008-libmultipath-make-pgpolicyfn-take-a-paths-vector.patch
  27. Patch0009: 0009-libmultipath-make-group_paths-handle-marginal-paths.patch
  28. Patch0010: 0010-tests-add-tests-for-grouping-marginal-paths.patch
  29. Patch0011: 0011-libmultipath-add-marginal_pathgroups-config-option.patch
  30. Patch0012: 0012-libmutipath-deprecate-delay_-_checks.patch
  31. Patch0013: 0013-multipathd-use-marginal_pathgroups.patch
  32. Patch0014: 0014-multipath-update-man-pages.patch
  33. Patch0015: 0015-multipath.conf-add-enable_foreign-parameter.patch
  34. Patch0016: 0016-multipath.conf.5-document-foreign-library-support.patch
  35. Patch0017: 0017-mpathpersist-remove-broken-unused-code.patch
  36. Patch0018: 0018-libmultipath-EMC-PowerMax-NVMe-device-config.patch
  37. Patch0019: 0019-mpathpersist-fix-leaks.patch
  38. Patch0020: 0020-libmultipath-fix-mpcontext-initialization.patch
  39. Patch0021: 0021-RH-fixup-udev-rules-for-redhat.patch
  40. Patch0022: 0022-RH-Remove-the-property-blacklist-exception-builtin.patch
  41. Patch0023: 0023-RH-don-t-start-without-a-config-file.patch
  42. Patch0024: 0024-RH-use-rpm-optflags-if-present.patch
  43. Patch0025: 0025-RH-add-mpathconf.patch
  44. Patch0026: 0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
  45. Patch0027: 0027-RH-warn-on-invalid-regex-instead-of-failing.patch
  46. Patch0028: 0028-RH-reset-default-find_mutipaths-value-to-off.patch
  47. Patch0029: 0029-RH-Fix-nvme-compilation-warning.patch
  48. Patch0030: 0030-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
  49. Patch0031: 0031-multipath-fix-issues-found-by-compiling-with-gcc-10.patch
  50. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  51. BuildRequires: libsysfs-devel
  52. BuildRequires: device-mapper-devel
  53. #BuildRequires: libselinux-devel, libsepol-devel
  54. BuildRequires: readline-devel, ncurses-devel
  55. BuildRequires: libaio-devel
  56. BuildRequires: userspace-rcu-devel
  57. BuildRequires: json-c-devel
  58. Requires: kpartx = %{version}-%{release}
  59. Requires: device-mapper >= 1.02.39
  60. %if %{with systemd}
  61. BuildRequires: systemd-devel
  62. %{?systemd_requires}
  63. %else
  64. BuildRequires: libudev-devel
  65. Requires(post): chkconfig
  66. Requires(preun): chkconfig
  67. %endif
  68. %description
  69. %{name} provides tools to manage multipath devices by instructing the
  70. device-mapper multipath kernel module what to do.
  71. The tools are :
  72. * multipath : Scan the system for multipath devices and assemble them.
  73. * multipathd : Detects when paths fail and execs multipath to update things.
  74. %package libs
  75. Summary: The %{name} modules and shared library
  76. # only libmpathcmd is LGPLv2+
  77. License: GPLv2 and LGPLv2+
  78. %description libs
  79. The %{name}-libs provides the path checker
  80. and prioritizer modules. It also contains the libmpathpersist and
  81. libmpathcmd shared libraries, as well as multipath's internal library,
  82. libmultipath.
  83. %package devel
  84. Summary: Development libraries and headers for %{name}
  85. Requires: %{name} = %{version}-%{release}
  86. Requires: %{name}-libs = %{version}-%{release}
  87. %description devel
  88. This package contains the files need to develop applications that use
  89. device-mapper-multipath's lbmpathpersist and libmpathcmd libraries.
  90. %package -n kpartx
  91. Summary: Partition device manager for device-mapper devices
  92. Summary(ja): Device-mapper デバイス用のパーティションデバイスマネージャー
  93. Group: System Environment/Base
  94. Provides: kpartx = %{version}-%{release}
  95. %description -n kpartx
  96. kpartx manages partition creation and removal for device-mapper devices.
  97. %package -n libdmmp
  98. Summary: device-mapper-multipath C API library
  99. License: GPLv3+
  100. Requires: json-c
  101. Requires: %{name} = %{version}-%{release}
  102. Requires: %{name}-libs = %{version}-%{release}
  103. %description -n libdmmp
  104. This package contains the shared library for the device-mapper-multipath
  105. C API library.
  106. %package -n libdmmp-devel
  107. Summary: device-mapper-multipath C API library headers
  108. Requires: pkgconfig
  109. Requires: libdmmp = %{version}-%{release}
  110. %description -n libdmmp-devel
  111. This package contains the files needed to develop applications that use
  112. device-mapper-multipath's libdmmp C API library
  113. %prep
  114. %setup -q -n multipath-tools-0.8.2
  115. %autopatch -p1
  116. sed -i -e 's/ != TRUE/ == 0/g' libdmmp/libdmmp_private.h
  117. %build
  118. make %{?_smp_mflags} LIB=%{_lib} SYSTEMDPATH=/lib
  119. %install
  120. rm -rf %{buildroot}
  121. make install \
  122. DESTDIR=%{buildroot} \
  123. bindir=%{_syssbindir} \
  124. syslibdir=/%{_lib} \
  125. usrlibdir=%{_libdir} \
  126. libdir=/%{_lib}/multipath \
  127. rcdir=%{_initdir} \
  128. unitdir=%{_unitdir} \
  129. pkgconfdir=%{_libdir}/pkgconfig \
  130. SYSTEMDPATH=/lib
  131. install -d %{buildroot}/etc/multipath
  132. install -m644 %{SOURCE1} %{buildroot}/etc/multipath.conf
  133. %if !%{with systemd}
  134. install -d %{buildroot}%{_initdir}
  135. install -m755 %{SOURCE2} %{buildroot}%{_initdir}/multipathd
  136. %endif
  137. %clean
  138. rm -rf %{buildroot}
  139. %post
  140. %if %{with systemd}
  141. %systemd_post multipathd.service
  142. %else
  143. /sbin/chkconfig --add multipathd
  144. %endif
  145. if [ "$1" -gt "1" -a ! -e /etc/multipath/bindings -a \
  146. -f /var/lib/multipath/bindings ]; then
  147. mv /var/lib/multipath/bindings /etc/multipath/bindings
  148. ln -s /etc/multipath/bindings /var/lib/multipath/bindings
  149. fi
  150. %preun
  151. %if %{with systemd}
  152. %systemd_preun multipathd.service
  153. %else
  154. if [ "$1" = 0 -o -x /bin/systemctl ]; then
  155. /sbin/service multipathd stop /dev/null 2>&1
  156. /sbin/chkconfig --del multipathd
  157. fi
  158. %endif
  159. %postun
  160. if [ $1 -ge 1 ] ; then
  161. /sbin/multipathd forcequeueing daemon > /dev/null 2>&1 || :
  162. fi
  163. %if %{with systemd}
  164. %systemd_postun_with_restart multipathd.service
  165. %else
  166. if [ "$1" -ge "1" ]; then
  167. /sbin/service multipathd condrestart >/dev/null 2>&1 || :
  168. fi
  169. %endif
  170. %post libs -p /sbin/ldconfig
  171. %postun libs -p /sbin/ldconfig
  172. %post -n libdmmp -p /sbin/ldconfig
  173. %postun -n libdmmp -p /sbin/ldconfig
  174. %files
  175. %defattr(-,root,root,-)
  176. %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0
  177. %doc README*
  178. %config /lib/udev/rules.d/62-multipath.rules
  179. %config /lib/udev/rules.d/11-dm-mpath.rules
  180. %{_syssbindir}/multipath
  181. %{_syssbindir}/multipathd
  182. %{_syssbindir}/mpathconf
  183. %{_syssbindir}/mpathpersist
  184. %{_mandir}/man5/multipath.conf.5.gz
  185. %{_mandir}/man8/multipath.8.gz
  186. %{_mandir}/man8/multipathd.8.gz
  187. %{_mandir}/man8/mpathconf.8.gz
  188. %{_mandir}/man8/mpathpersist.8.gz
  189. %config(noreplace) /etc/multipath.conf
  190. %dir /etc/multipath
  191. %if %{with systemd}
  192. %{_unitdir}/multipathd.service
  193. %{_unitdir}/multipathd.socket
  194. %else
  195. %config /etc/rc.d/init.d/multipathd
  196. %endif
  197. %files libs
  198. %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0
  199. %doc README
  200. /%{_lib}/libmultipath.so
  201. /%{_lib}/libmultipath.so.*
  202. /%{_lib}/libmpathpersist.so.*
  203. /%{_lib}/libmpathcmd.so.*
  204. %dir /%{_lib}/multipath
  205. /%{_lib}/multipath/*
  206. %files devel
  207. %doc README
  208. /%{_lib}/libmpathpersist.so
  209. /%{_lib}/libmpathcmd.so
  210. %{_includedir}/mpath_cmd.h
  211. %{_includedir}/mpath_persist.h
  212. %{_mandir}/man3/mpath_persistent_reserve_in.3.gz
  213. %{_mandir}/man3/mpath_persistent_reserve_out.3.gz
  214. %files -n kpartx
  215. %defattr(-,root,root,-)
  216. %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0
  217. %doc README
  218. %{_syssbindir}/kpartx
  219. /lib/udev/kpartx_id
  220. %config /lib/udev/rules.d/11-dm-parts.rules
  221. %config /lib/udev/rules.d/66-kpartx.rules
  222. %config /lib/udev/rules.d/68-del-part-nodes.rules
  223. %{_mandir}/man8/kpartx.8.gz
  224. %files -n libdmmp
  225. %license LICENSES/GPL-3.0
  226. %doc README
  227. %{_libdir}/libdmmp.so.*
  228. %files -n libdmmp-devel
  229. %doc README
  230. %{_libdir}/libdmmp.so
  231. %dir %{_includedir}/libdmmp
  232. %{_includedir}/libdmmp/*
  233. %{_mandir}/man3/dmmp_*
  234. %{_mandir}/man3/libdmmp.h.3.gz
  235. %{_libdir}/pkgconfig/libdmmp.pc
  236. %changelog
  237. * Sat May 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.8.2-2
  238. - rebuilt with json-c-0.14.
  239. - added systemd support (disabled as default).
  240. * Sat Mar 28 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.8.2-1
  241. - new upstream release.
  242. - replaced all patches with rawhide's.
  243. - added sub-packages.
  244. - device-mapper-multipath-libs
  245. - device-mapper-multipath-devel
  246. - libdmmp
  247. - libdmmp-devel
  248. * Sat Mar 21 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.4.9-5
  249. - rebuilt with readline 6.3
  250. - changed BuildRequires: libsysfs-devel instead of sysfsutils-devel
  251. - added Japanese summary
  252. * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.4.9-4
  253. - rebuild with VineSeed environment
  254. * Wed May 11 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.9-3
  255. - import patches from RH package
  256. * Wed Apr 20 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.9-2
  257. - install multipath libraries to %%{_lib}/multipath
  258. * Wed Apr 20 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.9-1
  259. - update to 0.4.9
  260. - drop static version
  261. - add BR: libaio-devel
  262. * Sun Sep 07 2008 Shu KONNO <owa@bg.wakwak.com> 0.4.7-12vl5
  263. - applied new versioning policy
  264. * Thu Feb 14 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.4.7-11vl1
  265. - initial build for VineSeed
  266. - add Patch100 to disable linking to libselinux and libsepol
  267. * Mon Feb 05 2007 Alasdair Kergon <agk@redhat.com> - 0.4.7-11.fc7
  268. - Add build dependency on new device-mapper-devel package.
  269. - Add dependency on device-mapper.
  270. * Wed Jan 31 2007 Benjamin Marzinksi <bmarzins@redhat.com> - 0.4.7-10.fc7
  271. - Update BuildRoot and PreReq lines.
  272. * Mon Jan 15 2007 Benjamin Marzinksi <bmarzins@redhat.com> - 0.4.7-9.fc7
  273. - Fixed spec file.
  274. * Mon Jan 15 2007 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.7-8.fc7
  275. - Update to latest code (t0_4_7_head2)
  276. * Wed Dec 13 2006 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.7-7.fc7
  277. - Update to latest code (t0_4_7_head1)
  278. * Thu Sep 7 2006 Peter Jones <pjones@redhat.com> - 0.4.7-5
  279. - Fix kpartx to handle with drives >2TB correctly.
  280. * Thu Aug 31 2006 Peter Jones <pjones@redhat.com> - 0.4.7-4.1
  281. - Split kpartx out into its own package so dmraid can use it without
  282. installing multipathd
  283. - Fix a segfault in kpartx
  284. * Mon Jul 17 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-4.0
  285. - Updated to latest source. Fixes bug in default multipath.conf
  286. * Wed Jul 12 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-3.1
  287. - Added ncurses-devel to BuildRequires
  288. * Wed Jul 12 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-3.0
  289. - Updated to latest source. deals with change in libsysfs API
  290. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.4.7-2.2.1
  291. - rebuild
  292. * Mon Jul 10 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-2.2
  293. - fix tagging issue.
  294. * Mon Jul 10 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-2.1
  295. - changed BuildRequires from sysfsutils-devel to libsysfs-devel
  296. * Wed Jun 28 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-2.0
  297. - Updated to latest upstream source, fixes kpartx udev rule issue
  298. * Tue Jun 06 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.7-1.0
  299. - Updated to Christophe's latest source
  300. * Mon May 22 2006 Alasdair Kergon <agk@redhat.com> - 0.4.5-16.0
  301. - Newer upstream source (t0_4_5_post59).
  302. * Mon May 22 2006 Alasdair Kergon <agk@redhat.com> - 0.4.5-12.3
  303. - BuildRequires: libsepol-devel, readline-devel
  304. * Mon Feb 27 2006 Benjamin Marzinski <bmarzins@redhat.com> 0.4.5-12.2
  305. - Prereq: chkconfig
  306. * Mon Feb 20 2006 Karsten Hopp <karsten@redhat.de> 0.4.5-12.1
  307. - BuildRequires: libselinux-devel
  308. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.4.5-12.0.1
  309. - bump again for double-long bug on ppc(64)
  310. * Tue Feb 07 2006 Benjamin Marzinski <bmarzins@redhat.com> -0.4.5-12.0
  311. - Updated to latest upstream source (t0_4_5_post56)
  312. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.4.5-9.1.1
  313. - rebuilt for new gcc4.1 snapshot and glibc changes
  314. * Mon Dec 19 2005 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.5-9.1
  315. - added patch for fedora changes
  316. * Fri Dec 16 2005 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.5-9.0
  317. - Updated to latest upstream source (t)_4_5_post52)
  318. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  319. - rebuilt
  320. * Sun Dec 4 2005 Peter Jones <pjones@redhat.com> - 0.4.4-2.6
  321. - rebuild for newer libs
  322. * Tue Nov 15 2005 Peter Jones <pjones@redhat.com> - 0.4.4-2.5
  323. - unsplit kpartx. parted knows how to do this now, so we don't
  324. need this in a separate package.
  325. * Tue Nov 15 2005 Peter Jones <pjones@redhat.com> - 0.4.4-2.4
  326. - split kpartx out into its own package
  327. * Fri May 06 2005 Bill Nottingham <notting@redhat.com> - 0.4.4-2.3
  328. - Fix last fix.
  329. * Thu May 05 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-2.2
  330. - Fix last fix.
  331. * Wed May 04 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-2.1
  332. - By default, disable the multipathd service.
  333. * Tue Apr 19 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-2.0
  334. - Fix core dump from last build.
  335. * Tue Apr 19 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-1.0
  336. - Move cache file into /var/cache/multipath.
  337. * Fri Apr 08 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-0.pre8.1
  338. - Remove pp_balance_units.
  339. * Mon Apr 04 2005 Alasdair Kergon <agk@redhat.com> - 0.4.4-0.pre8.0
  340. - Incorporate numerous upstream fixes.
  341. - Update init script to distribution standards.
  342. * Tue Mar 01 2005 Alasdair Kergon <agk@redhat.com> - 0.4.2-1.0
  343. - Initial import based on Christophe Varoqui's spec file.