dmraid-vl.spec 14 KB

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