Bug 274191 - There is no knob to disable git use on build system
Summary: There is no knob to disable git use on build system
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2023-10-01 03:36 UTC by Ivan Rozhuk
Modified: 2023-11-03 11:37 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2023-10-01 03:36:24 UTC
sys/conf/newvers.sh -R KERNEL_CONFIG_NAME
and
make -C release -V BRANCH
called during build kernel and wold.
Both call git if it installed and does not fail if there is no git or .git repo.

NOGIT='yes' does not stop this.

As workaround I use:
GIT_CMD='/dev/_not_exist_'
helps with (release/Makefile.inc1)
and
svnversion='echo'
sed -i '.orig' -e 's|local savedir|return 1|g' "sys/conf/newvers.sh"

Is it possible to make NOGIT=yes work for whole build process?
Comment 1 Ed Maste freebsd_committer freebsd_triage 2023-10-02 01:07:01 UTC
What is the actual issue you are trying to solve?
Comment 2 Ivan Rozhuk 2023-10-02 06:16:06 UTC
(In reply to Ed Maste from comment #1)

Certification for product procedure requires provide list of all files that was used during build.
My manager wants to minimize that list and do not want provide .git files.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274198 also as part of this work.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2023-10-02 12:23:35 UTC
newvers.sh looks for a .git directory and does not invoke git if not found.
Comment 4 Ivan Rozhuk 2023-10-02 12:46:23 UTC
(In reply to Ed Maste from comment #3)

I do not want workaround with renaming git binary or renaming .git dir, I want NOGIT or similar knob start work.

Also "auto detect" features without on/off switch produces unpredictable results, so REPRODUCIBLE_BUILD is not reproductable: newvers.sh give different output on systems with .git+git and on systems without it.