Bug 35861 - Package status check
Package status check
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 4.0
Other Linux
: P5 enhancement (vote)
: UCS 4.0-0-errata
Assigned To: Florian Best
Alexander Kramer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-10 08:28 CEST by Stefan Gohmann
Modified: 2015-02-04 15:55 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
dpkg --audit output (2.77 KB, text/plain)
2015-02-02 15:56 CET, Alexander Kramer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-09-10 08:28:45 CEST
We should add a system diagnostic plugin which checks the package status. If an error has been found, it should give some advise, for example:
 - Login via ssh as root
 - run the command 'dpkg --configure -a'
Comment 1 Florian Best univentionstaff 2015-01-08 12:51:29 CET
Package status check with "dpkg --audit" ?
Comment 2 Florian Best univentionstaff 2015-01-08 16:00:58 CET
Should it be a WARNING or CRITICAL, etc?
Comment 3 Florian Best univentionstaff 2015-01-30 12:07:49 CET
If dpkg --audit fails the following message is shown:

The package status is corrupt.
Login to the system as root via ssh and run the command "dpkg --configure -a" in order to correct the packages status.
More information about the cause can be gained by executing "dpkg --audit".

Der Paketstatus ist korrupt.
Um den Paketstatus zu korrigieren loggen Sie sich am System per ssh als root ein und führen Sie das Kommando \"dpkg --configure -a\" aus.
Weitere Informationen über die Ursache können durch Ausführen von \"dpkg --audit\" erhalten werden.

Fix: svn r57689
YAML: 2015-01-30-univention-management-console-module-diagnostic.yaml
Comment 4 Alexander Kramer univentionstaff 2015-02-02 15:56:23 CET
Created attachment 6639 [details]
dpkg --audit output

dpkg --audit always returns 0 see attachment

hint for qa:
to get an corrupted package install a package like this:
apt-get install foobar &
the installation will wait in the background and you'll get a pid.
put the process back to the foreground and kill it with kill -9 <pid>
Comment 5 Florian Best univentionstaff 2015-02-03 10:58:02 CET
Well, you are right ;)

I am parsing the output of dpkg --audit by hand now using LANG=C so that the string 'The following packages' indicates that something is wrong. The number of incorrect packages are also shown as the list of corrupt packages is printed with a leading space.
I didn't find any lib for this.
Comment 6 Alexander Kramer univentionstaff 2015-02-03 11:52:51 CET
OK - engl. and ger. advise is shown
OK - debian/changelog
OK - yaml file: I adapted the package-version
Comment 7 Janek Walkenhorst univentionstaff 2015-02-04 15:55:44 CET
<http://errata.univention.de/ucs/4.0/72.html>