TrigonicSolutions / gradle-rpm-plugin

Gradle plugin for constructing RPM packages.
Apache License 2.0
38 stars 19 forks source link

Add debian support and an extension. #38

Closed quidryan closed 10 years ago

quidryan commented 11 years ago

This is a biggy of a pull request, so let's talk about it. As a starter, it works, there's tests and it even fixes #30. There are two pieces of functionality added here: an extension and debian support.

The extension lets settings (like package name, requires, links) to be shared between all packaging tasks. It also provides a Copy spec which will be joined with the tasks. For instance, a copyright message could be copied into all rpm tasks, while also setting the os and arch for all tasks.

The debian support comes out of the pkg4j plugin, but is primarily supported by the jdeb library. There are many similar conventions to redline.

Combined, they let you define a package just once via the extension, then get system packages for RedHat based and Debian based OS's, without losing the capabilities of either format. The .md files hopefully document the plugins in detail.

There's a few cleanups in here too, like no longer adding user/group/etc to every CopySpec's metaclass. Now it's confined to just our usages.

quidryan commented 11 years ago

The plugin might have to be renamed if this pull request is accepted. ;-)

AlanKrueger commented 11 years ago

You're right, this is a very large pull request. I'll start reviewing the commits. =)

Do you have any suggestions on a renamed plugin? Something like the Gradle System Packaging Plugin? Never mind, I see from the updated README.md you've picked "Gradle Linux Packaging Plugin". Is there anything that specifically limits this to Linux packaging?

quidryan commented 11 years ago

I'm very flexible on the name. My only thinking was Gradle System Packaging Plugin could make people think it works with Windows or OSX. Though, that'd be an interesting goal for the project. There is nothing specific to Linux. I'd go for Gradle System Packaging Plugin, then make some GitHub Issues to add OSX and Windows support later.

quidryan commented 11 years ago

Any other concerns or comments?

AlanKrueger commented 11 years ago

I just need to set aside some time to deal with this. Things have been a bit hectic recently. :-) On Jul 18, 2013 9:38 AM, "Justin Ryan" notifications@github.com wrote:

Any other concerns or comments?

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/pull/38#issuecomment-21196515 .[image: Web Bug from https://github.com/notifications/beacon/Q__N7IhZ1wBYuxvooaGvnyJI-oF3urzbay8soLSMcef_CdtuL4q-K9NdN_pj_M0o.gif]

quidryan commented 10 years ago

No problem, I completely understand, I've got my share of incoming pull requests on other projects. BTW, We're running with an internal build of this branch and it's working great.

AlanKrueger commented 10 years ago

Does yours work with Gradle 1.7? Looks like they've whacked some of the internal classes I was obliged to leverage and the current Maven release breaks. On Jul 21, 2013 9:30 AM, "Justin Ryan" notifications@github.com wrote:

No problem, I completely understand, I've got my share of incoming pull requests on other projects. BTW, We're running with an internal build of this branch and it's working great.

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/pull/38#issuecomment-21312675 .[image: Web Bug from https://github.com/notifications/beacon/Q__N7IhZ1wBYuxvooaGvnyJI-oF3urzbay8soLSMcef_CdtuL4q-K9NdN_pj_M0o.gif]

quidryan commented 10 years ago

I saw that. It works with a 1.7 branch I use, but I have tried yet with the final version. I'm out of the country for a few weeks and will take a look when I get back at the end of the month. On Aug 9, 2013 9:20 PM, "Alan Krueger" notifications@github.com wrote:

Does yours work with Gradle 1.7? Looks like they've whacked some of the internal classes I was obliged to leverage and the current Maven release breaks. On Jul 21, 2013 9:30 AM, "Justin Ryan" notifications@github.com wrote:

No problem, I completely understand, I've got my share of incoming pull requests on other projects. BTW, We're running with an internal build of this branch and it's working great.

— Reply to this email directly or view it on GitHub< https://github.com/TrigonicSolutions/gradle-rpm-plugin/pull/38#issuecomment-21312675>

.[image: Web Bug from

https://github.com/notifications/beacon/Q__N7IhZ1wBYuxvooaGvnyJI-oF3urzbay8soLSMcef_CdtuL4q-K9NdN_pj_M0o.gif]

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/pull/38#issuecomment-22397320 .

quidryan commented 10 years ago

What happened to this merge? It's not in the tree anymore? Did someone force push over it?

AlanKrueger commented 10 years ago

That's on a separate branch at the moment since I was merging gradle 1.7 compatibility changes onto the master. There was a fair amount of outcry for those.

On Wed, Sep 4, 2013 at 10:06 PM, Justin Ryan notifications@github.comwrote:

What happened to this merge? It's not in the tree anymore? Did someone force push over it?

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/pull/38#issuecomment-23844085 .[image: Web Bug from https://github.com/notifications/beacon/Q__N7IhZ1wBYuxvooaGvnyJI-oF3urzbay8soLSMcef_CdtuL4q-K9NdN_pj_M0o.gif] [image: Web Bug from http://sgmail.github.com/wf/open?upn=-2BskC7RnNFlQTjIcZ9hbIlMbcPZtHBuIY35tUnjvmeBe7GgkI-2BuFi4idv3jyQ7-2FBc3p6jShvcK-2F7z-2BDNcoPHxuEDzaSuZI5d9maH9-2Br8uiIdl6tSP4mzYIhd4qjwzq22FNgoY-2BMgM-2FNNCDlASWZ-2BoYm4ZuLfejCd-2FZCPwurv0dClsazzU1GrE7g-2FY76FfbdXdjQHlyYAOu5RKgXyC08dIDw-3D-3D]

quidryan commented 10 years ago

Ah, I see it, thanks. I'll start on merging the 1.7 stuff over, there seems to be few more changes than what was needed for the old stuff.

quidryan commented 10 years ago

I created another branch called add-debian-support-with-1.7 which has all the recent chances merged in. I'll create a pull request once I fix all the tests. There seems to be an issue with the CopySpecEnhancement's that act like property setters, in 1.7.