Message ID | 20240228072206.3556467-1-srinuvasan.a@siemens.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | meta/classes/debianize: Add copyright file to debian folder | expand |
On 28.02.24 08:22, srinuvasan.a via isar-users wrote: > From: Srinuvasan A <srinuvasan.a@siemens.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@siemens.com> > --- > .../recipes-app/example-raw/example-raw_0.3.bb | 3 ++- > .../example-raw/files/default-copyright.tmpl | 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.tmpl > > 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..b4dfaa4d 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.tmpl" > > inherit dpkg-raw > > diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > new file mode 100644 > index 00000000..9c04255a > --- /dev/null > +++ b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > @@ -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 Somehow I can't imagine you actually want to have this merged into an open source project, do you? ;) Jan > diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass > index 7de98673..5b9cd9dc 100644 > --- a/meta/classes/debianize.bbclass > +++ b/meta/classes/debianize.bbclass > @@ -112,6 +112,10 @@ deb_debianize() { > else > deb_create_rules > fi > + # Add the copyright if unpacked sources does not contain copyright file > + if [ ! -f ${S}/debian/copyright.tmpl ] && [ -f ${WORKDIR}/default-copyright.tmpl ]; then > + install -v -m 644 ${WORKDIR}/default-copyright.tmpl ${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, February 29, 2024 at 6:40:24 AM UTC+5:30 Jan Kiszka wrote: On 28.02.24 08:22, srinuvasan.a via isar-users wrote: > From: Srinuvasan A <srinuv...@siemens.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...@siemens.com> > --- > .../recipes-app/example-raw/example-raw_0.3.bb | 3 ++- > .../example-raw/files/default-copyright.tmpl | 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.tmpl > > 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..b4dfaa4d 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.tmpl" > > inherit dpkg-raw > > diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > new file mode 100644 > index 00000000..9c04255a > --- /dev/null > +++ b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > @@ -0,0 +1,15 @@ > +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ > +Upstream-Name: ${PN} > +Upstream-Contact: Mentor Embedded <embedded...@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 Somehow I can't imagine you actually want to have this merged into an open source project, do you? ;) Jan This PR we proposed for our downstream layer, here we have n no.of recipes which contains the LICENSE, based on the LICENSE variable we are installing this copyright file into the packages, and this would really needed for our OSS clearing Do you have any thoughts to address this one in ISAR? > diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass > index 7de98673..5b9cd9dc 100644 > --- a/meta/classes/debianize.bbclass > +++ b/meta/classes/debianize.bbclass > @@ -112,6 +112,10 @@ deb_debianize() { > else > deb_create_rules > fi > + # Add the copyright if unpacked sources does not contain copyright file > + if [ ! -f ${S}/debian/copyright.tmpl ] && [ -f ${WORKDIR}/default-copyright.tmpl ]; then > + install -v -m 644 ${WORKDIR}/default-copyright.tmpl ${S}/debian/copyright > + fi > # prepend a changelog-entry unless an existing changelog file already > # contains an entry with CHANGELOG_V > deb_add_changelog
Hi, On Wed, 2024-02-28 at 12:52 +0530, srinuvasan.a via isar-users wrote: > From: Srinuvasan A <srinuvasan.a@siemens.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@siemens.com> > --- > .../recipes-app/example-raw/example-raw_0.3.bb | 3 ++- > .../example-raw/files/default-copyright.tmpl | 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.tmpl > > 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..b4dfaa4d 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.tmpl" > > inherit dpkg-raw > > diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > new file mode 100644 > index 00000000..9c04255a > --- /dev/null > +++ b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > @@ -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 Mentor or Siemens? And how did you make sure that "we" really hold the copyright? > + > +Files: * > +Copyright: 2022, Siemens > +License: Siemens Wrong year... > + . > + 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 Nope. Now its published and in addition: wrong year... > diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass > index 7de98673..5b9cd9dc 100644 > --- a/meta/classes/debianize.bbclass > +++ b/meta/classes/debianize.bbclass > @@ -112,6 +112,10 @@ deb_debianize() { > else > deb_create_rules > fi > + # Add the copyright if unpacked sources does not contain copyright file > + if [ ! -f ${S}/debian/copyright.tmpl ] && [ -f ${WORKDIR}/default-copyright.tmpl ]; then > + install -v -m 644 ${WORKDIR}/default-copyright.tmpl ${S}/debian/copyright > + fi This magic should be documented somewhere - after we agreed that this is really the best way to add such a copyright file. > # prepend a changelog-entry unless an existing changelog file already > # contains an entry with CHANGELOG_V > deb_add_changelog > -- > 2.34.1
On 29.02.24 06:02, 'srinu' via isar-users wrote: > > > On Thursday, February 29, 2024 at 6:40:24 AM UTC+5:30 Jan Kiszka wrote: > > On 28.02.24 08:22, srinuvasan.a via isar-users wrote: > > From: Srinuvasan A <srinuv...@siemens.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...@siemens.com> > > --- > > .../recipes-app/example-raw/example-raw_0.3.bb > <http://example-raw_0.3.bb> | 3 ++- > > .../example-raw/files/default-copyright.tmpl | 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.tmpl > > > > diff --git a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb > <http://example-raw_0.3.bb> > b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb > <http://example-raw_0.3.bb> > > index ffa14340..b4dfaa4d 100644 > > --- a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb > <http://example-raw_0.3.bb> > > +++ b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb > <http://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.tmpl" > > > > inherit dpkg-raw > > > > diff --git > a/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > > new file mode 100644 > > index 00000000..9c04255a > > --- /dev/null > > +++ b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl > > @@ -0,0 +1,15 @@ > > +Format: > https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ > <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/> > > +Upstream-Name: ${PN} > > +Upstream-Contact: Mentor Embedded <embedded...@mentor.com> > > +Source: https://github.com/MentorEmbedded/industrial-core > <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 > > Somehow I can't imagine you actually want to have this merged into an > open source project, do you? ;) > > Jan > > > This PR we proposed for our downstream layer, here we have n no.of > recipes which contains the LICENSE, > based on the LICENSE variable we are installing this copyright file > into the packages, and this would really > needed for our OSS clearing > > Do you have any thoughts to address this one in ISAR? > There a two things to clearly tell apart here: 1) A mechanism to inject a default copyright file into an ad-hoc debianized package 2) The default license text to use here, even if just as an example Regarding 2), it is absolutely obvious for everyone thinking just a few seconds that this can never be any proprietary, Siemens "infected" text. If at all, this can only be the default license of the containing OSS project, which would be either MIT or GPL here, more likely MIT. Having 1) as additional feature of debianize.bbclass is possible, but please first clarify which of the two versions you sent should be reviewed. And as you have to fix the example license anyway, follow up with a clearly marked v2 for that purpose. Jan
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..b4dfaa4d 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.tmpl" inherit dpkg-raw diff --git a/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl new file mode 100644 index 00000000..9c04255a --- /dev/null +++ b/meta-isar/recipes-app/example-raw/files/default-copyright.tmpl @@ -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 7de98673..5b9cd9dc 100644 --- a/meta/classes/debianize.bbclass +++ b/meta/classes/debianize.bbclass @@ -112,6 +112,10 @@ deb_debianize() { else deb_create_rules fi + # Add the copyright if unpacked sources does not contain copyright file + if [ ! -f ${S}/debian/copyright.tmpl ] && [ -f ${WORKDIR}/default-copyright.tmpl ]; then + install -v -m 644 ${WORKDIR}/default-copyright.tmpl ${S}/debian/copyright + fi # prepend a changelog-entry unless an existing changelog file already # contains an entry with CHANGELOG_V deb_add_changelog