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
F97662788: D42983.id131222.diff
Mon, Sep 30, 3:59 PM
Unknown Object (File)
Sun, Sep 29, 7:13 AM
Unknown Object (File)
Fri, Sep 27, 5:29 PM
Unknown Object (File)
Thu, Sep 26, 12:20 PM
Unknown Object (File)
Wed, Sep 25, 7:28 PM
Unknown Object (File)
Wed, Sep 25, 3:21 AM
Unknown Object (File)
Tue, Sep 24, 5:06 AM
Unknown Object (File)
Mon, Sep 16, 12:13 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.