Bug 1315360 - [abrt] bodhi-client: ConfigParser.py:546:_read:ParsingError: File contains parsing errors: bodhi.template
Summary: [abrt] bodhi-client: ConfigParser.py:546:_read:ParsingError: File contains pa...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bodhi
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Randy Barlow
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:070692ade5f212db0ab05441cd9...
: 1439642 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-07 14:42 UTC by Vít Ondruch
Modified: 2017-07-01 18:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-01 18:54:59 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (1.76 KB, text/plain)
2016-03-07 14:42 UTC, Vít Ondruch
no flags Details
File: dso_list (66 bytes, text/plain)
2016-03-07 14:42 UTC, Vít Ondruch
no flags Details
File: environ (2.91 KB, text/plain)
2016-03-07 14:42 UTC, Vít Ondruch
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-infra bodhi issues 1415 0 None None None 2017-07-01 18:54:59 UTC

Description Vít Ondruch 2016-03-07 14:42:50 UTC
Version-Release number of selected component:
bodhi-client-0.9.12.2-4.fc24

Additional info:
reporter:       libreport-2.6.4
cmdline:        /usr/bin/python2 -tt /usr/bin/bodhi --new --release f23 --file bodhi.template rubygem-actionview-4.2.3-4.fc23 --username vondruch
executable:     /usr/bin/bodhi
kernel:         4.4.0-1.fc24.x86_64
runlevel:       N 5
type:           Python
uid:            16025

Truncated backtrace:
ConfigParser.py:546:_read:ParsingError: File contains parsing errors: bodhi.template
	[line 18]: '- Fix rails-html-sanitizer v1.0.3 compatiblity.\n'
	[line 19]: '- Fix code injection vulnerability (CVE-2016-2098).\n'

Traceback (most recent call last):
  File "/usr/bin/bodhi", line 537, in <module>
    main()
  File "/usr/bin/bodhi", line 209, in main
    updates = bodhi.parse_file(input_file=opts.input_file)
  File "/usr/lib/python2.7/site-packages/fedora/client/bodhi.py", line 339, in parse_file
    read = config.read(input_file)
  File "/usr/lib64/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib64/python2.7/ConfigParser.py", line 546, in _read
    raise e
ParsingError: File contains parsing errors: bodhi.template
	[line 18]: '- Fix rails-html-sanitizer v1.0.3 compatiblity.\n'
	[line 19]: '- Fix code injection vulnerability (CVE-2016-2098).\n'

Local variables in innermost frame:
sectname: ' rubygem-actionview-4.2.3-4.fc23, rubygem-actionpack-4.2.3-5.fc23 '
cursect: OrderedDict([('__name__', ' rubygem-actionview-4.2.3-4.fc23, rubygem-actionpack-4.2.3-5.fc23 '), ('type', ['security']), ('request', ['testing']), ('bugs', ['1310054,1313387']), ('notes', ['']), ('autokarma', ['True']), ('stable_karma', ['3']), ('unstable_karma', ['-3']), ('close_bugs', ['True']), ('suggest_reboot', ['False'])])
e: File contains parsing errors: bodhi.template
	[line 18]: '- Fix rails-html-sanitizer v1.0.3 compatiblity.\n'
	[line 19]: '- Fix code injection vulnerability (CVE-2016-2098).\n'
fpname: 'bodhi.template'
vi: '='
mo: <_sre.SRE_Match object at 0x7efd29153dd8>
optname: 'suggest_reboot'
fp: <open file 'bodhi.template', mode 'r' at 0x7efd29119420>
lineno: 30
line: ''
self: <ConfigParser.SafeConfigParser instance at 0x7efd290b65a8>
optval: 'False'

Comment 1 Vít Ondruch 2016-03-07 14:42:54 UTC
Created attachment 1133802 [details]
File: backtrace

Comment 2 Vít Ondruch 2016-03-07 14:42:56 UTC
Created attachment 1133803 [details]
File: dso_list

Comment 3 Vít Ondruch 2016-03-07 14:42:57 UTC
Created attachment 1133804 [details]
File: environ

Comment 4 Jan Kurik 2016-07-26 04:35:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 5 Randy Barlow 2016-10-18 04:57:01 UTC
Hello!

I have recently become the primary caretaker of Bodhi and I've inherited a number of issues related to bodhi 0.9. I wanted to be forthcoming with you that it will be difficult for me to fix issues with bodhi 0.9 while also pressing forward with bodhi 2, especially since I do not have any familiarity with the bodhi 0.9 codebase. I'm happy to keep this bug open to track the problem, but I would also encourage you to please test the bodhi 2 client (currently available in Rawhide and Copr[0]). Unfortunately, the bodhi 2 client is not backwards compatible with bodhi 0.9, so at this time I only plan for bodhi 2 to be released with Fedora 26 and EPEL 7 (with special permission from the EPEL SC).

Here are some options you could pursue for this issue:

0) Write a patch for me that can be applied with the spec file. If you are willing to take the time to learn the bodhi 0.9 code, write a patch, and test it, I am willing to accept patches to be applied during build.
1) Use Rawhide.
2) Install bodhi 2 from my Copr[0].

I apologize as I understand that this is probably disappointing news for you to hear, but I thought it would be better to be forthcoming than to let the bug languish. I appreciate your understanding!


[0] https://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi/

Comment 6 Vít Ondruch 2016-10-18 11:01:35 UTC
Actually this is hard to test for me, since I cannot delete the update once it is in Bodhi. But the main struggle was that using "fedpkg update", it was not obvious how to format multiline "notes". I think they actually might go bettween tripple quotes? But I am not sure and this was the result.

Actually I tried the "fedpkg update" with recent bodhi-client:

$ rpm -q bodhi-client
bodhi-client-2.2.4-1.fc26.noarch

And it might handle the "notes" better, but this would definitely deserve some improvement (may be on fedpkg side, if the template is coming from fedpkg? not really sure).

Comment 7 Randy Barlow 2016-10-18 16:08:24 UTC
Hello Vit!

I think the template is processed by the python-fedora project:

https://github.com/fedora-infra/python-fedora/blob/225b3db14f9387362ae46a350af06383c8025b94/fedora/client/bodhi.py#L324-L366

I would suggest filing an issue (or pull request ☺) there if you have suggestions on how to improve the notes handling.

Comment 8 Vít Ondruch 2017-04-06 11:11:55 UTC
*** Bug 1439642 has been marked as a duplicate of this bug. ***

Comment 9 Randy Barlow 2017-04-06 18:29:50 UTC
Since my last comment, I have actually converted the Bodhi 2 client to stop using python-fedora and that code I cited now actually lives here:

https://github.com/fedora-infra/bodhi/blob/2.5.0/bodhi/client/bindings.py#L336

I've filed an issue upstream about this:

https://github.com/fedora-infra/bodhi/issues/1415

Comment 10 Randy Barlow 2017-07-01 18:54:59 UTC
Let's track this bug upstream. Thanks for reporting!


Note You need to log in before you can comment on or make changes to this bug.