On a Debian Buster x86 box, download the attached two scripts and run bash mk-lumo-chroot.sh (as root).
NOTE: this isn't working.
#!/bin/bash | |
set -e -o pipefail -x | |
apt-get update | |
apt-get install -y locales wget default-jdk curl | |
dist=$HOME/dist | |
mkdir -p $dist | |
# install clojure | |
version=1.10.1.507 | |
if [ ! -e /usr/local/bin/clojure ] ; then | |
if [ ! -e $dist/linux-install-$version.sh ] ; then | |
cd $dist | |
curl -O https://download.clojure.org/install/linux-install-$version.sh | |
fi | |
bash $dist/linux-install-$version.sh | |
fi | |
# install boot | |
if [ ! -e /usr/local/bin/boot ] ; then | |
cd /usr/local/bin | |
wget https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh | |
mv boot.sh boot | |
chmod +x boot | |
fi | |
# boot complains when we run as root | |
export BOOT_AS_ROOT=yes | |
# install node.js | |
version=12.14.1 | |
if [ ! -e /opt/node-v$version-linux-x64/bin/node ] ; then | |
cd $dist | |
if [ ! -e $dist/node-v$version-linux-x64.tar.gz ] ; then | |
wget https://nodejs.org/dist/v$version/node-v$version-linux-x64.tar.gz | |
fi | |
cd /opt | |
cat $dist/node-v$version-linux-x64.tar.gz | gunzip | tar x | |
cd /usr/local/bin | |
ln -sf /opt/node-v$version-linux-x64/bin/node . | |
ln -sf /opt/node-v$version-linux-x64/bin/npm . | |
ln -sf /opt/node-v$version-linux-x64/bin/npx . | |
fi | |
export NODE_PATH=/opt/node-v$version-linux-x64/lib/node_modules/ | |
# install yarn | |
if [ ! -e /usr/local/bin/yarn ] ; then | |
npm install -g yarn@berry | |
cd /usr/local/bin | |
ln -sf /opt/node-v$version-linux-x64/bin/yarn . | |
ln -sf /opt/node-v$version-linux-x64/bin/yarnpkg . | |
fi | |
# build lumo | |
version=1.10.1 | |
if [ ! -e $dist/lumo-$version.tar.gz ] ; then | |
cd $dist | |
wget -O lumo-$version.tar.gz https://github.com/anmonteiro/lumo/archive/$version.tar.gz | |
fi | |
mkdir -p $HOME/tmp | |
cd $HOME/tmp | |
if [ ! -e lumo-$version ] ; then | |
cat $dist/lumo-$version.tar.gz | gunzip | tar x | |
fi | |
cd lumo-$version | |
# DIRTY HACKS! FIXME! | |
yarn add babel-helper-evaluate-path | |
yarn add google-closure-compiler-js@20180610.0.0 | |
npm install -g \ | |
request rollup rollup-plugin-commonjs rollup-plugin-node-resolve rollup-plugin-replace \ | |
async mkdirp request gunzip-maybe path fs tar-stream colors ncp progress child_process glob os \ | |
browserify insert-module-globals | |
npm install -g google-closure-compiler-js@20180610.0.0 | |
boot release | |
exit 0 |
#!/bin/bash | |
set -e -o pipefail -x | |
apt-get install -y debootstrap | |
dest=$HOME/lumo-builder | |
if [ ! -e $dest ] ; then | |
debootstrap buster $dest | |
fi | |
if ! mountpoint -q $dest/proc ; then | |
mount -t proc proc $dest/proc | |
fi | |
if ! mountpoint -q $dest/sys ; then | |
mount -t sysfs sysfs $dest/sys | |
fi | |
cp -a /etc/fstab /etc/hosts $dest/etc/ | |
cp -a /proc/mounts $dest/etc/mtab | |
cp -a build-lumo-buster-x86_64.sh $dest/usr/local/bin/ | |
set +e | |
chroot $dest /usr/local/bin/build-lumo-buster-x86_64.sh | |
ret=$? | |
set -e | |
umount $dest/sys | |
umount $dest/proc | |
exit $ret |
Running into an error: