Comment 3 for bug 2009723

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/876884
Committed: https://opendev.org/starlingx/root/commit/143cd0b94667ddd33f9fd52bb714b875551e85f8
Submitter: "Zuul (22348)"
Branch: master

commit 143cd0b94667ddd33f9fd52bb714b875551e85f8
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
      MIRROR_LOCAL=yes

    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

    [1] https://security-tracker.debian.org/tracker/CVE-2023-22490

    Closes-Bug: 2009723
    Signed-off-by: Davlet Panech <email address hidden>
    Change-Id: I90bf0b21713701fe253b23a1bfb9fd49ec649853