Work around snap's old cabal + new snapcraft proxy.
This commit is contained in:
parent
df0a0d41fa
commit
359b1467a2
|
@ -0,0 +1,14 @@
|
||||||
|
# In 2015, cabal-install had a http bug triggered when proxies didn't keep
|
||||||
|
# the connection open. This version made it into Ubuntu Xenial as used by
|
||||||
|
# Snapcraft. In June 2018, Snapcraft's proxy started triggering this bug.
|
||||||
|
#
|
||||||
|
# https://bugs.launchpad.net/launchpad-buildd/+bug/1797809
|
||||||
|
#
|
||||||
|
# Workaround: add more proxy
|
||||||
|
|
||||||
|
visible_hostname localhost
|
||||||
|
http_port 8888
|
||||||
|
cache_peer 10.10.10.1 parent 8222 0 no-query default
|
||||||
|
cache_peer_domain localhost !.internal
|
||||||
|
http_access allow all
|
||||||
|
|
|
@ -37,9 +37,16 @@ parts:
|
||||||
source: ./
|
source: ./
|
||||||
build-packages:
|
build-packages:
|
||||||
- cabal-install
|
- cabal-install
|
||||||
|
- squid3
|
||||||
build: |
|
build: |
|
||||||
|
# See comments in .snapsquid.conf
|
||||||
|
[ "$http_proxy" ] && {
|
||||||
|
squid3 -f .snapsquid.conf
|
||||||
|
export http_proxy="http://localhost:8888"
|
||||||
|
sleep 3
|
||||||
|
}
|
||||||
cabal sandbox init
|
cabal sandbox init
|
||||||
cabal update
|
cabal update || cat /var/log/squid/*
|
||||||
cabal install -j
|
cabal install -j
|
||||||
install: |
|
install: |
|
||||||
install -d $SNAPCRAFT_PART_INSTALL/usr/bin
|
install -d $SNAPCRAFT_PART_INSTALL/usr/bin
|
||||||
|
|
Loading…
Reference in New Issue