diff -u preload-0.6.4/debian/preload.default preload-0.6.4/debian/preload.default --- preload-0.6.4/debian/preload.default +++ preload-0.6.4/debian/preload.default @@ -7,4 +7,5 @@ -PRELOAD_IOSCHED="--iosched idle" +#PRELOAD_IOSCHED="--iosched idle" # Enabling this should lead to lower disk activity. # OPTIONS="-l /dev/null" +OPTIONS="-i" diff -u preload-0.6.4/debian/rules preload-0.6.4/debian/rules --- preload-0.6.4/debian/rules +++ preload-0.6.4/debian/rules @@ -2,6 +2,7 @@ DEB_DH_INSTALLINIT_ARGS := -- defaults 95 5 +include /usr/share/cdbs/1/rules/patchsys-quilt.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/debhelper.mk diff -u preload-0.6.4/debian/changelog preload-0.6.4/debian/changelog --- preload-0.6.4/debian/changelog +++ preload-0.6.4/debian/changelog @@ -1,3 +1,23 @@ +preload (0.6.4-1ubuntu1) karmic; urgency=low + + * Merge with Debian unstable (LP: #299358), remaining changes: + + debian/patches/idle-io-schedule: + - Keep the old patch for setting idle IO scheduling, + rather than passing "--iosched" to start-stop-daemon in + the init script. Our version of dpkg is too old for this. + + debian/rules: + - Re-enable quilt patch system. + + debian/preload.default: + - Pass "-i" to preload to enable idle IO scheduling. + - Don't pass "--iosched" option to start-stop-daemon - it + will fail. + + debian/control: + - Build-depend on quilt. + * Note, these changes can be dropped when we get dpkg 1.15 + in Ubuntu. + + -- Chris Coulson Sun, 05 Jul 2009 20:04:30 +0100 + preload (0.6.4-1) unstable; urgency=low * New upstream release (Closes: #495549) diff -u preload-0.6.4/debian/control preload-0.6.4/debian/control --- preload-0.6.4/debian/control +++ preload-0.6.4/debian/control @@ -1,8 +1,9 @@ Source: preload Section: misc Priority: optional -Maintainer: Kari Pahula -Build-Depends: cdbs, debhelper (>= 6), libglib2.0-dev (>= 2.14), help2man +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Kari Pahula +Build-Depends: cdbs, debhelper (>= 6), libglib2.0-dev (>= 2.14), help2man, quilt Standards-Version: 3.8.2 Homepage: http://sourceforge.net/projects/preload only in patch2: unchanged: --- preload-0.6.4.orig/debian/patches/idle-io-schedule +++ preload-0.6.4/debian/patches/idle-io-schedule @@ -0,0 +1,69 @@ +Index: preload-0.6.4/src/cmdline.c +=================================================================== +--- preload-0.6.4.orig/src/cmdline.c 2008-10-23 02:08:21.000000000 +0100 ++++ preload-0.6.4/src/cmdline.c 2009-07-05 20:12:52.000000000 +0100 +@@ -25,6 +25,28 @@ + #include "preload.h" + + #include ++#include ++ ++static inline int ioprio_set(int which, int who, int ioprio) ++{ ++ return syscall(SYS_ioprio_set, which, who, ioprio); ++} ++ ++enum { ++ IOPRIO_CLASS_NONE, ++ IOPRIO_CLASS_RT, ++ IOPRIO_CLASS_BE, ++ IOPRIO_CLASS_IDLE, ++}; ++ ++enum { ++ IOPRIO_WHO_PROCESS = 1, ++ IOPRIO_WHO_PGRP, ++ IOPRIO_WHO_USER, ++}; ++ ++#define IOPRIO_CLASS_SHIFT 13 ++ + + #define DEFAULT_LOGLEVEL_STRING STRINGIZE(DEFAULT_LOGLEVEL) + #define DEFAULT_NICELEVEL_STRING STRINGIZE(DEFAULT_NICELEVEL) +@@ -41,6 +63,7 @@ + {"nice", 1, 0, 'n'}, + {"verbose", 1, 0, 'V'}, + {"debug", 0, 0, 'd'}, ++ {"ionice", 0, 0, 'i'}, + {NULL, 0, 0, 0}, + }; + +@@ -55,6 +78,7 @@ + "Nice level.", /* nice */ + "Set the verbosity level. Levels 0 to 10 are recognized.", /* verbose */ + "Debug mode: --logfile '' --foreground --verbose 9", /* debug */ ++ "Run using the idle IO priority class.", + }; + static const char const *opts_default[] = { + NULL, /* help */ +@@ -80,7 +104,7 @@ + for (;;) + { + int i; +- i = getopt_long (*argc, *argv, "hHvc:s:l:fn:V:d", opts, NULL); ++ i = getopt_long (*argc, *argv, "hHvc:s:l:fn:V:di", opts, NULL); + if (i == -1) + { + break; +@@ -110,6 +134,10 @@ + foreground = 1; + preload_log_level = 9; + break; ++ case 'i': ++ ioprio_set (IOPRIO_WHO_PROCESS, getpid (), ++ IOPRIO_CLASS_IDLE << IOPRIO_CLASS_SHIFT); ++ break; + case 'v': + version_func (); + case 'H': only in patch2: unchanged: --- preload-0.6.4.orig/debian/patches/series +++ preload-0.6.4/debian/patches/series @@ -0,0 +1 @@ +idle-io-schedule