From owner-freebsd-hackers@freebsd.org Sun Feb 26 12:25:59 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F73ECEC560 for ; Sun, 26 Feb 2017 12:25:59 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82201BFE for ; Sun, 26 Feb 2017 12:25:57 +0000 (UTC) (envelope-from freebsd-hackers@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Sun, 26 Feb 2017 13:25:49 +0100 id 00F4BCCC.58B2C94D.00012E0C Date: Sun, 26 Feb 2017 13:25:48 +0100 From: Milan Obuch To: freebsd-hackers@freebsd.org Subject: kern.ostype - where gets its value? Message-ID: <20170226132548.69223dcd@zeta.dino.sk> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; i386-portbld-freebsd10.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 12:25:59 -0000 Hi, I am building FreeBSD from source all the time, and recently I realised there is something I do not fully understand. I use 'svn update' to fetch current source tree and for various devices I share this tree via nfs. It is at least convenient for smaller devices like Orange Pi or Pine64, svn is run once and used on more devices. This has one effect I do not like - kernel compiled on machine used for 'svn update' gets full version information including svn revision number, as in # uname -v FreeBSD 10.3-STABLE #0 r313019: Wed Feb 1 07:07:02 CET 2017 root@tiny.dino.sk:/usr/obj/usr/src/sys/TINY (line wrapped) versus missing revision as in # uname -v FreeBSD 12.0-CURRENT #0: Thu Feb 2 05:00:09 CET 2017 root@tiny.dino.sk:/usr/obj/usr/src/sys/ALLWINNER_ONE (again, line wrapped by mailer, by these are just an examples). =46rom my experience it looks like this problem is caused by svn not being able to be run on nfs mounted directory, no matter the architecture - today I tried with both server and client running 10.3-STABLE on i386, svn just fails. So I think this is root cause for missing svn revision number, buildkernel process somehow uses svn to fetch svn revision number, fails, and then just omits it. If I undestand it right, this information is put into /sys/kern/kern_mib.c file's kern.version sysctl, maybe via some include or some generated .c file is used for it. Could someone point me to the right direction how is this done? I would like to find at least some workaround for that... Regards, Milan