You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2009/11/14 01:21:18 UTC

[PATCH] Allow RAT to run on .tar.gz archives

In using RAT to check potential Subversion release tarballs, I've bumped into a couple of its, uh, limitations.  To that end, I've hacked up the attached patch which fixes the immediate itch of not wanting to have to unpack the tarball before running the tool.  I'm not sure what the RAT patch submission guidelines are, so I'm just sending it here, with the following caveats.

Caveats:
 * Reports aren't sorted properly for .tar.gz; standard filesystem targets remain unaffected.
 * Needed to add a new dependency (ant) to pick up TarInputStream and friends.
 * My maven-fu is *very* limited (read: nonexistent) so I kind of guessed at the build system tweakage which needed to happen for the above.  Comments/pointers/tweaks appreciated.
 * My Java is a bit rusty, so I may not have done things in the most efficient way.
 * I don't know the standard RAT coding conventions, but attempted to follow existing conventions where possible.

Future work:
 * Allow running on .zip and .tar.bz2 tarballs.  This should be relatively easy.
 * Properly sort the output of the report generated by running RAT on tarballs.

Let me know of any feedback you may have, or feel free to just tweak the patch before committing.  I plan on implementing the followup patches after this one gets committed.

Cheers,
-Hyrum


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Nov 13, 2009, at 10:44 PM, Ross Gardler wrote:

> 2009/11/14 Hyrum K. Wright <hy...@mail.utexas.edu>:
>> hmmm, it doesn't look like the patch attachment made it through.  What's the suggested way of supplying patches?
> 
> https://issues.apache.org/jira/browse/RAT

Patch added to RAT-17.

Thanks,
-Hyrum

Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by Ross Gardler <rg...@apache.org>.
2009/11/14 Hyrum K. Wright <hy...@mail.utexas.edu>:
> hmmm, it doesn't look like the patch attachment made it through.  What's the suggested way of supplying patches?

https://issues.apache.org/jira/browse/RAT

Ross

>
> -Hyrum
>
> On Nov 13, 2009, at 6:21 PM, Hyrum K. Wright wrote:
>
>> In using RAT to check potential Subversion release tarballs, I've bumped into a couple of its, uh, limitations.  To that end, I've hacked up the attached patch which fixes the immediate itch of not wanting to have to unpack the tarball before running the tool.  I'm not sure what the RAT patch submission guidelines are, so I'm just sending it here, with the following caveats.
>>
>> Caveats:
>> * Reports aren't sorted properly for .tar.gz; standard filesystem targets remain unaffected.
>> * Needed to add a new dependency (ant) to pick up TarInputStream and friends.
>> * My maven-fu is *very* limited (read: nonexistent) so I kind of guessed at the build system tweakage which needed to happen for the above.  Comments/pointers/tweaks appreciated.
>> * My Java is a bit rusty, so I may not have done things in the most efficient way.
>> * I don't know the standard RAT coding conventions, but attempted to follow existing conventions where possible.
>>
>> Future work:
>> * Allow running on .zip and .tar.bz2 tarballs.  This should be relatively easy.
>> * Properly sort the output of the report generated by running RAT on tarballs.
>>
>> Let me know of any feedback you may have, or feel free to just tweak the patch before committing.  I plan on implementing the followup patches after this one gets committed.
>>
>> Cheers,
>> -Hyrum
>>
>
>



-- 
Ross Gardler

OSS Watch - supporting open source in education and research
http://www.oss-watch.ac.uk

Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
hmmm, it doesn't look like the patch attachment made it through.  What's the suggested way of supplying patches?

-Hyrum

On Nov 13, 2009, at 6:21 PM, Hyrum K. Wright wrote:

> In using RAT to check potential Subversion release tarballs, I've bumped into a couple of its, uh, limitations.  To that end, I've hacked up the attached patch which fixes the immediate itch of not wanting to have to unpack the tarball before running the tool.  I'm not sure what the RAT patch submission guidelines are, so I'm just sending it here, with the following caveats.
> 
> Caveats:
> * Reports aren't sorted properly for .tar.gz; standard filesystem targets remain unaffected.
> * Needed to add a new dependency (ant) to pick up TarInputStream and friends.
> * My maven-fu is *very* limited (read: nonexistent) so I kind of guessed at the build system tweakage which needed to happen for the above.  Comments/pointers/tweaks appreciated.
> * My Java is a bit rusty, so I may not have done things in the most efficient way.
> * I don't know the standard RAT coding conventions, but attempted to follow existing conventions where possible.
> 
> Future work:
> * Allow running on .zip and .tar.bz2 tarballs.  This should be relatively easy.
> * Properly sort the output of the report generated by running RAT on tarballs.
> 
> Let me know of any feedback you may have, or feel free to just tweak the patch before committing.  I plan on implementing the followup patches after this one gets committed.
> 
> Cheers,
> -Hyrum
> 


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Dec 12, 2009, at 5:21 PM, Gavin wrote:

> 
> 
>> -----Original Message-----
>> From: Gavin [mailto:gavin@16degrees.com.au]
>> Sent: Thursday, 10 December 2009 8:35 PM
>> To: rat-dev@incubator.apache.org
>> Subject: RE: [PATCH] Allow RAT to run on .tar.gz archives
>> 
>> 
>> 
>>> -----Original Message-----
>>> From: Hyrum K. Wright [mailto:hyrum_wright@mail.utexas.edu]
>>> Sent: Thursday, 10 December 2009 8:52 AM
>>> To: rat-dev@incubator.apache.org
>>> Subject: Re: [PATCH] Allow RAT to run on .tar.gz archives
>>> 
>>> Any further progress on this patch?
>> 
>> Well, we've just had some new committers voted into the Rat project,
>> including myself so I'll make use of those shiny new bits by taking a look
>> tomorrow.
>> 
>> Gav...
> 
> Hyrum, thanks.
> 
> Patch Applied, please see comment in RAT-17.

Thanks!  I've updated, done a bit of testing, and posted a follow-on patch to RAT-17.

Cheers,
-Hyrum

RE: [PATCH] Allow RAT to run on .tar.gz archives

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Gavin [mailto:gavin@16degrees.com.au]
> Sent: Thursday, 10 December 2009 8:35 PM
> To: rat-dev@incubator.apache.org
> Subject: RE: [PATCH] Allow RAT to run on .tar.gz archives
> 
> 
> 
> > -----Original Message-----
> > From: Hyrum K. Wright [mailto:hyrum_wright@mail.utexas.edu]
> > Sent: Thursday, 10 December 2009 8:52 AM
> > To: rat-dev@incubator.apache.org
> > Subject: Re: [PATCH] Allow RAT to run on .tar.gz archives
> >
> > Any further progress on this patch?
> 
> Well, we've just had some new committers voted into the Rat project,
> including myself so I'll make use of those shiny new bits by taking a look
> tomorrow.
> 
> Gav...

Hyrum, thanks.

Patch Applied, please see comment in RAT-17.

Gav...

> 
> >
> > -Hyrum
> >
> > On Nov 23, 2009, at 3:35 PM, Hyrum K. Wright wrote:
> >
> > > Another gentle reminder that this patch is outstanding and hasn't
> > received any comments/concerns/vetoes.  I'd like to see this included in
> > RAT as soon as is reasonable.
> > >
> > > Thanks,
> > > -Hyrum
> > >
> > > On Nov 19, 2009, at 2:32 PM, Hyrum K. Wright wrote:
> > >
> > >> Ping.  It's been a couple of days since the most recent version of
> this
> > patch.  Any comments?
> > >>
> > >> -Hyrum
> > >>
> > >> On Nov 17, 2009, at 10:44 AM, Hyrum K. Wright wrote:
> > >>
> > >>>
> > >>> On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:
> > >>>
> > >>>> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu>
> wrote:
> > >>>>
> > >>>>> In using RAT to check potential Subversion release tarballs, I've
> > >>>>> bumped into a couple of its, uh, limitations.  To that end, I've
> > >>>>> hacked up the attached patch which fixes the immediate itch of not
> > >>>>> wanting to have to unpack the tarball before running the tool.
> > >>>>
> > >>>> The RAT Antlib already supports working on arbitrary resource
> > >>>> collections, which means you wouldn't even have to download the
> > tarball
> > >>>> yourself if you wanted to.
> > >>>>
> > >>>> <rat:report ...>
> > >>>> <tarfileset ...>
> > >>>> <url .../>
> > >>>> </tarfileset>
> > >>>> </rat:report>
> > >>>
> > >>> I hadn't even thought about that, but it's a nifty side effect.  :)
> > >>>
> > >>>>> * Needed to add a new dependency (ant) to pick up TarInputStream
> and
> > >>>>> friends.
> > >>>>
> > >>>> For RAT's core commons-compress may be a better option, it is more
> or
> > >>>> less the same code base (for tar, zip and bzip2) and has a lighter
> > >>>> footprint.  Basically you'd have to change a few imports and class
> > names
> > >>>> (TarArchiveInputStream instead of TarInputStream).
> > >>>>
> > >>>> http://commons.apache.org/compress/
> > >>>
> > >>> Thanks for the suggestion.  I switched to commons-compress and
> > uploaded a new version of the patch:
> > https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-
> > v2.patch
> > >>>
> > >>> Using commons-compress will actually make handling bz2 and zip files
> > much easier, but I'm going to wait on those until this patch is
> committed.
> > >>>
> > >>> Cheers,
> > >>> -Hyrum
> > >>
> > >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 9.0.709 / Virus Database: 270.14.99/2553 - Release Date:
> 12/10/09
> > 05:41:00
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.709 / Virus Database: 270.14.99/2553 - Release Date: 12/10/09
> 05:41:00


RE: [PATCH] Allow RAT to run on .tar.gz archives

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Hyrum K. Wright [mailto:hyrum_wright@mail.utexas.edu]
> Sent: Thursday, 10 December 2009 8:52 AM
> To: rat-dev@incubator.apache.org
> Subject: Re: [PATCH] Allow RAT to run on .tar.gz archives
> 
> Any further progress on this patch?

Well, we've just had some new committers voted into the Rat project,
including myself so I'll make use of those shiny new bits by taking a look
tomorrow.

Gav...

> 
> -Hyrum
> 
> On Nov 23, 2009, at 3:35 PM, Hyrum K. Wright wrote:
> 
> > Another gentle reminder that this patch is outstanding and hasn't
> received any comments/concerns/vetoes.  I'd like to see this included in
> RAT as soon as is reasonable.
> >
> > Thanks,
> > -Hyrum
> >
> > On Nov 19, 2009, at 2:32 PM, Hyrum K. Wright wrote:
> >
> >> Ping.  It's been a couple of days since the most recent version of this
> patch.  Any comments?
> >>
> >> -Hyrum
> >>
> >> On Nov 17, 2009, at 10:44 AM, Hyrum K. Wright wrote:
> >>
> >>>
> >>> On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:
> >>>
> >>>> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> >>>>
> >>>>> In using RAT to check potential Subversion release tarballs, I've
> >>>>> bumped into a couple of its, uh, limitations.  To that end, I've
> >>>>> hacked up the attached patch which fixes the immediate itch of not
> >>>>> wanting to have to unpack the tarball before running the tool.
> >>>>
> >>>> The RAT Antlib already supports working on arbitrary resource
> >>>> collections, which means you wouldn't even have to download the
> tarball
> >>>> yourself if you wanted to.
> >>>>
> >>>> <rat:report ...>
> >>>> <tarfileset ...>
> >>>> <url .../>
> >>>> </tarfileset>
> >>>> </rat:report>
> >>>
> >>> I hadn't even thought about that, but it's a nifty side effect.  :)
> >>>
> >>>>> * Needed to add a new dependency (ant) to pick up TarInputStream and
> >>>>> friends.
> >>>>
> >>>> For RAT's core commons-compress may be a better option, it is more or
> >>>> less the same code base (for tar, zip and bzip2) and has a lighter
> >>>> footprint.  Basically you'd have to change a few imports and class
> names
> >>>> (TarArchiveInputStream instead of TarInputStream).
> >>>>
> >>>> http://commons.apache.org/compress/
> >>>
> >>> Thanks for the suggestion.  I switched to commons-compress and
> uploaded a new version of the patch:
> https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-
> v2.patch
> >>>
> >>> Using commons-compress will actually make handling bz2 and zip files
> much easier, but I'm going to wait on those until this patch is committed.
> >>>
> >>> Cheers,
> >>> -Hyrum
> >>
> >
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.709 / Virus Database: 270.14.99/2553 - Release Date: 12/10/09
> 05:41:00


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Any further progress on this patch?

-Hyrum

On Nov 23, 2009, at 3:35 PM, Hyrum K. Wright wrote:

> Another gentle reminder that this patch is outstanding and hasn't received any comments/concerns/vetoes.  I'd like to see this included in RAT as soon as is reasonable.
> 
> Thanks,
> -Hyrum
> 
> On Nov 19, 2009, at 2:32 PM, Hyrum K. Wright wrote:
> 
>> Ping.  It's been a couple of days since the most recent version of this patch.  Any comments?
>> 
>> -Hyrum
>> 
>> On Nov 17, 2009, at 10:44 AM, Hyrum K. Wright wrote:
>> 
>>> 
>>> On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:
>>> 
>>>> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>>>> 
>>>>> In using RAT to check potential Subversion release tarballs, I've
>>>>> bumped into a couple of its, uh, limitations.  To that end, I've
>>>>> hacked up the attached patch which fixes the immediate itch of not
>>>>> wanting to have to unpack the tarball before running the tool.
>>>> 
>>>> The RAT Antlib already supports working on arbitrary resource
>>>> collections, which means you wouldn't even have to download the tarball
>>>> yourself if you wanted to.
>>>> 
>>>> <rat:report ...>
>>>> <tarfileset ...>
>>>> <url .../>
>>>> </tarfileset>
>>>> </rat:report>
>>> 
>>> I hadn't even thought about that, but it's a nifty side effect.  :)
>>> 
>>>>> * Needed to add a new dependency (ant) to pick up TarInputStream and
>>>>> friends.
>>>> 
>>>> For RAT's core commons-compress may be a better option, it is more or
>>>> less the same code base (for tar, zip and bzip2) and has a lighter
>>>> footprint.  Basically you'd have to change a few imports and class names
>>>> (TarArchiveInputStream instead of TarInputStream).
>>>> 
>>>> http://commons.apache.org/compress/
>>> 
>>> Thanks for the suggestion.  I switched to commons-compress and uploaded a new version of the patch: https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-v2.patch
>>> 
>>> Using commons-compress will actually make handling bz2 and zip files much easier, but I'm going to wait on those until this patch is committed.
>>> 
>>> Cheers,
>>> -Hyrum
>> 
> 


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Another gentle reminder that this patch is outstanding and hasn't received any comments/concerns/vetoes.  I'd like to see this included in RAT as soon as is reasonable.

Thanks,
-Hyrum

On Nov 19, 2009, at 2:32 PM, Hyrum K. Wright wrote:

> Ping.  It's been a couple of days since the most recent version of this patch.  Any comments?
> 
> -Hyrum
> 
> On Nov 17, 2009, at 10:44 AM, Hyrum K. Wright wrote:
> 
>> 
>> On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:
>> 
>>> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>>> 
>>>> In using RAT to check potential Subversion release tarballs, I've
>>>> bumped into a couple of its, uh, limitations.  To that end, I've
>>>> hacked up the attached patch which fixes the immediate itch of not
>>>> wanting to have to unpack the tarball before running the tool.
>>> 
>>> The RAT Antlib already supports working on arbitrary resource
>>> collections, which means you wouldn't even have to download the tarball
>>> yourself if you wanted to.
>>> 
>>> <rat:report ...>
>>> <tarfileset ...>
>>>  <url .../>
>>> </tarfileset>
>>> </rat:report>
>> 
>> I hadn't even thought about that, but it's a nifty side effect.  :)
>> 
>>>> * Needed to add a new dependency (ant) to pick up TarInputStream and
>>>> friends.
>>> 
>>> For RAT's core commons-compress may be a better option, it is more or
>>> less the same code base (for tar, zip and bzip2) and has a lighter
>>> footprint.  Basically you'd have to change a few imports and class names
>>> (TarArchiveInputStream instead of TarInputStream).
>>> 
>>> http://commons.apache.org/compress/
>> 
>> Thanks for the suggestion.  I switched to commons-compress and uploaded a new version of the patch: https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-v2.patch
>> 
>> Using commons-compress will actually make handling bz2 and zip files much easier, but I'm going to wait on those until this patch is committed.
>> 
>> Cheers,
>> -Hyrum
> 


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Ping.  It's been a couple of days since the most recent version of this patch.  Any comments?

-Hyrum

On Nov 17, 2009, at 10:44 AM, Hyrum K. Wright wrote:

> 
> On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:
> 
>> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>> 
>>> In using RAT to check potential Subversion release tarballs, I've
>>> bumped into a couple of its, uh, limitations.  To that end, I've
>>> hacked up the attached patch which fixes the immediate itch of not
>>> wanting to have to unpack the tarball before running the tool.
>> 
>> The RAT Antlib already supports working on arbitrary resource
>> collections, which means you wouldn't even have to download the tarball
>> yourself if you wanted to.
>> 
>> <rat:report ...>
>> <tarfileset ...>
>>   <url .../>
>> </tarfileset>
>> </rat:report>
> 
> I hadn't even thought about that, but it's a nifty side effect.  :)
> 
>>> * Needed to add a new dependency (ant) to pick up TarInputStream and
>>> friends.
>> 
>> For RAT's core commons-compress may be a better option, it is more or
>> less the same code base (for tar, zip and bzip2) and has a lighter
>> footprint.  Basically you'd have to change a few imports and class names
>> (TarArchiveInputStream instead of TarInputStream).
>> 
>> http://commons.apache.org/compress/
> 
> Thanks for the suggestion.  I switched to commons-compress and uploaded a new version of the patch: https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-v2.patch
> 
> Using commons-compress will actually make handling bz2 and zip files much easier, but I'm going to wait on those until this patch is committed.
> 
> Cheers,
> -Hyrum


Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Nov 16, 2009, at 11:12 PM, Stefan Bodewig wrote:

> On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> 
>> In using RAT to check potential Subversion release tarballs, I've
>> bumped into a couple of its, uh, limitations.  To that end, I've
>> hacked up the attached patch which fixes the immediate itch of not
>> wanting to have to unpack the tarball before running the tool.
> 
> The RAT Antlib already supports working on arbitrary resource
> collections, which means you wouldn't even have to download the tarball
> yourself if you wanted to.
> 
> <rat:report ...>
>  <tarfileset ...>
>    <url .../>
>  </tarfileset>
> </rat:report>

I hadn't even thought about that, but it's a nifty side effect.  :)

>> * Needed to add a new dependency (ant) to pick up TarInputStream and
>> friends.
> 
> For RAT's core commons-compress may be a better option, it is more or
> less the same code base (for tar, zip and bzip2) and has a lighter
> footprint.  Basically you'd have to change a few imports and class names
> (TarArchiveInputStream instead of TarInputStream).
> 
> http://commons.apache.org/compress/

Thanks for the suggestion.  I switched to commons-compress and uploaded a new version of the patch: https://issues.apache.org/jira/secure/attachment/12425235/rat-tar-gz-v2.patch

Using commons-compress will actually make handling bz2 and zip files much easier, but I'm going to wait on those until this patch is committed.

Cheers,
-Hyrum

Re: [PATCH] Allow RAT to run on .tar.gz archives

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-11-14, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:

> In using RAT to check potential Subversion release tarballs, I've
> bumped into a couple of its, uh, limitations.  To that end, I've
> hacked up the attached patch which fixes the immediate itch of not
> wanting to have to unpack the tarball before running the tool.

The RAT Antlib already supports working on arbitrary resource
collections, which means you wouldn't even have to download the tarball
yourself if you wanted to.

<rat:report ...>
  <tarfileset ...>
    <url .../>
  </tarfileset>
</rat:report>

>  * Needed to add a new dependency (ant) to pick up TarInputStream and
>  friends.

For RAT's core commons-compress may be a better option, it is more or
less the same code base (for tar, zip and bzip2) and has a lighter
footprint.  Basically you'd have to change a few imports and class names
(TarArchiveInputStream instead of TarInputStream).

http://commons.apache.org/compress/

>  * My maven-fu is *very* limited (read: nonexistent) so I kind of
>  guessed at the build system tweakage which needed to happen for the
>  above.

I feel your pain.  I'm still unable to even build the site 8-(

Stefan