Bug 1215182

Summary: Add yajl_reset_stack()
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: yajlAssignee: Daniel Berrangé <berrange>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, bjori, virt-maint
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/lloyd/yajl/issues/161
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-24 14:08:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1208101    
Attachments:
Description Flags
Proposed patch none

Description Petr Pisar 2015-04-24 13:52:45 UTC
Created attachment 1018502 [details]
Proposed patch

To package libbson into fedora (bug #1208101), I have to unbundle yajl and to stop to use yajl internals.

I moved the internals into public yajl_reset_stack() function and proposed it to yajl upstream <https://github.com/lloyd/yajl/issues/161>. The change is very small but my impression is yajl upstream is dead.

Please consider applying this patch into Fedora. If you don't object, I can do that myself.

Comment 1 Daniel Berrangé 2015-04-24 14:08:02 UTC
I don't think that Fedora maintainers should be in the business of changing or extending the public API/ABI of libraries unless the change in question is already accepted upstream. This essentially forks the library to have an API that is only available in Fedora which I think is very bad practice, as it causes ecosystem problems across the various distros where something works in one but fails in another even with the same versions.

You need to get an exception to keep the forked yajl code internal to libbson Fedora RPM until upstream yajl maintainer accepts the new proposed API or proposes an alternative approach.

Comment 2 Petr Pisar 2015-04-24 14:19:40 UTC
Provided yajl upstream had not commited any code change in last year despite yajl bug list increases including trivial memory leak patches, the bundling exception would be effectively indefinite. And FPC requires the exceptions to be temporary only.

If you don't change your mind, I will propose dropping MongoDB from Fedora.

Comment 3 Daniel Berrangé 2015-04-24 14:24:48 UTC
You only filed the yajl bug report upstream an hour ago - it is way too soon to write off possible acceptance upstream and fork the API in Fedora. As an alternative to this Fedora, it seems libbson could just allocate a new yajl_handle parser instance instead of trying to reset the original instance to its initial state.