dmraid-vl.spec 15 KB

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