From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7340524753523834880 X-Received: by 2002:a05:622a:1010:b0:42e:c4d6:8861 with SMTP id d16-20020a05622a101000b0042ec4d68861mr103840qte.54.1710407544565; Thu, 14 Mar 2024 02:12:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:622a:1916:b0:42e:db6d:a2e6 with SMTP id w22-20020a05622a191600b0042edb6da2e6ls1082447qtc.0.-pod-prod-07-us; Thu, 14 Mar 2024 02:12:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcblr6aDd4lVRLEeed8QZtFkGaCfrDXHz85SDu4MsRfpl7CA6Vydz7/St+OPjwtUh9Dgyo9eLKMg== X-Received: by 2002:ac8:5cc3:0:b0:42e:f02a:5cba with SMTP id s3-20020ac85cc3000000b0042ef02a5cbamr90893qta.12.1710407543330; Thu, 14 Mar 2024 02:12:23 -0700 (PDT) X-Google-Web-Client: true Date: Thu, 14 Mar 2024 02:12:23 -0700 (PDT) From: Cedric Hombourger To: isar-users Message-Id: <8576cd93-8ec2-468e-b9f4-0783ffa8486dn@googlegroups.com> In-Reply-To: <20240228054427.3447267-1-srinuvasan.a@siemens.com> References: <20240228054427.3447267-1-srinuvasan.a@siemens.com> Subject: Re: [PATCH] meta/classes/debianize: Add copyright file to debian folder MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_171862_1687538113.1710407543065" X-TUID: egsBV1J5RQu1 ------=_Part_171862_1687538113.1710407543065 Content-Type: multipart/alternative; boundary="----=_Part_171863_1090459291.1710407543065" ------=_Part_171863_1090459291.1710407543065 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le mercredi 28 f=C3=A9vrier 2024 =C3=A0 06:45:03 UTC+1, Srinuvasan A a =C3= =A9crit : From: Srinuvasan A =20 In downstream layer we uses copyright files for most of the packages,=20 this is very important for our OSS clearing.=20 User can add the copyright to the required recipe, then the generated=20 packages from the recipes contains the debian/copyright file.=20 Added example copyright file in example-raw recipe.=20 Signed-off-by: Srinuvasan A please use your @siemens.com address moving forward please explicitly cc the main contributors of the "Isar extensions" from=20 our downstream project when upstreaming them (especially when you change=20 them) they will get a chance to review (e.g. I am not subscribed to isar-users=20 and only check the archives once a week or so) =20 ---=20 .../recipes-app/example-raw/example-raw_0.3.bb | 3 ++-=20 .../example-raw/files/default-copyright | 15 +++++++++++++++=20 meta/classes/debianize.bbclass | 4 ++++=20 3 files changed, 21 insertions(+), 1 deletion(-)=20 create mode 100644=20 meta-isar/recipes-app/example-raw/files/default-copyright=20 diff --git a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb=20 b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb=20 index ffa14340..35f4b3d9 100644=20 --- a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb=20 +++ b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb=20 @@ -9,7 +9,8 @@ DEBIAN_DEPENDS =3D "adduser, apt (>=3D 0.4.2)"=20 SRC_URI =3D "file://README \=20 file://postinst \=20 - file://rules"=20 + file://rules \=20 + file://default-copyright" the license helper in our downstream project was introduced to make it a=20 one-liner for dpkg-raw packages to get a debian/copyright especially when= =20 they use "standard" licenses IMO, debianize.bbclass should check ${LICENSE} if it matches a well-known= =20 OSS license, add a default debian/copyright file (matching that license) We should add default copyright texts for MIT, Apache-2, GPLv2, GPLv2+,=20 GPLv3, etc.=20 We should use templates (.tmpl) for all OSS licenses we provide a generic= =20 debian/copyright file for inherit dpkg-raw=20 diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright=20 b/meta-isar/recipes-app/example-raw/files/default-copyright=20 new file mode 100644=20 index 00000000..9c04255a=20 --- /dev/null=20 +++ b/meta-isar/recipes-app/example-raw/files/default-copyright=20 @@ -0,0 +1,15 @@=20 +Format: https://www.de=20 bian.org/doc/packaging-manuals/copyright-format/1.0/=20 +Upstream-Name: ${PN} ${BPN}=20 +Upstream-Contact: Mentor Embedded ${MAINTAINER}=20 +Source: https://github.com/MentorEmbedded/industrial-core ${HOMEPAGE}=20 +=20 +Files: *=20 +Copyright: 2022, Siemens Copyright: ${MAINTAINER}=20 +License: Siemens Need one template per OSS license, we keep this license in-house=20 + .=20 + This material contains trade secrets or otherwise confidential=20 information=20 + owned by Siemens Industry Software Inc.or its affiliates (collectively,= =20 + "Siemens"), or its licensors. Access to and use of this information is=20 strictly=20 + limited as set forth in the Customer's applicable agreements with=20 Siemens.=20 + .=20 + Unpublished work. Copyright 2023 Siemens=20 diff --git a/meta/classes/debianize.bbclass=20 b/meta/classes/debianize.bbclass=20 index 16f3638d..6039e869 100644=20 --- a/meta/classes/debianize.bbclass=20 +++ b/meta/classes/debianize.bbclass=20 @@ -121,6 +121,10 @@ deb_debianize() {=20 else=20 deb_create_rules=20 fi=20 + # Add the copyright if unpacked sources does not contain copyright file= =20 + if [ ! -f ${S}/debian/copyright ] && [ -f ${WORKDIR}/default-copyright ];= =20 then=20 + install -v -m 644 ${WORKDIR}/default-copyright ${S}/debian/copyright=20 + fi=20 # prepend a changelog-entry unless an existing changelog file already=20 # contains an entry with CHANGELOG_V=20 deb_add_changelog=20 --=20 2.34.1=20 ------=_Part_171863_1090459291.1710407543065 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Le mercredi 28 f=C3=A9vrier 2024 =C3=A0 = 06:45:03 UTC+1, Srinuvasan A a =C3=A9crit=C2=A0:
From: Srinuvasan A <s= rinuv...@mentor.com>

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 <srinuv.= ..@mentor.com>

please use your @si= emens.com address moving forward

please explicit= ly cc the main contributors of the "Isar extensions" from our downstream pr= oject when upstreaming them (especially when you change them)
the= y will get a chance to review (e.g. I am not subscribed to isar-users and o= nly check the archives once a week or so)
=C2=A0

---
.../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-c= opyright

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 =3D "adduser, apt (>=3D 0.4.2)"
=20
SRC_URI =3D "file://README \
=09 file://postinst \
-=09 file://rules"
+=09 file://rules \
+=09 file://default-copyright"

th= e 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 ${LIC= ENSE} if it matches a well-known OSS license, add a default debian/copyrigh= t file (matching that license)
We should add default copyright te= xts for MIT, Apache-2, GPLv2, GPLv2+, GPLv3, etc.=C2=A0

We should use templates (.tmpl) for all OSS licenses we provide a g= eneric debian/copyright file for


=20
inherit dpkg-raw
=20
diff --git a/meta-isar/recipes-app/example-raw/files/default-copyrigh= t 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.debian.org/doc/packaging-manuals/copyrigh= t-format/1.0/
+Upstream= -Name: ${PN}
${BPN}=C2=A0

+Upstream-Contact: Mentor Embedded <= embedded...@mentor.com>
${MAINTAINER}=C2=A0

+Source: https://github.com/MentorEmbedded/indu= strial-core
${HOMEPAGE}=C2=A0

+
+Files: *
+Copyright: 2022, Siemens
Copyright: ${MAINTAINER}= =C2=A0

+License: Siemens

Need one template= per OSS license, we keep this license in-house=C2=A0

+ .
+ This material contains trade secrets or otherwise confidential info= rmation
+ owned by Siemens Industry Software Inc.or its affiliates (collectiv= ely,
+ "Siemens"), or its licensors. Access to and use of this information= is strictly
+ limited as set forth in the Customer's applicable agreements with S= iemens.
+ .
+ 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() {
=09else
=09=09deb_create_rules
=09fi
+=09# Add the copyright if unpacked sources does not contain copyrigh= t file
+=09if [ ! -f ${S}/debian/copyright ] && [ -f ${WORKDIR}/defa= ult-copyright ]; then
+=09=09install -v -m 644 ${WORKDIR}/default-copyright ${S}/debian/cop= yright
+=09fi
=09# prepend a changelog-entry unless an existing changelog file alr= eady
=09# contains an entry with CHANGELOG_V
=09deb_add_changelog
--=20
2.34.1

------=_Part_171863_1090459291.1710407543065-- ------=_Part_171862_1687538113.1710407543065--