From patchwork Fri Apr 5 16:31:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3486 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:45:17 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-io1-f56.google.com (mail-io1-f56.google.com [209.85.166.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GjGbx003773 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:45:16 +0200 Received: by mail-io1-f56.google.com with SMTP id ca18e2360f4ac-7cc74ea8606sf253745839f.2 for ; Fri, 05 Apr 2024 09:45:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712335510; cv=pass; d=google.com; s=arc-20160816; b=vRfKdYH3dlEuBnB66+RxbF5C7+7snL4RJNyjcyu/ZQTpwhp7cF40icdJdGTbJQ6aNz ZFN0biOAlx7BZWAFJ5btHQIaQoymYyX7/4K8Dx72tNdQLJlsTmljzV8MAlVENv+yjhSp v4nCUiefxaw1r6KAfLtAHs3lrUNK5zhhMvT0vzlaX1/9PwrZp6d/2eh8xxUgmASptPYP vkIMdOyNGfzHGj63S5kNdEWShPXDwdEudCzpJxXDwNaB0pCkWQCkAHKt5YSSZS6HOwOm sGnV5+9j5mohzHS3WeGWTPlQ3SsDLHbUg4DWXF0sBf+KLH6LmZov9crYQVLJFTfHAZcY BJSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4H7VxwrY5D+RRVtyW9tsVIqst2ZH+UJSqMXvvxdOcR0=; fh=564QeooCeqJUJ/0rhM4/XT/OsUUNXy56CoAEMbBjsbY=; b=j8YR9LiunmwlfHmolPnMb+DgJs1HaeNBsa8UmmmksiIGko+2gTyAfdTgFPTnoHZ3OR Uhuhw3ZIrAAFA7JFlS5ZXQFLx3aja3IFQUmM5xtVadIU38o4AjNINDckh9VfIWsBTirT wsUb9oReheQYXzlB7+vhZTYNa4J3Ub+7936keb+1w+h1sfA90ql1b60IiS2cqWd0VI6m TuwaHm1EgIH6RfUKzyE5xZM4MDf2g1ljUMC2x/B6X7d1FQr3JwY/uXbVA62JANdrld8W 6HRfPmGL1dfKVE1IFTvmvVkxk+5hi375bH3fvRNrk8Ts3GTk6fOMRpk6Y+6iaeWHwSdH FLAw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QsdI2Eba; spf=pass (google.com: domain of fm-1325773-20240405163221ceecdcd574f706522d-waiung@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163221ceecdcd574f706522d-WAIUng@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712335510; x=1712940310; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=4H7VxwrY5D+RRVtyW9tsVIqst2ZH+UJSqMXvvxdOcR0=; b=W/tpL+MDq8G7SL6qYtqDb+l/418f/UcjCx36khMsbk4IrMcrYP64O4PvELfOcHhSIZ /7Ivj83anVSCdcz/Zn+t3MCV/YLWIxK9s9IZ0i4D2TAy+WcwM1bOrfri8GpZ8YKVSFjT QmoeJYUyCteW9TXWTbcYdBtkBIB4txCJw2rHUyk1fF5sGNO6M6vgFpPwhX3FaA4PvgUp AGZyHpUHvtRHeDbgsQ/qiYLEotGnSzCc3knTtlJUmywOcE3QrKqaqIfEr1zl4KLlGb3d Hz2SJP/dsatiec22Z+HRj6jlungImpSf/T84opiA4yJmaOmEmFU3fxc3q+XWVwV4PFHe r7wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712335510; x=1712940310; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4H7VxwrY5D+RRVtyW9tsVIqst2ZH+UJSqMXvvxdOcR0=; b=HTXytpHkGVZlJWwLM1r6tsoU7RMcB4Tpipixcc7IYlSyavsGF9iivwtX3Xij4urutm hap8c5xIXpb+5jcgLVP6L6/6Fs5L0ocIyN6daytWZ7Sw7Wf/B5cpCxPT8CZFVU5pVmeI BGk6pCq7BWYuMCQl2f8O/vdVQ89JSSIku87WQV7CmQp7lYU4Ps9RnqcknGHxrXyzldnu DO4QBjv3sYbdzPzruFYI+z1sUzvH6A4AA/C74oSkMc3F9lVM/kA78DUfzlpuRq6tRzXX b0z8GLlAqHihHiqPn8yIv1go4lLvXjFXFRJBpF/ltkyYLSave1wEaRjuz2kdAg/SYpIV v0mQ== X-Forwarded-Encrypted: i=2; AJvYcCX2TT72Qd509v3BRXIoER2jhX5UnFSN0idPGCAIj2rRIk3oJrrSpKQ6lc+fVf2bXlort2rJSEp1J3C6CtdGMCZ9RdcBWV8= X-Gm-Message-State: AOJu0YzEbmphR4apQMx6jmIx1TqPXB1MFAhr1opNuiCOHRwc5xw9GGjv N+bVb37Wgv6Cxs0STT98cx2xBleNu+BV78i9FrnS88k1/86Ml+/l X-Google-Smtp-Source: AGHT+IEzJ6H95jzlm4mSNfnm1WVpRelW7pBgYRXTBnWBvyueAxToLwluV00FFV4g/FWxTaX1/XzvGQ== X-Received: by 2002:a17:902:f710:b0:1e2:c198:7cc7 with SMTP id h16-20020a170902f71000b001e2c1987cc7mr2192772plo.28.1712334746743; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:ea06:b0:1e2:45c6:efb with SMTP id s6-20020a170902ea0600b001e245c60efbls1602540plg.2.-pod-prod-04-us; Fri, 05 Apr 2024 09:32:25 -0700 (PDT) X-Received: by 2002:a17:902:e5cd:b0:1e2:922f:bfa3 with SMTP id u13-20020a170902e5cd00b001e2922fbfa3mr2286216plf.51.1712334744775; Fri, 05 Apr 2024 09:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334744; cv=none; d=google.com; s=arc-20160816; b=E4byoM+zsCfcz0Ex0eKvrG8YxJX/6DZHWzphRgQTo9pC1Z+ZCKa35EN2vFvAGgkHag /Wt4ikJ1Y7E5w+FsCb/QpntavHZ/fei8GHuJIbCb5JkdZ/bWdz5A83WlXgY161dv1SOj X42P3zuvunjU/azPdoyfrwIdCUY3BTl1HJRegZbbPVIzBM+LMaxgGRvHRMIZ09yhV+1R pnPu/3GKPn0jLaV+Cu8tckRqPgNkBmUhIB1/OyC/rA+Do3ZRS7J7f0RjK/qcAMFTYPJ/ FI++ekhArdsEcleVFXMD+hI3vD8Cg9egxyOS8FTsP7sKKrUge0xQfjBU7+DxIQCQOt2G 4+FA== 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=pJ1+nRk2r4AbxuuYs6u4MkKsOs20LQBbO8vYeIpebHU=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=lbOu9e4qAj6GzWQL55ymDxD4NG1QNcyPgVxfQoZ8+HerZs3ie3+vNB3QKyNsXjB2w6 tm7PtEyo/3RkNr6eczxCwgS6CcWiwEgub4LF6IlyWt547cULbSFbBuD+RLnauoqRPMn6 kmdOfEeKDLc4NZ1nvrIbEvvisucP+8gHbjQvwk2L+zNq0wVMqq7J3At3+waKC0769mcz JjbTO51/6DOMzDmykaXtdUpfAxFsfao+Yi/bJw4l4/nfQsg69QjyM1mdPJTaNzMOA0r3 8Tjt7RaWhv24EzPVWUzGFBxXFe344nQg8QEfY6aqGHVs/Ww/ThYZ6mmGPyHWXoKkjcAy qX4Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QsdI2Eba; spf=pass (google.com: domain of fm-1325773-20240405163221ceecdcd574f706522d-waiung@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163221ceecdcd574f706522d-WAIUng@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id jc18-20020a17090325d200b001dd61b4ef8esi97963plb.12.2024.04.05.09.32.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-20240405163221ceecdcd574f706522d-waiung@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20240405163221ceecdcd574f706522d for ; Fri, 05 Apr 2024 18:32:22 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 1/9] isar-bootstrap: avoid forced early expansion of key vars Date: Fri, 5 Apr 2024 16:31:27 +0000 Message-Id: <20240405163135.2987489-2-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QsdI2Eba; spf=pass (google.com: domain of fm-1325773-20240405163221ceecdcd574f706522d-waiung@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163221ceecdcd574f706522d-WAIUng@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson Rather than appending the items from the expanded key variables into SRC_URI individually, which means there's no way to use tools like vardepvalue or vardepexclude to control signature generation, append the unexpanded variables to the SRC_URI directly. This avoids issues with shared state reuse for the isar-bootstrap packages. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/xTTcxqxTAQAJ. Signed-off-by: Christopher Larson --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 17f19fd8..de14e946 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260 FILESPATH:prepend := "${THISDIR}/files:" SRC_URI = " \ file://locale \ - file://chroot-setup.sh" + file://chroot-setup.sh \ + ${DISTRO_BOOTSTRAP_KEYS} \ + ${THIRD_PARTY_APT_KEYS}" PV = "1.0" BOOTSTRAP_FOR_HOST ?= "0" @@ -22,6 +24,8 @@ APTSRCS = "${WORKDIR}/apt-sources" APTSRCS_INIT = "${WORKDIR}/apt-sources-init" DISTRO_BOOTSTRAP_KEYFILES = "" THIRD_PARTY_APT_KEYFILES = "" +DISTRO_BOOTSTRAP_KEYS ?= "" +THIRD_PARTY_APT_KEYS ?= "" DEPLOY_ISAR_BOOTSTRAP ?= "" DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales" DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = ",gnupg" @@ -48,13 +52,11 @@ python () { distro_bootstrap_keys += own_pub_key.split() for key in distro_bootstrap_keys: - d.appendVar("SRC_URI", " %s" % key) fetcher = bb.fetch2.Fetch([key], d) filename = os.path.relpath(fetcher.localpath(key), topdir) d.appendVar("DISTRO_BOOTSTRAP_KEYFILES", " ${TOPDIR}/%s" % filename) for key in third_party_apt_keys: - d.appendVar("SRC_URI", " %s" % key) fetcher = bb.fetch2.Fetch([key], d) filename = os.path.relpath(fetcher.localpath(key), topdir) d.appendVar("THIRD_PARTY_APT_KEYFILES", " ${TOPDIR}/%s" % filename) From patchwork Fri Apr 5 16:31:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3479 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:34 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f63.google.com (mail-pj1-f63.google.com [209.85.216.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWW7N003051 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:33 +0200 Received: by mail-pj1-f63.google.com with SMTP id 98e67ed59e1d1-2a28775dcaesf606372a91.0 for ; Fri, 05 Apr 2024 09:32:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334746; cv=pass; d=google.com; s=arc-20160816; b=WbvQJVqLOAQLLlJ6eIfqe/xAHVXrZ/l6WBt/fEIw90NmcNMi4bGgX4kp0EDX5yzo+2 pYCReJ3zX7BOq07VN1XUSGI3BmpT3m6l+kVUaH+m+u17vtPXXY5POIVVe14NL9Kwp+q6 YbPyt13DwO2Wu+mjh9k1HEhkBs5Kij8+N6sUt9bnkqwhknRnyIuthjmz/4uajtTiVtSo zt1mVOwWGM+3rFA377KBHf1Pf0Cy0srAMn55iTV4UyvLA6mzx8hl7WtX7bQEdWdiiqWt KVozU+fEV9wzX5GOAY3zxB0ZEWw94Fz+KRCpWt8EqtTpEO/8YEFh2bygkJHa6gHFLcxh EehA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vvg4GOOg+SrsDJriWb5nnAjVFZHfZU0RW1HIFertsDQ=; fh=OscIgrnFN3uyhGM8xb9uzkfcx2P+vC6Ok/ZtnDLeb4k=; b=MmKFaeMuR0Zo6C1lbsSBcBYq3t/oxVl45Y4uwsJRNRt/Oc0TyjfrVa/8ar4YbFeorv xuBJmywxOLwaCZcVrj8inE8oiSXYZRb/Rp+O3t8QRXNx2MwybQ3V9MFUIYnq22/12k59 0JvG6TWFXzfNmHuE5848OVgHz7irNvRK5138RElbxh8G04kILJ9k+HfOvseKc7tjM27p 9w6efqXbmT1mydj9miCWvTV/f3x4Q+F3xaVbyJLjw9wfkZ9jdmw1+f4x+n3LEyFQtErU ZKLQ0oUEEN6P5dddKb+wXuB2H8iDaZD7X+Nqh1LqYl7szIdoiMQ5lg+sM5C7mY++3nAF xGqw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Ua8+Xvwj; spf=pass (google.com: domain of fm-1325773-2024040516322269c98b7391ab0c50e2-qpgcoh@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322269c98b7391ab0c50e2-QpGcoh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334746; x=1712939546; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=vvg4GOOg+SrsDJriWb5nnAjVFZHfZU0RW1HIFertsDQ=; b=PUdPtE6yo2jcfMzH9Jhe0oTeoWPg7+DR7Ir7i2vqwX17h96ykHsM7NdCa1Mj2JeQTy AvisVReEtbndQPDkIJbAMtHjlw+VBYH+TOvYpwkKCXOCUsB3+iVxtyz/Y0AwbTa5ftrd ASrFRSogzv8yzgl8E/OT2B4IG7jhSzjp8QFFyq7Gb3NXP64PFNTnOKMi6k9NbLaqSkNl cZsN8NQwj6TdIk5RGG6xVKHeHAfNGsKm/GWUnPckzfKSV02VkUVjJOYQ4ZCJ+WYzlMD1 r8pGfBgUiGqV1byGOoe0xIqOxLCPyo8hiL5hJkEDk9Yb8XDzMSCgyjJ+7efZBdnLOBLi ZiHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334746; x=1712939546; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vvg4GOOg+SrsDJriWb5nnAjVFZHfZU0RW1HIFertsDQ=; b=kXLPPmgAiJplNwhvIBUJHpzZQES1TwtFasnQd3qJ629pJpAvg5s9vtawhar6CxtjFh l32n3hpziEJ0PM/OrXfLl8Wh1HnvT8bqQ4TsnPF/T36wi5Qg3Rhm6x9xz9b9qiSiUs3l FttDD6X0wVl7iv/7bkCEXhtOInFcDjlmscIzJOQs3n9PuRmmiJqnv6pBFJ733xvNzzru SH587bLtlshdIjxDS3vrjVnX/n2s/MOuEQeuK0fEL+mY2B8sIRae17zWuWpv8InzWv9n +K/ksrbgtHktFvwbGBQj6jhVYJ1PcEnpWVnYSQLAQ6Bc71yCJDeHEqGp2+Dp/3Kl47sg U2vA== X-Forwarded-Encrypted: i=2; AJvYcCVS67lf6j66SkYGIqpU8XIzWw+bhxyOozH8kCgdSK92G/nGPA/3rdBQ+XOwiX69zY67BuSb53LbbtV7epoWxxIOcL7Q0Qk= X-Gm-Message-State: AOJu0YzB3LK5Wx7mDLlaQB5qr0tgF9gMNk3qES24Hp3RF0X4RX/z1LRM +sh1uNVCuer9X9t5pGkBJqHH0gmQIS2aml83KdAU6P+G+zq+QuAP X-Google-Smtp-Source: AGHT+IHjViRugwJjdRP9OIWmxYAf0eaW3yQNnWI5eC8bBamEGHneZMqxcla7eBrGHCvDYnOl6FGmZA== X-Received: by 2002:a17:90a:d814:b0:2a3:cf8:44ad with SMTP id a20-20020a17090ad81400b002a30cf844admr1872573pjv.1.1712334746222; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:c20e:b0:2a2:9d0f:c728 with SMTP id e14-20020a17090ac20e00b002a29d0fc728ls1362027pjt.2.-pod-prod-06-us; Fri, 05 Apr 2024 09:32:25 -0700 (PDT) X-Received: by 2002:a05:6a21:360a:b0:1a7:34c5:f8d with SMTP id yg10-20020a056a21360a00b001a734c50f8dmr1803782pzb.38.1712334744761; Fri, 05 Apr 2024 09:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334744; cv=none; d=google.com; s=arc-20160816; b=UFwElGBkpJxnonF3mNxxTBvFSWVOb0Fq+MUetzqrSWsGBfzY63B8zxP4Rz00HkFk3c sfbCeOBXYUaaoGsrdvWBr+0tn5Osy8BOOoI3YzQlR/6xyDShQdr4In/0XQtpWUXB/TKL bJ81+NzK9hlSJ2mzpl2tB8vHvSNFeyuKirxJ4FxbXZQ8PrJa6oG+jkumXrgjzOx1DJuj zEpYNLUtPwWtSmjo2u+pG3wt3K0+kUZAN3ii4K7kV7dqaD0SfnH5tYCjzPvwWp+m46Y7 1/Oi1q84uMo9ZToElS0ebBYr/iQIBcdVjqOW2L7bdWj4krmb2AWzfoLpJ7LUn5R37qWO R0BQ== 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=rGdg6ldi2thVX4/MpwPbnhgb9DhjmdHWXNiwtkcSwbs=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=mMbp9hkJa5W7SssNCyf37Dz4ZRuitAH6aiu/EZStBfRK/g4Uhael90z7nojSUSPFOK ohaZfa/ftKzrCp514B/1lubX4y+t82KunyTwCOEANjdBRx1yHnMReQyXovH1PoUck1WJ ohtXP9UjTWgozpmYdI2iNEKNf7D+LO2+eOmFwJ8yWg5AZLsVJ1IhpCdY+bE/6VuU0VLb Zzau9A00Pa5pfphY2fIUUinkWuyoMZXjOEb54DebTnFjAFQtpZG26e6EWxTNFRUjx6Oe Wiv6WJMZ9rQoM7Y+6v2cpWOFK+E3cKhN3Xf6M/z2uz700wULisVDvo18Ab6BumfNmGnw kKQQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Ua8+Xvwj; spf=pass (google.com: domain of fm-1325773-2024040516322269c98b7391ab0c50e2-qpgcoh@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322269c98b7391ab0c50e2-QpGcoh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id c4-20020a63d504000000b005f0a5113629si153309pgg.3.2024.04.05.09.32.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-2024040516322269c98b7391ab0c50e2-qpgcoh@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024040516322269c98b7391ab0c50e2 for ; Fri, 05 Apr 2024 18:32:22 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 2/9] isar-ci-ssh-setup: avoid abs path in signatures Date: Fri, 5 Apr 2024 16:31:28 +0000 Message-Id: <20240405163135.2987489-3-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Ua8+Xvwj; spf=pass (google.com: domain of fm-1325773-2024040516322269c98b7391ab0c50e2-qpgcoh@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322269c98b7391ab0c50e2-QpGcoh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson TESTSUITEDIR is a full absolute path to the testsuite directory in isar, as set in the environment by the build setup scripts. This is referenced in the install task, which prevents shared state reuse for this package. While this is predominently used in CI, it's still a good idea to avoid absolute paths in signatures, so we can reuse shared state for this package in other contexts. Rather than excluding the TESTSUITEDIR from signatures entirely with vardepsexclude, we can retain some information about the path by using os.path.relpath to make it relative to the top directory of the build. This is the same approach used by isar-bootstrap for the keys, and the vardepvalue approach is also used elsewhere for layer paths. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/oOIB_KxTAQAJ. Signed-off-by: Christopher Larson --- .../recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb b/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb index 4693f647..89100444 100644 --- a/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb +++ b/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb @@ -13,6 +13,9 @@ DEBIAN_DEPENDS = "adduser, apt (>= 0.4.2), network-manager, sshd-regen-keys" inherit dpkg-raw +# Avoid absolute paths in signatures which prevent shared state reuse +TESTSUITEDIR[vardepvalue] = "${@os.path.relpath('${TESTSUITEDIR}', '${TOPDIR}')}" + do_install() { # Install authorized SSH keys install -v -d ${D}/var/lib/isar-ci/.ssh/ From patchwork Fri Apr 5 16:31:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3478 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:33 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f185.google.com (mail-pg1-f185.google.com [209.85.215.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWVl6003039 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:32 +0200 Received: by mail-pg1-f185.google.com with SMTP id 41be03b00d2f7-5d8dd488e09sf1928907a12.2 for ; Fri, 05 Apr 2024 09:32:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334746; cv=pass; d=google.com; s=arc-20160816; b=uJWsf4HJrALPGMhNM2BQ/q1i3JX3t8RLX7Eto2daihDqjhiDBYnsYnx5/pCD19jntL hgAmituXbCKLpyJxfTa8FIS9XI+lh5uuyD7Zg8HFr/KckojQnHC69icKiJnNjYI8D2nL +ebaLv/VO6g4C5i9CHBaFmiKMec+ee9ByLxaADq8FlCLOTJ+Qv4uIISfQmAEE3V/A/mY 6gwOBL0+trh47U/cDVQOSUwXcFnQm6GwVOxBbiQ2N2U+T3LySYXTYuXClG8zt1Fpff3S 8S4bcRczqkT0fCZoB6w+Vguke5GdhKffFE6sLZeoADS9cZAvCfdyi1QC/aTDV1BgEkDA XBMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NLSZU/6eK2V/eHLzkcIQjQ0NcjzG1uvTlCe1FSrYTIA=; fh=7Sc8fkyTb/gwcadI1ArxUwT1H28U3p3jx6tpAGZClHI=; b=m01TnCUVpY/ULNAvHFI1xDiw9sV8QvtQe8iPteBun8PCFH7wY6SY7zHxX3m6htIMSB GpaOrMuxP6J0L+odvNN5NwUfP9LgzVfN0EGwtbODCGHj+jArCyWB/CDtYXyg3vK1k/dZ pQ32gh0KWFbPjZ0sGaMpbPl8Uz9jALaLVPeGyVNe6GJBk/2ZlFh+EHBz6m9Iel3Fa0Bg C8wr8T9Eh9YXUMNjRhyaUnR7UQb3ghprJQMxzbmCy2Lfzf7a78REHnTRj2wHGj1YubhM CPeIE1PjaJCzSztTxD9nYZDby3Sn+UxN6+DStXshEP1VnWBsVfuOUm+8if8b/r+0m16T HfKw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=NHniP2JY; spf=pass (google.com: domain of fm-1325773-20240405163223c0c83308707095f514-ljzsih@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163223c0c83308707095f514-LJZsIH@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334746; x=1712939546; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=NLSZU/6eK2V/eHLzkcIQjQ0NcjzG1uvTlCe1FSrYTIA=; b=oKYSYbQu1EprJ3N10S52Zp/K0JybC0klaUH3kxCQTeoNIJSf0KqzwPwJUGXZUbVlZg 4+66LHcqmshOk0JmJazG1yorUkPZlkla+D+4iyIe7B5STgwUPbBAABaDmRT4+DIOwX4h 5NCDUcC+ZQhnLAeou8McF5aMgPaaCiJ8E8+xCNJpCj1mYnJozNwUnfCCkPB3Eyn6ILVS +H2QvTx1ctEmYY9hfUsrfEpyvwy6Lj+NXAuOXguAVu0dKegZWuLRcsSbNfGAUXdP+5Qo MentvqQ619nkOIdSg1RDkMxqBu1mJ/BwuKYLYnfUUhvV1q3zdM1QMLPlyzg10oMDExlD sZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334746; x=1712939546; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NLSZU/6eK2V/eHLzkcIQjQ0NcjzG1uvTlCe1FSrYTIA=; b=AsObebLoalb7xuRSRf/exNFtxZTlQt9FHIFpqzNFazdt//6cjFkTl4E+izRPl8aYez 1gCjV6927Z+5RbnCx0bVkvrZnd9jbf10zFPtYQFzwoA19peThRQu87G8uiOdehnKu6ly eT8XKZYdyGRBcEHphPRPGPwgKjL0F4V885zX45MUlMz05Mvpo1c9SmAt+ZMfydHGJMJ8 22bbf6dI+pljoqpsmi5bPOd23qwruNvJdhvS6mcd0SwazMLVh8NMbFRhkn8mAb6GuSiB v7o6rbQ0OJ4z8Saz7JRE8GdAN+pL15f2xgcuotsTmCi+CvL9ESc/yHFeCzwwogYIP6RI WeeQ== X-Forwarded-Encrypted: i=2; AJvYcCWu41aARunZJj0HBBE8GtJ/Z0P8oJeaZAlEUt/6KAZUXWzE4smZL58PJg0M196grQhaFsNJJ0Er69tu1tNkefEDgS8XkIQ= X-Gm-Message-State: AOJu0Yw5LLD+WNDAOohwY3wOr6bU7ApamiEPF8i03wsDUTWSMCdWAHwP oHr0BDTBP7/AaTsEB86uFqPqpIavxJvKG0OxeJh/BT33t3xmxnDe X-Google-Smtp-Source: AGHT+IHnWMY6i20PrvPcpkcmUtt2Q47MTN6G6ekTFCpfFmrFeqmI/4//6G62w4QcqtO9wn+SrSneFA== X-Received: by 2002:a17:90a:e294:b0:2a2:a10a:d174 with SMTP id d20-20020a17090ae29400b002a2a10ad174mr1934071pjz.6.1712334745699; Fri, 05 Apr 2024 09:32:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:ca8e:b0:2a2:3355:fe9a with SMTP id y14-20020a17090aca8e00b002a23355fe9als1356775pjt.1.-pod-prod-06-us; Fri, 05 Apr 2024 09:32:24 -0700 (PDT) X-Received: by 2002:a17:903:2286:b0:1e0:b872:d862 with SMTP id b6-20020a170903228600b001e0b872d862mr2257254plh.52.1712334744143; Fri, 05 Apr 2024 09:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334744; cv=none; d=google.com; s=arc-20160816; b=PYUhXe1/yZXIu4av0OTsonGxuWvodySHZ5mioTlTZZlvLqCGqI5xbxpBicgV33WkyU T7VuOC9I7eYq+BwySirkDDbxOIrGoBTlzo4dqDRmk8G3F/tZInBFrQ1QNs2fhLB8t9sI a8UMKong0dgZ6tjnbW//OShXltwAZC2lNZVfc+Bkx1SWZRZ1cys7+ppD9d8lURwtF0FP Bxejl3aqoJVnvaulVmVR0z6ToHz3DRJEcGgDzYpSJ8ZpYA6OYmeQzPNji2CAPKoieAV5 vTOLjc42Kk3RXODCM17AILIcypmpBeM8E6gdrKRiHPtHCpgix3zmTptk3cQhTB+3waww WOhA== 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=wyKwn6HscoV1RoKsg24H+Y8IfRwLm00bV1i7brRqD10=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=eHrxCeMKwfyQHeoJvym7aBnexZUR9ahq3oeGRtW86lV58kQntub4cfnZjjuj4RJ3xD 28jcJfXl5TV9lHF/BdoE/F1diHNCdEjIEzPEJ5DTeVGjMJcVPCPWNCw1hxoHHWDpZbix oLb6gSc7sZ0MueGZcmrEgdkQRSCO2kH18ZRUsC+If4yMWx8pKbUAynlvLILJ7cGiIa3a 1l9HX5FgffQY04GEyeLXcyhMx2vudKKsTEp4OZG2DzpLycEkynyoCsAzzCd2Vg2owNU8 1kOIFCeyUV54Mkjp+gGIQGvV/GqFybj8LYXwalqEIMUGr2cyY2hOFXeBlr6GtXiWZm0K XNuQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=NHniP2JY; spf=pass (google.com: domain of fm-1325773-20240405163223c0c83308707095f514-ljzsih@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163223c0c83308707095f514-LJZsIH@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id mp6-20020a170902fd0600b001e2c4ecc402si110212plb.8.2024.04.05.09.32.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-20240405163223c0c83308707095f514-ljzsih@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20240405163223c0c83308707095f514 for ; Fri, 05 Apr 2024 18:32:23 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 3/9] isar-sstate: lint: check for absolute paths in SRC_URI Date: Fri, 5 Apr 2024 16:31:29 +0000 Message-Id: <20240405163135.2987489-4-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=NHniP2JY; spf=pass (google.com: domain of fm-1325773-20240405163223c0c83308707095f514-ljzsih@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163223c0c83308707095f514-LJZsIH@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson In addition to the current checks for variables starting with an absolute path, particularly those within the build or sources directories, we should also check for absolute paths in SRC_URI file entries. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/C8LiWa1TAQAJ. Signed-off-by: Christopher Larson --- scripts/isar-sstate | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/isar-sstate b/scripts/isar-sstate index c14c2843..9b20cb8e 100755 --- a/scripts/isar-sstate +++ b/scripts/isar-sstate @@ -839,6 +839,23 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, ** continue # remove leading whitespaces possibly added by appending val = val.lstrip() + if name == 'SRC_URI': + src_uri = val.split() + for entry in src_uri: + if entry.startswith('file:///'): + entry_path = entry[7:] + if entry_path.startswith(build_dir): + pn_issues.append(f'\033[0;31m-> path in build-dir: SRC_URI entry "{entry}"\033[0m') + hits_builddir += 1 + elif entry_path.startswith(sources_dir): + pn_issues.append(f'\033[0;31m-> path in sources-dir: SRC_URI entry "{entry}"\033[0m') + hits_srcdir += 1 + else: + hits_other += 1 + if verbose: + pn_issues.append(f'\033[0;34m-> other absolute path: SRC_URI entry "{entry}"\033[0m') + continue + if not val[0] == '/': continue if val.startswith(build_dir): From patchwork Fri Apr 5 16:31:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3481 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:35 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f56.google.com (mail-pj1-f56.google.com [209.85.216.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWXOZ003064 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:35 +0200 Received: by mail-pj1-f56.google.com with SMTP id 98e67ed59e1d1-2a2c80fb803sf2070652a91.2 for ; Fri, 05 Apr 2024 09:32:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334746; cv=pass; d=google.com; s=arc-20160816; b=wRQGimfLRXqwwwa1Ge0TwELsvJMT6rOZLnLt7kjEaypYfoVc9nmnxvauAcB/hOWIRE 7q7nH3OGP+J+uisByprhh5Udc/BCKrRlxTaGaxJQwjoyaYnuOmL4Pw7Lau+H9IXj6Rfw 1+Q4zqmVXiSNDxB9fwdRMngg4rGZqoxLlH/WoWwUZxSG8mQKVa4thD8dZylwigHfSfQ9 BbZUb9InkDzou/58+H06RwLZvemllKdNwPhIgK8NAOXrwjdOynLpLD2CfhUR9pCy69g7 0vE/LFXuTt63wJbqTLB1llFBGk+P7qDqw2Zc31gQ7WzjGuXCcKAhMV8HYaoFWhi8q40S OX9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sZZoK/Zn9kbrKaG/t9DOn2rwd4BY0vv4hcmYd9PPtJ8=; fh=deZRGzUM+lXZk52dz8Ej+bfybTglxHe3hWGnZNGJ6vY=; b=X+X2xrytT26cNz27V2cUzQl51lJV1kHvZHr15FnKC+U2X0UE0IApTLPrPr2/8TAUXM +b8sDjLahyOtjopyXd4j3NBcbElePUVKV3xFOp5bDhtHiZdxXWPwMdWnQvrSNdUa6xhp oFCZUvT503QTnLWhkJVnpgS+IYhQ16otw9rm8MBVGOblfEEKs0DQNOv2WiNqJ75LNx7B BgiUJj4ShPKTSzOmkLR3bxY613WIWQpZm5CtLc1SnDxyW5EKYShDtSlwDNhceJZdK5MJ KQVZ0cMYN1ZKBapQNid0rdwn2bij/sQqf6qRcGSQ8O4FIrjGrkEHojMe+wR2I7mtyzz0 HkTQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=lCH2YKi5; spf=pass (google.com: domain of fm-1325773-2024040516322481f15bbe14d093a36e-wq6imq@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322481f15bbe14d093a36e-wQ6IMq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334746; x=1712939546; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=sZZoK/Zn9kbrKaG/t9DOn2rwd4BY0vv4hcmYd9PPtJ8=; b=LV1wo8sESS8DSAEpPKE+iQHwvCz6CqwmiPvRr3iQdTZ2IYuGNz6+fkOzS8Qa60Te/J QdrWYA2Yxb1zwHivYaAofQAr3udGTMm1Q/9XYyfg3XF4LJPaegZjMeJ7t+9Oyp9TrihK VZK5dkCWiwV/TVraa3lC64trUrMQrYGjPchkyRKDvo/29TDHvmqWKrHWEwnA9ABncorQ 2zT7VLTJj1FeikiVAXJp+c2VAvzT2sOugJnQzKL8ecXbGAqJuyFs/kEorevenkwBPr7p wGfNDRCKUzK6OzPTleSDcSYmUBVvrjNYlzvb9QhZNrPT05LV7cFyiEamnDjGUK2uFJDW GYXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334746; x=1712939546; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sZZoK/Zn9kbrKaG/t9DOn2rwd4BY0vv4hcmYd9PPtJ8=; b=ahRSdkDcT1d116eNxSFLhMN61BUAUMH0iHreUT73iStgLMm28z8B+6uIzPZEgoLK3h eeavH41PNCYyPFVVOKtDPFc748/Aeae3QPBaLTcmPBGNzeAG3jdhLLrFxU/CzYEO4yjX WoUtY07RxpR61R1JRXOrIJ06J+z5wbCbU58wV/GjcVTq/yl1NbH4O2CQbbApJNZPPixM AxxwnV4GnGOCG9y3gjB9ItJmGKWDtlQS0AZc3SuvrrkHPOQb1TezDgZ/1xRf5LmRHyVd 2Mq39sMh/ETV6nCDa816hcwgfgDBkQ2i/kpv3UDv+dB9v6Tg5AmQTMlvCbPTT0FEKfPl G3tw== X-Forwarded-Encrypted: i=2; AJvYcCXhHhNBM/CivSOTIjtvkN8DWj2b5Z75INRCxi7JB/324iyNJpB/EbVklVGoD8ZmNi5D1Z9502KqeictE4+z5C9y1dJ9aDA= X-Gm-Message-State: AOJu0YzU1WKrT1blf2cIdgY4NhJU5f8pZT+Gs7ufk3a/Bom/Kp+3o8QP fEUED304atjtzaABnC5U8vHho5dZ9+/ll5Hsb3wtzSd65mCqt7JE X-Google-Smtp-Source: AGHT+IHbOe1YvA6H/3v/T1CV5kHgPyVRECnKG4kSsPcHaK5Qd6MJYMpDAnLB4sHH1fySrEf4kLe57A== X-Received: by 2002:a17:90a:a005:b0:2a2:ea20:2074 with SMTP id q5-20020a17090aa00500b002a2ea202074mr1988320pjp.23.1712334746628; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:c20e:b0:2a2:9d0f:c728 with SMTP id e14-20020a17090ac20e00b002a29d0fc728ls1362034pjt.2.-pod-prod-06-us; Fri, 05 Apr 2024 09:32:25 -0700 (PDT) X-Received: by 2002:a17:902:bc46:b0:1e2:3db0:1d84 with SMTP id t6-20020a170902bc4600b001e23db01d84mr1806315plz.32.1712334745446; Fri, 05 Apr 2024 09:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334745; cv=none; d=google.com; s=arc-20160816; b=t+4QURxjPXn2YGFsP5Kl8K5b1qcl/SkcKHh732OB46X5FkosUCXEMR9zyIXb6+Z1/y j8Q/jw4AQwb+rsPV1/FwtBh73p7P0H54e5LBc8sRv+v620O8qQFfRFwDSG5kb275Jg3J NIfL/QtPJ2HZluuXSp8Nw2ehKv/Ze51N7K/a5ltV+jjtyE/5E2gbAGvLuzztGLGQyryh 4JdWWJ80f5ulycaXbjW3PcP4Dnay10VFdR9n0QG8jML7YZgb8qPXMt4HFnupB2Y9C1Rg xqCccIrSYHbWpX5TvN3WYB8XaQJTrEmsKhlw96U8y0/Ut3F2s/XJZ1b0nTKz91uGAc/G i+IA== 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=lHo56J9PyTOzEGKYUsZ78jlLZiPMDdfI577GnBCiu5k=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=myyJkOFpUt/V7q38T4BnnTWmxjfJtAuMQyZT8XvjVNEzd5aPAI+on+EUczMnZXnsD3 dG1etMUc2HZCc79bo48LkJgqFEolv95XsJlHJUmJ8/RqLXNBPElWTconrO/TMm38Bsiq wO0+gRwU8GV0ws2KnUyQ5UkX/XRqYDPBecrzEBaAIcSwFO3UrgDZBi64B6Qz5aQQPxH0 B7lmuSUdZyfsr4+T3JqFLvtAN78aIT6DQMZgNHFISyEB4ESxZJBJVbQc/kJW+h5MEgpx sxuwfVrzT2NbyXrOEK/PyGoZJ9ubK9TK7KsY5Fzey0zvvSqa63UBKs8/hHahksF8MkoX 1f/Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=lCH2YKi5; spf=pass (google.com: domain of fm-1325773-2024040516322481f15bbe14d093a36e-wq6imq@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322481f15bbe14d093a36e-wQ6IMq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id jc18-20020a17090325d200b001dd61b4ef8esi97963plb.12.2024.04.05.09.32.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:25 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-2024040516322481f15bbe14d093a36e-wq6imq@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 2024040516322481f15bbe14d093a36e for ; Fri, 05 Apr 2024 18:32:25 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 4/9] isar-sstate: lint: add support for checking stamps Date: Fri, 5 Apr 2024 16:31:30 +0000 Message-Id: <20240405163135.2987489-5-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=lCH2YKi5; spf=pass (google.com: domain of fm-1325773-2024040516322481f15bbe14d093a36e-wq6imq@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322481f15bbe14d093a36e-wQ6IMq@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson Bitbake supports writing signature data directly to the stamps directory without having to build, so we should add the ability to lint this signature data as well. This is useful for checking for cachability issues without having to complete a build. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/GMuGk61TAQAJ. Signed-off-by: Christopher Larson --- scripts/isar-sstate | 51 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/scripts/isar-sstate b/scripts/isar-sstate index 9b20cb8e..d68b8938 100755 --- a/scripts/isar-sstate +++ b/scripts/isar-sstate @@ -66,8 +66,16 @@ format as `bitbake-diffsigs`. The `lint` command searches for common flaws that reduce the cachability of a layer, e.g., signatures containing absolute paths from the host -environment. Issues found this way usually indicate errors in recipes -or in Isar itself. +environment. Issues found this way usually indicate errors in recipes or +in Isar itself. + +The `lint` command may be used to check a shared state cache folder, or, +with the use of the --lint-stamps argument, will check the tmp/stamps +folder and expects this as an argument. The signature data files must be +populated in the stamps folder, which requires either a completed build +or a `bitbake --dump-signatures=`. The value for this argument may be +`none`, `printdiff`, or others defined in the handler, but `none` is the +simplest to just generate signature data. ## Backends @@ -154,10 +162,19 @@ SstateCacheEntry = namedtuple( # "${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:" # This regex extracts relevant fields: -SstateRegex = re.compile(r'sstate:(?P[^:]*):[^:]*:[^:]*:[^:]*:' +SstateRegex = re.compile(r'(.*/)?sstate:(?P[^:]*):[^:]*:[^:]*:[^:]*:' r'(?P[^:]*):[^:]*:(?P[0-9a-f]*)_' r'(?P[^\.]*)\.(?P.*)') +# The filename of stamps and associated signature data is defined in +# Isar (ith an added suffix of `..sigdata.` by BitBake): +# STAMPS_DIR ?= "${TMPDIR}/stamps" +# STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}" + +# This regex extracts relevant fields: +StampsRegex = re.compile( + r"(.*/)?(?P[^/]+)/(?P[^/]+)/([^/]+)\.do_(?P[^/]+)\.(?Psigdata)\.(?P[0-9a-f]{64})" +) class SstateTargetBase(object): def __init__(self, path, cached=False): @@ -288,12 +305,13 @@ class SstateTargetBase(object): class SstateFileTarget(SstateTargetBase): - def __init__(self, path, **kwargs): + def __init__(self, path, regex=SstateRegex, **kwargs): super().__init__(path, **kwargs) if path.startswith('file://'): path = path[len('file://'):] self.path = path self.basepath = os.path.abspath(path) + self.regex = regex def __repr__(self): return f"file://{self.path}" @@ -334,12 +352,13 @@ class SstateFileTarget(SstateTargetBase): for subdir, dirs, files in os.walk(self.basepath): reldir = subdir[(len(self.basepath)+1):] for f in files: - m = SstateRegex.match(f) + relative = os.path.join(reldir, f) + m = self.regex.match(relative) if m is not None: islink = os.path.islink(os.path.join(subdir, f)) age = int(now - os.path.getmtime(os.path.join(subdir, f))) all_files.append(SstateCacheEntry( - path=os.path.join(reldir, f), + path=relative, size=os.path.getsize(os.path.join(subdir, f)), islink=islink, age=age, @@ -592,6 +611,9 @@ def arguments(): parser.add_argument( '--exit-code', type=int, default=None, help="lint: return this instead of number of found issues") + parser.add_argument( + '--lint-stamps', default=False, action='store_true', + help="lint: assume target is a stamps directory (target must be a local path)") args = parser.parse_args() if args.command in 'upload analyze'.split() and args.source is None: @@ -798,7 +820,7 @@ def sstate_analyze(source, target, **kwargs): print('\n'.join(out)) -def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, **kwargs): +def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, lint_stamps, **kwargs): ADDITIONAL_IGNORED_VARNAMES = 'PP'.split() # only list non-cacheable tasks here # note that these still can break caching of other tasks that depend on these. @@ -809,7 +831,10 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, ** print(f"WARNING: target {target} does not exist. Nothing to analyze.") return 0 - cache_sigs = {s.hash: s for s in target.list_all() if s.suffix.endswith('.siginfo')} + if lint_stamps: + cache_sigs = {s.hash: s for s in target.list_all()} + else: + cache_sigs = {s.hash: s for s in target.list_all() if s.suffix.endswith('.siginfo')} hits_srcdir = 0 hits_builddir = 0 @@ -891,10 +916,12 @@ def main(): target = SstateDavTarget(args.target) elif args.target.startswith('s3://'): target = SstateS3Target(args.target) - elif args.target.startswith('file://'): - target = SstateFileTarget(args.target) - else: # no protocol given, assume file:// - target = SstateFileTarget(args.target) + else: # Either file://, or no protocol given, assume file:// + target = SstateFileTarget(args.target, StampsRegex if args.lint_stamps else SstateRegex) + + if args.lint_stamps and not isinstance(target, SstateFileTarget): + print("ERROR: --lint-stamps only works with local file targets") + return 1 args.target = target return globals()[f'sstate_{args.command}'](**vars(args)) From patchwork Fri Apr 5 16:31:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3480 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:35 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f185.google.com (mail-il1-f185.google.com [209.85.166.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWXJt003062 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:34 +0200 Received: by mail-il1-f185.google.com with SMTP id e9e14a558f8ab-36a0a33c1bbsf12086225ab.2 for ; Fri, 05 Apr 2024 09:32:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334747; cv=pass; d=google.com; s=arc-20160816; b=sKefdYxB2bMV9YW/NhrZFM1SO7GDaRAEyAJJ9hEt/W0LkyuCvrrfOL31pPLZPCq6pU i+m/ZTY1JVM3yFEFJNY4hE8iu9Kr7LmWn82/pXXhLXbCbQ/6PI1lqPVTPPnoV5KswMc4 f9mf0c5StfDbiQkZ/tOjAu/EloPYmLJD3oleZTEMvd1eViuXDskm2ceqEmMlHuzpYyCN Aw7yiD5c71B3QErF6JQ7/qQt6NV57r2/IfpvUL025gOqQl8ZkmZKm8NYwwku4Wyd4iZF sc6MnDGsSPTQXxVoGMz7r/3Wte2Dg0qxEbeFG39/2v64gsdyh5mWVTF6txuK/LjVeuI8 nQTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VcK7V5ToDgf51xCSMJmWWvyT+322XAZnmAQxgUJb0TY=; fh=gQZCXYx1L/I3D4Ax//p6oN8XIG+D1zpGvpy7mGZ+Eho=; b=Vr7pDdVFazRe5qSMyU9mmCWtzTVhzhnxvWqHVO7pbQxNMvTyKS5R1udzSMSKwc+lPj Wqla0VXks6Li6cPL6ZbJRKT2IGucuKISNq13tqmsVwoaBqfxo6gGXBe9RVZ4Ozwj1qQo sV8t79Ghw8tRxb/Cc9pIFkHY0Cu0Kk/ScMW9QqPsPRMmDm8Rd1kLvWlJCsr85kACbVJh YD/Oe4rjiZPyJkHsWIh0CwblAn60bW/tSNJbX4j3ZhPe6xyhe0fEVHyYZt/418x979q3 E3gzXXA9KdZZWLI2zjGGQQgwZcPn6ssLkEIQ/oB+tHpYLUpIbT5jLBSf2Fc6J78nokLj C/5w==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=R44fIvUL; spf=pass (google.com: domain of fm-1325773-20240405163225b1cf2978f16d381092-7thw9a@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163225b1cf2978f16d381092-7tHw9a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334747; x=1712939547; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=VcK7V5ToDgf51xCSMJmWWvyT+322XAZnmAQxgUJb0TY=; b=oB2XfwW6IGgXu1XFNjLXTk84Rj3j0M2qyhmrJpyQ/eta0Hw9N2WVkhg8EX//8fATs3 mGxjmX0ei0x6AyG5cn+PN9Pj662MyJqcR6RDh9yyhjKr+2OCHuSBcENQJb1SyM9J3im5 nJy7VLnKIOdRqKl4w9xk/3T08PDtv3df0L2aIFj0mj479oQnfR/o7tdb6Ime25BuBc3n Z9J4S6zVrsc/HOqfFMayWInhld5fAk+10RH+98zc2IaSraXlwSvqm9tQWpkBcDtzoFVM pyLRCCEw5nzrz7d9rhZU0WCNhnaj0eG+KMmQhx7aCDAR/QZcfpHl3GOjYEH2t7GQtVgI Vs4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334747; x=1712939547; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VcK7V5ToDgf51xCSMJmWWvyT+322XAZnmAQxgUJb0TY=; b=Q28Dp959SUnOYdceAL2bmHFYVAT8RhYblN5DvEbhD+6DFGF/puysfO0f7m+QBj61Gd Rwu6bg3J3sZ8M5Zh0sufPv5i1TUI6VHawWPRVgpxK6U6xEOMI/kgtBwenHlkRQvccLq1 wDP5pj1KUW/9b4H2n6aZWHLFmcUsE1hMEm9RiQZaH1+XhJ99N1BamQyxK2o5puJJXrbe A7Wh2k5MRWrOyE59TI0gE6qX4UY0dAjBwC74p8grpqchIzk9pgB4NuESs06+D78+7n5q SfQvhp3OiNnTY4CjX615iGsc1gKHuV2Gzg8qQUK+s/Rutl3vgtJ9cnikjHVWG4bbzGbM BZwg== X-Forwarded-Encrypted: i=2; AJvYcCUEqMLCjqkrxQ/owzHK52PKbVPKiXgtVcEav+vK9HF8+n4TcglXeOPilHsP2ty8pFt5067EDU0bFhNAkVwdOKwttA1y2rQ= X-Gm-Message-State: AOJu0YzpE1ru9/OdRXt97oMSyTgBmqFPA9bkqriPWhiv938Fk0R/6ZYs w3bbxKAMFx3qzWUU6YTz0bs5Crpkzcc4qOTz+ISsmMtt851k2l6O X-Google-Smtp-Source: AGHT+IHxAa30GTUOfrZmM8HO/5rsrwxbEOCaAqT8OFaKV9C2j/1ptnMBCN0Fjl7FxvZ32iWKy1Vd0A== X-Received: by 2002:a92:c54b:0:b0:368:4a3d:e8c5 with SMTP id a11-20020a92c54b000000b003684a3de8c5mr2267196ilj.15.1712334747367; Fri, 05 Apr 2024 09:32:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:2206:b0:368:8295:6251 with SMTP id j6-20020a056e02220600b0036882956251ls1569854ilf.0.-pod-prod-04-us; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) X-Received: by 2002:a05:6e02:2197:b0:368:82f1:802f with SMTP id j23-20020a056e02219700b0036882f1802fmr2118596ila.25.1712334746160; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334746; cv=none; d=google.com; s=arc-20160816; b=YXhv2iEzr/UdNFz7apRoCjY+6HasgMbG/GSZywOpOZZ5dWgM9beZEEAvtAgCbji4B3 7QqAqI5cZm8vN/+M+SOYl7rZIZe1rcq/onzHTtDDvYNnZQ7Bnud1IgNkO6I40DStV5gW 7aM5EwYm5oO/hmmyTpKiSvQTpierYO/ed5LtEIhKTtR5LqLlrsVBbVWLY5TfLNaSo8JA ACbkXXWBl8q4TLGHga1vc+ZjJtUT84DJYKjJrv73igoVC9dsKb9H37ufnecoz4VccZ5p ThkWwwJXS5XomezpxZ7i1vFXmLTEAxZ/MwqF0TA0LjuMThNGq3jE/0KKSKh+cSPU5MzS w/QA== 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=hh9kCRsfi7eiBKmPpoEUDqaDW8052964g5TJn1B/qcw=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=CJjxUxhQne5pxB9bNsDxkCLg7jgEMNx1+sLtyz3UZARZ6XBFxiBNmhwmq0oCOyEtqa Mhyh265kGAiQE/+YEYa+6ARWcTzvRh5/IA6pjBJGWoiW9L2Ag7hJxWKhxkrY6I7jjal7 eSAqwpk2NykXL2n/LkF1Ezr0y6nspYIB3z++WY6JVMh4KTr/PoXPNjLF67i2KOK3UhXZ KzGZqChg4n3mS4JxsWEJWP6Vqx4YxP/ikQ4ljgq5n3jgBC9zj8bOEb0D0Qqakcse2x13 BDVRTdPugQgXgjxibiUF1APoY2igDm4fQ9fXrY5Ui67SqrRIaZ+86/JT6RkBKxMM7ij0 IFtw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=R44fIvUL; spf=pass (google.com: domain of fm-1325773-20240405163225b1cf2978f16d381092-7thw9a@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163225b1cf2978f16d381092-7tHw9a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id c4-20020a63d504000000b005f0a5113629si153309pgg.3.2024.04.05.09.32.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-20240405163225b1cf2978f16d381092-7thw9a@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20240405163225b1cf2978f16d381092 for ; Fri, 05 Apr 2024 18:32:25 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 5/9] isar-sstate: add --excluded-tasks argument Date: Fri, 5 Apr 2024 16:31:31 +0000 Message-Id: <20240405163135.2987489-6-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=R44fIvUL; spf=pass (google.com: domain of fm-1325773-20240405163225b1cf2978f16d381092-7thw9a@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-20240405163225b1cf2978f16d381092-7tHw9a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson This allows the user to override the default lists of tasks to ignore when linting the sstate cache. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/Ca1TO65TAQAJ. Signed-off-by: Christopher Larson --- scripts/isar-sstate | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/isar-sstate b/scripts/isar-sstate index d68b8938..a4429b7a 100755 --- a/scripts/isar-sstate +++ b/scripts/isar-sstate @@ -128,6 +128,7 @@ apt-get install python3-botocore import argparse from collections import namedtuple import datetime +from fnmatch import fnmatchcase import os import re import shutil @@ -154,6 +155,8 @@ try: except ModuleNotFoundError: s3_supported = False +DEFAULT_IGNORED_TASKS = "rootfs_wicenv,image_wic" + SstateCacheEntry = namedtuple( 'SstateCacheEntry', 'hash path arch pn task suffix islink age size'.split()) @@ -614,6 +617,9 @@ def arguments(): parser.add_argument( '--lint-stamps', default=False, action='store_true', help="lint: assume target is a stamps directory (target must be a local path)") + parser.add_argument( + '--excluded-tasks', type=str, default=DEFAULT_IGNORED_TASKS, + help="lint: comma-separated list of tasks to ignore (default: %(default)s)") args = parser.parse_args() if args.command in 'upload analyze'.split() and args.source is None: @@ -622,6 +628,7 @@ def arguments(): elif args.command in 'info clean'.split() and args.source is not None: print(f"ERROR: '{args.command}' must not have a source (only a target)") sys.exit(1) + args.excluded_tasks = args.excluded_tasks.split(',') return args @@ -820,13 +827,14 @@ def sstate_analyze(source, target, **kwargs): print('\n'.join(out)) -def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, lint_stamps, **kwargs): +def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, lint_stamps, + excluded_tasks, **kwargs): ADDITIONAL_IGNORED_VARNAMES = 'PP'.split() # only list non-cacheable tasks here # note that these still can break caching of other tasks that depend on these. # Run in pedantic mode to also look for these issues (e.g. in image-in-image builds) # To make a build fully cacheable, avoid absolute paths in BBLAYERS - ADDITIONAL_IGNORED_TASKS = list() if pedantic else 'rootfs_wicenv image_wic'.split() + ADDITIONAL_IGNORED_TASKS = list() if pedantic else excluded_tasks if not target.exists(): print(f"WARNING: target {target} does not exist. Nothing to analyze.") return 0 @@ -840,7 +848,7 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, li hits_builddir = 0 hits_other = 0 for sig in cache_sigs.values(): - if sig.task in ADDITIONAL_IGNORED_TASKS: + if any(fnmatchcase(sig.task, pattern) for pattern in ADDITIONAL_IGNORED_TASKS): continue sig_file = target.download(sig.path) From patchwork Fri Apr 5 16:31:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3482 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:36 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f183.google.com (mail-pl1-f183.google.com [209.85.214.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWYjg003073 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:36 +0200 Received: by mail-pl1-f183.google.com with SMTP id d9443c01a7336-1e2bb241663sf13952815ad.1 for ; Fri, 05 Apr 2024 09:32:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334748; cv=pass; d=google.com; s=arc-20160816; b=Bs6bK0994M/HclnnwkWEvXj4GAOmquP0+lauHHK9rA0SltHIB9dfFvnhirv17WfQ0j RlfLXd31P2PImtDy0vZ+RXU0S/RenOXttPUkUw8/q5N5EQQu4o3Ave/NImPTkrezpTrw ofaA3K26nN/3aBzExE5yDjIliWy/v1/MsnZjJnu9y/XqmwcZMQfiaUQ253UumXPpBgYC 8EdU5VHFRJ0/0fSoiws1KCGvYSSKAsky2bAPr/abtxosixiuG2v3gBVe9V1DLzjEzE9H 9ytQ0258k9KOlAXHYILbizfopa/UzXT5etahdLn7QIG14Oms0Sk2se7EBHymWQV6/wqf O5kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YEdxAhD7VIwpglPzUJnp36yZeB3aTfIWatArZQZmVj0=; fh=NYk/Lv0wPZs78zwfMC9tPvJBtKcTk9MNSmo1N4OpGLY=; b=h0LK+/G9ApKd3BKWTuu/ntislqPOvUuttThZ2nfeLo0KwkscoHrcYykwOsf8/MruC2 5xFq68jBP0cNA75Cn/m98+zJbcpl46dBFv/kLfmcJ9HyRBYUjjlYWMDX1A1VbC12vD1B CnZeBCvhnDdo3VsrXVyrk7toq0LMCJ9DwSBOCZEY3JUXMuL+46EnYbDt2yHe/nrLJ3Mz I7Kdjv8oQ5qqnqOmCxvk8LXV0k2pyP5SYhOzSDGi/5VMDg3oB78H5t45R04hJ+rr55ZM uLVagMrbhPLzLjUCGb2+mag1UPXHeIDA+hmxH63fz78ngWghnylvlsjgtsRO3w/wRcTD A1Sw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Z7p6ts4B; spf=pass (google.com: domain of fm-1325773-20240405163226e6ce2504f08d44c6f5-zapzuj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163226e6ce2504f08d44c6f5-zAPzuJ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334748; x=1712939548; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=YEdxAhD7VIwpglPzUJnp36yZeB3aTfIWatArZQZmVj0=; b=CZNrlyn8wLptcnaVBig+rYkddR47URNiITslf5GmmhZjyeaCYk69LviD7StDlSyJjE pyqnii6swpvoalyrsTDKO83ViZ3k0zMvM2CRiAeoKykHUGtn08DKQ7oxpusjxHwZjd7F LZPv2U2iGep39Ub9XkpmWChOfG/dBVmoTqN9WPz5ZB8+1XG2jdNXXI1nIDm2IZnkjr/x 7BYaIaY8GMfgNf7eG6dLNySxOLF3zHxR8N770nI21jDKrQkyJgobYoc5kiM4+DgDvaDN imK9AyQfZZou/SX1mKHULVlvXIeHgjH7ZVi7is+ODAu/oGi2NnfguCQfv5MKEym8mo0L cbtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334748; x=1712939548; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YEdxAhD7VIwpglPzUJnp36yZeB3aTfIWatArZQZmVj0=; b=Q6llscur5iv9BZ8N4BkXkrsSf1/OMZ8WlOsv92h+b+4lfTkbxOr+ftwcvL5dXGeX4D xFqYEAHUg7Dw9LFeHOZKYkX2Fy4Cjimbo++dn2ewCdLuSmq7O6sgoTuY5zI4Ds2EqCnL bmQw8hZZJNvuGgIAc3tBOsmnuAtonhcSmcgfOH+VpxwhGEDeT87AjfRmmU1Gg96zUVZP BBIiR9Q5cmAEjM+x/v4kRQBcbjGxJtB++zstsX8xs5GL/ddg4mLKrRI3lj+uPMaRAwt1 7F+qcHUCJkSl8mqfIL8oRO+4cTxUsrCuJnxcjj7d+Xk829/ICzNOjYDR2VkUefXkMQzX pMdA== X-Forwarded-Encrypted: i=2; AJvYcCXRtq5usuCHmks0YFNMaDqgda/kKD4z2/9KDyECSEy1ff+CcUYzeSH6NSyp2UonAUA39MK2sZBGp+6Bn1emxkRnddccHRs= X-Gm-Message-State: AOJu0Yw3ZRiciFW9CmaS33DzXGoprCaamoMNHqzBLlVpss3Kr+LDIyE2 Oj49kXDfRgxFQFzADjKaIynKFmOpgzmzJ3WFMgLDsQItfPreT6bv X-Google-Smtp-Source: AGHT+IGPIrlooz9896ao1agV1U1rjgT9NaqXw0i+0hDAfDQJe/f2xTlYhOs3ZyLT+VQJzi3xbtgb5g== X-Received: by 2002:a17:902:d506:b0:1e0:b873:ce48 with SMTP id b6-20020a170902d50600b001e0b873ce48mr2182830plg.27.1712334748417; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:e5cb:b0:1e2:a413:578b with SMTP id u11-20020a170902e5cb00b001e2a413578bls1735814plf.0.-pod-prod-02-us; Fri, 05 Apr 2024 09:32:27 -0700 (PDT) X-Received: by 2002:a17:902:d2d1:b0:1e2:aa13:5bf4 with SMTP id n17-20020a170902d2d100b001e2aa135bf4mr2370307plc.8.1712334746965; Fri, 05 Apr 2024 09:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334746; cv=none; d=google.com; s=arc-20160816; b=sFXScQZ5C+xZ0tjYt329YUQeV1ma9WFdksN/XlmI3nl97P1jpqm4P+q7g0Pb3oeuba ZiYZD3EXh/0/vE2VTCqib44BLyOzZa9/HG2uHN97Tc6X1ploF5EZ2esyx7wqUxGe0gup Pe7PjKGVpwGG+TovNYbDXuK2BGyqWlOjYx9xUBVyB6LqkMI/EE8rkShkWim/wX9bf6wl MD/59QeoEtl6A2U+LysKLtumK52YlU10gdGIBwuumB8k1ULCIUzCmpBMKXum46knKMy6 fYOWi/0PKRxBCS6S+HVh8gdK9Hv+BWpIhjcBJl/qXZgvG0jLuQPcChzdYFZFCggyPs+u N7sQ== 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=XQoEjsphyZvUDDMutunjKOyx4SuUUd8lZ7A+xckUXIg=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=m8ZMuNNjmH7weUVYfIBv5ZF3g2cr1GQ0N2EF049lRBvkAxM0C5YQLc38QRx81A4x2v S+jdlTRs7FzNFJ85VduA8dx/4dHb8k7Xvs9lv0KtxPMEKfcWJsybkMxpwfeeangESN7j bQofGsVzYm57PjnF0ooXhgQck9949Axn/pckBxC1/6HDKhaSOC+wb75HJj0/jvKIW/cr XqnL5ZuKEqSdfKJ49rrfopNWIIcpkEDVb3utdiVEIr5xE2qUvdy1xkvjMlNiN+SEISOg 1+sBKnqNMUTfELcJOm4eqt/bC8+VSyytBX9oa6bPxu1ud5YsNSkxRopxXTZrwYTCL2MB c1fQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Z7p6ts4B; spf=pass (google.com: domain of fm-1325773-20240405163226e6ce2504f08d44c6f5-zapzuj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163226e6ce2504f08d44c6f5-zAPzuJ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id jc18-20020a17090325d200b001dd61b4ef8esi97963plb.12.2024.04.05.09.32.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-20240405163226e6ce2504f08d44c6f5-zapzuj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20240405163226e6ce2504f08d44c6f5 for ; Fri, 05 Apr 2024 18:32:26 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 6/9] isar-sstate: fix failures if a variable is set to just whitespace Date: Fri, 5 Apr 2024 16:31:32 +0000 Message-Id: <20240405163135.2987489-7-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Z7p6ts4B; spf=pass (google.com: domain of fm-1325773-20240405163226e6ce2504f08d44c6f5-zapzuj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163226e6ce2504f08d44c6f5-zAPzuJ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson We see this failure if a variable is set to the empty string, as whitespace is being stripped off of the variable after we check if the value is empty or None, not before. Traceback (most recent call last): File "/home/kergoth/Code/indos/signatures/isar/scripts/isar-sstate", line 941, in sys.exit(main()) ^^^^^^ File "/home/kergoth/Code/indos/signatures/isar/scripts/isar-sstate", line 937, in main return globals()[f'sstate_{args.command}'](**vars(args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kergoth/Code/indos/signatures/isar/scripts/isar-sstate", line 894, in sstate_lint if not val[0] == '/': ~~~^^^ IndexError: string index out of range Signed-off-by: Christopher Larson --- scripts/isar-sstate | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/isar-sstate b/scripts/isar-sstate index a4429b7a..4ea38bc8 100755 --- a/scripts/isar-sstate +++ b/scripts/isar-sstate @@ -868,10 +868,11 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, pedantic, li sigdata['taskhash_ignore_tasks'] and name in sigdata['taskhash_ignore_tasks'] or \ name in ADDITIONAL_IGNORED_VARNAMES: continue - if not val: - continue # remove leading whitespaces possibly added by appending val = val.lstrip() + if not val: + continue + if name == 'SRC_URI': src_uri = val.split() for entry in src_uri: From patchwork Fri Apr 5 16:31:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3483 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:37 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f183.google.com (mail-pl1-f183.google.com [209.85.214.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWZVb003086 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:36 +0200 Received: by mail-pl1-f183.google.com with SMTP id d9443c01a7336-1e0b5e79a57sf22092665ad.2 for ; Fri, 05 Apr 2024 09:32:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334749; cv=pass; d=google.com; s=arc-20160816; b=dbExyb7Lox4i2bJ2OlBv2NdsLWG09rh4ABdVMwjm8Vg3zZ0xa9MPsAl923K2yOQ26v bqI6dtXj2ZZXyOYDDzgnDw0db3kZRBlZrJvUlqSIYf/X7wMeb+D/hW1A19bjcT1LTP7U lG/GI58C3nPBK5NmihSrBFd0WUafB7B4203yCmowH46fs+w7baGkmHnT1F11bNQOuiWA ZZuwWBsyOR4twY+LB7w6PYvnMsVwQoBh9LKdynvNK++lDRrm//vkGlfLJ0sqfnNWfVnh NQzejfJfa8mFrI35+fSz/XiqhzSQmDDVTjfcI4SqueHaEDFAbzZMq00E+cZHw8669QIP Lw8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wNtnrneDDNl5kuN7gCCGnW4TFS6sgToIqGQry/s8wvk=; fh=GWvo7Bs2Ndtjzqrpylm58YB30boHb5pYoc/gfy1EX/g=; b=RdzzAxvd6A7hFtqCtRq2Mb5oFr3ibRSatPbaUp59VJiuSbtedqfz7t6DyJZ4Pi+lBG Z5BpZ6OekEiGV+/wxj66wMEeGZpMDRiIVQ7Q+gXjCJHuQpOYT9kKn8V+TLxDH3vclfML /XP2LayqK62XxryoTOpSD/0btnjLR0SEnITxbIlrqbcvI+EP+jjqir20C2WpGkX4SRNX 12fpU3NG3LyLkqq6PHn1UmzYbveeCXTx/u7zC6EGB2I961cg/ykYOUKdaZ8w3b1yshKG I2b8e+18tgUJ1Ue+8TgI6sJSLr0ZjZXrYs5osIosIWWHvLSSqSKFIodN+PRSJK8ecC5m 0bow==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=cJ0FpS2z; spf=pass (google.com: domain of fm-1325773-20240405163227fbd990af1b38387321-g1cpiz@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163227fbd990af1b38387321-G1cPIZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334749; x=1712939549; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=wNtnrneDDNl5kuN7gCCGnW4TFS6sgToIqGQry/s8wvk=; b=ufZzbDZh6lC2QT6tcA+SO6Epj+5FA44IZY6vlgDfacxG2XJ8JXWYLYKWjyYlD68Nd0 4/o0t+sLQx3mbNyEW9WPWiK6wD36AD9P6zQucLRBhem/G1bU/Kh+emjHRMG/9aElfUBU mq+e/rAy+fmMf48c6iO8AX4HQDj1ac6SURmO/jaa96jcbcNIg0cL3rIpvWDXZI5hrtKy wSoi7P31yoN+vGG08rTedHgMJQ0+owjzvOvhpareKZPd9j+eAkqxZJ7X1iDvM9TI+0hk 0uS6g7Kwwo7QOq0JbqlzzMtyCsF7JTQlq6bbgbAzWuoQIvqZTHIe4x28dfcq7T5gU89m c+2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334749; x=1712939549; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wNtnrneDDNl5kuN7gCCGnW4TFS6sgToIqGQry/s8wvk=; b=j2Hu782QD0MaWNQbt8vfDuXBJvZjgQ/AEWJyWjpoC12j8uWxb9+5h+yW+sO+750pyY xyRfVmA69xcEzOW9GA8FWJxijYRVA3QFLSuPFrc1JUBH3YqTnMn4YjIlxcNh+wzuvZzg mbRa4pA+0fc2aSivC/LgHvuigP06fOpZ5HUVu7yxMUaC6J7PwjUolykJc2tWd30VnYaD DTQt4Kt0zfBYq7ZIOJ8DCR1CvigBxGTSkMZZmsnKwuymkqWU0oPY1ajfDzOsf/9P6/QD G7Iuo9jKiT0CesWK9wqfBXca6WkmXgkOZcTHmhYMvLqNyKv1RYnY+gbrym2Vnxppe4pr s8Lg== X-Forwarded-Encrypted: i=2; AJvYcCWL+Yt+R8aQ8YKs/AYfO7D/d00XCCl10Ic3ibPvlnnFF7i7FFIeCPNlksqRrMBo8htMF/iuxPPYG7f1HL9uFdUQOWXMkoE= X-Gm-Message-State: AOJu0Yy5PqV/Uv+wPA3ATPbfiNERNd0ijJndMnPN1KIIeV22LXMG7sKS GlXi1shulpP/0JVvSWqWdfY0I2jp+InqSzvsjCi8pFrgORPbqfz39qc= X-Google-Smtp-Source: AGHT+IHK84zxmBiZv/E9a/qbriF2c+vc0pkJg3+B4lD1BDv72HqjDyWjW0yJl7mP1tuhShX98/QC9g== X-Received: by 2002:a17:902:ea01:b0:1e2:b8fc:745e with SMTP id s1-20020a170902ea0100b001e2b8fc745emr2134541plg.8.1712334749522; Fri, 05 Apr 2024 09:32:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:903:2443:b0:1e2:a414:fea4 with SMTP id l3-20020a170903244300b001e2a414fea4ls1509522pls.2.-pod-prod-05-us; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) X-Received: by 2002:a17:902:f547:b0:1e2:a077:1c97 with SMTP id h7-20020a170902f54700b001e2a0771c97mr1980848plf.40.1712334747744; Fri, 05 Apr 2024 09:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334747; cv=none; d=google.com; s=arc-20160816; b=JBrgbrbYYu6Bty5ENgHOCNIfUgsFqDbJpBYRHx28VmIsyaRwjGGqELpVNZOuoQdogR oWF3uqrXp+1vQLJbvY79gHHAjj5St6K4SvJ2znCCfWgAuJR3ouxLf0lwEj0eg61ovm0E Cyqxj4UvxxAxhGYNSTUhQ+NKv67cHn/WWDU+T7L4uPxglKFeAOD2IjqYlEj/q8ijangj M57dY/k5ozkUFhpVTa6Bus1VsZt/ux1BXhjR/mIdr7KbqoQ87zVx7GB6QZf2F2bj43d5 4Pg6XPFWsiQzt+jUjZV0/cP7XYWJkIGdyyijkPbtSdWzCTkOQmOLUX9WhO8vBwAyEwQM cQiA== 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=GkzvIilkdmpq+EEsWcdSyK0oUcDUAB9ReseS8cEATMY=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=jhv6+QPDrtpSbsF75YQcBuxfaKpPPYPnKO9FzDzOaKlkwrxYc//PWXWghEEMMgA3vp uMm3qVuy1VXT0B+reD+ngd2jEP4cGh8n2UYLvBUYxwFWDTv7DFYlsZSQjv5QvvVgRKdN doJWW3QaU08CjHTF55y1m9m8kR5X6fdsAoSQ+leBO4xJyqErz8pjsVeAjz0903szevlS clhNdxosHaK/9hVEu3HpOLyjBDkX8rEohOQQJuBKV20pTIL+NIyuiXqPN8ZZE2ve8Slu RX2DsAYUm1jOI5hKEOxO3boap3GWhQ3c/iGTACFDhFs0SFhLAmp8doGLAeMNYqhnVfKy 3x4g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=cJ0FpS2z; spf=pass (google.com: domain of fm-1325773-20240405163227fbd990af1b38387321-g1cpiz@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163227fbd990af1b38387321-G1cPIZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id jc18-20020a17090325d200b001dd61b4ef8esi97963plb.12.2024.04.05.09.32.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-20240405163227fbd990af1b38387321-g1cpiz@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20240405163227fbd990af1b38387321 for ; Fri, 05 Apr 2024 18:32:27 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 7/9] cibuilder.py: add -S support to the bitbake method Date: Fri, 5 Apr 2024 16:31:33 +0000 Message-Id: <20240405163135.2987489-8-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=cJ0FpS2z; spf=pass (google.com: domain of fm-1325773-20240405163227fbd990af1b38387321-g1cpiz@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-20240405163227fbd990af1b38387321-G1cPIZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson This allows a test writer to call `bitbake -S none`, to generate signature data in tmp/stamps. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/gGz9b65TAQAJ. Signed-off-by: Christopher Larson --- testsuite/cibuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index fa30c2f5..e968d14d 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -188,7 +188,7 @@ def move_in_build_dir(self, src, dst): if os.path.exists(self.build_dir + '/' + src): shutil.move(self.build_dir + '/' + src, self.build_dir + '/' + dst) - def bitbake(self, target, bitbake_cmd=None, **kwargs): + def bitbake(self, target, bitbake_cmd=None, sig_handler=None, **kwargs): self.check_init() self.log.info('===================================================') self.log.info('Building ' + str(target)) @@ -200,6 +200,9 @@ def bitbake(self, target, bitbake_cmd=None, **kwargs): if bitbake_cmd: cmdline.append('-c') cmdline.append(bitbake_cmd) + if sig_handler: + cmdline.append('-S') + cmdline.append(sig_handler) if isinstance(target, list): cmdline.extend(target) else: From patchwork Fri Apr 5 16:31:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3484 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:38 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f186.google.com (mail-pg1-f186.google.com [209.85.215.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWaUj003096 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:37 +0200 Received: by mail-pg1-f186.google.com with SMTP id 41be03b00d2f7-5cdfd47de98sf1924175a12.1 for ; Fri, 05 Apr 2024 09:32:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334750; cv=pass; d=google.com; s=arc-20160816; b=vl8Tn4pcmC2Uxqql1OU7TutgXJ84yBiCU0P7xT21gLP727BYSFIbvSL0r4Clm6DV6A bO6SkBTmtP/OtEZehbiYnfTPFVsGv6OJwhfcoLa4cnxV3z84evERvOBofaNP6tirK8tD qWk1tmUJODSrT+KebD8Zv1sq+1/GBhOklUaMNx3EjLHCa4CnINDzBphPcVmHsPa6NFkJ 0EfNLKQh8hSabcsgvMlndR9oTk3Vrsk8hbjVFusBPY8rtv+ueRM+Yl00f33Twn93huMS LiiCjBLgqtANXXzgcmtiBmIaRbiOy42nW1nVF/zwRbb+BC7zS4vZvEjWfwELD3qvFkTQ +Rjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sraGaZm23Oi90bX+C9tgNPugn9UCkZ1+h3qZ6KaL96Q=; fh=YMLZbYBnYr0LOCdadQV9do3cnKwWo1dNsN27LWBDiMY=; b=TtD2QtJy+CYvJodaKAkWLq4DrfqsK2OgjZwBu+f2XI5dySg/8gqolvqpPAWBkY9qHE 441E+uvA8sAWfR4B6PP1oizWg9cQL4gzPFUlv/qE4BLfpH2U1oMxvTNlyAXN6hlUs34f KVMxcvePAwAFAmxg/XwuKqmYQzdxupQg44qNmoENs7+/Yytff//niNd1TtRaH+l8Y6ns 8zZtFXf4Gw79kjl36VBVOG3h2imG7rUsMp/T1R0ZMfZUUb7hyBnv5UYWGXU0d6kc8qE2 VleHyj9nPgqt13iskNO+WPimnJTupYyww8/Saqn0oygdlrbGTA+UTVgZIzeNUqfRvfM7 s1KA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=VSgzxdnS; spf=pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322796ceba0726c45b3305-VRYiCF@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334750; x=1712939550; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=sraGaZm23Oi90bX+C9tgNPugn9UCkZ1+h3qZ6KaL96Q=; b=iO871qqD0ooRzrr0QZZobtVnt3aMP+Fh9V2qlPaSGDLjmUcfKpbXOq2I3PxC2ow6Uf oGbvY5Djmh1DvTTWgY7zEqGwsCDgNW19Tz/m7E9UZmf4pkInRpyjGgUFL5WmD4/FSgx8 xO09aVzPwOwSHiNFMAh6y5RmbHBnpROKx+GT3vKoXG7E05GjDacYUMIWxABu7jcl06KV K54cQbdGtc9Dbgl9n1/fKA/B+fM932qqPDRcT/8qeAGLXIGEJlBkGA1NwC6RmRUD+B2G cW7ed6m1E18heOZi3KMdjiTx5D739I1+kqzWYJNqXpQJqFNtT3qcVWQzFeAUYoN9BaFH UTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334750; x=1712939550; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sraGaZm23Oi90bX+C9tgNPugn9UCkZ1+h3qZ6KaL96Q=; b=vAeC2vVxQGlWVrv4+9LMSINl5rHEClMLiLCoOFR+IM2/NXuYV+sDT/Irf3jeP4vZZv K9+CzkwkObcyFcAPEhOaIBxyHiyurqS+Pbkca6DhYn+wbHap7as91ANwu55gVHdcGUK8 Iz41XgfBuuuiIGwiW8Ig490aGGLCohEwHhij1KmlamiRnVvVBRiC2KEOToygSrHBsdbA FF+Yat3+gaDwApb9KEyJkhwGjfDVEeExOF2pRfqeOzBLEU5++DaIuaVgUoUUdq3Y43/7 L2xePibnTSYaCAOTW3DnGZW5g9baPP7DU1eCU7/Tqow2xi+Ldbl0NN1JsUY+rmTq9+uH Aa4w== X-Forwarded-Encrypted: i=2; AJvYcCWng416kWjto41G1VqUmwXDcc1pH7YrMok718C8DIt+WTEepUQoHnK0ZnGNllUWzZhrlcrDeAZejK2vNkly/fVIv3wN8jE= X-Gm-Message-State: AOJu0YygWOB9amID1+lksCjWOQiJ0kTKiBglkMpA64pqMvQRvYCGZVZB UhcAQHfDgbBwFL4uugvIe31ebTzI4m5FdMsaDstHRQCZWP/g7ZAD X-Google-Smtp-Source: AGHT+IHHD9vDT36dxhj351FOecZP/i899Hbs5EQmXrzote9lTeDK7hDkJGXwUU4J3+TCpV/peiXklw== X-Received: by 2002:a05:6a20:9155:b0:1a7:49c1:d326 with SMTP id x21-20020a056a20915500b001a749c1d326mr413181pzc.1.1712334749854; Fri, 05 Apr 2024 09:32:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:391a:b0:6ea:afca:4d5c with SMTP id fh26-20020a056a00391a00b006eaafca4d5cls1514679pfb.0.-pod-prod-02-us; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) X-Received: by 2002:a05:6a20:9494:b0:1a7:3c98:e8fa with SMTP id hs20-20020a056a20949400b001a73c98e8famr1966213pzb.61.1712334748472; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334748; cv=none; d=google.com; s=arc-20160816; b=g1XVBJNXfk9qBzOuB3Sx/Srub+NJsAGfx9PLyEBoDtVMB50i5v+9RzU7sFoAnVhhGY 2GjiqzlxTTXtdBoomgBkmtfKF1jckd33+PAG+DTKP6W3zxnwv5T8qSOO1dWz+meTrygr 0U+ArsQNQjRtZHJ+661LKIzXulR7VfsoIIQ6kqxO4QugoLH18UxJyupHi8iyWukQhI99 8ztgVOj3oDtOUjP/ilm4hSSUWVmvEwMygrN5rrbTT4k9fJX1JWsdr4oNtLyf1VRtZK51 02hWRyc7hNBF45xcMKDa3bhYJJQb76VMWlAck4umebnPoA23s/LTfwm6pm1ePE5S3oZl Xm7g== 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=rvhd+APN7GH9y6CKXzx78NEB26OElTJF4+LasAkVfRc=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=uJiCcy6SILl10QlL+4B9vZ+I2E6Xl+8nXdfe+W6ZfW+Iymp1ew1fXva67sFH7a/s6T cYnCqIC75VONtiSH+xP7Rsc9EkRd1F6GthHmOtUeUY0wEBZ2jIcnpmfZSvf1r22VyM9V k51h1O3nU2oh87+9eIN+r6uiRaEf3LRtx19v06bvglp1q5yFY2bbsfmc8yaCtm13RunC 005zZn32yU23Ovls7C+axL8VADf0ozUUfRlbaeHv1p5R0O0vLBheFbQHI8cmqrNTCv01 Csn5VGGp3mLnpgmfcUVPdDLmqwU5+AAnB0LU7jaki4XQTzKqIBAXVg6Yran3v8UgFhrh Eh0Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=VSgzxdnS; spf=pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322796ceba0726c45b3305-VRYiCF@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id c4-20020a63d504000000b005f0a5113629si153309pgg.3.2024.04.05.09.32.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024040516322796ceba0726c45b3305 for ; Fri, 05 Apr 2024 18:32:28 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 8/9] testsuite: add perform_signature_lint method Date: Fri, 5 Apr 2024 16:31:34 +0000 Message-Id: <20240405163135.2987489-9-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=VSgzxdnS; spf=pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322796ceba0726c45b3305-VRYiCF@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson This method is provided to generate signature data for specified target or targets and check for cachability issues without having to complete a build. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/42BMya5TAQAJ. Signed-off-by: Christopher Larson --- testsuite/cibase.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/testsuite/cibase.py b/testsuite/cibase.py index 90591f32..349a79f0 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -125,6 +125,25 @@ def perform_sstate_populate(self, image_target, **kwargs): # Remove isar configuration so the the following test creates a new one self.delete_from_build_dir('conf') + def perform_signature_lint(self, targets, verbose=False, sources_dir=isar_root, + excluded_tasks=None, **kwargs): + """Generate signature data for target(s) and check for cachability issues.""" + self.configure(**kwargs) + self.move_in_build_dir("tmp", "tmp_before_sstate") + self.bitbake(targets, sig_handler="none") + + verbose_arg = "--verbose" if verbose else "" + excluded_arg = f"--excluded-tasks {','.join(excluded_tasks)}" if excluded_tasks else "" + cmd = f"{isar_root}/scripts/isar-sstate lint --lint-stamps {self.build_dir}/tmp/stamps " \ + f"--build-dir {self.build_dir} --sources-dir {sources_dir} {verbose_arg} {excluded_arg}" + self.log.info(f"Running: {cmd}") + exit_status, output = process.getstatusoutput(cmd, ignore_status=True) + if exit_status > 0: + ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') + for line in output.splitlines(): + self.log.error(ansi_escape.sub('', line)) + self.fail("Detected cachability issues") + def perform_sstate_test(self, image_target, package_target, **kwargs): def check_executed_tasks(target, expected): taskorder_file = glob.glob(f'{self.build_dir}/tmp/work/*/{target}/*/temp/log.task_order') From patchwork Fri Apr 5 16:31:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Larson, Chris" X-Patchwork-Id: 3485 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 05 Apr 2024 18:32:38 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f186.google.com (mail-pg1-f186.google.com [209.85.215.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 435GWaqJ003105 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Apr 2024 18:32:37 +0200 Received: by mail-pg1-f186.google.com with SMTP id 41be03b00d2f7-5e4a072ce28sf1953876a12.0 for ; Fri, 05 Apr 2024 09:32:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712334751; cv=pass; d=google.com; s=arc-20160816; b=vubdhqXhMjksVqIuws0Jjtv2uDn+800pZmBCs1GXJg7APrCAxaF71a6uMkQuPXpdhJ EI5tXMqNGDAnqyMph5tmfL+lbBn/fphEVydDpgMj0NRznJ/XiTRQDIi1h9Na1QH3Wk23 fo7wU9uPJjRYgqCfMzIFYCG1ZbxY8g1zLa6VdabUDas9oCh7Gut3aMg6ybk/o+I3pwg9 FPbA8iXizNkCZl67+ctZqmPLO1K/iw901OvAXguRS8H7QIfw6sVLhYgrYnWCBW1ki5cS 8LTQSXetSvPHWALYvsqi1DiV3sSp3GupdZK5h1ufpKgNjAQKg8l657tixmqGHXJqPa7/ qFkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Sb/IbuDaQcOH5+0OrbvAIvFkSWRB82zMZffGUkiLDS0=; fh=eHanaQQAPjxndm342WUJT7UlDdseKCZ7BzqIf/RbVDo=; b=fJeFY95JcqBGHpcR6tb5NAD4EyceQ6DKIz9OjzoBIL0/BhCqXMKLwNSSsxf2x/aJ7F G4UkDvG5Fat4ml8Zsp0rpTO6bU+OqFxugYyTUpJalotz1PiiEuVuFJ3n7DNeKf3sfcCy y92Sl/opHn1fnUP/mSF6WDtXOznMzdaqN0abqFSgaVqJMLbshljKXQ9x+3Gq0eR41D/O U0U1vzPYi0ZiR21gh8v0D9ufSkGb6m57WI4R8iPePgxzGv9D6jedEKIKHInHtwPcbuz6 +9gDWksHvxPC6y1uZB0ObBZetxBkQn9NMulkYxZV5F6I6ckhTFhiQgovG0GwuOM28CEB OVYw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=a8A+CAhk; spf=pass (google.com: domain of fm-1325773-2024040516322897e54b83f63687843c-khasez@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322897e54b83f63687843c-kHAseZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1712334751; x=1712939551; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Sb/IbuDaQcOH5+0OrbvAIvFkSWRB82zMZffGUkiLDS0=; b=GfFHLrYhSvFBEOeB+QwjJltszIRMo9r0witZfbh/jmn/zpT8ny49RBJ33p6WW7Z0sP UXq3ccFf5gmRtD3XDIe7cwC4qIhB78+drWM+8c9X6TstwfcHZQC4XYQN4Ds6z0Cl5BgY LciaIKDlrzAeNYiJ+mLwaYA5QSVIr0RHvuSOb9rkl1W2HIUAqJnE6brQVwAHcCve+nH5 YC+18E3QAmhEQflA0f1GsZ9l+Ikiq/19peNPYbE+GGqi+Bs9MpGTXiTT7xR/u1tPxhC2 hBJScazhpJOCmMFBzXZnLcfOP2sQWE7SlVlyO1KXyeOfn43Yu1f2BcGzpJx8wFWlRQGm usEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334751; x=1712939551; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Sb/IbuDaQcOH5+0OrbvAIvFkSWRB82zMZffGUkiLDS0=; b=aRlXdbmvuLzI56/0s4jNpdVZKk+9Rog9VLdImjP7qksf2DOrmUSObcsLBjYCV3BXLU YVUH2kJb9gzG0xHE0kFoLdGyqaUpjSWT0JPnuKT7Vsqlwe5EuTp1/Um/PlwcTRl89eGX UpXKzlaev+CdMBBOKQVqjPYFB2JQFcydFgPTwlxqtZas/oTOBxAr0I3cwDtibpzDrnEG zSfjsL5gyu4aXInnXtNvTxvKXkSntKwBm0qoLR/OWOB7QjLXAbodpnvUEDNRvOo6k12t t1CEQcG9qJHlE9DGYNPmyxFqTjw3j9tNp717ZJ+/ZfNsBE/pk1iKNZZgEnDPQevf5bDS Yifw== X-Forwarded-Encrypted: i=2; AJvYcCV1sqvRA/YkPql4KnfHHHtocsJEaLgKjBupKynxxBFBlJbv6+JfQGukhysN+BkZ6/7dfdv7dSkDHphIZ/oeeLaQHAYYvrU= X-Gm-Message-State: AOJu0YxglBvJ3AOHOdaD2cWXzNd9pspc+vkhK5T50UaFwKXELW7fPhCP GSm0vKd9lCGS9mS8iV29VosEjPmj+/mwE9EWp7DUUrf2iWdx5ckQ X-Google-Smtp-Source: AGHT+IF9aXH+/VLMG5E2ccLWWpX4NPTK3o4jVhJdslwV+YbwUUyNF45QhGJhZwU5ovDrCLksd0uktQ== X-Received: by 2002:a17:902:d2c2:b0:1e3:cd26:cf16 with SMTP id n2-20020a170902d2c200b001e3cd26cf16mr1381799plc.51.1712334750997; Fri, 05 Apr 2024 09:32:30 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:d4d0:b0:1e0:f879:a3a7 with SMTP id o16-20020a170902d4d000b001e0f879a3a7ls1377767plg.1.-pod-prod-06-us; Fri, 05 Apr 2024 09:32:29 -0700 (PDT) X-Received: by 2002:a17:902:f151:b0:1e2:a64c:fdde with SMTP id d17-20020a170902f15100b001e2a64cfddemr1671007plb.13.1712334749328; Fri, 05 Apr 2024 09:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334749; cv=none; d=google.com; s=arc-20160816; b=qdoXSlsFj9ric7sQqg4O0uiluWjw850HrljuE7SP/TxWa4Ddx0VDlUs7Vw8deTQFx7 ZXgZhTJOSSZku2tFQMC/MaPPHu0nkUSZkR/xoqWysI3ZppPuEVTQn1iTRKdVK5baiWSw vWBo1sza7Z2KPwT4zfpKiKWUridZjYI87oQnoThqW06XhXZ5l3IURsKKdx+U1YV+RrN3 c9f2gsM5CNCHYkSHT+83Uth5qca9I8kmydFst/sJtOEQjqUFJMgXWS9kEgbyR1emekn3 xk6VIfaQxIYDwuDfrkeav8/xrGhko8HLw8XuHCYoM0r+OuaOdsPTWCeOSR9rDPOAm035 ry2g== 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=ZVl034dXmVJ9Axy0/TMrqSAWM5P0ZdI9zQOXMh+IzCI=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=gFNxMN1nV1xNbxELJeIdR0ijkK18ltaT2rFxzjcKz9bJhNfs7jDkS2MDRC1tYG+4dp 2JgaDlWr/dxSjBqntaQ0jqrCrnyA+MIm/FxWRq3VhNsQQagxu/D/eIefhINWJ91Kp+gJ OGCMeUPBbLStn99xpXuCM8SpDrtlkY+O1+27/wEPTPoGXTcg8PqyQ9LAJ8o/C6o4sG97 EGH5+KcUZKmFi6eomKkQU2wo0fakzFLTwFBRkHXU5UZX/shhpnGEeMwzaH0s0Ip5IyJZ 5GW4hhlh8TLjO4CdQFUb6qlhNDeQEGZftqO4AcwJ6m1cCNrM1euLlMkQ9e7D0rPXi+qr vRmQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=a8A+CAhk; spf=pass (google.com: domain of fm-1325773-2024040516322897e54b83f63687843c-khasez@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322897e54b83f63687843c-kHAseZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id jc18-20020a17090325d200b001dd61b4ef8esi97963plb.12.2024.04.05.09.32.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-2024040516322897e54b83f63687843c-khasez@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 2024040516322897e54b83f63687843c for ; Fri, 05 Apr 2024 18:32:28 +0200 X-Patchwork-Original-From: "chris.larson via isar-users" From: "Larson, Chris" To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 9/9] testsuite: add signature cachability checks Date: Fri, 5 Apr 2024 16:31:35 +0000 Message-Id: <20240405163135.2987489-10-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-Original-Sender: chris.larson@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=a8A+CAhk; spf=pass (google.com: domain of fm-1325773-2024040516322897e54b83f63687843c-khasez@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322897e54b83f63687843c-kHAseZ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: chris.larson@siemens.com Reply-To: chris.larson@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Christopher Larson The current sstate tests do call `isar-sstate lint`` after populating the shared state cache, but those tests take some time to do so, and do not check for cachability issues for other targets, so add a new test which does so. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/7Legiq9TAQAJ. Signed-off-by: Christopher Larson --- testsuite/citest.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/testsuite/citest.py b/testsuite/citest.py index 7e24c498..b1c0b760 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -290,8 +290,28 @@ def test_container_sdk(self): self.init() self.perform_build_test(targets, bitbake_cmd='do_populate_sdk', container=True) -class SstateTest(CIBaseTest): +class SignatureTest(CIBaseTest): + """ + Test for signature cachability issues which prevent shared state reuse. + SstateTest also checks for these, but this test is faster and will check more cases. + + :avocado: tags=signatures,sstate + """ + def test_signature_lint(self): + verbose = bool(int(self.params.get("verbose", default=0))) + targets = [ + 'mc:qemuamd64-bullseye:isar-image-ci', + 'mc:qemuarm-bullseye:isar-image-base', + 'mc:qemuarm-bullseye:isar-image-base:do_populate_sdk', + 'mc:qemuarm64-bullseye:isar-image-base', + 'mc:qemuamd64-focal:isar-image-base' + ] + + self.init() + self.perform_signature_lint(targets, verbose=verbose) + +class SstateTest(CIBaseTest): """ Test builds with artifacts taken from sstate cache