Обсуждение: initdb copyright notice

Поиск
Список
Период
Сортировка

initdb copyright notice

От
Andrew Dunstan
Дата:
Neil Conway asked me if we need a copyright notice to cover the code I
borrowed from FreeBSD in initdb.c. I wasn't sure, but in case we do here
is a patch to include it.

cheers

andrew

Index: initdb.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/initdb/initdb.c,v
retrieving revision 1.10
diff -c -w -r1.10 initdb.c
*** initdb.c    14 Nov 2003 18:32:34 -0000    1.10
--- initdb.c    17 Nov 2003 15:58:04 -0000
***************
*** 47,52 ****
--- 47,89 ----
   *-------------------------------------------------------------------------
   */

+ /*-------------------------------------------------------------------------
+  * The following copyright notice applies to the portions of the code
+  * borrowed from FreeBSD in the function mkdir_p():
+  *
+  * Copyright (c) 1983, 1992, 1993
+  *    The Regents of the University of California.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  *    This product includes software developed by the University of
+  *    California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  *-------------------------------------------------------------------------
+  */
+
  #include "postgres_fe.h"

  #include <dirent.h>


Re: initdb copyright notice

От
Rod Taylor
Дата:
On Mon, 2003-11-17 at 14:11, Andrew Dunstan wrote:
> Neil Conway asked me if we need a copyright notice to cover the code I
> borrowed from FreeBSD in initdb.c. I wasn't sure, but in case we do here
> is a patch to include it.

Unless I'm mistaken, all of the FreeBSD code is under the 3 clause
license.

However, the easiest way to find out is to look at the header of the
files that you borrowed code from.

We don't want the 4 clause unless necessary.


Re: initdb copyright notice

От
Andrew Dunstan
Дата:
Rod Taylor wrote:

>On Mon, 2003-11-17 at 14:11, Andrew Dunstan wrote:
>
>
>>Neil Conway asked me if we need a copyright notice to cover the code I
>>borrowed from FreeBSD in initdb.c. I wasn't sure, but in case we do here
>>is a patch to include it.
>>
>>
>
>Unless I'm mistaken, all of the FreeBSD code is under the 3 clause
>license.
>
>However, the easiest way to find out is to look at the header of the
>files that you borrowed code from.
>
>We don't want the 4 clause unless necessary.
>

I C&P'd this directly from the file in question:

http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/mkdir/mkdir.c?rev=1.27&content-type=text/x-cvsweb-markup

Maybe the FreeBSD guys haven't updated all their notices correctly? This
notice has been unchanged in this file since 1994.

cheers

andrew


Re: initdb copyright notice

От
Andrew Dunstan
Дата:
I wrote:

> Rod Taylor wrote:
>
>> On Mon, 2003-11-17 at 14:11, Andrew Dunstan wrote:
>>
>>
>>> Neil Conway asked me if we need a copyright notice to cover the code I
>>> borrowed from FreeBSD in initdb.c. I wasn't sure, but in case we do
>>> here
>>> is a patch to include it.
>>>
>>
>>
>> Unless I'm mistaken, all of the FreeBSD code is under the 3 clause
>> license.
>>
>> However, the easiest way to find out is to look at the header of the
>> files that you borrowed code from.
>>
>> We don't want the 4 clause unless necessary.
>>
>
> I C&P'd this directly from the file in question:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/mkdir/mkdir.c?rev=1.27&content-type=text/x-cvsweb-markup
>
>
> Maybe the FreeBSD guys haven't updated all their notices correctly?
> This notice has been unchanged in this file since 1994.
>
http://www.freebsd.org/copyright/license.html shows they are indeed out
of date. Here's a patch with the advertising clause deleted from the notice.

cheers

andrew


Index: initdb.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/initdb/initdb.c,v
retrieving revision 1.10
diff -c -w -r1.10 initdb.c
*** initdb.c    14 Nov 2003 18:32:34 -0000    1.10
--- initdb.c    17 Nov 2003 19:43:22 -0000
***************
*** 47,52 ****
--- 47,85 ----
   *-------------------------------------------------------------------------
   */

+ /*-------------------------------------------------------------------------
+  * The following copyright notice applies to the portions of the code
+  * borrowed from FreeBSD in the function mkdir_p():
+  *
+  * Copyright (c) 1983, 1992, 1993
+  *    The Regents of the University of California.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  *-------------------------------------------------------------------------
+  */
+
  #include "postgres_fe.h"

  #include <dirent.h>

Re: initdb copyright notice

От
Bruce Momjian
Дата:
I have grabbed code from NetBSD before, and I just mention that fact at
the top of the file.  There is no need to repeat their license as it is
the same as our license.

I just added the last line:

 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 * Portions taken from FreeBSD.

---------------------------------------------------------------------------

Andrew Dunstan wrote:
> I wrote:
>
> > Rod Taylor wrote:
> >
> >> On Mon, 2003-11-17 at 14:11, Andrew Dunstan wrote:
> >>
> >>
> >>> Neil Conway asked me if we need a copyright notice to cover the code I
> >>> borrowed from FreeBSD in initdb.c. I wasn't sure, but in case we do
> >>> here
> >>> is a patch to include it.
> >>>
> >>
> >>
> >> Unless I'm mistaken, all of the FreeBSD code is under the 3 clause
> >> license.
> >>
> >> However, the easiest way to find out is to look at the header of the
> >> files that you borrowed code from.
> >>
> >> We don't want the 4 clause unless necessary.
> >>
> >
> > I C&P'd this directly from the file in question:
> >
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/mkdir/mkdir.c?rev=1.27&content-type=text/x-cvsweb-markup
> >
> >
> > Maybe the FreeBSD guys haven't updated all their notices correctly?
> > This notice has been unchanged in this file since 1994.
> >
> http://www.freebsd.org/copyright/license.html shows they are indeed out
> of date. Here's a patch with the advertising clause deleted from the notice.
>
> cheers
>
> andrew
>
>

> Index: initdb.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/initdb/initdb.c,v
> retrieving revision 1.10
> diff -c -w -r1.10 initdb.c
> *** initdb.c    14 Nov 2003 18:32:34 -0000    1.10
> --- initdb.c    17 Nov 2003 19:43:22 -0000
> ***************
> *** 47,52 ****
> --- 47,85 ----
>    *-------------------------------------------------------------------------
>    */
>
> + /*-------------------------------------------------------------------------
> +  * The following copyright notice applies to the portions of the code
> +  * borrowed from FreeBSD in the function mkdir_p():
> +  *
> +  * Copyright (c) 1983, 1992, 1993
> +  *    The Regents of the University of California.  All rights reserved.
> +  *
> +  * Redistribution and use in source and binary forms, with or without
> +  * modification, are permitted provided that the following conditions
> +  * are met:
> +  * 1. Redistributions of source code must retain the above copyright
> +  *    notice, this list of conditions and the following disclaimer.
> +  * 2. Redistributions in binary form must reproduce the above copyright
> +  *    notice, this list of conditions and the following disclaimer in the
> +  *    documentation and/or other materials provided with the distribution.
> +  * 3. Neither the name of the University nor the names of its contributors
> +  *    may be used to endorse or promote products derived from this software
> +  *    without specific prior written permission.
> +  *
> +  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
> +  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> +  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
> +  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> +  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> +  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> +  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> +  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> +  * SUCH DAMAGE.
> +  *-------------------------------------------------------------------------
> +  */
> +
>   #include "postgres_fe.h"
>
>   #include <dirent.h>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: initdb copyright notice

От
Andrew Dunstan
Дата:
Bruce Momjian wrote:

>I have grabbed code from NetBSD before, and I just mention that fact at
>the top of the file.  There is no need to repeat their license as it is
>the same as our license.
>
>I just added the last line:
>
> * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
> * Portions Copyright (c) 1994, Regents of the University of California
> * Portions taken from FreeBSD.
>
>
>
OK, cool.

andrew


Re: initdb copyright notice

От
Neil Conway
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I have grabbed code from NetBSD before, and I just mention that fact at
> the top of the file.  There is no need to repeat their license as it is
> the same as our license.

src/port/qsort.c is wrong, then: (a) it includes the full NetBSD
copyright/warranty statement (b) it claims to be covered by the 4
clause BSD license.

A quick grep of the source tree indicates that the following files
claim to be covered by the 4 clause BSD license:

$ grep -rlI 'This product includes software developed' *
contrib/mysql/my2pg.pl
contrib/pgcrypto/README.pgcrypto
contrib/pgcrypto/blf.c
contrib/pgcrypto/blf.h
src/backend/port/darwin/system.c
src/backend/port/dynloader/freebsd.c
src/backend/port/dynloader/netbsd.c
src/backend/port/dynloader/openbsd.c
src/backend/utils/mb/wstrcmp.c
src/backend/utils/mb/wstrncmp.c
src/port/crypt.c
src/port/getopt.c
src/port/getopt_long.c
src/port/inet_aton.c
src/port/qsort.c
src/port/snprintf.c
src/port/strtol.c
src/port/strtoul.c

-Neil


Re: initdb copyright notice

От
Bruce Momjian
Дата:
Yes, in cases where I take the entire file unchanged, I don't change the
copyright, but I think we can take the copyright of the project rather
than those of the individual files.

---------------------------------------------------------------------------

Neil Conway wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I have grabbed code from NetBSD before, and I just mention that fact at
> > the top of the file.  There is no need to repeat their license as it is
> > the same as our license.
>
> src/port/qsort.c is wrong, then: (a) it includes the full NetBSD
> copyright/warranty statement (b) it claims to be covered by the 4
> clause BSD license.
>
> A quick grep of the source tree indicates that the following files
> claim to be covered by the 4 clause BSD license:
>
> $ grep -rlI 'This product includes software developed' *
> contrib/mysql/my2pg.pl
> contrib/pgcrypto/README.pgcrypto
> contrib/pgcrypto/blf.c
> contrib/pgcrypto/blf.h
> src/backend/port/darwin/system.c
> src/backend/port/dynloader/freebsd.c
> src/backend/port/dynloader/netbsd.c
> src/backend/port/dynloader/openbsd.c
> src/backend/utils/mb/wstrcmp.c
> src/backend/utils/mb/wstrncmp.c
> src/port/crypt.c
> src/port/getopt.c
> src/port/getopt_long.c
> src/port/inet_aton.c
> src/port/qsort.c
> src/port/snprintf.c
> src/port/strtol.c
> src/port/strtoul.c
>
> -Neil
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: initdb copyright notice

От
Neil Conway
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I don't change the copyright, but I think we can take the copyright
> of the project rather than those of the individual files.

So can we remove the offending license clauses, then?

Also, it's worth noting that the license in 'COPYRIGHT' is not exactly
the same as the 3 clause BSD license the BSDs are licensed under,
which is:

---
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.
  3. Neither the name of the University nor the names of its
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.
---

(from http://www.netbsd.org/Goals/redistribution.html)

For example, the 3rd clause is no where to be found in our
license. Not being a lawyer, I'm not sure how significant this is.

-Neil


Re: initdb copyright notice

От
Bruce Momjian
Дата:
I think there was an updated BSD license approved by Berkeley that we
are using.

If we took the file unchanged, I would not remove the copyright because
it is the file _unchanged_, no?

---------------------------------------------------------------------------

Neil Conway wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I don't change the copyright, but I think we can take the copyright
> > of the project rather than those of the individual files.
>
> So can we remove the offending license clauses, then?
>
> Also, it's worth noting that the license in 'COPYRIGHT' is not exactly
> the same as the 3 clause BSD license the BSDs are licensed under,
> which is:
>
> ---
> Redistribution and use in source and binary forms, with or without
> modification, are permitted provided that the following conditions
> are met:
>   1. Redistributions of source code must retain the above copyright
>      notice, this list of conditions and the following disclaimer.
>   2. Redistributions in binary form must reproduce the above copyright
>      notice, this list of conditions and the following disclaimer in
>      the documentation and/or other materials provided with the
>      distribution.
>   3. Neither the name of the University nor the names of its
>      contributors may be used to endorse or promote products derived
>      from this software without specific prior written permission.
> ---
>
> (from http://www.netbsd.org/Goals/redistribution.html)
>
> For example, the 3rd clause is no where to be found in our
> license. Not being a lawyer, I'm not sure how significant this is.
>
> -Neil
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: initdb copyright notice

От
Manfred Spraul
Дата:
Neil Conway wrote:

>A quick grep of the source tree indicates that the following files
>claim to be covered by the 4 clause BSD license:
>
>$ grep -rlI 'This product includes software developed' *
>contrib/mysql/my2pg.pl
>contrib/pgcrypto/README.pgcrypto
>contrib/pgcrypto/blf.c
>
You must be careful with 3 clause vs. 4 clause BSD licenses: The
advertising clause for UC Berkeley is now void, but all other
advertising clauses are still in force.
i.e. blf.c contains the line "This product includes software developed
by Niels Provos", and that must be obeyed.

--
    Manfred


Re: initdb copyright notice

От
Neil Conway
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think there was an updated BSD license approved by Berkeley that
> we are using.

I think this is an area where we need a higher degree of certainty
than that.

> If we took the file unchanged, I would not remove the copyright
> because it is the file _unchanged_, no?

It's the license, not the copyright attribution, that is the
question. I also don't see how it makes any difference whether the
files are modified (although at least some of these files _have_ been
modified since being imported: e.g. src/port/qsort.c).

To summarize, my understanding is that there are two problems:

   (1) Some of the files in the main source tree are 4 clause
       BSD. Since PostgreSQL is "derived" from these files, we fall
       under its licensing restrictions, namely the advertising
       clause.

       We can solve this by getting the license on these files changed
       to 3 clause BSD, or by removing the files from the
       tree. Checking the current NetBSD CVS tree, it seems that they
       switched to 3 clause BSD at some point after we imported the
       files in question:

           http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdlib/qsort.c

       So it seems kosher to change the license on the NetBSD-derived
       files to 3 clause BSD. That leaves the contrib/ stuff, but
       since we still have GPL licensed code in there, I don't think
       we need worry about it.

   (2) Is the 3 clause BSD license identical to the PostgreSQL
       license? It looks superficially dissimilar to me, but Bruce
       thinks that ours is an "updated" version of the BSD license. If
       that's the case we should be okay; if it's not, we may not
       be. This needs to be confirmed.

(And, of course, IANAL...)

-Neil


Re: initdb copyright notice

От
Andrew Dunstan
Дата:

Neil Conway wrote:

>To summarize, my understanding is that there are two problems:
>
>   (1) Some of the files in the main source tree are 4 clause
>       BSD. Since PostgreSQL is "derived" from these files, we fall
>       under its licensing restrictions, namely the advertising
>       clause.
>
>
>

I don't believe this is true, as UC have apparently given a blanket
waiver of the advertising clause and authorized its removal.

Of course an advertising clause that referred to a party other than the
Regents of UC would still apply,

cheers

andrew


Re: initdb copyright notice

От
Bruce Momjian
Дата:
Neil Conway wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I think there was an updated BSD license approved by Berkeley that
> > we are using.
>
> I think this is an area where we need a higher degree of certainty
> than that.

I think our BSD license version came from FreeBSD.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073