Dwonload from Sourceforge

43 views
Skip to first unread message

Varad Gupta

unread,
Dec 28, 2011, 12:05:02 AM12/28/11
to opensource-projects
Dear All

I got stuck in an issue yesterday and thought I should share it with all of you. Maybe you know this already, but still

I had to download a project from sourceforge. The problem was that the project downloaded an installer, which would then connect to the Internet and download/install the required files form the sourceforge repo.

I could not do this, as this would have created a problem during office hours on the shared network, leading to a very long installation time. git-pull for this project was not what I was looking at.

The solution was to download the project as-is from SourceForge.

The procedure is ->

a) register at sourceforge, create a username/passwd etc
b) once you are a user, you can then use rsync/scp/sftp to download the projects of your choice from web.sourceforge.net

This seemed to be OK, but then on the terminal rsync and scp failed, because I could not browse the exact folder of the projects to download
sftp was good, but it would not let me download recursively (with folders and subfolders) under a parent directory

so the solution was lftp and this is what worked ->

$lftp sftp://[username]@web.sourceforge.net
password: xxxxx

lftp-prompt -> cd [/project/folder/path]
lftp-prompt -> mirror

The mirror command in lftp copies recursively from remote server to local. 

It helped me - so I wanted to share this with you

Regards

Rajveer Singh

unread,
Dec 28, 2011, 12:59:49 AM12/28/11
to opensourc...@googlegroups.com
Wonderful tips.. Thank you so much sir for sharing such a good tip.

--
You received this message because you are subscribed to the Google Groups "Opensource Projects" group.
To post to this group, send an email to opensourc...@googlegroups.com.
To unsubscribe from this group, send email to opensource-proj...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensource-projects?hl=en-GB.

Richard Hamel-Smith

unread,
Dec 28, 2011, 5:57:19 AM12/28/11
to opensourc...@googlegroups.com
Hmm, I use rsync a LOT and it has never failed to copy files recursively.

Usually, I use the options

rsync -auv rsync://source/* destination/

The trailing slash is IMPORTANT.

The 'auv' works for me all the time.

Perhaps, you might try it again sometime.

Richard

--
Richard Hamel-Smith
cel: (868) 763-2049
email: richardh...@gmail.com

Varad Gupta

unread,
Dec 28, 2011, 6:24:41 AM12/28/11
to opensourc...@googlegroups.com
That was not the issue. The issue was that the path that we needed to copy from was somehow not the same on rsync/scp (through the cmd line) - maybe due to soft/hard links or chrooting etc in the sourceforge directory tree.

the error that I was receiving when using rsync/scp was ==>

rsync: link_stat "/home/xx/yy" failed: No such file or directory (2)


Regards
Regards

Varad Gupta
CTO
Keen & Able Computers Pvt Ltd
www.keenable.in


Richard Hamel-Smith

unread,
Dec 28, 2011, 7:18:06 AM12/28/11
to opensourc...@googlegroups.com
That's very interesting.

Searching through the man page, I find

This would transfer all files matching the pattern *.c from the
current directory to the directory src on the machine foo. If any of
the files already exist
on the remote system then the rsync remote-update protocol is
used to update the file by sending only the differences. See the tech
report for details.

rsync -avz foo:src/bar /data/tmp


This would recursively transfer all files from the directory
src/bar on the machine foo into the /data/tmp/bar directory on the
local machine. The files are
transferred in "archive" mode, which ensures that symbolic
links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Addition-
ally, compression will be used to reduce the size of data
portions of the transfer.

rsync -avz foo:src/bar/ /data/tmp


A trailing slash on the source changes this behavior to avoid
creating an additional directory level at the destination. You can
think of a trailing / on a
source as meaning "copy the contents of this directory" as
opposed to "copy the directory by name", but in both cases the
attributes of the containing direc-
tory are transferred to the containing directory on the
destination. In other words, each of the following commands copies
the files in the same way, includ-
ing their setting of the attributes of /dest/foo:

rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo


It seems that rsync does copy links.

Just for the knowledge to be gained, would you try the -auv option and
let us know the result? It may help someone else in the future.

Richard

Reply all
Reply to author
Forward
0 new messages