On 10/08/2014 03:50 PM, Christian Boltz wrote:
Hello,
Am Dienstag, 7. Oktober 2014 schrieb alanbortu:
When I try to scan the profile that is generated for firefox, apparmor crashes. I have filed a bug with the exact error here: http://bugzilla.opensuse.org/show_bug.cgi?id=900163
As far as I can tell it should work fine as I followed the instruction on active doc but clearly there is something wrong. If someone could take a look at it/help me figure out what is wrong it would be much appreciated.
Ah, charset "fun" with python3...
Your /var/log/messages contains lines that aren't valid utf8, and python3 by default expects everything to be utf8. (For comparison: python2 doesn't do charset magic and "just works"[tm].)
Please apply the following patch to /usr/lib/python3.4/site-packages/apparmor/logparser.py
=== modified file 'utils/apparmor/logparser.py' --- utils/apparmor/logparser.py 2014-08-20 22:55:44 +0000 +++ utils/apparmor/logparser.py 2014-09-22 23:11:23 +0000 @@ -330,7 +330,7 @@ #event_type = None try: #print(self.filename) - self.LOG = open_file_read(self.filename) + self.LOG = open(self.filename, 'r', errors='surrogateescape') except IOError: raise AppArmorException('Can not read AppArmor logfile: ' + self.filename) #LOG = open_file_read(log_open)
This is probably not the final patch (it breaks compability with python2, which we keep upstream), but it should work ;-)
I'll update the bugreport when the official/upstream patch is ready.
Regards,
Christian Boltz
Thank you for the reply and explanation , how do I apply this patch? I am just a silly end user :) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org