# # spec file for package hdparm (Version 7.7) # # Copyright (c) 2007 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: Any permissive Group: Hardware/Other PreReq: %insserv_prereq %fillup_prereq coreutils Provides: base:/sbin/hdparm AutoReqProv: on Version: 7.7 Release: 18 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-7.6-err_return.patch Patch1: hdparm-5.8-silence.patch Patch2: nostrip.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= %ifarch %ix86 gcc $RPM_OPT_FLAGS -c contrib/fix_standby.c -o contrib/fix_standby %endif %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 -m 644 %{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 install -d $RPM_BUILD_ROOT/usr/lib/hdparm %ifarch %ix86 install -m 755 contrib/fix_standby $RPM_BUILD_ROOT/usr/lib/hdparm %endif install -m 755 contrib/idectl $RPM_BUILD_ROOT/usr/lib/hdparm install -m 755 contrib/ultrabayd $RPM_BUILD_ROOT/usr/lib/hdparm %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/README.contrib %doc %{_mandir}/man8/hdparm.8.gz /sbin/hdparm %dir /lib/udev /lib/udev/idedma.sh %dir /etc/udev %dir /etc/udev/rules.d %config(noreplace) /etc/udev/rules.d/56-idedma.rules /usr/lib/hdparm /var/adm/fillup-templates/sysconfig.ide %changelog * Fri Nov 30 2007 - ro@suse.de - added sd* to udev rule (#340039) * Fri Aug 10 2007 - ro@suse.de - update to 7.7 - fixed bug whereby old data was shown after settings changed (eg. with -W0) - removed old notes about a "correction factor" from man page -tT descriptions - retry open with O_RDONLY if O_RDWR fails with errno==EROFS * Wed Jun 20 2007 - ro@suse.de - update to 7.6 - added -F flag to flush on-drive write cache buffer - replaced use of shm* functions with of mmap()/mlock() - removed gcc -Wextra flag --> unsupported on Debian Sarge - re-allow use of --security-freeze in combination with other flags * Fri Jun 08 2007 - ro@suse.de - update to 7.5 - beef up warnings for -s1 flag, as people seem to be ignoring them * Fri Jun 01 2007 - ro@suse.de - update to 7.4 - ignore ENOTTY response from DRIVE_CMD(NULL) - decode CFA advanced timing information * Thu May 24 2007 - schwab@suse.de - fix_standby is x86-only. * Wed May 16 2007 - ro@suse.de - fix lint problems - install contrib scripts to /usr/lib/hdparm - mark udev file as config - fix permissions for fillup-template * Tue May 01 2007 - schwab@suse.de - Don't strip binaries. * Mon Apr 30 2007 - ro@suse.de - update to 7.3 - fixed spelling of --drq-hsm-error in -h output - fixed SG_IO CDB[2] bits for better SAT compliance - fixed version number (v7.2 has "7.1" as version, doh!) - added #ifdef around use of BLKGETSIZE64 - manpage updated * Sun Apr 29 2007 - ro@suse.de - update to 7.2 - tweak -C - added more debug info from --verbose - added --drq-hsm-error to test libata EH (VERY DANGEROUS, do not use) - fixed breakage when used with old IDE driver * Sun Apr 29 2007 - ro@suse.de - update to 7.1 - big-endian fixes for -I, --Istdin, --Istdout - cody tidying in sgio.c - updated help/manpage for -v - marked -s1 as (DANGEROUS) - hdparm-7.0 - new command-line parser - allow any chars (except 0x00) in security passwords - fixed -s manpage format error - updated -W manpage description - major internal rework in hdparm.c - added SET_FEATURES subcommand 0x07 to the -s0 sequence (the kernel will eventually have to do this automatically) - fixed duplicate display of udma modes 3,4,5 with -i - added Timed-Command-Completion (TLC) data for -I - added support for SG_IO (SAT) ATA_16 command transport - ignore case for longargs (eg. --istdout or --Istdout) - remove dependencies on - added query wcache (-W) - enhanced query acoustic (-M) - added kernel_patches directory with patches for ATAPI support - disable acoustic patch (surrounding code changed) * 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