Every time when updating apache2, it puts the default apache sample files in /var/www/localhost/htdocs.
This should not happen if there exist files in that directory.
Add the directory to your config_protect in your /etc/make.conf
I now realize that my question was unclear (even to me)..
What I am looking for is a way to tell portage to not write any files to a certain directory (/var/www/localhost/htdocs in this example).
CONFIG_PROTECT only protects from _over_writing, but not from writing new files.
Does anybody know a way how to do that or should I file a new portage-feature-request?
*** Bug 67622 has been marked as a duplicate of this bug. ***
Would a local USE flag be possible for this?
This solves the problem and works for me:
use nohtdocs && einfo "Disabling install of htdocs." && sed -i 's/install-htdocs\ //' Makefile.in
use noicons && einfo "Disabling install of icons." && sed -i 's/install-icons\ //' Makefile.in
use noerror && einfo "Disabling install of error messages." && sed -i 's/install-error\ //' Makefile.in
use nocgi && einfo "Disabling install of cgi-scripts." && sed -i 's/install-cgi\ //' Makefile.in
Except no* USE flags are frowned upon. This is a better solution, and solves the problem without requiring adding more USE flags:
if [ ! -d /var/www/localhost/ ]; then
... install localhost stuff ...
Other Apache Herd people, comments?
Also, we could define local USE flags like apache-htdocs, apache-icons, etc, although i think overcomplicates the situation some.
The check for the existing directory would be what the Makefile itself would do.
It wouldn't write any of the provided docs/icons/errormessages if those dirs already exist.
I just would prefer my solution because I then could install the error docs and icons, but not the cgi or htdocs..
Created attachment 42560 [details, diff]
What about something like the attached patch?
Please comment and correct.
I would apprechiate any feedback or proposed solution.
Created attachment 46776 [details, diff]
Alternative patch. Will disable install of documents if datadirs exist.
No possibility to override with use flags.
Does nobody see the need for this functionality?? It's quite important for me.
No, I dont like the idea of adding more useflags
Chuck, have a look at the second patch. I am not pleading for more useflags.
I just want to make clear that I really think this is a major flaw during
an upgrade of apache. It should not write into my htdocs directory!
When we refresh the Apache packages on 8th Jan, we'll be introducing some changes which (fingers crossed) will fix this one.
gentoo-webroot-default is in portage and used by currently hard-masked apache 1.3.33-r1 and 2.0.52-r3
please unmask and test
Ok. Tried it.
It solves this bug here, that's correct. Some issues with the new layout/ebuilds:
- gentoo-apache-2.0.52-r3.tar.bz2 has wrong MD5 sum
- the new apache starts ok, but segfaults if a client connects
([Sun Jan 30 11:53:07 2005] [notice] child pid 19402 exit signal Segmentation fault (11))
Should I file separate bugs for these?
the gentoo-webroot tarballs change without revision bumps as long as they are hard masked, so you need to refetch this tarball
please open a seperate bug for the children segfaulting
No response, closing.