Your message dated Mon, 22 Mar 2021 23:01:08 +0000
with message-id <[email protected]>
and subject line unblock kpmcore
has caused the Debian Bug report #985746,
regarding unblock: kpmcore/20.12.3-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
985746: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985746
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock
X-Debbugs-Cc: Debian Qt/KDE Maintainers <[email protected]>

Please unblock package kpmcore

[ Reason ]
It contains the backport of an upstream fix for not being able to
display S.M.A.R.T. information in KDE Partition Manager for some disk
states.

[ Impact ]
Users can’t display S.M.A.R.T. information from Partition Manager for
disks having some kind of issues.

[ Tests ]
No failing disk at hand, but I did test that displaying S.M.A.R.T.
information for valid disks still works.

[ Risks ]
Oneliner, coming from upstream, risk is low.

[ 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 testing

unblock kpmcore/20.12.3-2
diff -Nru kpmcore-20.12.3/debian/changelog kpmcore-20.12.3/debian/changelog
--- kpmcore-20.12.3/debian/changelog    2021-03-08 23:23:00.000000000 +0100
+++ kpmcore-20.12.3/debian/changelog    2021-03-22 11:36:09.000000000 +0100
@@ -1,3 +1,10 @@
+kpmcore (20.12.3-2) unstable; urgency=medium
+
+  * Backport upstream fix so that S.M.A.R.T. information display always works
+    whatever the disk state.
+
+ -- Aurélien COUDERC <[email protected]>  Mon, 22 Mar 2021 11:36:09 +0100
+
 kpmcore (20.12.3-1) unstable; urgency=medium
 
   * New upstream release (20.12.3).
diff -Nru kpmcore-20.12.3/debian/patches/series 
kpmcore-20.12.3/debian/patches/series
--- kpmcore-20.12.3/debian/patches/series       1970-01-01 01:00:00.000000000 
+0100
+++ kpmcore-20.12.3/debian/patches/series       2021-03-22 11:14:09.000000000 
+0100
@@ -0,0 +1 @@
+upstream_2ea9ff49_fix_smartctl_exit_status_success_check.patch
diff -Nru 
kpmcore-20.12.3/debian/patches/upstream_2ea9ff49_fix_smartctl_exit_status_success_check.patch
 
kpmcore-20.12.3/debian/patches/upstream_2ea9ff49_fix_smartctl_exit_status_success_check.patch
--- 
kpmcore-20.12.3/debian/patches/upstream_2ea9ff49_fix_smartctl_exit_status_success_check.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
kpmcore-20.12.3/debian/patches/upstream_2ea9ff49_fix_smartctl_exit_status_success_check.patch
       2021-03-22 11:24:15.000000000 +0100
@@ -0,0 +1,52 @@
+Origin: upstream, 
https://invent.kde.org/system/kpmcore/commit/2ea9ff49124750ece175cb1f27a1492fc50287a3
+From: Yaroslav Sidlovsky <[email protected]>
+Date: Wed, 17 Mar 2021 15:37:30 +0300
+Subject: [PATCH] Fix smartctl exit status success check
+ According to the smartctl man page:
+ ```
+ EXIT STATUS
+ The  exit  statuses of smartctl are defined by a bitmask.  If all is well 
with the disk, the exit status (return value) of smartctl is 0 (all bits turned 
off).  If a problem occurs, or an error, potential error, or fault is detected, 
then a non-zero status is
+ returned.  In this case, the eight different bits in the exit status have the 
following meanings for ATA disks; some of these values may also be returned for 
SCSI disks.
+ .
+ Bit 0: Command line did not parse.
+ .
+ Bit 1: Device open failed, device did not return an IDENTIFY DEVICE 
structure, or device is in a low-power mode (see '-n' option above).
+ .
+ Bit 2: Some SMART or other ATA command to the disk failed, or there was a 
checksum error in a SMART data structure (see '-b' option above).
+ .
+ Bit 3: SMART status check returned "DISK FAILING".
+ .
+ Bit 4: We found prefail Attributes <= threshold.
+ .
+ Bit 5: SMART status check returned "DISK OK" but we found that some (usage or 
prefail) Attributes have been <= threshold at some time in the past.
+ .
+ Bit 6: The device error log contains records of errors.
+ .
+ Bit 7: The device self-test log contains records of errors.  [ATA only] 
Failed self-tests outdated by a newer successful extended self-test are ignored.
+ ```
+ .
+ BUG: 429028
+---
+ src/core/smartparser.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/smartparser.cpp b/src/core/smartparser.cpp
+index 80c73f1..9170a0f 100644
+--- a/src/core/smartparser.cpp
++++ b/src/core/smartparser.cpp
+@@ -117,7 +117,11 @@ void SmartParser::loadSmartOutput()
+     if (m_SmartOutput.isEmpty()) {
+         ExternalCommand smartctl(QStringLiteral("smartctl"), { 
QStringLiteral("--all"), QStringLiteral("--json"), devicePath() });
+ 
+-        if (smartctl.run() && smartctl.exitCode() == 0) {
++        // Exit status of smartctl is a bitfield, check that bits 0 and 1 are 
not set:
++        //  - bit 0: command line did not parse;
++        //  - bit 1: device open failed.
++        // See `man 8 smartctl` for more details.
++        if (smartctl.run() && (smartctl.exitCode() & 1) == 0 && 
(smartctl.exitCode() & 2) == 0) {
+             QByteArray output = smartctl.rawOutput();
+ 
+             m_SmartOutput = QJsonDocument::fromJson(output);
+-- 
+GitLab
+

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply via email to