Issue Details (XML | Word | Printable)

Key: LMB-34
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Andy Hawkins
Reporter: Bastien Nocera
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
libmusicbrainz

libmusicbrainz 4 and 5 license problem

Created: 22/Nov/12 07:14 AM   Updated: 02/Aug/14 06:22 PM
Component/s: None
Affects Version/s: 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 5.0.0, 5.0.1, 5.0.2
Fix Version/s: None

File Attachments: 1. Text File 0001-xmlparsing.patch (174 kB) 10/Dec/12 01:01 PM - Christophe Fergeau
2. Text File 0002-Make-sure-xmlError-structs-are-initialized-before-us.patch (2 kB) 03/Apr/13 07:45 PM - Christophe Fergeau
3. File test_xml.c (5 kB) 28/Mar/13 12:46 PM - Johannes Dewender



 Description  « Hide

The libmusicbrainz5 and libmusicbrainz4 packages contain the xmlParser.cpp and xmlParser.h files which say:

  • Copyright (c) 2002, Business-Insight
  • <a href="http://www.Business-Insight.com">Business-Insight</a>
  • All rights reserved.
  • See the file "AFPL-license.txt" about the licensing terms

The license file is missing. If the license is actually the Aladdin Free Public License:
http://www.artifex.com/downloads/doc/Public.htm

Then the license is not free software, and is not compatible with the LGPLv2 under which the rest of the library is released.

Bizarrely, libmusicbrainz3 includes an older version of the same files which are marked as being under the LGPLv2. I think it is possible somebody changed the license on this file without checking.



Christophe Fergeau added a comment - 26/Nov/12 10:45 PM

I've started doing work on that, I've got some code which successfully runs the tests, only missing bits are parsing of xmlns in metadata.cc, detailed error reporting when a parsing error occurs, and some memory handling.
The various drawbacks is that this adds a libxml2 dependency (though to my eyes this is better than embedding an xml parser), this means an ABI break (but we really shouldn't install xmlparser.h nor export its symbols in the public API).


Christophe Fergeau added a comment - 26/Nov/12 10:46 PM

This is a work in progress patch. I haven't tested it against an actual app, just with mbtest


Christophe Fergeau made changes - 26/Nov/12 10:46 PM
Field Original Value New Value
Attachment xml.diff [ 10560 ]
Andy Hawkins added a comment - 27/Nov/12 09:47 AM

I'm not sure I like the idea of breaking ABI compatibility, although not entirely sure that this would do that. Have you tried it? It should be easy enough to link mbtest against the current released version, and then run it with your new version installed.

It might be a nice idea to fork the repository on github and put your changes there, that way I can take a look.

Thanks

Andy


Christophe Fergeau added a comment - 04/Dec/12 03:30 PM

This patch no longer has memory handling issues and works with sound-juicer.


Christophe Fergeau made changes - 04/Dec/12 03:30 PM
Attachment 0001-xmlparsing.patch [ 10564 ]
Christophe Fergeau made changes - 04/Dec/12 03:31 PM
Attachment xml.diff [ 10560 ]
Christophe Fergeau added a comment - 10/Dec/12 01:01 PM

Updated version of the patch, added xmlError handling to replace the XMLResults/getError stuff.


Christophe Fergeau made changes - 10/Dec/12 01:01 PM
Attachment 0001-xmlparsing.patch [ 10566 ]
Christophe Fergeau made changes - 10/Dec/12 01:05 PM
Attachment 0001-xmlparsing.patch [ 10564 ]
Johannes Dewender made changes - 28/Mar/13 12:46 PM
Attachment test_xml.c [ 10649 ]
Johannes Dewender added a comment - 28/Mar/13 12:51 PM

@Christophe Fergeau:
Your patch seems to have a bug.
Originally reported in http://lists.musicbrainz.org/pipermail/musicbrainz-devel/2013-March/005191.html

test_xml.c is a test program that compiled on Fedora 17 (in a VirtualBox VM) with

gcc -o test_xml test_xml.c `pkg-config libmusicbrainz5 --cflags --libs`

gives (with ./test_xml)

Success
Found 1 artist(s)
Artist is 'Westlife'
Artist ID is 5f000e69-3cfd-4871-8f1b-faa7f0d4bcbc
Success
Release List Size 0

but on other systems (without the patch) it gives

Success
Found 1 artist(s)
Artist is 'Westlife'
Artist ID is 5f000e69-3cfd-4871-8f1b-faa7f0d4bcbc
Success
Artist NAME IS Westlife
Release List Size 25

Andy Hawkins added a comment - 28/Mar/13 01:06 PM

I've spoken to Luks about this today, and will look at dropping to a previous version of the XML parser that is GPL compatible.

Will try to do this as soon as I can.

Andy


Christophe Fergeau added a comment - 03/Apr/13 07:45 PM

This was a silly uninitialized memory bug. In combination with -D_FORTIFY_SOURCE=2 used in the fedora package, this caused the bug in the test case.


Christophe Fergeau made changes - 03/Apr/13 07:45 PM
Johannes Dewender added a comment - 02/Aug/14 06:22 PM

There is a pull request by sebastinas also including cfergeau's commits:
https://github.com/metabrainz/libmusicbrainz/pull/4