Bug 15405 - support git's safe.bareRepository=explicit
Summary: support git's safe.bareRepository=explicit
Status: NEW
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-02-19 13:19 UTC by André Draszik
Modified: 2026-05-28 13:16 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description André Draszik 2024-02-19 13:19:47 UTC
When git is configured with safe.bareRepository=explicit [1], various pieces in bitbake just fail:
* fetch2/git.py
* tests/fetch
* bin/git-make-shallow
LWN has an article about the problem that this configuration option addresses and why it is useful in [2].

It also seems that it is being rolled out in some environments as a default for users.

To reproduce, simply run
    git config --global safe.bareRepository explicit
to add safe.bareRepository=explicit to your ~/.gitconfig, and see things fail.

Link: https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/config/safe.txt#n1 [1]
Link: https://lwn.net/Articles/892755/ [2]
Comment 1 André Draszik 2024-02-19 13:21:57 UTC
These patches are the first stop-gap step to make bitbake/OE work with this
configuration option enabled. I believe in the future, these .

An initial set of stop-gap patches have been merged in [1] [2] [3], but the real solution should be to convert relevant pieces of code to invoking git with the --git-dir= option explicitly.

This bug is for tracking that.

Link: https://git.openembedded.org/bitbake/commit/?id=7c63989db4590564516ed150930f4e2fa503e98f [1]
Link: https://git.openembedded.org/bitbake/commit/?id=a45e14a7343e36101e45639931322e5649587f57 [2]
Link: https://git.openembedded.org/bitbake/commit/?id=5f3b1d8dc9ee70e707536bd75ee845b547440c97 [3]
Comment 2 Randy MacLeod 2024-02-22 15:40:21 UTC
schedule for 5.1 if someone volunteers to work on it.
There's a work-around for now.
Comment 3 Randy MacLeod 2025-05-01 14:07:08 UTC
Bulk move of all unassigned 5.2 medium importance bugs to 5.3.
Comment 4 Randy MacLeod 2026-03-25 23:51:52 UTC
Can someone, maybe future me, check if this is still broken on master given the workflow described?
Comment 5 Randy MacLeod 2026-05-28 13:16:28 UTC
Bulk move of 6.0 Medium bugs to 6.1.