Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag

From: Warner Losh <imp_at_bsdimp.com>
Date: Tue, 26 Sep 2023 17:56:45 UTC
On Tue, Sep 26, 2023 at 11:34 AM Jessica Clarke <jrtc27@freebsd.org> wrote:

> On 26 Sep 2023, at 18:32, Ravi Pokala <rpokala@freebsd.org> wrote:
> >
> > In that case, an updated comment seems appropriate, so it’s not removed
> again.
>
> https://reviews.freebsd.org/D41984


Jessica beat me to it. I have a back out and this commit queued up. I've
just
updated the comment. I'm not at all happy with it yet.

The details are in the commit message, but the tl;dr is that while we do
write
the version to the end of the dumps, savecore doesn't preserve that when
writing vmcore.X, so to identify what kernel a dump is from reliably, one
must use the SCCS ID tags. Trying to find other strings to get this data is
not as reliable.

The real fix for this issue with the vmcore.X format is to write ELF core
dumps, a feature vaguely planned for 15, where we can save this data
in a way that can be extracted with scripts.

Warner


>
> >  -Ravi (rpokala@)
> >
> > From: <owner-src-committers@freebsd.org> on behalf of Warner Losh <
> imp@bsdimp.com>
> > Date: Tuesday, September 26, 2023 at 07:51
> > To: Mateusz Guzik <mjg@freebsd.org>
> > Cc: src-committers <src-committers@freebsd.org>, "<
> dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, "<
> dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
> > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs
> tag
> >
> >  Can you put this back? It is still useful. I have automated scripts
> that look for this pattern to find the version of a core dump. There are no
> other ways that are as reliable to find this data. Some other heuristics
> exist, but my experience with snagging data from maybe a thousand core
> dumps from $WORK's network found issues in all the alternatives. It's why I
> didn't whack it already. Even though the text says SCCS which is prehistory
> for this project, it's still in use today.
> >  Warner
> >
> > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:
> >>
> >>
> >> The branch main has been updated by mjg:
> >>
> >> URL:
> https://cgit.FreeBSD.org/src/commit/?id=e6dc6a27230f836a131118326731b7c5fd417723
> >>
> >> commit e6dc6a27230f836a131118326731b7c5fd417723
> >> Author:     Mateusz Guzik <mjg@FreeBSD.org>
> >> AuthorDate: 2023-09-26 14:36:51 +0000
> >> Commit:     Mateusz Guzik <mjg@FreeBSD.org>
> >> CommitDate: 2023-09-26 14:36:51 +0000
> >>
> >>     sys/conf/newvers.sh: whack sccs tag
> >>
> >>     In the same spirit as removing cvs $FreeBSD$ tags.
> >>
> >>     Sponsored by:   Rubicon Communications, LLC ("Netgate")
> >> ---
> >>  sys/conf/newvers.sh | 2 --
> >>  1 file changed, 2 deletions(-)
> >>
> >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
> >> index 73fd6857d307..18b1817ca287 100644
> >> --- a/sys/conf/newvers.sh
> >> +++ b/sys/conf/newvers.sh
> >> @@ -311,11 +311,9 @@ fi
> >>
> >>  vers_content_new=$(cat << EOF
> >>  $COPYRIGHT
> >> -#define SCCSSTR "@(#)${VERINFO}"
> >>  #define VERSTR "${VERSTR}"
> >>  #define RELSTR "${RELEASE}"
> >>
> >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR;
> >>  char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR;
> >>  char compiler_version[] = "${compiler_v}";
> >>  char ostype[] = "${TYPE}";
>
>