Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CVS behind a proxy and importing the CVS files manually
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Fri Jun 16, 2006 12:38 pm    Post subject: CVS behind a proxy and importing the CVS files manually Reply with quote

Hi I have a PC behind a proxy that I am trying to install xgl/compiz on. I need to use cvs for the drm/mesa builds but can't get CVS to work behind the proxy.

I have used CVS to get the files on another box and then transferred them to /usr/portage/distfiles/cvs-src but the ebuild still tries to go and download the files from CVS.

Can I force the ebuild to use the files in the cvs-src folder? I have created the xgl overlay using layman -a portage-xgl. My portage overlay is /usr/portage/local/layman/portage-xgl.

emerge says "Fetching CVS module Mesa into /usr/portage/distfiles/cvs-src" so i have put my cvs files that i downloaded on the other box into "/usr/portage/distfiles/cvs-src/Mesa"

I really want it working on this box, please help!!
Back to top
View user's profile Send private message
Su8l1me
n00b
n00b


Joined: 25 Jan 2006
Posts: 31

PostPosted: Tue Jun 20, 2006 7:32 am    Post subject: Reply with quote

Hi roycrom,

I thought I'd post how *I* did this - there may be other solutions - but this is what worked for me.

First though - what didn't work :

Any sort of faffing about with programs which are supposed to encapsulate the CVS requests through to the real CVS server in HTTP CONNECT requests. This doesn't work for me from where I am - the proxy here is only configured to allow CONNECT requests to port 443 - and as far as I'm aware, only sourceforge are kind enough to provide a CVS server listening on that port. No good for me - I wanted the latest CVS of E17 - so I had to do what you're trying to do.

Here's how I made it work :

1 ) Go home - get the CVS tree from anoncvs.enlightenment.org
2 ) Burn it to CD
3 ) Take it to work
4 ) Copy it onto my gentoo box
5 ) su to root user
6 ) emerge cvsd
7 ) Under /var/lib/cvsd (created by the ebuild for cvsd) create a directory which matches anoncvs.enlightenment.org's CVS root path. In this case it was var/cvs/e - so full directory path is /var/lib/cvsd/var/cvs/e
8 ) Run /usr/sbin/cvsd-buildroot to make sure cvsd's chroot environment works.
9 ) Run "cvs init /var/lib/cvsd/var/cvs/e"
10 ) Run "cvsd-passwd /var/lib/cvsd/var/cvs/e anonymous" and hit return twice to give it a blank password
11 ) Run "chown -R cvsd:cvsd /var/lib/cvsd" to make sure all the directories are correctly owned.
12 ) Edit /etc/hosts and add "anoncvs.enlightenment.org" as an alias for my local machine
13 ) Exit root shell and return to usual user
14 ) Run "export CVSROOT=:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e"
15 ) cd into the directory of code I want to use for emerge'ing
16 ) Run "cvs import e17 E start" - where 'e17' is the module in the repository I need to create, and 'E' and 'start' can be pretty much whatever you like. **WARNING** it seems there's a bug in this procedure. It misses certain files - either there's something I'm not doing right - or it's just a bit broken. You may have to add missing files manually later.
17 ) su back to root user, and then run "emerge e"
18 ) At this point emerge tries to make the CVS connection to anoncvs.enlightenment.org to check out the e17/apps/e module, but because of all the above it now thinks anoncvs.enlightenment.org is the local box, so it connects there, find your running cvsd (you did run "/etc/init.d/cvsd start" didn't you? ), and checks out the code from there into the portage tree. Voila!

Now assuming you run into the same issue as me from step 16 - with missing files in the CVS tree (you'll get failed ebuilds, probably with messages saying "No rule to make target 'blah' - required by 'foo'" then follow this step to fix it.

1 ) Look for the missing "target" (a file) in the code you copied from home.
2 ) cd to /var/lib/cvsd/<your>/<cvs>/<tree> and find look for the same file in the same place with a ",v" extension in it. Most likely it will be missing.

For example, a file Ecore_Con.h was missing in my tree when I tried to build the 'ecore' library - I looked for this file in my original copy, and found it in e17/libs/ecore/src/lib/ecore_con - when I looked at /var/lib/cvsd/lib/var/cvs/e/e17/libs/ecore/src/lib/ecore_con - I found there was no Ecore_Con.h,v file - the import process had missed it.

3) What you need to do now is manually check out the cvs tree, add the missing file, and then check it back in. I'll use my example from above again.

4 ) As my normal user, I create a 'cvsroot' directory under my home folder.
5 ) cd into ~/cvsroot
6 ) Your CVSROOT should still be exported as above - if not - go do it again.
7 ) Run "cvs co e17" - This checks out the whole of the e17 tree from my local copy of the tree.
8 ) Change into the directory with the missing file : "cd ~/cvsroot/e17/libs/ecore/src/lib/ecore_con"
9 ) Copy the missing file (from the copy you took of the tree on the other machine) to that directory :
"cp ~/source/e17/libs/ecore/src/lib/ecore_con/Ecore_Con.h ."
10 ) run "cvs add Ecore_Con.h" - this tells cvs you're adding a new file to this location in the tree.
11 ) run "cvs ci -m 'Add missing file'" - this puts the new file back into the master tree.
12 ) su to root
13 ) cd to /usr/portage/distfiles/cvs-src and remove the copy of the cvs code from there - this should force portage to re-get the code from your CVS tree
14 Just to make doubly sure - rm the /var/tmp/portage/<your-ebuild-name> copy as well.
15 ) Rerun the emerge command and cross your fingers there are no other missing files!!


Phew.

Hope all that helps. It worked here.
Back to top
View user's profile Send private message
tetienne
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 163
Location: Lille/France

PostPosted: Wed Aug 30, 2006 11:29 am    Post subject: Reply with quote

Up!

Good idea for the cvsd, but i find it quite fastidious.

I really don't understand why portage does not include a FEATURE variable to disable CVS fetching when necessary.

Does someone has another idea than the cvsd?

Thanks.
Back to top
View user's profile Send private message
Su8l1me
n00b
n00b


Joined: 25 Jan 2006
Posts: 31

PostPosted: Wed Aug 30, 2006 11:36 am    Post subject: Reply with quote

I've since found something called cvsgrab - which works provided the CVS repository implements something like ViewCVS.

You can then download the cvs tree via an HTTP Proxy. It's a bit wearisome - but at least you can get the code that way, rather than the burning it to CD at home etc.

There's no way round the cvsd bit though for a CVS based ebuild as far as I can see...
Back to top
View user's profile Send private message
tetienne
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 163
Location: Lille/France

PostPosted: Wed Aug 30, 2006 11:50 am    Post subject: Reply with quote

Getting the source is not a problem. Even if you copy sources to /usr/portage/distfiles/cvs-src/, emerge will not work and ends with a fetching error since he can not reach the cvs server.
Back to top
View user's profile Send private message
Su8l1me
n00b
n00b


Joined: 25 Jan 2006
Posts: 31

PostPosted: Wed Aug 30, 2006 1:10 pm    Post subject: Reply with quote

Hence my "you can't get around the cvsd" bit :)
Back to top
View user's profile Send private message
tetienne
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 163
Location: Lille/France

PostPosted: Thu Aug 31, 2006 11:15 pm    Post subject: Reply with quote

guilc gave me the solution on the french forum :

export ECVS_OFFLINE=1
Back to top
View user's profile Send private message
Su8l1me
n00b
n00b


Joined: 25 Jan 2006
Posts: 31

PostPosted: Fri Sep 01, 2006 6:38 am    Post subject: Reply with quote

So that lets you dump the code in /usr/portage/distfiles/cvs-src, and then run the ebuild normally ? Awesome!
Back to top
View user's profile Send private message
tetienne
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 163
Location: Lille/France

PostPosted: Fri Sep 01, 2006 9:10 am    Post subject: Reply with quote

Yes, or simply find a recent tarball on a http server when you are behind a proxy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum