diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml new file mode 100644 index 0000000..b9f8335 --- /dev/null +++ b/.github/workflows/on-push.yml @@ -0,0 +1,53 @@ +name: Build image on push +on: + push: + branches: + - '*' + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + + - uses: actions/checkout@v1 + + - name: Run Apt-get update + run: sudo apt-get update + + - name: Install dependencies + run: sudo apt-get -y install quilt qemu-user-static debootstrap bsdtar + + - name: Nuke current Docker installation + run: | + sudo systemctl stop docker + sudo apt-get purge docker-ce docker-ce-cli containerd.io moby-engine moby-cli + sudo rm -rf /var/lib/docker + + - name: Re-install Docker + run: | + curl -fsSL https://get.docker.com -o get-docker.sh + sudo sh get-docker.sh + docker --version + + - name: Enable experimental features in Docker + run: | + sudo rm -rf /etc/docker/daemon.json + echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json + sudo systemctl restart docker + + - name: Run build script + run: sudo ./build.sh + + - name: Copy ZIP to current working dir + run: cp deploy/*.zip ./ + + - name: Debug current working dir + run: ls -la + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: umbr3l-lite.zip + path: ./umbr3l-lite.zip \ No newline at end of file diff --git a/.github/workflows/on-tag-only.yml b/.github/workflows/on-tag-only.yml index a5005ec..1def9d0 100644 --- a/.github/workflows/on-tag-only.yml +++ b/.github/workflows/on-tag-only.yml @@ -1,7 +1,9 @@ name: Automatically Build image on tag ONLY on: push: - tags: [ '*' ] + tags: + - v[0-9]+.[0-9]+.[0-9]+ + - v[0-9]+.[0-9]+.[0-9]+-* jobs: build: diff --git a/README.md b/README.md index f4688bf..a3a3ee7 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ For building an API (or scripting), look in `/home/umbrel/statuses` for the foll The above variables control whether or not the umbrelbox startup script is run (for SD Card safety). -If you want to overricde the checks, please delete ```service-configured``` file and add a ```disk-partitioned```, and then reinstall/configure [Umbrel Compose](https://github.com/getumbrel/umbrel-compose). Then run ```/etc/rc.local``` as root again (or restart your box) +If you want to overricde the checks, please delete ```service-configured``` file and add a ```disk-partitioned```, and then reinstall/configure [Umbrel](https://github.com/getumbrel/umbrel). Then run ```/etc/rc.local``` as root again (or restart your box) --- diff --git a/stage2/01-sys-tweaks/files/rc.local b/stage2/01-sys-tweaks/files/rc.local index 4991680..c9d048d 100755 --- a/stage2/01-sys-tweaks/files/rc.local +++ b/stage2/01-sys-tweaks/files/rc.local @@ -39,19 +39,11 @@ if [ ! -f /home/umbrel/statuses/disk-partitioned ]; then fi if [ ! -f /home/umbrel/statuses/service-configured ]; then - if [ -f /home/umbrel/bin/rpcauth.py ]; then - echo "Running rpcauth.py, and generating secrets for bitcoind" - cd /home/umbrel/bin/ - ./rpcauth.py lncm | tee /home/umbrel/secrets/generated.txt | head -2 | tail -1 > /home/umbrel/secrets/rpcauth.txt - tail -1 /home/umbrel/secrets/generated.txt > /home/umbrel/secrets/rpcpass.txt - echo "Updating bitcoin.conf" - cat /home/umbrel/secrets/rpcauth.txt >> /home/umbrel/bitcoin/bitcoin.conf - # Update RPC Passwords for both LND and INVOICER - RPCPASS=`cat /home/umbrel/secrets/rpcpass.txt` - sed -i "s/RPCPASS/${RPCPASS}/g;" /home/umbrel/docker-compose.yml - sed -i "s/RPCPASS/${RPCPASS}/g;" /home/umbrel/lnd/lnd.conf - - # Making this as done so we don't go through updates again + if [ -f /home/umbrel/configure-box.sh ]; then + echo "Running configuration script" + cd /home/umbrel + ./configure-box.sh || exit 1 + # Marking this as done so we don't do configuration again touch /home/umbrel/statuses/service-configured chown -R umbrel.umbrel /home/umbrel/statuses/service-configured fi @@ -77,7 +69,7 @@ if [ ! -f /home/umbrel/statuses/service-configured ]; then /etc/init.d/umbrelbox start fi else - echo "Disk not partitioned, will not start umbrel-compose framework (Please do it manually)" + echo "Disk not partitioned, will not start umbrel framework (Please do it manually)" fi fi diff --git a/stage2/02-net-tweaks/00-packages b/stage2/02-net-tweaks/00-packages index 96ed6d2..97eafda 100644 --- a/stage2/02-net-tweaks/00-packages +++ b/stage2/02-net-tweaks/00-packages @@ -2,7 +2,6 @@ wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libert raspberrypi-net-mods dhcpcd5 net-tools -tor libzbar-dev libzbar0 python3-pip diff --git a/stage2/05-docker-compose/01-run.sh b/stage2/05-docker-compose/01-run.sh index aebd65c..1545253 100755 --- a/stage2/05-docker-compose/01-run.sh +++ b/stage2/05-docker-compose/01-run.sh @@ -6,7 +6,7 @@ echo "Installing docker-compose from pip3, and also setting up the box folder st on_chroot << EOF pip3 install docker-compose cd /home/${FIRST_USER_NAME} -wget -qO- "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/install-box.sh" | sh +wget -qO- "https://raw.githubusercontent.com/getumbrel/umbrel/master/install-box.sh" | sh chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME} EOF @@ -31,7 +31,7 @@ cp files/compose-service ${ROOTFS_DIR}/etc/init.d/umbrelbox echo "Pulling Docker images required to run Umbrel services" -wget -q "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/docker-compose.yml" +wget -q "https://raw.githubusercontent.com/getumbrel/umbrel/master/docker-compose.yml" IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq) echo "List of images to download: $IMAGES" diff --git a/stage2/06-prepare-home-dir/01-run.sh b/stage2/06-prepare-home-dir/01-run.sh deleted file mode 100755 index 1a49868..0000000 --- a/stage2/06-prepare-home-dir/01-run.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Save password (for createwallet script). -# We will remove this later when a more suitable secure system is finalized. -touch $ROOTFS_DIR/home/$FIRST_USER_NAME/.save_password - -echo "Executables directory" -mkdir -p $ROOTFS_DIR/home/$FIRST_USER_NAME/bin - diff --git a/stage2/07-set-bitcoind-perms/01-run.sh b/stage2/07-set-bitcoind-perms/01-run.sh deleted file mode 100755 index 7177570..0000000 --- a/stage2/07-set-bitcoind-perms/01-run.sh +++ /dev/null @@ -1,10 +0,0 @@ -# TODO: configure username and password (internally) - -echo "Downloading password utility" -cd ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/bin -curl "https://raw.githubusercontent.com/bitcoin/bitcoin/master/share/rpcauth/rpcauth.py" 2>/dev/null 1>rpcauth.py -chmod 755 rpcauth.py - -on_chroot << EOF -chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME} -EOF diff --git a/stage2/08-configure-tor/01-run.sh b/stage2/08-configure-tor/01-run.sh deleted file mode 100755 index 7997ad2..0000000 --- a/stage2/08-configure-tor/01-run.sh +++ /dev/null @@ -1,6 +0,0 @@ -# TODO: configure username and password (internally) - -chmod 644 files/torrc -mkdir -p ${ROOTFS_DIR}/etc/tor/ -echo "Overriding TORRC" -cp files/torrc ${ROOTFS_DIR}/etc/tor/torrc diff --git a/stage2/08-configure-tor/files/torrc b/stage2/08-configure-tor/files/torrc deleted file mode 100644 index d9ea535..0000000 --- a/stage2/08-configure-tor/files/torrc +++ /dev/null @@ -1,21 +0,0 @@ -SocksPort 9050 # Default: Bind to localhost:9050 for local connections. - -Log notice syslog -Log debug file /var/log/tor/debug.log - -#RunAsDaemon 1 - -DataDirectory /var/lib/tor -ControlPort 9051 -# Default password for umbrel tor -HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 -# Backwards compatibility -CookieAuthentication 1 - -# Allow this for now -# TOR HOSTNAME -HiddenServiceDir /var/lib/tor/sshd -HiddenServicePort 22 127.0.0.1:22 - -HiddenServiceDir /var/lib/tor/web -HiddenServicePort 80 127.0.0.1:80