git: fc4a6768272e - main - newvers: Add comment about why we need sccs, but deprecate it
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Sep 2023 23:11:11 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc4a6768272ea9e943661e0c34ff436dac872ac7 commit fc4a6768272ea9e943661e0c34ff436dac872ac7 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-09-27 23:07:53 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-09-27 23:07:53 +0000 newvers: Add comment about why we need sccs, but deprecate it The SCCS ID is still the most reliable way to dig out the version information from the kernel w/o false positives. Add a comment to that effect. savecore(8) neglects to save the kerneldumpheader that would have the version information at a fixed location. savecore(8) needs to be augmented to have the right data in the right places, but until then the old-school SCCS id needs to remain. Once that's fixed, we plan to remove it. The reason it needs to be in a fixed or easily findable location is because if you have an arbitrary core and want to pull the source and build artificts that went along with that core, you don't yet have the symbols you need to read the version string. To solve the chicken / egg problem, one needs an independent way to know what to use so that automated analysis of cores can happen. The sccs id being in the kernel ensures that it is in the core image written. The what(1) utility makes extracting the version easy. Sponsored by: Netflix Reviewed by: cy, emaste Differential Revision: https://reviews.freebsd.org/D41984 --- sys/conf/newvers.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..33615a8d94f8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,6 +311,14 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT +/* + * The SCCS stuff is a marker that by convention identifies the kernel. While + * the convention originated with SCCS, the current use is more generic and is + * used by different organizations to identify the kernel, the crash dump, + * etc. The what(1) utility prints these markers. Better methods exist, so this + * method is deprecated and will be removed in a future version of FreeBSD. Orgs + * that use it are encouraged to migrate before then. + */ #define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}"