on master help sign in
Merge pull request #33 from replit/revert-32-revert-31-rr-disco-dingo

Update base image from Bionic to Disco (again)

commit60050b530d9ac98db8236b56f0ba4585f54f0667 authorRadon Rosborough <radon.neon@gmail.com> dateMon 22 Jul 2019, 09:13 (7 years ago) parent173e46d1cae90a
9 files changed+51−45
.gitignore+1 Dockerfile+1−1 Dockerfile.dev+1−1 Makefile+1−1 languages/julia/main.go+1−1 languages/sqlite/compile+8−5 scripts/docker-install.sh+36−34 tests/julia/header.exp+1−1 tests/sqlite/header.exp+1−1
.gitignore+1
@@ -1,5 +1,6 @@
11plugins/
22prybar-*
3+prybar_assets/sqlite/patch.so
34deps.lst
45prybar.tar.gz
56generated_*.go
Dockerfile+1−1
@@ -1,4 +1,4 @@
1−FROM ubuntu:bionic
1+FROM ubuntu:disco
22
33COPY scripts/docker-install.sh /tmp/docker-install.sh
44RUN /tmp/docker-install.sh
Dockerfile.dev+1−1
@@ -1,4 +1,4 @@
1−FROM ubuntu:bionic
1+FROM ubuntu:disco
22
33COPY scripts/docker-install.sh /tmp/docker-install.sh
44RUN /tmp/docker-install.sh
Makefile+1−1
@@ -26,7 +26,7 @@ test: ## Run integration tests
2626
2727.PHONY: clean
2828clean: ## Remove build artifacts
29− rm -f prybar-* languages/*/generated_*.go
29+ rm -f prybar-* languages/*/generated_*.go prybar_assets/sqlite/patch.so
3030
3131.PHONY: help
3232help: ## Show this message
languages/julia/main.go+1−1
@@ -3,7 +3,7 @@ package main
33// USING_CGO
44
55/*
6−#cgo CFLAGS: -I/usr/include/julia
6+#cgo CFLAGS: -I/usr/local/include/julia
77#cgo LDFLAGS: -ljulia
88#include "pry.h"
99*/
languages/sqlite/compile+8−5
@@ -1,6 +1,9 @@
1−#!/bin/bash
1+#!/usr/bin/env bash
22
3−COMPILE_DIR=$(dirname "$0")
4−DEST_DIR=$COMPILE_DIR/../../prybar_assets/sqlite
5−mkdir $DEST_DIR
6−gcc -Wall -shared -fPIC -ldl -o $DEST_DIR/patch.so $COMPILE_DIR/patch/patch.c
3+set -e
4+set -o pipefail
5+
6+COMPILE_DIR="$(dirname "$0")"
7+DEST_DIR="$COMPILE_DIR/../../prybar_assets/sqlite"
8+mkdir -p "$DEST_DIR"
9+gcc -Wall -shared -fPIC -ldl -o "$DEST_DIR/patch.so" "$COMPILE_DIR/patch/patch.c"
scripts/docker-install.sh+36−34
@@ -3,57 +3,59 @@
33set -e
44set -o pipefail
55
6−export DEBIAN_FRONTEND=noninteractive
7−
8−apt-get update
9−apt-get install -y software-properties-common
10−add-apt-repository ppa:avsm/ppa
11−add-apt-repository ppa:kelleyk/emacs
6+cd /tmp
127
138packages="
149
15−bsdmainutils
16−build-essential
17−emacs26
18−expect
19−golang
20−libffi-dev
10+# languages
11+emacs-nox
2112liblua5.1-dev
22−libnspr4-dev
23−libreadline-dev
24−m4
2513nodejs
2614ocaml
27−opam
2815python-dev
2916python3-dev
30−ruby2.5-dev
17+ruby-dev
3118sqlite3
3219tcl-dev
20+
21+# build and test
22+bsdmainutils
23+build-essential
24+expect
25+golang
26+
27+# things we link against
28+libreadline-dev
29+
30+# needed for the version of libmozjs that we download
31+libffi-dev
32+libnspr4-dev
33+
34+# used during installation
3335wget
3436
3537"
3638
37−apt-get install -y $packages
39+export DEBIAN_FRONTEND=noninteractive
40+apt-get update
41+apt-get install -y $(grep -v "^#" <<< "$packages")
3842rm -rf /var/lib/apt/lists/*
3943
44+# The version in the Disco repos is out of date (1.0 series) and does
45+# not expose the API we need.
46+wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.1-linux-x86_64.tar.gz
47+tar -xf *.tar.gz
48+cp -R julia-*/bin/* /usr/local/bin/
49+cp -R julia-*/include/* /usr/local/include/
50+cp -R julia-*/lib/* /usr/local/lib/
51+cp -R julia-*/share/* /usr/local/share/
52+rm -rf julia-*
53+
54+# The version in the Disco repos is not compatible with cgo ("invalid
55+# flag in pkg-config --cflags: -include").
4056wget -nv https://launchpadlibrarian.net/309343863/libmozjs185-1.0_1.8.5-1.0.0+dfsg-7_amd64.deb
4157wget -nv https://launchpadlibrarian.net/309343864/libmozjs185-dev_1.8.5-1.0.0+dfsg-7_amd64.deb
42−dpkg -i libmozjs185*.deb
43−rm libmozjs185*.deb
44−
45−wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz
46−tar -xf julia-1.1.0-linux-x86_64.tar.gz
47−cp -R julia-1.1.0/bin/* /usr/bin/
48−cp -R julia-1.1.0/include/* /usr/include/
49−cp -R julia-1.1.0/lib/* /usr/lib/
50−cp -R julia-1.1.0/share/* /usr/share/
51−rm -rf julia-1.1.0*
52−
53−opam init -c ocaml-system -n --disable-sandboxing
54−cat <<"EOF" >> "$HOME/.bashrc"
55−export OPAMROOTISOK=1
56−eval "$(opam env)"
57−EOF
58+dpkg -i *.deb
59+rm *.deb
5860
5961rm /tmp/docker-install.sh
tests/julia/header.exp+1−1
@@ -3,7 +3,7 @@
33set timeout -1
44spawn ./prybar-julia -i
55match_max 100000
6−expect -exact "Version 1.1.0 (2019-01-21)"
6+expect -exact "Version 1.1.1 (2019-05-16)"
77expect -exact "--> \[0m\[0m\r\[4C\r\[4C"
88send -- ""
99expect eof
tests/sqlite/header.exp+1−1
@@ -1,4 +1,4 @@
11#!/usr/bin/expect -f
22
33spawn ./prybar-sqlite -i
4−expect -gl "-- Loading resources from /tmp/sqlite-config*\r\nSQLite version 3.22.0*\r\nEnter \".help\" for usage hints.\r\n--> "
4+expect -gl "-- Loading resources from /tmp/sqlite-config*\r\nSQLite version 3.27.2*\r\nEnter \".help\" for usage hints.\r\n--> "