bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* gnulib-tool.py: Follow gnulib-tool changes, part 29, 30.
@ 2024-02-27  6:04 Collin Funk
  2024-02-27 10:16 ` gnulib-tool.py: Follow gnulib-tool changes, part 31 Collin Funk
  2024-02-27 10:36 ` gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Bruno Haible
  0 siblings, 2 replies; 4+ messages in thread
From: Collin Funk @ 2024-02-27  6:04 UTC (permalink / raw)
  To: bug-gnulib

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

These two TODO entries were pretty simple. One of the ChangeLog
entries listed to a test case Bruno wrote that worked for testing both
of them.

[collin@debian gnulib]$ gnulib-tool.py --create-testdir --dir=testdir-all --single-configure
module parse-datetime2 depends on a module with an incompatible license: gettime
module parse-datetime2 depends on a module with an incompatible license: nstrftime
module parse-datetime2 depends on a module with an incompatible license: parse-datetime
module parse-datetime2 depends on a module with an incompatible license: time_rz
module parse-datetime2 depends on a module with an incompatible license: timespec
module parse-datetime2 depends on a module with an incompatible license: tzset
module ucs4-utf16 depends on a module with an incompatible license: unistr/u16-uctomb
module utf16-ucs4 depends on a module with an incompatible license: unistr/u16-mbtouc
module utf16-ucs4-unsafe depends on a module with an incompatible license: unistr/u16-mbtouc-unsafe

The first patch fixes the parse-datetime2 warnings in the same way
that gnulib-tool does (ready for the release of parse-datetime3). The
second fixes the libunistring ones. Let me know if I missed anything.

Collin

[-- Attachment #2: 0001-gnulib-tool.py-Follow-gnulib-tool-changes-part-29.patch --]
[-- Type: text/x-patch, Size: 3149 bytes --]

From 3d99a44c67c1a7db5bfe210f46ede1eb0700e664 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Mon, 26 Feb 2024 21:22:23 -0800
Subject: [PATCH 1/2] gnulib-tool.py: Follow gnulib-tool changes, part 29.

Follow gnulib-tool change
2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
parse-datetime2: fix licensing

* pygnulib/GLModuleSystem.py (GLModule.getLicense): Handle the special
licensing case for parse-datetime2 or any other module starting with
"parse-datetime". Update comment.
---
 ChangeLog                  | 10 ++++++++++
 gnulib-tool.py.TODO        | 14 --------------
 pygnulib/GLModuleSystem.py |  4 ++--
 3 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d399841e18..7692ac13bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-02-26  Collin Funk  <collin.funk1@gmail.com>
+
+	gnulib-tool.py: Follow gnulib-tool changes, part 29.
+	Follow gnulib-tool change
+	2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
+	parse-datetime2: fix licensing
+	* pygnulib/GLModuleSystem.py (GLModule.getLicense): Handle the special
+	licensing case for parse-datetime2 or any other module starting with
+	"parse-datetime". Update comment.
+
 2024-02-26  Bruno Haible  <bruno@clisp.org>
 
 	gnulib-tool.py: Add more comments.
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index c72746941e..7be0e243e7 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -605,20 +605,6 @@ Date:   Mon Apr 26 23:31:29 2021 -0700
 
 --------------------------------------------------------------------------------
 
-commit 487b9551b63ef936a6be6df38d1c9484cd97810c
-Author: Paul Eggert <eggert@cs.ucla.edu>
-Date:   Sat Mar 6 08:23:48 2021 -0800
-
-    parse-datetime2: fix licensing
-
-    Problem reported by Bruno Haible in:
-    https://lists.gnu.org/r/bug-gnulib/2021-03/msg00017.html
-    * gnulib-tool (func_get_license): Treat parse-datetime2
-    (actually, anything starting with "parse-datetime")
-    like parse-datetime, as far as licenses go.
-
---------------------------------------------------------------------------------
-
 commit 0be855ee827bf7e9043eeb626c4fd847704be2e6
 Author: Bruno Haible <bruno@clisp.org>
 Date:   Tue Dec 29 02:48:31 2020 +0100
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index c6f0eb15c7..787614d38c 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -665,8 +665,8 @@ class GLModule(object):
                         raise GLError(18, str(self))
                     else:  # if not self.config['errors']
                         sys.stderr.write('gnulib-tool: warning: module %s lacks a License\n' % str(self))
-            if str(self) == 'parse-datetime':
-                # This module is under a weaker license only for the purpose of some
+            if str(self).startswith('parse-datetime'):
+                # These modules are under a weaker license only for the purpose of some
                 # users who hand-edit it and don't use gnulib-tool. For the regular
                 # gnulib users they are under a stricter license.
                 result = 'GPL'
-- 
2.39.2


[-- Attachment #3: 0002-gnulib-tool.py-Follow-gnulib-tool-changes-part-30.patch --]
[-- Type: text/x-patch, Size: 4774 bytes --]

From 9411cafcac1cec3dd6d7e8d6476df27070d02269 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Mon, 26 Feb 2024 21:46:30 -0800
Subject: [PATCH 2/2] gnulib-tool.py: Follow gnulib-tool changes, part 30.

Follow gnulib-tool change
2021-05-30  Bruno Haible  <bruno@clisp.org>
Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.

* pygnulib/GLImport.py (GLImport.prepare): Change.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
---
 ChangeLog             |  9 +++++++++
 gnulib-tool.py.TODO   | 11 -----------
 pygnulib/GLImport.py  |  4 ++--
 pygnulib/GLTestDir.py | 10 +++++-----
 4 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7692ac13bc..fdf08ad934 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-02-26  Collin Funk  <collin.funk1@gmail.com>
+
+	gnulib-tool.py: Follow gnulib-tool changes, part 30.
+	Follow gnulib-tool change
+	2021-05-30  Bruno Haible  <bruno@clisp.org>
+	Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
+	* pygnulib/GLImport.py (GLImport.prepare): Change.
+	* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
+
 2024-02-26  Collin Funk  <collin.funk1@gmail.com>
 
 	gnulib-tool.py: Follow gnulib-tool changes, part 29.
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index 7be0e243e7..5f4a134edf 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -581,17 +581,6 @@ Date:   Thu Jun 10 21:26:53 2021 +0200
 
 --------------------------------------------------------------------------------
 
-commit 6d1cba373a8387aa2131e9dc3e94954c5669ca52
-Author: Bruno Haible <bruno@clisp.org>
-Date:   Sun May 30 14:37:06 2021 +0200
-
-    Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
-
-    * modules/* (License): Change.
-    * gnulib-tool (func_import, func_create_testdir): Likewise.
-
---------------------------------------------------------------------------------
-
 commit 4b071c115309079528db7b60e8d2ffb22b129088
 Author: Paul Eggert <eggert@cs.ucla.edu>
 Date:   Mon Apr 26 23:31:29 2021 -0700
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index c69a33deb7..7f332ec760 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -858,8 +858,8 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         compatibilities['all'] = ['GPLv2+ build tool', 'GPLed build tool',
                                   'public domain', 'unlimited',
                                   'unmodifiable license text']
-        compatibilities['3']        = ['LGPLv2+', 'LGPLv3+ or GPLv2', 'LGPLv3+', 'LGPL']
-        compatibilities['3orGPLv2'] = ['LGPLv2+', 'LGPLv3+ or GPLv2']
+        compatibilities['3']        = ['LGPLv2+', 'LGPLv3+ or GPLv2+', 'LGPLv3+', 'LGPL']
+        compatibilities['3orGPLv2'] = ['LGPLv2+', 'LGPLv3+ or GPLv2+']
         compatibilities['2']        = ['LGPLv2+']
         if lgpl:
             for module in main_modules:
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index 3bb99c59cc..bc0b153304 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -204,16 +204,16 @@ class GLTestDir(object):
                                        'public domain', 'unlimited', 'unmodifiable license text']:
                         incompatible = False
                         if requested_licence == 'GPLv3+' or requested_licence == 'GPL':
-                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'LGPLv3+', 'LGPL', 'GPLv2+', 'GPLv3+', 'GPL']:
+                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2+', 'LGPLv3+', 'LGPL', 'GPLv2+', 'GPLv3+', 'GPL']:
                                 incompatible = True
                         elif requested_licence == 'GPLv2+':
-                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'GPLv2+']:
+                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2+', 'GPLv2+']:
                                 incompatible = True
                         elif requested_licence == 'LGPLv3+' or requested_licence == 'LGPL':
-                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2', 'LGPLv3+', 'LGPL']:
+                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2+', 'LGPLv3+', 'LGPL']:
                                 incompatible = True
-                        elif requested_licence == 'LGPLv3+ or GPLv2':
-                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2']:
+                        elif requested_licence == 'LGPLv3+ or GPLv2+':
+                            if license not in ['LGPLv2+', 'LGPLv3+ or GPLv2+']:
                                 incompatible = True
                         elif requested_licence == 'LGPLv2+':
                             if license not in ['LGPLv2+']:
-- 
2.39.2


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

* gnulib-tool.py: Follow gnulib-tool changes, part 31
  2024-02-27  6:04 gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Collin Funk
@ 2024-02-27 10:16 ` Collin Funk
  2024-02-27 10:53   ` Bruno Haible
  2024-02-27 10:36 ` gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Bruno Haible
  1 sibling, 1 reply; 4+ messages in thread
From: Collin Funk @ 2024-02-27 10:16 UTC (permalink / raw)
  To: bug-gnulib

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

And another patch to stop gnulib-tool.py from messing with copyright
headers. This patch is just doing the same as this commit did for
gnulib-tool:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f3553bdefc9202e81996c73686e3ca53cd827417

I assume that this commit somehow escaped being added to
gnulibtool.py.TODO so I've made a reference to it anyways.

Collin

[-- Attachment #2: 0003-gnulib-tool.py-Follow-gnulib-tool-changes-part-31.patch --]
[-- Type: text/x-patch, Size: 7542 bytes --]

From 983e8e95e90b108a2e126bb2a34d3ee0ad3dd721 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Tue, 27 Feb 2024 02:01:59 -0800
Subject: [PATCH 3/3] gnulib-tool.py: Follow gnulib-tool changes, part 31.

Follow gnulib-tool change
2021-06-04  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Stop doing license notice replacements.

* pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key. Add
'gnu_make' key which returns False.
(checkCopyrights): Remove function.
(setSymbolic, resetSymbolic): Remove 'copyrights' key.
* pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
Don't modify license notice on source files.
(GLImport.execute): Remove copyrights variable.
---
 ChangeLog            | 14 ++++++++++++++
 pygnulib/GLConfig.py | 10 +---------
 pygnulib/GLImport.py | 46 --------------------------------------------
 3 files changed, 15 insertions(+), 55 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fdf08ad934..ed517802e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-02-27  Collin Funk  <collin.funk1@gmail.com>
+
+	gnulib-tool.py: Follow gnulib-tool changes, part 31.
+	Follow gnulib-tool change
+	2021-06-04  Bruno Haible  <bruno@clisp.org>
+	gnulib-tool: Stop doing license notice replacements.
+	* pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key. Add
+	'gnu_make' key which returns False.
+	(checkCopyrights): Remove function.
+	(setSymbolic, resetSymbolic): Remove 'copyrights' key.
+	* pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
+	Don't modify license notice on source files.
+	(GLImport.execute): Remove copyrights variable.
+
 2024-02-26  Collin Funk  <collin.funk1@gmail.com>
 
 	gnulib-tool.py: Follow gnulib-tool changes, part 30.
diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py
index bdebf243cc..7c26a4873f 100644
--- a/pygnulib/GLConfig.py
+++ b/pygnulib/GLConfig.py
@@ -274,12 +274,10 @@ class GLConfig(object):
                 return 2.59
             elif key == 'verbosity':
                 return 0
-            elif key == 'copyrights':
-                return True
             elif key in ['modules', 'avoids', 'tests', 'incl_test_categories', 'excl_test_categories']:
                 return list()
             elif key in ['libtool', 'lgpl', 'conddeps', 'symbolic', 'lsymbolic',
-                         'libtests', 'dryrun']:
+                         'libtests', 'dryrun', 'gnu_make']:
                 return False
             elif key == 'vc_files':
                 return None
@@ -960,10 +958,6 @@ class GLConfig(object):
         '''Specify preferred autoconf version. Default value is 2.59.'''
         self.table['ac_version'] = 2.59
 
-    def checkCopyrights(self):
-        '''Check if copyright notices in files should be replaced.'''
-        return self.table['copyrights']
-
     # Define symbolic methods.
     def checkSymbolic(self):
         '''Check if pygnulib will make symbolic links instead of copying files.'''
@@ -973,7 +967,6 @@ class GLConfig(object):
         '''Enable / disable creation of the symbolic links instead of copying files.'''
         if type(value) is bool:
             self.table['symbolic'] = value
-            self.table['copyrights'] = not value
         else:  # if type(value) is not bool
             raise TypeError('value must be a bool, not %s'
                             % type(value).__name__)
@@ -981,7 +974,6 @@ class GLConfig(object):
     def resetSymbolic(self):
         '''Reset creation of the symbolic links instead of copying files.'''
         self.table['symbolic'] = False
-        self.table['copyrights'] = True
 
     # Define lsymbolic methods.
     def checkLSymbolic(self):
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 7f332ec760..0f0f463add 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -781,7 +781,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         docbase = self.config['docbase']
         testsbase = self.config['testsbase']
         lgpl = self.config['lgpl']
-        copyrights = self.config['copyrights']
         libname = self.config['libname']
         makefile_name = self.config['makefile_name']
         conddeps = self.config['conddeps']
@@ -885,12 +884,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
                 print(notice)
 
         # Determine script to apply to imported library files.
-        lgpl2gpl = '''
-      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'''
         sed_transform_lib_file = ''
         if 'config-h' in [ str(module)
                            for module in main_modules ]:
@@ -898,50 +891,12 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         s/^#ifdef[\t ]*HAVE_CONFIG_H[\t ]*$/#if 1/
       '''
         sed_transform_main_lib_file = sed_transform_lib_file
-        if copyrights:
-            if lgpl:  # if lgpl is enabled
-                if lgpl == True or lgpl == '3':
-                    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'''
-                elif lgpl == '3orGPLv2':
-                    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
-            '''
-                elif lgpl == '2':
-                    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'''
-            else:  # if lgpl is disabled
-                sed_transform_main_lib_file += lgpl2gpl
 
         # Determine script to apply to auxiliary files that go into $auxdir/.
         sed_transform_build_aux_file = ''
-        if copyrights:
-            sed_transform_build_aux_file += lgpl2gpl
 
         # Determine script to apply to library files that go into $testsbase/.
         sed_transform_testsrelated_lib_file = sed_transform_lib_file
-        if copyrights:
-            sed_transform_testsrelated_lib_file += lgpl2gpl
 
         # Determine the final file lists.
         main_filelist, tests_filelist = \
@@ -1018,7 +973,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         docbase = self.config['docbase']
         testsbase = self.config['testsbase']
         lgpl = self.config['lgpl']
-        copyrights = self.config['copyrights']
         libname = self.config['libname']
         makefile_name = self.config['makefile_name']
         conddeps = self.config['conddeps']
-- 
2.39.2


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

* Re: gnulib-tool.py: Follow gnulib-tool changes, part 29, 30.
  2024-02-27  6:04 gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Collin Funk
  2024-02-27 10:16 ` gnulib-tool.py: Follow gnulib-tool changes, part 31 Collin Funk
@ 2024-02-27 10:36 ` Bruno Haible
  1 sibling, 0 replies; 4+ messages in thread
From: Bruno Haible @ 2024-02-27 10:36 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Collin Funk

Collin Funk wrote:
> These two TODO entries were pretty simple. One of the ChangeLog
> entries listed to a test case Bruno wrote that worked for testing both
> of them.
> 
> [collin@debian gnulib]$ gnulib-tool.py --create-testdir --dir=testdir-all --single-configure
> module parse-datetime2 depends on a module with an incompatible license: gettime
> module parse-datetime2 depends on a module with an incompatible license: nstrftime
> module parse-datetime2 depends on a module with an incompatible license: parse-datetime
> module parse-datetime2 depends on a module with an incompatible license: time_rz
> module parse-datetime2 depends on a module with an incompatible license: timespec
> module parse-datetime2 depends on a module with an incompatible license: tzset
> module ucs4-utf16 depends on a module with an incompatible license: unistr/u16-uctomb
> module utf16-ucs4 depends on a module with an incompatible license: unistr/u16-mbtouc
> module utf16-ucs4-unsafe depends on a module with an incompatible license: unistr/u16-mbtouc-unsafe
> 
> The first patch fixes the parse-datetime2 warnings in the same way
> that gnulib-tool does (ready for the release of parse-datetime3). The
> second fixes the libunistring ones. Let me know if I missed anything.

Thanks! Applied both patches.

Bruno





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

* Re: gnulib-tool.py: Follow gnulib-tool changes, part 31
  2024-02-27 10:16 ` gnulib-tool.py: Follow gnulib-tool changes, part 31 Collin Funk
@ 2024-02-27 10:53   ` Bruno Haible
  0 siblings, 0 replies; 4+ messages in thread
From: Bruno Haible @ 2024-02-27 10:53 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Collin Funk

Collin Funk wrote:
> And another patch to stop gnulib-tool.py from messing with copyright
> headers. This patch is just doing the same as this commit did for
> gnulib-tool:
> 
> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f3553bdefc9202e81996c73686e3ca53cd827417

Thanks! The gnu_make tweak is unrelated; so, I put it in a separate commit
(and moved it a bit: in GLConfig, the 'gnu_make' property is typically
handled between 'lgpl' and 'makefile_name').

> I assume that this commit somehow escaped being added to
> gnulibtool.py.TODO so I've made a reference to it anyways.

Yes. Somehow my original commit included only part of the needed
pygnulib/* modifications; I missed to add it to the TODO file.

Bruno





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

end of thread, other threads:[~2024-02-27 10:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27  6:04 gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Collin Funk
2024-02-27 10:16 ` gnulib-tool.py: Follow gnulib-tool changes, part 31 Collin Funk
2024-02-27 10:53   ` Bruno Haible
2024-02-27 10:36 ` gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 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).