Linutronix / elbe

Embedded Linux Build Environment
https://elbe-rfs.org
GNU General Public License v3.0
170 stars 59 forks source link

How to ignore missing license file in packages? #353

Closed coveritytest closed 2 years ago

coveritytest commented 2 years ago

How can I ignore missing license files in packages, so that the build does not fail:

[ERROR] Error while processing license file /var/cache/elbe/9f1f5d75-b96c-4465-a50c-a6b790d8f1a8/chroot/usr/share/doc/some-package/copyright
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/elbepack/efilesystem.py", line 203, in write_licenses
    with io.open(copyright_fname, "r",
FileNotFoundError: [Errno 2] No such file or directory: '/var/cache/elbe/9f1f5d75-b96c-4465-a50c-a6b790d8f1a8/chroot/usr/share/doc/some-package/copyright'
bgermann commented 2 years ago

You add the required copyright file to that package.

coveritytest commented 2 years ago

If it was my package sure, but if those packages are not under my control it's a problem. And it should not be an error rather a warning as it's not critical.

bgermann commented 2 years ago

It is critical because this is a very essential file. If you give a hint which package this is I can maybe help.

coveritytest commented 2 years ago

The cuda suite has a bunch of packages with missing copyright files, for example the following packages:

cuda
cuda-11-6
cuda-command-line-tools-11-6
cuda-compiler-11-6
cuda-drivers
cuda-drivers-510
cuda-libraries-11-6
cuda-libraries-dev-11-6
cuda-nsight-compute-11-6
cuda-nsight-systems-11-6
cuda-runtime-11-6
cuda-toolkit-11-6
cuda-tools-11-6
cuda-visual-tools-11-6
libcufile-dev-11-6
nsight-systems-2021.5.2

Sure it's an important file, but it does not affect the functionality in any way.

bgermann commented 2 years ago

Why don't you use https://tracker.debian.org/pkg/nvidia-cuda-toolkit? Alternatively, please post a patch for this that makes this a warning.

coveritytest commented 2 years ago

Mainly because a certain version is needed. Will post a patch.

coveritytest commented 2 years ago

Do you want an attribute in <pkg-list> to mark packages where we want to skip the license file or just write no license file at all, if none is found?

bgermann commented 2 years ago

skip the copyright file and put a warning that it did not exist.

coveritytest commented 2 years ago

Would you please consider to bump elbe version to 14.6.2 with the last commit 338a05e? This would help us to use this (for us) important feature with Debian installations.

bgermann commented 2 years ago

There is more involved in the release process and I would like to get some more stuff in. Do not expect a release before 15 Dec.

coveritytest commented 2 years ago

Okay, will use master so long.