--- hdparm-9.15.orig/hdparm.c +++ hdparm-9.15/hdparm.c @@ -1822,14 +1822,16 @@ } if (get_apmmode) { id = get_identify_data(fd, id); - printf(" APM_level = "); - if((id[83] & 0xc008) == 0x4008) { - if (id[86] & 0x0008) - printf("%u\n", id[91] & 0xff); - else - printf("off\n"); - } else - printf("not supported\n"); + if (id) { + printf(" APM_level = "); + if((id[83] & 0xc008) == 0x4008) { + if (id[86] & 0x0008) + printf("%u\n", id[91] & 0xff); + else + printf("off\n"); + } else + printf("not supported\n"); + } } if (get_acoustic) { id = get_identify_data(fd, id); --- hdparm-9.15.orig/Makefile +++ hdparm-9.15/Makefile @@ -28,7 +28,6 @@ hdparm: hdparm.h sgio.h $(OBJS) $(CC) $(LDFLAGS) -o hdparm $(OBJS) - $(STRIP) hdparm hdparm.o: hdparm.h sgio.h --- hdparm-9.15.orig/debian/hdparm.udev-script +++ hdparm-9.15/debian/hdparm.udev-script @@ -0,0 +1,245 @@ +#!/bin/sh + +set -e + +[ "$DEVNAME" ] || exit 1 + +if [ -e /proc/cmdline ]; then #linux only - future proofing against BSD and Hurd :) + if grep -wq "nohdparm" /proc/cmdline ; then + exit 0 + fi +fi + +raidstat=OK +if [ -e /proc/mdstat ]; then + if egrep -iq "resync|repair|recover|check" /proc/mdstat; then + raidstat=RESYNC + fi +elif [ -e /proc/rd/status ]; then + raidstat=`cat /proc/rd/status` +fi + +if ! [ "$raidstat" = 'OK' ]; then + exit 1 +fi + +set_option() +{ + if test -n "$DISC"; then + NEW_OPT= + for i in $OPTIONS; do + if test x${i%${i#??}} != x${1%${1#??}}; then + NEW_OPT="$NEW_OPT $i" + else + NEW_OPT=${NEW_OPT%-q} + fi + done + OPTIONS="$NEW_OPT $OPT_QUIET $1" + else + NEW_DEF= + for i in $DEFAULT; do + if test x${i%${i#??}} != x${1%${1#??}}; then + NEW_DEF="$NEW_DEF $i" + else + NEW_DEF=${NEW_DEF%-q} + fi + done + DEFAULT="$NEW_DEF $DEF_QUIET $1" + fi +} + +eval_value() +{ + case $1 in + off|0) + set_option "$2"0 + ;; + on|1) + set_option "$2"1 + ;; + *) + log_failure_msg "Unknown Value for $2: $1" + exit 1 + ;; + esac +} + +WAS_RUN=0 + +# Get blocks as far as the drive's write cache. +/bin/sync + +DISC= +DEFAULT= +OPTIONS= +DEF_QUIET= +OPT_QUIET= + +egrep -v '^[[:space:]]*(#|$)' /etc/hdparm.conf | +{ + while read KEY SEP VALUE; do + if [ "$NEXT_LINE" != 'go' ]; then + case $SEP in + '{') + case $KEY in + command_line) + NEXT_LINE=go + unset DISC + unset OPTIONS + unset OPT_QUIET + IN_BLOCK=0 + ;; + *) + DISC=$KEY + OPTIONS=$DEFAULT + OPT_QUIET=$DEF_QUIET + WAS_RUN=0 + if [ "$DISC" = "$DEVNAME" ]; then + IN_BLOCK=1 + else + IN_BLOCK=0 + fi + ;; + esac + ;; + =) + case $KEY in + read_ahead_sect) + set_option -a$VALUE + ;; + lookahead) + eval_value $VALUE -A + ;; + bus) + eval_value $VALUE -b + ;; + apm) + set_option -B$VALUE + ;; + io32_support) + set_option -c$VALUE + ;; + dma) + eval_value $VALUE -d + ;; + defect_mana) + eval_value $VALUE -D + ;; + cd_speed) + set_option -E$VALUE + ;; + mult_sect_io) + set_option -m$VALUE + ;; + prefetch_sect) + set_option -P$VALUE + ;; + read_only) + eval_value $VALUE -r + ;; + spindown_time) + set_option -S$VALUE + ;; + poweron_standby) + eval_value $VALUE -s + ;; + interrupt_unmask) + eval_value $VALUE -u + ;; + write_cache) + eval_value $VALUE -W + ;; + transfer_mode) + set_option -X$VALUE + ;; + acoustic_management) + set_option -M$VALUE + ;; + keep_settings_over_reset) + eval_value $VALUE -k + ;; + keep_features_over_reset) + eval_value $VALUE -K + ;; + chipset_pio_mode) + set_option -p$VALUE + ;; + security_unlock) + set_option --security-unlock $VALUE + ;; + security_pass) + set_option --security-set-pass $VALUE + ;; + security_disable) + set_option --security-disable $VALUE + ;; + user-master) + set_option --user-master $VALUE + ;; + security_mode) + set_option --security-mode $VALUE + ;; + ROOTFS) + ROOTFS=$VALUE + ;; + *) + echo "Unknown option $KEY" + exit 1 + ;; + esac + ;; + "") + case $KEY in + '}') + if [ -z "$DISC" ] && [ "$WAS_RUN" != '1' ]; then + echo "No disk enabled. Exiting" + exit 1 + fi + if [ -n "$OPTIONS" ] && [ -b "$DISC" ]; then + ret=0 + if [ "$IN_BLOCK" = 1 ]; then + # Flush the drive's internal write cache to the disk. + /sbin/hdparm -q -f $DISC 2>/dev/null || ret=$? + /sbin/hdparm $OPTIONS $DISC 2>/dev/null || ret=$? + fi + fi + ;; + quiet) + if [ -n "$DISC" ]; then + OPT_QUIET=-q + else + DEF_QUIET=-q + fi + ;; + standby) + set_option -y + ;; + sleep) + set_option -Y + ;; + disable_seagate) + set_option -Z + ;; + security_freeze) + set_option --security-freeze + ;; + *) + echo "unknown option $KEY" + exit 1 + ;; + esac + ;; + *) + echo "unknown separator $SEP" + exit 1 + ;; + esac + else + $KEY $SEP $VALUE + NEXT_LINE=no-go + WAS_RUN=1 + fi + done +} + +exit 0 --- hdparm-9.15.orig/debian/hdparm.dirs +++ hdparm-9.15/debian/hdparm.dirs @@ -1 +1 @@ -etc/udev/rules.d +lib/udev --- hdparm-9.15.orig/debian/hdparm.preinst +++ hdparm-9.15/debian/hdparm.preinst @@ -1,4 +1,5 @@ #!/bin/sh +set -e # Remove a no-longer used conffile rm_conffile() { --- hdparm-9.15.orig/debian/hdparm.conf +++ hdparm-9.15/debian/hdparm.conf @@ -90,7 +90,6 @@ # --security-mode Set the security mode # security_mode = h - # Root file systems. Please see README.Debian for details # ROOTFS = /dev/hda --- hdparm-9.15.orig/debian/hdparm.init +++ hdparm-9.15/debian/hdparm.init @@ -389,9 +389,9 @@ ret=0 for drive in $harddisks; do WAS_RUN=1 + log_progress_msg "$drive " /sbin/hdparm -q -f $drive 2>/dev/null|| ret=$? /sbin/hdparm -q $hdparm_opts -q $drive 2>/dev/null|| ret=$? - log_progress_msg "$drive " done log_end_msg $ret || true fi --- hdparm-9.15.orig/debian/changelog.old +++ hdparm-9.15/debian/changelog.old @@ -0,0 +1,18 @@ +old changelog + +23-December-1994 Bruce Perens + Added Debian GNU/Linux package maintenance system files, and configured + for Debian. + +22-June-1995 Guy R. Thomas + Took over maintenance of package. New Debian revision. + +22-June-1995 Guy R. Thomas + Upgraded to current version. ( May 31, 1995 ) + +25-June-1996 Steve Dunham + Upgraded to current version. + +Local variables: +mode: debian-changelog +End: --- hdparm-9.15.orig/debian/hdparm.postinst +++ hdparm-9.15/debian/hdparm.postinst @@ -1,4 +1,5 @@ #!/bin/sh +set -e if [ -z "$2" ] || dpkg --compare-versions "$2" lt 6.1-6 ; then ln -s ../hdparm.rules /etc/udev/rules.d/z60_hdparm.rules --- hdparm-9.15.orig/debian/control +++ hdparm-9.15/debian/control @@ -1,15 +1,18 @@ Source: hdparm Section: admin Priority: optional -Maintainer: Stephen Gran -Build-Depends: cdbs (>> 0.4.37), debhelper (>= 5.0), dpatch, dpkg-dev (>= 1.13.19) -Standards-Version: 3.8.0 +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Stephen Gran +Build-Depends: cdbs (>= 0.4.38), debhelper (>= 7.0.17ubuntu2), dpkg-dev (>= 1.13.19) +Standards-Version: 3.8.1 +Homepage: http://sourceforge.net/projects/hdparm/ Package: hdparm Architecture: any -Depends: ${shlibs:Depends}, lsb-base +Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: apmd Replaces: apmd (<= 3.0.2-1.15) +Breaks: udev (<< 136-1) Description: tune hard disk parameters for high performance Get/set device parameters for Linux SATA/IDE drives. Primary use is for enabling irq-unmasking and IDE multiplemode. @@ -17,7 +20,8 @@ Package: hdparm-dbg Architecture: any Priority: extra -Depends: hdparm (= ${binary:Version}) +Section: debug +Depends: hdparm (= ${binary:Version}), ${misc:Depends} Description: debug files for hdparm This package contains the stripped debugging symbols for hdparm --- hdparm-9.15.orig/debian/README.Debian +++ hdparm-9.15/debian/README.Debian @@ -62,6 +62,13 @@ /etc/hdparm.conf, that will fail the first time (as the device nodes don't yet exist) but will be properly set up when udev gets to them. + If you have devices that consistently come up in different orders (e.g., + today's /dev/sda is tomorrow's /dev/sdb), then you can do one of two + things. Either you can directly use one of the various /dev/disk/by-* + symlinks, or you can create a udev rule to create a symlink to your + drive with a more friendly name. Then point hdparm at these symlinks + as you previously did with /dev/sda. + Known problems, limitations, and work-arounds: Additional information from David B Harris: --- hdparm-9.15.orig/debian/changelog +++ hdparm-9.15/debian/changelog @@ -0,0 +1,888 @@ +hdparm (9.15-1ubuntu2) karmic; urgency=low + + * Fix crash with -B when HDIO_DRIVE_CMD(identify) fails (LP: #396837). + + -- Colin Watson Tue, 14 Jul 2009 14:04:15 +0100 + +hdparm (9.15-1ubuntu1) karmic; urgency=low + + * Merge from debian unstable (LP: #311451), remaining changes: + + debian/control: + - Do not depend on lsb-base (we no longer use init script) + - Add Homepage + - Add Breaks on old udev + - Bump debhelper depends for dh_installudev changes + + debian/hdparm.install, debian/hpdarm.udev: + - Use hpdarm.udev instead of .rules + + debian/hpdarm.dirs: + - Drop unused /etc/udev/rules.d, add lib/udev for our udev-script + + debian/rules, debian/hdparm.udev-script: + - Install udev-script, drop init file stuff + - Pass --priority=85 to dh_installudev + + -- Michael Terry Mon, 15 Jun 2009 09:44:02 -0400 + +hdparm (9.15-1) unstable; urgency=low + + * New upstream version (closes: #505284) + * opens devices with O_RDONLY (closes: #522091, #526516) + + -- Stephen Gran Sat, 13 Jun 2009 00:45:36 +0100 + +hdparm (8.9-3ubuntu3) jaunty; urgency=low + + * Add Breaks to ensure the right version of udev is used. + + -- Scott James Remnant Fri, 09 Jan 2009 11:49:03 +0000 + +hdparm (8.9-3ubuntu2) jaunty; urgency=low + + * Update for new udev rules location. + * debian/hdparm.rules: Rename to debian/hdparm.udev so dh_installudev + can pick it up. + * debian/rules: pass --priority=85 to dh_installudev, remove hand-install. + * debian/hdparm.dirs: no need for /etc/udev/rules.d + * debian/control: bump dependencies on debhelper and cdbs + + -- Scott James Remnant Wed, 07 Jan 2009 10:15:55 +0000 + +hdparm (8.9-3ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: LP: #313451 + - remove init script, install udev rules instead + - debian/control: Do not depend on lsb-base + * Add Homepage field LP: #311453 + + -- Bhavani Shankar Sat, 03 Jan 2009 17:58:22 +0530 + +hdparm (8.9-3) unstable; urgency=low + + * Fix output formatting for drives configured from /etc/default/hdparm + (closes: #494660) + * Add documentation about changing device names (closes: #421087) + + -- Stephen Gran Wed, 17 Dec 2008 22:45:28 +0000 + +hdparm (8.9-2ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - debian/control: Do not depend on lsb-base + + -- Michael Vogt Mon, 10 Nov 2008 14:02:31 +0100 + +hdparm (8.9-2) unstable; urgency=low + + * Remove stale stop links (closes: #497903) + + -- Stephen Gran Fri, 05 Sep 2008 11:23:20 +0100 + +hdparm (8.9-1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - debian/control: Do not depend on lsb-base + + -- Michael Vogt Thu, 19 Jun 2008 10:40:06 +0200 + +hdparm (8.9-1) unstable; urgency=low + + * New upstream version + * Update standars version to 3.8.0 (no changes) + + -- Stephen Gran Tue, 17 Jun 2008 19:08:10 +0100 + +hdparm (8.8-1) unstable; urgency=low + + * New upstream version + - Document that security-* switches are standalone (closes: #422341) + + -- Stephen Gran Wed, 11 Jun 2008 23:36:59 +0100 + +hdparm (8.7-1) unstable; urgency=low + + * New upstream release + * Fixed incorrect LSB header Default-Stop (closes: #476110) + + -- Stephen Gran Tue, 03 Jun 2008 00:36:06 +0100 + +hdparm (8.6-1ubuntu1) hardy; urgency=low + + * Merge from Debian unstable (LP: #203736). Remaining Ubuntu changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + - debian/control: Do not depend on lsb-base + * Fixes "udev rules only for hd[a-z], not sd[a-z]" (LP: #156893) + * Remove hdparm init script and make it not re-appear in next merges + - debian/rules: add "--onlyscripts" to DEB_DH_INSTALLINIT_ARGS, so that the + init script does not get installed + - debian/preinst: bump version in rm_conffile call + + -- Daniel Hahler Fri, 28 Mar 2008 21:44:38 +0100 + +hdparm (8.6-1) unstable; urgency=low + + * New upstream version + * Udev rule can also match for sata devices (closes: #471401) + + -- Stephen Gran Tue, 18 Mar 2008 01:06:37 +0000 + +hdparm (8.3-1) unstable; urgency=low + + * New upstream release + * easier config of spindown time (closes: #462766) + * Update Standards-Version (no changes) + + -- Stephen Gran Tue, 19 Feb 2008 22:39:32 +0000 + +hdparm (7.7-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Thu, 15 Nov 2007 12:39:58 +0100 + +hdparm (7.7-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Sat, 11 Aug 2007 12:35:12 +0100 + +hdparm (7.6-1) unstable; urgency=low + + * New upstream version + * Update conffile handling in preinst + + -- Stephen Gran Sun, 15 Jul 2007 15:50:24 +0100 + +hdparm (7.5-1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Thu, 14 Jun 2007 09:54:59 +0200 + +hdparm (7.5-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Wed, 06 Jun 2007 21:13:36 +0100 + +hdparm (7.3-1) unstable; urgency=low + + * New upstream version + - partial fix for #423186, rest patched, so (closes: #423186) + * Stop installing useless stop links in rc0 and rc6 (closes: #422795) + + -- Stephen Gran Thu, 31 May 2007 02:34:11 +0100 + +hdparm (7.1-2ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Mon, 21 May 2007 08:47:38 +0200 + +hdparm (7.1-2) unstable; urgency=low + + * Don't ship a binary in contrib/ (even though upstream puts it in the + tarball) + + -- Stephen Gran Sun, 29 Apr 2007 03:33:05 +0100 + +hdparm (7.1-1) unstable; urgency=low + + * New upstream version + * Add debian/patches/40_hdparm_no_strip.dpatch to keep build system from + stripping hdparm binary before dh_strip can get to it. + + -- Stephen Gran Sun, 29 Apr 2007 03:02:39 +0100 + +hdparm (6.9-2) unstable; urgency=low + + * Typo fix in manpage (closes: #396809) + * Better explain get/set options (closes: #397792) + + -- Stephen Gran Sat, 17 Feb 2007 03:30:06 +0000 + +hdparm (6.9-1ubuntu2) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:18:04 +0000 + +hdparm (6.9-1ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + + * Update udev script from init script + + -- Scott James Remnant Mon, 27 Nov 2006 14:14:39 +0000 + +hdparm (6.9-1) unstable; urgency=low + + * New upstream version + * Add new -s option to init script, conf file, and manpage + + -- Stephen Gran Wed, 25 Oct 2006 16:24:22 +0100 + +hdparm (6.8-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 16 Oct 2006 18:14:36 +0100 + +hdparm (6.7-1) unstable; urgency=low + + * New upstream version + * Fix override disparity for -dbg package + * Versioned Build-Dep on dpkg-dev since it now uses ${binary:Version} + + -- Stephen Gran Thu, 5 Oct 2006 22:37:59 +0100 + +hdparm (6.6-5) unstable; urgency=low + + * Make -C actually try a second time (closes: #390079) + + -- Stephen Gran Sat, 30 Sep 2006 15:08:01 +0100 + +hdparm (6.6-4) unstable; urgency=low + + * hdparm-dbg should Depend on hdparm, how about? + + -- Stephen Gran Thu, 28 Sep 2006 11:06:31 +0100 + +hdparm (6.6-3) unstable; urgency=low + + * s/mountvirtfs/mountdevsubfs/ in init script (closes: #386340) + * Some init dependency tuning + * Apply patch from Norbert Buchmuller to make it safer + to run hdparm on a degraded software raid array (closes: #366333) + * Split out the old unformatted changelog entries to quiet lintian + + -- Stephen Gran Tue, 19 Sep 2006 00:44:08 +0100 + +hdparm (6.6-2) unstable; urgency=low + + * Add -dbg package + This requires incrementing the versioned dep on debhelper + * Increment Standards-Version to 3.7.2 (no changes) + + -- Stephen Gran Thu, 18 May 2006 23:59:56 +0100 + +hdparm (6.6-1ubuntu3) edgy; urgency=low + + * Remove the init script again. + + -- Scott James Remnant Thu, 20 Jul 2006 23:33:21 +0100 + +hdparm (6.6-1ubuntu2) edgy; urgency=low + + * Repair CDBS damage ... silently enabling features depending on the + filename of files that may have existed before is BAD, OKAY? + + -- Scott James Remnant Mon, 3 Jul 2006 23:03:13 +0100 + +hdparm (6.6-1ubuntu1) edgy; urgency=low + + [ Ongoing Merge Process ] + * Merge from debian unstable. + + [ Scott James Remnant ] + * Drop conffile move now dapper is released. + + -- Scott James Remnant Wed, 28 Jun 2006 23:44:49 +0100 + +hdparm (6.6-1) unstable; urgency=low + + * New upstream release + * man page fixups for -a (closes: #362670) + * Change to using comparison (==) rather than assignment (=) operators in + hdparm's udev rules. + * Stop printing nulls (closes: #363132) + * Add APM/ACPI discussion to README.Debian (closes: #327442) + + -- Stephen Gran Tue, 18 Apr 2006 13:28:33 +0100 + +hdparm (6.3-3ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + * Drop init script completely, udev will run the right magic for each + new block device anyway. + + -- Scott James Remnant Thu, 15 Dec 2005 01:56:46 +0000 + +hdparm (6.3-3) unstable; urgency=low + + * Init script fixup: s/_/-/ (closes: #340685) + + -- Stephen Gran Fri, 25 Nov 2005 09:15:46 +0000 + +hdparm (6.3-2) unstable; urgency=low + + * Brown paper bag release - add dpatch to B-D (closes:#340595) + + -- Stephen Gran Thu, 24 Nov 2005 13:21:52 +0000 + +hdparm (6.3-1) unstable; urgency=low + + * New Upstream Version (closes: #340171) + * Init dependency information added (closes: #335309) + * Add support for new user-master option to init script, and document same + * Switch to dpatch, and start adding tiny patches there + + -- Stephen Gran Mon, 21 Nov 2005 23:44:43 +0000 + +hdparm (6.1-7) unstable; urgency=low + + * Make eval_value fail if unknown value passed to it (closes: #329443) + * Get rid of deprecated dev.d/ file (closes: #329450) + * Add /etc/udev/rules.d/ to package (closes: #329731) + + -- Stephen Gran Sat, 24 Sep 2005 01:03:51 +0100 + +hdparm (6.1-7ubuntu2) dapper; urgency=low + + * Fix incorrect syntax in hdparm.rules file. + * Install hdparm.rules as /etc/udev/rules.d/85-hdparm.rules to match + new udev packages; move file if customised in ubuntu1. + + -- Scott James Remnant Fri, 18 Nov 2005 10:03:15 +0000 + +hdparm (6.1-7ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + (Yes, really, me; not any of those imposters!) + - Kept versioned-dep on lsb-base. + - Kept include of /etc/default/rcS in hdparm.init as we check VERBOSE, + I'm not sure why Debian don't do that. + - Merge both sets of init script changes to roughly produce the same + effect, less logging than Debian but with combined init and hotplug + script. + * Dropped postrm and postinst, instead install hdparm.rules directly into + /etc/udev/rules.d, we have no need to mess about with symlinks. + * Dropped support for /etc/default/hdparm as it doesn't really work with + udev anyway, and there should only be one way to do things, damnit. + + -- Scott James Remnant Tue, 08 Nov 2005 07:20:28 +0000 + +hdparm (6.1-6) unstable; urgency=low + + * Migrate from dev.d to udev/hdparm.rules (closes: #329026) + * remerge manpage patch for -M (closes: #325237) + + -- Stephen Gran Mon, 19 Sep 2005 08:19:27 +0100 + +hdparm (6.1-5) unstable; urgency=low + + * Change udev script name to end in .dev (hmm, really should have + investigated that more) (closes: #322636) + + -- Stephen Gran Fri, 12 Aug 2005 08:56:00 -0400 + +hdparm (6.1-4) unstable; urgency=low + + * Grr, I _would_ have had a working solution, if only I actually installed + all the files. + + -- Stephen Gran Thu, 11 Aug 2005 09:57:28 -0400 + +hdparm (6.1-3) unstable; urgency=low + + * Finally, I think I have a working udev method (much thanks to Ubuntu for + doing rather a lot of the work getting it there) + (closes: #274109, #312949) + * security-freeze support for init script (closes: #317675) + * hdparm.conf manpage written and included (closes: #319928) + + -- Stephen Gran Wed, 10 Aug 2005 15:26:36 -0400 + +hdparm (6.1-2) unstable; urgency=low + + * Typo fixups in /etc/default/hdparm (closes: #310517) + + -- Stephen Gran Tue, 24 May 2005 10:08:42 -0400 + +hdparm (6.1-1ubuntu2) breezy; urgency=low + + * Fix the hdparm.dev script to only execute hdparm for the block device + being created, rather than for every block device configured in the file. + This prevents an hdparm storm bringing down the machine. (Ubuntu: #16433) + + -- Scott James Remnant Tue, 27 Sep 2005 21:00:19 +0100 + +hdparm (6.1-1ubuntu1) breezy; urgency=low + + * Resynchronise with Debian, resolving merge conflicts. + + -- Adam Conrad Thu, 21 Apr 2005 09:33:45 +0000 + +hdparm (6.1-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 18 Apr 2005 14:40:21 -0400 + +hdparm (6.1-7) unstable; urgency=low + + * Make eval_value fail if unknown value passed to it (closes: #329443) + * Get rid of deprecated dev.d/ file (closes: #329450) + * Add /etc/udev/rules.d/ to package (closes: #329731) + + -- Stephen Gran Sat, 24 Sep 2005 01:03:51 +0100 + +hdparm (6.1-6) unstable; urgency=low + + * Migrate from dev.d to udev/hdparm.rules (closes: #329026) + * remerge manpage patch for -M (closes: #325237) + + -- Stephen Gran Mon, 19 Sep 2005 08:19:27 +0100 + +hdparm (6.1-5) unstable; urgency=low + + * Change udev script name to end in .dev (hmm, really should have + investigated that more) (closes: #322636) + + -- Stephen Gran Fri, 12 Aug 2005 08:56:00 -0400 + +hdparm (6.1-4) unstable; urgency=low + + * Grr, I _would_ have had a working solution, if only I actually installed + all the files. + + -- Stephen Gran Thu, 11 Aug 2005 09:57:28 -0400 + +hdparm (6.1-3) unstable; urgency=low + + * Finally, I think I have a working udev method (much thanks to Ubuntu for + doing rather a lot of the work getting it there) + (closes: #274109, #312949) + * security-freeze support for init script (closes: #317675) + * hdparm.conf manpage written and included (closes: #319928) + + -- Stephen Gran Wed, 10 Aug 2005 15:26:36 -0400 + +hdparm (6.1-2) unstable; urgency=low + + * Typo fixups in /etc/default/hdparm (closes: #310517) + + -- Stephen Gran Tue, 24 May 2005 10:08:42 -0400 + +hdparm (6.1-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 18 Apr 2005 14:40:21 -0400 + +hdparm (6.0-1) unstable; urgency=low + + * New upstream version + - Includes WIN_SECURITY_FREEZE_LOCK (closes: #302774) + * Allow multiple disks to be set up at once in /etc/default/hdparm + (closes: #296368) + + -- Stephen Gran Sat, 16 Apr 2005 12:36:14 -0400 + +hdparm (5.9-4ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + -- Michael Vogt Fri, 15 Apr 2005 15:30:28 +0200 + +hdparm (5.9-4) unstable; urgency=low + + * Allow overriding of (rather simple minded) built-in safety checks + in init script (closes: #299330) + * Patch to output sectors instead of bytes on kernels that support + BLKGETSIZE64 (closes: #299109) + * Reorganize README.Debian, and better document the init script (hopefully) + * Add documentation to init script and conf file, and make indenting more + readable in init script (closes: #299440) + + -- Stephen Gran Mon, 14 Mar 2005 06:05:55 -0500 + +hdparm (5.9-3) unstable; urgency=low + + * Don't skip drives in hdparm.init if $ROOTFS is unset (closes: #296364) + + -- Stephen Gran Mon, 21 Feb 2005 22:11:40 -0500 + +hdparm (5.9-2) unstable; urgency=low + + * Readability fixup in hdparm.init (closes: #294761) (thanks Thomas Hood + ) + * Test for existance of device before running hdparm on it. This doesn't + really fix the problem of things like udev creating the device files so + slowly, but it allows the init script to run to completion, instead of + bailing due to set -e (closes: #249446) + * Set up the infrastructure for a 2 stage call at boot time. Unfortunately, + the admin will have to do a little work themselves to configure this, but + doing it automagically appears impossible in all situations, so I will not + push it much further. (closes: #250232, #290629) + + -- Stephen Gran Thu, 17 Feb 2005 22:00:33 -0500 + +hdparm (5.9-1) unstable; urgency=low + + * New upstream version + - fixes -W switch (closes: #293378) + + -- Stephen Gran Fri, 4 Feb 2005 08:56:57 -0500 + +hdparm (5.8-1ubuntu4) hoary; urgency=low + + * Force the /etc/dev.d/block/hdparm.dev script to be executable + if upgrading from a version older than this one. dpkg won't + touch the mode on this file. + + -- Jeff Bailey Mon, 21 Mar 2005 07:15:54 -0500 + +hdparm (5.8-1ubuntu3) hoary; urgency=low + + * ensure that the hdparm dev script is +x (Ubuntu: #7829) + + -- Thom May Sat, 19 Mar 2005 22:46:43 +0000 + +hdparm (5.8-1ubuntu2) hoary; urgency=low + + * Add udev script to run hdparm on newly created devices. (Ubuntu: #4356) + + -- Thom May Mon, 7 Feb 2005 12:50:01 +0000 + +hdparm (5.8-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Sat, 27 Nov 2004 12:47:14 +0000 + +hdparm (5.8-1) unstable; urgency=low + + * New Upstream version + - -h output now goes to stdout rather than stderr + (closes: #270510) + * Mention config file in manpage (closes: #272641) + + -- Stephen Gran Fri, 26 Nov 2004 11:57:13 -0500 + +hdparm (5.7-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Thom May Wed, 27 Oct 2004 21:40:43 +0100 + +hdparm (5.7-1) unstable; urgency=low + + * New upstream release + - fixes endian problems (segfault with -i) (closes: #268725) + * Stop shipping empty rcS.d (why did I do that?) (closes: #270377) + + -- Stephen Gran Sun, 12 Sep 2004 14:00:36 -0400 + +hdparm (5.6-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release, blessed by Stephen Gran, original maintainer. This + new version allows to set up parameters on IDE disks supported by the new + libata kernel interface, that sees them as SCSI disks. hdparm prior to 5.6 + refuse to set up parameters on SCSI disks (closes: #266903). + + -- David Martínez Moreno Fri, 20 Aug 2004 16:05:19 +0200 + +hdparm (5.5-7) unstable; urgency=low + + * Get rid of .commands in source + + -- Stephen Gran Tue, 17 Aug 2004 12:14:24 -0400 + +hdparm (5.5-6) unstable; urgency=low + + * The God, I hate when I do that release + * Revert some changes that are destined for an unfinished feature, and would + just break things now. + + -- Stephen Gran Tue, 17 Aug 2004 12:08:41 -0400 + +hdparm (5.5-5) unstable; urgency=low + + * New conf file option -p (Thanks Sebastian Kuzminsky ) + * conf file also now allows for straight command line syntax - read + comments in hdparm.conf for details + * Add watch file + * Add udeb (closes: #265969) (Thanks Colin Watson for + patch) + + -- Stephen Gran Sun, 15 Aug 2004 22:48:29 -0400 + +hdparm (5.5-4ubuntu3) warty; urgency=low + + * Added versioned depend on lsb-base + + -- Nathaniel McCallum Fri, 3 Sep 2004 14:54:30 -0400 + +hdparm (5.5-4ubuntu2) warty; urgency=low + + * debian/hdparm.init: pretty initscript + + -- Nathaniel McCallum Fri, 3 Sep 2004 10:46:32 -0400 + +hdparm (5.5-4ubuntu1) warty; urgency=low + + * Create a udeb so that we can tune disk (especially CD-ROM) parameters in + d-i. + + -- Colin Watson Mon, 16 Aug 2004 00:21:30 +0100 + +hdparm (5.5-4) unstable; urgency=low + + * Patch from "Mario 'BitKoenig' Holbe" for + better logic on checking RAID status. (closes: #249944) + + -- Stephen Gran Wed, 19 May 2004 20:22:47 -0400 + +hdparm (5.5-3) unstable; urgency=low + + * Add support for nohdparm boot option, to disable init script + I think this addresses the last of the problems with #247170, so I am + going to say (closes: #247170) + * Fix typo in hdparm.conf (closes: #248934) + + -- Stephen Gran Sun, 16 May 2004 14:24:45 -0400 + +hdparm (5.5-2) unstable; urgency=low + + * Merge in some manpage fixups, hopefully increasing clarity. + * The start link is run too early for people who need modules for their + controller loaded in order to use DMA. Added a note to README.Debian + explaining what people can do in these circumstances, but leave the link + alone. It's safer for the start script to fail than to have silent data + corruption by running it too late by default. (closes: #233188) + + -- Stephen Gran Wed, 3 Mar 2004 15:16:08 -0500 + +hdparm (5.5-1) unstable; urgency=low + + * New upstream version (closes: #232613) + * Add warning about examples in conf file - some are for devfs, and some + are not. I thought this was clear enough, but I guess not. + (closes: #231641) + * Fix up typo in /etc/apm.d/20hdparm (closes: #231822) + + -- Stephen Gran Sat, 14 Feb 2004 00:18:07 -0500 + +hdparm (5.4-10) unstable; urgency=low + + * The "I'm actually putting the changes in this version" release. + * Bump up version dependency on debhelper to 4.1.17 for dh_installinit's + --no-start option. Thanks to Thomas Hood for noticing I forgot to + actually include this. (closes: #230496) + * Actually include the fixed manpage this time. (closes: #230331) + + -- Stephen Gran Sat, 31 Jan 2004 15:55:47 -0500 + +hdparm (5.4-9) unstable; urgency=low + + * Added support for -K and -k (keep settings over reset) - thanks Shaul Karl + for patches. (closes: #229022) + * Hopefully explained -M (acoustic management feature a little more clearly + in manpage, and added pointer to READM.acoustic (closes: #230331) + * Work a little smarter, instead of a little harder, thanks to Thomas + Hood. Let dh_installinit do The Right Thing, and use --no-start option, + so it doesn't add the invoke-rc.d lines in postinst and prerm. + + -- Stephen Gran Fri, 30 Jan 2004 13:29:54 -0500 + +hdparm (5.4-8) unstable; urgency=low + + * Added note to README.Debian to warn about the use of the init script with + MD arrays (thanks David Harris for bringing this to my attention). Added + pointer to README.Debian to hdparm.conf as well, reminding people to be + aware of known issues before enabling the initscript. + * Finally wrapped my head around invoke-rc.d a little better (thanks to all + those on debian-devel who helped me out here). Explicitly adding a K link + in all run levels will prevent invoke-rc.d from rerunning the script on + upgrade, where only having an S link in rcS.d apparently did not do the + expected. That should take care of that nagging detail that I thought had + actually been fixed in -7, and really deal with all the parts of #224961. + * Allow for setting APM functions (-B) in init script. (closes: #226124) + * Fix bug in /etc/apm/20hdparm that made script exit without doing anything, + since test $variable || exit 0 tested non-declared variable. + + -- Stephen Gran Fri, 30 Jan 2004 13:16:26 -0500 + +hdparm (5.4-7) unstable; urgency=low + + * Move running of /etc/init.d script earlier to avoid possible disk + corrution with 2.6 kernels. Also apply patch from Bruce Perens (thanks + Bruce) (closes: #224961) + + -- Stephen Gran Wed, 24 Dec 2003 08:37:20 -0500 + +hdparm (5.4-6) unstable; urgency=low + + * moved /etc/default/hdparm to /etc/hdparm.conf, because this is actually + policy compliant. It turns out (mea culpa) default/ files need to be + shell scripts, which this is not. Thanks for noticing this, joeyh. + (closes: #222133) + * Fixed manpage typo in section -M. Thanks, Adrian. (closes: #222557) + + -- Stephen Gran Fri, 5 Dec 2003 14:28:07 -0500 + +hdparm (5.4-5) unstable; urgency=low + + * Changed parsing of -c to accept multiple values instead of it being a + boolean option (closes: #219641) + * Make initscript parsing of /etc/default/ file more flexible - now allows + parsing of lines that contain whitespace in addition to a newline. Also + now has large note at top describing currently allowed syntax. + (closes: #219138) + + -- Stephen Gran Mon, 10 Nov 2003 23:10:01 -0500 + +hdparm (5.4-4) unstable; urgency=low + + * Add acoustic management support to /etc/init.d/hdparm script (and + /etc/default/hdparm) (closes: #217634) + + -- Stephen Gran Sun, 26 Oct 2003 10:44:06 -0500 + +hdparm (5.4-3) unstable; urgency=low + + * New maintainer (closes: #217098) + * Fix description of -A in manpage (closes: #212257) + * Build uses cdbs now, which supports building unstripped (closes: #190867) + * Change reference to boot time script to reflect actual file + (closes: #157919) + * /etc/apm/20hdparm now handles multiple drives (closes: #149558) + * /etc/init.d/hdparm and /etc/default/hdparm now included. + Many thanks to Shaul Karl and Joerg Sommer + for suggestions and samples. + (closes: #87451, #169406, #175506, #198516) + + -- Stephen Gran Thu, 23 Oct 2003 14:00:37 -0400 + +hdparm (5.4-2) unstable; urgency=low + + * Added cdbs to Build-Depends. + + -- Christopher L Cheney Mon, 4 Aug 2003 23:00:00 -0500 + +hdparm (5.4-1) unstable; urgency=low + + * New upstream release. + * Move contrib scripts. (Closes: #122644) + * Suggest apmd. (Closes: #137434) + * Include upstream documentation. (Closes: #155171) + * Bumped debhelper version. (Closes: #190866) + + -- Christopher L Cheney Mon, 4 Aug 2003 22:00:00 -0500 + +hdparm (5.3-0.1) unstable; urgency=low + + * NMU with permission of maintainer. + * New upstream release. (closes: #135708) + * This should build on s390/hppa/ia64 again (closes: #155725, #185704) + + -- Andrew Suffield Wed, 9 Apr 2003 21:40:35 +0100 + +hdparm (5.2-1) unstable; urgency=low + + * New upstream. + + -- Christopher L Cheney Wed, 31 Jul 2002 14:35:00 -0500 + +hdparm (4.5-1.2) unstable; urgency=low + + * NMU + * Change "Conflicts: apmd" to "Replaces: apmd", to comply with section + 7.5 of policy. This should eliminate upgrade problems. + + -- Chris Hanson Thu, 14 Mar 2002 00:26:38 -0500 + +hdparm (4.5-1.1) unstable; urgency=low + + * NMU with permission of maintainer. + * Move "/etc/apm/event.d/20hdparm" from the apmd package to the hdparm + package. + + -- Chris Hanson Thu, 7 Mar 2002 23:06:39 -0500 + +hdparm (4.5-1) unstable; urgency=high + + * New Upstream. (Closes: #101531) + * New Maintainer. + * Included contrib scripts. (Closes: #92620) + + -- Christopher L Cheney Wed, 28 Nov 2001 14:10:00 -0600 + +hdparm (3.9a-1) unstable woody; urgency=low + + * New upstream version (patch). Closes #85351, #77979, #58265 + * Hack around compilation issues. Closes #80897, #84520 + * Back out manpage patch. Closes #67060 + * Add upstream changelog. Closes #80126 + * Change doc for -q. Closes #37594 + + -- Steve Dunham Wed, 14 Feb 2001 16:35:12 -0800 + +hdparm (3.9-1) unstable; urgency=low + + * New upstream version + + -- Steve Dunham Tue, 16 May 2000 08:30:32 -0700 + +hdparm (3.6-2) unstable; urgency=low + + * Patch to unregister interfaces for thinkpads + * Closes: #54715 + + -- Steve Dunham Tue, 25 Jan 2000 10:10:20 -0800 + +hdparm (3.6-1) unstable; urgency=low + + * New upstream version + * Fix problem with no media on CDs + * Add comment about -q option + * Closes: #30866, #39511 + + -- Steve Dunham Fri, 29 Oct 1999 23:38:58 -0700 + +hdparm (3.5-1) unstable; urgency=low + + * New upstream version (#30010,#26368) + + -- Steve Dunham Fri, 27 Nov 1998 11:49:03 -0500 + +hdparm (3.3-3) unstable; urgency=low + + * Switch to debhelper (#17219) + + -- Steve Dunham Fri, 14 Aug 1998 00:15:38 -0400 + +hdparm (3.3-2) unstable; urgency=low + + * Fixed problem with automake + + -- Steve Dunham Mon, 21 Jul 1997 18:31:41 -0400 + +hdparm (3.3-1) unstable; urgency=low + + * New upstream version - upstream changes: + - add -C, -y, and -Y flags for IDE power management + - force BLKFLSBUF after -T or -t -- kmg@barco.com + - fix minor -T/-t mixup in manpage -- hankedr@mail.auburn.edu + + + -- Steve Dunham Sun, 8 Jun 1997 13:18:10 -0400 + +hdparm (3.1-2) unstable; urgency=low + + * Fixed Architecture: field + + * Upgrade to 3.1. Change to "Package format of the month"(TM) + + -- Steve Dunham Thu, 10 Oct 1996 19:51:22 -0800 --- hdparm-9.15.orig/debian/rules +++ hdparm-9.15/debian/rules @@ -17,12 +17,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. -DEB_DH_INSTALLINIT_ARGS := '--no-start' +DEB_DH_INSTALLINIT_ARGS := --no-start --noscripts --onlyscripts +DEB_DH_INSTALLUDEV_ARGS := --priority=85 #DEB_DH_LINK_ARGS := ../init.d/hdparm /etc/rcS.d/S07hdparm.first -DEB_UPDATE_RCD_PARAMS := 'start 07 S . ' DEB_FIXPERMS_EXCLUDE:= 20hdparm -include /usr/share/cdbs/1/rules/dpatch.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/makefile.mk @@ -30,5 +29,7 @@ common-install-prehook-arch:: install -d $(CURDIR)/debian/tmp/sbin +common-binary-post-install-arch:: + install -m 755 $(CURDIR)/debian/hdparm.udev-script $(CURDIR)/debian/hdparm/lib/udev/hdparm binary-predeb/hdparm:: chmod 755 $(CURDIR)/debian/hdparm/etc/apm/event.d/20hdparm --- hdparm-9.15.orig/debian/hdparm.udev +++ hdparm-9.15/debian/hdparm.udev @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", \ + RUN+="/lib/udev/hdparm" --- hdparm-9.15.orig/debian/hdparm.install +++ hdparm-9.15/debian/hdparm.install @@ -1,8 +1,12 @@ debian/20hdparm etc/apm/event.d/ debian/tmp/sbin/hdparm +contrib/fix_standby.c usr/share/doc/hdparm/contrib +contrib/idectl usr/share/doc/hdparm/contrib +contrib/README usr/share/doc/hdparm/contrib +contrib/ultrabayd usr/share/doc/hdparm/contrib +debian/hdparm.conf etc/ contrib/fix_standby.c usr/share/doc/hdparm/contrib contrib/idectl usr/share/doc/hdparm/contrib contrib/README usr/share/doc/hdparm/contrib contrib/ultrabayd usr/share/doc/hdparm/contrib debian/hdparm.conf etc/ -debian/hdparm.rules etc/udev/ --- hdparm-9.15.orig/debian/hdparm.postrm +++ hdparm-9.15/debian/hdparm.postrm @@ -1,4 +1,5 @@ #!/bin/sh +set -e case "$1" in purge)