Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145530 - Support for make.conf as a directory
Summary: Support for make.conf as a directory
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 15:02 UTC by Micheal Marineau (RETIRED)
Modified: 2008-03-03 22:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for make.conf.d (portage-make.conf.d.patch,630 bytes, patch)
2006-08-29 15:06 UTC, Micheal Marineau (RETIRED)
Details | Diff
make.conf.d patch rewrite (portage-make.conf-directory.patch,2.32 KB, patch)
2006-08-31 17:56 UTC, Micheal Marineau (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Micheal Marineau (RETIRED) gentoo-dev 2006-08-29 15:02:19 UTC
To make system administration it would be nice to support make.conf as a directory in addition to the normal flat file.

This is particularly useful when manageing a large number of hosts in an automated setup like cfengine where a base make.conf can be distributed across all hosts with host specific USE or CFLAGS in make.conf.d. 

Either make.conf.d or just a single make.conf directory similar to things in /etc/portage would work.
Comment 1 Micheal Marineau (RETIRED) gentoo-dev 2006-08-29 15:06:03 UTC
Created attachment 95420 [details, diff]
patch for make.conf.d

Here is a simple patch that adds support for make.conf.d by Eric Searcy (emsearcy@osuosl.org)
Comment 2 SpanKY gentoo-dev 2006-08-29 15:43:56 UTC
you're going to get people asking to not have files included that:
 - start with '.'
 - end in '~'
 - are binary in nature (.zip and crap)
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2006-08-29 15:52:14 UTC
Not sure how useful that is given that make.conf already supoprts a 'source' statement (only real difference being that 'source' doesn't support wildcards).
Comment 4 Micheal Marineau (RETIRED) gentoo-dev 2006-08-29 16:00:22 UTC
(In reply to comment #2)
> you're going to get people asking to not have files included that:
>  - start with '.'
>  - end in '~'
>  - are binary in nature (.zip and crap)
Well, the example patch only looks at *.conf so ending in ~ or .zip would be ignored. But yes, it is stupid and will include dot files. If there is interest in this either Eric or I will try to come up with a smarter patch.

(In reply to comment #3)
> Not sure how useful that is given that make.conf already supoprts a 'source'
> statement (only real difference being that 'source' doesn't support wildcards).
> 

That is the difference. We would happily have implemented this with a source line at the end of make.conf, but having a source line for every extra file would be almost as bad to maintain as just working with a single make.conf.
Comment 5 Micheal Marineau (RETIRED) gentoo-dev 2006-08-31 17:56:54 UTC
Created attachment 95612 [details, diff]
make.conf.d patch rewrite

I've rewritten the patch, moving the logic for this up to the correct place. This version is not horribly broken like the last one and also will ignore files begining with '.' and will still only include files ending in .conf.
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2006-09-18 02:22:27 UTC
Might as well be consistent with /etc/portage/ and allow make.conf to be a file or directory, just using everything within it.
Comment 7 Simon Stelling (RETIRED) gentoo-dev 2006-09-18 02:25:39 UTC
well, if/when you're going that way, please make sure you give the file a sane name and put it into /etc/portage, because that's really where it belongs.
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2006-09-19 04:53:40 UTC
If this gets implemented I agree with comments #6 and #7 for consistency and compability (and make.conf directly in /etc has bugged me for some time already).
Also in the patch I see that there is a requirement on filenames ending in ".conf", is there any reason for this?
Comment 9 Micheal Marineau (RETIRED) gentoo-dev 2006-09-19 07:07:53 UTC
(In reply to comment #8)
> Also in the patch I see that there is a requirement on filenames ending in
> ".conf", is there any reason for this?
> 

I required .conf mainly because we are using cfengine to push files into this directory and cfengine's default method for removing a file is to simply rename it to $file.cfdisabed or something silly like that rather than actually removing it. I suppose for upstream portage that restriction should be modified to simply exclude things that end in '~'.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2008-03-03 21:59:46 UTC
After thinking about this once more I think this is a WONTFIX, mainly due to the implications for external tools that currently use 'source /etc/make.conf' and getting wrong data if this feature is used. While updating them would be trivial in terms of code catching all of them and deploying the updates is a significant task.
(this might also be the reason why the shlex 'source' command doesn't support wildcards, as it'd be inconsistent with the sh version)

I'm also not really convinced about the benefit of this, most users won't have a use for this, and for large scale setups I'd assume that some preprocessing (e.g. replacing 'source /etc/portage/make.conf.d/* with multiple source statements) isn't out of scope.
Comment 11 Micheal Marineau (RETIRED) gentoo-dev 2008-03-03 22:10:51 UTC
(In reply to comment #10)
> After thinking about this once more I think this is a WONTFIX, mainly due to
> the implications for external tools that currently use 'source /etc/make.conf'
> and getting wrong data if this feature is used. While updating them would be
> trivial in terms of code catching all of them and deploying the updates is a
> significant task.
> (this might also be the reason why the shlex 'source' command doesn't support
> wildcards, as it'd be inconsistent with the sh version)
> 
> I'm also not really convinced about the benefit of this, most users won't have
> a use for this, and for large scale setups I'd assume that some preprocessing
> (e.g. replacing 'source /etc/portage/make.conf.d/* with multiple source
> statements) isn't out of scope.
> 

That's fine, in my case the need for this has long since been solved by a script that just does cat /etc/make.conf.d/* > /etc/make.conf which works perfectly well.