Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2024 15:16:53 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c8c5d91f48c4 - stable/14 - pkgbase: pass --recurse-submodules to `git ls-files`
Message-ID:  <202402201516.41KFGrP4071534@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8c5d91f48c4e4496fb2554489198a8817656e1e

commit c8c5d91f48c4e4496fb2554489198a8817656e1e
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-12-09 00:59:58 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-02-20 15:14:29 +0000

    pkgbase: pass --recurse-submodules to `git ls-files`
    
    When generating source packages.  Although submodules are not used by
    FreeBSD itself they may be used by downstream projects.  By default
    for submodules `git ls-files` just emits the submodule 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
    (which is desired when submodules are in use), and has no effect when
    submodules are not present.
    
    Reviewed by:    bapt, manu
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D42983
    
    (cherry picked from commit 3b1904d9eb0468a49be3cd1d97de6d7ecaa66a43)
---
 Makefile.inc1 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 3537cf5ac579..2177ffb7cb27 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2092,10 +2092,12 @@ create-source-packages: _pkgbootstrap .PHONY
 .if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git)
 	@cd ${SRCDIR}; \
 		( echo "@override_prefix /usr/src" ;  \
-		${GIT_CMD} ls-files ":!:sys/" ) > ${SSTAGEDIR}/src.plist
+		${GIT_CMD} ls-files --recurse-submodules ":!:sys/" ) \
+		> ${SSTAGEDIR}/src.plist
 	@cd ${SRCDIR}; \
 		( echo "@override_prefix /usr/src" ; \
-		${GIT_CMD} ls-files "sys/" ) > ${SSTAGEDIR}/src-sys.plist
+		${GIT_CMD} ls-files --recurse-submodules "sys/" ) \
+		> ${SSTAGEDIR}/src-sys.plist
 	sed -e "s/%VERSION%/${PKG_VERSION}/" \
 		-e "s/%DESC%/FreeBSD sources/" \
 		-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402201516.41KFGrP4071534>