From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7340524753523834880 X-Received: by 2002:a05:622a:118f:b0:42f:1443:df08 with SMTP id m15-20020a05622a118f00b0042f1443df08mr7825476qtk.64.1710138144838; Sun, 10 Mar 2024 23:22:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:622a:1211:b0:42e:e99c:976d with SMTP id y17-20020a05622a121100b0042ee99c976dls5254867qtx.0.-pod-prod-04-us; Sun, 10 Mar 2024 23:22:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJfH38s/pTx4SL2f9FZ7qNOQXW2/3p7TcJJ0iyywPSiXaLSgnMrIxd/ezxNLZ14IMkJJTs X-Received: by 2002:a67:f9c4:0:b0:473:2d09:3965 with SMTP id c4-20020a67f9c4000000b004732d093965mr1643773vsq.6.1710138143974; Sun, 10 Mar 2024 23:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710138143; cv=none; d=google.com; s=arc-20160816; b=WFgWe7I9DZ5ZLf75DgWp9c2K8WWVXUgyND2fvIvHdT99DOftHlDIDuKGuQjLi37Ahp TDB3wE9IPpOYkdSZw1iNUPQngaLDEYFUAyBVGKKwtr0X07R9DQtVjJsodRQvqEQqgj1W oPYQR/kGlkuHdZk4/OPnjfL8McLdCKvodVMR5yrhctw/ul/8PYZHSZFw6EZH0C9KGRzM ufquYKun9abCA8bvfF07OdWrte+SBadKS6ZkC3xnT1PyNie69jbvCB4lEC74/VdRFzZu GkwlgrBsQL6UCw+6cPPnp9ym2OTkg81saiwGTTgL7loBzDDKtzcL9i7Onz/fUNxtjpBq bnSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=nIEghnw18nqVLc2ex0yxZyRpykal9w+gOrWVC7x73j8=; fh=/sf3dBsFjbqaTZa6WJJbxVMM47cbomhTrTtQpNFS2rQ=; b=bcw3b6d8zkx6DtBWsgG/XmXKey4fN1gsblkCc17/00RLh82n3FlUoQ7sR4wGGW5z6b xerHw+AciMh0m1EWULFd/9rAOLAsI5VOwAGNjVAQiKqfLDkJU3KCPyLv3nIacd7Yx1BQ D/tnlstOGPoe/pZfSO2cMu+UyvvxdcjSKmD2uRH/SYXGtTWpFD2zUSI1koECtYcHP4UU nPaIDGQkl9xar75B69gbPyDfK5lllSUBTfEud3DxEvik/r5V2LXdfBjF3hWLS9bhfzhG u3h1KooOuz7XzOcOJ2T3tJKH1Ff5XV3vMc4Ges+jpRvtV/NRpSmGnAezyiNAdVGFaYSH na6w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=NpXT0NRG; spf=pass (google.com: domain of fm-1324425-202403110622228ebf9d4df2df4acc85-wqy_id@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1324425-202403110622228ebf9d4df2df4acc85-wQy_Id@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id h17-20020a67c591000000b0046d3986403esi456657vsk.0.2024.03.10.23.22.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2024 23:22:23 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-202403110622228ebf9d4df2df4acc85-wqy_id@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=NpXT0NRG; spf=pass (google.com: domain of fm-1324425-202403110622228ebf9d4df2df4acc85-wqy_id@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1324425-202403110622228ebf9d4df2df4acc85-wQy_Id@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202403110622228ebf9d4df2df4acc85 for ; Mon, 11 Mar 2024 07:22:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=srinuvasan.a@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=nIEghnw18nqVLc2ex0yxZyRpykal9w+gOrWVC7x73j8=; b=NpXT0NRGACpuMNePVo7byj6LHE+tlLYNhcUWNwFKAPfjLXE/YMox2O4a8UhqQYxQ5HhzlJ aAvUkbz+KlnyLER4dIhG2ywgpLuOW2vUcXT4nUnIQ2LtqHa5bnk0Z0Y22yScKfapFkd1PkWA qaV7kr1uesIkmrYmH5TFvB1rQ5j2s=; From: srinuvasan.a@siemens.com To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, ubely@ilbers.de, Srinuvasan A Subject: [PATCH v4 1/2] meta/classes/debianize: Add copyright file to debian folder Date: Mon, 11 Mar 2024 11:52:01 +0530 Message-Id: <20240311062202.3877203-1-srinuvasan.a@siemens.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-TUID: CaZWxbWvLfJO From: Srinuvasan A 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 --- .../example-raw/example-raw_0.3.bb | 3 ++- .../example-raw/files/default-copyright | 22 +++++++++++++++++++ meta/classes/debianize.bbclass | 4 ++++ 3 files changed, 28 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..3511cb51 --- /dev/null +++ b/meta-isar/recipes-app/example-raw/files/default-copyright @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2017-2024, Siemens +Copyright (c) 2024 ilbers GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass index f256333d..0febcbe2 100644 --- a/meta/classes/debianize.bbclass +++ b/meta/classes/debianize.bbclass @@ -120,6 +120,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