Setting Up CVS

bridged with qdn.public.qnxrtp.applications
Post Reply
Dave Latter

Setting Up CVS

Post by Dave Latter » Wed Aug 13, 2003 4:13 pm

I'm using 6.2.1 PE (Eval) self hosted.

I want to create a CVS repository (also self hosted) that I can access
from the IDE. Can this be done?

The docs seem to imply yes, but they don't say how to do it. They all
seem to imply that it is already set up.

Dave Latter

Re: Setting Up CVS

Post by Dave Latter » Wed Aug 13, 2003 8:35 pm

Dave Latter <DLatter@hollandco.com> wrote:
DL > I'm using 6.2.1 PE (Eval) self hosted.

DL > I want to create a CVS repository (also self hosted) that I can access
DL > from the IDE. Can this be done?

DL > The docs seem to imply yes, but they don't say how to do it. They all
DL > seem to imply that it is already set up.

Since no one has offered any advise on this one I had to do some digging on my own and this is what I came up with.

1. make suer that there is a line in /etc/services that says:
pserver 2401/tcp

2. make sure there is a line in /etc/inetd.conf that says:
pserver stream tcp nowait root /usr/bin/cvs cvs -b /usr/local/bin -f
--allow-root=</whatever_path> pserver
(The above two line should be one long line.)
Replace the <whatever_path> with what ever path you wnt to use for your
CVS root directory. Convention seems to indicate that it should end
with /CVSRoot but nothing seems to enforce that. You seem to be allow
to have more than one root directory. Just add multiple instances of
--allow-root=

3. run the command:
cvs -d <whatever-path> init
This will create the <whatever_path> directory and populate it with all
the things it needs in there.

4. Now you can connnect to this CVS repository from the IDE.

Wasn't that easy?

Dave Latter

Re: Setting Up CVS

Post by Dave Latter » Thu Aug 14, 2003 3:07 pm

Now that this is essentially working. I do have one last question.

CVS won't let me add new files as root. I want to add files that
should only be accessed by root such as system build and config files
and possibly some security files.

So,
1. Is there a way I can enable adding files as root?

2. If I do will CVS actually protect those files from access by non-root?

Steve Reid

Re: Setting Up CVS

Post by Steve Reid » Thu Aug 14, 2003 5:50 pm

Dave Latter <DLatter@hollandco.com> wrote:
: Since no one has offered any advise on this one I had to do some digging
: on my own and this is what I came up with.

You'll be pleased to hear that the Neutrino User's Guide that we're working
on has a chapter on using CVS. It will have a section on setting up the
server.

I'm told that your steps are correct, but if you're setting up the server
for a group, you also need to set up permissions, network security, etc.
One of our CVS exprts is working on that section.

We hope to include the Neutrino User's Guide in 6.3.

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

Bill Caroselli

Re: Setting Up CVS

Post by Bill Caroselli » Fri Aug 15, 2003 2:11 pm

Steve Reid <stever@qnx.com> wrote:
SR > Dave Latter <DLatter@hollandco.com> wrote:
SR > : Since no one has offered any advise on this one I had to do some digging
SR > : on my own and this is what I came up with.

SR > You'll be pleased to hear that the Neutrino User's Guide that we're working
SR > on has a chapter on using CVS. It will have a section on setting up the
SR > server.

SR > I'm told that your steps are correct, but if you're setting up the server
SR > for a group, you also need to set up permissions, network security, etc.
SR > One of our CVS exprts is working on that section.

SR > We hope to include the Neutrino User's Guide in 6.3.

While we all anxiously look forward to the Complete User's Guide here
are some instructions I used to get CVS working.

There is still a small issue with permissions. But this can be used
by both root and non-root.

---------------------------------

Installing and Configuring CVS for QNX

1. Allocate a group for CVS file access. We will assume 'CVS_group'
and give it the group id of 6. Edit this into the /etc/group file.
You do NOT need to allocate users to this group.

2. Decide the directory you want the CVS Rpository installed in.
We will assume '/CVSRoot'.

3. Add the CVS pserver to inetd. We will assume the service name
'cvs_pserver'. In the /etc/services file add the following line:
cvs_pserver 2401/tcp
In the /etc/inetd.conf file add the following line:
cvs_pserver stream tcp nowait root:CVS_group /usr/bin/cvs cvs \
-b /usr/local/bin -f --allow-root=/CVSRoot pserver
The above two line need to be on a single line.
Do NOT include the line continuation character '\'.

4. Slay (if necessary) inetd and restart it.
# slay inetd ; inetd

5. There is a bug in the current version of CVS. It requires attempting
to open a file in root's home directory. It attempts to open
/root/.cvsignore. This files does not need to exist. But the CVS
software needs to confirm tha it doesn't exist. For now you will need
to enable execute (search) permission for others in root home directory.
# chmod o+x /root
NOTE: This does create a slight security hole. Make sure that
everything under /root is not readable or writeable by others.

6. You will need to know the host name of server CPU. We'll assume it's
'CVS_SERVER'.

7. Log in to CVS.
# cvs -d:pserver:root@CVS_SERVER:/CVSRoot login
It will ask for your password.

8. Create the CVS repository as:
# cvs -d:pserver:root@CVS_SERVER:/CVSRoot init
This will create the /CVSRoot directory.

9. This directory needs to be owned by the CVS_group. You also need to
give others execute (search) permission on this directory.
# chown -Rv root:CVS_group /CVSRoot
# chmod o+wx /CVSRoot

Bill Caroselli

Re: Setting Up CVS

Post by Bill Caroselli » Fri Oct 03, 2003 8:48 pm

Steve Reid <stever@qnx.com> wrote:
SR > Dave Latter <DLatter@hollandco.com> wrote:
SR > : Since no one has offered any advise on this one I had to do some digging
SR > : on my own and this is what I came up with.

SR > You'll be pleased to hear that the Neutrino User's Guide that we're working
SR > on has a chapter on using CVS. It will have a section on setting up the
SR > server.

SR > I'm told that your steps are correct, but if you're setting up the server
SR > for a group, you also need to set up permissions, network security, etc.
SR > One of our CVS exprts is working on that section.

SR > We hope to include the Neutrino User's Guide in 6.3.

Steve


Is there a chance that you can post whatever progress there is on the
CVS chapter? I could really use this information.

Maybe you could post all of it. I mean a "work in progress" is still
assumed to be "in progress". No one will judge it as it stands.

On the othr hand, the copy on the web page hasn't been touched in two
years and is woefully useless.

ed1k

Re: Setting Up CVS

Post by ed1k » Wed Oct 08, 2003 1:06 am

In article <blknbl$rvg$1@inn.qnx.com>, qtps@earthlink.net says...
On the othr hand, the copy on the web page hasn't been touched in two
years and is woefully useless.

Untill there is not a new copy, the old one isn't useless by any means.

Bill Caroselli

Re: Setting Up CVS

Post by Bill Caroselli » Wed Oct 08, 2003 1:04 pm

ed1k <ed1k@humber.bay> wrote:
ek > In article <blknbl$rvg$1@inn.qnx.com>, qtps@earthlink.net says...
On the othr hand, the copy on the web page hasn't been touched in two
years and is woefully useless.

ek > Untill there is not a new copy, the old one isn't useless by any means.
For the benefit of others, I have copied the *ENTIRE* section on CVS
here below.

----------------

Using CVS

[Author's Comments: (@@need a list of common commands. What is CVS? How
do I use it?) what is it? Using -- Getting started: checking in/out,
locking files, creating a CVS directory, protecting working file,
assigning ident: want more info?; CVS file format, example, CVS
commands.]
[Author's Comments: docs available at www.loria.fr/~molli/cvs-index.html]

-----------------

It's not as useful as I'd like it to be.

Steve Reid

Re: Setting Up CVS

Post by Steve Reid » Wed Oct 08, 2003 8:02 pm

Bill Caroselli <qtps@earthlink.net> wrote:
: Is there a chance that you can post whatever progress there is on the
: CVS chapter? I could really use this information.

: Maybe you could post all of it. I mean a "work in progress" is still
: assumed to be "in progress". No one will judge it as it stands.

: On the othr hand, the copy on the web page hasn't been touched in two
: years and is woefully useless.

I've passed your request up to management. (I didn't want you to think
that I was ignoring you.)

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

ed1k

Re: Setting Up CVS

Post by ed1k » Thu Oct 09, 2003 1:49 am

In article <bm120j$f42$2@inn.qnx.com>, qtps@earthlink.net says...
ed1k <ed1k@humber.bay> wrote:
ek > In article <blknbl$rvg$1@inn.qnx.com>, qtps@earthlink.net says...
On the othr hand, the copy on the web page hasn't been touched in two
years and is woefully useless.

ek > Untill there is not a new copy, the old one isn't useless by any means.

For the benefit of others, I have copied the *ENTIRE* section on CVS
here below.
Copy on the web is *ENTIRE* Sysadmin Guide, not the only CVS section. Once it has been removed from
web site (by mistake or because it was considered useless), but besides empty sections (CVS is an
example) it has *USEFUL* information on other topics, for example, printing in QNX. Therefore the
ENTIRE WORK-IN-PROGRESS Admin Guide is useful document unless we don't have new one. And despite the
fact it is work-in-progress untouched during couple of last years, the document covers a lot of
questions that are asked here during these years over and over again.

Cheers,
Eduard.

P.S. CVS is GNU project. Did you ever try to look at GNU pages?
http://www.gnu.org/manual/cvs/index.html

----------------

Using CVS

[Author's Comments: (@@need a list of common commands. What is CVS? How
do I use it?) what is it? Using -- Getting started: checking in/out,
locking files, creating a CVS directory, protecting working file,
assigning ident: want more info?; CVS file format, example, CVS
commands.]
[Author's Comments: docs available at www.loria.fr/~molli/cvs-index.html]

-----------------

It's not as useful as I'd like it to be.

Bill Caroselli

Re: Setting Up CVS

Post by Bill Caroselli » Thu Oct 09, 2003 3:07 pm

ed1k <ed1k@humber.bay> wrote:
ek > Copy on the web is *ENTIRE* Sysadmin Guide, not the only CVS section. Once it has been removed from
ek > web site (by mistake or because it was considered useless), but besides empty sections (CVS is an
ek > example) it has *USEFUL* information on other topics, for example, printing in QNX. Therefore the
ek > ENTIRE WORK-IN-PROGRESS Admin Guide is useful document unless we don't have new one. And despite the
ek > fact it is work-in-progress untouched during couple of last years, the document covers a lot of
ek > questions that are asked here during these years over and over again.

ek > Cheers,
ek > Eduard.

ek > P.S. CVS is GNU project. Did you ever try to look at GNU pages?
ek > http://www.gnu.org/manual/cvs/index.html


There are many parts of the Sysadmin Guide that are very useful. It is
however frustrating that it is so stale and not evolving.

The issues I have deal with permissions and seem to be QNX specific.

Steve Reid

Re: Setting Up CVS

Post by Steve Reid » Thu Oct 09, 2003 3:32 pm

Bill Caroselli <qtps@earthlink.net> wrote:
: There are many parts of the Sysadmin Guide that are very useful. It is
: however frustrating that it is so stale and not evolving.

: The issues I have deal with permissions and seem to be QNX specific.

We're working on a replacement for the Sys Admin guide. However, it isn't
something that springs forth fully grown overnight.

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

Bill Caroselli

Re: Setting Up CVS

Post by Bill Caroselli » Tue Dec 23, 2003 9:37 pm

I set up CVS to use inetd/pserver mode. There is somethnig funny
happening that is security related.

When cvs is run from inetd it is run with the user ID set to root, but
not with root privleges, CVS will lways try to access .cvsignore in
the user's home directory.

I was allowing search access to hoot's home directory.
chmod o+x /root
But other user's should not have access to root's home directory.

I found that I could circumvent this by creating a process manager link
to the CVSROOT/cvsignore file.

Is there a better way to have accomplished this?

Post Reply

Return to “qdn.public.qnxrtp.applications”