garyaj has asked for the wisdom of the Perl Monks concerning the following question:

Is there a Perl module which will allow me to download a subversion trunk when my corporate firewall disables webdav's PROPFIND and only allows access through port 80? (This effectively negates the use Subversion or any of its libraries.)

Subversion's FAQs suggests port 81 (blocked in my case) or port 443 (trunk I want not available via https). And obviously SVK, SVN::Mirror and whole host of other Perl modules are ruled out because they all assume the use of the svn libs which assumes use of webdav.

I will write my own tree/trunk walker if necessary but I don't want to reinvent the wheel.

Thx

Replies are listed 'Best First'.
Re: svn without webdav
by thor (Priest) on Nov 15, 2005 at 05:17 UTC
    Subversion's FAQs suggests port 81 (blocked in my case) or port 443 (trunk I want not available via https).
    What about port 8080, which is widely accepted as the "other" http port...

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      The problem is that the corporate firewall here won't allow the PROPFIND method and svn won't run without it (even if it's just a simple checkout). I suspect there are other developers like me stuck behind firewalls with fairly draconian rules.

      It looks like this could be a useful Perl module and that's why I was asking this question just in case someone has written it already. If not, it looks like I might finally have a Perl module I can write and submit to CPAN.

        The problem is that the corporate firewall here won't allow the PROPFIND method
        In what manner is the firewall blocking it? If your place of employment has a firewall that analyzes traffic at the level that you're implying, they're either paranoid, have a lot of time on their hands, or you're misstating/misunderstanding the problem. Unless of course I'm missing something, which is entirely possible.

        thor

        Feel the white light, the light within
        Be your own disciple, fan the sparks of will
        For all of us waiting, your kingdom will come

Re: svn without webdav
by ghenry (Vicar) on Nov 15, 2005 at 08:38 UTC

    I think the only choice you have left then is some kind of tunnel. If this is only for you that is, else you need to educate the other users on this method?

    What I'd do, is if you can't SSH into your network, I'd wait until I was in the office, SSH to a machine outside your network from the server hosting the SVN repo. This would be no ordinary SSH command though. You would be creating a reverse tunnel.

    E.g. If you are on the server hosting the SVN, ssh to you machine like so:

    ssh -R 60000:_servers_internal_ip:80 you@Remote_host_ip
    So, what this means is, that I want a SSH tunnel to my "Remote_host_ip". On that machine there will be a tunnel that listens on port 60000, which comes back into your corporate network and allow you to see port 80 of the SVN server.

    All you need to do on the remote host is:

    svn co http://127.0.0.1:60000/subversion/myrepo/trunk my_repo
    That will connect to you to the SVN server, no problems.

    Bear in mind that the connection is only valid for the time the tunnel stays up. You can then use any of the SSH modules on CPAN to do this automatically with SSH public/private keys etc.

    You could also use the other server , svnserve with SSH.

    A bit of a fudge, but if the firewall is totally out of your hands, you've no choice :(

    HTH.

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!

      I have worked places where this would get you escorted to the door.

      I don't think that but so and so on PerlMonks said it was OK will fly :)

      --MidLifeXis

        The OP can use this how they wish. It's documented in the SSH manpage, so I am just sharing the knowledge ;-)

        But yes, seek permission first.

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!

        They sound like places where I’d look for the door without any escorts to help me. (Of course, I understand the constraints of sometimes just having to put, uh, food on your family.)

        Makeshifts last the longest.

Re: svn without webdav
by spatterson (Pilgrim) on Nov 15, 2005 at 11:45 UTC
    would something as simple as (ok , this isn't perl) wget -r -c -np http://... work? Recursive (-r) http download of an http directory fetching (-c) only changed files or files that don't exist locally, and (-np) not going back up into higher directories.
    just another cpan module author

      I've tried this and the typical default download is an XML file in a very simple format (<file> and <dir> tags instead of HTML links). Obviously wget can't(?) parse XML files to get the links so it can't recurse.

      So yesterday I wrote a simple Perl module which mirrors the directory tree into the current directory by parsing and extracting the links. Works nicely for the trunk I was trying to get but I'm not sure how robust it is. I'll try it out on a few more web trunks and if it's general enough I will submit it to CPAN

Re: svn without webdav
by rinceWind (Monsignor) on Nov 15, 2005 at 10:59 UTC

    You might want to look at SVK, which does work through https.

    http://svk.elixus.org/

    Update: oops - just reread your post - svk is ruled out, which is a pity.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)