Package: cpufrequtils Version: 002-7 Severity: important Tags: patch User: [EMAIL PROTECTED] Usertags: incorrect-updatercd-order
Hi, The current cpufrequtils package calls update-rc.d for its two provided initscripts, /etc/init.d/cpufrequtils and /etc/init.d/loadcpufreq, in a sequence that conflicts with the dependency information declared in their LSB headers, causing installation to fail on systems where insserv is active. $ sudo apt-get install cpufrequtils Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: cpufrequtils 0 upgraded, 1 newly installed, 0 to remove and 63 not upgraded. Need to get 0B/27.3kB of archives. After this operation, 147kB of additional disk space will be used. Preconfiguring packages ... Selecting previously deselected package cpufrequtils. (Reading database ... 200926 files and directories currently installed.) Unpacking cpufrequtils (from .../cpufrequtils_002-7_i386.deb) ... Setting up cpufrequtils (002-7) ... insserv: warning: script 'spamassassin' missing LSB tags and overrides insserv: Service loadcpufreq has to be enabled for service cpufrequtils insserv: exiting now! dpkg: error processing cpufrequtils (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: cpufrequtils E: Sub-process /usr/bin/dpkg returned an error code (1) Pere describes clearly[1] in his paper that initscripts are required to be "inserted in dependency order". Also, dependency order must be considered on removal. cpufrequtils decalres loadcpufreq as a Required-Start service. I have attached a patch to fix two issues: 1) ensure loadcpufreq is inserted before cpufrequtils on installation 2) ensure loadcpufreq is removed before cpufrequtils on removal To do this requires either to manually maintain the postinst and postrm scripts or update to debhelper compat level 6, which ensures the order of action for dh_* scripts is revered for removal. I chose the latter, which involved the additional change of not attempting to install non-existant files listed in debian/*.install. Updating to dh compat 6 also causes generation of prerm which only action is to call invoke-rc.d cpufrequtils stop, which is a no-op, so no functional change in that regard. Thanks, Kel. [1] http://www.hungry.com/~pere/mypapers/200802-bootsequence/200802-bootsequence.html --- diff -Nrup cpufrequtils-002/debian/compat cpufrequtils-002.insserv/debian/compat --- cpufrequtils-002/debian/compat 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/compat 2008-02-29 20:04:37.000000000 +1000 @@ -1 +1 @@ -4 +6 diff -Nrup cpufrequtils-002/debian/control cpufrequtils-002.insserv/debian/control --- cpufrequtils-002/debian/control 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/control 2008-02-29 20:04:50.000000000 +1000 @@ -2,7 +2,7 @@ Source: cpufrequtils Section: admin Priority: optional Maintainer: Mattia Dongili <[EMAIL PROTECTED]> -Build-Depends: debhelper (>= 4.0.0), libsysfs-dev (>= 1.0.0), libtool +Build-Depends: debhelper (>= 6), libsysfs-dev (>= 1.0.0), libtool Standards-Version: 3.7.3 Package: cpufrequtils diff -Nrup cpufrequtils-002/debian/cpufrequtils.install cpufrequtils-002.insserv/debian/cpufrequtils.install --- cpufrequtils-002/debian/cpufrequtils.install 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/cpufrequtils.install 2008-02-29 20:05:27.000000000 +1000 @@ -1,5 +1,3 @@ usr/bin/* usr/share/locale/* usr/share/man/man1/* -etc/default/* -etc/init.d/* diff -Nrup cpufrequtils-002/debian/cpufrequtils.postinst cpufrequtils-002.insserv/debian/cpufrequtils.postinst --- cpufrequtils-002/debian/cpufrequtils.postinst 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/cpufrequtils.postinst 2008-02-29 20:01:59.000000000 +1000 @@ -51,18 +51,6 @@ case "$1" in echo 'ENABLE="false"' > $deffile fi fi - - # setup startup links - # D-DEVEL didn't approve rcS.d/S37 (just after sysfs has been mounted) - # stay just before defaults to avoid overriding policy daemons - update-rc.d cpufrequtils start 19 2 3 4 5 . > /dev/null - - if [ -x /usr/sbin/invoke-rc.d ] ; then - invoke-rc.d cpufrequtils start - else - /etc/init.d/cpufrequtils start - fi - ;; diff -Nrup cpufrequtils-002/debian/cpufrequtils.postrm cpufrequtils-002.insserv/debian/cpufrequtils.postrm --- cpufrequtils-002/debian/cpufrequtils.postrm 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/cpufrequtils.postrm 2008-02-29 20:01:59.000000000 +1000 @@ -20,7 +20,7 @@ set -e case "$1" in purge) - update-rc.d -f cpufrequtils remove > /dev/null + ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff -Nrup cpufrequtils-002/debian/libcpufreq-dev.install cpufrequtils-002.insserv/debian/libcpufreq-dev.install --- cpufrequtils-002/debian/libcpufreq-dev.install 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/libcpufreq-dev.install 2008-02-29 20:05:49.000000000 +1000 @@ -2,4 +2,3 @@ usr/include/* usr/lib/lib*.a usr/lib/lib*.so usr/lib/*.la -usr/share/man/man3/* diff -Nrup cpufrequtils-002/debian/rules cpufrequtils-002.insserv/debian/rules --- cpufrequtils-002/debian/rules 2008-02-29 20:33:06.000000000 +1000 +++ cpufrequtils-002.insserv/debian/rules 2008-02-29 20:08:36.000000000 +1000 @@ -89,8 +89,8 @@ binary-arch: build install dh_installdocs dh_installexamples dh_installman - dh_installinit -n dh_installinit --name loadcpufreq -r --no-start -u"start 05 2 3 4 5 ." + dh_installinit -r -u"19 2 3 4 5 ." dh_installdebconf install -D -m644 debian/lintian.overrides \ debian/cpufrequtils/usr/share/lintian/overrides/cpufrequtils --- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

