Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 121351

Summary: Trac-0.9.3 ebuild does not copy htdocs directory
Product: Gentoo Linux Reporter: Tim van Eijndhoven <gentoo>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: High    
Version: 2005.1   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tim van Eijndhoven 2006-02-02 13:19:10 UTC
I just upgraded from trac-0.8.4 to 0.9.3, and at first had to fiddle around with the upgrading stuff associated with it. After I brought Trac up again it appeared that the CSS was no longer existant in the right directory (I had it in "/var/www/localhost/htdocs/trac" I don't know if that was default by 0.8.4). I did a locate on trac.css and it appeared that it should be existant in ("/var/www/localhost/htdocs/trac/css/trac.css" and "/usr/share/webapps/trac/0.8.4/htdocs/css/trac.css") I checked out the "/usr/share/webapps/trac/0.9.3/" dir and found no htdocs dir there.

I tried to emerge again to see if something might went wrong somewhere but I had the same results. I then started comparing the ebuilds for both 0.8.4 and 0.9.3, it appears to me that the ebuild of 0.9.3 is missing the line to copy the htdocs dir and then remove it  (that's the way the 0.8.4 version does it)

for version 0.8.4 lines 36 to 41 read:
	# now, we have to turn this into something that webapp-config can use
	local my_dir=${D}/usr/share/trac
	mv ${my_dir}/cgi-bin/trac.cgi ${D}${MY_CGIBINDIR} || die
	rm -rf ${my_dir}/cgi-bin || die
	mv ${my_dir}/htdocs/* ${D}${MY_HTDOCSDIR} || die
	rm -rf ${my_dir}/htdocs || die

for version 0.9.3 there is an if segment to determine which method of webserving to use:

lines 55 to 63 read:

# if needed, install cgi/fcgi scripts for webapp-config
	local my_dir=${D}/usr/share/trac
	if use cgi ; then
		mv ${my_dir}/cgi-bin/trac.cgi ${D}${MY_CGIBINDIR} || die
	fi
	if use fastcgi ; then
		mv ${my_dir}/cgi-bin/trac.fcgi ${D}${MY_CGIBINDIR} || die
	fi
	rm -rf ${my_dir}/cgi-bin || die

There is no mv and rm of the htdocs there.

I went to /usr/share/trac and the htdocs dir was there, I copied it to /var/www/localhost/htdocs/trac and now everything works again.

I guess the fix would be to add the lines:

mv ${my_dir}/htdocs/* ${D}${MY_HTDOCSDIR} || die
rm -rf ${my_dir}/htdocs || die

to the 0.9.3 ebuild.
Comment 1 Tim van Eijndhoven 2006-02-02 13:25:06 UTC
I forgot to mention that I use Trac with the mod_python apache extension, for what it's worth.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-02-02 14:40:57 UTC
Well, no - see the other bug. ;)

*** This bug has been marked as a duplicate of 118904 ***