# # spec file for package hdparm (Version 6.9) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: hdparm License: Freely Redistributable Software (FSR) Group: Hardware/Other PreReq: %insserv_prereq %fillup_prereq coreutils Provides: base:/sbin/hdparm Autoreqprov: on Version: 6.9 Release: 1 Summary: A Program to Get and Set Hard Disk Parameters Source: hdparm-%{version}.tar.bz2 Source1: 56-idedma.rules Source2: sysconfig.ide Source3: udev.idedma.sh Patch: hdparm-6.3-err_return.patch Patch1: hdparm-5.8-silence.patch Patch2: hdparm-5.8-acoustic.patch URL: http://sourceforge.net/projects/hdparm/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A shell utility to access and tune the ioctl features of the Linux IDE driver and IDE drives. Authors: -------- Mark Lord %prep %setup -q %patch %patch1 %patch2 %build make CFLAGS="$RPM_OPT_FLAGS -Wall -Wstrict-prototypes" LDFLAGS= %install mkdir -p $RPM_BUILD_ROOT/sbin mkdir -p $RPM_BUILD_ROOT/usr/share/man/man8 make install DESTDIR=$RPM_BUILD_ROOT mv contrib/README contrib/README.contrib install -d $RPM_BUILD_ROOT/etc/udev/rules.d install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/udev/rules.d install -d $RPM_BUILD_ROOT/var/adm/fillup-templates install %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates install -d $RPM_BUILD_ROOT/lib/udev install -m 755 %{S:3} $RPM_BUILD_ROOT/lib/udev/idedma.sh %post if [ -f etc/sysconfig/hardware ] ; then mv etc/sysconfig/hardware etc/sysconfig/ide fi %{remove_and_set -n ide DEVICES_FORCE_IDE_DMA_ON DEVICES_FORCE_IDE_DMA_OFF} %{fillup_only -n ide} # new settings NEW_DMA="" # convert old settings if [ "$DEVICES_FORCE_IDE_DMA_ON" != "" -a "$DEVICES_FORCE_IDE_DMA_ON" != "no" ] ; then for dev in $DEVICES_FORCE_IDE_DMA_ON; do NEW_DMA="${NEW_DMA:+$NEW_DMA }/dev/$dev:on" done fi if [ "$DEVICES_FORCE_IDE_DMA_OFF" != "" -a "$DEVICES_FORCE_IDE_DMA_OFF" != "no" ] ; then for dev in $DEVICES_FORCE_IDE_DMA_OFF; do NEW_DMA="${NEW_DMA:+$NEW_DMA }/dev/$dev:off" done fi # update sysconfig file if [ "$NEW_DMA" != "" ] ; then echo "Updating etc/sysconfig/ide" # remove old values, update new variable sed -e "s|^DEVICES_FORCE_IDE_DMA=\"\\(.*\\)\"|DEVICES_FORCE_IDE_DMA=\"$NEW_DMA \\1\"|" \ etc/sysconfig/ide > etc/sysconfig/ide.new \ && mv etc/sysconfig/ide.new etc/sysconfig/ide rm -f etc/sysconfig/ide.new fi %files %defattr(-,root,root) %doc Changelog README.acoustic contrib/* %doc %{_mandir}/man8/hdparm.8.gz /sbin/hdparm %dir /lib/udev /lib/udev/idedma.sh %dir /etc/udev %dir /etc/udev/rules.d /etc/udev/rules.d/56-idedma.rules /var/adm/fillup-templates/sysconfig.ide %changelog -n hdparm * Sat Oct 28 2006 - aj@suse.de - Update to version 6.9, changes since 6.6 are: * added -s flag to control power-up in standby * make --Istdin more robust * added -I recognition of SMART Command Transport (SCT) * fix X2 over-reporting of -T results * add udma 3/4/5 modes to the -i results * improve parsing/operation of --Istdin function * don't default to "-v" when only new "--" longopts are used. * calculate integrity word if not correct * remove used code/parameter from identify() * fix "(null)" strings from the "Drive conforms to" line of -I * tidied up usage of prefix vars in Makefile * fix bug in -C implementation * new -H flag for (Hitachi) drive temperature * Mon Jun 12 2006 - ro@suse.de - update to version 6.6 - manpage updates / corrections. - fixed bug in -C code. - major updates to bring -I information up to current specs. * Mon May 22 2006 - schwab@suse.de - Don't strip binaries. * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Wed Nov 30 2005 - ro@suse.de - moved udev helper script to /lib/udev * Tue Oct 25 2005 - ro@suse.de - update to version 6.3 * Fri Oct 07 2005 - ro@suse.de - added udev rule 56-idedma.rules - moved sysconfig/ide from aaa_base to this package (and all the legacy postinstall code with it) * Mon Apr 18 2005 - ro@suse.de - update to 6.1 * Tue Mar 08 2005 - ro@suse.de - use HDIO_SET_ACOUSTIC * Fri Feb 11 2005 - ro@suse.de - update to 5.9 * Wed Feb 02 2005 - ro@suse.de - fix set acoustic (#48595) * Fri Nov 05 2004 - ro@suse.de - update to 5.8 - remove-dup-swap.patch has been merged upstream * Thu Oct 21 2004 - ro@suse.de - silence errors for BLKFLSBUF (#45057) * Tue Oct 12 2004 - ro@suse.de - added contrib files to doc (#47105) * Sun Sep 05 2004 - ro@suse.de - update to 5.7 - removed obsolete lvm patch - recreated err_return patch again * Tue Aug 17 2004 - ro@suse.de - update to 5.6 - recreated err_return patch - readahead.patch is obsolete * Wed May 12 2004 - meissner@suse.de - Removed duplicated byte swapping on big endian, it is no longer needed. (SUSE#39628/LTC#7961) * Tue Feb 03 2004 - ro@suse.de - update to hdparm-5.5 - added limited support for SCSI(-controlled) CDROM/optical drives * Tue Jan 27 2004 - ro@suse.de - rename variable readahead (glibc using this as a function) * Thu Nov 06 2003 - ro@suse.de - added README.acoustic (#32917) * Mon Oct 20 2003 - ro@suse.de - use defattr - don't build as root * Sun Jul 06 2003 - ro@suse.de - update to 5.4 with new timing code * Tue Jun 03 2003 - olh@suse.de - add hdparm-5.3-dump_identity-endian.dif do not swap the id->cur_capacity0/1 values in userland * Mon May 12 2003 - ro@suse.de - define LVM_BLK_MAJOR if not defined * Wed Mar 26 2003 - ro@suse.de - fix timing test for large disks (#25861) * Wed Mar 12 2003 - ro@suse.de - added patch to return an error for most failed ioctls (not all, because cdroms always fail for e.g. HDIO_GETGEO) * Wed Nov 27 2002 - ro@suse.de - update (v5.3 endian fixes, other stuff) * Thu Aug 01 2002 - ro@suse.de - update to 5.2 . updated -Q to take queue depth as parameter value . formatting fixes for -I from various people . updated -I to most recent ATA6 draft standard . various compile fixes * Thu Apr 25 2002 - ro@suse.de - added patch from axboe to make TCQ work * Thu Apr 25 2002 - ro@suse.de - up to vanilla hdparm-4.7 - use buildroot * Tue Sep 04 2001 - ro@suse.de - update to 4.1 (mostly merged changes from andre's patch) * Thu Mar 22 2001 - ro@suse.de - added split-aliases as provides * Thu Mar 15 2001 - ro@suse.de - split from base