Message ID | 20240228054427.3447267-1-srinuvasan.a@siemens.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | meta/classes/debianize: Add copyright file to debian folder | expand |
On Wed, 2024-02-28 at 11:14 +0530, 'Srinuvasan A' via isar-users wrote: > From: Srinuvasan A <srinuvasan_a@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 <srinuvasan_a@mentor.com> > --- > .../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" > > 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.debian.org/doc/packaging-manuals/copyright-format/1.0/ > +Upstream-Name: ${PN} > +Upstream-Contact: Mentor Embedded <embedded_support@mentor.com> > +Source: https://github.com/MentorEmbedded/industrial-core > + > +Files: * > +Copyright: 2022, Siemens > +License: Siemens > + . > + 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. NACK! Hi Srinuvasan, please note, that ISAR is an OSS project and there we cannot simply set Siemens internal defaults (also not in an example). Why not add the copyright file (if available) in a similar way as we add the preinst / postinst files? Best regards, Felix > + . > + 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 >
On Wed, 2024-02-28 at 11:14 +0530, 'Srinuvasan A' via isar-users wrote: > From: Srinuvasan A <srinuvasan_a@mentor.com> We can / should ignore this one as the following mail / patch has the same content but a different sender?!? Please send a new version (git format-patch -vX+1) in such cases. Helps us to review patches a lot. Thanks! Best regards, Florian > > 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 <srinuvasan_a@mentor.com> > --- > .../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" > > 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.debian.org/doc/packaging-manuals/copyright-format/1.0/ > +Upstream-Name: ${PN} > +Upstream-Contact: Mentor Embedded <embedded_support@mentor.com> > +Source: https://github.com/MentorEmbedded/industrial-core > + > +Files: * > +Copyright: 2022, Siemens > +License: Siemens > + . > + 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
Le mercredi 28 février 2024 à 06:45:03 UTC+1, Srinuvasan A a écrit : From: Srinuvasan A <srinuv...@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 @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 <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/> bian.org/doc/packaging-manuals/copyright-format/1.0/ <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/> +Upstream-Name: ${PN} ${BPN} +Upstream-Contact: Mentor Embedded <embedded...@mentor.com> ${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
On Thursday, March 14, 2024 at 2:42:24 PM UTC+5:30 Cedric Hombourger wrote: Le mercredi 28 février 2024 à 06:45:03 UTC+1, Srinuvasan A a écrit : From: Srinuvasan A <srinuv...@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 @siemens.com address moving forward Yes after got the special User ID and password am using the siemens account, in this thread itself i changed to siemens ID. 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) Sure, i will add the respective persons for the review. --- .../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 Let me check this one 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 <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/> bian.org/doc/packaging-manuals/copyright-format/1.0/ <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/> +Upstream-Name: ${PN} ${BPN} +Upstream-Contact: Mentor Embedded <embedded...@mentor.com> ${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
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" 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.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ${PN} +Upstream-Contact: Mentor Embedded <embedded_support@mentor.com> +Source: https://github.com/MentorEmbedded/industrial-core + +Files: * +Copyright: 2022, Siemens +License: Siemens + . + 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