Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 174546 - Review Request: trac
Summary: Review Request: trac
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: David Lawrence
URL: http://www.edgewall.com/trac
Whiteboard:
Depends On: 174529
Blocks: FE-ACCEPT
TreeView+ depends on / blocked
 
Reported: 2005-11-29 21:37 UTC by Joost Soeterbroek
Modified: 2013-01-10 09:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-16 21:05:48 UTC
Type: ---
Embargoed:
tcallawa: fedora-cvs+


Attachments (Terms of Use)
Simplified httpd conf snippet (426 bytes, text/plain)
2006-01-09 19:48 UTC, Ville Skyttä
no flags Details
Simplified httpd conf snippet if trac.fcgi is not shipped (372 bytes, text/plain)
2006-01-09 19:50 UTC, Ville Skyttä
no flags Details
Really remove trac.fcgi, cleanups (1.10 KB, patch)
2006-01-10 19:28 UTC, Ville Skyttä
no flags Details | Diff

Description Joost Soeterbroek 2005-11-29 21:37:08 UTC
Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9-1.src.rpm 
Description:
Trac is an enhanced wiki and issue tracking system for software development projects.

Comment 1 Ville Skyttä 2005-12-02 10:51:05 UTC
0.9.1 is out, fixes a SQL injection vulnerability. 
http://seclists.org/lists/bugtraq/2005/Dec/0014.html

Comment 2 Joost Soeterbroek 2005-12-03 10:00:16 UTC
(In reply to comment #1)
> 0.9.1 is out, fixes a SQL injection vulnerability. 
> http://seclists.org/lists/bugtraq/2005/Dec/0014.html

Spec file and SRPM updated to 0.9.1:

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.1-1.src.rpm 

Comment 3 Joost Soeterbroek 2005-12-06 12:12:58 UTC
Spec file and SRPM updated to 0.9.2:

- fixes SQL Injection Vulnerability in ticket search module.
- fixes broken ticket email notifications.

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.2-1.src.rpm 



Comment 4 Joost Soeterbroek 2006-01-01 12:47:17 UTC
Spec file and SRPM updated (0.9.2-2):

- added /etc/init.d/tracd
- added /etc/sysconfig/tracd

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.2-2.src.rpm 

Comment 5 Ville Skyttä 2006-01-05 22:01:15 UTC
Partial review:

I don't think it's acceptable to run tracd as root.  Please create a dedicated
restricted user account for it in case you wish to ship it configured ready to run.

tracd shouldn't be set to autostart by default.  Replacing "2345" by "-" in the
init script's chkconfig line fixes it.

tracd init script lacks reload, status, force-reload, and
condrestart/try-restart actions.  See for example
/usr/share/fedora/template.init from fedora-rpmdevtools.

--daemonize shouldn't probably be in /etc/sysconfig/tracd but rather hardcoded
in the tracd init file.

trac.cgi needs configuration, suggesting something like this in
/etc/httpd/conf.d/trac.conf:

# Replace /path/to/trac_env with your trac root below, and uncomment the
# SetHandler, PythonHandler, PythonOption and SetEnv lines.
<Location /cgi-bin/trac.cgi>
    # mod_python:
    <IfModule mod_python.c>
        #SetHandler mod_python
        #PythonHandler trac.web.modpython_frontend
        #PythonOption TracEnv /path/to/trac_env
    </IfModule>
    # normal CGI script:
    <IfModule !mod_python.c>
        #SetEnv TRAC_ENV /path/to/trac_env
    </IfModule>
</Location>


Comment 6 Ville Skyttä 2006-01-05 22:14:36 UTC
Actually, I'd recommend removing the tracd init script and sysconfig snippet and
maybe consider not distributing tracd at all.  I think that it just causes
packaging problems and one daemon that doesn't really add any value; the CGI
script should be just fine.

Comment 7 Joost Soeterbroek 2006-01-08 18:48:04 UTC
Spec file and SRPM updated (0.9.3-1):

- 0.9.3 release
- removed tracd (see comment #6)
- added trac.conf for httpd

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.3-1.src.rpm 



Comment 8 Ville Skyttä 2006-01-09 19:48:54 UTC
Created attachment 122963 [details]
Simplified httpd conf snippet

Hm, tracd has not been removed like the changelog says, but just the init
script etc.  Was that intentional?  No objections, just curious.

The "find trac -type f -name test.py | xargs chmod -x" at end of %install seems
to chmod uninstalled files.  I guess %{python_sitelib}/trac/test.py doesn't
need to be installed at all...

/usr/share/trac/htdocs/js/wikitoolbar.js shouldn't need executable permissions.


There's quite a lot of commented out stuff in the specfile that would be better
off just be removed.  The TODO block at the top is stale too.

Attached is a simplified httpd conf snippet for trac.*cgi.  I don't know if
shipping both the *.cgi and the *.fcgi brings anything useful to the table
especially as mod_python can be used with the *.cgi; if not, maybe remove the
*.fcgi?  If done, the httpd conf snippet could be simplified further, eg. by
removing <LocationMatch>, and moving <IfModule> and SetEnv inside <Location>.

Comment 9 Ville Skyttä 2006-01-09 19:50:51 UTC
Created attachment 122964 [details]
Simplified httpd conf snippet if trac.fcgi is not shipped

Comment 10 Joost Soeterbroek 2006-01-09 21:07:54 UTC
Spec file and SRPM updated (0.9.3-1):

- all tracd removed
- removed trac/test.py
- removed commented out stuff
- change perms on htdocs/js/wikitoolbar.js
- added simplified trac.conf (from attachment id=122964)

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.3-1.src.rpm 

Comment 11 Ville Skyttä 2006-01-09 21:24:34 UTC
It seems you took the simplified config that was meant to be applied if
trac.fcgi is removed from the package, but it's still there.  If you think the
fcgi version adds some value, grab the config from comment 9 instead.  (But I
tend to think trac.fcgi could be just dropped.)

tracd man page is still installed.

Minor nit: you'll probably want to say %%{python_sitelib} with two '%'s in
%changelog in order to prevent it from expanding.

Another nit: please bump the release tag every time you make changes to it, that
makes it much easier for me to track changes between revisions during review.

Comment 12 Ville Skyttä 2006-01-09 21:25:45 UTC
(In reply to comment #11)
> It seems you took the simplified config that was meant to be applied if
> trac.fcgi is removed from the package, but it's still there.  If you think the
> fcgi version adds some value, grab the config from comment 9 instead.

Aargh, not comment 9, but comment 8.


Comment 13 Joost Soeterbroek 2006-01-10 16:50:24 UTC
Spec file and SRPM updated (0.9.3-2):

- removed trac.fcgi (comment #11)
- removed tracd man page
- added extra % to pythonlib in changelog

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.3-2.src.rpm 

Comment 14 Ville Skyttä 2006-01-10 19:28:53 UTC
Created attachment 123008 [details]
Really remove trac.fcgi, cleanups

trac.fcgi was not removed, but just moved to /usr/share/trac/cgi-bin/trac.fcgi

The attached patch fixes it and does some minor specfile cleanups.  Approved
after applying it.

Comment 15 Joost Soeterbroek 2006-01-10 20:30:50 UTC
- Applied patch (id=123008)
- rpmlint clean
- imported 
- built successfully in plague (devel)

Comment 16 Bernhard Weisshuhn 2006-01-16 11:31:43 UTC
I for one was bitten by the removal of the fastcgi program. I fail to understand
the motivation for its removal. Not everybody uses mod_python, there are a *lot*
of folks running it as fastcgi under lighttpd. It's not that fedora ships - for
example - only apache modules that are used in the default configuration.

Does it really hurt that much to ship cgi-bin/trac.fcgi?

btw. I also found it very handy to have tracd just for the occasional debugging.
Also it is used in the documentation/howto.

Leave out the configfile if you must, but please can we have the fcgi program back?

Comment 17 Joost Soeterbroek 2006-01-16 15:44:45 UTC
Spec file and SRPM updated (0.9.3-3):

- re-added trac.fcgi and tracd (comment #16)
- re-added tracd man page

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.3-3.src.rpm 

Please check if this works for you (bkw). If yes, I will push for
new build.

Comment 18 Bernhard Weisshuhn 2006-01-16 15:49:39 UTC
(In reply to comment #17)

> Please check if this works for you (bkw). If yes, I will push for
> new build.

Works like a charm. Thanks a bunch, that was *quick*!

Comment 19 Ville Skyttä 2006-01-16 19:01:06 UTC
Again, if you include trac.fgci, also take care of it in trac.conf (see comments
8 and 11).  Please include something like this (note also the "better" commented
out default paths) as trac.conf in that case:


# Replace all occurrences of /srv/trac with your trac root below
# and uncomment the respective SetEnv and PythonOption directives.
<LocationMatch /cgi-bin/trac\.f?cgi>
    #SetEnv TRAC_ENV /srv/trac
</LocationMatch>
<IfModule mod_python.c>
<Location /cgi-bin/trac.cgi>
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    #PythonOption TracEnv /srv/trac
</Location>
</IfModule>


Comment 20 Joost Soeterbroek 2006-01-16 20:01:03 UTC
Spec file and SRPM updated (0.9.3-4):

- updated trac.conf to allow for trac.*cgi

Spec Name or Url: http://www.soeterbroek.com/linux/fedora/extras/trac/trac.spec
SRPM Name or Url:
http://www.soeterbroek.com/linux/fedora/extras/trac/trac-0.9.3-4.src.rpm 

Comment 21 Ville Skyttä 2006-01-16 20:55:09 UTC
Looks good to me.

Comment 22 Thomas Vander Stichele 2006-01-18 12:37:48 UTC
I was surprised that tracd was removed from the package.  It is definately
confusing for end users who get pointed to it, and tracd is definately easier to
configure than through apache (I've set up a lot of tracs at work, and I still
get thrown by the various complexities added through apache).

Could the removal of tracd be reconsidered ?

Comment 23 Thomas Vander Stichele 2006-01-18 12:57:08 UTC
Also, I added this line locally to trac.conf:

Alias /trac/ "/usr/share/trac/htdocs/"


Without it, my trac is missing all of the UI (images, CSS, ...).  I personally have

htdocs_location = /trac/

in all my trac.ini files.  How did you have it configured to work out of the box ?

Comment 24 Joost Soeterbroek 2006-01-18 13:06:10 UTC
(In reply to comment #22) 
> Could the removal of tracd be reconsidered ?

yes, tracd has been re-added in 0.9.3-4 by user demand.



Comment 25 Ville Skyttä 2006-01-18 19:36:22 UTC
(In reply to comment #23)
> How did you have it configured to work out of the box ?

Obviously it's not really doable completely out of the box especially with
pre-existing trac envs because of varying paths to them, but for example like
this (yes, ugly, but to demonstrate) works with very minimal configuration:

svnadmin create /tmp/svn
trac-admin /tmp/trac initenv # accept all defaults except set svn dir
tracd --port 8000 /tmp/trac

...and with httpd, just follow the instructions in /etc/httpd/conf.d/trac.conf 
and ensure that apache has enough permissions to the trac env.  No problems with
images, css etc with either tracd or httpd.  trac.ini not touched at all, it's
the one that trac-admin creates out of the box.  htdocs_location is not in that
file at all.

Comment 26 Joost Soeterbroek 2006-01-18 20:03:39 UTC
(In reply to comment #25)

Also, see http://projects.edgewall.com/trac/wiki/TracOnFedoraCore

> (In reply to comment #23)
> > How did you have it configured to work out of the box ?
> 
> Obviously it's not really doable completely out of the box especially with
> pre-existing trac envs because of varying paths to them, but for example like
> this (yes, ugly, but to demonstrate) works with very minimal configuration:
> 
> svnadmin create /tmp/svn
> trac-admin /tmp/trac initenv # accept all defaults except set svn dir
> tracd --port 8000 /tmp/trac
> 
> ...and with httpd, just follow the instructions in /etc/httpd/conf.d/trac.conf 
> and ensure that apache has enough permissions to the trac env.  No problems with
> images, css etc with either tracd or httpd.  trac.ini not touched at all, it's
> the one that trac-admin creates out of the box.  htdocs_location is not in that
> file at all.



Comment 27 Joshua Daniel Franklin 2006-04-26 23:19:07 UTC
Could you add a directory to store the project in the RPM during the next bump?
The trac wiki you reference suggests /var/trac and that it probably needs to be
owned by apache. Not everyone wants to store their project in /tmp. :)

Comment 28 Ville Skyttä 2006-04-27 06:34:19 UTC
FWIW, the default httpd.conf snippet in the package suggests /srv/trac and the
tools default to /srv/svn for the subversion location, maybe the Wiki should be
just changed to reflect those locations instead.

Comment 29 Joost Soeterbroek 2006-04-27 18:08:53 UTC
re: comment #27:
I am unsure what you mean by your comment. Please elaborate. 

re: comment #28:
Changed all occurences of /svn to /srv in Trac on Fedora wiki:
http://projects.edgewall.com/trac/wiki/TracOnFedoraCore page.

Comment 30 Joshua Daniel Franklin 2006-04-28 03:34:18 UTC
Well, the wiki may be the place to make this change,
but its example currently has:

sudo trac-admin /srv/trac/foobar initenv

This will fail unless /srv/trac already exists, so it could be
included in the rpm. Alternatively the wiki could be updated
to do just

sudo trac-admin /srv/trac initenv

though first-time users might be confused that they are 
creating a trac environment actually named "trac".

Comment 31 Jesse Keating 2007-06-01 21:05:08 UTC
Package Change Request
======================
Package Name: trac
New Branches: EL-4 EL-5

Current owner approved me to own package for EPEL

From: 
"Jeffrey C. Ollie" <jeff>
  To: 
Jesse Keating <jkeating>
  Date: 
Today 16:29:32
   
Message was signed with unknown key 0xAED93BC72C884111.
The validity of the signature cannot be verified.
Status: No public key to verify the signature
  On Fri, 2007-06-01 at 15:17 -0400, Jesse Keating wrote:
> I'd like clearsilver in EPEL, so that I can use Trac in EPEL.  Would you be 
> opposed to me branching these and building them for EPEL?  

Nope... go right ahead.

Jeff

Comment 32 Tom "spot" Callaway 2007-06-01 21:21:18 UTC
cvs done.


Note You need to log in before you can comment on or make changes to this bug.