diff -u hdparm-8.6/debian/hdparm.install hdparm-8.6/debian/hdparm.install --- hdparm-8.6/debian/hdparm.install +++ hdparm-8.6/debian/hdparm.install @@ -8 +7,0 @@ -debian/hdparm.rules etc/udev/ diff -u hdparm-8.6/debian/control hdparm-8.6/debian/control --- hdparm-8.6/debian/control +++ hdparm-8.6/debian/control @@ -1,13 +1,14 @@ Source: hdparm Section: admin Priority: optional -Maintainer: Stephen Gran +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Stephen Gran Build-Depends: cdbs (>> 0.4.37), debhelper (>= 5.0), dpatch, dpkg-dev (>= 1.13.19) Standards-Version: 3.7.3 Package: hdparm Architecture: any -Depends: ${shlibs:Depends}, lsb-base +Depends: ${shlibs:Depends} Suggests: apmd Replaces: apmd (<= 3.0.2-1.15) Description: tune hard disk parameters for high performance diff -u hdparm-8.6/debian/changelog hdparm-8.6/debian/changelog --- hdparm-8.6/debian/changelog +++ hdparm-8.6/debian/changelog @@ -1,3 +1,17 @@ +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 @@ -13,6 +27,14 @@ -- 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 @@ -26,6 +48,14 @@ -- 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 @@ -40,6 +70,14 @@ -- 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 @@ -62,6 +100,22 @@ -- 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 @@ -113,6 +167,29 @@ -- 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 @@ -124,6 +201,14 @@ -- 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) @@ -153,6 +238,96 @@ -- 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) @@ -205,6 +380,12 @@ -- 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 @@ -245,6 +426,32 @@ -- 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 @@ -254,6 +461,12 @@ -- 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 @@ -297,6 +510,25 @@ -- 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 @@ -548,0 +781 @@ + diff -u hdparm-8.6/debian/hdparm.postinst hdparm-8.6/debian/hdparm.postinst --- hdparm-8.6/debian/hdparm.postinst +++ hdparm-8.6/debian/hdparm.postinst @@ -1,7 +1,11 @@ #!/bin/sh -if [ -z "$2" ] || dpkg --compare-versions "$2" lt 6.1-6 ; then - ln -s ../hdparm.rules /etc/udev/rules.d/z60_hdparm.rules +# Clean up cdbs damage +rm -f /etc/udev/rules.d/50-hdparm.rules + + +if dpkg --compare-versions "$2" lt "8.6-1ubuntu1"; then + update-rc.d -f hdparm remove fi #DEBHELPER# diff -u hdparm-8.6/debian/rules hdparm-8.6/debian/rules --- hdparm-8.6/debian/rules +++ hdparm-8.6/debian/rules @@ -17,9 +17,8 @@ # 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_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 @@ -31,4 +30,7 @@ common-install-prehook-arch:: install -d $(CURDIR)/debian/tmp/sbin +common-binary-post-install-arch:: + install -m 644 $(CURDIR)/debian/hdparm.rules $(CURDIR)/debian/hdparm/etc/udev/rules.d/85-hdparm.rules + 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 diff -u hdparm-8.6/debian/hdparm.preinst hdparm-8.6/debian/hdparm.preinst --- hdparm-8.6/debian/hdparm.preinst +++ hdparm-8.6/debian/hdparm.preinst @@ -19,9 +19,14 @@ } if [ "$1" = install ] || [ "$1" = upgrade ]; then + if dpkg --compare-versions "$2" le 8.6-1ubuntu1; then + rm_conffile /etc/init.d/hdparm + update-rc.d -f hdparm remove >/dev/null 2>&1 + fi + if dpkg --compare-versions "$2" le 6.1-6; then if dpkg --compare-versions "$2" gt 6.1-2; then - for conffile in /etc/init.d/hdparm.dev /etc/dev.d/block//hdparm.block /etc/dev.d/block/hdparm.dev; do + for conffile in /etc/init.d/hdparm.dev /etc/default/hdparm /etc/dev.d/block/hdparm.block /etc/dev.d/block/hdparm.dev; do [ ! -e "$conffile" ] || rm_conffile "$conffile" done elif dpkg --compare-versions "$2" lt 5.5-5; then diff -u hdparm-8.6/debian/hdparm.rules hdparm-8.6/debian/hdparm.rules --- hdparm-8.6/debian/hdparm.rules +++ hdparm-8.6/debian/hdparm.rules @@ -1,2 +1,2 @@ -ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/etc/init.d/hdparm hotplug" - +ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", \ + RUN+="/lib/udev/hdparm" diff -u hdparm-8.6/debian/hdparm.dirs hdparm-8.6/debian/hdparm.dirs --- hdparm-8.6/debian/hdparm.dirs +++ hdparm-8.6/debian/hdparm.dirs @@ -1,0 +2 @@ +lib/udev only in patch2: unchanged: --- hdparm-8.6.orig/debian/hdparm.udev-script +++ hdparm-8.6/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