You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Curt Arnold <ca...@apache.org> on 2008/02/07 11:33:12 UTC

Ant build script for source repackaging

I wrote an Ant script that attempts to mimic the platform specific  
script used to prepare the current candidates.  The script also can  
compare the candidate against the locally prepared source jars to  
determine any inconsistencies.

The script is available at http://people.apache.org/~carnold/commons_repackage.xml 
.  Comparison between candidate and locally prepared versions requires  
diff and grep on the path.

To build sources jars:

$ ant -f commons_repackage.xml prepare-all

To compare candidate source jars with locally prepared source jars

$ ant -f commons_repackage.xml check-all

The -f commons_repackage.xml would be unnecessary if you renamed  
commons_repackage.xml to build.xml.

A normal comparison in the log will look like:

check:
    [delete] Deleting: /Users/curta/ls-svn/commons/expanded/prepared/ 
common-beanutils-1.6-sources/META-INF/MANIFEST.MF
    [delete] Deleting: /Users/curta/ls-svn/commons/expanded/candidate/ 
commons-beanutils-1.6-sources/META-INF/MANIFEST.MF
      [echo] Checking commons-beanutils-1.6:
      [echo] NOTICE: missing
      [echo] LICENSE: LICENSE.txt
      [exec]  * The Apache Software License, Version 1.1

If there are any differences between the locally prepared and  
candidate jars, the output of the diff command will appear after the  
"Checking commons..." line and before the "[echo] NOTICE:" line.

Observed differences:

commons-betwixt-0.5:
commons-httpclient-3.1:
commons-jxpath-1.2:
These jars have LICENSE.txt, etc in the META-INF directory.  Not that  
that is a bad place to be, it just looks like these might have been  
prepared manually or by a slightly different script than the other  
source jars.

commons-math-1.1:
The diff reports that the LICENSE.txt, NOTICE.txt, and RELEASE- 
NOTES.txt  and license-header.txt are different, but it may just be  
different line feeds.  However, even if it is only line feeds, they  
should be consistent.

commons-pool-1.3:
Possibly line feeds too, but also affects .java files.

commons-primitives-1.0:
Likely line feeds, just LICENSE.txt

The script was written to mimic the current candidate builds.   
However, it should be straightforward to modify to add missing NOTICE  
files and place LICENSE and NOTICE in META-INF if desired.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Ant build script for source repackaging

Posted by nicolas de loof <ni...@apache.org>.
https://issues.apache.org/jira/browse/COMMONSSITE-24

Please attach your script, and I'll package and propose a for ASL2 ones.

Nico.


2008/2/8, nicolas de loof <ni...@apache.org>:
>
> Broken link ... http://people.apache.org/~carnold/commons_repackage_v2.xml
>
> 2008/2/7, Curt Arnold <ca...@apache.org>:
> >
> >
> >
> > > Thanks for this nice script !
> > >
> > > Should I update the "candidate" folder with the generated jars an
> > > call for a
> > > vote ?
> > >
> > > Nico.
> >
> > The first version of the script was written to verify your process.
> > I've slightly modified the script to improve the generated jars.  The
> > new script (http://people.apache.org/~carnold/commons_repackage_v2.xml):
> >
> > Creates a NOTICE file if a NOTICE or NOTICE.txt is not present in the
> > original source distribution (happens about 6 times).
> > Creates a LICENSE file if a LICENSE or LICENSE.txt is not present in
> > the original source distribution (does not happen)
> > Places overview.html and *.txt except NOTICE.txt and LICENSE.txt in
> > META-INF (the original scripts placed these in the root of the jar).
> > Place NOTICE or NOTICE.txt in META-INF as NOTICE
> > Place LICENSE or LICENSE.txt in META-INF as LICENSE
> >
> > If someone is sophisticated enough to examine a jar file, they are
> > sophisticated enough that the benefit from the .txt extensions on
> > their NOTICE and LICENSE files and the .txt extension makes them
> > inconsistent with the v2 license which explicitly says the file is
> > named NOTICE.
> >
> > I'd suggest the following:
> >
> > Create a bug report for the repackaging (if there isn't one already).
> > Attach the script used for the repackaging to the bug report (I can do
> > that to keep the source provenance clean).
> > Prepare the source.jars. and upload to your builds area.
> > Call a vote.  I'd suggest that you break the vote into two slates, one
> > for the ASL 2 sources and one of the ASL 1.1 sources.
> >
> > Barring any overlooked technical consideration, I think the ASL 2
> > releases should be non-controversial.  The ASL 1.1 a little more so,
> > but not that much more.
> >
> > With that process:
> >
> > The generation of the sources.jar is automated, reproducible and
> > verifiable.
> > The artifacts are released with PMC oversight.
> > All generated jars have META-INF/LICENSE and META-INF/NOTICE.
> > Generated jars have the same license as the original source
> > distribution.
> > Generated jars have the same compliance with ASF Source Header Policy
> > as the original source distribution.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>

Re: Ant build script for source repackaging

Posted by nicolas de loof <ni...@apache.org>.
Broken link ... http://people.apache.org/~carnold/commons_repackage_v2.xml

2008/2/7, Curt Arnold <ca...@apache.org>:
>
>
>
> > Thanks for this nice script !
> >
> > Should I update the "candidate" folder with the generated jars an
> > call for a
> > vote ?
> >
> > Nico.
>
> The first version of the script was written to verify your process.
> I've slightly modified the script to improve the generated jars.  The
> new script (http://people.apache.org/~carnold/commons_repackage_v2.xml):
>
> Creates a NOTICE file if a NOTICE or NOTICE.txt is not present in the
> original source distribution (happens about 6 times).
> Creates a LICENSE file if a LICENSE or LICENSE.txt is not present in
> the original source distribution (does not happen)
> Places overview.html and *.txt except NOTICE.txt and LICENSE.txt in
> META-INF (the original scripts placed these in the root of the jar).
> Place NOTICE or NOTICE.txt in META-INF as NOTICE
> Place LICENSE or LICENSE.txt in META-INF as LICENSE
>
> If someone is sophisticated enough to examine a jar file, they are
> sophisticated enough that the benefit from the .txt extensions on
> their NOTICE and LICENSE files and the .txt extension makes them
> inconsistent with the v2 license which explicitly says the file is
> named NOTICE.
>
> I'd suggest the following:
>
> Create a bug report for the repackaging (if there isn't one already).
> Attach the script used for the repackaging to the bug report (I can do
> that to keep the source provenance clean).
> Prepare the source.jars. and upload to your builds area.
> Call a vote.  I'd suggest that you break the vote into two slates, one
> for the ASL 2 sources and one of the ASL 1.1 sources.
>
> Barring any overlooked technical consideration, I think the ASL 2
> releases should be non-controversial.  The ASL 1.1 a little more so,
> but not that much more.
>
> With that process:
>
> The generation of the sources.jar is automated, reproducible and
> verifiable.
> The artifacts are released with PMC oversight.
> All generated jars have META-INF/LICENSE and META-INF/NOTICE.
> Generated jars have the same license as the original source
> distribution.
> Generated jars have the same compliance with ASF Source Header Policy
> as the original source distribution.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: Ant build script for source repackaging

Posted by Curt Arnold <ca...@apache.org>.

> Thanks for this nice script !
>
> Should I update the "candidate" folder with the generated jars an  
> call for a
> vote ?
>
> Nico.

The first version of the script was written to verify your process.   
I've slightly modified the script to improve the generated jars.  The  
new script (http://people.apache.org/~carnold/commons_repackage_v2.xml):

Creates a NOTICE file if a NOTICE or NOTICE.txt is not present in the  
original source distribution (happens about 6 times).
Creates a LICENSE file if a LICENSE or LICENSE.txt is not present in  
the original source distribution (does not happen)
Places overview.html and *.txt except NOTICE.txt and LICENSE.txt in  
META-INF (the original scripts placed these in the root of the jar).
Place NOTICE or NOTICE.txt in META-INF as NOTICE
Place LICENSE or LICENSE.txt in META-INF as LICENSE

If someone is sophisticated enough to examine a jar file, they are  
sophisticated enough that the benefit from the .txt extensions on  
their NOTICE and LICENSE files and the .txt extension makes them  
inconsistent with the v2 license which explicitly says the file is  
named NOTICE.

I'd suggest the following:

Create a bug report for the repackaging (if there isn't one already).
Attach the script used for the repackaging to the bug report (I can do  
that to keep the source provenance clean).
Prepare the source.jars. and upload to your builds area.
Call a vote.  I'd suggest that you break the vote into two slates, one  
for the ASL 2 sources and one of the ASL 1.1 sources.

Barring any overlooked technical consideration, I think the ASL 2  
releases should be non-controversial.  The ASL 1.1 a little more so,  
but not that much more.

With that process:

The generation of the sources.jar is automated, reproducible and  
verifiable.
The artifacts are released with PMC oversight.
All generated jars have META-INF/LICENSE and META-INF/NOTICE.
Generated jars have the same license as the original source  
distribution.
Generated jars have the same compliance with ASF Source Header Policy  
as the original source distribution.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Ant build script for source repackaging

Posted by nicolas de loof <ni...@apache.org>.
2008/2/7, Curt Arnold <ca...@apache.org>:
>
>
> Observed differences:
>
> commons-betwixt-0.5:
> commons-httpclient-3.1:
> commons-jxpath-1.2:
> These jars have LICENSE.txt, etc in the META-INF directory.  Not that
> that is a bad place to be, it just looks like these might have been
> prepared manually or by a slightly different script than the other
> source jars.



Those one have been manually updated to include the required files that are
NOT in the released source distribution.


commons-math-1.1:
> The diff reports that the LICENSE.txt, NOTICE.txt, and RELEASE-
> NOTES.txt  and license-header.txt are different, but it may just be
> different line feeds.  However, even if it is only line feeds, they
> should be consistent.
>
> commons-pool-1.3:
> Possibly line feeds too, but also affects .java files.
>
> commons-primitives-1.0:
> Likely line feeds, just LICENSE.txt
>
> The script was written to mimic the current candidate builds.
> However, it should be straightforward to modify to add missing NOTICE
> files and place LICENSE and NOTICE in META-INF if desired.
>
>
The txt files where copied from the source distribution, not from a single
reference, so formatting/typo may have been introduced by the original
source distribution.

Thanks for this nice script !

Should I update the "candidate" folder with the generated jars an call for a
vote ?

Nico.