From 7bd2f19facfc2806dc6ce1d5218e8a124a1e7940 Mon Sep 17 00:00:00 2001 From: jenkins Date: Wed, 13 Jul 2022 11:37:40 +0000 Subject: [PATCH] profiles/coreos/base: slsa: use portageq to find repository path This makes the lookup work within the catalyst chroot, as well as in the SDK. --- .../profiles/coreos/base/profile.bashrc.slsa-provenance | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance index 81186cb450..376f9e1278 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance @@ -43,11 +43,10 @@ __slsa_provenance_subject() { __slsa_provenance_materials() { local csum="" uri="" repo="" ebuild="" - local ebuilds_basedir="/mnt/host/source/src/third_party/" local ebuild="${CATEGORY}/${PN}/${PF}.ebuild" - if [ -f "${ebuilds_basedir}/coreos-overlay/${ebuild}" ] ; then + if [ -f "$(portageq get_repo_path ${ROOT:-/} coreos)/${ebuild}" ] ; then repo="coreos-overlay" - elif [ -f "${ebuilds_basedir}/portage-stable/${ebuild}" ] ; then + elif [ -f "$(portageq get_repo_path ${ROOT:-/} portage-stable)/${ebuild}" ] ; then repo="portage-stable" else eerror "SLSA provenance: Unable to detect ebuild repository for package '${ebuild}'"