From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7353323043876241408 X-Received: by 2002:a17:90b:347:b0:2a0:4495:1f3d with SMTP id fh7-20020a17090b034700b002a044951f3dmr2349999pjb.0.1712334746384; 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-Google-Smtp-Source: AGHT+IGaEhSnwQKvF71Enq75FSe9Ej5ZoStGn1GKHpQdcoL9R1uvAyU3E0Hy5goVGMO78KBJXfqj 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 Return-Path: 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; 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 Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024040516322269c98b7391ab0c50e2 for ; Fri, 05 Apr 2024 18:32:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=chris.larson@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=rGdg6ldi2thVX4/MpwPbnhgb9DhjmdHWXNiwtkcSwbs=; b=Ua8+XvwjwTLNs1uF4YQTeBjAHR3lS5bwkexkg8B6mIuz8GR0yTJD6uxYYXWF7e7Z046H4B RYLnMNO+NRn7UtQTinEug3z+JvlQr58lLUc023zO9372YeOdm444SoZopfWbq8bk9Lja9PLZ bZ6qaGVfXKZPVN7eJNKAxakhFN/1o=; From: chris.larson@siemens.com 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 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-TUID: 8v4tU0SmueGz 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/ -- 2.39.2