View previous topic :: View next topic |
Author |
Message |
jkroon Tux's lil' helper
Joined: 15 Oct 2003 Posts: 110 Location: South Africa
|
Posted: Fri Jan 13, 2006 3:31 am Post subject: |
|
|
Nasty one. You made a small typo:
Code: | FETCHCOMMAND_TORPAGE="/usr/sbin/torpage_fetch \#{URI} \${DISTDIR}" |
should be
Code: | FETCHCOMMAND_TORPAGE="/usr/sbin/torpage_fetch \${URI} \${DISTDIR}" |
And now since it took me about a minute to spot that: There is a # before {URI} instead of a $.
Also, on the client if you want to force it to use torpage you can set the FETCHCOMMAND and RESUMECOMMAND to equal /bin/false:
Code: | FETCHCOMMAND="/bin/false"
RESUMECOMMAND="/bin/false" |
Note that once torpage has downloaded a file it still needs to be transfered from the server to the client - I do this using vsftpd on the server and wget on the client just like portage would normally do. _________________ There are 10 kinds of people in the world,
those who understand binary and who don't |
|
Back to top |
|
|
bigdave1 Tux's lil' helper
Joined: 03 May 2005 Posts: 106 Location: Raleigh, NC
|
Posted: Sun Jan 15, 2006 7:41 pm Post subject: |
|
|
Ok, I'm confused as to what I need to do... I didn't realize that I had to setup a FTP server. Are there instructions on how to setup vsftpd for this purpose or can you explain that to me? As of right now, here's what I'm getting when I try to emerge something:
Code: |
linuxclient distfiles # emerge lftp
Calculating dependencies ...done!
>>> emerge (1 of 1) net-ftp/lftp-3.0.13 to /
>>> Downloading torpage://192.168.1.4/distfiles/lftp-3.0.13.tar.bz2
Torpage is initiating fetch for lftp-3.0.13.tar.bz2 (net-ftp/lftp-3.0.13)
This is torpage on copenhagen (protocol level 0.2)
Locking for lftp-3.0.13.tar.bz2.
Obtained lock, proceeding to download
Successfully fetched files for net-ftp/lftp-3.0.13
--14:43:52-- ftp://192.168.1.4/gentoo/distfiles/lftp-3.0.13.tar.bz2
=> `/usr/portage/distfiles/lftp-3.0.13.tar.bz2'
Connecting to 192.168.1.4:21... failed: Connection refused.
>>> Downloading http://distfiles.gentoo.org/distfiles/lftp-3.0.13.tar.bz2
--14:43:53-- http://distfiles.gentoo.org/distfiles/lftp-3.0.13.tar.bz2
=> `/usr/portage/distfiles/lftp-3.0.13.tar.bz2'
Resolving distfiles.gentoo.org... 64.50.238.52, 216.165.129.135, 156.56.247.195
Connecting to distfiles.gentoo.org[64.50.238.52]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,223,604 [application/x-tar]
|
I'm guessing that I'm getting this problem due to the fact I have no FTP server setup. If you could help me setup vsftpd for this purpose, I'd greatly appreciate it.
Thanks! |
|
Back to top |
|
|
bigdave1 Tux's lil' helper
Joined: 03 May 2005 Posts: 106 Location: Raleigh, NC
|
Posted: Sun Jan 15, 2006 8:00 pm Post subject: |
|
|
Ok, I installed vsftpd, and I set the home directory of the user ftp to /usr/portage/distfiles (just took a guess, found out that must be incorrect). Now, when I do an emerge, here is what I get:
Code: | linuxclient distfiles # emerge lftp
Calculating dependencies ...done!
>>> emerge (1 of 1) net-ftp/lftp-3.0.13 to /
>>> Resuming download...
>>> Downloading torpage://192.168.1.4/distfiles/lftp-3.0.13.tar.bz2
Torpage is initiating fetch for lftp-3.0.13.tar.bz2 (net-ftp/lftp-3.0.13)
This is torpage on copenhagen (protocol level 0.2)
Locking for lftp-3.0.13.tar.bz2.
Obtained lock, proceeding to download
Successfully fetched files for net-ftp/lftp-3.0.13
--15:05:05-- ftp://192.168.1.4/gentoo/distfiles/lftp-3.0.13.tar.bz2
=> `/usr/portage/distfiles/lftp-3.0.13.tar.bz2'
Connecting to 192.168.1.4:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /gentoo/distfiles ...
No such directory `gentoo/distfiles'.
>>> Resuming download...
>>> Downloading http://distfiles.gentoo.org/distfiles/lftp-3.0.13.tar.bz2
--15:05:05-- http://distfiles.gentoo.org/distfiles/lftp-3.0.13.tar.bz2
=> `/usr/portage/distfiles/lftp-3.0.13.tar.bz2'
|
As you can see, its trying to change directories. I have not made changes to any other configuration files that I've posted before. Can you tell me what I need to change in order to make this work? I'm so close I can feel it!!!
Thanks! |
|
Back to top |
|
|
jkroon Tux's lil' helper
Joined: 15 Oct 2003 Posts: 110 Location: South Africa
|
Posted: Sun Jan 15, 2006 8:07 pm Post subject: |
|
|
Local network right? You can also use NFS.
I've changed my DISTDIR on my "server" to /home/ftp/gentoo/distfiles, and then set up vsftp to use /home/ftp as the ftp root for anonymous connections, my vsftpd.conf file looks as follows:
Code: | anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_upload_enable=NO
anonymous_enable=YES
check_shell=YES
chmod_enable=NO
chown_uploads=NO
chroot_local_user=YES
dirlist_enable=YES
download_enable=YES
force_dot_files=NO
guest_enable=YES
guest_username=nobody
hide_ids=YES
listen=YES
local_enable=NO
passwd_chroot_enable=YES
session_support=NO
syslog_enable=YES
write_enable=NO
max_per_ip=5
anon_root=/home/ftp
ftpd_banner="This is my banner, live with it."
background=YES |
On the client, my /etc/portage/mirrors file simply contains:
Code: | local torpage://pug.lan/gentoo |
_________________ There are 10 kinds of people in the world,
those who understand binary and who don't |
|
Back to top |
|
|
bigdave1 Tux's lil' helper
Joined: 03 May 2005 Posts: 106 Location: Raleigh, NC
|
Posted: Sun Jan 15, 2006 8:21 pm Post subject: |
|
|
Yes, this is a local network. However, I do not wish to use NFS. One day I might want to make this server public.
Can I not leave the DISTDIR on the server to /usr/portage/distfiles? Right now, I'm just using the example vsftpd.conf file that I copied to vsftpd.conf. And here is what my /etc/portage/mirrors file contains:
Code: |
local torpage://192.168.1.4
|
So, with all this in mind, can you tell me what I need to change in order to get this setup to work?
Thanks! |
|
Back to top |
|
|
jkroon Tux's lil' helper
Joined: 15 Oct 2003 Posts: 110 Location: South Africa
|
Posted: Sun Jan 15, 2006 8:30 pm Post subject: |
|
|
Yes you could, if you set your ftp root directory to /usr/portage it should work. Alternatively, you can use "mount --bin /usr/portage/distfiles /home/ftp/gentoo/distfiles" or something similar to make the distfiles available inside your ftp root. No, symlinks does not work. _________________ There are 10 kinds of people in the world,
those who understand binary and who don't |
|
Back to top |
|
|
bigdave1 Tux's lil' helper
Joined: 03 May 2005 Posts: 106 Location: Raleigh, NC
|
Posted: Mon Jan 16, 2006 12:54 pm Post subject: |
|
|
When I set the ftp home directory back to /home/ftp and I create /home/ftp/gentoo/distfiles and mount it as you suggested, it works! Now, the only question I have is if I need to restart the server for any reason, how do I get "mount --bin /usr/portage/distfiles /home/ftp/gentoo/distfiles" to run on startup?
Thanks! |
|
Back to top |
|
|
jkroon Tux's lil' helper
Joined: 15 Oct 2003 Posts: 110 Location: South Africa
|
Posted: Mon Jan 16, 2006 1:02 pm Post subject: |
|
|
In /etc/fstab:
Code: | /usr/portage/distfiles /home/ftp/gentoo/distfiles none bind 0 0 |
_________________ There are 10 kinds of people in the world,
those who understand binary and who don't |
|
Back to top |
|
|
greboide n00b
Joined: 06 Dec 2005 Posts: 37
|
Posted: Sat Aug 05, 2006 3:12 am Post subject: |
|
|
i would just like to thank linkfromthepast cause his script works like a charm here with no hasslesz, also thanks to the guy who initiated this stuff cause it really is needed, and sorry for ressurecting threads but this thing worked so well here that i had to leave a report, btw i only use 2 pcs. |
|
Back to top |
|
|
|
|
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
|
|