From owner-freebsd-stable@FreeBSD.ORG Wed Dec 12 16:14:36 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7656E5E9; Wed, 12 Dec 2012 16:14:36 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1141A8FC16; Wed, 12 Dec 2012 16:14:35 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id l1so993309vba.13 for ; Wed, 12 Dec 2012 08:14:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=iWRNdWiX0Fkpyc+j8elyWwtgi3lPfi5KXEZeurgVTL8=; b=GZZJaGuVGbL92HNHwupXvi6xg3/WORE0UF2wy4EgWvOp9slUT+nVX3E+sVAo7n+wKV ody2ST75ESDNSNiIlOspj+kFvINxNNoMSg+GnQdFE+KwboFizvaAmCHwLbLz2Fq8aS2W AUbeVIHjqv3J8khj3yQXnVf9Ln7xpvalEAgq1Xviodc/SycW/3atySfsm2uLBE3jNZcM /O6w/Gk2sDk1sZmbzj2ZNser+iM2VTSzSqwFiLdjsC4Miwam0JK4O3tusgDwoCLaBom8 rZHUBY9IIfgcL1czVXWwRMQSoMrcXGwJDD5RTqSyfzcbHCsVMYHnESSyaFLKN1Xuic2l mF6A== MIME-Version: 1.0 Received: by 10.220.115.133 with SMTP id i5mr799596vcq.42.1355328875239; Wed, 12 Dec 2012 08:14:35 -0800 (PST) Received: by 10.58.209.163 with HTTP; Wed, 12 Dec 2012 08:14:35 -0800 (PST) Date: Wed, 12 Dec 2012 18:14:35 +0200 Message-ID: Subject: /usr/src/sys/conf/newvers.sh, SYSDIR set to wrong directory. From: Kimmo Paasiala To: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2012 16:14:36 -0000 Hello, My 9-STABLE buildworld broke in a very inexplicable way, I was getting an error on /usr/src/include/osreldate.h that I couldn't figure out until I started looking at the sys/conf/newvers.sh and what it does. It turned out that the thing that broke my buildworld was having .git directory at the root directory of the system because I recently started using GIT to track the configuration files. I added some debug echos to the newvers.sh and I found out it's setting SYSDIR to /bin/.. which in turn causes the newvers.sh to set the gitdir to /.git and that seems to break the logic in newvers.sh. Isn't SYSDIR supposed to be set to the sys -subdirectory of the source tree (/usr/src/sys default)? I'm guessing the reason the SYSDIR gets set to /bin/.. is the line in newvers.sh: SYSDIR=$(dirname $0)/.. $0 is actually /bin/sh and not the path to newver.sh because the newvers.sh is sourced by the Makefile in /usr/src/include instead of executing it: osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh ${.CURDIR}/../sys/sys/param.h \ ${.CURDIR}/Makefile @${ECHO} creating osreldate.h from newvers.sh @MAKE=${MAKE}; \ PARAMFILE=${.CURDIR}/../sys/sys/param.h; \ . ${.CURDIR}/../sys/conf/newvers.sh; \ Now the question is how to fix this? -Kimmo