Bug 31304

Summary: [patch] fix crunchgen(1) to work with more contrib-kind of sources
Product: Base System Reporter: gunther <gunther>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description gunther 2001-10-15 23:00:01 UTC
Crunchgen does not currently crunch all FreeBSD src programs.
This bug report contains a patch to make it crunch more of them.
For example, none of the bind-8 related programs can be crunched
without severe headache. Take for example usr.bin/dnsquery. There
is only a short Makefile that includes another Makefile via a
relative path:

.include "../../usr.sbin/named/Makefile.inc"

The problem is that when crunchgen extracts the make parameters,
it does not actually cd into "usr.bin/dnsquery" so that the 
relative path makes no sense. 

The attached patches fix this problem as follows:

- always cd into the srcdir when running the generated makefile
  extracting make variables

- in order for this to be done, change some occurrences of 
  p->srcdir to p->realsrcdir

The fix is minor thanks to someone having already provided for
p->realsrcdir! This fix should complete what was begun then.

Note: I'm not 100% sure this fix will not break certain 
crunchgen.conf logics that relied on the fact that the 
generated makefile for extracting make variables is run
in crunchgen.conf's directory instead of the srcdir.
However, I can see no rationale for why such logic needs
to be.
Comment 1 joe freebsd_committer freebsd_triage 2001-10-16 10:54:38 UTC
Responsible Changed
From-To: freebsd-bugs->joe

I'll take a look.  Thanks.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2006-04-17 20:43:17 UTC
State Changed
From-To: open->feedback

Did this patch ever get incorporated? 


Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-04-17 20:43:17 UTC
Responsible Changed
From-To: joe->linimon

joe has returned his bit for safekeeping due to lack of time.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2007-05-06 01:42:41 UTC
State Changed
From-To: feedback->suspended

No one ever responded to my request for status about this PR, so mark 
it as suspended. 


Comment 5 Mark Linimon freebsd_committer freebsd_triage 2007-05-06 01:42:41 UTC
Responsible Changed
From-To: linimon->freebsd-bugs
Comment 6 Bruce Cran freebsd_committer freebsd_triage 2011-02-21 09:48:20 UTC
State Changed
From-To: suspended->closed

This appears to have been fixed with r113855 and r113886.