Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian....@packages.debian.org
Usertags: pu

[ Reason ]
needrestart on stable reports a uninitialized perl warning on some amd64
systems when using option "-b"

[ Tests ]
Verified on my own Ryzen notebook: stable not working and patch approved

[ Checklist ]
  [x ] *all* changes are documented in the d/changelog
  [x ] I reviewed all changes and I approve them
  [x ] attach debdiff against the package in (old)stable
  [x ] the issue is verified as fixed in unstable


debdiff against current stable version:


diff -Naur tags/3.5-4+deb11u2/debian/changelog 
branches/bullseye/debian/changelog
--- tags/3.5-4+deb11u2/debian/changelog 2022-05-29 09:57:10.173934775 +0200
+++ branches/bullseye/debian/changelog  2023-01-18 16:18:34.571042767 +0100
@@ -1,3 +1,11 @@
+needrestart (3.5-4+deb11u3) bullseye; urgency=medium
+
+  * Add patch 10-amd-reporting from George Robbert to fix a Perl warning on
+    AMD64 systems.
+    Closes: #1026927
+
+ -- Patrick Matthäi <pmatth...@debian.org>  Wed, 18 Jan 2023 16:18:28 +0100
+
 needrestart (3.5-4+deb11u2) bullseye; urgency=medium

   * Add upstream patch 09-cgroupv2 to fix broken detection with cgroupv2.
diff -Naur tags/3.5-4+deb11u2/debian/patches/10-amd-reporting.diff 
branches/bullseye/debian/patches/10-amd-reporting.diff
--- tags/3.5-4+deb11u2/debian/patches/10-amd-reporting.diff     1970-01-01 
01:00:00.000000000 +0100
+++ branches/bullseye/debian/patches/10-amd-reporting.diff      2023-01-18 
15:56:59.058848074 +0100
@@ -0,0 +1,22 @@
+# Fix Perl warning with needrestart -b on AMD64 systems.
+# Closes: #1026927
+
+diff -Naur needrestart-3.5.orig/perl/lib/NeedRestart/uCode/AMD.pm 
needrestart-3.5/perl/lib/NeedRestart/uCode/AMD.pm
+--- needrestart-3.5.orig/perl/lib/NeedRestart/uCode/AMD.pm     2020-03-22 
17:40:19.000000000 +0100
++++ needrestart-3.5/perl/lib/NeedRestart/uCode/AMD.pm  2023-01-18 
15:53:14.522822806 +0100
+@@ -173,13 +173,13 @@
+         _scan_ucodes();
+     }
+
+-    my %vars = ( CURRENT => sprintf( "0x%08x", $ucode ), );
++    my %vars = ( CURRENT => sprintf( "0x%08x", $ucode ), AVAIL => 
"unavailable");
+
+     # check for microcode updates
+     if ( exists( $_ucodes->{cpuid}->{$cpuid} ) ) {
+         my $prid = $_ucodes->{cpuid}->{$cpuid};
+         if ( exists( $_ucodes->{prid}->{$prid} ) ) {
+-            $vars{AVAIL} = sprintf( "0x%08x", $_ucodes->{prid}->{$prid} ),
++            $vars{AVAIL} = sprintf( "0x%08x", $_ucodes->{prid}->{$prid} );
+
+               print STDERR "$LOGPREF #$info->{processor} found ucode 
$vars{AVAIL}\n" if ($debug);
+             if ( $_ucodes->{prid}->{$prid} > $ucode ) {
diff -Naur tags/3.5-4+deb11u2/debian/patches/series 
branches/bullseye/debian/patches/series
--- tags/3.5-4+deb11u2/debian/patches/series    2022-05-29 09:57:10.233934382 
+0200
+++ branches/bullseye/debian/patches/series     2023-01-18 15:56:00.978841509 
+0100
@@ -7,3 +7,4 @@
 07-runit.diff
 08-anchor-interp-re.diff
 09-cgroupv2.diff
+10-amd-reporting.diff

Reply via email to