From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7340524753523834880 Date: Thu, 14 Mar 2024 05:09:06 -0700 (PDT) From: srinu To: isar-users Message-Id: <13f40102-3123-4d54-a5cc-f94e308b0c26n@googlegroups.com> In-Reply-To: <8576cd93-8ec2-468e-b9f4-0783ffa8486dn@googlegroups.com> References: <20240228054427.3447267-1-srinuvasan.a@siemens.com> <8576cd93-8ec2-468e-b9f4-0783ffa8486dn@googlegroups.com> Subject: Re: [PATCH] meta/classes/debianize: Add copyright file to debian folder MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_63198_768963889.1710418146461" X-TUID: q1bhSoeJtFjs ------=_Part_63198_768963889.1710418146461 Content-Type: multipart/alternative; boundary="----=_Part_63199_1161716882.1710418146461" ------=_Part_63199_1161716882.1710418146461 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thursday, March 14, 2024 at 2:42:24=E2=80=AFPM UTC+5:30 Cedric Hombourge= r wrote: 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 Yes after got the special User ID and password am using the siemens=20 account, in this thread itself i changed to siemens ID.=20 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) Sure, i will add the respective persons for the review.=20 =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 Let me check this one=20 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_63199_1161716882.1710418146461 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Thursday, March 14, 2024 at 2:42:24= =E2=80=AFPM UTC+5:30 Cedric Hombourger wrote:
Le mercredi 28 f=C3=A9vrier 2024 = =C3=A0 06:45:03 UTC+1, Srinuvasan A a =C3=A9crit=C2=A0:
From: Srinuvasan A <srin= uv...@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 @<= a href=3D"http://siemens.com" target=3D"_blank" rel=3D"nofollow">siemens.co= m address moving forward

= =C2=A0 =C2=A0Yes after got the special User ID and password am using the si= emens account, in this thread itself i changed to siemens ID.=C2=A0

please explici= tly cc the main contributors of the "Isar extensions" from our downstream p= roject when upstreaming them (especially when you change them)
th= ey 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)
=C2=A0 =C2=A0 =C2=A0Sure, i will add the respective persons f= or the review.=C2=A0
=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"

<= div>
the license helper in our downstream project was introduced to mak= e 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 debi= an/copyright file (matching that license)
We should add default c= opyright texts for MIT, Apache-2, GPLv2, GPLv2+, GPLv3, etc.=C2=A0

We should use templates (.tmpl) for all OSS licenses we = provide a generic debian/copyright file for
=C2=A0 =C2=A0 =C2=A0Let me check this one=C2=A0


=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: ${MA= INTAINER}=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_63199_1161716882.1710418146461-- ------=_Part_63198_768963889.1710418146461--