A recent update to git [1] causes errors when cloning a local git
repository whose .git directory contains symlinks, which it does for
repos managed by the "repo" tool. This is triggered by docker image
builds that have the following in their recipes:
Symptoms: "git clone /path/to/local/git/repo" fails with an error
similar to
fatal: failed to start iterator over '[...]/.git/objects': Not a
directory
Workaround: add "--no-local" when calling "git clone". This avoids the
error, and also makes physical copies of .git/objects, rather than
hard-linking them.
TESTS
===================
* Make sure "git clone --no-local /path/to/local/git/repo" works
with both the original git package (1:2.30.2-1) and the patched
package (1:2.30.2-1+deb11u2).
* Build a test image that triggers this case
Reviewed: https:/ /review. opendev. org/c/starlingx /root/+ /876884 /opendev. org/starlingx/ root/commit/ 143cd0b94667ddd 33f9fd52bb714b8 75551e85f8
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 143cd0b94667ddd 33f9fd52bb714b8 75551e85f8
Author: Davlet Panech <email address hidden>
Date: Wed Mar 8 12:18:31 2023 -0500
docker-images: avoid git errors for local repos
A recent update to git [1] causes errors when cloning a local git
repository whose .git directory contains symlinks, which it does for
repos managed by the "repo" tool. This is triggered by docker image
builds that have the following in their recipes:
PROJECT_ REPO=/path/ to/local/ git/repo LOCAL=yes
MIRROR_
Symptoms: "git clone /path/to/ local/git/ repo" fails with an error
similar to
fatal: failed to start iterator over '[...]/ .git/objects' : Not a
directory
Workaround: add "--no-local" when calling "git clone". This avoids the
error, and also makes physical copies of .git/objects, rather than
hard-linking them.
TESTS ======= ======= == local/git/ repo" works 2-1+deb11u2) .
===
* Make sure "git clone --no-local /path/to/
with both the original git package (1:2.30.2-1) and the patched
package (1:2.30.
* Build a test image that triggers this case
[1] https:/ /security- tracker. debian. org/tracker/ CVE-2023- 22490
Closes-Bug: 2009723 fe253b23a1bfb9f d49ec649853
Signed-off-by: Davlet Panech <email address hidden>
Change-Id: I90bf0b21713701