summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <bwiedemann@suse.de>2024-10-15 18:50:07 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-10-18 23:39:11 +0300
commitae51d304685787041fdc862d1391d53c2df7d0da (patch)
tree35cf70e6d283b35210813c54226a45eedc0da953
parent2460049b67660500a74537e5d7c073d265122834 (diff)
libcamera: tracepoints: Fix copyright year for reproducible builds
The tracepoints.h file is generated from the tracepoints.h.in template by the gen-tp-header.py script. The template contains a {{year}} placeholder for the copyright year, which the script fills with the current year. This breaks reproducible builds with at least the openSUSE debugsource package. As the gen-tp-header.py script doesn't add any copyrightable contents to the tracepoints.h file, fix this by replacing the {{year}} placeholder with the year of the last copyright-worthy change to tracepoints.h.in. Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--include/libcamera/internal/tracepoints.h.in2
-rwxr-xr-xutils/codegen/gen-tp-header.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/include/libcamera/internal/tracepoints.h.in b/include/libcamera/internal/tracepoints.h.in
index f0962091..385f9f54 100644
--- a/include/libcamera/internal/tracepoints.h.in
+++ b/include/libcamera/internal/tracepoints.h.in
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
- * Copyright (C) {{year}}, Google Inc.
+ * Copyright (C) 2020, Google Inc.
*
* Tracepoints with lttng
*
diff --git a/utils/codegen/gen-tp-header.py b/utils/codegen/gen-tp-header.py
index 83606c32..6769c7ce 100755
--- a/utils/codegen/gen-tp-header.py
+++ b/utils/codegen/gen-tp-header.py
@@ -6,7 +6,6 @@
#
# Generate header file to contain lttng tracepoints
-import datetime
import jinja2
import pathlib
import os
@@ -20,7 +19,6 @@ def main(argv):
output = argv[2]
template = argv[3]
- year = datetime.datetime.now().year
path = pathlib.Path(output).absolute().relative_to(argv[1])
source = ''
@@ -28,7 +26,7 @@ def main(argv):
source += open(fname, 'r', encoding='utf-8').read() + '\n\n'
template = jinja2.Template(open(template, 'r', encoding='utf-8').read())
- string = template.render(year=year, path=path, source=source)
+ string = template.render(path=path, source=source)
f = open(output, 'w', encoding='utf-8').write(string)