Closed sc1478 closed 8 years ago
I've now also added Ant support for changelogs. The redline task now supports a changeLog attribute, similar to the way script files are handled.
By the way, a functional test not easily done in JUnit is to copy the built rpm to a unix machine with rpm installed and running the command rpm -qp --changelog
This pull request most importantly adds the ability to create Changelogs for Redline RPM. This has not been available in an all-Java rpm builder before and fills a gap between Redline and other RPM builder systems. This will also enable the nebula gradle-os-package plugin for Gradle to build RPMs with changelogs.
Also, in the course of developing this I first thought it necessary to create new addHeaderEntry() methods in Builder for different types of parameters than those previously available (short, byte, etc.). I was then bothered by finding that these methods didn't fail fast - that is they didn't fail until the RPM was being written, not when the headers were being added. Even though the tag implies an enforceable restriction on the types that can be put in a header, this was not enforced at addHeader() time. I added such a fail-fast mechanism. I eventually realized that the addHeader() methods weren't really necessary to implement Changelogs.but they seemed to be a possibly useful feature, so I left them in. My new addHeader() methods are not called anywhere but they are available for any future change implementers.
This change was developed at AT&T which has approved this pull request.