History log of /freebsd-current/sys/conf/newvers.sh
Revision Date Author Comments
# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 826d1446 02-Oct-2023 Ed Maste <emaste@FreeBSD.org>

newvers: remove references to svnliteversion

svnliteversion was provided by the base system copy of subversion,
which was disabled in a2bc17474b96 ("Disable building svnlite(1) by
default.")

Reviewed by: zlei
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42034


# fc4a6768 27-Sep-2023 Warner Losh <imp@FreeBSD.org>

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


# cb668587 27-Sep-2023 Warner Losh <imp@FreeBSD.org>

Revert "sys/conf/newvers.sh: whack sccs tag"

This string is still in active use to find versions for core files
before we have symbols. This is premature.

This reverts commit e6dc6a27230f836a131118326731b7c5fd417723.

Sponsored by: Netflix


# e6dc6a27 26-Sep-2023 Mateusz Guzik <mjg@FreeBSD.org>

sys/conf/newvers.sh: whack sccs tag

In the same spirit as removing cvs $FreeBSD$ tags.

Sponsored by: Rubicon Communications, LLC ("Netgate")


# 9f16abf8 13-Sep-2023 Dag-Erling Smørgrav <des@FreeBSD.org>

newvers.sh: Avoid picking up stray envars.

89f361f742ae added a mechanism to allow arbitrary overrides from the
command line. Unfortunately, it also had the (likely unintended)
effect of allowing RELEASE and VERSION to be passed in from the
environment, and Makefile.inc1 happens to define VERSION for the
benefit of pkgbase. To restore the status quo, unset RELEASE and
VERSION at the top of the script.

Fixes: 89f361f742ae
MFC after: 3 days
Reviewed by: gallatin, sjg, emaste
Differential Revision: https://reviews.freebsd.org/D41845


# aee253d8 24-Aug-2023 Glen Barber <gjb@FreeBSD.org>

update main to 15

Approved by: re (implicit)
Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by: PayPal https://paypal.me/gjbbsd


# 77013f29 17-Aug-2023 Glen Barber <gjb@FreeBSD.org>

release: update main to ALPHA2

Due to an issue being investigated, the branch of stable/14 will
be delayed a week. This should not impact the rest of the schedule
for this cycle.

Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by: PayPal https://paypal.me/gjbbsd


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 136fc495 10-Aug-2023 Glen Barber <gjb@FreeBSD.org>

release: update main to ALPHA1

Update CURRENT to ALPHA1 as part of the 14.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by: PayPal https://paypal.me/gjbbsd


# 89f361f7 17-Jul-2023 Simon J. Gerraty <sjg@FreeBSD.org>

kern.post.mk allow NEWVERS_{ENV,ARGS}

Allow makefiles better control of newvers.sh env and args.
Also allow variable overrides on command line.

Reviewed by: imp, stevek
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D41012


# 2c19beee 21-Apr-2023 Warner Losh <imp@FreeBSD.org>

newvers: Use correct regexp

There's no need to quote the # here. Inside of regexp, it's not treated
like a comment from an awk perspective. And inside if '' it's not
treated as special by the shell. gawk also warns.

Sponsored by: Netflix


# 6ab35c78 14-Jun-2022 John Baldwin <jhb@FreeBSD.org>

newvers.sh: Don't use return to exit.

Commit acfb506b3d00 replaced an exit 0 when using -V with a return
instead. FreeBSD's sh treats a return outside of a function like
exit, but this is a non-portable extension. Other Bourne shells only
permit return to be used within a function and continue execution
(possibly with a warning).

To fix, don't reuse VARS_ONLY (which is intended to be set by other
scripts before sourcing newvers.sh directly) and instead use a new
variable (VARS_ONLY_EXIT) to restore the use of exit for the
non-sourced case.

Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D35481


# acfb506b 10-Feb-2022 Ed Maste <emaste@FreeBSD.org>

newvers.sh: allow multiple -V args in one invocation

Reviewed by: imp
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34253


# 2183bfcc 22-Apr-2021 Warner Losh <imp@FreeBSD.org>

newvers.sh: better regexp for the FreeBSD_version line

Tested with: cirrus-ci https://cirrus-ci.com/build/6012323274948608
Reviewed by: emaste@, rgrimes@
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29869


# 8a51f14a 25-Jan-2021 Warner Losh <imp@FreeBSD.org>

newvers: tweak uname to be more useful

The current uname is branch-cXXXX-gHASH

Three changes to make uname more useful.
1. Move from using git rev-list --count to git rev-lis --count --first-parent
since that gives a better, incrementing number.
2. Report this count as 'nXXXXX' rather than 'cXXXXX' because c is part of
a hash and we've changed the sematnics of XXXXX
3. Remove g to make HASH cut and pastable.

Durting review, #1 & #3 had the largest consensus. There was a diversity of
opinion on #2, but on the whole it was positive so I'll acknowledge the dissent,
but move forward with something seems to have support since the dissent was all
about what letter to use where I chose 'n'.

MFC After: 3 days
Reviewed by: rgrimes, emaste (earlier version)
Differential Revision: https://reviews.freebsd.org/D28338


# 85646602 25-Jan-2021 Ed Maste <emaste@FreeBSD.org>

newvers.sh: add newline at EOF in generated vers.c

Previously we omitted the newline, which did not cause a functional
issue for the build but resulted in suboptimal output from e.g.
`cat vers.c`.


# ace7209c 22-Jan-2021 Mateusz Guzik <mjg@FreeBSD.org>

newvers.sh: restore reporting branch names

It got removed arguably without much discussion in the commit which
added gitup support.


# a53ce3fc 21-Jan-2021 Glen Barber <gjb@FreeBSD.org>

Bump CURRENT to 14.0

This one goes to 14.

Approved by: re (implicit)
Sponsored by: Rubicon Communications, LLC ("Netgate")


# 9e98065c 21-Jan-2021 Ed Maste <emaste@FreeBSD.org>

newvers.sh: avoid bare git invocation

git may not be in the path, and $git_cmd includes some commandline
arguments.

Reported by: mjg
Tested by: mjg


# a9fc14fb 05-Jan-2021 Michael Osipov <michael.osipov@siemens.com>

newvers.sh: add support for gitup(1)

gitup writes a .gituprevision file into the shallow clone directory. Read that
file and print commit information only.

Submitted by: Michael Osipov <michael.osipov@siemens.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/449

While here, drop the redundant branch name from the git output and don't
count commits in shallow clones.

Reported by: Michael Osipov <michael.osipov@siemens.com>
MFC after: 2 weeks


# 7ae27c2d 13-Jan-2021 Glen Barber <gjb@FreeBSD.org>

newvers.sh: set to ALPHA1 as part of the 13.0 cycle

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 8d405efd 23-Dec-2020 Ulrich Spörlein <uqs@FreeBSD.org>

Fix newvers.sh to no longer print an outdated SVN rev

We have stopped using SVN, so the notes containing the old SVN revisions
are no longer populated, so fall back to purely counting the number of
commits (currently at about 255337).

Also turn the format more into what git-describe produces, with a name
first, then the number of commits and the hash last. Note that as we
don't tag anything on `main`, git describe will never produce something
useful there and finds the newest vendor tag that was merged in instead.

Sample output:
FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty
FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty

MFC after: 3 weeks
Reviewed by: imp, glebius
Differential Revision: https://reviews.freebsd.org/D27751


# 17eba5e3 22-Dec-2020 Ed Maste <emaste@FreeBSD.org>

newvers.sh: fix sense of git dirty check

Previously we reported -dirty for an unmodified tree, and no -dirty if
there were changes.

PR: 252028
Reported by: John Kennedy


# 029ca184 16-Dec-2020 Brooks Davis <brooks@FreeBSD.org>

newvers.sh: Speed up git_tree_modified

We're looking for file content differences, so ask the question of git
more directly. This helps a lot, saving tens of thousands of fork()s,
when the builder and editor see different stat() results (e.g., UIDs),
as they might with containers.

Submitted by: Nathaniel Wesley Filardo <nwf20@cl.cam.ac.uk>
Reviewed by: bdrewery, emaste, imp
Obtained from: CheriBSD
MFC after: 3 days
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27646


# bfdd0a34 14-Sep-2020 Gordon Tetlow <gordon@FreeBSD.org>

Partially revert r346018 and use the if/then construct instead of shell.

There are a couple of places in the tree that directly parse the newvers.sh
script looking for the BRANCH variable. I found two locations, one in
release/Makefile and the other in bin/freebsd-version/Makefile.

While there is a good argument that BRANCH_OVERRIDE should properly
propagate in those circumstances and the new behavior is thus better, the
reality is this change broke freebsd-update's ability to find timestamps in
binaries and resulted in a large number of gratuitous changes.

Reported by: freebsd-update
Discussed with: cperciva
MFC after: 1 day


# 038fe1e3 11-Sep-2020 Glen Barber <gjb@FreeBSD.org>

Enclose BRANCH_OVERRIDE in quotes in order to fix an issue with
freebsd-update(8) builds, where BRANCH is suffixed with -p0 for
builds.

Noticed by: gordon
With help from: cperciva
MFC after: 3 days
MFC note: before 12.2-BETA2
Sponsored by: Rubicon Communications, LLC (netgate.com)


# 0a20523d 23-Mar-2020 Alex Richardson <arichardson@FreeBSD.org>

Fix newvers.sh on macOS 10.15

It appears that the macOS /bin/sh echo now defaults to -e and therefore the
`#define VERSTR` included newline characters instead of \n. This caused compiler
errors due to unterminated strings. Fix by using printf instead of echo.
A less fragile solution might be to bootstrap the in-tree /bin/sh but that
requires more changes.

Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D24136


# ecb2bbc0 01-Aug-2019 Ed Maste <emaste@FreeBSD.org>

newvers: append commit count to uname version string

In a git world this provides a facsimile of a monotonically increasing
version number. This might be refined further, but this provides a
starting point for investigation.

Reviewed by: cem
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20462


# 89afd39c 31-May-2019 Warner Losh <imp@FreeBSD.org>

Defer evaluation of modified until after it's set

With the reorg r348175, we now look at modified before it is
set. Rearrange things so that we can set include_metadata to either
yes, no or if-modified. This should fix the -R flag that was broken in
r348175, which broke WITH_REPRODUCIBLE_BUILD for kernels.

Feedback From: emaste@
Differential Revision: https://reviews.freebsd.org/D20480


# 1eb8dfc6 31-May-2019 Ed Maste <emaste@FreeBSD.org>

newvers.sh correct typo from r348175


# 9afea54a 23-May-2019 Warner Losh <imp@FreeBSD.org>

Implement "VARS_ONLY=1" via special command line args

Add -v to print TYPE REVISION BRANCH RELEASE VERSION RELDATE variables
Add -V var to print var's value
Both of these in ${var}="${val}" format suitable for
eval $(sh newvers.sh -v)
in shell scripts / makefiles.
Add -c to print the copyright / license comment text only.

Document these, and remove soon-to-be obsolete comment.

Minor code motion as well bunded here to put functions after
VARS_ONLY and command line argument parsing.

Differential Revision: https://reviews.freebsd.org/D19849


# 79beb7164 08-Apr-2019 Warner Losh <imp@FreeBSD.org>

Style only change: Prefer $() to ``

$() is more modern and also nests. Convert the mix of styles to using
only the former (although the latter was more common). It's the more
dominant style in other shell scripts these days as well.

Differential Revision: https://reviews.freebsd.org/D19840


# 4ff9f3e6 07-Apr-2019 Warner Losh <imp@FreeBSD.org>

Make RELDATE be on a single line.

All variable assignments that start in column 1 have to be on a single
line for amd to build due to as weird dependency there (most likely it
can be fixed to use the new VARS_ONLY feature, but it isn't
today). usr.sbin/amd/include/Makefile calls
usr.sbin/amd/include/newvers.sh which does:
eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT`
which is where that requirement comes from. It handles COPYRIGHT since
that's an exception. Rather than add additional exceptions, cope with
the long line in newvers.sh instead. Note: it no longer needs to
filter COPYRIGHT because the assignment doesn't start in column 1
anymore.

I had done a universe when I had an earlier version of r346018 that
had it as one line. When I changed it to multi-line as suggested in
the review, I only built kernels on a couple of architectures to make
sure it didn't break anything.

Add comment to newvers.sh noting this.

Obviously, this unbreaks the amd build.


# 11b4d193 07-Apr-2019 Warner Losh <imp@FreeBSD.org>

Use default shell assignment rather more complicated if then
construct.

Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback)
Differential Revision: https://reviews.freebsd.org/D19797


# 2bb0099f 05-Apr-2019 Warner Losh <imp@FreeBSD.org>

Remove another instance of All Rights Reserved.

Remove the phrase from boilerplate copyright we stick on vers.c when
we can't find the template file. In practice, this won't change a
thing, except for the case of compiling the kernel standalone w/o the
rest of a tree on a system that doesn't have
/usr/share/examples/etc/bsd-copyright installed.


# 35bc37b6 04-Jan-2019 Andrew Gallatin <gallatin@FreeBSD.org>

Limit git history searches in newvers.sh

newvers.sh takes upwards of 4-5 seconds to complete on trees checked
out from github, due to searching the entire history for non-existent
git-svn metadata. Similarly, if one does not check out notes, we
again search the entire history for notes. That makes newvers.sh very
slow for many github users.

To fix this in a fair way, limit the history search to the last 10K
commits: if you're more than 10K commits out of sync, then you've
forked the project, and our SVN rev is no longer very important to you.

Due to how git implements --grep in conjunction with -n, --grep has been
removed for performance reasons (git does not seem to limit its search
to the -n limit in this case, and takes just as long as it did with no
limit).

Reviewed by: emaste, imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18745


# feea7899 04-Jan-2019 Ed Maste <emaste@FreeBSD.org>

newvers: retire p4 version support

Perforce no longer offers a FreeBSD client and it not a viable VCS for
FreeBSD development. Remove p4 version logic to simplify newvers.sh in
advance of other changes.

Sponsored by: The FreeBSD Foundation


# 2cb541bf 04-Jan-2019 Ed Maste <emaste@FreeBSD.org>

newvers: avoid clearing svn revision information with nested VCS dirs

Consider the case where FreeBSD is checked out via Subversion with a
(perhaps unrelated) .git or .hg directory at a higher level - for
example,

.../.git
.../src/freebsd

Previously newvers obtained the SVN revision information via svnversion,
and then tried to obtain the SVN revision corresponding to the git or hg
commit, overwriting the existing information.

As a short term fix use a different variable for hg-svn or git-svn
information, setting $svn from hg or git info only if not empty.

Reported by: Matthias Apitz
Sponsored by: The FreeBSD Foundation


# c10d927c 05-Dec-2018 Alex Richardson <arichardson@FreeBSD.org>

Fix newvers.sh with BUILD_WITH_STRICT_TMPPATH=1

newvers.sh runs mkfifo which did not exist before this change.
However, I didn't notice before because it is run from a function
where a missing command does cause a noticeable failure.

Reviewed By: emaste, markj
Differential Revision: https://reviews.freebsd.org/D18377


# 5186028d 08-Nov-2018 Mark Johnston <markj@FreeBSD.org>

Use --work-tree instead of specifying an absolute path.

Otherwise the diff command being run from outside the checkout resulted
in warnings.

Discussed with: emaste
X-MFC with: r340083


# 179460e1 07-Nov-2018 Ed Maste <emaste@FreeBSD.org>

newvers.sh: avoid regenerating vers.c if content unchanged

When reproducible build mode is enabled vers.c may be unchanged between
successive builds. In this case avoid changing the file's metadata so
that it does not cause dependent targets to be rebuilt.

Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D17892


# 50b53a8d 02-Nov-2018 Ed Maste <emaste@FreeBSD.org>

newvers.sh: fix git false positive -dirty tag

Assuming that any output from `git diff-index --name-only` implies
changes in the working tree results in false positives: files with
metadata, but not content, changes are also listed.

Check that content differences exist before adding the -dirty tag to
the git hash.

PR: 229230
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15968


# b9583179 18-Oct-2018 Glen Barber <gjb@FreeBSD.org>

- Update head to 13.0-CURRENT.
- Bump MACHINE_TRIPLE, TARGET_TRIPLE, FBSD_MAJOR, FBSD_CC_VER,
FREEBSD_CC_VERSION, OS_VERSION.
- Update comment in UPDATING regarding debugging options.
- Remove debug.witness.trace=0 from installation media.
- Bump __FreeBSD_version.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 090570a3 16-Oct-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA9 to ALPHA10 as part of the 12.0-RELEASE
cycle.

This is expected to be the final ALPHA build of this release
cycle, prior to branching stable/12.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# c3fb2eae 09-Oct-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA8 to ALPHA9 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# d0addc70 27-Sep-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA7 to ALPHA8 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 8385e87c 26-Sep-2018 Mateusz Piotrowski <0mp@FreeBSD.org>

newvers.sh: Unbreak building in Git repositories.

Building the kernel in Git repositories when git-svn is not available and
the "help.autocorrect" Git parameter is enabled results in Git trying to
replace the "svn" command (it does not know) with "serve". As a result the
output of the "git server" command is appended to the value of the
environmental variable VERINFO, which causes the auto generated vers.c
file to contain invalid C syntax (missing newline escapes):

#define "@(#)FreeBSD 12.0-ALPHA7 r000eversion 2
0015agent=git/2.19.0
000cls-refs
0012fetch=shallow
0012server-option
0000=5e2272613fa(splash-vt)"
#define VERSTR "FreeBSD 12.0-ALPHA7 r000eversion 2
0015agent=git/2.19.0
000cls-refs
0012fetch=shallow
0012server-option
0000=5e2272613fa(splash-vt)\n"

Using `-c help.autocorrect=0` seems to be a good solution as it does not
modify user's environment. I am not sure, however, if we should use
programs (or Git commands), which we are not sure exist (we never check if
git-svn is available on the host), as there may be more unexpected
behaviors like this one.

Reviewed by: eadler, emaste, krion
Approved by: re (gjb), krion (mentor)
Sponsored by: Bally Wulff Games & Entertainment GmbH
Differential Revision: https://reviews.freebsd.org/D17271


# f789d983 21-Sep-2018 Ed Maste <emaste@FreeBSD.org>

Include kernel ident in uname

In non-reproducible mode we have the kernel ident as a side effect of
including the build directory. Explicitly add it to the ident string in
reproducible mode.

Reported by: mjg
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation


# 18c00da8 21-Sep-2018 Ed Maste <emaste@FreeBSD.org>

remove double space between branch and version in kernel ident

Reported by: dim
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation


# a128aaea 20-Sep-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA6 to ALPHA7 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# b79672bb 13-Sep-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA5 to ALPHA6 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# dac18e8e 06-Sep-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA4 to ALPHA5 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 5d2346ef 31-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA3 to ALPHA4 as part of the 12.0-RELEASE
cycle. The i386 build failure appears to be transient, and
now becoming more difficult to reliably reproduce to identify
the cause. I will continue to investigate this, however.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# f488983b 30-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Revert r338401, as the i386 build is broken.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 7c0f8d81 30-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA3 to ALPHA4 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# cd371ac1 23-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Update head from ALPHA2 to ALPHA3 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 9dae4c97 16-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Rename head from ALPHA1 to ALPHA2 in preparation for the next set
of snapshot builds.

Hashtag: MaximumEffort
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# b534d57f 09-Aug-2018 Glen Barber <gjb@FreeBSD.org>

Rename head from -CURRENT to -ALPHA1 as part of the
12.0-RELEASE cycle. This commit marks the start of
the code slush for the 12.0 cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 030efb3c 29-Jun-2018 Ed Maste <emaste@FreeBSD.org>

newvers.sh: avoid possibly invalid relative directory

Previously newvers.sh passed --work-tree=${VCSDIR}/.. when invoking git.
When using git worktree .git is actually a file, not a directory, and
.git/.. is not a valid path. Although it appears git handles this
internally (perhaps it normalizes the path first), it is simple enough
for the script to store both the working tree top-level directory and
the VCS (.git) directory, so do so.

Sponsored by: The FreeBSD Foundation


# 981e34b9 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

Indent protection and some other oops from the prvious commits.


# 51369649 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 3ac77a91 10-Sep-2017 Ed Maste <emaste@FreeBSD.org>

newvers.sh: speed up failing git-svn revision search

In the case of running newvers.sh on a git tree w/o git-svn-id notes we
previously piped the entire 'git log' to grep. Add --grep to the log
invocation to avoid processing log entries of no interest.

This saves about 2-3 seconds of newvers.sh run time on my SSD laptop.
Later changes will bring further speedups.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation


# a4891020 10-Sep-2017 Ed Maste <emaste@FreeBSD.org>

newvers.sh: accept "git-svn-id:" at the start of a line only

This prevents incorrect subversion revision detection when "git svn" is
not being used to get the sources but git is available. Previously old
subversion revisions included in commit messages were favoured over the
more recent and correct revisions in git notes.

For example cf1f35574722 represents r315395 but was treated as r313908
which is referenced in the commit message. Commits following
r315395/cf1f35574722 but before another commit with a git-svn-id
reference in the commit message would be treated as r313908 as well.

Patch from PR updated to accommodate the initial four space indent in
`git log` ouptut.

PR: 221848
Submitted by: Fabian Keil
Obtained from: ElectroBSD
MFC after: 2 weeks


# 495947bc 22-Aug-2017 Ed Maste <emaste@FreeBSD.org>

newvers.sh: accommodate `git worktree`

newvers.sh looks for a .vcs subdirectory (e.g. .git, .svn) to determine
which vcs info tool to run (e.g., git rev-parse, svn info).

(As of r308789 if a .vcs subdirectory is not found at ${TOPDIR} then
newvers.sh walks up successive parent directories, testing for the .vcs
subdirectory at each step. This is done in case the FreeBSD source is
built in a subdirectory as part of some larger project, but either way
newvers.sh still tests for the .vcs subdirectory.)

However, when using git worktree there is no .git subdirectory but
rather a plain text .git file which contains a reference to the main
working tree.

Change findvcs() to test that the .vcs entry exists, regardless of type.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation


# 7f582d62 19-Dec-2016 Ed Maste <emaste@FreeBSD.org>

newvers.sh: consider as modified SVN mixed revision and other cases

The newvers -R option is intended to include build metadata (e.g. user,
host, time) if the build is from an unmodified VCS tree. For subversion
it considered a trailing 'M' as an indication of a modified tree, and
any other version string as modified.

Also include mixed revision checkouts (e.g. 123:126), switched (123S)
and partial (123P) working copies as modified: the revision number is
insufficient to uniquely determine which source was used for the build.

Reported by: gjb
Reviewed by: gjb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8853


# 61ae7e24 19-Dec-2016 Ed Maste <emaste@FreeBSD.org>

newvers.sh: add -R option to include metadata only for unmodified src tree

Sponsored by: The FreeBSD Foundation


# e77cf596 15-Dec-2016 Ed Maste <emaste@FreeBSD.org>

newvers.sh: correct typo in comment

Submitted by: lidl


# 7e9de36c 14-Dec-2016 Ed Maste <emaste@FreeBSD.org>

newvers.sh: add option to eliminate kernel build metadata

Build metadata (username, hostname, etc.) prevents the FreeBSD kernel
from building reproducibly. Add an option to disable inclusion of that
metadata but retain the release information and SVN/git VCS details.
See https://reproducible-builds.org/ for additional background.

Reviewed by: bapt
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: Reproducible Builds World Summit 2, Berlin
Differential Revision: https://reviews.freebsd.org/D4347


# 5e680acd 17-Nov-2016 Gleb Smirnoff <glebius@FreeBSD.org>

If FreeBSD source tree is a subproject of a bigger project, then .git or
.hg may reside above FreeBSD sources root. Provide function findvcs()
that will climb up and seek for presence of a VCS directory.

Reviewed by: imp (earlier version of the patch)


# ae940db1 07-Jul-2016 Glen Barber <gjb@FreeBSD.org>

Reflect head is now 12.0-CURRENT.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 193d700f 30-Jun-2016 Glen Barber <gjb@FreeBSD.org>

Update 11.0 to ALPHA6.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 591dda3a 23-Jun-2016 Glen Barber <gjb@FreeBSD.org>

Update head to ALPHA5 in preparation of new snapshot builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 6c84c6e2 16-Jun-2016 Glen Barber <gjb@FreeBSD.org>

Update 11.0 to -ALPHA4 in preparation of a new set of snapshot
builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# f6596b97 10-Jun-2016 Glen Barber <gjb@FreeBSD.org>

Update 11.0 to ALPHA3 in preparation for new snapshot builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 46e7e6bd 02-Jun-2016 Glen Barber <gjb@FreeBSD.org>

Update to ALPHA2 in preparation of a new set of snapshot builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# f40383e1 26-May-2016 Glen Barber <gjb@FreeBSD.org>

Update head from 11.0-CURRENT to 11.0-ALPHA1, marking the official
start of the code slush.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# f232b391 07-Apr-2016 Ed Maste <emaste@FreeBSD.org>

newvers.sh: rationalize licence condition numbering


# 58eaee06 31-Dec-2015 Ed Maste <emaste@FreeBSD.org>

newvers.sh: put variable assignments on separate lines

This makes it easier to grep for where they're set, and may simplify
future merging for FreeBSD derivatives that change these.


# 484df459 02-Dec-2015 Ed Maste <emaste@FreeBSD.org>

newvers: Honour SOURCE_DATE_EPOCH as a build reproducibility measure

One reason the kernel does not build reproducibly is that it includes
a timestamp in the version string. SOURCE_DATE_EPOCH provides a standard
method to address this: it should be set to the last modification time
of the source, and build processes use the specified timestamp instead
of the "current" date and time.

This change uses SOURCE_DATE_EPOCH if it is set; how it gets set needs
to be addressed elsewhere.

Reviewed by: bapt
MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 8e8319a6 25-Nov-2015 Bryan Drewery <bdrewery@FreeBSD.org>

Stop building vers.c in include/ and only build the needed osreldate.h.

Because of how osreldate.h was being built with newvers.sh, which always
spat out a vers.c dependent on SVN or git, the meta mode build was
considering osreldate.h to depend on the current git or SVN index. This
would lead to entire tree rebuilds when modifying git's index. There's
no reason to be generating vers.c here so just skip it.

While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which
newvers.sh already has a default for) and remove unneeded export.

Sponsored by: EMC / Isilon Storage Division


# 22cac86d 07-Apr-2015 Eitan Adler <eadler@FreeBSD.org>

newvers.sh: remove 'X' hack from shell script

Reviewed by: allanjude, Daniel O'Connor


# 87570696 22-Dec-2014 Warner Losh <imp@FreeBSD.org>

Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
current date if we can't find it.

MFC After: 2 weeks


# b4f46e79 14-Nov-2014 Xin LI <delphij@FreeBSD.org>

Use ${SYSDIR} as the reference pointer instead of specifying relative path directly.

Reported by: jenkins via Olivér Pintér (on github)


# efda9da6 12-Nov-2014 Xin LI <delphij@FreeBSD.org>

Derive copyright year from src/COPYRIGHT.

MFC after: 2 weeks


# 72b2ef06 08-Oct-2014 Baptiste Daroussin <bapt@FreeBSD.org>

Only catch the line from the compiler output where 'version' is a word
This allows to build the kernel with gcc 4.9.1 from ports


# 1f88f8a3 03-Feb-2014 Rui Paulo <rpaulo@FreeBSD.org>

Fix the definition of hg_cmd.

MFC after: 3 days


# a4108819 14-Oct-2013 Rui Paulo <rpaulo@FreeBSD.org>

Add support for Mercurial repositories.


# 006a42a9 10-Oct-2013 Glen Barber <gjb@FreeBSD.org>

Turn it all the way up to 11:

- Update FreeBSD version in:
- UPDATING
- sys/conf/newvers.sh

- Add 11.0 FreeBSD version for manual pages

- Bump __FreeBSD_version to 1100000

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 4fb8f7b4 10-Oct-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to ALPHA6 in preparation of branching to stable/10.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 24907464 06-Oct-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to 10.0-ALPHA5.

Approved by: re (implicit)


# d7134682 02-Oct-2013 Rui Paulo <rpaulo@FreeBSD.org>

Append the Git branch to the version string.

Approved by: re (gjb)


# 0d8a6a99 28-Sep-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to -ALPHA4.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 0210509a 28-Sep-2013 Ian Lepore <ian@FreeBSD.org>

Allow the path to the system source directory to be passed in to
newvers.sh. Pass it in from include/Makefile. If it isn't passed in,
fall back to the old logic of using dirname $0.

Using dirname $0 does not yield the path to the script if it was
sourced in from another script in another directory; you end up with
the parent script's path. That was causing newvers.sh to look one
level below the FreeBSD src/ directory when building osreldate.h and it
may find something like a git or svn repo there that has nothing to do
with FreeBSD.

PR: 174422
Approved by: re ()
MFC after: 2 weeks


# 58f1be55 24-Sep-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to -ALPHA3.
This commit marks the point the final KBI change was made as part of the
10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 163fd5ec 16-Sep-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to -ALPHA2 status.

Approved by: re (implicit)


# 99f54f8f 12-Sep-2013 Glen Barber <gjb@FreeBSD.org>

Update head/ to -ALPHA1 status, as part of the 10.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 7c0af95a 11-Aug-2013 Glen Barber <gjb@FreeBSD.org>

Use realpath(1) to determine the location of the newvers.sh script,
since the current working directory might not be what is expected,
causing svn{,lite}version to fail to find ${0} (itself).

Submitted by: Dan Mack


# 887d03ea 10-Aug-2013 Glen Barber <gjb@FreeBSD.org>

Fix a typo. The script should run /usr/bin/svnliteversion instead of
/usr/bin/svnversion in the affected section.

Reported by: lev, Dan Mack


# a6191444 08-Aug-2013 Glen Barber <gjb@FreeBSD.org>

When newvers.sh is run, it is possible that the svnversion
(or svnliteversion) in the current lookup path is not what
was used to check out the tree. If an incompatible version
is used, the svn revision number is not reported in uname(1).

Run ${svnversion} on newvers.sh itself when evaluating if the
svn(1) in use is compatible with the tree. Fallback to an
empty ${svnversion} if necessary.

With this change, svnliteversion from base is only used
if no compatible svnversion is found, so with this change,
the version of svn(1) from the ports tree is evaluated first.

Requested by: many
MFC after: 3 days
X-MFC-To: stable/9, releng/9.2 only


# cfb2932b 05-Aug-2013 Glen Barber <gjb@FreeBSD.org>

Redirect svnversion stderr to /dev/null if we cannot determine
the tree version, for example if the tree is checked out with an
outdated svn from ports, but the base system svnlite is built.

Approved by: kib (mentor)


# 38784138 24-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

newvers.sh: add another git-svn fallback

This time it is for a git mirror that stores svn revisions as
git notes, e.g. https://github.com/freebsd/freebsd

MFC after: 10 days
Sponsored by: HybridCluster


# 5393fdd2 24-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

newvers.sh: fix the fallback case of git-svn detection

MFC after: 5 days
Sponsored by: HybridCluster


# 92994bd3 02-Jul-2013 Glen Barber <gjb@FreeBSD.org>

- Update newvers.sh to include svn revision in uname(1) if the
system has svnliteversion.
- If svnliteversion is not found, look for svnversion in /usr/bin
and /usr/local/bin, since svnlite can be installed as svn if
WITH_SVN is set.[1]
- Remove /bin from binary search paths.[1]

Discussed with: kib [1]
MFC after: 3 days
Approved by: kib (mentor)


# bfdcb3bc 02-Feb-2013 Andriy Gapon <avg@FreeBSD.org>

print compiler version in the kernel banner

And provide kernel compiler version as a sysctl as well.
This is useful while we have gcc and clang cohabitation.
This could be even more useful when we have support
for external toolchains.

In cooperation with: mjg
MFC after: 13 days


# 5ea86155 22-Sep-2012 Rui Paulo <rpaulo@FreeBSD.org>

Improve the check for p4 opened files.

Now we only search for opened files in ${SYSDIR}, which makes it
possible to use multiple source trees.


# 878a25db 16-Sep-2012 Rui Paulo <rpaulo@FreeBSD.org>

Add Perforce support.


# 0782493b 12-Feb-2012 Andriy Gapon <avg@FreeBSD.org>

newvers.sh: unbreak git/git-svn support

MFC after: 2 weeks


# 78b87074 29-Nov-2011 John Baldwin <jhb@FreeBSD.org>

Remove a bit of debugging that accidentally crept in earlier.


# cec62135 27-Oct-2011 Doug Barton <dougb@FreeBSD.org>

Fix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR} (since
it no longer exists). Instead, run svnversion if we can find the binary
and test that the output looks like a version string.

Reviewed by: discussion on -current@
Tested by: rodrigc for non-svn case (thanks!)


# 8a3b6cc1 25-Sep-2011 Ken Smith <kensmith@FreeBSD.org>

Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by: re (implicit)


# b18bbed4 28-Aug-2011 Ken Smith <kensmith@FreeBSD.org>

Ready for 9.0-BETA2.

Approved by: re (implicit)


# d8048725 25-Jul-2011 Ken Smith <kensmith@FreeBSD.org>

Looks like we're ready for 9.0-BETA1 builds.

Approved by: re (implicit)


# e28b1e2d 23-May-2011 Ruslan Ermilov <ru@FreeBSD.org>

expr -> sh arithmetic expansion


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 1400f514 23-Sep-2010 Warner Losh <imp@FreeBSD.org>

Clean up stray line in 213077


# b26f77e5 23-Sep-2010 Warner Losh <imp@FreeBSD.org>

Simplify how we find the kernel source. Rather than depending on sys,
or some variation in the path, the new version assumes that $0 is
newvers.sh path, and that dirname $0/.. is the same as $S aka $SYSDIR.
It also removes knowledge of ${MACHINE} and ${MACHINE_ARCH}, which is
also good.

# I've had this in my tree for about 6 months now, which is why I
# didn't notice that I broke it in r209510 and that was fixed in
# r212954. This should finally resolve the issues people had with
# r204824 as well as address the issues that motivated r204824.


# 231fffcf 21-Sep-2010 Andrew Thompson <thompsa@FreeBSD.org>

Fix the path to the sys dir when cross compiling after r209510.

Reviewed by: imp


# 9adee7d0 16-Jul-2010 Ken Smith <kensmith@FreeBSD.org>

Ready for 8.1-RELEASE builds.

Approved by: re (implicit)


# 7cc3e11f 26-Jun-2010 Ken Smith <kensmith@FreeBSD.org>

Ready to proceed with 8.1-RC2.

Approved by: re (implicit)


# d77e9f9a 13-Jun-2010 Ken Smith <kensmith@FreeBSD.org>

Ready for 8.1-RC1.

Approved by: re (implicit)


# 58bfd864 17-May-2010 Ken Smith <kensmith@FreeBSD.org>

Since sometimes developer activity the week before a code freeze starts causes
the stable branch to be a little less reliable than normal mark the stable/8
branch as 8.1-PRERELEASE to warn users.


# d09d3ccb 09-Mar-2010 Doug Barton <dougb@FreeBSD.org>

Revert to r197433, the more recent change doesn't work for the common
case, and has not been well received.


# 11a06432 07-Mar-2010 David E. O'Brien <obrien@FreeBSD.org>

Look for "compile" to decide if this is run as part of the kernel build.
The assumption of "${ARCH}/compile/FOO" is much harder to change in our
build (so assume one hasn't), then assuming every kernel is rooted at "sys/".


# fac7a2ab 26-Nov-2009 Ken Smith <kensmith@FreeBSD.org>

8.0-RELEASE is done, shift stable/8 to -STABLE designation.


# 76473204 11-Nov-2009 Ken Smith <kensmith@FreeBSD.org>

Shift what stable/8 calls itself to the thing that people who tend to
complain about such things find, on average, the least objectionable.


# 67de4404 03-Nov-2009 Max Laier <mlaier@FreeBSD.org>

MFC r197334,r197433:
Extract svn and git version info from git-svn repos.


# 1e5dd507 24-Oct-2009 Ken Smith <kensmith@FreeBSD.org>

Prepare for 8.0-RC2 builds.

Approved by: re (implicit)


# 23250941 23-Sep-2009 Max Laier <mlaier@FreeBSD.org>

Improve on r197334:
Find the most recently merged svn revision, too. If we get a svn revision
that matches HEAD use rXXX=GIT otherwise use rXXX+GIT.

Submitted by: avg
MFC after: 3 days
X-MFC: not stable/8 before 8.0


# e652e59b 19-Sep-2009 Max Laier <mlaier@FreeBSD.org>

Extract version information from git repositories. Try to find a
corresponding svn version if this is a git-svn clone'ed repo.
This prefers svn version information over git in case a working
directory has both .svn and .git directories.

MFC after: 3 days
X-MFC: not stable/8 before 8.0


# 5895f2dd 17-Sep-2009 Ken Smith <kensmith@FreeBSD.org>

Get ready for 8.0-RC1 builds.

Approved by: re (implicit)


# 9d4abd54 04-Sep-2009 Ken Smith <kensmith@FreeBSD.org>

Ready for BETA4.

Approved by: re (implicit)


# 818b5b0e 26-Aug-2009 Doug Barton <dougb@FreeBSD.org>

MFC r196435:

The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the
script do not make use of that information. So restrict execution
of the svnversion-related code to the kernel build context.

Approved by: re (kib)


# d05203a1 22-Aug-2009 Doug Barton <dougb@FreeBSD.org>

The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the script
do not make use of that information. So restrict execution of the
svnversion-related code to the kernel build context.


# cf48cc9f 22-Aug-2009 Ken Smith <kensmith@FreeBSD.org>

Make head 9.0-CURRENT in preparation for lifting code freeze.

Approved by: re (implicit)


# bf6ab6cb 21-Aug-2009 Ken Smith <kensmith@FreeBSD.org>

Ready for 8.0-BETA3 builds.

Approved by: re (implicit)


# e57e15a1 15-Jul-2009 Ken Smith <kensmith@FreeBSD.org>

Prepare for the 8.0-BETA2 builds.

Approved by: re (implicit)


# 55b57bd2 06-Jul-2009 Ken Smith <kensmith@FreeBSD.org>

Bump for BETA1.

Approved by: re (implicit)


# bee7f5e6 28-Mar-2009 Bjoern A. Zeeb <bz@FreeBSD.org>

For kernel builds reduce the impact of svnversion, just scanning
src/sys and not the entire src/ tree.

An earlier solution by peter had been comitted in r183528 and backed out
in r183566 due to problems with newvers.sh also called from other places
during world build. With the extra test this survived a make universe.


# 4c21a320 20-Jan-2009 Andrew Thompson <thompsa@FreeBSD.org>

Dont assume $MACHINE is set, this breaks for regular builds.

Reported by: pho


# 07707a24 18-Jan-2009 Andrew Thompson <thompsa@FreeBSD.org>

Also strip the machine arch from SRCDIR in case it is a cross build so
svnversion works.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# fa89f89c 03-Oct-2008 Bjoern A. Zeeb <bz@FreeBSD.org>

Backout svn r183528.

SRCDIR is seeded from `pwd` which not only means src/sys/ but
also src/include/ (and possibly src/usr.sbin/amd/include/ ?).
Trying to build world resulted in

===> include (includes)
cd /usr/src/include; make buildincludes; make installincludes
creating osreldate.h from newvers.sh
cd: can't cd to /usr/src/include/sys
*** Error code 2

as there is apparently no src/include/sys.

There are multiple possible solutions ranging from seeding SRCDIR from
the environment to adding more substitution patterns.

Reported by: sam, bz
Proper solution to be implemented and tested by: peter


# 944e61bf 01-Oct-2008 Peter Wemm <peter@FreeBSD.org>

Reduce the impact of svnversion. Just scan the src/sys tree, not all of
src.


# 9335f224 13-Jul-2008 Doug Barton <dougb@FreeBSD.org>

Change the character prefixed to the svn version to "r" since that seems
to be how they are commonly referred to.


# e0976d1a 08-Jun-2008 Doug Barton <dougb@FreeBSD.org>

The change to add subversion ID has two problems. The first is that when
newvers.sh is run pwd is actually the obj directory, so "../../.svn"
doesn't exist and the test always fails. The second is that buildkernel
is executed with a restrictive PATH, so unless you have svnversion in
/bin or /usr/bin it can't run.

Fix this by looking for svnversion in /bin, /usr/bin, and /usr/local/bin
in that order. If found, store the location and derive the value of the
source directory. Then run svnversion in the appropriate directory.

There is one possible refinement which would be to add a test for
LOCALBASE!=/usr/local if we don't find svnversion the first time, but
IMO that's not necessary at this time.


# 1125f273 07-Jun-2008 Poul-Henning Kamp <phk@FreeBSD.org>

If we can find it, include SVN version number in kernel version strings.

See also: http://www.bikeshed.org/


# c15e0967 10-Oct-2007 Ken Smith <kensmith@FreeBSD.org>

To honor the birth of RELENG_7 bump HEAD to 8.0-CURRENT.

Approved by: re (implicit)


# 4f9dc742 18-Aug-2005 Colin Percival <cperciva@FreeBSD.org>

Pad the strings sccs[], version[], and osrelease[] up to a minimum of
128 bytes, 256 bytes, and 32 bytes respectively. This makes it much
easier to identify when two kernels are identical apart from a version
number bump (as often happens on security branches).

Discussed on: freebsd-arch, in May 2005


# 028dbfaa 11-Jul-2005 Scott Long <scottl@FreeBSD.org>

Make the RELENG_6 branch operation official by moving HEAD to 7.0-CURRENT.

Approved by: re


# e0051579 01-Jul-2005 John Baldwin <jhb@FreeBSD.org>

Fix what(1) on kernel binaries by duplicating part of version[] in sccs[]
and stop trying to play cute games so that sccs[] shares space with
version[].

Reported by: Jilles Tjoelker jilles at stack dot nl
Discussed with: bde, "R. Imura" imura at ryu16 dot org
Idea from: NetBSD (via bde)
Approved by: re (scottl)
MFC after: 1 week


# 1b7525eb 15-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

If USER of HOSTNAME is set to an empty value, use the fallback value.

Submitted by: marck


# d6e822b2 14-Jan-2005 Tom Rhodes <trhodes@FreeBSD.org>

Give up on trying to please everyone and restore 1.64 with regards to
dealing with sudo users.


# fc3ec749 12-Jan-2005 Tom Rhodes <trhodes@FreeBSD.org>

Improve previous commit with regards to the user check.

Submitted by: nectar


# 3952015f 12-Jan-2005 Tom Rhodes <trhodes@FreeBSD.org>

Reflect reality when a sudo user builds/installs a kernel. [1]
/* -> /*- for copyright notices. [2]

[1]:
PR: 41317
Submitted by: marck (original version)

[2]:
Discussed with: imp


# e8f7141e 17-Sep-2004 Ruslan Ermilov <ru@FreeBSD.org>

Pass the idea of the make(1) binary to use down to newvers.sh.
This is necessary so source upgrades use the correct binary.

MFC after: 3 days

For the record: Problem spotted by Scott Long, who mentioned
that source upgrades from 4.7 to recent 5.x and 6.0 are broken.
Detailed analysis shows that 4.7 has a broken make(1) binary.
A breakage was fixed in RELENG_4 in make/main.c,v 1.35.2.7 by
imp@, though the commit log erroneously stated "MFC 1.68"
while in fact it should have been spelled as "MFC 1.67".


# 99ae32dc 17-Aug-2004 Scott Long <scottl@FreeBSD.org>

HEAD is now 6-CURRENT


# b7c29ad5 01-Jul-2004 Paul Saab <ps@FreeBSD.org>

When building a kernel or the loader, let the hostname be overridden


# f36cfd49 07-Apr-2004 Warner Losh <imp@FreeBSD.org>

Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson


# 9c855145 11-Jan-2004 Ruslan Ermilov <ru@FreeBSD.org>

Stay in sync with src/COPYRIGHT and src/sys/sys/copyright.h,
and put the starting year of the project into the copyright.


# 6c3d1bdf 10-Jan-2004 Ruslan Ermilov <ru@FreeBSD.org>

Properly fix the FreeBSD copyright.

Pointed by: scottl


# ab8de8b9 10-Jan-2004 Ruslan Ermilov <ru@FreeBSD.org>

s/FreeBSD Inc./The FreeBSD Foundation/g


# 721f3631 06-Dec-2003 Scott Long <scottl@FreeBSD.org>

HEAD is at 5.2-CURRENT now


# 8a5e5597 21-Nov-2003 Scott Long <scottl@FreeBSD.org>

Move us into 5.2-BETA


# 5ea5a019 23-Jul-2003 Peter Wemm <peter@FreeBSD.org>

ARGH. I *knew* I'd eventually accidently commit this. Change 5.1-XP back
to 5.1-CURRENT.


# 2a51529f 23-Jul-2003 Peter Wemm <peter@FreeBSD.org>

Provide a knob for raising the inline instruction estimate threshold and
set an initial value. This is aimed at getting us closer to being able to
turn -Werror back on and we can adjust the settings later on. Yes, we
could turn off -Wno-inline instead, but that would hide the effect of
gcc's bogo-estimator ignoring inline (either rightly or wrongly).


# c02d7621 09-Jun-2003 Juli Mallett <jmallett@FreeBSD.org>

Attempt to fix Alpha build by renaming ident[] to kern_ident[].


# c4119c76 09-Jun-2003 Juli Mallett <jmallett@FreeBSD.org>

Make kernel identification (`ident' in the config(8) driver) available to
userland, and the kernel. In the kernel by way of the 'ident[]' variable
akin to all the other stuff generated by newvers.sh. In userland it is
available to sysctl consumers via KERN_IDENT or 'kern.ident'. It is exported
by uname(1) by the -i flag.

Reviewed by: hackers@


# 5f23c2b5 01-Jun-2003 Scott Long <scottl@FreeBSD.org>

We are at 5.1-CURRENT now


# bc2de3da 05-May-2003 Scott Long <scottl@FreeBSD.org>

We are now in 5.1-BETA


# 865fa6a4 13-Dec-2002 Murray Stokely <murray@FreeBSD.org>

HEAD reverts to 5.0-CURRENT
RELENG_5_0 is 5.0-RC
5.0-RELEASE will be built off of the RELENG_5_0 branch


# 16c43074 04-Dec-2002 Murray Stokely <murray@FreeBSD.org>

Welcome to 5.0-RC.

Approved by: re


# afcf05e4 02-Mar-2001 Ruslan Ermilov <ru@FreeBSD.org>

setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.


# 6c8388dd 15-Dec-2000 Jordan K. Hubbard <jkh@FreeBSD.org>

SNAPDATE is an obsolete mechanism which has also been pretty much
of a no-op all along anyway. There are other ways to set this
for release building, so nuke it.

PR: 22979


# 420e39ab 13-Mar-2000 Jordan K. Hubbard <jkh@FreeBSD.org>

Welcome to 5.0-current!

"First commit" claimed by: jkh :)


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# b3a415b1 08-Aug-1999 Jordan K. Hubbard <jkh@FreeBSD.org>

The following simplifies newvers.sh somewhat and makes what(1) work with
kernels again, now that we're using EGCS/GCC 2.9+. This "here"
file is compatible with the Bourne shell and the Korn shell (incl. pdksh
and KSH93 from AT&T, which I do have), so it doesn't make newvers.sh
unportable, but makes it easier to modify in the future/read now.

Submitted by: green


# 391a151a 20-Jan-1999 Jordan K. Hubbard <jkh@FreeBSD.org>

This is now 4.0-current


# 05fc45d7 01-Nov-1998 Wolfram Schneider <wosch@FreeBSD.org>

The kernel should compile even /dev/null does not exists.


# 042b9176 16-Oct-1998 Jordan K. Hubbard <jkh@FreeBSD.org>

Back to -current again.


# fd4dfac9 15-Oct-1998 Jordan K. Hubbard <jkh@FreeBSD.org>

Change to 3.0-RELEASE in anticipation of the tag.


# 53448434 19-Sep-1998 Jordan K. Hubbard <jkh@FreeBSD.org>

Note that we're in BETA status.


# 3933c622 21-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Move __FreeBSD_version from src/sys/conf/newvers.sh to
src/sys/sys/param.h, to facilitate access from the kernel. This make
it possible to do outside kernel development and have it actually work
properly.


# 94610ec4 20-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Back out previous commit - it breaks when called from 'buildworld' :-(
(Damn, I wanted that in the -snap).


# a5eed7b8 20-May-1998 Eivind Eklund <eivind@FreeBSD.org>

Move __FreeBSD_version into <sys/param.h> (with automated duplication
to <osreldate.h>). This allow kernel drivers access to it.

Approved by: -current


# 1a0eac8a 23-Sep-1997 John Polstra <jdp@FreeBSD.org>

Increment RELDATE so that it is possible to distinguish between the
incompatible old and new forms of mount(2).


# d1515d7f 09-Jul-1997 Wolfram Schneider <wosch@FreeBSD.org>

Delete $Id$ line from copyright.

Submitted: Bruce


# 6875d254 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# 1e0a4ffa 18-Feb-1997 Satoshi Asami <asami@FreeBSD.org>

Set RELDATE=300000. With the parallel version development, it has
become impractical to distinguish versions using "real" release dates, so
might as well make it correspond to real version number (-current is
on the 3.0 branch) so at least the feature increments are guaranteed to
be linear.

Silently approved by: current list


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# ba7615a7 25-Nov-1996 Andrey A. Chernov <ache@FreeBSD.org>

Replace LC_TIME= with LC_TIME=C


# 45ff6278 15-Nov-1996 Satoshi Asami <asami@FreeBSD.org>

I'm not going to whine to Jordan anymore, since he seems to be busy with
the other two trees. Bump RELDATE to Feb 1997, one greater than 2.2.
Now I can go update my porting.sgml.

NOT a 2.2 candidate, in case phk's wondering. :)


# 50affa0e 02-Nov-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Set REVISION=3.0 and RELDATE=199701


# 05c75372 11-Oct-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

Yikes! This must have fallen in with a mass-commit by mistake.
Put RELEASE back.
Pointed-out-by: peter


# d50a3007 05-Oct-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

Multiple changes stacked as one commit since they all depend on one another.

First, change sysinstall and the Makefile rules to not build the kernel
nlist directly into sysinstall now. Instead, spit it out as an ascii
file in /stand and parse it from sysinstall later. This solves the chicken-n-
egg problem of building sysinstall into the fsimage before BOOTMFS is built
and can have its symbols extracted. Now we generate the symbol file in
release.8.

Second, add Poul-Henning's USERCONFIG_BOOT changes. These have two
effects:

1. Userconfig is always entered, rather than only after a -c
(don't scream yet, it's not as bad as it sounds).

2. Userconfig reads a message string which can optionally be
written just past the boot blocks. This string "preloads"
the userconfig input buffer and is parsed as user input.
If the first command is not "USERCONFIG", userconfig will
treat this as an implied "quit" (which is why you don't need
to scream - you never even know you went through userconfig
and back out again if you don't specifically ask for it),
otherwise it will read and execute the following commands
until a "quit" is seen or the end is reached, in which case
the normal userconfig command prompt will then be presented.

How to create your own startup sequences, using any boot.flp image
from the next snap forward (not yet, but soon):

% dd of=/dev/rfd0 seek=1 bs=512 count=1 conv=sync <<WAKKA_WAKKA_DOO
USERCONFIG
irq ed0 10
iomem ed0 0xcc000
disable ed1
quit
WAKKA_WAKKA_DOO


Third, add an intro screen to UserConfig so that users aren't just thrown
into this strange screen if userconfig is auto-launched. The default
boot.flp startup sequence is now, in fact, this:

USERCONFIG
intro
visual

(Since visual never returns, we don't need a following "quit").

Submitted-By: phk & jkh


# 7b2dfbf8 04-Aug-1996 Wolfram Schneider <wosch@FreeBSD.org>

Create FreeBSD copyright (c comment) for OS version


# 260afbaa 12-Jul-1996 Peter Wemm <peter@FreeBSD.org>

Bump RELDATE in -current to be greater than RELDATE in -stable (and hence
2.1.5-RELEASE). This will obviously be set "for real" closer to the time.

(some ports use this to differentiate the two branches /dev/kmem kernel
architectures. This exact same procedure happened in November last year
for the 2.1 RELEASE as well.)


# ddae6790 10-Nov-1995 Joerg Wunsch <joerg@FreeBSD.org>

Bump RELDATE to one more than the RELENG_2_1_0 branch, so one could
distinguish this from the version containing the NFSv3 code.


# 76021f66 23-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Reset only one necessary LC_ variable


# 413c9ee9 29-Aug-1995 Andrey A. Chernov <ache@FreeBSD.org>

Reset LANG and LC_TIME env. variables to produce english `date`


# e3553e7b 26-Aug-1995 Joerg Wunsch <joerg@FreeBSD.org>

Bump the OSRELDATE to 199508. Too many things have changed since
2.0.5, most notably the NFSv3 kernel support.

Reviewed by: the mailing lists


# e48cd9fa 29-Jul-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Add new ``SNAPDATE=""'' for use in snapshot building.

Reviewed by: jkh


# 160eabb8 13-Jul-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

This is a major rework of newvers.sh to put it back much closer to
what CSRG had, plus make things like, TYPE, REVISION, and BRANCH
easy to set, and derive RELEASE and VERSION from them.

Kill the JUST_TELL_ME hack, it is no longer needed.

Kill DISTNAME, I could find no reveference to it any place in the
source tree.

Now I just need to rework a few bits in release/Makefile, but want
to wait and talk to jkh about that.

Oh, and your now all running:
TYPE="FreeBSD"
REVISION="2.2"
BRANCH="CURRENT"

and the -BUILD-yymmdd is dead and gone. The date was already in the
version[] string, no need for it to be there in 2 formats!


# 6b64b3b1 02-May-1995 Poul-Henning Kamp <phk@FreeBSD.org>

It looks like I broke significant amounts of the commercial software running
on FreeBSD (ie: netscape), so we revert a little bit. "2.0-" is added back.


# 48bf097c 22-Apr-1995 Poul-Henning Kamp <phk@FreeBSD.org>

First part of the "what version of CURRENT" fix.

We now have RELEASE=CURRENT in the CVS-tree.

If this hasn't been edited, we will use "BUILT-yyyymmdd" where the time is
that of the compile, and leave it at that, we can't do any better.

If there is no serious objections, I will modify the "cvs co" script on
freefall to fiddle this file after checkout so that it becomes
CURRENT-yyyymmdd, where the time is that of the checkout.


# a058021a 17-Apr-1995 Gary Palmer <gpalmer@FreeBSD.org>

Bump to 2.0-950418-SNAP


# 61eaec4e 15-Apr-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Make DISTNAME and RELEASE the same for now. It makes more sense.


# 08ed1b1d 14-Apr-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Go to a coherent release number for uname(1).


# 624b327c 12-Apr-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

DISTNAME="2.0-950412-SNAP"


# 239f2b15 09-Apr-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Bump this to 950408-SNAP.


# 32d2e89f 23-Mar-1995 Poul-Henning Kamp <phk@FreeBSD.org>

The "DISTNAME" is now configured here too.


# c0ac91fe 19-Mar-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Make newvers.sh usable from other places...


# cf268280 08-Nov-1994 Poul-Henning Kamp <phk@FreeBSD.org>

And the tree is 2.1.0-Development, have fun guys... Who breaks it first ?


# b888f09c 17-Oct-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Bumped the version to 2.0.1-Development.


# 0a061aac 28-Sep-1994 Sean Eric Fagan <sef@FreeBSD.org>

Get rid of parentheses in version stuff. Use 2.0.0-Development instead.


# 9ae15916 10-Aug-1994 Garrett Wollman <wollman@FreeBSD.org>

Make it easier for programs to figure out what revision of FreeBSD they
are running under. Here's how to bootstrap (order is important):

1) Re-compile gcc (just the driver is all you need).
2) Re-compile libc.
3) Re-compile your kernel. Reboot.
4) cd /usr/src/include; make install

You can now detect the compilation environment with the following code:

#if !defined(__FreeBSD__)
#define __FreeBSD_version 199401
#elif __FreeBSD__ == 1
#define __FreeBSD_version 199405
#else
#include <osreldate.h>
#endif

You can determine the run-time environment by calling the new C library
function getosreldate(), or by examining the MIB variable kern.osreldate.

For the time being, the release date is defined as 199409, which we have
already established as our target.


# 3c4dd356 02-Aug-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# 26f9a767 25-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman


# df8bae1d 24-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Kernel Sources