Le mercredi 28 février 2024 à 06:45:03 UTC+1, Srinuvasan A a écrit : From: Srinuvasan A In downstream layer we uses copyright files for most of the packages, this is very important for our OSS clearing. User can add the copyright to the required recipe, then the generated packages from the recipes contains the debian/copyright file. Added example copyright file in example-raw recipe. Signed-off-by: Srinuvasan A please use your @siemens.com address moving forward please explicitly cc the main contributors of the "Isar extensions" from our downstream project when upstreaming them (especially when you change them) they will get a chance to review (e.g. I am not subscribed to isar-users and only check the archives once a week or so) --- .../recipes-app/example-raw/example-raw_0.3.bb | 3 ++- .../example-raw/files/default-copyright | 15 +++++++++++++++ meta/classes/debianize.bbclass | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 meta-isar/recipes-app/example-raw/files/default-copyright diff --git a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb index ffa14340..35f4b3d9 100644 --- a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb +++ b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb @@ -9,7 +9,8 @@ DEBIAN_DEPENDS = "adduser, apt (>= 0.4.2)" SRC_URI = "file://README \ file://postinst \ - file://rules" + file://rules \ + file://default-copyright" the license helper in our downstream project was introduced to make it a one-liner for dpkg-raw packages to get a debian/copyright especially when they use "standard" licenses IMO, debianize.bbclass should check ${LICENSE} if it matches a well-known OSS license, add a default debian/copyright file (matching that license) We should add default copyright texts for MIT, Apache-2, GPLv2, GPLv2+, GPLv3, etc. We should use templates (.tmpl) for all OSS licenses we provide a generic debian/copyright file for inherit dpkg-raw diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright b/meta-isar/recipes-app/example-raw/files/default-copyright new file mode 100644 index 00000000..9c04255a --- /dev/null +++ b/meta-isar/recipes-app/example-raw/files/default-copyright @@ -0,0 +1,15 @@ +Format: https://www.de bian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ${PN} ${BPN} +Upstream-Contact: Mentor Embedded ${MAINTAINER} +Source: https://github.com/MentorEmbedded/industrial-core ${HOMEPAGE} + +Files: * +Copyright: 2022, Siemens Copyright: ${MAINTAINER} +License: Siemens Need one template per OSS license, we keep this license in-house + . + This material contains trade secrets or otherwise confidential information + owned by Siemens Industry Software Inc.or its affiliates (collectively, + "Siemens"), or its licensors. Access to and use of this information is strictly + limited as set forth in the Customer's applicable agreements with Siemens. + . + Unpublished work. Copyright 2023 Siemens diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass index 16f3638d..6039e869 100644 --- a/meta/classes/debianize.bbclass +++ b/meta/classes/debianize.bbclass @@ -121,6 +121,10 @@ deb_debianize() { else deb_create_rules fi + # Add the copyright if unpacked sources does not contain copyright file + if [ ! -f ${S}/debian/copyright ] && [ -f ${WORKDIR}/default-copyright ]; then + install -v -m 644 ${WORKDIR}/default-copyright ${S}/debian/copyright + fi # prepend a changelog-entry unless an existing changelog file already # contains an entry with CHANGELOG_V deb_add_changelog -- 2.34.1