update-copyright.py --this-year FAILs on two spots in the modula2
directories.
One is gpl_v3_without_node.texi, I think that is similar to other
license files which we already exclude from updates.
And the other is GmcOptions.cc, which has lines like
mcPrintf_printf0 ((const char *) "Copyright ", 10);
mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1));
mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1));
which update-copyhright.py obviously can't grok. The file is generated
and doesn't contain normal Copyright year which should be updated, so I think
it is also ok to skip it.
2024-01-03 Jakub Jelinek <jakub@redhat.com>
* update-copyright.py (GenericFilter): Skip gpl_v3_without_node.texi.
(GCCFilter): Skip GmcOptions.cc.
As mentioned on IRC or in PR108413, the last update-copyright.py --this year
failed and that is why we are in a strange state where some copyrights have
been updated and others have not.
The full list of errors I got was I think:
gcc/m2/mc-boot/GmcOptions.c: unrecognised copyright: comment (f, (const char *) "Copyright (C) ''2021'' Free Software Foundation, Inc.", 53);
gcc/m2/mc-boot/GmcOptions.c: unrecognised copyright: comment (f, (const char *) "Copyright (C) ''2021'' Free Software Foundation, Inc.", 53);
gcc/testsuite/gm2/switches/pedantic-params/pass/Strings.mod: unrecognised copyright holder: Faculty of Information Technology,
gcc/testsuite/gm2/switches/pedantic-params/pass/Strings2.mod: unrecognised copyright holder: Faculty of Information Technology,
libphobos/libdruntime/__builtins.di: unrecognised copyright: * Copyright: Copyright Digital Mars 2022
libstdc++-v3/src/c++17/fast_float/fast_float.h: unrecognised copyright holder: The fast_float authors
libstdc++-v3/include/c_compatibility/stdatomic.h: unrecognised copyright holder: The GCC developers
The following patch deals with the gcc/testsuite/gm2 ones and
with the fast_float.h one, ok for trunk?
Not really sure what we should do in the GmcOptions.c case
(perhaps obfuscate it in the source somehow by splitting
the string literals into different substrings
Perhaps "Copy" "right (" "C) ''..." would do it? Or do we want
to bump there each year (manually or by the script)?
E.g. in gcc.cc we have
printf ("Copyright %s 2023 Free Software Foundation, Inc.\n",
_("(C)"));
which also prints (C) nicer in Unicode if possible and is updated
by hand each year.
I have no idea about the libphobos case, we have tons of
libphobos/src/std/format/spec.d:Copyright: Copyright The D Language Foundation 2000-2013.
libphobos/src/std/random.d:Copyright: Copyright Andrei Alexandrescu 2008 - 2009, Joseph Rushton Wakeling 2012.
etc. lines and those aren't reported as errors.
And the last one is that I think for The GCC developers we should treat it
similarly like FSF and bump copyright on it.
Would
canon_gcc = 'The GCC developers'
self.add_package_author ('The GCC developers', canon_gcc)
self.add_package_author ('The GCC Developers', canon_gcc)
or something similar do the trick?
2023-01-16 Jakub Jelinek <jakub@redhat.com>
PR other/108413
* update-copyright.py (TestsuiteFilter): Add .mod and .rs extensions.
(GCCCopyright): Add 'The fast_float authors' as external author.
Running 'contrib/update-copyright.py' currently fails:
[...]
Traceback (most recent call last):
File "contrib/update-copyright.py", line 365, in update_copyright
canon_form = self.canonicalise_years (dir, filename, filter, years)
File "contrib/update-copyright.py", line 270, in canonicalise_years
(min_year, max_year) = self.year_range (years)
File "contrib/update-copyright.py", line 253, in year_range
year_list = [self.parse_year (year)
File "contrib/update-copyright.py", line 253, in <listcomp>
year_list = [self.parse_year (year)
File "contrib/update-copyright.py", line 250, in parse_year
raise self.BadYear (string)
TypeError: exceptions must derive from BaseException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "contrib/update-copyright.py", line 796, in <module>
GCCCmdLine().main()
File "contrib/update-copyright.py", line 527, in main
self.copyright.process_tree (dir, filter)
File "contrib/update-copyright.py", line 458, in process_tree
self.process_file (dir, filename, filter)
File "contrib/update-copyright.py", line 421, in process_file
res = self.update_copyright (dir, filename, filter,
File "contrib/update-copyright.py", line 366, in update_copyright
except self.BadYear as e:
TypeError: catching classes that do not inherit from BaseException is not allowed
Fix up for commit 3b25e83536
"Port update-copyright.py to Python3".
contrib/
* update-copyright.py (class BadYear): Derive from 'Exception'.
While looking at PR100731, I have noticed the copyright years are 2020-ish
only. This patch adds it to update-copyright.py and updates those.
2021-05-25 Jakub Jelinek <jakub@redhat.com>
contrib/
* update-copyright.py: Add c++tools.
c++tools/
* Makefile.in: Update copyright year.
* configure.ac: Likewise.
* resolver.cc: Likewise.
* resolver.h: Likewise.
* server.cc: Likewise.
(print_version): Update copyright notice date.
2018-11-26 Iain Buclaw <ibuclaw@gdcproject.org>
* update-copyright.py (TestsuiteFilter): Skip .d tests.
(LibPhobosFilter): Add filter for upstream D sources.
(GCCCopyright): Add D Language Foundation as external author.
(GCCCmdLine): Add libphobos.
From-SVN: r266491
contrib/
* update-copyright.py: Add libhsail-rt to self.default_dirs
and call self.add_dir on it. Add Intel Corporation to external
authors.
gcc/
* brig-builtins.def: Update copyright years.
* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
Update copyright years.
gcc/testsuite/
* brig.dg/dg.exp: Update copyright years.
* lib/brig-dg.exp: Update copyright years.
* lib/brig.exp: Update copyright years.
libhsail-rt/
Update copyright years.
libstdc++-v3/
* libsupc++/eh_atomics.h: Update copyright years.
* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.
From-SVN: r244919
contrib/
* update-copyright.py (Copyright.__init__): Add a regexp for
"copyright = u'".
(Copyright.update_copyright): Don't add a space before the year
in that case.
From-SVN: r219692