From 06e52597d8f931bfcfab61b07505bc1fa4bed014 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 18 Mar 2024 15:21:51 -0400 Subject: [PATCH] jjb: Clone linux kernel with `--reference-if-able` lttng-modules_PARAM_crossbuild jobs for riscv64 were intermittently failing when cloning `linux-all.git` with messages similar to the following: ``` 11:53:56 + git clone --depth=1 -b v4.10.17 --reference /home/jenkins/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/git/linux-all.git /home/jenkins/workspace/lttng-modules_PARAM_crossbuild/cross_arch/riscv64/platforms/deb12-amd64/src/linux 11:53:56 Cloning into '/home/jenkins/workspace/lttng-modules_PARAM_crossbuild/cross_arch/riscv64/platforms/deb12-amd64/src/linux'... 11:53:56 remote: fatal: packfile ./objects/pack/.tmp-479230-pack-f8bc46fc38bfd97fc2a516d9816a64fccfbfd3b2.pack cannot be accessed 11:53:56 remote: aborting due to possible repository corruption on the remote side. 11:53:56 fatal: early EOF 11:53:56 fatal: fetch-pack: invalid index-pack output ``` Testing using `--reference-if-able` instead of `--reference` seems to resolve the cloning issue. Change-Id: I49a03190604c00095436f3098dd8ac95706094e0 Signed-off-by: Kienan Stewart --- jobs/lttng-modules.yaml | 2 +- scripts/lttng-modules/param-build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/lttng-modules.yaml b/jobs/lttng-modules.yaml index bc60dfa..b3d5646 100644 --- a/jobs/lttng-modules.yaml +++ b/jobs/lttng-modules.yaml @@ -792,7 +792,7 @@ builders: - shell: | - git clone --depth=1 -b v6.1 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux + git clone --depth=1 -b v6.1 --reference-if-able $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux cd src/linux make allyesconfig sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index 5ee5671..42d0767 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -96,7 +96,7 @@ git_clone_modules_sources() { # Checkout a shallow kernel tree of the specified tag git_clone_linux_sources() { mkdir -p "$LINUX_GIT_DIR" - git clone --depth=1 -b "${ktag}" --reference "$LINUX_GIT_REF_REPO_DIR" "${kgitrepo}" "$LINUX_GIT_DIR" + git clone --depth=1 -b "${ktag}" --reference-if-able "$LINUX_GIT_REF_REPO_DIR" "${kgitrepo}" "$LINUX_GIT_DIR" } -- 2.34.1