diff --git a/.sandstorm/Vagrantfile b/.sandstorm/Vagrantfile index 101fb02..5567d65 100644 --- a/.sandstorm/Vagrantfile +++ b/.sandstorm/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +# CAUTION: DO NOT MAKE CHANGES TO THIS FILE. The vagrant-spk upgradevm process will overwrite it. + # Guess at a reasonable name for the VM based on the folder vagrant-spk is # run from. The timestamp is there to avoid conflicts if you have multiple # folders with the same name. @@ -9,8 +11,18 @@ VM_NAME = File.basename(File.dirname(File.dirname(__FILE__))) + "_sandstorm_#{Ti # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" +# ugly hack to prevent hashicorp's bitrot. See https://github.com/hashicorp/vagrant/issues/9442 +# this setting is required for pre-2.0 vagrant, but causes an error as of 2.0.3, +# remove entirely when confident nobody uses vagrant 1.x for anything. +unless Vagrant::DEFAULT_SERVER_URL.frozen? + Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') +end + Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "sandstorm/debian-jessie64" + # Base on the Sandstorm snapshots of the official Debian 9 (stretch) box with vboxsf support. + config.vm.box = "debian/contrib-stretch64" + config.vm.post_up_message = "Your virtual server is running at http://local.sandstorm.io:6090." + if Vagrant.has_plugin?("vagrant-vbguest") then # vagrant-vbguest is a Vagrant plugin that upgrades @@ -21,10 +33,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.guest = "debian" end - # We forward port 6080, the Sandstorm web port, so that developers can - # visit their sandstorm app from their browser as local.sandstorm.io:6080 - # (aka 127.0.0.1:6080). - config.vm.network :forwarded_port, guest: 6080, host: 6080 + # We forward port 6090, the vagrant-spk web port, so that developers can + # visit their Sandstorm app from their browser as local.sandstorm.io:6090 + # (aka 127.0.0.1:6090). + config.vm.network :forwarded_port, guest: 6090, host: 6090, host_ip: "127.0.0.1" # Use a shell script to "provision" the box. This installs Sandstorm using # the bundled installer. @@ -49,12 +61,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| cpus = `nproc`.to_i total_kB_ram = `grep MemTotal /proc/meminfo | awk '{print $2}'`.to_i elsif host =~ /mingw/ - # powershell may not be available on Windows XP and Vista, so wrap this in a rescue block - begin - cpus = `powershell -Command "(Get-WmiObject Win32_Processor -Property NumberOfLogicalProcessors | Select-Object -Property NumberOfLogicalProcessors | Measure-Object NumberOfLogicalProcessors -Sum).Sum"`.to_i - total_kB_ram = `powershell -Command "Get-CimInstance -class cim_physicalmemory | % $_.Capacity}"`.to_i / 1024 - rescue - end + cpus = `powershell -Command "(Get-WmiObject Win32_Processor -Property NumberOfLogicalProcessors | Select-Object -Property NumberOfLogicalProcessors | Measure-Object NumberOfLogicalProcessors -Sum).Sum"`.to_i + total_kB_ram = `powershell -Command "[math]::Round((Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory)"`.to_i / 1024 end # Use the same number of CPUs within Vagrant as the system, with 1 # as a default. @@ -78,18 +86,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vb.cpus = cpus vb.memory = assign_ram_mb vb.name = VM_NAME + vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"] + # /opt/app and /host-dot-sandstorm are used by vagrant-spk override.vm.synced_folder "..", "/opt/app" override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm" - override.vm.synced_folder "..", "/vagrant" + # /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the + # line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want. + override.vm.synced_folder "..", "/vagrant", disabled: true end config.vm.provider :libvirt do |libvirt, override| libvirt.cpus = cpus libvirt.memory = assign_ram_mb libvirt.default_prefix = VM_NAME + # /opt/app and /host-dot-sandstorm are used by vagrant-spk override.vm.synced_folder "..", "/opt/app", type: "9p", accessmode: "passthrough" override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm", type: "9p", accessmode: "passthrough" - override.vm.synced_folder "..", "/vagrant", type: "9p", accessmode: "passthrough" + # /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the + # line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want. + override.vm.synced_folder "..", "/vagrant", type: "9p", accessmode: "passthrough", disabled: true end end diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh old mode 100644 new mode 100755 diff --git a/.sandstorm/global-setup.sh b/.sandstorm/global-setup.sh old mode 100644 new mode 100755 index bb20fbb..288c580 --- a/.sandstorm/global-setup.sh +++ b/.sandstorm/global-setup.sh @@ -1,21 +1,40 @@ #!/bin/bash set -euo pipefail +# CAUTION: DO NOT MAKE CHANGES TO THIS FILE. The vagrant-spk upgradevm process will overwrite it. +# App-specific setup should be done in the setup.sh file. + +# Set options for curl. Since we only want to show errors from these curl commands, we also use +# 'cat' to buffer the output; for more information: +# https://github.com/sandstorm-io/vagrant-spk/issues/158 + CURL_OPTS="--silent --show-error" echo localhost > /etc/hostname hostname localhost -curl $CURL_OPTS https://install.sandstorm.io/ > /host-dot-sandstorm/caches/install.sh + +# Grub updates don't silent install well +apt-mark hold grub-pc +apt-get update +apt-get upgrade -y + +# Install curl that is needed below. +apt-get install -y curl + +# The following line copies stderr through stderr to cat without accidentally leaving it in the +# output file. Be careful when changing. See: https://github.com/sandstorm-io/vagrant-spk/pull/159 +curl $CURL_OPTS https://install.sandstorm.io/ 2>&1 > /host-dot-sandstorm/caches/install.sh | cat + SANDSTORM_CURRENT_VERSION=$(curl $CURL_OPTS -f "https://install.sandstorm.io/dev?from=0&type=install") SANDSTORM_PACKAGE="sandstorm-$SANDSTORM_CURRENT_VERSION.tar.xz" if [[ ! -f /host-dot-sandstorm/caches/$SANDSTORM_PACKAGE ]] ; then echo -n "Downloading Sandstorm version ${SANDSTORM_CURRENT_VERSION}..." - curl $CURL_OPTS --output "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE.partial" "https://dl.sandstorm.io/$SANDSTORM_PACKAGE" + curl $CURL_OPTS --output "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE.partial" "https://dl.sandstorm.io/$SANDSTORM_PACKAGE" 2>&1 | cat mv "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE.partial" "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" echo "...done." fi if [ ! -e /opt/sandstorm/latest/sandstorm ] ; then echo -n "Installing Sandstorm version ${SANDSTORM_CURRENT_VERSION}..." - bash /host-dot-sandstorm/caches/install.sh -d -e "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" >/dev/null + bash /host-dot-sandstorm/caches/install.sh -d -e -p 6090 "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" >/dev/null echo "...done." fi modprobe ip_tables @@ -32,3 +51,5 @@ GATEWAY_IP=$(ip route | grep ^default | cut -d ' ' -f 3) if nc -z "$GATEWAY_IP" 3142 ; then echo "Acquire::http::Proxy \"http://$GATEWAY_IP:3142\";" > /etc/apt/apt.conf.d/80httpproxy fi +# Configure apt to retry fetching things that fail to download. +echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80sandstorm-retry diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh old mode 100644 new mode 100755 index 2347b96..ecb1298 --- a/.sandstorm/launcher.sh +++ b/.sandstorm/launcher.sh @@ -2,7 +2,7 @@ # Create a bunch of folders under the clean /var that php and nginx expect to exist mkdir -p /var/lib/nginx -mkdir -p /var/lib/php5/sessions +mkdir -p /var/lib/php7.0/sessions mkdir -p /var/log mkdir -p /var/log/nginx mkdir -p /var/www @@ -12,10 +12,10 @@ rm -rf /var/run mkdir -p /var/run # Spawn php -/usr/sbin/php5-fpm --nodaemonize --fpm-config /etc/php5/fpm/php-fpm.conf & +/usr/sbin/php-fpm7.0 -R --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf & # Wait until php have bound its socket, indicating readiness -while [ ! -e /var/run/php5-fpm.sock ] ; do - echo "waiting for php5-fpm to be available at /var/run/php5-fpm.sock" +while [ ! -e /var/run/php-fpm7.0.sock ] ; do + echo "waiting for php-fpm7.0 to be available at /var/run/php-fpm7.0.sock" sleep .2 done diff --git a/.sandstorm/sandstorm-files.list b/.sandstorm/sandstorm-files.list index ee35593..b591516 100644 --- a/.sandstorm/sandstorm-files.list +++ b/.sandstorm/sandstorm-files.list @@ -17,14 +17,9 @@ bin/sleep bin/touch etc/bash.bashrc etc/bash_completion.d -etc/bash_completion.d/debconf etc/bash_completion.d/dkms etc/bash_completion.d/git-prompt etc/bash_completion.d/grub -etc/bash_completion.d/initramfs-tools -etc/bash_completion.d/insserv -etc/bash_completion.d/pygmentize -etc/bash_completion.d/whiptail etc/group etc/init.d etc/inputrc @@ -37,92 +32,135 @@ etc/nginx/fastcgi_params etc/nginx/mime.types etc/nginx/nginx.conf etc/nginx/sites-enabled -etc/php5/fpm/conf.d -etc/php5/fpm/conf.d/05-opcache.ini -etc/php5/fpm/conf.d/10-pdo.ini -etc/php5/fpm/conf.d/20-curl.ini -etc/php5/fpm/conf.d/20-json.ini -etc/php5/fpm/conf.d/20-leveldb.ini -etc/php5/fpm/conf.d/20-readline.ini -etc/php5/fpm/php-fpm.conf -etc/php5/fpm/php.ini -etc/php5/fpm/pool.d -etc/php5/fpm/pool.d/www.conf -etc/php5/mods-available/curl.ini -etc/php5/mods-available/json.ini -etc/php5/mods-available/leveldb.ini -etc/php5/mods-available/opcache.ini -etc/php5/mods-available/pdo.ini -etc/php5/mods-available/readline.ini +etc/php/7.0/fpm/conf.d +etc/php/7.0/fpm/conf.d/10-opcache.ini +etc/php/7.0/fpm/conf.d/10-pdo.ini +etc/php/7.0/fpm/conf.d/15-xml.ini +etc/php/7.0/fpm/conf.d/20-calendar.ini +etc/php/7.0/fpm/conf.d/20-ctype.ini +etc/php/7.0/fpm/conf.d/20-curl.ini +etc/php/7.0/fpm/conf.d/20-dom.ini +etc/php/7.0/fpm/conf.d/20-exif.ini +etc/php/7.0/fpm/conf.d/20-fileinfo.ini +etc/php/7.0/fpm/conf.d/20-ftp.ini +etc/php/7.0/fpm/conf.d/20-gettext.ini +etc/php/7.0/fpm/conf.d/20-iconv.ini +etc/php/7.0/fpm/conf.d/20-json.ini +etc/php/7.0/fpm/conf.d/20-leveldb.ini +etc/php/7.0/fpm/conf.d/20-phar.ini +etc/php/7.0/fpm/conf.d/20-posix.ini +etc/php/7.0/fpm/conf.d/20-readline.ini +etc/php/7.0/fpm/conf.d/20-shmop.ini +etc/php/7.0/fpm/conf.d/20-simplexml.ini +etc/php/7.0/fpm/conf.d/20-sockets.ini +etc/php/7.0/fpm/conf.d/20-sysvmsg.ini +etc/php/7.0/fpm/conf.d/20-sysvsem.ini +etc/php/7.0/fpm/conf.d/20-sysvshm.ini +etc/php/7.0/fpm/conf.d/20-tokenizer.ini +etc/php/7.0/fpm/conf.d/20-wddx.ini +etc/php/7.0/fpm/conf.d/20-xmlreader.ini +etc/php/7.0/fpm/conf.d/20-xmlwriter.ini +etc/php/7.0/fpm/conf.d/20-xsl.ini +etc/php/7.0/fpm/php-fpm.conf +etc/php/7.0/fpm/php.ini +etc/php/7.0/fpm/pool.d +etc/php/7.0/fpm/pool.d/www.conf +etc/php/7.0/mods-available/calendar.ini +etc/php/7.0/mods-available/ctype.ini +etc/php/7.0/mods-available/curl.ini +etc/php/7.0/mods-available/dom.ini +etc/php/7.0/mods-available/exif.ini +etc/php/7.0/mods-available/fileinfo.ini +etc/php/7.0/mods-available/ftp.ini +etc/php/7.0/mods-available/gettext.ini +etc/php/7.0/mods-available/iconv.ini +etc/php/7.0/mods-available/json.ini +etc/php/7.0/mods-available/leveldb.ini +etc/php/7.0/mods-available/opcache.ini +etc/php/7.0/mods-available/pdo.ini +etc/php/7.0/mods-available/phar.ini +etc/php/7.0/mods-available/posix.ini +etc/php/7.0/mods-available/readline.ini +etc/php/7.0/mods-available/shmop.ini +etc/php/7.0/mods-available/simplexml.ini +etc/php/7.0/mods-available/sockets.ini +etc/php/7.0/mods-available/sysvmsg.ini +etc/php/7.0/mods-available/sysvsem.ini +etc/php/7.0/mods-available/sysvshm.ini +etc/php/7.0/mods-available/tokenizer.ini +etc/php/7.0/mods-available/wddx.ini +etc/php/7.0/mods-available/xml.ini +etc/php/7.0/mods-available/xmlreader.ini +etc/php/7.0/mods-available/xmlwriter.ini +etc/php/7.0/mods-available/xsl.ini etc/profile etc/profile.d etc/profile.d/bash_completion.sh etc/ssl/openssl.cnf lib/terminfo/d/dumb lib/terminfo/x/xterm-256color -lib/x86_64-linux-gnu/ld-2.19.so +lib/x86_64-linux-gnu/ld-2.24.so lib/x86_64-linux-gnu/libacl.so.1 lib/x86_64-linux-gnu/libacl.so.1.1.0 +lib/x86_64-linux-gnu/libapparmor.so.1 +lib/x86_64-linux-gnu/libapparmor.so.1.4.0 lib/x86_64-linux-gnu/libattr.so.1 lib/x86_64-linux-gnu/libattr.so.1.1.0 lib/x86_64-linux-gnu/libaudit.so.1 lib/x86_64-linux-gnu/libaudit.so.1.0.0 lib/x86_64-linux-gnu/libbsd.so.0 -lib/x86_64-linux-gnu/libbsd.so.0.7.0 +lib/x86_64-linux-gnu/libbsd.so.0.8.3 lib/x86_64-linux-gnu/libbz2.so.1.0 lib/x86_64-linux-gnu/libbz2.so.1.0.4 -lib/x86_64-linux-gnu/libc-2.19.so +lib/x86_64-linux-gnu/libc-2.24.so lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/libcom_err.so.2 lib/x86_64-linux-gnu/libcom_err.so.2.1 -lib/x86_64-linux-gnu/libcrypt-2.19.so +lib/x86_64-linux-gnu/libcrypt-2.24.so lib/x86_64-linux-gnu/libcrypt.so.1 -lib/x86_64-linux-gnu/libdl-2.19.so +lib/x86_64-linux-gnu/libdl-2.24.so lib/x86_64-linux-gnu/libdl.so.2 lib/x86_64-linux-gnu/libexpat.so.1 -lib/x86_64-linux-gnu/libexpat.so.1.6.0 lib/x86_64-linux-gnu/libgcc_s.so.1 lib/x86_64-linux-gnu/libgcrypt.so.20 -lib/x86_64-linux-gnu/libgcrypt.so.20.0.3 +lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 lib/x86_64-linux-gnu/libgpg-error.so.0 -lib/x86_64-linux-gnu/libgpg-error.so.0.13.0 -lib/x86_64-linux-gnu/libjson-c.so.2 -lib/x86_64-linux-gnu/libjson-c.so.2.0.0 +lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 +lib/x86_64-linux-gnu/libidn.so.11 +lib/x86_64-linux-gnu/libidn.so.11.6.16 lib/x86_64-linux-gnu/libkeyutils.so.1 lib/x86_64-linux-gnu/libkeyutils.so.1.5 lib/x86_64-linux-gnu/liblzma.so.5 -lib/x86_64-linux-gnu/liblzma.so.5.0.0 -lib/x86_64-linux-gnu/libm-2.19.so +lib/x86_64-linux-gnu/liblzma.so.5.2.2 +lib/x86_64-linux-gnu/libm-2.24.so lib/x86_64-linux-gnu/libm.so.6 lib/x86_64-linux-gnu/libncurses.so.5 lib/x86_64-linux-gnu/libncurses.so.5.9 -lib/x86_64-linux-gnu/libnsl-2.19.so +lib/x86_64-linux-gnu/libnsl-2.24.so lib/x86_64-linux-gnu/libnsl.so.1 -lib/x86_64-linux-gnu/libnss_compat-2.19.so +lib/x86_64-linux-gnu/libnss_compat-2.24.so lib/x86_64-linux-gnu/libnss_compat.so.2 -lib/x86_64-linux-gnu/libnss_dns-2.19.so +lib/x86_64-linux-gnu/libnss_dns-2.24.so lib/x86_64-linux-gnu/libnss_dns.so.2 -lib/x86_64-linux-gnu/libnss_files-2.19.so +lib/x86_64-linux-gnu/libnss_files-2.24.so lib/x86_64-linux-gnu/libnss_files.so.2 -lib/x86_64-linux-gnu/libnss_nis-2.19.so +lib/x86_64-linux-gnu/libnss_nis-2.24.so lib/x86_64-linux-gnu/libnss_nis.so.2 lib/x86_64-linux-gnu/libpam.so.0 lib/x86_64-linux-gnu/libpam.so.0.83.1 lib/x86_64-linux-gnu/libpcre.so.3 -lib/x86_64-linux-gnu/libpcre.so.3.13.1 -lib/x86_64-linux-gnu/libpng12.so.0 -lib/x86_64-linux-gnu/libpng12.so.0.50.0 +lib/x86_64-linux-gnu/libpcre.so.3.13.3 lib/x86_64-linux-gnu/libpopt.so.0 lib/x86_64-linux-gnu/libpopt.so.0.0.0 -lib/x86_64-linux-gnu/libpthread-2.19.so +lib/x86_64-linux-gnu/libpthread-2.24.so lib/x86_64-linux-gnu/libpthread.so.0 -lib/x86_64-linux-gnu/libresolv-2.19.so +lib/x86_64-linux-gnu/libresolv-2.24.so lib/x86_64-linux-gnu/libresolv.so.2 -lib/x86_64-linux-gnu/librt-2.19.so +lib/x86_64-linux-gnu/librt-2.24.so lib/x86_64-linux-gnu/librt.so.1 lib/x86_64-linux-gnu/libselinux.so.1 lib/x86_64-linux-gnu/libsystemd.so.0 -lib/x86_64-linux-gnu/libsystemd.so.0.3.1 +lib/x86_64-linux-gnu/libsystemd.so.0.17.0 lib/x86_64-linux-gnu/libtinfo.so.5 lib/x86_64-linux-gnu/libtinfo.so.5.9 lib/x86_64-linux-gnu/libz.so.1 @@ -5035,6 +5073,7 @@ opt/app/dokuwiki/vendor/composer/autoload_files.php opt/app/dokuwiki/vendor/composer/autoload_namespaces.php opt/app/dokuwiki/vendor/composer/autoload_psr4.php opt/app/dokuwiki/vendor/composer/autoload_real.php +opt/app/dokuwiki/vendor/composer/autoload_static.php opt/app/dokuwiki/vendor/composer/installed.json opt/app/dokuwiki/vendor/easybook opt/app/dokuwiki/vendor/easybook/geshi @@ -5312,27 +5351,45 @@ sandstorm-http-bridge-config sandstorm-manifest usr/bin/file usr/bin/find +usr/bin/groups usr/bin/id usr/bin/rsync usr/bin/touch usr/bin/whoami usr/bin/xargs usr/lib/git-core/git-sh-prompt -usr/lib/libqdbm.so.14 -usr/lib/libqdbm.so.14.14.0 -usr/lib/libsnappy.so.1 -usr/lib/libsnappy.so.1.2.1 usr/lib/locale/locale-archive -usr/lib/php5/20131226/curl.so -usr/lib/php5/20131226/json.so -usr/lib/php5/20131226/leveldb.so -usr/lib/php5/20131226/opcache.so -usr/lib/php5/20131226/pdo.so -usr/lib/php5/20131226/readline.so +usr/lib/php/20151012/calendar.so +usr/lib/php/20151012/ctype.so +usr/lib/php/20151012/curl.so +usr/lib/php/20151012/dom.so +usr/lib/php/20151012/exif.so +usr/lib/php/20151012/fileinfo.so +usr/lib/php/20151012/ftp.so +usr/lib/php/20151012/gettext.so +usr/lib/php/20151012/iconv.so +usr/lib/php/20151012/json.so +usr/lib/php/20151012/leveldb.so +usr/lib/php/20151012/opcache.so +usr/lib/php/20151012/pdo.so +usr/lib/php/20151012/phar.so +usr/lib/php/20151012/posix.so +usr/lib/php/20151012/readline.so +usr/lib/php/20151012/shmop.so +usr/lib/php/20151012/simplexml.so +usr/lib/php/20151012/sockets.so +usr/lib/php/20151012/sysvmsg.so +usr/lib/php/20151012/sysvsem.so +usr/lib/php/20151012/sysvshm.so +usr/lib/php/20151012/tokenizer.so +usr/lib/php/20151012/wddx.so +usr/lib/php/20151012/xml.so +usr/lib/php/20151012/xmlreader.so +usr/lib/php/20151012/xmlwriter.so +usr/lib/php/20151012/xsl.so usr/lib/ssl/openssl.cnf usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache usr/lib/x86_64-linux-gnu/libGeoIP.so.1 -usr/lib/x86_64-linux-gnu/libGeoIP.so.1.6.2 usr/lib/x86_64-linux-gnu/libX11.so.6 usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 usr/lib/x86_64-linux-gnu/libXau.so.6 @@ -5341,37 +5398,39 @@ usr/lib/x86_64-linux-gnu/libXdmcp.so.6 usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 usr/lib/x86_64-linux-gnu/libXpm.so.4 usr/lib/x86_64-linux-gnu/libXpm.so.4.11.0 -usr/lib/x86_64-linux-gnu/libapparmor.so.1 -usr/lib/x86_64-linux-gnu/libapparmor.so.1.2.0 -usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 +usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2 +usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 usr/lib/x86_64-linux-gnu/libcurl.so.4 -usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0 +usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 usr/lib/x86_64-linux-gnu/libdb-5.3.so usr/lib/x86_64-linux-gnu/libedit.so.2 -usr/lib/x86_64-linux-gnu/libedit.so.2.0.51 +usr/lib/x86_64-linux-gnu/libedit.so.2.0.55 usr/lib/x86_64-linux-gnu/libexslt.so.0 usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 usr/lib/x86_64-linux-gnu/libffi.so.6 -usr/lib/x86_64-linux-gnu/libffi.so.6.0.2 +usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 usr/lib/x86_64-linux-gnu/libfontconfig.so.1 usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0 usr/lib/x86_64-linux-gnu/libfreetype.so.6 -usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1 usr/lib/x86_64-linux-gnu/libgd.so.3 -usr/lib/x86_64-linux-gnu/libgd.so.3.0.0 usr/lib/x86_64-linux-gnu/libgmp.so.10 -usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0 -usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 -usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28.41.0 +usr/lib/x86_64-linux-gnu/libgmp.so.10.3.2 +usr/lib/x86_64-linux-gnu/libgnutls.so.30 +usr/lib/x86_64-linux-gnu/libgnutls.so.30.13.1 usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 -usr/lib/x86_64-linux-gnu/libhogweed.so.2 -usr/lib/x86_64-linux-gnu/libhogweed.so.2.5 -usr/lib/x86_64-linux-gnu/libidn.so.11 -usr/lib/x86_64-linux-gnu/libidn.so.11.6.12 +usr/lib/x86_64-linux-gnu/libhogweed.so.4 +usr/lib/x86_64-linux-gnu/libhogweed.so.4.3 +usr/lib/x86_64-linux-gnu/libicudata.so.57 +usr/lib/x86_64-linux-gnu/libicudata.so.57.1 +usr/lib/x86_64-linux-gnu/libicui18n.so.57 +usr/lib/x86_64-linux-gnu/libicui18n.so.57.1 +usr/lib/x86_64-linux-gnu/libicuuc.so.57 +usr/lib/x86_64-linux-gnu/libicuuc.so.57.1 +usr/lib/x86_64-linux-gnu/libidn2.so.0 +usr/lib/x86_64-linux-gnu/libidn2.so.0.1.4 usr/lib/x86_64-linux-gnu/libjbig.so.0 usr/lib/x86_64-linux-gnu/libjpeg.so.62 -usr/lib/x86_64-linux-gnu/libjpeg.so.62.1.0 usr/lib/x86_64-linux-gnu/libk5crypto.so.3 usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 usr/lib/x86_64-linux-gnu/libkrb5.so.3 @@ -5379,42 +5438,48 @@ usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 usr/lib/x86_64-linux-gnu/libkrb5support.so.0 usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 -usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.3 +usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.7 usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 -usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.3 +usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.7 usr/lib/x86_64-linux-gnu/libleveldb.so.1 -usr/lib/x86_64-linux-gnu/libleveldb.so.1.17 +usr/lib/x86_64-linux-gnu/libleveldb.so.1.18 +usr/lib/x86_64-linux-gnu/liblz4.so.1 +usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1 usr/lib/x86_64-linux-gnu/libmagic.so.1 usr/lib/x86_64-linux-gnu/libmagic.so.1.0.0 -usr/lib/x86_64-linux-gnu/libnettle.so.4 -usr/lib/x86_64-linux-gnu/libnettle.so.4.7 -usr/lib/x86_64-linux-gnu/libonig.so.2 -usr/lib/x86_64-linux-gnu/libonig.so.2.0.1 +usr/lib/x86_64-linux-gnu/libnettle.so.6 +usr/lib/x86_64-linux-gnu/libnettle.so.6.3 +usr/lib/x86_64-linux-gnu/libnghttp2.so.14 +usr/lib/x86_64-linux-gnu/libnghttp2.so.14.12.3 usr/lib/x86_64-linux-gnu/libp11-kit.so.0 -usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0 +usr/lib/x86_64-linux-gnu/libp11-kit.so.0.2.0 +usr/lib/x86_64-linux-gnu/libpsl.so.5 +usr/lib/x86_64-linux-gnu/libpsl.so.5.1.1 usr/lib/x86_64-linux-gnu/librtmp.so.1 usr/lib/x86_64-linux-gnu/libsasl2.so.2 usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 +usr/lib/x86_64-linux-gnu/libsnappy.so.1 +usr/lib/x86_64-linux-gnu/libsnappy.so.1.3.0 usr/lib/x86_64-linux-gnu/libssh2.so.1 usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1 -usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 +usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 +usr/lib/x86_64-linux-gnu/libssl.so.1.1 usr/lib/x86_64-linux-gnu/libstdc++.so.6 -usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 +usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 usr/lib/x86_64-linux-gnu/libtasn1.so.6 -usr/lib/x86_64-linux-gnu/libtasn1.so.6.3.2 +usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.3 usr/lib/x86_64-linux-gnu/libtiff.so.5 -usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0 -usr/lib/x86_64-linux-gnu/libvpx.so.1 -usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0 +usr/lib/x86_64-linux-gnu/libunistring.so.0 +usr/lib/x86_64-linux-gnu/libunistring.so.0.1.2 usr/lib/x86_64-linux-gnu/libxcb.so.1 usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 usr/lib/x86_64-linux-gnu/libxml2.so.2 -usr/lib/x86_64-linux-gnu/libxml2.so.2.9.1 +usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 usr/lib/x86_64-linux-gnu/libxslt.so.1 -usr/lib/x86_64-linux-gnu/libxslt.so.1.1.28 +usr/lib/x86_64-linux-gnu/libxslt.so.1.1.29 usr/sbin/grub-bios-setup usr/sbin/nginx -usr/sbin/php5-fpm +usr/sbin/php-fpm7.0 usr/share/bash-completion/bash_completion usr/share/file/magic.mgc usr/share/locale/locale.alias @@ -5450,14 +5515,17 @@ usr/share/zoneinfo/Africa/Libreville usr/share/zoneinfo/Africa/Lome usr/share/zoneinfo/Africa/Luanda usr/share/zoneinfo/Africa/Lubumbashi +usr/share/zoneinfo/Africa/Lusaka usr/share/zoneinfo/Africa/Malabo usr/share/zoneinfo/Africa/Maputo usr/share/zoneinfo/Africa/Maseru +usr/share/zoneinfo/Africa/Mbabane usr/share/zoneinfo/Africa/Mogadishu usr/share/zoneinfo/Africa/Nairobi usr/share/zoneinfo/Africa/Niamey usr/share/zoneinfo/Africa/Nouakchott usr/share/zoneinfo/Africa/Ouagadougou +usr/share/zoneinfo/Africa/Porto-Novo usr/share/zoneinfo/Africa/Sao_Tome usr/share/zoneinfo/Africa/Timbuktu usr/share/zoneinfo/Africa/Tripoli @@ -5478,6 +5546,7 @@ usr/share/zoneinfo/America/Atikokan usr/share/zoneinfo/America/Atka usr/share/zoneinfo/America/Cayman usr/share/zoneinfo/America/Chicago +usr/share/zoneinfo/America/Coral_Harbour usr/share/zoneinfo/America/Cordoba usr/share/zoneinfo/America/Curacao usr/share/zoneinfo/America/Denver @@ -5498,6 +5567,7 @@ usr/share/zoneinfo/America/Jamaica usr/share/zoneinfo/America/Kentucky usr/share/zoneinfo/America/Kentucky/Louisville usr/share/zoneinfo/America/Knox_IN +usr/share/zoneinfo/America/Kralendijk usr/share/zoneinfo/America/Los_Angeles usr/share/zoneinfo/America/Lower_Princes usr/share/zoneinfo/America/Manaus @@ -5516,6 +5586,8 @@ usr/share/zoneinfo/America/Porto_Acre usr/share/zoneinfo/America/Puerto_Rico usr/share/zoneinfo/America/Regina usr/share/zoneinfo/America/Rio_Branco +usr/share/zoneinfo/America/Rosario +usr/share/zoneinfo/America/Santa_Isabel usr/share/zoneinfo/America/Santiago usr/share/zoneinfo/America/Sao_Paulo usr/share/zoneinfo/America/Shiprock @@ -5529,6 +5601,7 @@ usr/share/zoneinfo/America/Tijuana usr/share/zoneinfo/America/Toronto usr/share/zoneinfo/America/Tortola usr/share/zoneinfo/America/Vancouver +usr/share/zoneinfo/America/Virgin usr/share/zoneinfo/America/Whitehorse usr/share/zoneinfo/America/Winnipeg usr/share/zoneinfo/Antarctica @@ -5538,6 +5611,7 @@ usr/share/zoneinfo/Arctic usr/share/zoneinfo/Asia usr/share/zoneinfo/Asia/Aden usr/share/zoneinfo/Asia/Ashgabat +usr/share/zoneinfo/Asia/Ashkhabad usr/share/zoneinfo/Asia/Bangkok usr/share/zoneinfo/Asia/Chongqing usr/share/zoneinfo/Asia/Chungking @@ -5549,13 +5623,17 @@ usr/share/zoneinfo/Asia/Hong_Kong usr/share/zoneinfo/Asia/Istanbul usr/share/zoneinfo/Asia/Jerusalem usr/share/zoneinfo/Asia/Kathmandu +usr/share/zoneinfo/Asia/Katmandu usr/share/zoneinfo/Asia/Kolkata +usr/share/zoneinfo/Asia/Kuwait usr/share/zoneinfo/Asia/Macau usr/share/zoneinfo/Asia/Makassar +usr/share/zoneinfo/Asia/Muscat usr/share/zoneinfo/Asia/Nicosia usr/share/zoneinfo/Asia/Phnom_Penh usr/share/zoneinfo/Asia/Qatar usr/share/zoneinfo/Asia/Riyadh +usr/share/zoneinfo/Asia/Saigon usr/share/zoneinfo/Asia/Seoul usr/share/zoneinfo/Asia/Shanghai usr/share/zoneinfo/Asia/Singapore @@ -5564,12 +5642,17 @@ usr/share/zoneinfo/Asia/Tehran usr/share/zoneinfo/Asia/Tel_Aviv usr/share/zoneinfo/Asia/Thimphu usr/share/zoneinfo/Asia/Tokyo +usr/share/zoneinfo/Asia/Ujung_Pandang usr/share/zoneinfo/Asia/Ulaanbaatar +usr/share/zoneinfo/Asia/Ulan_Bator usr/share/zoneinfo/Asia/Urumqi +usr/share/zoneinfo/Asia/Vientiane +usr/share/zoneinfo/Asia/Yangon usr/share/zoneinfo/Atlantic usr/share/zoneinfo/Atlantic/Faroe usr/share/zoneinfo/Atlantic/Jan_Mayen usr/share/zoneinfo/Atlantic/Reykjavik +usr/share/zoneinfo/Atlantic/St_Helena usr/share/zoneinfo/Australia usr/share/zoneinfo/Australia/ACT usr/share/zoneinfo/Australia/Adelaide @@ -5580,14 +5663,32 @@ usr/share/zoneinfo/Australia/Darwin usr/share/zoneinfo/Australia/Hobart usr/share/zoneinfo/Australia/Lord_Howe usr/share/zoneinfo/Australia/Melbourne +usr/share/zoneinfo/Australia/NSW +usr/share/zoneinfo/Australia/North usr/share/zoneinfo/Australia/Perth +usr/share/zoneinfo/Australia/Queensland +usr/share/zoneinfo/Australia/South usr/share/zoneinfo/Australia/Sydney +usr/share/zoneinfo/Australia/Tasmania +usr/share/zoneinfo/Australia/Victoria +usr/share/zoneinfo/Australia/West +usr/share/zoneinfo/Australia/Yancowinna usr/share/zoneinfo/Brazil +usr/share/zoneinfo/Brazil/Acre +usr/share/zoneinfo/Brazil/DeNoronha +usr/share/zoneinfo/Brazil/East +usr/share/zoneinfo/Brazil/West usr/share/zoneinfo/Canada usr/share/zoneinfo/Canada/Atlantic -usr/share/zoneinfo/Canada/East-Saskatchewan +usr/share/zoneinfo/Canada/Central +usr/share/zoneinfo/Canada/Eastern +usr/share/zoneinfo/Canada/Mountain +usr/share/zoneinfo/Canada/Newfoundland +usr/share/zoneinfo/Canada/Pacific usr/share/zoneinfo/Canada/Saskatchewan +usr/share/zoneinfo/Canada/Yukon usr/share/zoneinfo/Chile +usr/share/zoneinfo/Chile/Continental usr/share/zoneinfo/Etc usr/share/zoneinfo/Etc/GMT usr/share/zoneinfo/Etc/GMT+0 @@ -5612,25 +5713,37 @@ usr/share/zoneinfo/Europe/Jersey usr/share/zoneinfo/Europe/Lisbon usr/share/zoneinfo/Europe/Ljubljana usr/share/zoneinfo/Europe/London +usr/share/zoneinfo/Europe/Mariehamn usr/share/zoneinfo/Europe/Moscow +usr/share/zoneinfo/Europe/Nicosia usr/share/zoneinfo/Europe/Oslo usr/share/zoneinfo/Europe/Podgorica usr/share/zoneinfo/Europe/Prague usr/share/zoneinfo/Europe/Rome +usr/share/zoneinfo/Europe/San_Marino usr/share/zoneinfo/Europe/Sarajevo usr/share/zoneinfo/Europe/Skopje +usr/share/zoneinfo/Europe/Tiraspol +usr/share/zoneinfo/Europe/Vaduz usr/share/zoneinfo/Europe/Vatican usr/share/zoneinfo/Europe/Warsaw +usr/share/zoneinfo/Europe/Zagreb usr/share/zoneinfo/Europe/Zurich usr/share/zoneinfo/GB +usr/share/zoneinfo/GB-Eire usr/share/zoneinfo/GMT usr/share/zoneinfo/GMT+0 usr/share/zoneinfo/GMT-0 usr/share/zoneinfo/GMT0 +usr/share/zoneinfo/Greenwich usr/share/zoneinfo/Indian usr/share/zoneinfo/Indian/Antananarivo usr/share/zoneinfo/Indian/Comoro +usr/share/zoneinfo/Indian/Mayotte usr/share/zoneinfo/Mexico +usr/share/zoneinfo/Mexico/BajaNorte +usr/share/zoneinfo/Mexico/BajaSur +usr/share/zoneinfo/Mexico/General usr/share/zoneinfo/Pacific usr/share/zoneinfo/Pacific/Auckland usr/share/zoneinfo/Pacific/Chatham @@ -5645,20 +5758,40 @@ usr/share/zoneinfo/Pacific/Midway usr/share/zoneinfo/Pacific/Pago_Pago usr/share/zoneinfo/Pacific/Pitcairn usr/share/zoneinfo/Pacific/Pohnpei +usr/share/zoneinfo/Pacific/Ponape +usr/share/zoneinfo/Pacific/Saipan usr/share/zoneinfo/Pacific/Samoa usr/share/zoneinfo/Pacific/Truk +usr/share/zoneinfo/Pacific/Yap usr/share/zoneinfo/SystemV +usr/share/zoneinfo/SystemV/AST4 +usr/share/zoneinfo/SystemV/AST4ADT +usr/share/zoneinfo/SystemV/CST6 +usr/share/zoneinfo/SystemV/CST6CDT +usr/share/zoneinfo/SystemV/EST5 usr/share/zoneinfo/SystemV/EST5EDT +usr/share/zoneinfo/SystemV/HST10 +usr/share/zoneinfo/SystemV/MST7 usr/share/zoneinfo/SystemV/MST7MDT +usr/share/zoneinfo/SystemV/PST8 +usr/share/zoneinfo/SystemV/PST8PDT +usr/share/zoneinfo/SystemV/YST9 +usr/share/zoneinfo/SystemV/YST9YDT +usr/share/zoneinfo/UCT usr/share/zoneinfo/US usr/share/zoneinfo/US/Alaska +usr/share/zoneinfo/US/Aleutian usr/share/zoneinfo/US/Arizona usr/share/zoneinfo/US/Central +usr/share/zoneinfo/US/East-Indiana usr/share/zoneinfo/US/Eastern usr/share/zoneinfo/US/Hawaii +usr/share/zoneinfo/US/Indiana-Starke +usr/share/zoneinfo/US/Michigan usr/share/zoneinfo/US/Mountain usr/share/zoneinfo/US/Pacific usr/share/zoneinfo/US/Pacific-New +usr/share/zoneinfo/US/Samoa usr/share/zoneinfo/UTC usr/share/zoneinfo/Universal usr/share/zoneinfo/Zulu diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index b76adec..d0a5351 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -9,7 +9,7 @@ const pkgdef :Spk.PackageDefinition = ( # The package definition. Note that the spk tool looks specifically for the # "pkgdef" constant. - id = "nx3dqcmz2sjjz939vkg4847vvxrzqsatqfjrt3ea50z3jac5kv7h", + id = "s97k5f7mkzjtz6nn440cm2dyv5ay4p3aqaxumhp1mv2s5k35cfah", # Your app ID is actually its public key. The private key was placed in # your keyring. All updates must be signed with the same key. diff --git a/.sandstorm/service-config/nginx.conf b/.sandstorm/service-config/nginx.conf index de977aa..45ee7dc 100644 --- a/.sandstorm/service-config/nginx.conf +++ b/.sandstorm/service-config/nginx.conf @@ -63,7 +63,7 @@ http { location ~ \.php$ { if (!-f $request_filename) { return 404; } include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php-fpm7.0.sock; fastcgi_param REDIRECT_STATUS 200; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh index 23f39d2..07041c2 100644 --- a/.sandstorm/setup.sh +++ b/.sandstorm/setup.sh @@ -7,36 +7,39 @@ set -euo pipefail export DEBIAN_FRONTEND=noninteractive apt-get update -apt-get install -y nginx php5-fpm php5-cli php5-curl git php5-dev libleveldb-dev +apt-get install -y nginx php7.0-fpm php7.0-cli php7.0-curl git php7.0-dev libleveldb-dev cd /usr/local/src -git clone https://github.com/reeze/php-leveldb.git +if [ ! -d php-leveldb ]; then + git clone https://github.com/reeze/php-leveldb.git +fi cd php-leveldb phpize ./configure make make install -cp /opt/app/leveldb.ini /etc/php5/mods-available -php5enmod leveldb +cp /opt/app/leveldb.ini /etc/php/7.0/mods-available +phpenmod leveldb service nginx stop -service php5-fpm stop +service php7.0-fpm stop systemctl disable nginx -systemctl disable php5-fpm -# patch /etc/php5/fpm/pool.d/www.conf to not change uid/gid to www-data +systemctl disable php7.0-fpm +# patch /etc/php/7.0/fpm/pool.d/www.conf to not change uid/gid to www-data sed --in-place='' \ - --expression='s/^listen.owner = www-data/#listen.owner = www-data/' \ - --expression='s/^listen.group = www-data/#listen.group = www-data/' \ - --expression='s/^user = www-data/#user = www-data/' \ - --expression='s/^group = www-data/#group = www-data/' \ - /etc/php5/fpm/pool.d/www.conf -# patch /etc/php5/fpm/php-fpm.conf to not have a pidfile + --expression='s/^listen.owner = www-data/;listen.owner = www-data/' \ + --expression='s/^listen.group = www-data/;listen.group = www-data/' \ + --expression='s#^listen = .*#listen = /var/run/php-fpm7.0.sock#' \ + --expression='s/^user = www-data/;user = www-data/' \ + --expression='s/^group = www-data/;group = www-data/' \ + /etc/php/7.0/fpm/pool.d/www.conf +# patch /etc/php7.0/fpm/php-fpm.conf to not have a pidfile sed --in-place='' \ - --expression='s/^pid =/#pid =/' \ - /etc/php5/fpm/php-fpm.conf -# patch /etc/php5/fpm/pool.d/www.conf to no clear environment variables + --expression='s/^pid =/;pid =/' \ + /etc/php/7.0/fpm/php-fpm.conf +# patch /etc/php/7.0/fpm/pool.d/www.conf to no clear environment variables # so we can pass in SANDSTORM=1 to apps sed --in-place='' \ --expression='s/^;clear_env = no/clear_env=no/' \ - /etc/php5/fpm/pool.d/www.conf + /etc/php/7.0/fpm/pool.d/www.conf # Adjust fastcgi_params to use the patched fe_https sed --in-place='' \ --expression 's/^fastcgi_param *HTTPS.*$/fastcgi_param HTTPS \$fe_https if_not_empty;/' \