Fix snap build
This commit is contained in:
parent
55be4543f2
commit
ad3c3146f0
|
@ -1,14 +0,0 @@
|
||||||
# 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
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ description: |
|
||||||
# snap connect shellcheck:removable-media
|
# snap connect shellcheck:removable-media
|
||||||
|
|
||||||
version: git
|
version: git
|
||||||
base: core18
|
base: core20
|
||||||
grade: stable
|
grade: stable
|
||||||
confinement: strict
|
confinement: strict
|
||||||
|
|
||||||
|
@ -40,16 +40,16 @@ parts:
|
||||||
source: .
|
source: .
|
||||||
build-packages:
|
build-packages:
|
||||||
- cabal-install
|
- cabal-install
|
||||||
- squid
|
stage-packages:
|
||||||
|
- libatomic1
|
||||||
override-build: |
|
override-build: |
|
||||||
# See comments in .snapsquid.conf
|
# Give ourselves enough memory to build
|
||||||
[ "$http_proxy" ] && {
|
dd if=/dev/zero of=/tmp/swap bs=1M count=2000
|
||||||
squid3 -f .snapsquid.conf
|
mkswap /tmp/swap
|
||||||
export http_proxy="http://localhost:8888"
|
swapon /tmp/swap
|
||||||
sleep 3
|
|
||||||
}
|
|
||||||
cabal sandbox init
|
cabal sandbox init
|
||||||
cabal update || cat /var/log/squid/*
|
cabal update
|
||||||
cabal install -j
|
cabal install -j
|
||||||
|
|
||||||
install -d $SNAPCRAFT_PART_INSTALL/usr/bin
|
install -d $SNAPCRAFT_PART_INSTALL/usr/bin
|
||||||
|
|
Loading…
Reference in New Issue