Port installation crashes in post-extract with an out-of-tree configuration file that includes an in-tree configuration file. Fix: Kernel config step should be executed in the in-tree config directory (KRNLCONFDIR) with an absolute path to the desired config file, as is done in /usr/src/Makefile.inc1 circa line 809 (stage 1: configuring the kernel). Attached patch applied and tested to compile. Software appears to function properly. Patch attached with submission follows: How-To-Repeat: # mkdir /root/CONFIG # echo "include GENERIC" > /root/CONFIG/TEST # make -C /usr/ports/net/openafs KERNCONFDIR=/root/CONFIG KERNCONF=TEST post-extract /bin/mkdir -p /usr/obj/usr/ports/net/openafs/work/conf cd /root/CONFIG && /usr/sbin/config -d /usr/obj/usr/ports/net/openafs/work/conf TEST >/dev/null config: TEST:2: cannot open included file *** Error code 1 Stop in /usr/ports/net/openafs.
Maintainer of net/openafs, Please note that PR ports/164242 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164242 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
On Tue, 17 Jan 2012, Edwin Groothuis wrote: > Maintainer of net/openafs, > > Please note that PR ports/164242 has just been submitted. > > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. > > The full text of the PR can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164242 The bug is real and I believe the diagnosis basically correct, but the proposed fix is incomplete in that it does not fully solve the set of issues involving kernel configuration files and source trees living at non-default locations (I have upstream bug #130310 to remind me to look at these). I would like to spend some time going through Makefile.inc1 (and possibly elsewhere) to get a better sense of what is actually needed. For example, we should probably be using some flavor of KERNSRCDIR which is related to SYSDIR. I haven't had a chance to sit down and build a picture of how these pieces all fit together. Alternately, I could backport the patches from upstream's git master to use bsd.kmod.mk for the kernel build, which eliminates most of these issues. But I think it is probably simpler to not have to maintain those patches until there is a 1.8-series release, which I expect will be several years. -Ben Kaduk
State Changed From-To: feedback->suspended Maintainer is looking over possible approaches to fixing the problem.
State Changed From-To: suspended->closed feedback timeout.
State Changed From-To: closed->open The issue is still present; I have it on my TODO list.
Responsible Changed From-To: freebsd-ports-bugs->bjk The issue is still present; I have it on my TODO list.
In revision r263429 I added a "-I" option to config(8), which works just like cc(1)'s -I option. This fixes the general case of using kernel config files in non-default locations that include other config files. You should be able to write a patch for net/openafs's Makefile that passes "-I ${SRC_BASE}/sys/${ARCH}/conf" to config(8) to fix this bug.