From patchwork Fri Jun 3 00:06:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 8786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72506CCA47B for ; Fri, 3 Jun 2022 00:07:03 +0000 (UTC) Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by mx.groups.io with SMTP id smtpd.web11.1901.1654214817091818945 for ; Thu, 02 Jun 2022 17:06:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@axis.com header.s=axis-central1 header.b=TJbyip9w; spf=pass (domain: axis.com, ip: 195.60.68.17, mailfrom: peter.kjellerstedt@axis.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1654214817; x=1685750817; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=W4V6bXVAhdO+qKZFuIvrdIG8yzEDVan/veSz5WzpkH8=; b=TJbyip9wgOuUa6fur14OBjsa0OtIR0Gz+2hYMmjusMmJtfw+tGMg6PxA VyfgDY4q3lA1pXkixnovsT8gFzFjkacsaNfYujReUvPgeGEgKiSX/AM+m 5wJPs84FiYE2r5mdo2K7m82luIQ7DWKRWEbmuMJs1vYfcVU66X9Z71qXa PNoEx9u5541N+8mxN2BMTnhkZrE7SsqWPFA40AC4twNRPQBbFXXlc78rS CM9qSL5f97u0s8N1yfQfo++3RwCKi63QjmZCEh3kGkvi7hmJEgO2JKbMR I0gOwx4Ox6dVFzaxkwbVUlgSILpBptR92LorKExqnHo0QjCOJMVEhVgt3 A==; From: Peter Kjellerstedt To: Subject: [PATCH 1/2] libseccomp: Correct LIC_FILES_CHKSUM Date: Fri, 3 Jun 2022 02:06:48 +0200 Message-ID: <20220603000649.24493-1-pkj@axis.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Jun 2022 00:07:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/166505 Previously, only the first line of the LICENSE file was included, which only covered the license name and thus would not detect a change to the version (or anything else for that matter). Signed-off-by: Peter Kjellerstedt --- meta/recipes-support/libseccomp/libseccomp_2.5.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-support/libseccomp/libseccomp_2.5.4.bb b/meta/recipes-support/libseccomp/libseccomp_2.5.4.bb index 731d9ae08d..e89b8f7f4b 100644 --- a/meta/recipes-support/libseccomp/libseccomp_2.5.4.bb +++ b/meta/recipes-support/libseccomp/libseccomp_2.5.4.bb @@ -3,7 +3,7 @@ DESCRIPTION = "The libseccomp library provides and easy to use, platform indepen HOMEPAGE = "https://github.com/seccomp/libseccomp" SECTION = "security" LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357ceb8e7c37f989f" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c13b3376cea0ce68d2d2da0a1b3a72c" DEPENDS += "gperf-native" From patchwork Fri Jun 3 00:06:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 8785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71729C43334 for ; Fri, 3 Jun 2022 00:07:03 +0000 (UTC) Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by mx.groups.io with SMTP id smtpd.web12.1962.1654214816927611202 for ; Thu, 02 Jun 2022 17:06:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@axis.com header.s=axis-central1 header.b=hxris7Xz; spf=pass (domain: axis.com, ip: 195.60.68.18, mailfrom: peter.kjellerstedt@axis.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1654214817; x=1685750817; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=JPa3vGp220iLPw54CyDBOgAHZHZqVQh3e3ftP7q/ozs=; b=hxris7XzNOzf/PXeiYR3qYgYLzAMpS2jF5RJyJ065zaWXzBVkwQkHGNG cXof02ieWcR1yZUK3aOqgrHJyQ2WE+uj64i0FGrkFsbX8OpTDt4INLeN5 FqMZqsHxOqWLoM/v2EcMiSheh/tB6H5AWgfir0sf81WWDMRQBx/5RVPz1 JHk28nNgw23vSQgQN6yMoyDfvzjamk3ALvsAVPum1+c7neVlGtLHAYa0j 28HFom5JfizuqqlcbLH9Evd0WLbl4Inrj1J8YZ8VY529316rfg1ZFyBZ7 JKQ+e6Nzkhjjc41QZwUsC7aDIuBmg2TcrZ8vsyFn+SneJdoUD2SqQ5M/+ A==; From: Peter Kjellerstedt To: Subject: [PATCH 2/2] license.bbclass: Bound beginline and endline in copy_license_files() Date: Fri, 3 Jun 2022 02:06:49 +0200 Message-ID: <20220603000649.24493-2-pkj@axis.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20220603000649.24493-1-pkj@axis.com> References: <20220603000649.24493-1-pkj@axis.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Jun 2022 00:07:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/166504 Ensure that begin_idx (i.e., beginline - 1) and end_idx (i.e., endline) are positive numbers in copy_license_files(). This makes sure the same lines are copied as populate_lic_qa_checksum() uses when it calculates the checksum. Before, beginline=0 would typically lead to that no lines were copied at all. Signed-off-by: Peter Kjellerstedt --- meta/classes/license.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 0c637e966e..4ebfc4fb92 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -84,17 +84,17 @@ def copy_license_files(lic_files_paths, destdir): os.link(src, dst) except OSError as err: if err.errno == errno.EXDEV: - # Copy license files if hard-link is not possible even if st_dev is the + # Copy license files if hardlink is not possible even if st_dev is the # same on source and destination (docker container with device-mapper?) canlink = False else: raise - # Only chown if we did hardling, and, we're running under pseudo + # Only chown if we did hardlink and we're running under pseudo if canlink and os.environ.get('PSEUDO_DISABLED') == '0': os.chown(dst,0,0) if not canlink: - begin_idx = int(beginline)-1 if beginline is not None else None - end_idx = int(endline) if endline is not None else None + begin_idx = max(0, int(beginline) - 1) if beginline is not None else None + end_idx = max(0, int(endline)) if endline is not None else None if begin_idx is None and end_idx is None: shutil.copyfile(src, dst) else: