From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95D581869 for ; Sat, 30 Mar 2024 02:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711765545; cv=none; b=sOaLdog8Arip2zGRoY9+hBNmyjyi+YNDiAEdcw1ZgZ6qMIorIRfiVK2D9JuEwdRztJwiftIfQfCekGsP5deHYPlfw7JW8u7Mk1gBvzbmYSZbZIwKSpye7htruOl5NXH6fdIuN9sJjCh2btQLjcRiSNU8Q+HSnLU1lUheCB4fHSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711765545; c=relaxed/simple; bh=4gw1AVFVJO9ZAJayyuH3bwQyxY+JvodyplJjdHiW2vo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OYS1T80X19xLHV8fNoq5Gbly7H9zed5iq8LPh9cdSnLxkT1kPv9PunjlpzOlPywjglyJEtCX7F8aWiPezPnes5la3Yk9axjjxiX9PNdP2olxfJvkOpxv750cNl+icC8So/kU7DG2ge1CA6hkYY2yDnmReErYewdcdH4uvuJxPuc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Aq9zp7qM; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Aq9zp7qM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=ClPHEaW7ZlETpSA2kbRvgCHeCzkINRil2854j60enwk=; b=Aq9zp7qMwvvgbbIr3UU7vhuREd sFT62lxsjcAv2i3cMSzPHlHc7e8R7XOnAIuXTd7AgNFPElD2iyT1nTlflu6QXK7JTvG8nd569iCUh uX7aZFHjvKUZnDRaDiIMP09a9lUDrh9MhDApSk/DwVAomtApiiyeC+c2dxL6RohdkRvHr4rLSuIDD tPJfyOQa+UetuJuBnH/rIABwYO26ppYuGmpSlWV2yesRNsexoKKBErcuPMo+Cfn32E+iVCF6IgeR3 /ZjTdEcwE8SEB/nTl6vUF0HenTTAY6ItzqS80sASnjhrWgSL9a6g6rcoC0SG146fpITGsz15h9tYE LdpxebUA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rqOPd-00000002ZLK-3gLt; Sat, 30 Mar 2024 02:25:41 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 05/18] mirrors: enable kdevops mirror Date: Fri, 29 Mar 2024 19:25:27 -0700 Message-ID: <20240330022540.612487-6-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240330022540.612487-1-mcgrof@kernel.org> References: <20240330022540.612487-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain We recently added support for mirroring kdevops but didn't enable it yet as we needed some more work, the work to get the bridge IP in a clean way. Now that previous commits did the work for that enable the mirror to be used, but only if we detect that the local server has a copy of that mirror. The reason we check for the mirror is that prior mirroring attempts may have been made with older versions of kdevops and they would not have set up the kdevops mirror yet. We therefore only enable the kdevops mirror to be used if and only if the localhost has it present. This is going to save us tons of bandiwdth, as each guest when testing filesystems was git cloning kdevops and kdevops already is about over 200 MiB. Signed-off-by: Luis Chamberlain --- kconfigs/workflows/Kconfig.shared | 11 +++++++++-- scripts/check_mirror_present.sh | 11 +++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 scripts/check_mirror_present.sh diff --git a/kconfigs/workflows/Kconfig.shared b/kconfigs/workflows/Kconfig.shared index c4aab329e7b1..029eaa4383db 100644 --- a/kconfigs/workflows/Kconfig.shared +++ b/kconfigs/workflows/Kconfig.shared @@ -75,11 +75,18 @@ endif # WORKFLOW_KDEVOPS_GIT_CUSTOM if !WORKFLOW_KDEVOPS_GIT_CUSTOM +config HAVE_MIRROR_KDEVOPS + bool + depends on USE_LIBVIRT_MIRROR + default $(shell, scripts/check_mirror_present.sh /mirror/kdevops.git) + config WORKFLOW_KDEVOPS_GIT string default "https://github.com/linux-kdevops/kdevops.git" if !GIT_ALTERNATIVES && !HAVE_CUSTOM_KDEVOPS_GIT - default "https://github.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITHUB - default "https://gitlab.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITLAB + default "https://github.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITHUB && !HAVE_MIRROR_KDEVOPS + default "https://gitlab.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITLAB && !HAVE_MIRROR_KDEVOPS + default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && VAGRANT + default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && GUESTFS help Some workflows want to also clone a version of kdevops on each target. An example of this is when using the fstests workflow, which carries diff --git a/scripts/check_mirror_present.sh b/scripts/check_mirror_present.sh new file mode 100755 index 000000000000..b99c7048c12e --- /dev/null +++ b/scripts/check_mirror_present.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# SPDX-License-Identifier: copyleft-next-0.3.1 + +MIRROR_PATH="$1" + +if [[ -d $MIRROR_PATH ]]; then + echo y + exit +fi + +echo n -- 2.43.0