PDA

View Full Version : Run a CVS on a Westhost account?



Skullman
03-10-2004, 04:25 PM
I'm not sure if this is the correct forum to ask this kind of questions. But I need to run a CVS system http://www.cvshome.org/ (or a Subversion one http://subversion.tigris.org/) but I'm not sure if this can work on a VPS machine of Westhost.

I think that a CVS is a service that is started each time the Linux machine does, and it lisents to a certain port waiting for conections.

I think that we only have access to MySQL and web services, but maybe someone can tell me if another service as CVS can be runed aswell.

Anyway, if you know some company that offers CVS hosting it will be much apreciated.

Cheers,

jalal
03-11-2004, 01:34 AM
I haven't tried setting up either cvs or svn on westhost... but, heres my thoughts anyway. If you succeed with either I would be interested to hear about it.

both cvs and svn are started 'when needed' and I don't think that there will be a problem with running them on westhost.

subversion may be difficult to get installed as it has dependencies on BerkeleyDB and on Neon (and Apache 2 if you run the WebDAV version). So you'd have to run the 'svnserve' app.

cvs has less dependencies so that may be the best route to go.

I put my software up on SourceForge.net, but then thats open source. If you have open source, then thats the easiest.

I've used cvs for years, just a couple of weeks ago i started transferring some projects over to subversion. so far, i'm quite impressed with it, it seems solid and stable.

Skullman
03-11-2004, 02:52 PM
I need a precompiled GCC version in order to install the CVS, as when I have tried to compile it on Westhost the program says that the "CC compiler is missing"

The problem is that the only one package that I have found is at: ftp://ftp.thewrittenword.com/packages/by-name/ and this package is an RPM :?

Is it possible to run that package on Westhost? What kind of Linux do we have?

And a final question: Do anyone have installed a GCC at Westhost? :)

Regards,

jalal
03-11-2004, 03:09 PM
Yes. If you have a Westhost V2 site, you can install the GCC compiler suite through the Site Manager.

You can't install rpm's.

HTH

Skullman
03-12-2004, 06:00 AM
I have installed the GCC compiler and it works :-)

But, the instalation fails just at the end. Here are the steps I have followed:

Upload and uncompress CVS 1.11 at /usr/home/myuser/cvs-1.11/

Once there I have run this commands:


# ./configure
# make
# make install

But on the final make install it shows me this error:


make[1]: Leaving directory `/usr/home/myuser/cvs-1.11/man'
making install in doc
make[1]: Entering directory `/usr/home/myuser/cvs-1.11/doc'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/usr/home/myuser/cvs-1.11/doc'
making install in contrib
make[1]: Entering directory `/usr/home/myuser/cvs-1.11/contrib'
../mkinstalldirs /usr/local/lib/cvs/contrib
mkdir /usr/local/lib/cvs
mkdir: cannot create directory `/usr/local/lib/cvs': Permission denied
mkdir /usr/local/lib/cvs/contrib
mkdir: cannot create directory `/usr/local/lib/cvs/contrib': No such file or directory
make[1]: *** [installdirs] Error 1
make[1]: Leaving directory `/usr/home/myuser/cvs-1.11/contrib'
make: *** [install] Error 1
[myuser][~/cvs-1.11]$


I think that the problem is that my user doesn't have enough privileges to access /usr/local/lib/cvs. Is there anything I could do?

Regards,

wildjokerdesign
03-12-2004, 07:13 AM
Jalal may know better but I wonder if you need to follow the instructions on his site that is listed in his sig for Installing Perl Modules on Westhost. It sets up the perl enviroment for using cpan and installing perl moduals. I know it gives you a bit more access to things when installing perl moduals. Maybe part of that whould help in this case.

BTW Jalal.... I like the new look on your WH pages.

Skullman
03-12-2004, 09:50 AM
It worked :!:

At least everythig is installed and working on the server. Now I'll try to configure all the files locally, and allow the remote access.

Once finished and working I'll post all the steps here.

Thanks both! 8)

jalal
03-12-2004, 12:29 PM
I guess you installed it somewhere else?

Normally, cvs is started by inetd (or xinetd) so I'm not sure how you will do it on your site.

Let us know what you did, for those who follow on.

Skullman
03-12-2004, 01:57 PM
I guess you installed it somewhere else?

Yes, I runed the config file with this parameters:


cd cvs-1.11
./configure --prefix=/usr/local/libcvs/

... and it worked without any problem. The entire aplication was installed and I was able to create a repository with something like 'cvs import testcvs'...


Normally, cvs is started by inetd (or xinetd) so I'm not sure how you will do it on your site.


That's exatly my problem. I couldn't find the inetd file in order to start the service everytime :-(

I should edit that file and write something like this on it:



cvspserver stream tcp nowait root
/usr/local/bin/cvs cvs -f --allow-root=/var/cvs pserver



Let us know what you did, for those who follow on.

At this moment, if I could not start the service via inetd, I guess that it will be impossible to get access to the repository outside of the SSH session. In oder words, it's just working locally :-(

If you need more details in order to help me out I can describe all the process I have followed to get to this point. Maybe I have done somethig wrong before, but I'm affraid that if I couldn't edit the inetd file, CVS will not work.

jalal
03-13-2004, 05:30 AM
The problem is, basically, that when you connect to your server from outside, say on port 2041 (the default port for CVS) then somehow you need to start the program.
With apache, we have a daemon process running that monitors port 80 (and others if specified) and will respond on that port.
For sshd, pop3 and sendmail, there is an xinetd process running outside of the server that watches for connections on the appropriate ports and then wakes up the programs on your server.
When there is a connection on yourdomain.com:2041 (a cvs connection) then the xinetd process doesn't know how to handle it.

AFAIK there are only three options for you.
1. tunnel the cvs connections through ssh so that ssh runs the program
2. install your own xinetd server to handle the incoming connections.
3. contact Westhost and ask if they can forward port requests to your cvs server (i.e. modify there xinetd process) or

1. seems the most tempting, briefly (I haven't tried it) you need something like this on your end (on Linux):
CVSROOT=:ext:name@yourdomain.com:/path/to/cvs/repos
CVS_RSH=ssh1

and you need to setup SSH for fast logins otherwise every commit will ask for a password.

If you want to try #2. then have a look at Matt's site at:
http://www.domsch.com/westhost/

HTH

Skullman
03-13-2004, 08:53 AM
Jalal, your solutions sounds very good. I think I'm going to try the number 2 first, just because the number one seems kind of criptic for me :? Anyway, there are two differents ways of making this work, so I'll work on them and post here my results.

As allways, thanks very much master of the forum :wink:

Skullman
03-17-2004, 03:59 PM
Things are going on, slowly, but keep going.

This is the current situation:

- CVS is installed, as I said you before on /usr/local/libcvs/

- $CVSROOT variable is pointing to /var/cvs

- Xinetd is installed too, but I'm not sure if it's configured as it should be, this is the content of the /etc/xinetd.conf:


defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
per_source = 5
}

pserver stream tcp nowait root
/usr/local/bin/cvs cvs -f --allow-root=/var/cvs pserver


- I have create a passwd file on the /var/cvs/CVSROOT folder with a user and a password (just like the Apache .htpasswd file). With that it should ask me for user and password each time I access to my repository.

- Last I have tried to access to the CVS with Tortoise CVS (Windows) with this parameters: CVSROOT=:pserver:user@IPofWesthost:2401/var/cvs, but when it tries to connect it says me that "the conection was rejected by the server".

Any idea? :?

jalal
03-18-2004, 01:06 AM
From your local machine, can you do:
$ telnet IPofWHost 2401

and get a response from cvs pserver?

Is xinetd running?

torrin
03-18-2004, 09:43 AM
A few questions.

Is it port 2401 or 2041? The posts above list both numbers.
Also, shouldn't you be accessing this by domain name and not IP address?

jalal
03-18-2004, 10:28 AM
Port 2401 I believe is the default.
and, yes, unless the site has its own ip, you'd have to use the domain name.

Skullman
03-19-2004, 04:11 AM
$ telnet IPofWesthost 2401
Trying IPofWesthost...
telnet: Unable to connect to remote host: Connection refused


That means that Xinetd is not running? In that case I understand that's why the CVS daemon has not been started.

This is one (http://www.linuxfocus.org/English/November2000/article175.shtml) of the most complete tutorials of Xinetd that I have found, but it says nothing about starting Xinetd everytime the server starts.

PS: I allways use the IP address, because I have a fixed IP address on my account.

jalal
03-19-2004, 10:09 AM
xinetd is nothing special, just another daemon.
To start it everytime, you need to put a start up script in /etc/rc.d/initi.d/ and a couple of start/stop links in /etc/rc.d/rc2.d/ and it will be run when the server starts up. Check out how mysqld is set up and base your script around that.

HTH

Skullman
03-20-2004, 05:27 AM
This is the current situation:

- I have copied the startup script (http://www.domsch.com/westhost/xinetd) at /etc/rc.d/initi.d/

- Then put write permisions to that file:

chmod +x xinetd

- And finally, run xinetd daemon:

xinetd start

This way, I understand that the service is started, but when I try to make telnet to localhost (or my server IP) on the 2401 port it continues to refuse the conection.

Even writhing cvs init before I wasn't unable to connect. Maybe westhost runs a kind of firewall that doesn't allow other connections than mail/sql/ftp/web?

Any idea?

jalal
03-20-2004, 05:40 AM
Some ideas::
Make sure you are running the script and not the daemon, i.e. use '/etc/rc.d/init.d/xinetd' to start up.
Is the xinetd process started?
Does the pid (at /var/run/xinetd.pid) exist?
Does it appear in the process table? (run 'ps aux')

Try starting xinetd with the '-filelog=/var/log/xinetd.log' flag and then see what the output is.

EDIT:
And, finally, yes, it is possible that they are blocking other IP connections through a firewall, but I've not seen that mentioned anywhere so I think it is worth pursuing what you are doing.
If all else fails, you'll have to tunnel through SSH, which is the way I would approach it, as it doesn't need xinetd to be running.

Skullman
03-22-2004, 02:14 AM
I don't know why, but on /var/run/ is not any xinetd.pid :-?

The most strange is this:



[myuser][/etc/rc.d/init.d]$ ./xinetd start
Starting xinetd: [ OK ]


And that file is copypasted from here (http://www.domsch.com/westhost/xinetd).

Neither is the process running, as with 'ps aux' I can see the sendmail, MySQL, Apache, but not Xinetd :-(

Any idea? I think is time to try your option of tunneling the request via SSH. But first I need to investigate if TortoiseCVS can do that.

Skullman
03-22-2004, 03:48 AM
Here are the results of the tests based on the TortoiseCVS FAQ (http://www.tortoisecvs.org/faq.html#ssh):

This is the CVSROOT string that I have use to connect:


:ext:user@IPofWH:2401/var/cvs

Then, it asks me for a password (I guess that's the password that I have created on /var/cvs/CVSROOT/ with the htpasswd -c passwd user command) and then, the program fails with this message at the second attempt:



In c:\home\myrepository: c:\routetocvs\cvs.exe -q checkout -P myuser CVSROOT=:ext:myuser@IPofWH:/var/cvs

cvs checkout: warning: unrecognized response `Access denied' from cvs server
cvs checkout: warning: unrecognized response `Access denied' from cvs server
cvs checkout: warning: unrecognized response `FATAL ERROR: Server sent disconnect message' from cvs server
cvs checkout: warning: unrecognized response `type 2 (SSH_DISCONNECT_PROTOCOL_ERROR):' from cvs server
cvs checkout: warning: unrecognized response `"Too many authentication failures for myuser"' from cvs server
cvs [checkout aborted]: end of file from server (consult above messages if any)

Error, CVS operation failed


I have tried even deleting the passwd file, and try to enter with an empty password, but it still disconects.

I guess that if it asks me for a password, it has get to the server and wakeup the CVS. Is any log file to look this conection on CVS? How may I know if my conection gets to 2401 port on WH?

I think I'm just two steps from get this work, but it doesn't :-(

Skullman
03-23-2004, 05:13 AM
I'm a totally idiot!

After tenthousand trys i have realized that the password that my CVS client were asking me is the password of the SSH session, not the cvs one. Yo Skullman idiot!

:arrow: The good news are that the CVS is working on Westhost

I wouldn't get to this point without the great help of Jalal. Thanks so much guy!!!

I will post a new topic with all the steps necesary to make this work, afterall, the xinetd wasn't necesary as you said to me, and the SSH aproach was the easiest one. I hope to put the post during this week, aslong as I have a lot of work with my new CVS :-)

Best regards,

Skullman (so much happy)

jalal
03-23-2004, 08:54 AM
This is great news.
Write up your steps, and if its ok with you, I'll include them on my Tips n Tricks.

cheers
8)

Skullman
03-23-2004, 09:09 AM
Of course you can include all the steps on your site, there are allmost yours :-D I promise to write down all the steps really soon.

There is only a little issue that is not so good, at westhost you only have one SSH account, and you cannot make new users with SSH access, so if you want to run a CVS with another person (that's why I needed it) he will have your master username and password at WH :-(

That's the reason why I'm still working on the xinetd option, but at least, I can start my project with CVS, not the way I like (with a diferent password for it) but anyway, I can do the job.

jalal
03-23-2004, 10:43 AM
...at westhost you only have one SSH account, and you cannot make new users with SSH access

Hmm, thats a good point, I hadn't thought of that. :(

I guess its back to xinetd then...

lpforg
03-11-2005, 05:52 AM
I successfully set up xinetd 2.3.13 and CVS 1.12.11 on my server.

Two tips:
1. Use the -d option "xinetd -d" for more descriptive output. "xinetd start" was returning [OK] even though I had errors in my xinetd.conf file.

2. When creating a CVS "passwd" file that points to a user, be SURE to use Unix style EOL markers. MS uses "0D 0A" and CVS does not understand how to parse out "0D" and will try to use that hidden character as part of a username.

wizardofaz
08-26-2005, 01:03 PM
Reading through this thread, I got my hopes up that there would be a "turn key" set of instructions at the end, but not. Did that ever get done? I can figure it out from all the clues in the thread, but a summary would be so great.

Appears that if I want multiple cvs users w/o sharing my wh u/pw, I need to go the inetd route, right?

Thanks
Bill

wizardofaz
08-27-2005, 10:46 PM
OK, I scraped info from a bunch of places and got it going. It's not quite how I'd like it to be, so advice is welcome. My summary is in a new thread:
http://forums.westhost.com/showthread.php?t=8465