device-mapper-multipath-vl.spec 13 KB

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