dmraid-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. Summary: Device-mapper RAID tool and library.
  2. Summary(ja): Device-mapper RAID ツールおよびライブラリ
  3. Name: dmraid
  4. Version: 1.0.0.rc16
  5. Release: 2%{?_dist_release}
  6. License: GPL
  7. Group: System Environment/Base
  8. URL: http://people.redhat.com/heinzm/sw/dmraid
  9. Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/%{name}-%{version}.tar.bz2
  10. Patch0: dmraid-1.0.0.rc16-test_devices.patch
  11. Patch1: ddf1_lsi_persistent_name.patch
  12. Patch2: pdc_raid10_failure.patch
  13. Patch3: return_error_wo_disks.patch
  14. Patch4: fix_sil_jbod.patch
  15. Patch5: avoid_register.patch
  16. Patch6: move_pattern_file_to_var.patch
  17. Patch7: libversion.patch
  18. Patch8: libversion-display.patch
  19. Patch9: bz635995-data_corruption_during_activation_volume_marked_for_rebuild.patch
  20. Patch11: bz626417_19-enabling_registration_degraded_volume.patch
  21. Patch12: bz626417_20-cleanup_some_compilation_warning.patch
  22. Patch13: bz626417_21-add_option_that_postpones_any_metadata_updates.patch
  23. Patch100: dmraid-1.0.0.rc16-libudev.patch
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  25. BuildRequires: device-mapper-devel >= 1.02.22
  26. BuildRequires: device-mapper-event-devel
  27. BuildRequires: device-mapper-static
  28. BuildRequires: libudev-static
  29. BuildRequires: glibc-static
  30. Requires: device-mapper >= 1.02.22
  31. Requires(postun): ldconfig
  32. Requires(post): ldconfig
  33. Vendor: Project Vine
  34. Distribution: Vine Linux
  35. %description
  36. DMRAID supports RAID device discovery, RAID set activation and display of
  37. properties for ATARAID on Linux >= 2.4 using device-mapper.
  38. %package -n dmraid-devel
  39. Summary: Development libraries and headers for dmraid.
  40. Group: Development/Libraries
  41. %description -n dmraid-devel
  42. dmraid-devel provides a library interface for RAID device discovery,
  43. RAID set activation and display of properties for ATARAID volumes.
  44. %package -n dmraid-events
  45. Summary: dmevent_tool (Device-mapper event tool) and DSO
  46. Group: System Environment/Base
  47. Requires: dmraid = %{version}-%{release}, sgpio
  48. Requires: device-mapper-event
  49. %description -n dmraid-events
  50. Provides a dmeventd DSO and the dmevent_tool to register devices with it
  51. for device monitoring. All active RAID sets should be manually registered
  52. with dmevent_tool.
  53. %package -n dmraid-events-logwatch
  54. Summary: dmraid logwatch-based email reporting
  55. Group: System Environment/Base
  56. Requires: dmraid-events = %{version}-%{release}, logwatch, /etc/cron.d
  57. %description -n dmraid-events-logwatch
  58. Provides device failure reporting via logwatch-based email reporting.
  59. Device failure reporting has to be activated manually by activating the
  60. /etc/cron.d/dmeventd-logwatch entry and by calling the dmevent_tool
  61. (see manual page for examples) for any active RAID sets.
  62. %prep
  63. %setup -q -n dmraid/%{version}
  64. %patch0 -p1
  65. %patch1 -p1
  66. %patch2 -p1
  67. %patch3 -p1
  68. %patch4 -p1
  69. %patch5 -p1
  70. %patch6 -p1
  71. %patch7 -p1
  72. %patch8 -p1
  73. %patch9 -p1
  74. %patch11 -p1
  75. %patch12 -p1
  76. %patch13 -p1
  77. %patch100 -p1
  78. %build
  79. %configure \
  80. --prefix=${RPM_BUILD_ROOT}/usr --sbindir=${RPM_BUILD_ROOT}/sbin \
  81. --libdir=${RPM_BUILD_ROOT}/%{_libdir} --mandir=${RPM_BUILD_ROOT}/%{_mandir} \
  82. --includedir=${RPM_BUILD_ROOT}/%{_includedir} \
  83. --disable-libselinux --enable-static_link
  84. make DESTDIR=$RPM_BUILD_ROOT
  85. mv tools/dmraid tools/dmraid.static
  86. make clean
  87. %configure \
  88. --prefix=${RPM_BUILD_ROOT}/usr --sbindir=${RPM_BUILD_ROOT}/sbin \
  89. --libdir=${RPM_BUILD_ROOT}/%{_libdir} --mandir=${RPM_BUILD_ROOT}/%{_mandir} \
  90. --includedir=${RPM_BUILD_ROOT}/%{_includedir} \
  91. --disable-libselinux --disable-static_link
  92. make -C lib DESTDIR=$RPM_BUILD_ROOT libdmraid.so
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. install -m 755 -d $RPM_BUILD_ROOT{%{_libdir},/sbin,%{_sbindir},%{_bindir},%{_libdir},%{_includedir}/dmraid/,/var/lock/dmraid,%{_sysconfdir}/cron.d/}
  96. install -m 755 -d $RPM_BUILD_ROOT{%{_sysconfdir}/logwatch/conf/services/,%{_sysconfdir}/logwatch/scripts/services/,/var/cache/logwatch/dmeventd}
  97. make DESTDIR=$RPM_BUILD_ROOT install
  98. install -m 755 tools/dmraid.static $RPM_BUILD_ROOT/sbin/dmraid.static
  99. # Provide convenience link from dmevent_tool
  100. (cd $RPM_BUILD_ROOT/sbin ; ln -f dmevent_tool dm_dso_reg_tool)
  101. (cd $RPM_BUILD_ROOT/%{_mandir}/man8 ; ln -f dmevent_tool.8 dm_dso_reg_tool.8 ; ln -f dmraid.8 dmraid.static.8)
  102. #
  103. install -m 644 include/dmraid/*.h $RPM_BUILD_ROOT%{_includedir}/dmraid/
  104. # Install the libdmraid and libdmraid-events (for dmeventd) DSO
  105. # Create version symlink to libdmraid.so.1 we link against
  106. install -m 755 lib/libdmraid.so \
  107. $RPM_BUILD_ROOT%{_libdir}/libdmraid.so.%{version}
  108. (cd $RPM_BUILD_ROOT/%{_libdir} ; ln -sf libdmraid.so.%{version} libdmraid.so ; ln -sf libdmraid.so.%{version} libdmraid.so.1)
  109. install -m 755 lib/libdmraid-events-isw.so \
  110. $RPM_BUILD_ROOT%{_libdir}/libdmraid-events-isw.so.%{version}
  111. (cd $RPM_BUILD_ROOT/%{_libdir} ; ln -sf libdmraid-events-isw.so.%{version} libdmraid-events-isw.so ; ln -sf libdmraid-events-isw.so.%{version} libdmraid-events-isw.so.1)
  112. # Install logwatch config file and script for dmeventd
  113. install -m 644 logwatch/dmeventd.conf $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/services/dmeventd.conf
  114. install -m 755 logwatch/dmeventd $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/scripts/services/dmeventd
  115. install -m 644 logwatch/dmeventd_cronjob.txt $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/dmeventd-logwatch
  116. install -m 0700 /dev/null $RPM_BUILD_ROOT/var/cache/logwatch/dmeventd/syslogpattern.txt
  117. # remove static libs
  118. rm -f $RPM_BUILD_ROOT/%{_libdir}/libdmraid.a
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT
  121. %post -p /sbin/ldconfig
  122. %postun -p /sbin/ldconfig
  123. %files
  124. %defattr(-,root,root)
  125. %doc CHANGELOG CREDITS KNOWN_BUGS LICENSE LICENSE_GPL LICENSE_LGPL README TODO doc/dmraid_design.txt
  126. %{_mandir}/man8/*
  127. /sbin/*
  128. %{_libdir}/libdmraid.so*
  129. %{_libdir}/libdmraid-events-isw.so*
  130. %ghost /var/lock/dmraid
  131. %files -n dmraid-devel
  132. %defattr(-,root,root)
  133. %dir %{_includedir}/dmraid
  134. %{_includedir}/dmraid/*
  135. %files -n dmraid-events
  136. %defattr(-,root,root)
  137. /%{_mandir}/man8/dmevent_tool*
  138. /%{_mandir}/man8/dm_dso_reg_tool*
  139. /sbin/dmevent_tool
  140. /sbin/dm_dso_reg_tool
  141. %files -n dmraid-events-logwatch
  142. %defattr(-,root,root)
  143. %config(noreplace) %{_sysconfdir}/logwatch/*
  144. %config(noreplace) %{_sysconfdir}/cron.d/dmeventd-logwatch
  145. %dir /var/cache/logwatch/dmeventd
  146. %ghost /var/cache/logwatch/dmeventd/syslogpattern.txt
  147. %changelog
  148. * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.0.rc16-2
  149. - rebuild with VineSeed environment
  150. * Tue Apr 05 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.0.rc16-1
  151. - update to 1.0.0.rc16
  152. - update patches from fedora package
  153. - add BR: libudev-static, device-mapper-static, glibc-static
  154. - add BR: device-mapper-event-devel
  155. - add -events, -events-logwatch subpackage
  156. - move libdmraid.so to main package
  157. - use %ghost for /var/lock/dmraid
  158. * Sat Mar 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.0.rc15-1
  159. - new upstream release
  160. * Mon Dec 03 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.0-0vl0.rc14.1
  161. - initial build for Vine Linux
  162. - disable selinux
  163. - require device-mapper 1.02.22
  164. * Wed Nov 21 2007 Ian Kent <ikent@redhat.com> - 1.0.0.rc14-6
  165. - Bug 379911: dmraid needs to generate UUIDs for lib device-mapper
  166. - add "DMRAID-" prefix to dmraid UUID string.
  167. * Wed Nov 14 2007 Ian Kent <ikent@redhat.com> - 1.0.0.rc14-5
  168. - Bug 379911: dmraid needs to generate UUIDs for lib device-mapper
  169. - Bug 379951: dmraid needs to activate device-mapper mirror resynchronization error handling
  170. * Mon Oct 22 2007 Ian Kent <ikent@redhat.com> - 1.0.0.rc14-4
  171. - Fix SEGV on "dmraid -r -E" (bz 236891).
  172. * Wed Apr 18 2007 Peter Jones <pjones@redhat.com> - 1.0.0.rc14-3
  173. - Fix jmicron name parsing (#219058)
  174. * Mon Feb 05 2007 Alasdair Kergon <agk@redhat.com> - 1.0.0.rc14-2
  175. - Add build dependency on new device-mapper-devel package.
  176. - Add dependency on device-mapper.
  177. - Add post and postun ldconfig.
  178. - Update BuildRoot and Summary.
  179. * Wed Nov 08 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc14-1
  180. - asr.c: fixed Adaptec HostRAID DDF1 metadata discovery (bz#211016)
  181. - ddf1_crc.c: added crc() routine to avoid linking to zlib alltogether,
  182. because Ubuntu had problems with this
  183. - dropped zlib build requirement
  184. * Thu Oct 26 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc14-bz211016-1
  185. - ddf1.c: get_size() fixed (bz#211016)
  186. - ddf1_lib.c: ddf1_cr_off_maxpds_helper() fixed (bz#211016)
  187. * Wed Oct 11 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc13-1
  188. - metadata.c: fixed bug returning wrang unified RAID type (bz#210085)
  189. - pdc.c: fixed magic number check
  190. * Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc12-7
  191. - rebuilt for unwind info generation, broken in gcc-4.1.1-21
  192. * Fri Sep 22 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc12-1
  193. - sil.c: quorate() OBO fix
  194. - activate.c: handler() OBO fix
  195. - added SNIA DDF1 support
  196. - added reload functionality to devmapper.c
  197. - added log_zero_sectors() to various metadata format handlers
  198. - sil.[ch]: added JBOD support
  199. * Fri Sep 1 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-4
  200. - Require kpartx, so initscripts doesn't have to if you're not using dmraid
  201. * Thu Aug 17 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc11-3
  202. - Change Release to follow guidelines, and add dist tag.
  203. * Thu Aug 17 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-FC6.3
  204. - No more excludearch for s390/s390x
  205. * Fri Jul 28 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-FC6.2
  206. - Fix bounds checking on hpt37x error log
  207. - Only build the .so, not the .a
  208. - Fix asc.c duplication in makefile rule
  209. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc11-FC6.1.1
  210. - rebuild
  211. * Fri Jul 7 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC6.1
  212. - rebuilt for FC6 with dos partition discovery fix (#197573)
  213. * Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC6
  214. - rebuilt for FC6 with better tag
  215. * Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC5_7.2
  216. - rebuilt for FC5
  217. * Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC5_7.1
  218. - jm.c: checksum() calculation
  219. - misc.c: support "%d" in p_fmt and fix segfault with wrong format identifier
  220. - nv.c: size fix in setup_rd()
  221. - activate.c:
  222. o striped devices could end on non-chunk boundaries
  223. o calc_region_size() calculated too small sizes causing large
  224. dirty logs in memory
  225. - isw.c: set raid5 type to left asymmetric
  226. - toollib.c: fixed 'No RAID...' message
  227. - support selection of RAID5 allocation algorithm in metadata format handlers
  228. - build
  229. * Mon Mar 27 2006 Milan Broz <mbroz@redhat.com> - 1.0.0.rc10-FC5_6.2
  230. - fixed /var/lock/dmraid in specfile (#168195)
  231. * Fri Feb 17 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc10-FC5_6
  232. - add doc/dmraid_design.txt to %doc (#181885)
  233. - add --enable-libselinux --enable-libsepol to configure
  234. - rebuilt
  235. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc9-FC5_5.2
  236. - bump again for double-long bug on ppc(64)
  237. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc9-FC5_5.1
  238. - rebuilt for new gcc4.1 snapshot and glibc changes
  239. * Sun Jan 22 2006 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_5
  240. - Add selinux build deps
  241. - Don't set owner during make install
  242. * Fri Dec 9 2005 Jesse Keating <jkeating@redhat.com> 1.0.0.rc9-FC5_4.1
  243. - rebuilt
  244. * Sat Dec 3 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_4
  245. - rebuild for device-mapper-1.02.02-2
  246. * Fri Dec 2 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_3
  247. - rebuild for device-mapper-1.02.02-1
  248. * Thu Nov 10 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_2
  249. - update to 1.0.0.rc9
  250. - make "make install" do the right thing with the DSO
  251. - eliminate duplicate definitions in the headers
  252. - export more symbols in the DSO
  253. - add api calls to retrieve dm tables
  254. - fix DESTDIR for 'make install'
  255. - add api calls to identify degraded devices
  256. - remove several arch excludes
  257. * Sat Oct 15 2005 Florian La Roche <laroche@redhat.com>
  258. - add -lselinux -lsepol for new device-mapper deps
  259. * Fri May 20 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc8-FC4_2
  260. - specfile change to build static and dynamic binray into one package
  261. - rebuilt
  262. * Thu May 19 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc8-FC4_1
  263. - nv.c: fixed stripe size
  264. - sil.c: avoid incarnation_no in name creation, because the Windows
  265. driver changes it every time
  266. - added --ignorelocking option to avoid taking out locks in early boot
  267. where no read/write access to /var is given
  268. * Wed Mar 16 2005 Elliot Lee <sopwith@redhat.com>
  269. - rebuilt
  270. * Tue Mar 15 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc6.1-4_FC4
  271. - VIA metadata format handler
  272. - added RAID10 to lsi metadata format handler
  273. - "dmraid -rD": file device size into {devicename}_{formatname}.size
  274. - "dmraid -tay": pretty print multi-line tables ala "dmsetup table"
  275. - "dmraid -l": display supported RAID levels + manual update
  276. - _sil_read() used LOG_NOTICE rather than LOG_INFO in order to
  277. avoid messages about valid metadata areas being displayed
  278. during "dmraid -vay".
  279. - isw, sil filed metadata offset on "-r -D" in sectors rather than in bytes.
  280. - isw needed dev_sort() to sort RAID devices in sets correctly.
  281. - pdc metadata format handler name creation. Lead to
  282. wrong RAID set grouping logic in some configurations.
  283. - pdc RAID1 size calculation fixed (rc6.1)
  284. - dos.c: partition table code fixes by Paul Moore
  285. - _free_dev_pointers(): fixed potential OOB error
  286. - hpt37x_check: deal with raid_disks = 1 in mirror sets
  287. - pdc_check: status & 0x80 doesn't always show a failed device;
  288. removed that check for now. Status definitions needed.
  289. - sil addition of RAID sets to global list of sets
  290. - sil spare device memory leak
  291. - group_set(): removal of RAID set in case of error
  292. - hpt37x: handle total_secs > device size
  293. - allow -p with -f
  294. - enhanced error message by checking target type against list of
  295. registered target types
  296. * Fri Jan 21 2005 Alasdair Kergon <agk@redhat.com> 1.0.0.rc5f-2
  297. - Rebuild to pick up new libdevmapper.
  298. * Fri Nov 26 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc5f
  299. - specfile cleanup
  300. * Fri Aug 20 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-rc4-pre1
  301. - Removed make flag after fixing make.tmpl.in
  302. * Wed Aug 18 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-rc3
  303. - Added make flag to prevent make 3.80 from looping infinitely
  304. * Thu Jun 17 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-pre1
  305. - Created