Page MenuHomeFreeBSD

pkgbase: pass --recurse-submodules to `git ls-files`
ClosedPublic

Authored by emaste on Dec 9 2023, 3:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 25, 2:55 PM
Unknown Object (File)
May 11 2024, 8:58 PM
Unknown Object (File)
May 3 2024, 2:30 AM
Unknown Object (File)
May 3 2024, 2:30 AM
Unknown Object (File)
Apr 27 2024, 4:06 PM
Unknown Object (File)
Apr 27 2024, 3:57 PM
Unknown Object (File)
Feb 16 2024, 6:46 AM
Unknown Object (File)
Jan 2 2024, 7:09 AM
Subscribers

Details

Summary
When generating source packages.  Although submodules are not used by
FreeBSD itself they may be used by downstream projects.  By default
`git ls-files` just emits the directory name, which resulted in:

    pkg: pkg_checksum_hash_sha256_file(read failed): Is a directory

Passing --recurse-submodules lists all of the files in each submodule,
and has no effect when submodules are not in use.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Dec 9 2023, 3:21 AM
emaste created this revision.
This revision is now accepted and ready to land.Dec 9 2023, 3:53 AM

Although this change is fine, the 'harmless' bit needs a small caveat.

There's a few projects I use (MAME, QEMU and EDK2) that have submodules, but don't need the full recursive submodules to build. And you can get in trouble if you do all your submodule commands recursively, especially when updating them recursively and/or bisecting problems in the parent repo. It's likely fine for ls-files, but other operations (like cloning or fetching) should be approached with some caution.