Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107033 - www-apps/viewcvs is broken
Summary: www-apps/viewcvs is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
: 108510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-23 13:03 UTC by Mathieu Malaterre
Modified: 2007-03-01 20:46 UTC (History)
1 user (show)

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


Attachments
reconfig (reconfig,963 bytes, text/plain)
2005-10-03 07:03 UTC, Lance Albertson (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Malaterre 2005-09-23 13:03:43 UTC
viewcvs does not work with my apache 1.3.x installation. The first line of the
script is wrong (I believe it was copy paste from debian ?).

When using default install one get, in the error log of apache:

Traceback (most recent call last):
  File "/var/www/localhost/cgi-bin/viewcvs.cgi", line 60, in ?
    import sapi
ImportError: No module named sapi
[Fri Sep 23 15:53:58 2005] [error] [client 128.113.119.28] Premature end of
script headers: /var/www/localhost/cgi-bin/viewcvs.cgi


The solution is to edit:
/var/www/localhost/cgi-bin/viewcvs.cgi

and change the line:
LIBRARY_DIR = "/usr/lib/python2.3/site-packages/viewcvs/"
(this path does not even exist!)
into
LIBRARY_DIR = "/var/www/localhost/viewcvs/lib/"

restart apache... you're all set.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Lance Albertson (RETIRED) gentoo-dev 2005-09-23 13:39:47 UTC
Which version are you using and if its the newer one, do you have the vhost flag
set?
Comment 2 Mathieu Malaterre 2005-09-26 07:52:25 UTC
Yes this is the very latest viewcvs available:

Latest version available: 1.0_pre20050523
Latest version installed: 1.0_pre20050523

No I did not modify the [vhosts] secton from viewcvs.conf:

#---------------------------------------------------------------------------
[vhosts]
### DOC

# vhost1 = glob1, glob2
# vhost2 = glob3, glob4

# [vhost1-section]
# option = value
# [vhost1-othersection]
# option = value
# [vhost2-section]
# option = value

#
# Here is an example:
#
# [vhosts]
# lyra = *lyra.org
#
# [lyra-general]
# forbidden = hideme
#
# [lyra-options]
# show_logs = 0
#
# Note that "lyra" is the "canonical" name for all hosts in the lyra.org
# domain. This canonical name is then used within the additional, vhost-
# specific sections to override specific values in the common sections.
#
Comment 3 Lance Albertson (RETIRED) gentoo-dev 2005-09-29 08:18:16 UTC
No, I meant did you have the vhost useflag enabled or not? :)
Comment 4 Mathieu Malaterre 2005-09-29 10:36:45 UTC
Sorry I forgot to include emerge --info:

Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Opteron(tm) Processor 848
Gentoo Base System version 1.6.13
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -fprefetch-loop-arrays -fforce-addr -msse2 -msse
-mmmx -m3dnow -mfpmath=sse,387 -ffast-math"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=k8 -pipe -fprefetch-loop-arrays -fforce-addr -msse2 -msse
-mmmx -m3dnow -mfpmath=sse,387 -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.acm.cs.rpi.edu/gentoo/
http://mirror.clarkson.edu/pub/distributions/gentoo/ http://chod.cwru.edu/gentoo
ftp://chod.cwru.edu/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d acpi apache arts avi bash-completion berkdb bitmap-fonts
crypt cups curl dga dvd eds emacs emboss encode esd f77 fam foomaticdb fortran
gd gdbm gif gnome gpm gstreamer gtk gtk2 guile imagemagick imlib ipv6 java
javascript jpeg kde lcms libg++ libwww lzw lzw-tiff mad maildir mikmod motif
mozilla mp3 mpeg mysql nas ncurses network nls nocardbus nptl ogg opengl pam
pdflib perl png python qt quicktime readline rtc samba sdl slang spell ssl tcltk
tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb
userlocales videos vorbis xinerama xml xml2 xpm xprint xv xvid zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS


So no I don't see no USE=vhost flag. 
Comment 5 Lance Albertson (RETIRED) gentoo-dev 2005-10-02 22:12:15 UTC
Did you perhaps install viewcvs before a python upgrade? If not, can you please
try my newest ebuild which I just committed? (1.0_pre20050929) I tried getting
this to happen in a chroot and it installed fine from what I could tell.
Comment 6 Lance Albertson (RETIRED) gentoo-dev 2005-10-03 07:03:17 UTC
Created attachment 69781 [details]
reconfig

Aha! I think I figured out whats going on. There's a script in files called
reconfig that gets called everytime you do an install or clean. Apparently I
needed to add another if statement for upgrades. Can you please replace the
reconfig script with this one and see if it fixes the problem? Apparently, this
issue only comes up with you upgrade.

Thanks..
Comment 7 Mathieu Malaterre 2005-10-03 13:59:43 UTC
Ok I try updating:

emerge --sync
emerge --update viewcvs

and the first thing I discover is that all my settings in viewcvs.conf are lost :(

I'll try again tomorrow with your new script.
Comment 8 Lance Albertson (RETIRED) gentoo-dev 2005-10-03 20:39:07 UTC
I'm really getting the impression that webapp-config doesn't like having things
installed out of htdocs very well.

web-apps: Is it problem that I have stuff installed outside of htdocs?
Comment 9 Mathieu Malaterre 2005-10-04 07:45:02 UTC
I am looking at:
http://bugs.gentoo.org/attachment.cgi?id=69781
and there is absolutely no difference with the reconfig I have in:
2c2
< # $Id: reconfig,v 1.6 2005/10/03 14:06:18 ramereth Exp $
---
> # $Id: reconfig,v 1.5 2005/10/03 05:06:28 ramereth Exp $

Did you include it with the viewcvs-1.0_pre20050929 ?


Anyway I am looking at:

/var/www/localhost/cgi-bin/viewcvs.cgi

And it still contains my change. If I change it back to the original:

LIBRARY_DIR = "/usr/lib/python2.3/site-packages/viewcvs/"

then again I get the 500 Internal Server Error 500. So again I'll put back:

LIBRARY_DIR = "/var/www/localhost/viewcvs/lib/"
Comment 10 Lance Albertson (RETIRED) gentoo-dev 2005-10-04 08:12:59 UTC
Yeah, I went ahead and included that new reconfig file.

When I tried installing viewcvs w/o the vhosts flag, it appeared to have
installed  the cgi-bin stuff in /var/www/localhost/cgi-bin/viewcvs/viewcvs.cgi.
Is that there? I'm wondering if you're touching the wrong file.
Comment 11 Mathieu Malaterre 2005-10-04 10:33:52 UTC
As a side note, next time you update viewcvs could you change amd64 keyword,
thanks (bug #106915)

I'll unmerge delete old files and start from scratch
Comment 12 Mathieu Malaterre 2005-10-04 10:50:59 UTC
Steps:

# emerge unmerge viewcvs
# rm -r /var/www/localhost/cgi-bin/viewcvs*

# cd /usr/local/portage
-> update ebuild to have ~amd64
# ebuild viewcvs-1.0_pre20050929.ebuild digest
# ebuild viewcvs-1.0_pre20050929.ebuild install
# emerge viewcvs
# emerge --search viewcvs
Searching...
[ Results for search key : viewcvs ]
[ Applications found : 1 ]

*  www-apps/viewcvs
      Latest version available: 1.0_pre20050929
      Latest version installed: 1.0_pre20050929
      Size of downloaded files: 333 kB
      Homepage:    http://viewcvs.sourceforge.net/
      Description: Viewcvs, a web interface to cvs and subversion
      License:     viewcvs


The file:
/var/www/localhost/cgi-bin/viewcvs/viewcvs.cgi
now properly contains:
LIBRARY_DIR = "/var/www/localhost/viewcvs/lib"

Thanks this is fixed.


On a complete different subject, this version of viewcvs does not process some
of my files anymore:

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
  File "/var/www/localhost/viewcvs/lib/viewcvs.py", line 3283, in main
    request.run_viewcvs()
  File "/var/www/localhost/viewcvs/lib/viewcvs.py", line 376, in run_viewcvs
    self.view_func(self)
  File "/var/www/localhost/viewcvs/lib/viewcvs.py", line 2522, in view_diff
    fp = request.repos.rawdiff(p1, rev1, p2, rev2, diff_type, diff_options)
  File "/var/www/localhost/viewcvs/lib/vclib/bincvs/__init__.py", line 278, in
rawdiff
    raise vclib.Error("Error parsing diff headers")
Error: Error parsing diff headers


I can do diff on file that were generated only when server was using an older cvs...
Comment 13 Mathieu Malaterre 2005-10-04 11:30:15 UTC
Ok and the bug report can be found at:

http://mailman.lyra.org/pipermail/viewcvs/2005q4/003795.html

WARNING: viewcvs 1.0_pre20050929 is not stable. Don't use, or else apply
reversed patch of:

http://cvs.sourceforge.net/viewcvs.py/viewcvs/viewcvs/lib/vclib/bincvs/__init__.py?r1=1.55&r2=1.56

Comment 14 Lance Albertson (RETIRED) gentoo-dev 2005-10-04 11:41:36 UTC
Ok, thanks for the fix! I'll see about making a patch to the current snapshot
instead of making another snapshot all together. Sorry for all the trouble. I
didn't seem to have this problem so I didn't know it existed.
Comment 15 Mathieu Malaterre 2005-10-04 12:10:04 UTC
Just to keep track of the current problems, here is a sum'up of what I would like:

- Add support for AMD64 (bug #106915)
- viewcvs.conf(or cvsgraph.conf) should not be erased when emerge update
- restore commitid support: 
http://mailman.lyra.org/pipermail/viewcvs/2005q4/003797.html

thanks
Comment 16 Mathieu Malaterre 2005-10-04 12:22:20 UTC
And one more thing, each time I install viewcvs it creates an empty viewcvs dir:

$ ls -al /var/www/localhost/htdocs/viewcvs
total 16
drwxr-xr-x  2 root root   120 Oct  4 14:17 ./
drwxr-xr-x  3 root root   232 Oct  4 14:17 ../
-rw-------  1 root root   337 Oct  4 14:17 .webapp
-rw-r--r--  1 root root 10806 Oct  4 14:17 .webapp-viewcvs-1.0_pre20050929

What are those files ?
Comment 17 Mathieu Malaterre 2005-10-07 07:44:28 UTC
current CVS of viewcvs contains a bug fix for commitid problem:

http://cvs.sourceforge.net/viewcvs.py/viewcvs/viewcvs/lib/vclib/bincvs/__init__.py?r1=1.61&r2=1.62
Comment 18 Lance Albertson (RETIRED) gentoo-dev 2005-10-07 11:04:11 UTC
Thanks for pointing that out. I was actually going to try and get this in the
tree in the next few days. Good thing he got a newer version of that going :).
Btw, I think for a temporary 'fix' on the overwriting config problem, I'll just
copy it as a .example file until I can get the webapps herd input. I'll let you
know when I get this finished and will probably require a revbump since this
will fix some known issues.
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2005-10-08 09:59:39 UTC
*** Bug 108510 has been marked as a duplicate of this bug. ***
Comment 20 Renat Lumpau (RETIRED) gentoo-dev 2007-03-01 20:46:34 UTC
Fixed in www-apps/viewvc