casper-md5check should leave a breadcrumb which apport, ubiquity, subiquity could use

Bug #1870408 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
Undecided
Unassigned
apport (Ubuntu)
High
Brian Murray
casper (Ubuntu)
Undecided
Unassigned
ubiquity (Ubuntu)
Undecided
Unassigned

Bug Description

casper-md5check should leave a breadcrumb which apport & ubiquity can pick up. (subiquity too)

There will be a file called:

/run/casper-md5check.json

If it does not exist, or is empty the check did not run enough to validate anything. Treat as skip.

If it has content it will have:
{
   "checksum_missmatch" : [
      "./pics/red-upperleft.png",
      "./pics/red-lowerleft.png"
   ],
   "result" : "fail"
}

optional checksum_missmatch key, which will have a list of strings that are files that failed md5sum.

result key, which can have string values "pass" "fail" "skip".

One can use python's json or yaml safe_load to parse the file into a dictionary.

description: updated
summary: - casper-md5check should leave a breadcrumb
+ casper-md5check should leave a breadcrumb which apport, ubiquity,
+ subiquity could use
description: updated
Changed in casper (Ubuntu):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote :

Have three different files to check seems like a bit excessive. Could the filename be casper-m5check.result with the contents in the file e.g. "skipped"?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Updated implementation.

description: updated
description: updated
Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

I think the logic to parse the json file and write the report keys should exist in hookutils.py that way it is usable by the general "ubuntu.py" hook and the ubiquity and subiquity hooks.

It'd be good if this file existed on an installed system. Will it be copied from the live system to the installed one?

Changed in subiquity:
status: New → Fix Committed
Changed in apport (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu26

---------------
apport (2.20.11-0ubuntu26) focal; urgency=medium

  * apport/hookutils.py, data/general-hooks/ubuntu.py: Add in a hook which
    will add the results of the casper-md5check to all bug reports.
    (LP: #1870408)

 -- Brian Murray <email address hidden> Wed, 08 Apr 2020 15:46:56 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
tags: added: id-5e876fef4565976edcab3a7c
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

(was fixed in subiquity for release)

Changed in subiquity:
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I'm closing the ubiquity task here in favor of https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1874714.

Changed in ubiquity (Ubuntu):
status: New → Invalid
Changed in casper (Ubuntu):
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers