[PATCH] Fix copyright year

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Oct 10 10:51:19 CEST 2024


Quoting libcamerabmw+ml at lsmod.de (2024-10-10 08:54:13)
> From: "Bernhard M. Wiedemann" <bwiedemann at suse.de>
> 
> without this patch, openSUSE's debugsource package would vary over time,
> breaking reproducible builds.
> Also a copyright of 2025 is factually wrong,
> because nobody did anything copyright-worthy in that year.

Agreed, I'm still working on my time machine, but it's not ready yet.

But I think that must be an issue on your side, or am I mistaken. Is
there a reference to 2025 within the libcamera code base?

> If updating the year manually is too hard (it is optional anyway),
> using the mtime of input file(s) could work as well.
> 
> The diff was:
> /usr/src/debug/libcamera-0.3.1/x86_64-suse-linux/include/libcamera/internal/tracepoints.h       2024-08-20 09:37:46.000000000 +0200
> @@ -1,6 +1,6 @@
>  /* SPDX-License-Identifier: LGPL-2.1-or-later */
>  /*
> - * Copyright (C) 2024, Google Inc.
> + * Copyright (C) 2025, Google Inc.

This file is autogenerated right? So this 2025 isn't an issue in our
commited code - but a build server with the wrong date at Suse?

> 
> Signed-off-by: Bernhard M. Wiedemann <bwiedemann at suse.de>
> ---
>  utils/codegen/gen-tp-header.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/utils/codegen/gen-tp-header.py b/utils/codegen/gen-tp-header.py
> index 83606c32..0a3fa644 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,7 @@ def main(argv):
>      output = argv[2]
>      template = argv[3]
>  
> -    year = datetime.datetime.now().year
> +    year = 2024

I would rather not hardcode this, as that then becomes the same as we
may as well just remove it if it's worthless (except, I don't know what
the legal issues are for removing a copyright statement so ... I'm not
going there).

If we set it from an mtime which is a good idea, it would probably be
best to do so from the top level meson.build, as that's one file that
can be guaranteed to be the same 'year' as the release. (because I
modify that file to make the release).

Otherwise, you'd have to parse all of the input files and take the
latest mtime. That could be a good option too. In fact that might be
easier as you have a list of those files, while you don't have a
reference to the meson.build...




>      path = pathlib.Path(output).absolute().relative_to(argv[1])
>  
>      source = ''
> -- 
> 2.46.1


More information about the libcamera-devel mailing list