On 6/29/07, Karl Berry <[EMAIL PROTECTED]> wrote:
OTOH, Mr. Licensing (AKA, Brett Smith) has said that they are incompatible,
so you cannot mix them up in the same program.
What Brett has said as far as I've seen is that GPLv2 and GPLv3 are
incompatible, but "GPLv2 or later" code can be distributed (as GPLv3)
with GPLv3 (or later) code. It is the distributions without the "or
later" that are problematic.
I enclose a patch which adds an option to gnulib-tool to modify the
copyright banners of the Gnulib code to say "version 3". This allows
projects which treat Gnulib files as generated code to import and
reimport without reverting part of the source to GPL version 2. I
propose to use this facility to allow findutils to migrate to GPL
version 3 without needing lots of hand-editing every time I update
gnulib from CVS.
The patch is attached rather than appended in order to avoid space/tab
problems, but the change log entry appears right here:
2007-06-30 James Youngman <[EMAIL PROTECTED]>
Support GPL v3 in a way which is convenient for apps which treat
gnulib files as generated source files.
* gnulib-tool: New option, --gpl3, which transforms licenses from
GPL 2 to GPL 3 when importing.
* doc/gnulib-intro.texi (Copyright): Document it.
* doc/gnulib-tool.texi (Modified imports): Ditto.
Regards,
James.
2007-06-30 James Youngman <[EMAIL PROTECTED]>
Support GPL v3 in a way which is convenient for apps which treat
gnulib files as generated source files.
* gnulib-tool: New option, --gpl3, which transforms licenses from
GPL 2 to GPL 3 when importing.
* doc/gnulib-intro.texi (Copyright): Document it.
* doc/gnulib-tool.texi (Modified imports): Ditto.
Index: gnulib-tool
===================================================================
RCS file: /sources/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.233
diff -u -p -r1.233 gnulib-tool
--- gnulib-tool 28 May 2007 15:46:55 -0000 1.233
+++ gnulib-tool 30 Jun 2007 16:25:34 -0000
@@ -150,6 +150,7 @@ Options for --import:
--avoid=MODULE Avoid including the given MODULE. Useful if you
have code that provides equivalent functionality.
This option can be repeated.
+ --gpl3 Modify license template from GPL v2 to GPL v3.
--lgpl Abort if modules aren't available under the LGPL.
Also modify license template from GPL to LGPL.
--makefile-name=NAME Name of makefile in automake syntax in the
@@ -424,6 +425,7 @@ func_ln_if_changed ()
# - inctests true if --with-tests was given, blank otherwise
# - avoidlist list of modules to avoid, from --avoid
# - lgpl true if --lgpl was given, blank otherwise
+# - gpl3 true if --gpl3 was given, blank otherwise
# - makefile_name from --makefile-name
# - libtool true if --libtool was given, false if --no-libtool was
# given, blank otherwise
@@ -446,6 +448,7 @@ func_ln_if_changed ()
auxdir=
inctests=
avoidlist=
+ gpl3=
lgpl=
makefile_name=
libtool=
@@ -579,6 +582,9 @@ func_ln_if_changed ()
arg=`echo "X$1" | sed -e 's/^X--avoid=//'`
func_append avoidlist " $arg"
shift ;;
+ --gpl3 )
+ gpl3=true
+ shift ;;
--lgpl )
lgpl=true
shift ;;
@@ -639,6 +645,10 @@ func_ln_if_changed ()
esac
done
+ if test -n "$lgpl" && test -n "$gpl3"; then
+ echo "gnulib-tool: the --lgpl and --gpl3 options are incompatible." 1>&2
+ func_exit 1
+ fi
if test "$mode" = update; then
if test $# != 0; then
echo "gnulib-tool: too many arguments in 'update' mode" 1>&2
@@ -650,7 +660,8 @@ func_ln_if_changed ()
if test -n "$local_gnulib_dir" || test -n "$supplied_libname" \
|| test -n "$sourcebase" || test -n "$m4base" \
|| test -n "$docbase" || test -n "$testsbase" || test -n "$auxdir" \
- || test -n "$inctests" || test -n "$avoidlist" || test -n "$lgpl" \
+ || test -n "$inctests" || test -n "$avoidlist" \
+ || test -n "$lgpl" || test -n "$gpl3" \
|| test -n "$makefile_name" || test -n "$macro_prefix"; then
echo "gnulib-tool: invalid options for 'update' mode" 1>&2
echo "Try 'gnulib-tool --help' for more information." 1>&2
@@ -1545,6 +1556,7 @@ func_emit_initmacro_done ()
# - auxdir directory relative to destdir where to place build aux files
# - inctests true if --with-tests was given, blank otherwise
# - avoidlist list of modules to avoid, from --avoid
+# - gpl3 true if library's license shall be GPL v3, blank to leave it unchanged
# - lgpl true if library's license shall be LGPL, blank otherwise
# - makefile_name from --makefile-name
# - libtool true if --libtool was given, false if --no-libtool was
@@ -1568,6 +1580,7 @@ func_import ()
cached_testsbase=
cached_inctests=
cached_libname=
+ cached_gpl=
cached_lgpl=
cached_makefile_name=
cached_libtool=
@@ -1609,6 +1622,9 @@ func_import ()
/gl_LGPL/ {
s,^.*$,cached_lgpl=true,p
}
+ /gl_GPL3/ {
+ s,^.*$,cached_gpl3=true,p
+ }
/gl_MAKEFILE_NAME(/ {
s,^.*gl_MAKEFILE_NAME([[ ]*\([^])]*\).*$,cached_makefile_name="\1",p
}
@@ -1706,6 +1722,10 @@ func_import ()
if test -z "$lgpl"; then
lgpl="$cached_lgpl"
fi
+ # Require GPL3 if specified either way.
+ if test -z "$gpl3"; then
+ gpl3="$cached_gpl3"
+ fi
# The makefile_name defaults to the cached one.
if test -z "$makefile_name"; then
makefile_name="$cached_makefile_name"
@@ -1768,6 +1788,12 @@ func_import ()
s/version 2\([ ,]\)/version 2.1\1/g
'
fi
+ if test -n "gpl3"; then
+ # Update license.
+ sed_transform_lib_file=$sed_transform_lib_file'
+ s/version 2\([ ,]\)/version 3\1/g
+ '
+ fi
# Determine final file list.
func_modules_to_filelist
Index: doc/gnulib-intro.texi
===================================================================
RCS file: /sources/gnulib/gnulib/doc/gnulib-intro.texi,v
retrieving revision 1.7
diff -u -p -r1.7 gnulib-intro.texi
--- doc/gnulib-intro.texi 16 Jan 2007 01:14:28 -0000 1.7
+++ doc/gnulib-intro.texi 30 Jun 2007 16:25:34 -0000
@@ -262,6 +262,14 @@ passing the option @samp{--lgpl} to @cod
replace the GPL header with an LGPL header while copying the source
files to your package.
+At the moment the parts of Gnulib licensed under the GNU General
+Public License are licensed under version 2 of the GPL or later. If
+you want to use Gnulib code in a program which is itself licensed
+under GPL version 3, you can use @code{gnulib-tool --gpl3}, which
+modifies the version of the GPL in the Gnulib source files from 2 to
+3 as the files are imported. The version number is the only part of
+the copyright banner which is updated.
+
Keep in mind that when you submit patches to files in Gnulib, you should
license them under a compatible license. This means that sometimes the
contribution will have to be LGPL, if the original file is available
Index: doc/gnulib-tool.texi
===================================================================
RCS file: /sources/gnulib/gnulib/doc/gnulib-tool.texi,v
retrieving revision 1.15
diff -u -p -r1.15 gnulib-tool.texi
--- doc/gnulib-tool.texi 16 May 2007 10:07:20 -0000 1.15
+++ doc/gnulib-tool.texi 30 Jun 2007 16:25:34 -0000
@@ -309,6 +309,10 @@ unit test files. Corresponds to the @sa
The argument is the name of the library to be created. Corresponds to the
@samp{--lib} command line argument.
[EMAIL PROTECTED] gl_GPL3
+The presence of this macro corresponds to the @samp{--gpl3} command line
+argument. It takes no arguments.
+
@item gl_LGPL
The presence of this macro corresponds to the @samp{--lgpl} command line
argument. It takes no arguments.