%define name dmraid %define version 1.0.0 %define extraver rc16 #define pre pre1 %define rel 13 # from lib/version.h %define drmajor 1 %define drlibname %mklibname dmraid %drmajor %define drdevname %mklibname dmraid -d # we need the libs in /lib(64) as /usr might not be mounted %define _libdir /%{_lib} %define _usrlibdir /usr/%{_lib} # yes this sucks, but it has to %if %{?extraver:1}%{?!extraver:0} %if %{?pre:1}%{?!pre:0} %define release %mkrel 0.%{extraver}.0.%{pre}.%{rel} %define extrasrc .%{extraver}-%{pre} %else %define release %mkrel 0.%{extraver}.%{rel} %define extrasrc .%{extraver} %endif %endif %define build_static 0 %{?_with_static: %{expand: %%global build_static 1}} %{?_without_static: %{expand: %%global build_static 0}} # Building of dmraid-event-logwatch (disabled by default) %define build_logwatch 0 %{?_with_logwatch: %{expand: %%global build_logwatch 1}} %{?_without_logwatch: %{expand: %%global build_logwatch 0}} Summary: Device-mapper ATARAID tool Name: %{name} Version: %{version} Release: %{release} Source0: http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-%{version}%{extrasrc}.tar.bz2 Source1: %{name}-tmpfiles.conf # (bluca) since fedora/redhat rpm is the real upstream for dmraid # patch numbers < 100 are reserved for patches synced from fedora/redhat # patch numbers > 100 are for our distro specific patches Patch0: dmraid-1.0.0.rc16-test_devices.patch Patch1: ddf1_lsi_persistent_name.patch Patch2: pdc_raid10_failure.patch Patch3: return_error_wo_disks.patch Patch4: fix_sil_jbod.patch Patch5: avoid_register.patch #we dont use this# Patch6: move_pattern_file_to_var.patch Patch7: libversion.patch Patch8: libversion-display.patch Patch9: bz635995-data_corruption_during_activation_volume_marked_for_rebuild.patch # Patch10: bz626417_8-faulty_message_after_unsuccessful_vol_registration.patch Patch11: bz626417_19-enabling_registration_degraded_volume.patch Patch12: bz626417_20-cleanup_some_compilation_warning.patch Patch13: bz626417_21-add_option_that_postpones_any_metadata_updates.patch Patch101: lib-events-libdmraid-events-isw-strfmt.patch Patch102: fix-linking.patch Patch103: libdmraid-events-soname.patch Patch104: libdmraid-events-install.patch Patch105: pdc-add-extra-offsets.patch Patch106: activate-multiple-raid-sets.patch # patches from ubuntu merged upstream Patch110: 12_support_virtio_devices.patch Patch111: 17_isw-probe-hpa.patch Patch112: 20_fix_isw_sectors_calculation.patch Patch113: 21_fix_testing.patch Patch114: 21_jmicron_namefix.patch Patch115: 23_pdc_dump_extended_metadata.patch Patch116: 24_drop_p_for_partition_conditional.patch License: GPLv2+ Group: System/Kernel and hardware URL: http://people.redhat.com/~heinzm Requires: kpartx >= 0.4.8-16 Requires: %{drlibname} = %{version}-%{release} Requires: dmraid-events = %{version}-%{release} Requires(post): systemd >= %{systemd_required_version} BuildRequires: device-mapper-devel >= 1.02.74 BuildRequires: device-mapper-event-devel >= 1.02.74 %if %{build_static} BuildRequires: glibc-static-devel %endif %description dmraid (Device-Mapper Raid tool) supports RAID device discovery, RAID set activation, creation, removal, rebuild and display of properties for ATARAID/DDF1 metadata. dmraid uses libdevmapper and the device-mapper kernel runtime to create devices with respective mappings for the ATARAID sets discovered. The following ATARAID types are supported: Adaptec HostRAID ASR Highpoint HPT37X Highpoint HPT45X Intel Software RAID JMicron JMB36x LSI Logic MegaRAID NVidia NForce Promise FastTrack Silicon Image Medley SNIA DDF1 VIA Software RAID %package -n %{drlibname} Summary: Libraries for dmraid Group: System/Libraries %description -n %{drlibname} Provides libraries for dmraid. %package -n %{drdevname} Summary: Development libraries and headers for dmraid Group: System/Libraries %description -n %{drdevname} Provides a library interface for RAID device discovery, RAID set activation and display of properties for ATARAID volumes. %package events Summary: Dmraid event tool Group: System/Base Requires: dmraid = %{version}-%{release} Requires: device-mapper-event >= 1.02.02 %description events Provides a dmeventd DSO and the dmevent_tool to register devices with it for device monitoring. All active RAID sets should be manually registered with dmevent_tool. %if %{build_logwatch} %package events-logwatch Summary: Dmraid logwatch-based email reporting Group: System/Base Requires: dmraid-events = %{version}-%{release}, logwatch, /etc/cron.d %description events-logwatch Provides device failure reporting via logwatch-based email reporting. Device failure reporting has to be activated manually by activating the /etc/cron.d/dmeventd-logwatch entry and by calling the dmevent_tool (see manual page for examples) for any active RAID sets. %endif %prep %setup -q -n %{name}/%{version}.%{extraver} %patch0 -p1 -b .test_devices %patch1 -p1 -b .ddf1_lsi_persistent_name %patch2 -p1 -b .pdc_raid10_failure %patch3 -p1 -b .return_error_wo_disks %patch4 -p1 -b .fix_sil_jbod %patch5 -p1 -b .avoid_register %patch7 -p1 -b .libversion %patch8 -p1 -b .libversion_display %patch9 -p1 -b .bz635995 %patch11 -p1 -b .bz626417_19 %patch12 -p1 -b .bz626417_20 %patch13 -p1 -b .bz626417_21 %patch101 -p1 -b .libdmraid_events_isw_strfmt %patch102 -p1 -b .linking %patch103 -p1 -b .lib_events_soname %patch104 -p1 -b .lib_events_install %patch105 -p1 -b .pdc-extra-offsets %patch106 -p1 -b .activate-multiple-raid %patch110 -p2 -b .virtio %patch111 -p2 -b .hpa %patch112 -p2 -b .isw_sectors %patch113 -p2 -b .block_testing %patch114 -p2 -b .jmicron_namefix %patch115 -p2 -b .pdc_ext_metadata %patch116 -p2 -b ._partition_cond_p %build %define common_configure_parameters --with-user=`id -un` --with-group=`id -gn` --disable-libselinux --disable-libsepol --enable-led --enable-intel_led %if %{build_static} %configure2_5x %{common_configure_parameters} --enable-static_link make mv tools/dmraid tools/dmraid-static make clean %endif %configure2_5x %{common_configure_parameters} --enable-shared_lib make %install rm -rf %{buildroot} %makeinstall -s sbindir=%{buildroot}/sbin %if %{build_static} install tools/dmraid-static %{buildroot}/sbin mkdir -p %{buildroot}%{_usrlibdir} mv %{buildroot}%{_libdir}/libdmraid.a %{buildroot}%{_usrlibdir} %else rm -f %{buildroot}%{_libdir}/libdmraid.a %endif install -D -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf # cannot move .so symlink to %{_usrlibdir}, there is some build # macro that recreates it every time #ln -s %{_libdir}/libdmraid.so.%{drmajor} %{buildroot}%{_usrlibdir}/libdmraid.so #rm -f %{_libdir}/libdmraid.so %if %{build_logwatch} # Install logwatch config file and script for dmeventd mkdir -p %{buildroot}/etc/cron.d mkdir -p %{buildroot}/etc/logwatch/conf/services mkdir -p %{buildroot}/etc/logwatch/scripts/services install -m 644 logwatch/dmeventd.conf %{buildroot}/etc/logwatch/conf/services/dmeventd.conf install -m 755 logwatch/dmeventd %{buildroot}/etc/logwatch/scripts/services/dmeventd install -m 644 logwatch/dmeventd_cronjob.txt %{buildroot}/etc/cron.d/dmeventd-logwatch install -m 0700 /dev/null %{buildroot}/etc/logwatch/scripts/services/dmeventd_syslogpattern.txt %endif %clean rm -rf %{buildroot} %post %_tmpfilescreate %{name} %files %defattr(-,root,root,755) %doc CHANGELOG CREDITS KNOWN_BUGS README TODO doc/dmraid_design.txt /sbin/dmraid %if %{build_static} /sbin/dmraid-static %endif %{_mandir}/man8/dmraid.8* %{_tmpfilesdir}/%{name}.conf %files -n %{drlibname} %defattr(-,root,root,755) %{_libdir}/libdmraid.so.%{drmajor}* %files -n %{drdevname} %defattr(644,root,root,755) %dir %{_includedir}/dmraid %{_includedir}/dmraid/*.h %if %{build_static} %{_usrlibdir}/libdmraid.a %endif %{_libdir}/libdmraid.so %files events %defattr(-,root,root,755) /sbin/dmevent_tool %{_libdir}/libdmraid-events-isw.so %{_mandir}/man8/dmevent_tool* %if %{build_logwatch} %files events-logwatch %defattr(-,root,root,755) %config(noreplace) /etc/logwatch/* %config(noreplace) /etc/cron.d/dmeventd-logwatch %ghost /etc/logwatch/scripts/services/dmeventd_syslogpattern.txt %endif %changelog * Sun Mar 24 2013 colin <colin> 1.0.0-0.rc16.13.mga3 + Revision: 405136 - Use tmpfiles macros and add system version to requires (mga#9302) * Fri Jan 11 2013 umeabot <umeabot> 1.0.0-0.rc16.12.mga3 + Revision: 348890 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jan 06 2013 tmb <tmb> 1.0.0-0.rc16.11.mga3 + Revision: 339672 - rebuild for new devicemapper * Tue Jul 24 2012 colin <colin> 1.0.0-0.rc16.10.mga3 + Revision: 274015 - Do not ship files in /var/lock, use tmpfiles instead * Tue Mar 06 2012 tmb <tmb> 1.0.0-0.rc16.9.mga2 + Revision: 220217 - rebuild for new device-mapper * Fri Jan 06 2012 tmb <tmb> 1.0.0-0.rc16.8.mga2 + Revision: 192748 - add patches from upstream * support virtio devices (P110) * probe isw disks with (some) HPA awareness (P111) * fix isw raid0 incorrect sectors calculation (P112) * fix test on /dev/dm-X (P113) * fix jmicron controller detection (P114) * dump all 4 metadata sets on pdc with -rD or -n (P115) * fix conditional adding of 'p' if partition name ends with a number (P116) * Tue Jan 03 2012 tmb <tmb> 1.0.0-0.rc16.7.mga2 + Revision: 190040 - build with devmapper 1.02.67 * Wed Dec 07 2011 tmb <tmb> 1.0.0-0.rc16.6.mga2 + Revision: 178093 - activate multiple raid sets - add extra offsets where promise metadata can be found * Fri Oct 28 2011 tmb <tmb> 1.0.0-0.rc16.5.mga2 + Revision: 158914 - rebuild for updated device-mapper - disable static build * Wed Jan 12 2011 tmb <tmb> 1.0.0-0.rc16.4.mga1 + Revision: 7698 - imported package dmraid * Wed Jan 12 2011 Thomas Backlund <tmb@mageia.org> 1.0.0-0.rc16.4.mga1 - initial Mageia import - drop support for old mandriva releases * Sun Dec 12 2010 Luca Berra <bluca@mandriva.org> 1.0.0-0.rc16.3mnb2 + Revision: 620611 - sync patches from fedora - make event monitoring for isw arrays work again * Sat Nov 27 2010 Andrey Borzenkov <arvidjaar@mandriva.org> 1.0.0-0.rc16.2mnb2 + Revision: 601748 - P9: properly return error without eligible disks (fedora) * Thu Mar 11 2010 Thomas Backlund <tmb@mandriva.org> 1.0.0-0.rc16.1mnb2 + Revision: 518246 - fix Groups - libdmraid-event-* is a loadable plugin, not a shared library - split out libraries - set DMRAID_LIB_VERSION to 1 (from fedora) - consolidate configure flags - fix linking - silence run-time messages about non-existant events modules (from redhat) - disable ld_as_needed for now due to linking problems - small fixups to spec and summarys - license is GPLv2+ - disable ld_no_undefined for now to fix linking - install libs in /lib(64) - add devel, events and events-logwatch subpackages (events-logwatch disabled by default) - update configure flags: --disable-libsepol --enable-led --enable-intel_led - update description - add requires on kpartx and dmraid-events - update buildrequires on device-mapper-devel version, add device-mapper-event-devel - fix string format error in libdmraid-events-isw - fix pdc raid10 failure (from redhat) - fix persistent name for lsi ddf1 (from redhat) - drop merged and obsolete patches - update to 1.0.0-rc16 * Tue Jun 30 2009 Pascal Terjan <pterjan@mandriva.org> 1.0.0-0.rc15.1mnb2 + Revision: 391122 - Add current Fedora patches, P3 is needed as mkinitrd uses added option - Update to rc15 and drop all patches merged upstream * Fri Sep 26 2008 Pixel <pixel@mandriva.com> 1.0.0-0.rc14.7mnb2 + Revision: 288610 - force to use isw_xxxxp1 instead of isw_xxxx1 (see #42542, #44182) * Mon Aug 25 2008 Pixel <pixel@mandriva.com> 1.0.0-0.rc14.6mnb2 + Revision: 275669 - tentative fix for isw_xxxx_Volume0p1 vs isw_xxxx_Volume01 device name (#42542) * Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-0.rc14.5mnb2 + Revision: 217572 - rebuilt against dietlibc-devel-0.32 * Mon Feb 18 2008 Thierry Vignaud <tv@mandriva.org> 1.0.0-0.rc14.4mnb1 + Revision: 171224 - replace %%mkrel with %%manbo_mkrel for Manbo Core 1 + Pixel <pixel@mandriva.com> - drop specific *old* require on dietlibc-devel version (it breaks on Manbo) * Thu Feb 14 2008 Olivier Blin <oblin@mandriva.com> 1.0.0-0.rc14.4mdv2008.1 + Revision: 167205 - define _BSD_SOURCE to be able to use uint type from UUID patch with dietlibc - merge Fedora patches (jmicron name parsing fix, UUID fixes, mirror resynchronization error handling fix) - use new version of the "dmraid -r -E" segfault fix (from Ian Kent on ataraid-list@) * Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 1.0.0-0.rc14.3mdv2008.1 + Revision: 136367 - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Fri Sep 14 2007 Luca Berra <bluca@mandriva.org> 1.0.0-0.rc14.3mdv2008.0 + Revision: 85465 - add raid10 support for isw format - fix segfault issue with dmraid -r -E with isw - improve Promise FastTrack metadata detection * Wed May 09 2007 Gwenole Beauchesne <gbeauchesne@mandriva.org> 0.rc14.2mdv2008.0-current + Revision: 25740 - rebuild against a fixed dietlibc version * Tue Apr 17 2007 Thierry Vignaud <tv@mandriva.org> 1.0.0-0.rc14.1mdv2008.0 + Revision: 13794 - new release (from fedora); kill old fedora patches * Thu Aug 10 2006 Luca Berra <bluca@comedia.it> + 08/10/06 07:25:31 (55300) added more secret fedora patches * Thu Aug 10 2006 Luca Berra <bluca@comedia.it> + 08/10/06 06:59:51 (55298) Import dmraid * Tue May 23 2006 Luca Berra <bluca@vodka.it> 1.0.0-0.rc11.1mdk - rc11 from rawhide (ugh, it seems rawhide is more uptodate than upstream) * Sun May 21 2006 Luca Berra <bluca@vodka.it> 1.0.0-0.rc11.0.pre1.1mdk - new pre-release (should fix the stripe issue with kernel > 2.6.16) - drop patch 2 (merged upstream) - support pre-rc releases in spec - re-enable dietlibc for x86_64 and require a fixed dietlibc * Tue Feb 21 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.0.0-0.rc10.1mdk - new release - update description - drop patch 1 (obsoleted by build system) - patch 2: fix using autoconf * Sun Feb 05 2006 Thomas Backlund <tmb@mandriva.org> 1.0.0-0.rc9.4mdk - Fix buildrequires when building without dietlibc - Fix configure for static build without dietlibc - build x86_64 without dietlibc for now to work around ContraPolice Heap Buffer Overflow Crash * Fri Jan 06 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-0.rc9.3mdk - drop selinux support (P1) * Mon Oct 03 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.0.0-0.rc9.2mdk - BuildRequires fix * Mon Oct 03 2005 Pixel <pixel@mandriva.com> 1.0.0-0.rc9.1mdk - new release - drop lib64 patch which is applied upstream - drop patch4 (typo fix applied upstream) - we don't want the dmraid devel files * Fri May 27 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc8.1mdk - new release * Thu Apr 28 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc7.1mdk - new release - rediff patch * Thu Mar 10 2005 Pixel <pixel@mandrakesoft.com> 1.0.0-0.rc6.4mdk - don't require old libdevmapper 1.00 * Tue Mar 08 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.0-0.rc6.3mdk - Patch4: fix typo in pdc big endian only code * Sat Mar 05 2005 Luca Berra <bluca@vodka.it> 1.0.0-0.rc6.2mdk - rebuild for new libdevmapper * Wed Mar 02 2005 Luca Berra <bluca@vodka.it> 1.0.0-0.rc6.1mdk - rc6 - removed p2 (big endian fix, merged upstream) - remove Prefix: tag * Mon Feb 21 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.0-0.rc5f.3mdk - lib64 fixes * Sat Feb 12 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.0-0.rc5f.2mdk - fix build on big endian cpus * Thu Jan 13 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc5f.1mdk - new release - update description - spec cleanups * Tue Sep 07 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc4.1mdk - rc4 - fix source url - remove -s from make (fixed upstream) * Sun Sep 05 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc3.1mdk - rc3 - remove p0 merged upstream * Thu Jul 22 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc2.1mdk - initial mandrakelinux release