Commit Graph

111 Commits

Author SHA1 Message Date
gjb
2fecc5b1b4 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
2013-09-24 16:59:28 +00:00
gjb
2b65ca59ac Update head/ to -ALPHA2 status.
Approved by:	re (implicit)
2013-09-16 19:29:18 +00:00
gjb
311592946b Update head/ to -ALPHA1 status, as part of the 10.0-RELEASE
cycle.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-09-12 17:51:18 +00:00
gjb
3a574dd0d6 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
2013-08-11 13:57:14 +00:00
gjb
962456a2ea Fix a typo. The script should run /usr/bin/svnliteversion instead of
/usr/bin/svnversion in the affected section.

Reported by:	lev, Dan Mack
2013-08-10 18:23:18 +00:00
gjb
a9f5589a92 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
2013-08-08 15:59:00 +00:00
gjb
a35ede59d8 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)
2013-08-05 10:26:42 +00:00
avg
de45286f85 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
2013-07-24 09:06:50 +00:00
avg
23dd88269d newvers.sh: fix the fallback case of git-svn detection
MFC after:	5 days
Sponsored by:	HybridCluster
2013-07-24 09:05:04 +00:00
gjb
4acdfaf6db - 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)
2013-07-02 10:36:57 +00:00
avg
8e238c660c 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
2013-02-02 11:58:35 +00:00
rpaulo
082ae1b42f 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.
2012-09-22 07:44:36 +00:00
rpaulo
f520f7cfa4 Add Perforce support. 2012-09-16 06:01:34 +00:00
avg
4855527852 newvers.sh: unbreak git/git-svn support
MFC after:	2 weeks
2012-02-12 14:54:19 +00:00
jhb
031d50acb2 Remove a bit of debugging that accidentally crept in earlier. 2011-11-29 21:28:48 +00:00
dougb
c8d6190f0f 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!)
2011-10-27 20:44:28 +00:00
kensmith
b7aac9c4e0 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)
2011-09-26 02:27:04 +00:00
kensmith
36eedab3fc Ready for 9.0-BETA2.
Approved by:	re (implicit)
2011-08-28 19:38:04 +00:00
kensmith
890f4441b4 Looks like we're ready for 9.0-BETA1 builds.
Approved by:	re (implicit)
2011-07-26 04:00:00 +00:00
ru
d031d28b6b expr -> sh arithmetic expansion 2011-05-23 19:57:12 +00:00
imp
546a45b306 Clean up stray line in 213077 2010-09-23 17:29:59 +00:00
imp
059b35ce72 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.
2010-09-23 17:12:47 +00:00
thompsa
d5c71e163f Fix the path to the sys dir when cross compiling after r209510.
Reviewed by:	imp
2010-09-21 07:03:53 +00:00
dougb
e9f05740bf Revert to r197433, the more recent change doesn't work for the common
case, and has not been well received.
2010-03-10 01:00:37 +00:00
obrien
6275a64fe8 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/".
2010-03-07 10:08:00 +00:00
mlaier
6d2629a936 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
2009-09-23 14:48:13 +00:00
mlaier
d08e683d93 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
2009-09-19 21:46:12 +00:00
dougb
1849ab05a0 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.
2009-08-23 05:45:38 +00:00
kensmith
7b24458561 Make head 9.0-CURRENT in preparation for lifting code freeze.
Approved by:	re (implicit)
2009-08-22 23:44:37 +00:00
kensmith
86904ca463 Prepare for the 8.0-BETA2 builds.
Approved by:	re (implicit)
2009-07-15 17:29:05 +00:00
kensmith
c59ed917ab Bump for BETA1.
Approved by:	re (implicit)
2009-07-07 00:02:26 +00:00
bz
ccb540b1ee 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.
2009-03-28 23:17:18 +00:00
thompsa
e9f20885b0 Dont assume $MACHINE is set, this breaks for regular builds.
Reported by:	pho
2009-01-20 21:37:41 +00:00
thompsa
7d9738a7b8 Also strip the machine arch from SRCDIR in case it is a cross build so
svnversion works.
2009-01-18 23:21:04 +00:00
bz
536acf3aa2 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
2008-10-03 10:08:36 +00:00
peter
41bed7d063 Reduce the impact of svnversion. Just scan the src/sys tree, not all of
src.
2008-10-01 22:52:20 +00:00
dougb
67437d52b5 Change the character prefixed to the svn version to "r" since that seems
to be how they are commonly referred to.
2008-07-13 20:08:38 +00:00
dougb
1b7168ad86 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.
2008-06-08 19:46:23 +00:00
phk
b7b2e13417 If we can find it, include SVN version number in kernel version strings.
See also: http://www.bikeshed.org/
2008-06-07 09:49:57 +00:00
kensmith
c80a7cd238 To honor the birth of RELENG_7 bump HEAD to 8.0-CURRENT.
Approved by:	re (implicit)
2007-10-11 04:28:08 +00:00
cperciva
53f5361a40 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
2005-08-19 01:49:15 +00:00
scottl
cab029400d Make the RELENG_6 branch operation official by moving HEAD to 7.0-CURRENT.
Approved by: re
2005-07-11 08:34:49 +00:00
jhb
2523f63590 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
2005-07-01 15:43:09 +00:00
ru
6f0bb99740 If USER of HOSTNAME is set to an empty value, use the fallback value.
Submitted by:	marck
2005-01-15 13:25:41 +00:00
trhodes
484b5dcecd Give up on trying to please everyone and restore 1.64 with regards to
dealing with sudo users.
2005-01-14 18:13:56 +00:00
trhodes
0361a4b247 Improve previous commit with regards to the user check.
Submitted by:	nectar
2005-01-13 00:21:38 +00:00
trhodes
197ad7c3b9 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
2005-01-12 21:28:25 +00:00
ru
a4752ef7b0 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".
2004-09-17 09:17:33 +00:00
scottl
02e483dd36 HEAD is now 6-CURRENT 2004-08-18 00:21:12 +00:00
ps
268ac8d0b8 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00