Is there a reason not to use absolute paths in .gitmodules for upstream? That's what I have to do currently for my fork, for the submodules which I haven't forked

On Sun, Jan 21, 2024 at 10:06 AM Christian Walter <christian.walter@9elements.com> wrote:

Hi Nico,

oh yeah - I was probably too fast suggesting this - sorry about that! Yeah, seems like there is not straight forward solution right now.. nevermind - I'll carry around a patch then that fixes up the submodules.

Thanks, and sorry for interrupting :)

Chris

On 1/21/24 16:05, Nico Huber wrote:
Hi Chris,

On 21.01.24 14:57, Christian Walter wrote:
thanks - that's a great idea. While we are touching submodules anyway -
can we make the path a bit more agnostic? While forking coreboot into my
org I found that I either:

1. Have to clone all submodules as well
you mean `fork' in GitHub parlance, right?

2. or touch the submodules file to point to the upstream coreboot repo
e.g. instead of '../flashrom.git' use '../../coreboot/flashrom.git'.
That works on github and should also work within our upstream coreboot
repo.
I don't think this would work with the current upstream setup. Because
upstream we don't have a coreboot/ namespace. And worse, the double ../
seems to even kill the host part of the URL. I can't imagine a backwards
compatible way right now. Hope I miss something, though.

The basic problem is in the way how submodule URLs are built: A relative
path is kind of appended to the URL of the outer repository, e.g.
with https://review.coreboot.org/coreboot.git cloned,
  ../flashrom.git
becomes
  https://review.coreboot.org/coreboot.git/../flashrom.git
After removing the `coreboot.git/../' part, this works as URL.

But
  https://review.coreboot.org/coreboot.git/../../coreboot/flashrom.git
results in
  https://coreboot/flashrom.git

Maybe I am using git submodules wrong here.. :)
No, I think you're doing it right. Just our setup targets GitHub only
as a mirror, not actually as a tool to work on coreboot. :-/

Nico

--
Christian Walter
Head of Firmware Development / Cyber Security



9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar
_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-leave@coreboot.org