Author: Bernhard M. Wiedemann Date: 2025-01-17 Subject: Avoid auto-updated Copyright without this patch, 122 files in the debugsource package claimed an incorrect Copyright 2025 when no changes had been done in that year. Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=1236006 diff --git a/src/3rdparty/chromium/build/android/gyp/java_cpp_enum_tests.py b/src/3rdparty/chromium/build/android/gyp/java_cpp_enum_tests.py index 1acb57f82..fca3d5d72 100755 --- a/src/3rdparty/chromium/build/android/gyp/java_cpp_enum_tests.py +++ b/src/3rdparty/chromium/build/android/gyp/java_cpp_enum_tests.py @@ -66,7 +66,7 @@ public @interface ClassName { long_comment = ('This is a multiple line comment that is really long. ' 'This is a multiple line comment that is') self.assertEqual( - expected % (date.today().year, java_cpp_utils.GetScriptName(), + expected % (2024, java_cpp_utils.GetScriptName(), long_comment), output) def testParseSimpleEnum(self): diff --git a/src/3rdparty/chromium/gpu/command_buffer/build_cmd_buffer_lib.py b/src/3rdparty/chromium/gpu/command_buffer/build_cmd_buffer_lib.py index 2538596fb..1af7df176 100644 --- a/src/3rdparty/chromium/gpu/command_buffer/build_cmd_buffer_lib.py +++ b/src/3rdparty/chromium/gpu/command_buffer/build_cmd_buffer_lib.py @@ -824,7 +824,7 @@ class CWriter(object): """ def __init__(self, filename, year): self.filename = filename - self._ENTER_MSG = _LICENSE % year + _DO_NOT_EDIT_WARNING % _lower_prefix + self._ENTER_MSG = _LICENSE % 2024 + _DO_NOT_EDIT_WARNING % _lower_prefix self._EXIT_MSG = "" try: os.makedirs(os.path.dirname(filename)) diff --git a/src/3rdparty/chromium/ppapi/generate_ppapi_size_checks.py b/src/3rdparty/chromium/ppapi/generate_ppapi_size_checks.py index a2b8e7db7..3ea6dd0a7 100755 --- a/src/3rdparty/chromium/ppapi/generate_ppapi_size_checks.py +++ b/src/3rdparty/chromium/ppapi/generate_ppapi_size_checks.py @@ -29,7 +29,7 @@ COPYRIGHT_STRING_C = ( * on the architecture for which they are compiled (i.e., 32-bit vs 64-bit). */ -""") % datetime.date.today().year +""") % 2024 class SourceLocation(object): diff --git a/src/3rdparty/chromium/ppapi/generators/idl_gen_wrapper.py b/src/3rdparty/chromium/ppapi/generators/idl_gen_wrapper.py index 5d38eff8c..fd52e44d4 100644 --- a/src/3rdparty/chromium/ppapi/generators/idl_gen_wrapper.py +++ b/src/3rdparty/chromium/ppapi/generators/idl_gen_wrapper.py @@ -91,7 +91,7 @@ class WrapperGen(Generator): */ /* NOTE: this is auto-generated from IDL */ -""" % now.year +""" % 2024 out.Write(c) def GetWrapperMetadataName(self): diff --git a/src/3rdparty/chromium/third_party/dav1d/generate_source.py b/src/3rdparty/chromium/third_party/dav1d/generate_source.py index 9ab5e00b8..06ee01996 100755 --- a/src/3rdparty/chromium/third_party/dav1d/generate_source.py +++ b/src/3rdparty/chromium/third_party/dav1d/generate_source.py @@ -16,8 +16,7 @@ COPYRIGHT = """# Copyright %d The Chromium Authors. All rights reserved. # NOTE: this file is autogenerated by dav1d/generate_sources.py - DO NOT EDIT. -""" % ( - datetime.datetime.now().year) +""" % (2024) # .c files which don't need -DBIT_DEPTH specified for each compilation. DAV1D_ENTRY_POINT_SOURCES = [ diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_aria.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_aria.py index 21382dd9e..b82ff9322 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_aria.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_aria.py @@ -26,7 +26,7 @@ def properties_from_file(file_name): ARIA_PROPERTIES = properties_from_file(READ_LOCATION) now = datetime.datetime.now() with open(GENERATED_LOCATION, "w+") as f: - f.write('// Copyright %d The Chromium Authors. All rights reserved.\n' % now.year) + f.write('// Copyright %d The Chromium Authors. All rights reserved.\n' % 2024) f.write('// Use of this source code is governed by a BSD-style license that can be\n') f.write('// found in the LICENSE file.\n') f.write('\n') diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_supported_css.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_supported_css.py index a20ff5873..76b0e543f 100755 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_supported_css.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_supported_css.py @@ -103,7 +103,7 @@ def properties_from_file(file_name): properties, property_values, aliases_for = properties_from_file(READ_LOCATION) now = datetime.datetime.now() with open(GENERATED_LOCATION, "w+") as f: - f.write('// Copyright %d The Chromium Authors. All rights reserved.\n' % now.year) + f.write('// Copyright %d The Chromium Authors. All rights reserved.\n' % 2024) f.write('// Use of this source code is governed by a BSD-style license that can be\n') f.write('// found in the LICENSE file.\n') f.write('\n') diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/component_bridges/cli.ts b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/component_bridges/cli.ts index 8f653750b..1b569f310 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/component_bridges/cli.ts +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/component_bridges/cli.ts @@ -7,7 +7,7 @@ import * as path from 'path'; import {generateClosureBridge, GeneratedCode} from './generate_closure.js'; import {filePathToTypeScriptSourceFile, walkTree} from './walk_tree.js'; -const chromeLicense = `// Copyright ${new Date().getFullYear()} The Chromium Authors. All rights reserved. +const chromeLicense = `// Copyright 2024 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. `; diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py index 0f606dfae..6cc91ec94 100755 --- a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py +++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py @@ -43,8 +43,7 @@ COPYRIGHT = """# Copyright %d The Chromium Authors. All rights reserved. # NOTE: this file is autogenerated by ffmpeg/chromium/scripts/generate_gn.py -""" % ( - datetime.datetime.now().year) +""" % (2024) GN_HEADER = """import("//build/config/arm.gni") import("ffmpeg_options.gni") diff --git a/src/3rdparty/chromium/third_party/sqlite/scripts/extract_sqlite_api.py b/src/3rdparty/chromium/third_party/sqlite/scripts/extract_sqlite_api.py index ecb4281e9..e157a353f 100755 --- a/src/3rdparty/chromium/third_party/sqlite/scripts/extract_sqlite_api.py +++ b/src/3rdparty/chromium/third_party/sqlite/scripts/extract_sqlite_api.py @@ -349,7 +349,7 @@ header_line = '''// Copyright %s The Chromium Authors. All rights reserved. #ifndef THIRD_PARTY_SQLITE_AMALGAMATION_RENAME_EXPORTS_H_ #define THIRD_PARTY_SQLITE_AMALGAMATION_RENAME_EXPORTS_H_ -''' % datetime.now().strftime('%Y') +''' % "2024" footer_line = ''' #endif // THIRD_PARTY_SQLITE_AMALGAMATION_RENAME_EXPORTS_H_ diff --git a/src/3rdparty/chromium/tools/json_schema_compiler/cpp_util.py b/src/3rdparty/chromium/tools/json_schema_compiler/cpp_util.py index d83f4f403..8738ab4d9 100644 --- a/src/3rdparty/chromium/tools/json_schema_compiler/cpp_util.py +++ b/src/3rdparty/chromium/tools/json_schema_compiler/cpp_util.py @@ -14,7 +14,7 @@ import re CHROMIUM_LICENSE = ( """// Copyright (c) %d The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file.""" % datetime.now().year +// found in the LICENSE file.""" % 2024 ) GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN // %s diff --git a/src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py b/src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py index 148039052..66dd494a8 100644 --- a/src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py +++ b/src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py @@ -897,7 +897,7 @@ class FeatureCompiler(object): replace('.', '_').upper()), 'method_name': self._method_name, 'source_files': str(self._source_files), - 'year': str(datetime.now().year) + 'year': str(2024) }) if not os.path.exists(self._out_root): os.makedirs(self._out_root) diff --git a/src/3rdparty/chromium/tools/json_schema_compiler/js_util.py b/src/3rdparty/chromium/tools/json_schema_compiler/js_util.py index dd373641a..070857a0f 100644 --- a/src/3rdparty/chromium/tools/json_schema_compiler/js_util.py +++ b/src/3rdparty/chromium/tools/json_schema_compiler/js_util.py @@ -23,7 +23,7 @@ class JsUtil(object): def GetLicense(self): """Returns the license text for JS extern and interface files. """ - return (LICENSE % datetime.now().year) + return (LICENSE % 2024) def GetInfo(self, tool): """Returns text describing how the file was generated. diff --git a/src/3rdparty/chromium/tools/json_to_struct/json_to_struct.py b/src/3rdparty/chromium/tools/json_to_struct/json_to_struct.py index f3668d065..bc3813c53 100755 --- a/src/3rdparty/chromium/tools/json_to_struct/json_to_struct.py +++ b/src/3rdparty/chromium/tools/json_to_struct/json_to_struct.py @@ -219,7 +219,7 @@ def GenerateStruct(basepath, output_root, namespace, schema, description, outputted files. year: Year to display next to the copy-right in the header. """ - year = int(year) if year else datetime.now().year + year = int(year) if year else 2024 head = HEAD % (year, schema_filename, description_filename) _GenerateH(basepath, output_root, head, namespace, schema, description) _GenerateCC(basepath, output_root, head, namespace, schema, description)