Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247709 - www-apps/trac - add IUSE=apache2
Summary: www-apps/trac - add IUSE=apache2
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 13:21 UTC by kavol
Modified: 2009-04-08 16:09 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2008-11-20 13:21:29 UTC
Hi.

Reading the post install instructions:

Apache 2 and mod_python users: you have to manually emerge
www-apache/mod_python. See http://trac.edgewall.org/wiki/TracModPython

... but there is the apache2 USE flag which adds support for Apache2 -
I'd suggest to depend on www-apache/mod_python if this flag is set, so that mod_python gets installed automatically. Otherwise, if you have to install mod_python manually, you also have to remember to unistall it manually after you unistall trac, instead of the simple unused dependencies cleanup.

Of course, it may be possible to run trac with apache and without mod_python, but in that case, adding a line to /etc/portage/package.use to disable apache2 flag for trac (if not disabled globally) seems to me a much more viable way than to hunt the "world" set for packages that are no longer needed.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-21 01:06:53 UTC
Your reasoning is quite difficult to follow - wouldn't you also need to stop the apache daemons when you stop using and have uninstalled www-apps/trac? Setting USE flag determined RDEPENDs as convenience is normally discouraged.
Comment 2 kavol 2008-11-21 08:57:28 UTC
(In reply to comment #1)
> Your reasoning is quite difficult to follow - wouldn't you also need to stop
> the apache daemons when you stop using and have uninstalled www-apps/trac?

yes, Apache would need reload then but this should be handled by the module installation/uninstallation procedure ... the installation tells me to add "-D PYTHON" to APACHE2_OPTS, so the uninstallation should tell me to remove it etc.

the point is, when I want to deal with one package that (potentially) depends on another one, the dependency should get handled automatically, so that I do not have to care about it - otherwise I am losing one of the biggest advantages of the Gentoo packaging system over not using packaging system at all

> Setting USE flag determined RDEPENDs as convenience is normally discouraged.

I do not understand this policy, and I am pretty sure that a number of ebuilds already violate it ...


another thing is, that if this flag is set, the ebuild should give some hint how to configure apache, e.g. einfo "Please read /usr/share/doc/trac*/Apache-Gentoo" (and install that file!), because, from what I've read, it looks like there are some options different - but I have to search for that on the web, as currently none of the installed docs deals with getting it working using apache (or my grep is broken ...)

(wishing that the system could be able to get some trac instance running just after webapp-config -I trac ... and restarting apache, would be too much, right?)
Comment 3 Gunnar Wrobel (RETIRED) gentoo-dev 2008-12-07 07:52:16 UTC
Please provide a patch demonstrating what you which to do. I'm not certain if it will really work though.

Marking as NEEDINFO, will be reopened once patch is available.
Comment 4 kavol 2009-01-18 21:17:43 UTC
(In reply to comment #3)
> Please provide a patch demonstrating what you which to do. I'm not certain if
> it will really work though.
> 
> Marking as NEEDINFO, will be reopened once patch is available.

--- trac-0.11.2.ebuild  2008-11-16 19:09:30.000000000 +0100
+++ trac-0.11.2-r1.ebuild       2009-01-18 22:14:51.000000000 +0100
@@ -13,7 +13,7 @@
 LICENSE="trac"
 SRC_URI="http://ftp.edgewall.com/pub/trac/${MY_P}.tar.gz"

-IUSE="cgi fastcgi mysql postgres sqlite subversion"
+IUSE="apache2 cgi fastcgi mysql postgres sqlite subversion"

 KEYWORDS="amd64 ppc ~ppc64 ~sparc x86"

@@ -32,6 +32,9 @@
        dev-python/pygments
        >=dev-python/docutils-0.3.9
        dev-python/pytz
+       apache2? (
+               www-apache/mod_python
+       )
        cgi? (
                virtual/httpd-cgi
        )
@@ -150,4 +153,8 @@
        done

        webapp_src_install
+
+       ewarn "The provided installation scripts are not sufficient."
+       ewarn "You need to perform some additional manual steps to run trac sites."
+       ewarn "Please see http://en.gentoo-wiki.com/wiki/Trac"
 }
Comment 5 kavol 2009-01-18 21:19:36 UTC
... oh and it would be nice to provide also offline copy of the referenced document (as there may be local setups without Internet connection)

(and it would be also nice to extend the apache2 use flag usage further to fix bug #247896 and the other issues ;-))
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2009-01-27 13:42:36 UTC
As I read http://trac.edgewall.org/wiki/TracInstall they suggest mod_wsgi instead of mod_apache. So I think at least it should be added as alternative.

Also your patch does not handles bug #247896. Probably adding trac user to apache group or reverse is overkill. Just consider: if user installed with apache2 USE flag he/she does not want standalone trac server and thus trac user is not required and permissions should be set to apache:apache.

Also we don't like URL's on wiki in our packages. It's much better to add gentoo-apache.readme or something like that.

That's said, could you finish this work? I can help you with suggestions (you are welcome to ping me on irc or mail me) but I'm not sure I'll get to this work in nearest future... And please do not post patches as a comments, better attach, since this'll make easier for us to us them. Thanks for raising this issue.
Comment 7 Benedikt Böhm (RETIRED) gentoo-dev 2009-04-08 16:09:36 UTC
you can run trac with mod_python, mod_wsgi, mod_fcgi, mod_fcgid, mod_proxy and probably other configurations. it is not the ebuilds job to decide which setup you want to do.