public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta/classes/debianize: Add copyright file to debian folder
@ 2024-02-28  7:22 srinuvasan.a
  2024-02-29  1:10 ` Jan Kiszka
  2024-02-29 19:14 ` [PATCH] " Florian Bezdeka
  0 siblings, 2 replies; 25+ messages in thread
From: srinuvasan.a @ 2024-02-28  7:22 UTC (permalink / raw)
  To: isar-users; +Cc: Srinuvasan A

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
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
-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH] meta/classes/debianize: Add copyright file to debian folder
@ 2024-02-28  5:44 Srinuvasan A
  2024-02-29  8:10 ` MOESSBAUER, Felix
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Srinuvasan A @ 2024-02-28  5:44 UTC (permalink / raw)
  To: isar-users; +Cc: Srinuvasan A

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.
+ .
+ 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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-03-15 12:56 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28  7:22 [PATCH] meta/classes/debianize: Add copyright file to debian folder srinuvasan.a
2024-02-29  1:10 ` Jan Kiszka
2024-02-29  5:02   ` srinu
2024-03-01  7:36     ` Jan Kiszka
2024-03-07 14:48       ` [PATCH v2] " srinuvasan.a
2024-03-08  7:15         ` Jan Kiszka
2024-03-08  7:18           ` srinu
2024-03-08 14:26           ` [PATCH v3] " srinuvasan.a
2024-03-08 14:37             ` Jan Kiszka
2024-03-11  6:22               ` [PATCH v4 1/2] " srinuvasan.a
2024-03-11  6:22                 ` [PATCH v4 2/2] doc/user_manual: add a section for debianize class srinuvasan.a
2024-03-12 16:10                   ` srinu
2024-03-12 16:36                   ` Jan Kiszka
2024-03-13  5:57                     ` [PATCH v5 " srinuvasan.a
2024-03-13  8:38                       ` Florian Bezdeka
2024-03-13  9:44                         ` [PATCH v6 " srinuvasan.a
2024-03-15 12:56                           ` Uladzimir Bely
2024-03-12 16:34                 ` [PATCH v4 1/2] meta/classes/debianize: Add copyright file to debian folder Jan Kiszka
2024-03-15 12:55                 ` Uladzimir Bely
2024-02-29 19:14 ` [PATCH] " Florian Bezdeka
  -- strict thread matches above, loose matches on Subject: below --
2024-02-28  5:44 Srinuvasan A
2024-02-29  8:10 ` MOESSBAUER, Felix
2024-02-29 19:04 ` Florian Bezdeka
2024-03-14  9:12 ` Cedric Hombourger
2024-03-14 12:09   ` srinu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox