Package: apt-dater
Version: 0.9.0-8
Severity: normal
Tags: patch
apt-dater-host tries to find out in do_kernel() whether the running kernel is
(a) Debian's or custom, and
(b) current or obsoleted by a newer installed version.
Both checks no longer work correctly after I updated my servers to jessie, due
to slight
changes in its linux-image-* packages.
The effect is that every machine is detected as running a custom kernel.
This patch solves problem (a)
--- /usr/bin/apt-dater-host~
+++ /usr/bin/apt-dater-host
@@ -368,7 +368,7 @@
else {
my $vstr = `cat $verfile`;
unless($vstr =~ /^\S+ \S+ \S+ \(Debian ([^\)]+)\)/ ||
- $vstr =~ /^\S+ \S+ \S+ \(debian-kernel\@lists\.debian\.org\) .+
Debian (\S+)$/) {
+ $vstr =~ /^\S+ \S+ \S+ \(debian-kernel\@lists\.debian\.org\) .+
Debian (\S+)(?: \(\d{4}-\d\d-\d\d\))?$/) {
print "$infostr 2 $version\n";
return;
}
But then I ran into problem (b) which I solved like this:
--- /usr/bin/apt-dater-host~
+++ /usr/bin/apt-dater-host
@@ -376,12 +376,12 @@
}
my $reboot = 0;
- unless(open(HDPKG, "dpkg-query -W -f='\${Version} \${Status;20}
\${Maintainer} \${Provides}\n' 'linux-image*'|grep -E 'install ok installed
(Debian|Ubuntu) Kernel Team'|grep linux-image|")) {
+ unless(open(HDPKG, "dpkg-query -W -f='\${Version} \${Status;20}
\${Maintainer} \${Provides}\n' 'linux-image*'|")) {
print "$infostr 9 $version\n";
return;
}
while(<HDPKG>) {
- next unless (/^(\S+)\s/);
+ next unless (/^(\S+) install ok installed (?:Debian|Ubuntu) Kernel Team
<.*?> (?:linux-image|linux-modules-)/);
$reboot=1 unless (system("dpkg", "--compare-versions", $vers, "lt", $1)
>> 8);
}
Please consider fixing this bug in an update to jessie!
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]