You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@epimorphics.com> on 2011/06/12 21:08:52 UTC

Code clean-up: Processing copyright notices

I have some scripts to help converting the source code to Apache headers.

One script simple looks for copyright statements so we can list the 
contributors and identify files that have notes about contributors other 
than the ICLAs.

The second changes the source code by removing and starting /**/ comment 
and any trailing /**/ and inseting the AL text (it removes only the 
first /**/ comment even if there are two or more the package 
declaration, ditto trailibng /**/ comments).

http://incubator.apache.org/guides/mentor.html#initial-clean-up

Is this good enough?

Our standard copyright header is:
/*
  * (c) Copyright XXXXXXXXX
  * All rights reserved.
  * [See end of file]
  */

and a large copyright notice on the end of the file.  These get removed 
and the AL text goes at the head of file.


Ian, Dave - I know you used different headers on some of your code e.g.:

/******************************************************************
  * File:        BaseInfGraph.java
  * Created by:  Dave Reynolds
  * Created on:  18-Jan-03
  *
  * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 
Hewlett-Packard Development Company, LP
  * [See end of file]
  * $Id: BaseInfGraph.java,v 1.1 2009-06-29 08:55:50 castagna Exp $
  *****************************************************************/

/*****************************************************************************
  * Source code information
  * -----------------------
  * Original author    Ian Dickinson, HP Labs Bristol
  * Author email       ian_dickinson@users.sourceforge.net
  * Package            Jena 2
  * Web                http://sourceforge.net/projects/jena/
  * Created            01-Apr-2003
  * Filename           $RCSfile: AnnotationProperty.java,v $
  * Revision           $Revision: 1.2 $
  * Release status     $State: Exp $
  *
  * Last modified on   $Date: 2009-10-06 13:04:34 $
  *               by   $Author: ian_dickinson $
  *
  * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 
Hewlett-Packard Development Company, LP
  * (see footer for full conditions)
 
*****************************************************************************/

Do you want to keep this information?  (Some of it looks rather old - 
and some of it is CVS related).

If you do want to keep it, could you indicate which packages contain 
material that has such files in and what you want to do with it.


Chris - anything in your code areas that will get lost you want to keep 
by top-and-tailing the source files?


Paolo - you've converted LARQ.  How did it go?  What can we learn from 
the process?


	Andy

(disclosure: I have stopped putting any authorship indication on my own 
code - it's the project's, not mime)


Re: Code clean-up: Processing copyright notices

Posted by Ian Dickinson <ia...@epimorphics.com>.
On 12/06/11 20:08, Andy wrote:
 >> [extended file header]
> Do you want to keep this information?
Nope. Consistency is more valuable.

Ian

Re: Code clean-up: Processing copyright notices

Posted by Andy Seaborne <an...@epimorphics.com>.
Benson - when the conversion scripts are run, it'll mess up your 
diversity check of commits :-)

	Andy

On 12/06/11 20:08, Andy Seaborne wrote:
> I have some scripts to help converting the source code to Apache headers.
>
> One script simple looks for copyright statements so we can list the
> contributors and identify files that have notes about contributors other
> than the ICLAs.
>
> The second changes the source code by removing and starting /**/ comment
> and any trailing /**/ and inseting the AL text (it removes only the
> first /**/ comment even if there are two or more the package
> declaration, ditto trailibng /**/ comments).
>
> http://incubator.apache.org/guides/mentor.html#initial-clean-up
>
> Is this good enough?
>
> Our standard copyright header is:
> /*
> * (c) Copyright XXXXXXXXX
> * All rights reserved.
> * [See end of file]
> */
>
> and a large copyright notice on the end of the file. These get removed
> and the AL text goes at the head of file.
>
>
> Ian, Dave - I know you used different headers on some of your code e.g.:
>
> /******************************************************************
> * File: BaseInfGraph.java
> * Created by: Dave Reynolds
> * Created on: 18-Jan-03
> *
> * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard
> Development Company, LP
> * [See end of file]
> * $Id: BaseInfGraph.java,v 1.1 2009-06-29 08:55:50 castagna Exp $
> *****************************************************************/
>
> /*****************************************************************************
>
> * Source code information
> * -----------------------
> * Original author Ian Dickinson, HP Labs Bristol
> * Author email ian_dickinson@users.sourceforge.net
> * Package Jena 2
> * Web http://sourceforge.net/projects/jena/
> * Created 01-Apr-2003
> * Filename $RCSfile: AnnotationProperty.java,v $
> * Revision $Revision: 1.2 $
> * Release status $State: Exp $
> *
> * Last modified on $Date: 2009-10-06 13:04:34 $
> * by $Author: ian_dickinson $
> *
> * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> Hewlett-Packard Development Company, LP
> * (see footer for full conditions)
>
> *****************************************************************************/
>
>
> Do you want to keep this information? (Some of it looks rather old - and
> some of it is CVS related).
>
> If you do want to keep it, could you indicate which packages contain
> material that has such files in and what you want to do with it.
>
>
> Chris - anything in your code areas that will get lost you want to keep
> by top-and-tailing the source files?
>
>
> Paolo - you've converted LARQ. How did it go? What can we learn from the
> process?
>
>
> Andy
>
> (disclosure: I have stopped putting any authorship indication on my own
> code - it's the project's, not mime)
>

Re: Code clean-up: Processing copyright notices

Posted by Dave Reynolds <da...@gmail.com>.
On Mon, 2011-06-13 at 22:25 +0100, Andy Seaborne wrote: 
> 
> On 12/06/11 20:37, Dave Reynolds wrote:
> > On Sun, 2011-06-12 at 20:08 +0100, Andy Seaborne wrote:
> >
> >> Ian, Dave - I know you used different headers on some of your code e.g.:
> >>
> >> /******************************************************************
> >>    * File:        BaseInfGraph.java
> >>    * Created by:  Dave Reynolds
> >>    * Created on:  18-Jan-03
> >>    *
> >>    * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009
> >> Hewlett-Packard Development Company, LP
> >>    * [See end of file]
> >>    * $Id: BaseInfGraph.java,v 1.1 2009-06-29 08:55:50 castagna Exp $
> >>    *****************************************************************/
> >
> > [snip]
> >
> >> Do you want to keep this information?  (Some of it looks rather old -
> >> and some of it is CVS related).
> >
> > No. I like knowing who create the original file and when but that is
> > presumably still available in the svn history.
> 
> 'fraid not necessarily.  viewvc does not see the log history in the 
> imports and the codebase was svn copy'ed which isn't history preserving. 
>   Going forward, new files will be OK.
> 
> The imports area has SF ids, and CVS is CVS converted to SVN and 
> uploaded.  History may be there but it's not exposed to SVN.

Sad but inevitable I guess.

> I don't mind trying to write some kind of special header for some files 
> but I need to know what areas to run over and what to look for. I'd 
> rather not write a pragmatic pattern match and run it over all the files 
> in all the projects.  What do you want to do?

Not worth doing something special just for me, I'll go along with the
anonymous default.

Dave




Re: Code clean-up: Processing copyright notices

Posted by Andy Seaborne <an...@epimorphics.com>.

On 12/06/11 20:37, Dave Reynolds wrote:
> On Sun, 2011-06-12 at 20:08 +0100, Andy Seaborne wrote:
>
>> Ian, Dave - I know you used different headers on some of your code e.g.:
>>
>> /******************************************************************
>>    * File:        BaseInfGraph.java
>>    * Created by:  Dave Reynolds
>>    * Created on:  18-Jan-03
>>    *
>>    * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009
>> Hewlett-Packard Development Company, LP
>>    * [See end of file]
>>    * $Id: BaseInfGraph.java,v 1.1 2009-06-29 08:55:50 castagna Exp $
>>    *****************************************************************/
>
> [snip]
>
>> Do you want to keep this information?  (Some of it looks rather old -
>> and some of it is CVS related).
>
> No. I like knowing who create the original file and when but that is
> presumably still available in the svn history.

'fraid not necessarily.  viewvc does not see the log history in the 
imports and the codebase was svn copy'ed which isn't history preserving. 
  Going forward, new files will be OK.

The imports area has SF ids, and CVS is CVS converted to SVN and 
uploaded.  History may be there but it's not exposed to SVN.

I don't mind trying to write some kind of special header for some files 
but I need to know what areas to run over and what to look for. I'd 
rather not write a pragmatic pattern match and run it over all the files 
in all the projects.  What do you want to do?

	Andy

Re: Code clean-up: Processing copyright notices

Posted by Dave Reynolds <da...@gmail.com>.
On Sun, 2011-06-12 at 20:08 +0100, Andy Seaborne wrote:

> Ian, Dave - I know you used different headers on some of your code e.g.:
> 
> /******************************************************************
>   * File:        BaseInfGraph.java
>   * Created by:  Dave Reynolds
>   * Created on:  18-Jan-03
>   *
>   * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 
> Hewlett-Packard Development Company, LP
>   * [See end of file]
>   * $Id: BaseInfGraph.java,v 1.1 2009-06-29 08:55:50 castagna Exp $
>   *****************************************************************/

[snip]

> Do you want to keep this information?  (Some of it looks rather old - 
> and some of it is CVS related).

No. I like knowing who create the original file and when but that is
presumably still available in the svn history.

Dave



Re: Code clean-up: Processing copyright notices

Posted by Paolo Castagna <ca...@googlemail.com>.
Andy Seaborne wrote:
> Paolo - you've converted LARQ.  How did it go?  What can we learn from 
> the process?

Hi Andy,
LARQ is sufficiently small that a manual approach did not take long.

LARQ has a NOTICE.txt file which lists copyright statements of the
original software:
http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk/NOTICE.txt

I also added a DISCLAIMER.txt:
http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk/DISCLAIMER.txt
(--> http://incubator.apache.org/guides/branding.html#disclaimers)

Paolo