Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2012 23:24:56 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-toolchain@freebsd.org
Subject:   Re: [RFC] teach config(8) about KERNCONFDIR
Message-ID:  <CAGH67wSmcNqcH03v5mtyb9ev62y4xkdXLt13HjN7teXAZeFNnw@mail.gmail.com>
In-Reply-To: <CAGH67wSxUSdGSwyHx-TV=1iP4UgpCm8SN%2BHrLym_pAhsXbKk_Q@mail.gmail.com>
References:  <CAGH67wSxUSdGSwyHx-TV=1iP4UgpCm8SN%2BHrLym_pAhsXbKk_Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 5, 2012 at 9:23 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> (Sorry in advance for GMail mangling).
>
> I recently moved all of my svn trees to git and in order to ensure
> that my trees are in as pristine a state as possible I've started
> setting KERNCONFDIR=/root in /etc/src.conf and I specify KERNCONF?=
> <foo> <foo>-DEBUG. This works pretty well in a standard setup (when
> files are located in /sys/<arch>/conf, are standalone, etc). In order
> to eliminate duplication, I wrote <foo>-DEBUG to include <foo> and
> augment it a bit (enable WITNESS, INVARIANTS, etc). However, I
> discovered that if I do this, config fails to find the file because it
> only knows how to find 1) absolute paths, 2) relative paths to the obj
> dir, and 3) as a last ditch effort it tries to use ../../conf/
> (/sys/conf I believe for the generic KERNCONF directory). I added the
> patch below to teach config(8) about KERNCONFDIR for my own local use
> (and I think fixed a subtle bug with asprintf and free usage), but the
> support seems hacky. Another alternative (after doing a bit of
> research) that looks better is NetBSD's concept of prefix paths:

(for the archive's sake)
    I ran buildkernel again and the patch doesn't work as-is if it's
not defined in the environment as it isn't one of the variables that's
passed through by default via make to buildkernel when running
config(8), so one needs to modify Makefile.inc1 as well in order for
things to function properly as described with my patch.
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wSmcNqcH03v5mtyb9ev62y4xkdXLt13HjN7teXAZeFNnw>