Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerging without a network connection on your Gentoo box
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Tue Jun 01, 2004 6:46 pm    Post subject: Emerging without a network connection on your Gentoo box Reply with quote

I seem to be answering this question a lot in the support forums, so I thought I would chance my arm and submit it to D, T & T. I hope this isn't a duplicate...

This tip is concerned with when you have a Gentoo box that is not connected to the 'net, but you have access to another computer that is. You want to emerge stuff on the Gentoo box, but can't due to the lack of network connection. Here's what to do...

Keeping your Portage tree up to date

1 ) Go to the Gentoo site at the Oregon State university or one of it's mirrors and download the latest portage-YYYYMMDD.tar.bz2 file.

2 ) Transfer the snapshot tar.bz2 file on your choice of removable medium to the Gentoo machine.

3 ) As root, move the tar.bz2 file to the /usr/ directory.

4 ) Use the following command to untar the file...

Code:
tar -xjvpf portage-YYYYMMDD.tar.bz2


5 ) If it all went well (the -v switch should highlight any issues) then delete the tar.bz2 file.

Your Portage tree is now up to date!

Emerging packages without a network connection

1 ) Make sure you are logged in as a member of the portage group

2 ) Use the following command...

Code:
emerge -pvf foo


to return a list of mirrors for all the files you need to download the dependencies of foo and foo itself.

3 ) This will likely be a long and fairly daunting list... copy it out of the terminal window into a text file. If you are running a console only system, you may have to find a way to echo the list of files and mirrors to a text file with > or something similar, but I haven't yet found a way to do this - help would be appreciated!

4 ) Take your list of files and mirrors to your machine with the network connection, on your removable medium of choice.

5 ) For each file in the list, pick a mirror and copy the URL into your browser's address bar. Save the file onto your removable medium of choice. If the file cannot be found, as has happened to me occasionally, then the mirror or URL may be out of date. In this case revert to Google and search for the filename in question - that usually works.

6 ) When you have all the files, take them back to your Gentoo machine and copy them into /usr/portage/distfiles

7 ) Run the command

Code:
emerge foo


8 ) If you got all the files and everything went according to plan, then emerge will find all the files it needs in the /usr/portage/distfiles directory and will proceed to compile and install foo. If things go wrong somewhere along the way, check where it falls down and make sure you have downloaded the right package that it was expecting.

That should allow you to install packages without a network connection on your Gentoo machine.

The procedure is admittedly tedious, but it could be speeded up if the machine with the network connection would allow you some kind of scripting that could download all the files using wget or similar. This is left as an exercise for the reader!
_________________
My blog
nvtuner software - enhance your AGP Geforce 6800 or 6200!
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Tue Jun 01, 2004 8:23 pm    Post subject: Reply with quote

nice howto, thanks.
I think the easiest way to download all the files would be to use wget -i, that would work as long as you just put one URL on each line. Unforunately, emerge's output has the URL's only seperated by spaces, but it shouldn't be hard to fix that.
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Tue Jun 01, 2004 10:09 pm    Post subject: Reply with quote

andrewy wrote:
nice howto, thanks.
I think the easiest way to download all the files would be to use wget -i, that would work as long as you just put one URL on each line. Unforunately, emerge's output has the URL's only seperated by spaces, but it shouldn't be hard to fix that.


Well, that sort of thing depends on what OS' are available on computers that are connected to the internet. I figure it would be quite easy to pass the list through to some kind of script that ran a whole bunch of wget's, but if you're talking about a Windows XP box, then you're out of luck...
_________________
My blog
nvtuner software - enhance your AGP Geforce 6800 or 6200!
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Tue Jun 01, 2004 10:52 pm    Post subject: Reply with quote

If you're talking about a Windows XP box, the box's user is also out of luck too. ;)
But you don't need to pass it though a script with wget, "wget -i file" downloads each link in "file"
Back to top
View user's profile Send private message
djm
Arch/Herd Tester
Arch/Herd Tester


Joined: 12 Apr 2004
Posts: 690
Location: Wadham College, Oxford

PostPosted: Tue Jul 13, 2004 2:25 pm    Post subject: Reply with quote

The problem with that being that you end up downloading each file more than once

Whenever I untar the portage tree into /usr I get a whole load of crap come up the first time it calculates dependencies for emerge -upvD world (usually it says ~x86 a lot, with the occasional python, gnome etc, with has_version() in global scope: x11-themes/gtk-engines-2.2.0 being the only longer thing coming up). Until today, that's all gone away after the first run through, but it seems it doesn't anymore, and the stuff I was getting was a lot weirder.

An emerge regen seems to have taken me back to the way it used to be (i.e. I still get the error messages I used to get, but only for one emerge world)

Does this happen to anyone else/does anyone know why this is happening? Updating offline takes long enough as it is, and the first emerge world (with the junk appearing) takes longer than normal to calculate dependencies, and emerge regen takes ages
_________________
the forums.gentoo.org poster formally known as metal leper
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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