bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* gnulib-tool: Stop doing license notice replacements
@ 2021-06-04 20:29 Bruno Haible
  2021-06-04 20:49 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Haible @ 2021-06-04 20:29 UTC (permalink / raw)
  To: bug-gnulib

As agreed upon in the thread starting at
<https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00102.html>.


2021-06-04  Bruno Haible  <bruno@clisp.org>

	gnulib-tool: Stop doing license notice replacements.
	* gnulib-tool: Don't document --more-symlinks and --more-hardlinks any
	more.
	(do_copyrights): Remove variable.
	(func_import): Don't perform license updates on imported files any more.
	* pygnulib/GLInfo.py: Don't document --more-symlinks any more.
	* doc/gnulib-intro.texi (Copyright): Document the new situation.
	* doc/gnulib.texi (Module description): Likewise.
	* NEWS: Mention the change.

diff --git a/NEWS b/NEWS
index 98931a3..def6cba 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ Important general notes
 
 Date        Modules         Changes
 
+2021-06-04  (all)           The license notices in source files are now really
+                            stating the effective license, rather than a fake
+                            GPL notice.
+                            gnulib-tool no longer replaces GPL notices in source
+                            files by something else.
+
 2020-08-16  (all)           Automake >= 1.11 and Autoconf >= 2.64 are required.
 
 2019-12-11  Support for     These modules are now supported in C++ mode as well.
diff --git a/doc/gnulib-intro.texi b/doc/gnulib-intro.texi
index 5890223..b88139a 100644
--- a/doc/gnulib-intro.texi
+++ b/doc/gnulib-intro.texi
@@ -455,15 +455,22 @@ proofreading the patch.
 @section Copyright
 
 Most modules are under the GPL@.  Some, mostly modules which can
-reasonably be used in libraries, are under LGPL@.  The source files
-always say "GPL", but the real license specification is in the module
-description file.  If the module description file says "GPL", it means
-"GPLv3+" (GPLv3 or newer, at the licensee's choice); if it says "LGPL",
-it means "LGPLv3+" (LGPLv3 or newer, at the licensee's choice).
+reasonably be used in libraries, are under LGPL@.  Few modules are
+under other licenses, such as LGPLv2+, unlimited, or public domain.
 
-More precisely, the license specification in the module description
-file applies to the files in @file{lib/} and @file{build-aux/}.  Different
-licenses apply to files in special directories:
+If the module description file says "GPL", it means "GPLv3+" (GPLv3
+or newer, at the licensee's choice); if it says "LGPL", it means
+"LGPLv3+" (LGPLv3 or newer, at the licensee's choice).
+
+The source files, more precisely the files in @file{lib/} and
+@file{build-aux/}, are under a license compatible with the module's
+license.  Most often, they are under the same license.  But files can be
+shared among several modules, and in these cases it can happen that a
+source file is under a weaker license than noted in the module
+description --- namely under the weakest license among the licenses of
+the modules that contain the file.
+
+Different licenses apply to files in special directories:
 
 @table @file
 @item modules/
@@ -506,16 +513,16 @@ copy of the license is at @url{https://www.gnu.org/licenses/fdl-1.3.en.html}.
 
 If you want to use some Gnulib modules under LGPL, you can do so by
 passing the option @samp{--lgpl} to @code{gnulib-tool}.  This will
-replace the GPL header with an LGPL header while copying the source
-files to your package.  Similarly, if you want some Gnulib modules
+ensure that all imported modules can be used under the LGPL license.
+Similarly, if you want some Gnulib modules
 under LGPLv2+ (Lesser GPL version 2.1 or newer), you can do so by
 passing the option @samp{--lgpl=2} to @code{gnulib-tool}.
 
 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
-under LGPL@.  You can find out about it by looking for a "License: LGPL"
-information in the corresponding module description.
+under LGPL@.  You can find out about it by looking at the license header
+of the file.
 
 @node Steady Development
 @section Steady Development
diff --git a/doc/gnulib.texi b/doc/gnulib.texi
index 53964aa..869a65b 100644
--- a/doc/gnulib.texi
+++ b/doc/gnulib.texi
@@ -494,7 +494,9 @@ field of the dependencies.
 
 @item License
 This field specifies the license that governs the source code parts of
-this module.  See @ref{Copyright} for details.
+this module.  See @ref{Copyright} for details.  Be sure to place, in every
+source code file, a copyright notice and the appropriate license notice,
+taken from the @file{etc/license-notices/} directory.
 
 @item Maintainer
 This field specifies the persons who have a definitive say about proposed
diff --git a/gnulib-tool b/gnulib-tool
index ad71f6e..237693a 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -332,10 +332,8 @@ Options for --import, --add/remove-import, --update,
 
 Options for --import, --add/remove-import, --update:
 
-  -S, --more-symlinks       Make symbolic links instead of copying files, and
-                            don't replace copyright notices.
-  -H, --more-hardlinks      Make hard links instead of copying files, and
-                            don't replace copyright notices.
+  -S, --more-symlinks       Deprecated; equivalent to --symlink.
+  -H, --more-hardlinks      Deprecated; equivalent to --hardlink.
 
 Report bugs to <bug-gnulib@gnu.org>."
 }
@@ -1128,8 +1126,6 @@ func_determine_path_separator
 # - lcopymode       symlink if --local-symlink was given,
 #                   hardlink if --local-hardlink was given,
 #                   blank otherwise
-# - do_copyrights   blank if --more-symlinks or --more-hardlinks was given,
-#                   true otherwise
 {
   mode=
   destdir=
@@ -1169,7 +1165,6 @@ func_determine_path_separator
   doit=:
   copymode=
   lcopymode=
-  do_copyrights=true
 
   supplied_opts="$@"
 
@@ -1458,11 +1453,9 @@ func_determine_path_separator
         shift ;;
       -S | --more-symlinks | --more-symlink | --more-symlin | --more-symli | --more-syml | --more-sym | --more-sy | --more-s )
         copymode=symlink
-        do_copyrights=
         shift ;;
       -H | --more-hardlinks | --more-hardlink | --more-hardlin | --more-hardli | --more-hardl | --more-hard | --more-har | --more-ha | --more-h )
         copymode=hardlink
-        do_copyrights=
         shift ;;
       --help | --hel | --he )
         func_usage
@@ -4692,8 +4685,6 @@ func_reconstruct_cached_local_gnulib_path ()
 # - doit            : if actions shall be executed, false if only to be printed
 # - copymode        copy mode for files in general
 # - lcopymode       copy mode for files from local_gnulib_path
-# - do_copyrights   true if copyright notices in files should be replaced,
-#                   blank otherwise
 func_import ()
 {
   # Get the cached settings.
@@ -5091,91 +5082,12 @@ s,^\(.................................................[^ ]*\) *,
     fi
   done
   sed_transform_main_lib_file="$sed_transform_lib_file"
-  if test -n "$do_copyrights"; then
-    if test -n "$lgpl"; then
-      # Update license.
-      case "$lgpl" in
-        yes | 3)
-          sed_transform_main_lib_file=$sed_transform_main_lib_file'
-            s/GNU General/GNU Lesser General/g
-            s/General Public License/Lesser General Public License/g
-            s/Lesser Lesser General Public License/Lesser General Public License/g
-          '
-          ;;
-        3orGPLv2)
-          sed_transform_main_lib_file=$sed_transform_main_lib_file'
-            /^ *This program is free software/i\
-   This program is free software: you can redistribute it and\/or\
-   modify it under the terms of either:\
-\
-     * the GNU Lesser General Public License as published by the Free\
-       Software Foundation; either version 3 of the License, or (at your\
-       option) any later version.\
-\
-   or\
-\
-     * the GNU General Public License as published by the Free\
-       Software Foundation; either version 2 of the License, or (at your\
-       option) any later version.\
-\
-   or both in parallel, as here.
-            /^ *This program is free software/,/^$/d
-          '
-          ;;
-        2)
-          sed_transform_main_lib_file=$sed_transform_main_lib_file'
-            s/GNU General/GNU Lesser General/g
-            s/General Public License/Lesser General Public License/g
-            s/Lesser Lesser General Public License/Lesser General Public License/g
-
-            s/version [23]\([ ,]\)/version 2.1\1/g
-          '
-          ;;
-        *) func_fatal_error "invalid value lgpl=$lgpl" ;;
-      esac
-    else
-      # Update license.
-      sed_transform_main_lib_file=$sed_transform_main_lib_file'
-        s/GNU Lesser General/GNU General/g
-        s/Lesser General Public License/General Public License/g
-
-        s/GNU Library General/GNU General/g
-        s/Library General Public License/General Public License/g
-
-        s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
-      '
-    fi
-  fi
 
   # Determine script to apply to auxiliary files that go into $auxdir/.
   sed_transform_build_aux_file=
-  if test -n "$do_copyrights"; then
-    # Update license.
-    sed_transform_build_aux_file=$sed_transform_build_aux_file'
-      s/GNU Lesser General/GNU General/g
-      s/Lesser General Public License/General Public License/g
-
-      s/GNU Library General/GNU General/g
-      s/Library General Public License/General Public License/g
-
-      s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
-    '
-  fi
 
   # Determine script to apply to library files that go into $testsbase/.
   sed_transform_testsrelated_lib_file="$sed_transform_lib_file"
-  if test -n "$do_copyrights"; then
-    # Update license.
-    sed_transform_testsrelated_lib_file=$sed_transform_testsrelated_lib_file'
-      s/GNU Lesser General/GNU General/g
-      s/Lesser General Public License/General Public License/g
-
-      s/GNU Library General/GNU General/g
-      s/Library General Public License/General Public License/g
-
-      s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
-    '
-  fi
 
   # Determine the final file lists.
   func_modules_to_filelist_separately
diff --git a/pygnulib/GLInfo.py b/pygnulib/GLInfo.py
index 7347745..46f1dcc 100644
--- a/pygnulib/GLInfo.py
+++ b/pygnulib/GLInfo.py
@@ -284,8 +284,7 @@ Options for --import, --add/remove-import, --update,
 
 Options for --import, --add/remove-import, --update:
 
-  -S, --more-symlinks       Make symbolic links instead of copying files, and
-                            don't replace copyright notices.
+  -S, --more-symlinks       Deprecated; equivalent to --symlink.
 
 Report bugs to <bug-gnulib@gnu.org>.'''
         return(result)



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: gnulib-tool: Stop doing license notice replacements
  2021-06-04 20:29 gnulib-tool: Stop doing license notice replacements Bruno Haible
@ 2021-06-04 20:49 ` Eric Blake
  2021-06-04 21:11   ` Bruno Haible
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2021-06-04 20:49 UTC (permalink / raw)
  To: Bruno Haible; +Cc: bug-gnulib

On Fri, Jun 04, 2021 at 10:29:22PM +0200, Bruno Haible wrote:
> As agreed upon in the thread starting at
> <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00102.html>.
> 
> 

> +++ b/doc/gnulib-intro.texi
> @@ -455,15 +455,22 @@ proofreading the patch.
>  @section Copyright
>  
>  Most modules are under the GPL@.  Some, mostly modules which can
> -reasonably be used in libraries, are under LGPL@.  The source files
> -always say "GPL", but the real license specification is in the module
> -description file.  If the module description file says "GPL", it means
> -"GPLv3+" (GPLv3 or newer, at the licensee's choice); if it says "LGPL",
> -it means "LGPLv3+" (LGPLv3 or newer, at the licensee's choice).
> +reasonably be used in libraries, are under LGPL@.  Few modules are
> +under other licenses, such as LGPLv2+, unlimited, or public domain.

Would read better as "A few modules are..."

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gnulib-tool: Stop doing license notice replacements
  2021-06-04 20:49 ` Eric Blake
@ 2021-06-04 21:11   ` Bruno Haible
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Haible @ 2021-06-04 21:11 UTC (permalink / raw)
  To: Eric Blake; +Cc: bug-gnulib

Eric Blake wrote:
> > +reasonably be used in libraries, are under LGPL@.  Few modules are
> > +under other licenses, such as LGPLv2+, unlimited, or public domain.
> 
> Would read better as "A few modules are..."

Feel free to commit a correction, here and elsewhere. (I am not a native
English speaker.)

Bruno



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-04 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 20:29 gnulib-tool: Stop doing license notice replacements Bruno Haible
2021-06-04 20:49 ` Eric Blake
2021-06-04 21:11   ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).