src.cfg or make.cfg

Hello,

I'm new here and also quite new to FreeBSD. However, I come from a strong Gentoo + Slackware background, therefore somethings in FreeBSD aren't so new to me. I understand the portage system in Gentoo and I know it comes from the FreeBSD ports system, I also understand how the Gentoo make.conf works.

But I would like to know the differences between the file src.cfg and make.conf. I've read in some forums and articles that src.cfg is used exclusively to deny features on building software, like denying IPV6 flags in a server where there will be no IPV6 use.

At the same time I see in places like here (URL in the end), the same thing but in /etc/make.conf instead of /etc/src.cfg: http://forums.freebsd.org/showthread.php?t=4458

I also cannot find the file /etc/src.cfg in my system (FreeBSD 8.1), plus there is not a man page for src.cfg, therefore I suspect src.cfg is deprecated, am I wrong? Should I ignore the src.cfg and do everything in /etc/make.conf?
 
And a bit of history, if I'm not mistaken src.conf was introduced with 7.0. Versions before that used make.conf for both the base and the ports. The switches where slightly different but you may come across the 'old' way when you're searching on the internet.
 
Thanks DutchDaemon and SirDice.

Now, let me know if I got it right; in the make.conf I may disable compiling flags of any specific port, like "PPP_NO_RADIUS" (do not build with RADIUS support), where PPP_NO_RADIUS says "when compiling the PPP port, do it without RADIUS support", but then if I put "WITHOUT_PPP" in /etc/src.conf everything in the whole system will be compiled without PPP support, is that right? (therefore no need to use WITHOUT_PPP in make.conf)

I mean, if there is a system FEATURE that I explicitly do not want to ANY ports, then I use src.conf. For specific ports only, make.conf.

Please correct me if I'm having a wrong view of this point.:stud

Thanks again!
 
one more thing: Can I just ignore src.conf and just use make.conf? like put "WITHOUT_INET6" into make.conf ?
 
sparc86 said:
I mean, if there is a system FEATURE that I explicitly do not want to ANY ports, then I use src.conf. For specific ports only, make.conf.
Not exactly. Definitions in src.conf aren't imported by ports at all. They're only used when you build your system from /usr/src. If you build your system with features disabled in src.conf, it may affect how ports get compiled later. Conversely, if you have a lot of ports already compiled and installed, and you rebuild your system with features disabled, some ports may stop functioning because they were built on a system with features that are now missing.


sparc86 said:
one more thing: Can I just ignore src.conf and just use make.conf? like put "WITHOUT_INET6" into make.conf ?
That will probably work, but then again, you don't need to use /etc/rc.conf either - you could just throw everything into /etc/rc.
 
So the src.conf is related ONLY and directly to kernel features, while make.conf is related to the ports, is it?
 
sparc86 said:
So the src.conf is related ONLY and directly to kernel features, while make.conf is related to the ports, is it?
src.conf affects kernel and base system builds.

make.conf affects kernel, base system, and port builds.
 
Yeah, my distinction in post #2 was a bit black and white; src.conf defines what to build from the source tree (/usr/src/), and make.conf defines how to build source in general (with some added functionality for port builds in the form of .if statements). We should really have a separate ports.conf to really separate these build processes.
 
Thanks everyone!

It's interesting to notice how FreeBSD is not really "easy", even considering my past experience with Gentoo and Slackware; there are a bunch of stuff in FreeBSD which works differently.
But it's ok, I'm happy to learn about unixes in general and despites the "rocks on the way", I might say that I'm enjoying the FreeBSD style and the freedom it gives me to do stuff.
 
Back
Top