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
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
(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
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)
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
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)
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
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!)
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.
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
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
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.
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.
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
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.
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
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
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".
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).
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@
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
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
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.
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. :)
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
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.)
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!
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.