unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Confusing license statements in some Gnulib imports
@ 2011-02-09  0:33 Glenn Morris
  2011-02-09  5:51 ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2011-02-09  0:33 UTC (permalink / raw)
  To: emacs-devel; +Cc: Paul Eggert


Forgive me for being lazy and not reporting to Gnulib.
In the Emacs trunk, eg arg-nonnull.h says:

   This program is free software: you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
   by the Free Software Foundation; [...]
   [...]
   See the GNU Lesser General Public License for more details.
               ^^^^^^

This also seems to affect c++defs.h, warn-on-use.h, and lib/getopt_.h
(at the _GL_ARG_NONNULL definition).



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

* Re: Confusing license statements in some Gnulib imports
  2011-02-09  0:33 Confusing license statements in some Gnulib imports Glenn Morris
@ 2011-02-09  5:51 ` Paul Eggert
  2011-02-09 11:22   ` Bruno Haible
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2011-02-09  5:51 UTC (permalink / raw)
  To: Glenn Morris; +Cc: bug-gnulib, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

On 02/08/2011 04:33 PM, Glenn Morris wrote:

> In the Emacs trunk, eg arg-nonnull.h says:
> 
>    This program is free software: you can redistribute it and/or modify it
>    under the terms of the GNU General Public License as published
>                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
>    by the Free Software Foundation; [...]
>    [...]
>    See the GNU Lesser General Public License for more details.
>                ^^^^^^
> 
> This also seems to affect c++defs.h, warn-on-use.h, and lib/getopt_.h
> (at the _GL_ARG_NONNULL definition).

Thanks for reporting this.  This seems to be a systematic problem in
gnulib, because gnulib-tool isn't smart enough (and arguably should
not be smart enough) to rewrite license names that cross line boundaries.
For example, arg-nonnull.h's original source says this:

   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU            
   Lesser General Public License for more details.                              

and the newline between the "GNU" and the "Lesser" causes gnulib-tool
to miss that instance of "GNU Lesser General Public License".

I looked for every instance of this I could find in gnulib, and
came up with the attached patch.  It's mostly mechanical and
it is so large (540 kB) that I compressed it.  I haven't installed
this into gnulib yet since I'd like another pair of eyes to
look at it.

[-- Attachment #2: patch.txt.gz --]
[-- Type: application/x-gzip, Size: 32159 bytes --]

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

* Re: Confusing license statements in some Gnulib imports
  2011-02-09  5:51 ` Paul Eggert
@ 2011-02-09 11:22   ` Bruno Haible
  2011-02-09 17:46     ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Haible @ 2011-02-09 11:22 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Glenn Morris, Paul Eggert, emacs-devel

Hi Paul,

> gnulib-tool isn't smart enough (and arguably should
> not be smart enough) to rewrite license names that cross line boundaries.
> For example, arg-nonnull.h's original source says this:
> 
>    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU            
>    Lesser General Public License for more details.                              
> 
> and the newline between the "GNU" and the "Lesser" causes gnulib-tool
> to miss that instance of "GNU Lesser General Public License".

Thanks for the diagnose. But I disagree about the cure: It's better to teach
gnulib-tool to work regardless of where in the sentence the line break occurs.

  - The words "GNU Lesser General Public License" appear inside a longer
    sentence, and this sentence has to be broken into lines. People will
    always disagree whether line breaking has to happen at column 72, 74,
    79, or 80. And there's an indentation of 3 columns in some files but
    only 2 columns in others. So, it is pretty hopeless to attempt to
    standardize where people will put line breaks in the copyright notice.

  - As a general rule, when one attempts to modify 640 files, one should think
    twice about it.

Here's a proposed fix in gnulib-tool instead. Just as effective.


2011-02-09  Bruno Haible  <bruno@clisp.org>

	gnulib-tool: Make copyright notice adjustment more robust.
	* gnulib-tool (func_import): In sed_transform_main_lib_file,
	sed_transform_build_aux_file, sed_transform_testsrelated_lib_file,
	allow a line break to occur after "GNU" in "GNU [Lesser] General Public
	License".
	Reported by Glenn Morris <rgm@gnu.org> via Paul Eggert.

--- gnulib-tool.orig	Wed Feb  9 12:00:22 2011
+++ gnulib-tool	Wed Feb  9 11:58:30 2011
@@ -3855,11 +3855,16 @@
         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
           '
           ;;
         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
           '
           ;;
@@ -3869,7 +3874,11 @@
       # 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
@@ -3881,7 +3890,11 @@
     # 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
@@ -3892,7 +3905,11 @@
     # 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

-- 
In memoriam Rowland Taylor <http://en.wikipedia.org/wiki/Rowland_Taylor>



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

* Re: Confusing license statements in some Gnulib imports
  2011-02-09 11:22   ` Bruno Haible
@ 2011-02-09 17:46     ` Paul Eggert
  2011-02-09 19:59       ` Bruno Haible
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2011-02-09 17:46 UTC (permalink / raw)
  To: Bruno Haible; +Cc: Glenn Morris, bug-gnulib, emacs-devel

On 02/09/11 03:22, Bruno Haible wrote:
> Here's a proposed fix in gnulib-tool instead. Just as effective.

Yes, thanks, I think that'll work.  Could you please install it?



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

* Re: Confusing license statements in some Gnulib imports
  2011-02-09 17:46     ` Paul Eggert
@ 2011-02-09 19:59       ` Bruno Haible
  0 siblings, 0 replies; 5+ messages in thread
From: Bruno Haible @ 2011-02-09 19:59 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Glenn Morris, bug-gnulib, emacs-devel

Paul,

> Yes, thanks, I think that'll work.  Could you please install it?

I've pushed it now.

Bruno
-- 
In memoriam Rowland Taylor <http://en.wikipedia.org/wiki/Rowland_Taylor>



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

end of thread, other threads:[~2011-02-09 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09  0:33 Confusing license statements in some Gnulib imports Glenn Morris
2011-02-09  5:51 ` Paul Eggert
2011-02-09 11:22   ` Bruno Haible
2011-02-09 17:46     ` Paul Eggert
2011-02-09 19:59       ` Bruno Haible

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).