Gentoo Archives: gentoo-alt

From: Rabbe Fogelholm <rabbe@×××××××.se>
To: gentoo-alt@l.g.o
Cc: ajai@××××.net, ansell.peter@×××××.com
Subject: Re: [gentoo-alt] emerge-webrsync in prefix?
Date: Wed, 26 Dec 2007 16:31:12
Message-Id: 477281BA.3000208@bahnhof.se
In Reply to: Re: [gentoo-alt] emerge-webrsync in prefix? by Fabian Groffen
1 Some weeks have passed since this issue came up; wish I'd be reading the list more
2 frequently. For whatever it's worth I remember having trouble with subversion behind
3 a corporate firewall when bootstrapping prefix Gentoo on Solaris half a year ago. I
4 used to run a script that was supposed to go unattended for many hours, and I was
5 using the code below as a workaround for the subversion issue.
6
7 When reading the code snippet you should assume that PROXYHOST is set to a hostname
8 or IP address, and PROXYPORT is a port number. And `die' is a function that makes the
9 script print a message and die of course.
10
11 Note that the first lap hangs for a couple of minutes (?) before failing, so some
12 patience is required when trying it out.
13
14
15 --------- 8< -----------------------------------------------
16 # Configure proxy for subversion, if it seems
17 # to be needed. Run this code twice: the first lap
18 # creates the config directory and files and fails
19 # because we have not done the proxy configuration;
20 # on the second lap we configure for proxy and should
21 # succeed. If we are not behind a proxy we should
22 # succeed on the first attempt.
23
24 COUNT=$((0))
25 RESULT=$((999))
26 while [ $COUNT -lt 2 -a $RESULT -ne 0 ]; do
27
28 SVNCONF=$HOME/.subversion/servers
29 TMPFILE=/tmp/setup-prefix-$$
30 if [ -n "$PROXYHOST" -a -n "$PROXYPORT" -a -f $SVNCONF ]; then
31 cat $SVNCONF \
32 | sed \
33 -e '/^\[global/,$s|^# http-proxy-host =.*|http-proxy-host = '"$PROXYHOST"'|' \
34 -e '/^\[global/,$s|^# http-proxy-port =.*|http-proxy-port = '"$PROXYPORT"'|' \
35 >$TMPFILE
36 if cmp $TMPFILE $SVNCONF >/dev/null 2>&1; then
37 rm $TMPFILE
38 else
39 mv $TMPFILE $SVNCONF
40 fi
41 fi
42
43 emerge -v --sync; RESULT=$?
44
45 COUNT=$((COUNT+1))
46 done
47
48 [ $RESULT -eq 0 ] || die "emerge --sync failed"
49 --------- 8< -----------------------------------------------
50
51 --Rabbe
52
53
54 Fabian Groffen wrote:
55 > On 03-12-2007 15:01:47 -0500, A. Khattri wrote:
56 >> On Fri, 30 Nov 2007, Peter Ansell wrote:
57 >>
58 >>> Why wouldn't an svn update to a HTTP server work from behind a
59 >>> corporate firewall? The prefix does not use rsync for emerge --sync,
60 >>> it uses subversion, if that is what you are thinking about.
61 >> I guess the firewall + proxy server combo doesn't like it:
62 >>
63 >> $ emerge --sync
64 >>>>> Starting svn update...
65 >> svn: REPORT request failed on '/svn/proj/alt/!svn/vcc/default'
66 >> svn: REPORT of '/svn/proj/alt/!svn/vcc/default': 400 Bad Request
67 >> (http://overlays.gentoo.org)
68 >
69 > Hmmm, yuck. I think it doesn't use the proxy or something. Or maybe it
70 > does:
71 >
72 > http://subversion.tigris.org/faq.html#proxy
73 >
74 > If that is what you have, then you're doomed. Unfortunately we (still)
75 > don't have any alternative to svn.
76 >
77 >
78 --
79 gentoo-alt@g.o mailing list