dmraid-vl.spec 14 KB

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