[viewvc-users] svndbadmin needs to be executed directly from withing its directroy
Asd Asdasd <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Can you please have a look at the error below. It looks like the svndbadmin script cannot pickup the viewvc.conf file unless it is executed within its own containing directory.
Here's an example output:
# /home/www/virtual-ssl/repo1/viewvc/bin/svndbadmin update /home/repositories/repo1/svn/test3
Traceback (most recent call last):
File "/home/www/virtual-ssl/repo1/viewvc/bin/svndbadmin", line 364, in <module>
main(command, repository, revs, verbose, force)
File "/home/www/virtual-ssl/repo1/viewvc/bin/svndbadmin", line 243, in main
db = cvsdb.ConnectDatabase(cfg)
File "/usr/lib/python2.7/site-packages/viewvc/cvsdb.py", line 865, in ConnectDatabase
db.Connect()
File "/usr/lib/python2.7/site-packages/viewvc/cvsdb.py", line 57, in Connect
self._host, self._port, self._user, self._passwd, self._database)
File "/usr/lib/python2.7/site-packages/viewvc/dbi.py", line 63, in connect
return MySQLdb.connect(host=host, port=port, user=user, passwd=passwd, db=db)
File "/usr/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
# cd /home/www/virtual-ssl/repo1/viewvc/bin
# ./svndbadmin update /home/repositories/repo1/svn/test3
#
This is on a Gentoo distribution with the latest stable ViewVC distribution, i.e. 1.1.10.
The directory structure of the ViewVC installation under /home/www/virtual-ssl/repo1/viewvc is
# ls -R
.:
bin cgi-bin conf error htdocs icons
./bin:
cvsdbadmin loginfo-handler make-database svndbadmin
./cgi-bin:
query.cgi viewvc.cgi
./conf:
cvsgraph.conf mimetypes.conf viewvc.conf
./error:
./htdocs:
./icons:
It looks like svndbadmin cannot pick up the config from viewvc.conf unless svndbadmin is executed from .../viewvc/bin. I'm guessing that svndbadmin is probably looking for ../conf/viewvc.conf as a relative path. There is nothing critical about this except that any script would need to "cd" to .../viewvc/bin and then run as ./svndbadmin <sub-command> $REPOAS-PATH. If this is the case then section 5 "To publish Subversion commits into the database:" of the INSTALL document should be updated to reflect this. For example, the post-commit script could have the following as a work-around:
VIEWVC_PATH="/home/www/virtual-ssl/repo1/viewvc"
cd $VIEWVC_PATH/bin
./svndbadmin update "$REPOS" "$REV"
It would be nice to have the script work with a fully qualified path... but this would take a fix and an update :)
thanks,Most.
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2760610
To unsubscribe from this discussion, e-mail: [[email protected]].