craigwblake/redline — pull request #53 by jonasalfthan (2014-07-31 14:57:27+00:00)
Title: removed the rpm name length restriction

Thank you for a great library!
This pull request is a quick-fix to a problem we had with very long package names. (~100 chars)
After consulting Redhat we got the following answer:

Why rpm packages can have names that is longer than 66 chars:
There was a time when the lead was used to store information used internally by RPM. But due to limitations in the lead e.g "the name could not be longer than 66 char etc..."
all the information contained in the lead has been duplicated or superseded by information contained in the header.
Today, however, the lead's sole purpose is to make it easy to identify an RPM package file, very few application/libraries is/should looking at the lead(libmagic is one)
Now the name is stored in the RPM header and the header is limited to 32 MB total data, the name must fit into that along with everything else.
To me the "best practise" is to populate the lead fully for backwards compatibility, but if the name is longer than 66 char truncate it.
When creating an rpm package using RPM and the name is over the lead limit it gets truncated, tough cookies.
http://www.rpm.org/max-rpm-snapshot/s1-rpm-file-format-rpm-file-format.html