From 978987de62eef8c4a375ada80a51cdb21e4127cb Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 3 Aug 2015 15:19:32 -0500 Subject: [PATCH 01/16] Initial commit. --- .gitignore | 1 + .sandstorm/Vagrantfile | 83 +++++++++++++++++++++++++++++++ .sandstorm/build.sh | 23 +++++++++ .sandstorm/global-setup.sh | 30 +++++++++++ .sandstorm/launcher.sh | 33 ++++++++++++ .sandstorm/sandstorm-pkgdef.capnp | 81 ++++++++++++++++++++++++++++++ .sandstorm/setup.sh | 28 +++++++++++ .sandstorm/stack | 1 + 8 files changed, 280 insertions(+) create mode 100644 .gitignore create mode 100644 .sandstorm/Vagrantfile create mode 100644 .sandstorm/build.sh create mode 100644 .sandstorm/global-setup.sh create mode 100644 .sandstorm/launcher.sh create mode 100644 .sandstorm/sandstorm-pkgdef.capnp create mode 100644 .sandstorm/setup.sh create mode 100644 .sandstorm/stack diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..8000dd9db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vagrant diff --git a/.sandstorm/Vagrantfile b/.sandstorm/Vagrantfile new file mode 100644 index 000000000..59daa0e1c --- /dev/null +++ b/.sandstorm/Vagrantfile @@ -0,0 +1,83 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + # We base ourselves off Debian Jessie + config.vm.box = "debian/jessie64" + + if Vagrant.has_plugin?("vagrant-vbguest") then + # vagrant-vbguest is a Vagrant plugin that upgrades + # the version of VirtualBox Guest Additions within each + # guest. If you have the vagrant-vbguest plugin, then it + # needs to know how to compile kernel modules, etc., and so + # we give it this hint about operating system type. + 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 + + # Use a shell script to "provision" the box. This installs Sandstorm using + # the bundled installer. + config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh" + # Then, do stack-specific and app-specific setup. + config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh" + + # Shared folders are configured per-provider since vboxsf can't handle >4096 open files, + # NFS requires privilege escalation every time you bring a VM up, + # and 9p is only available on libvirt. + + # Calculate the number of CPUs and the amount of RAM the system has, + # in a platform-dependent way; further logic below. + cpus = nil + total_kB_ram = nil + + host = RbConfig::CONFIG['host_os'] + if host =~ /darwin/ + cpus = `sysctl -n hw.ncpu`.to_i + total_kB_ram = `sysctl -n hw.memsize`.to_i / 1024 + elsif host =~ /linux/ + cpus = `nproc`.to_i + total_kB_ram = `grep MemTotal /proc/meminfo | awk '{print $2}'`.to_i + end + # Use the same number of CPUs within Vagrant as the system, with 1 + # as a default. + # + # Use at least 512MB of RAM, and if the system has more than 2GB of + # RAM, use 1/4 of the system RAM. This seems a reasonable compromise + # between having the Vagrant guest operating system not run out of + # RAM entirely (which it basically would if we went much lower than + # 512MB) and also allowing it to use up a healthily large amount of + # RAM so it can run faster on systems that can afford it. + if cpus.nil? + cpus = 1 + end + if total_kB_ram.nil? or total_kB_ram < 2048000 + assign_ram_mb = 1024 + else + assign_ram_mb = (total_kB_ram / 1024 / 4) + end + # Actually apply these CPU/memory values to the providers. + config.vm.provider :virtualbox do |vb, override| + vb.cpus = cpus + vb.memory = assign_ram_mb + + override.vm.synced_folder "..", "/opt/app" + override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm" + override.vm.synced_folder "..", "/vagrant" + end + config.vm.provider :libvirt do |libvirt, override| + libvirt.cpus = cpus + libvirt.memory = assign_ram_mb + libvirt.random_hostname = true + + 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" + end +end diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh new file mode 100644 index 000000000..2f57a5aae --- /dev/null +++ b/.sandstorm/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -euo pipefail +# This script is run in the VM each time you run `vagrant-spk dev`. This is +# the ideal place to invoke anything which is normally part of your app's build +# process - transforming the code in your repository into the collection of files +# which can actually run the service in production +# +# Some examples: +# +# * For a C/C++ application, calling +# ./configure && make && make install +# * For a Python application, creating a virtualenv and installing +# app-specific package dependencies: +# virtualenv /opt/app/env +# /opt/app/env/bin/pip install -r /opt/app/requirements.txt +# * Building static assets from .less or .sass, or bundle and minify JS +# * Collecting various build artifacts or assets into a deployment-ready +# directory structure + +# By default, this script does nothing. You'll have to modify it as +# appropriate for your application. +cabal update +cabal install hledger-web-0.26 \ No newline at end of file diff --git a/.sandstorm/global-setup.sh b/.sandstorm/global-setup.sh new file mode 100644 index 000000000..303c9d22c --- /dev/null +++ b/.sandstorm/global-setup.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -euo pipefail +echo localhost > /etc/hostname +hostname localhost +curl https://install.sandstorm.io/ > /host-dot-sandstorm/caches/install.sh +SANDSTORM_CURRENT_VERSION=$(curl -fs "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 + curl --output "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" "https://dl.sandstorm.io/$SANDSTORM_PACKAGE" +fi +bash /host-dot-sandstorm/caches/install.sh -d -e "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" +modprobe ip_tables +# Make the vagrant user part of the sandstorm group so that commands like +# `spk dev` work. +usermod -a -G 'sandstorm' 'vagrant' +# Bind to all addresses, so the vagrant port-forward works. +sudo sed --in-place='' \ + --expression='s/^BIND_IP=.*/BIND_IP=0.0.0.0/' \ + /opt/sandstorm/sandstorm.conf +# TODO: update sandstorm installer script to ask about dev accounts, and +# specify a value for this option in the default config? +if ! grep --quiet --no-messages ALLOW_DEV_ACCOUNTS=true /opt/sandstorm/sandstorm.conf ; then + echo "ALLOW_DEV_ACCOUNTS=true" | sudo tee -a /opt/sandstorm/sandstorm.conf + sudo service sandstorm restart +fi +# Enable apt-cacher-ng proxy to make things faster if one appears to be running on the gateway IP +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 diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh new file mode 100644 index 000000000..21210a87f --- /dev/null +++ b/.sandstorm/launcher.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -euo pipefail +# This script is run every time an instance of our app - aka grain - starts up. +# This is the entry point for your application both when a grain is first launched +# and when a grain resumes after being previously shut down. +# +# This script is responsible for launching everything your app needs to run. The +# thing it should do *last* is: +# +# * Start a process in the foreground listening on port 8000 for HTTP requests. +# +# This is how you indicate to the platform that your application is up and +# ready to receive requests. Often, this will be something like nginx serving +# static files and reverse proxying for some other dynamic backend service. +# +# Other things you probably want to do in this script include: +# +# * Building folder structures in /var. /var is the only non-tmpfs folder +# mounted read-write in the sandbox, and when a grain is first launched, it +# will start out empty. It will persist between runs of the same grain, but +# be unique per app instance. That is, two instances of the same app have +# separate instances of /var. +# * Preparing a database and running migrations. As your package changes +# over time and you release updates, you will need to deal with migrating +# data from previous schema versions to new ones, since users should not have +# to think about such things. +# * Launching other daemons your app needs (e.g. mysqld, redis-server, etc.) + +# By default, this script does nothing. You'll have to modify it as +# appropriate for your application. +mkdir -p /var/lib/hledger +touch /var/lib/hledger/ledger.dat +/home/vagrant/.cabal/bin/hledger-web --server -f /var/lib/hledger/ledger.dat --port 8000 \ No newline at end of file diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp new file mode 100644 index 000000000..dd12e97ef --- /dev/null +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -0,0 +1,81 @@ +@0xb83da55f33c7fde7; + +using Spk = import "/sandstorm/package.capnp"; +# This imports: +# $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp +# Check out that file to see the full, documented package definition format. + +const pkgdef :Spk.PackageDefinition = ( + # The package definition. Note that the spk tool looks specifically for the + # "pkgdef" constant. + + id = "wy71w9g29zevsc8dfcf8c322wgxm97z5fu29y8v9p02p95s6eqj0", + # 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. + + manifest = ( + # This manifest is included in your app package to tell Sandstorm + # about your app. + + appTitle = (defaultText = "HLedger"), + + appVersion = 0, # Increment this for every release. + + appMarketingVersion = (defaultText = "0.26"), + # Human-readable representation of appVersion. Should match the way you + # identify versions of your app in documentation and marketing. + + actions = [ + # Define your "new document" handlers here. + ( title = (defaultText = "New Ledger"), + command = .myCommand + # The command to run when starting for the first time. (".myCommand" + # is just a constant defined at the bottom of the file.) + ) + ], + + continueCommand = .myCommand + # This is the command called to start your app back up after it has been + # shut down for inactivity. Here we're using the same command as for + # starting a new instance, but you could use different commands for each + # case. + ), + + sourceMap = ( + # Here we defined where to look for files to copy into your package. The + # `spk dev` command actually figures out what files your app needs + # automatically by running it on a FUSE filesystem. So, the mappings + # here are only to tell it where to find files that the app wants. + searchPath = [ + ( sourcePath = "." ), # Search this directory first. + ( sourcePath = "/", # Then search the system root directory. + hidePaths = [ "home", "proc", "sys", + "etc/passwd", "etc/hosts", "etc/host.conf", + "etc/nsswitch.conf", "etc/resolv.conf" ] + # You probably don't want the app pulling files from these places, + # so we hide them. Note that /dev, /var, and /tmp are implicitly + # hidden because Sandstorm itself provides them. + ) + ] + ), + + fileList = "sandstorm-files.list", + # `spk dev` will write a list of all the files your app uses to this file. + # You should review it later, before shipping your app. + + alwaysInclude = [] + # Fill this list with more names of files or directories that should be + # included in your package, even if not listed in sandstorm-files.list. + # Use this to force-include stuff that you know you need but which may + # not have been detected as a dependency during `spk dev`. If you list + # a directory here, its entire contents will be included recursively. +); + +const myCommand :Spk.Manifest.Command = ( + # Here we define the command used to start up your server. + argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"], + environ = [ + # Note that this defines the *entire* environment seen by your app. + (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin:/home/vagrant/.cabal/bin") + ] +); diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh new file mode 100644 index 000000000..59ff9d34e --- /dev/null +++ b/.sandstorm/setup.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -euo pipefail +# This script is run in the VM once when you first run `vagrant-spk up`. It is +# useful for installing system-global dependencies. It is run exactly once +# over the lifetime of the VM. +# +# This is the ideal place to do things like: +# +# export DEBIAN_FRONTEND=noninteractive +# apt-get install -y nginx nodejs nodejs-legacy python2.7 mysql-server +# +# If the packages you're installing here need some configuration adjustments, +# this is also a good place to do that: +# +# sed --in-place='' \ +# --expression 's/^user www-data/#user www-data/' \ +# --expression 's#^pid /run/nginx.pid#pid /var/run/nginx.pid#' \ +# --expression 's/^\s*error_log.*/error_log stderr;/' \ +# --expression 's/^\s*access_log.*/access_log off;/' \ +# /etc/nginx/nginx.conf + +# By default, this script does nothing. You'll have to modify it as +# appropriate for your application. +apt-get update +apt-get install -y haskell-platform libncurses-dev +mkdir /var/lib/hledger +touch /var/lib/hledger/ledger.dat +chown -R vagrant.vagrant /var/lib/hledger diff --git a/.sandstorm/stack b/.sandstorm/stack new file mode 100644 index 000000000..7c3182e51 --- /dev/null +++ b/.sandstorm/stack @@ -0,0 +1 @@ +diy From b96aaed4b2cb006f4ffeacdce19c811c3f23a154 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 3 Aug 2015 17:30:05 -0500 Subject: [PATCH 02/16] Install hledger-web in /usr/local. --- .sandstorm/build.sh | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh index 2f57a5aae..d64822382 100644 --- a/.sandstorm/build.sh +++ b/.sandstorm/build.sh @@ -20,4 +20,4 @@ set -euo pipefail # By default, this script does nothing. You'll have to modify it as # appropriate for your application. cabal update -cabal install hledger-web-0.26 \ No newline at end of file +cabal install --root-cmd=sudo --global --prefix=/usr/local hledger-web \ No newline at end of file diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index dd12e97ef..4f13e0a75 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -76,6 +76,6 @@ const myCommand :Spk.Manifest.Command = ( argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"], environ = [ # Note that this defines the *entire* environment seen by your app. - (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin:/home/vagrant/.cabal/bin") + (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin") ] ); From de5474a07b84b5999bf171839a3cc7b5812089ad Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 3 Aug 2015 17:30:40 -0500 Subject: [PATCH 03/16] Remove unneeded commands. --- .sandstorm/setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh index 59ff9d34e..a13e90326 100644 --- a/.sandstorm/setup.sh +++ b/.sandstorm/setup.sh @@ -23,6 +23,3 @@ set -euo pipefail # appropriate for your application. apt-get update apt-get install -y haskell-platform libncurses-dev -mkdir /var/lib/hledger -touch /var/lib/hledger/ledger.dat -chown -R vagrant.vagrant /var/lib/hledger From 83e0b5bcc96dfa03c76fd8c7433ef5a54a3c301b Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 3 Aug 2015 17:31:18 -0500 Subject: [PATCH 04/16] cd /var before launching the app so files are written correctly. --- .sandstorm/launcher.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh index 21210a87f..0071b79cc 100644 --- a/.sandstorm/launcher.sh +++ b/.sandstorm/launcher.sh @@ -30,4 +30,5 @@ set -euo pipefail # appropriate for your application. mkdir -p /var/lib/hledger touch /var/lib/hledger/ledger.dat -/home/vagrant/.cabal/bin/hledger-web --server -f /var/lib/hledger/ledger.dat --port 8000 \ No newline at end of file +cd /var +hledger-web --server -f /var/lib/hledger/ledger.dat --port 8000 \ No newline at end of file From 08135526363afe802ce8cfec76ab73b23a4b23ff Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 15 Nov 2016 14:55:22 -0600 Subject: [PATCH 05/16] Switch to the official Sandstorm Vagrant box. --- .sandstorm/Vagrantfile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.sandstorm/Vagrantfile b/.sandstorm/Vagrantfile index 59daa0e1c..3fd1303e3 100644 --- a/.sandstorm/Vagrantfile +++ b/.sandstorm/Vagrantfile @@ -1,12 +1,16 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +# 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. +VM_NAME = File.basename(File.dirname(File.dirname(__FILE__))) + "_sandstorm_#{Time.now.utc.to_i}" + # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - # We base ourselves off Debian Jessie - config.vm.box = "debian/jessie64" + config.vm.box = "sandstorm/debian-jessie64" if Vagrant.has_plugin?("vagrant-vbguest") then # vagrant-vbguest is a Vagrant plugin that upgrades @@ -24,9 +28,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Use a shell script to "provision" the box. This installs Sandstorm using # the bundled installer. - config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh" + config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh", keep_color: true # Then, do stack-specific and app-specific setup. - config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh" + config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh", keep_color: true # Shared folders are configured per-provider since vboxsf can't handle >4096 open files, # NFS requires privilege escalation every time you bring a VM up, @@ -44,6 +48,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| elsif host =~ /linux/ 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 end # Use the same number of CPUs within Vagrant as the system, with 1 # as a default. @@ -54,18 +65,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # RAM entirely (which it basically would if we went much lower than # 512MB) and also allowing it to use up a healthily large amount of # RAM so it can run faster on systems that can afford it. - if cpus.nil? + if cpus.nil? or cpus.zero? cpus = 1 end if total_kB_ram.nil? or total_kB_ram < 2048000 - assign_ram_mb = 1024 + assign_ram_mb = 512 else - assign_ram_mb = (total_kB_ram / 1024 / 4) + assign_ram_mb = (total_kB_ram / 1024 / 2) end # Actually apply these CPU/memory values to the providers. config.vm.provider :virtualbox do |vb, override| vb.cpus = cpus vb.memory = assign_ram_mb + vb.name = VM_NAME override.vm.synced_folder "..", "/opt/app" override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm" @@ -74,7 +86,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider :libvirt do |libvirt, override| libvirt.cpus = cpus libvirt.memory = assign_ram_mb - libvirt.random_hostname = true + libvirt.default_prefix = VM_NAME override.vm.synced_folder "..", "/opt/app", type: "9p", accessmode: "passthrough" override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm", type: "9p", accessmode: "passthrough" From 3ac99d703777e4b9db008639cb687ee589682317 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 15 Nov 2016 14:56:00 -0600 Subject: [PATCH 06/16] Add GPG signatures. --- .gitmodules | 3 +++ .sandstorm/appGrid.svg | 51 ++++++++++++++++++++++++++++++++++++++ .sandstorm/changelog.md | 3 +++ .sandstorm/description.md | 1 + .sandstorm/grain.svg | 48 +++++++++++++++++++++++++++++++++++ .sandstorm/market.svg | 47 +++++++++++++++++++++++++++++++++++ .sandstorm/pgp-keyring | Bin 0 -> 2822 bytes .sandstorm/pgp-signature | Bin 0 -> 688 bytes hledger | 1 + 9 files changed, 154 insertions(+) create mode 100644 .gitmodules create mode 100644 .sandstorm/appGrid.svg create mode 100644 .sandstorm/changelog.md create mode 100644 .sandstorm/description.md create mode 100644 .sandstorm/grain.svg create mode 100644 .sandstorm/market.svg create mode 100644 .sandstorm/pgp-keyring create mode 100644 .sandstorm/pgp-signature create mode 160000 hledger diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..8cda7c547 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "hledger"] + path = hledger + url = https://github.com/simonmichael/hledger/ diff --git a/.sandstorm/appGrid.svg b/.sandstorm/appGrid.svg new file mode 100644 index 000000000..ae8ff6447 --- /dev/null +++ b/.sandstorm/appGrid.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.sandstorm/changelog.md b/.sandstorm/changelog.md new file mode 100644 index 000000000..68dec14b2 --- /dev/null +++ b/.sandstorm/changelog.md @@ -0,0 +1,3 @@ +# V0 + + * Initial release \ No newline at end of file diff --git a/.sandstorm/description.md b/.sandstorm/description.md new file mode 100644 index 000000000..13cddf41a --- /dev/null +++ b/.sandstorm/description.md @@ -0,0 +1 @@ +hledger is a lightweight accounting program for tracking money, time, or other commodities, on unix, mac and windows. With simple yet powerful functionality accessed from command line, terminal or web browser, it is a reliable, cross-platform alternative to Quicken, GnuCash, spreadsheets etc. \ No newline at end of file diff --git a/.sandstorm/grain.svg b/.sandstorm/grain.svg new file mode 100644 index 000000000..037854be7 --- /dev/null +++ b/.sandstorm/grain.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.sandstorm/market.svg b/.sandstorm/market.svg new file mode 100644 index 000000000..658c8b315 --- /dev/null +++ b/.sandstorm/market.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.sandstorm/pgp-keyring b/.sandstorm/pgp-keyring new file mode 100644 index 0000000000000000000000000000000000000000..ac7da14e7b273cbc11c6321c9953b6c0e455d8b1 GIT binary patch literal 2822 zcmYk-XE+-Q8wOxWP(jVutr1%hs;GI4h}wIvMkO_q9^+6_dj};gwP($$U9%OdNX?Q~ zZKAbWRaC3ycg{D?`To7n_5QuD=g9$HrnbF7{t95B8qhB9PmOCa(kS`KLwnD7t!>Kf z5=7@)1i5&a9#IV*K_{w|JNjGI7PfSg;?tB(}wNkuz<+;5c5;tUTQjOSN#zRPs~_0^{R!rqP8J{B(-5suf84OiL47zprF zaK(1riNDG5bRhDZr5#$O=VLu@0`6=;`H4C+L)8Ux396uveH2hy1%2BK3BQf-Qt8fP zq>DC5^m7y5RG|qzv4x2Zj&j3exPx{>o#lAH2s8)q`P^K_;@DvA7@8SDCjbXn z(crgLZemvbwAph+A__z+i8XUPeVL6gal4=bkwTO4X}_}6nxIw_{&EqV2PyK5scCZI zO$XXPWX^DG8FN=Gt%s{_s`tK>%8R|N8}(i1noxK=?3D%d@qm>BgoE&KPt$~eFu?}=vDK$+*RQiT&1ja8xW`_4w0IKMaS~x!`eCk3er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*zcK>i~6U=t75_}lrwVQy$x@?KCp1*u^Q=7dl=!kyZ zSP6`QTbgcM9ql%W&Ro_L4WqotDHbEW_DY`5II=`=d+SA9O>r*dm;Uub1H~1pAT6nh zP|R@=NC{kyHX<}(dBbibu}Rd>kMJ~#BfMsH4zWY$^miiqs8FN$=!#tiTAaQauks_C zJoC;0I3PKVJ58Ec=YqnO$RxeE>C)R^TANlYvzzj{=Qk&X2qFKWIWZ}N(kC#L%P+39 KQ&xkFz5WH}lrZA} literal 0 HcmV?d00001 diff --git a/.sandstorm/pgp-signature b/.sandstorm/pgp-signature new file mode 100644 index 0000000000000000000000000000000000000000..b4e805ada76c1d4d617b1aec7f787571635af93d GIT binary patch literal 688 zcmV;h0#E&;0RgE3R{f9-0{{pC?Y^p1frQ7$0n2$}09H$7L`fiFZ6I`LWgua7bZBpK zAa7MmANklpzICwEK zXf|*#crb2qdTTc`Xl8LXdT26gcywoZdU|7Yc{g!$VRUO}H)>{QGHrTyHEuaDi2@u1 z009U91_c6EOJzg=3JDPHzN%D#gvZAbmJk5CP-97k8F|{9>KbR0ej6lUV4Q0<#^pr0 zfS4~kn9Hf#dsGe|!>e`ua#RjYj8sUd6H6mMJ!|_eY=apsObpX#pVcVqEncvzE7W-N z(ZHO<2X5m(tGI@Oqln{Ea6OSQJ=aHc)Ep}i~%xu zK0eF$F(KOcUcBgTKt5i&u_goKkFfiFMW$%apFO~t@2d*zX|V=9m{_NLa|NWvwZ|ue zB;QRL<0^x0rw_Uv_S$lVv18se$0zeje3DK2R<1Q4fklxq);7au$%c1{#D#W4&CI_9 zVqZ99l=`<8!04beXe&BJLBAFB;)hTTfGlvdJtw+=>BpL{fZjteCv$#J02Vh)DgDy@ zRpVX$6x`JFiuFC=_4a?iI@ zn_WbxhbB7kz9xA^pI0WJC+JoXYm9vS($6%xxwdN~Ntn;YlKr Date: Tue, 15 Nov 2016 14:56:26 -0600 Subject: [PATCH 07/16] Add file list. --- .sandstorm/sandstorm-files.list | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .sandstorm/sandstorm-files.list diff --git a/.sandstorm/sandstorm-files.list b/.sandstorm/sandstorm-files.list new file mode 100644 index 000000000..999859f3d --- /dev/null +++ b/.sandstorm/sandstorm-files.list @@ -0,0 +1,56 @@ +# *** WARNING: GENERATED FILE *** +# This file is automatically updated and rewritten in sorted order every time +# the app runs in dev mode. You may manually add or remove files, but don't +# expect comments or ordering to be retained. +bin/bash +bin/mkdir +bin/touch +etc/gai.conf +etc/ld.so.cache +etc/localtime +lib/terminfo/d/dumb +lib/x86_64-linux-gnu/ld-2.19.so +lib/x86_64-linux-gnu/libc-2.19.so +lib/x86_64-linux-gnu/libc.so.6 +lib/x86_64-linux-gnu/libdl-2.19.so +lib/x86_64-linux-gnu/libdl.so.2 +lib/x86_64-linux-gnu/libgcc_s.so.1 +lib/x86_64-linux-gnu/libm-2.19.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.so.1 +lib/x86_64-linux-gnu/libnss_compat-2.19.so +lib/x86_64-linux-gnu/libnss_compat.so.2 +lib/x86_64-linux-gnu/libnss_files-2.19.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.so.2 +lib/x86_64-linux-gnu/libpcre.so.3 +lib/x86_64-linux-gnu/libpcre.so.3.13.1 +lib/x86_64-linux-gnu/libpthread-2.19.so +lib/x86_64-linux-gnu/libpthread.so.0 +lib/x86_64-linux-gnu/librt-2.19.so +lib/x86_64-linux-gnu/librt.so.1 +lib/x86_64-linux-gnu/libselinux.so.1 +lib/x86_64-linux-gnu/libtinfo.so.5 +lib/x86_64-linux-gnu/libtinfo.so.5.9 +lib/x86_64-linux-gnu/libutil-2.19.so +lib/x86_64-linux-gnu/libutil.so.1 +lib/x86_64-linux-gnu/libz.so.1 +lib/x86_64-linux-gnu/libz.so.1.2.8 +lib64/ld-linux-x86-64.so.2 +opt/app/.sandstorm/launcher.sh +proc/cpuinfo +sandstorm-http-bridge +sandstorm-http-bridge-config +sandstorm-manifest +usr/bin/touch +usr/lib/x86_64-linux-gnu/gconv/UTF-32.so +usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache +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/libgmp.so.10 +usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0 +usr/local/bin/hledger-web From 3a48d07f9cddb4ac1c6d7d03872eb477df198b8f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 15 Nov 2016 14:57:10 -0600 Subject: [PATCH 08/16] Ignore SPK files. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8000dd9db..edd348464 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vagrant +*.spk From 9e47faaa398accfb2af8e38f80276e7ea0862ff5 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 15 Nov 2016 14:57:29 -0600 Subject: [PATCH 09/16] Release v1.0.1-sandstorm1. --- .sandstorm/build.sh | 6 +- .sandstorm/changelog.md | 6 +- .sandstorm/launcher.sh | 6 +- .sandstorm/sandstorm-pkgdef.capnp | 182 ++++++++++++++++++++++++++++-- .sandstorm/setup.sh | 4 +- hledger | 2 +- 6 files changed, 189 insertions(+), 17 deletions(-) diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh index d64822382..56ebf7189 100644 --- a/.sandstorm/build.sh +++ b/.sandstorm/build.sh @@ -19,5 +19,7 @@ set -euo pipefail # By default, this script does nothing. You'll have to modify it as # appropriate for your application. -cabal update -cabal install --root-cmd=sudo --global --prefix=/usr/local hledger-web \ No newline at end of file +cd /opt/app/hledger +stack setup +stack install hledger-web +sudo cp /home/vagrant/.local/bin/hledger-web /usr/local/bin diff --git a/.sandstorm/changelog.md b/.sandstorm/changelog.md index 68dec14b2..c46f3e573 100644 --- a/.sandstorm/changelog.md +++ b/.sandstorm/changelog.md @@ -1,3 +1,7 @@ +# V1.0.1-sandstorm1 (2016-11-15) + + * Upgrade to HLedger 1.0.1 + # V0 - * Initial release \ No newline at end of file + * Initial release diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh index 0071b79cc..52842a343 100644 --- a/.sandstorm/launcher.sh +++ b/.sandstorm/launcher.sh @@ -26,9 +26,7 @@ set -euo pipefail # to think about such things. # * Launching other daemons your app needs (e.g. mysqld, redis-server, etc.) -# By default, this script does nothing. You'll have to modify it as -# appropriate for your application. mkdir -p /var/lib/hledger -touch /var/lib/hledger/ledger.dat +touch /var/lib/hledger/Ledger cd /var -hledger-web --server -f /var/lib/hledger/ledger.dat --port 8000 \ No newline at end of file +hledger-web --server --base-url='' -f /var/lib/hledger/Ledger --port 8000 \ No newline at end of file diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 4f13e0a75..6730805c6 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -1,4 +1,4 @@ -@0xb83da55f33c7fde7; +@0xbc169f81a53d625c; using Spk = import "/sandstorm/package.capnp"; # This imports: @@ -9,7 +9,7 @@ const pkgdef :Spk.PackageDefinition = ( # The package definition. Note that the spk tool looks specifically for the # "pkgdef" constant. - id = "wy71w9g29zevsc8dfcf8c322wgxm97z5fu29y8v9p02p95s6eqj0", + id = "8x12h6p0x0nrzk73hfq6zh2jxtgyzzcty7qsatkg7jfg2mzw5n90", # 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. @@ -17,11 +17,11 @@ const pkgdef :Spk.PackageDefinition = ( # This manifest is included in your app package to tell Sandstorm # about your app. - appTitle = (defaultText = "HLedger"), + appTitle = (defaultText = "HLedger Web"), - appVersion = 0, # Increment this for every release. + appVersion = 1, # Increment this for every release. - appMarketingVersion = (defaultText = "0.26"), + appMarketingVersion = (defaultText = "1.0.1-sandstorm1"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. @@ -34,11 +34,104 @@ const pkgdef :Spk.PackageDefinition = ( ) ], - continueCommand = .myCommand + continueCommand = .myCommand, # This is the command called to start your app back up after it has been # shut down for inactivity. Here we're using the same command as for # starting a new instance, but you could use different commands for each # case. + + metadata = ( + # Data which is not needed specifically to execute the app, but is useful + # for purposes like marketing and display. These fields are documented at + # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#add-required-metadata + # and (in deeper detail) in the sandstorm source code, in the Metadata section of + # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/package.capnp + icons = ( + # Various icons to represent the app in various contexts. + appGrid = (svg = embed "appGrid.svg"), + grain = (svg = embed "grain.svg"), + market = (svg = embed "market.svg"), + #marketBig = (svg = embed "path/to/market-big-300x300.svg"), + ), + + website = "http://hledger.org", + # This should be the app's main website url. + + codeUrl = "https://dev.thewordnerd.info/nolan/hledger-sandstorm", + # URL of the app's source code repository, e.g. a GitHub URL. + # Required if you specify a license requiring redistributing code, but optional otherwise. + + license = (openSource = gpl2), + # The license this package is distributed under. See + # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#license + + categories = [office, productivity], + # A list of categories/genres to which this app belongs, sorted with best fit first. + # See the list of categories at + # https://docs.sandstorm.io/en/latest/developing/publishing-apps/#categories + + author = ( + # Fields relating to the author of this app. + + contactEmail = "nolan@thewordnerd.info", + # Email address to contact for any issues with this app. This includes end-user support + # requests as well as app store administrator requests, so it is very important that this be a + # valid address with someone paying attention to it. + + pgpSignature = embed "pgp-signature", + # PGP signature attesting responsibility for the app ID. This is a binary-format detached + # signature of the following ASCII message (not including the quotes, no newlines, and + # replacing with the standard base-32 text format of the app's ID): + # + # "I am the author of the Sandstorm.io app with the following ID: " + # + # You can create a signature file using `gpg` like so: + # + # echo -n "I am the author of the Sandstorm.io app with the following ID: " | gpg --sign > pgp-signature + # + # Further details including how to set up GPG and how to use keybase.io can be found + # at https://docs.sandstorm.io/en/latest/developing/publishing-apps/#verify-your-identity + + upstreamAuthor = "HLedger Team", + # Name of the original primary author of this app, if it is different from the person who + # produced the Sandstorm package. Setting this implies that the author connected to the PGP + # signature only "packaged" the app for Sandstorm, rather than developing the app. + # Remove this line if you consider yourself as the author of the app. + ), + + pgpKeyring = embed "pgp-keyring", + # A keyring in GPG keyring format containing all public keys needed to verify PGP signatures in + # this manifest (as of this writing, there is only one: `author.pgpSignature`). + # + # To generate a keyring containing just your public key, do: + # + # gpg --export > keyring + # + # Where `` is a PGP key ID or email address associated with the key. + + description = (defaultText = embed "description.md"), + # The app's description description in Github-flavored Markdown format, to be displayed e.g. + # in an app store. Note that the Markdown is not permitted to contain HTML nor image tags (but + # you can include a list of screenshots separately). + + shortDescription = (defaultText = "Web-based Accounting"), + # A very short (one-to-three words) description of what the app does. For example, + # "Document editor", or "Notetaking", or "Email client". This will be displayed under the app + # title in the grid view in the app market. + + screenshots = [ + # Screenshots to use for marketing purposes. Examples below. + # Sizes are given in device-independent pixels, so if you took these + # screenshots on a Retina-style high DPI screen, divide each dimension by two. + + #(width = 746, height = 795, jpeg = embed "path/to/screenshot-1.jpeg"), + #(width = 640, height = 480, png = embed "path/to/screenshot-2.png"), + ], + changeLog = (defaultText = embed "changelog.md"), + # Documents the history of changes in Github-flavored markdown format (with the same restrictions + # as govern `description`). We recommend formatting this with an H1 heading for each version + # followed by a bullet list of changes. + ), ), sourceMap = ( @@ -63,12 +156,81 @@ const pkgdef :Spk.PackageDefinition = ( # `spk dev` will write a list of all the files your app uses to this file. # You should review it later, before shipping your app. - alwaysInclude = [] + alwaysInclude = [], # Fill this list with more names of files or directories that should be # included in your package, even if not listed in sandstorm-files.list. # Use this to force-include stuff that you know you need but which may # not have been detected as a dependency during `spk dev`. If you list # a directory here, its entire contents will be included recursively. + + #bridgeConfig = ( + # # Used for integrating permissions and roles into the Sandstorm shell + # # and for sandstorm-http-bridge to pass to your app. + # # Uncomment this block and adjust the permissions and roles to make + # # sense for your app. + # # For more information, see high-level documentation at + # # https://docs.sandstorm.io/en/latest/developing/auth/ + # # and advanced details in the "BridgeConfig" section of + # # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/package.capnp + # viewInfo = ( + # # For details on the viewInfo field, consult "ViewInfo" in + # # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/grain.capnp + # + # permissions = [ + # # Permissions which a user may or may not possess. A user's current + # # permissions are passed to the app as a comma-separated list of `name` + # # fields in the X-Sandstorm-Permissions header with each request. + # # + # # IMPORTANT: only ever append to this list! Reordering or removing fields + # # will change behavior and permissions for existing grains! To deprecate a + # # permission, or for more information, see "PermissionDef" in + # # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/grain.capnp + # ( + # name = "editor", + # # Name of the permission, used as an identifier for the permission in cases where string + # # names are preferred. Used in sandstorm-http-bridge's X-Sandstorm-Permissions HTTP header. + # + # title = (defaultText = "editor"), + # # Display name of the permission, e.g. to display in a checklist of permissions + # # that may be assigned when sharing. + # + # description = (defaultText = "grants ability to modify data"), + # # Prose describing what this role means, suitable for a tool tip or similar help text. + # ), + # ], + # roles = [ + # # Roles are logical collections of permissions. For instance, your app may have + # # a "viewer" role and an "editor" role + # ( + # title = (defaultText = "editor"), + # # Name of the role. Shown in the Sandstorm UI to indicate which users have which roles. + # + # permissions = [true], + # # An array indicating which permissions this role carries. + # # It should be the same length as the permissions array in + # # viewInfo, and the order of the lists must match. + # + # verbPhrase = (defaultText = "can make changes to the document"), + # # Brief explanatory text to show in the sharing UI indicating + # # what a user assigned this role will be able to do with the grain. + # + # description = (defaultText = "editors may view all site data and change settings."), + # # Prose describing what this role means, suitable for a tool tip or similar help text. + # ), + # ( + # title = (defaultText = "viewer"), + # permissions = [false], + # verbPhrase = (defaultText = "can view the document"), + # description = (defaultText = "viewers may view what other users have written."), + # ), + # ], + # ), + # #apiPath = "/api", + # # Apps can export an API to the world. The API is to be used primarily by Javascript + # # code and native apps, so it can't serve out regular HTML to browsers. If a request + # # comes in to your app's API, sandstorm-http-bridge will prefix the request's path with + # # this string, if specified. + #), ); const myCommand :Spk.Manifest.Command = ( @@ -76,6 +238,10 @@ const myCommand :Spk.Manifest.Command = ( argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"], environ = [ # Note that this defines the *entire* environment seen by your app. - (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin") + (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"), + (key = "SANDSTORM", value = "1"), + # Export SANDSTORM=1 into the environment, so that apps running within Sandstorm + # can detect if $SANDSTORM="1" at runtime, switching UI and/or backend to use + # the app's Sandstorm-specific integration code. ] ); diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh index a13e90326..e05853d7f 100644 --- a/.sandstorm/setup.sh +++ b/.sandstorm/setup.sh @@ -21,5 +21,7 @@ set -euo pipefail # By default, this script does nothing. You'll have to modify it as # appropriate for your application. +wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/debian/fpco.key | sudo apt-key add - +echo 'deb http://download.fpcomplete.com/debian/jessie stable main'|sudo tee /etc/apt/sources.list.d/fpco.list apt-get update -apt-get install -y haskell-platform libncurses-dev +apt-get install -y stack \ No newline at end of file diff --git a/hledger b/hledger index ff59e0c15..6d0716b0a 160000 --- a/hledger +++ b/hledger @@ -1 +1 @@ -Subproject commit ff59e0c15c6a10b91dcb904a80ac526cdb02cd56 +Subproject commit 6d0716b0a5f5cde48e462d429e871b21e944b583 From dd67a97876f410840a1cf1240f9511e6264f0a1b Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 11:45:30 -0500 Subject: [PATCH 10/16] Bump version. --- .sandstorm/sandstorm-pkgdef.capnp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 6730805c6..011799ec0 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "HLedger Web"), - appVersion = 1, # Increment this for every release. + appVersion = 2, # Increment this for every release. - appMarketingVersion = (defaultText = "1.0.1-sandstorm1"), + appMarketingVersion = (defaultText = "1.1-sandstorm2"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. From a064da9a41454b207596221e989659546a772214 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 11:45:50 -0500 Subject: [PATCH 11/16] Use --serve command line parameter rather than the deprecated --server. --- .sandstorm/launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh index 52842a343..70b83848b 100644 --- a/.sandstorm/launcher.sh +++ b/.sandstorm/launcher.sh @@ -29,4 +29,4 @@ set -euo pipefail mkdir -p /var/lib/hledger touch /var/lib/hledger/Ledger cd /var -hledger-web --server --base-url='' -f /var/lib/hledger/Ledger --port 8000 \ No newline at end of file +hledger-web --serve --base-url='' -f /var/lib/hledger/Ledger --port 8000 From 76488987ea35e7fe25649f6ba4f7dbc576fcde86 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 11:46:07 -0500 Subject: [PATCH 12/16] Upgrade HLedger. --- .sandstorm/changelog.md | 4 ++++ hledger | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.sandstorm/changelog.md b/.sandstorm/changelog.md index c46f3e573..eb6a9b56d 100644 --- a/.sandstorm/changelog.md +++ b/.sandstorm/changelog.md @@ -1,3 +1,7 @@ +# V1.1-sandstorm2 (2017-03-21) + + * Upgrade to HLedger 1.1 + # V1.0.1-sandstorm1 (2016-11-15) * Upgrade to HLedger 1.0.1 diff --git a/hledger b/hledger index 6d0716b0a..ceb553b84 160000 --- a/hledger +++ b/hledger @@ -1 +1 @@ -Subproject commit 6d0716b0a5f5cde48e462d429e871b21e944b583 +Subproject commit ceb553b842157bedeba0a6db3584e36fd9b21845 From 924cc0fe5f8b1ffaf04262682bbe747066b6d6b4 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 14:16:12 -0500 Subject: [PATCH 13/16] Update codeUrl to point to Github repository. --- .sandstorm/sandstorm-pkgdef.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 011799ec0..5a15bd851 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -57,7 +57,7 @@ const pkgdef :Spk.PackageDefinition = ( website = "http://hledger.org", # This should be the app's main website url. - codeUrl = "https://dev.thewordnerd.info/nolan/hledger-sandstorm", + codeUrl = "https://github.com/ndarilek/hledger-sandstorm", # URL of the app's source code repository, e.g. a GitHub URL. # Required if you specify a license requiring redistributing code, but optional otherwise. From 9ce13caa5d13e14129a3b8aa01abb1da3465c175 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 14:18:09 -0500 Subject: [PATCH 14/16] Update keyring. --- .sandstorm/pgp-keyring | Bin 2822 -> 1731 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.sandstorm/pgp-keyring b/.sandstorm/pgp-keyring index ac7da14e7b273cbc11c6321c9953b6c0e455d8b1..ee890dff68402eda7ccf2ce626961d8f8c22a360 100644 GIT binary patch delta 1708 zcmV;d22=Tl7Q+pHnE?$1R)f=I0SExAjX(_OnLhYI4o6I678w>)Uoa<2R(o=-3j9Td zMQ=|%&DL5oGkGk3I(Wvlt}uRL)3asaJS%8g$gd1Joi7%Z6qno!LwuH4GGHl`xBs6~ z4%>I}g?zl+Zd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pF z`0wQicVnf>ruDsj|=^b?s zJS~GB`CXzs4SFF`|Dv}_t+@#>{qq@&LX|&2;?mFu2-}9H*uj1fRkr0uC4!sCAbI&$ zbLvEiDc>Cv&Xt)!J2p(Uq_EEiqiwr@Hr+#pLmJYdX_i1vnrY*HPEhT<;b&!Ra_&zI z-%#Z0s60@R*Nyyk)qfKAR9GyJuY|bjkr}z^3+m)%4irxTVcx1B9`~`E zyl)}YrRBc$>eB0E_fkLi{^6{M6Al=j7ne3HdjeBsdU3gfvKDOO F{U1hvE;s-H From 51aa6f135aab17572db4d67100b3b839565c303b Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 21 Mar 2017 14:19:55 -0500 Subject: [PATCH 15/16] Update PGP signature. --- .sandstorm/pgp-signature | Bin 688 -> 430 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.sandstorm/pgp-signature b/.sandstorm/pgp-signature index b4e805ada76c1d4d617b1aec7f787571635af93d..dbdbcdf7261e3ceeb655c121474b521708f45da0 100644 GIT binary patch literal 430 zcmV;f0a5;=0h_?f%)r6uzAWSF{ph(&jHfG;7$Pp#9Q9O4%vC7KNL5HIEy>6)QpisO z^MVueQi@CRi*ofc^A!>c3KYsSOESPRY56%h`Q@2;=?b1MRtgpshDI4?1qKxcc|}#( z=EfOmg=SS5Mp+dl>6KMg$t9KMg~f>_+3Dt4Y3W9}Rpq96mIj@SGAs;?91Lu%OduC9 zaB&L2oYkDf{+o4K-1^Gc-K+oAe|R+^@l$tu*;DquZKboG-EbA%8$a!ZOwOth;a>Z< z9vv-pXLmaPRB}49M*GCc|FgHYrOr89x%!doXZed~?|!**;QikBzQ;{1ZZ#hc6&GlD z$*p=wz@KgDr@t$Gdj4fzJ#K7r`pViX?lVv>sBdOV@X4;V~ zyVlrC2S)h)(R;B#blS~tZ5pz5ubIC$-oBb=}F@knUwMf^0`W z`zGgUawbdq^o4K~rp(#xGO=lkeCB0_+m%1X+&MmANklpzICwEK zXf|*#crb2qdTTc`Xl8LXdT26gcywoZdU|7Yc{g!$VRUO}H)>{QGHrTyHEuaDi2@u1 z009U91_c6EOJzg=3JDPHzN%D#gvZAbmJk5CP-97k8F|{9>KbR0ej6lUV4Q0<#^pr0 zfS4~kn9Hf#dsGe|!>e`ua#RjYj8sUd6H6mMJ!|_eY=apsObpX#pVcVqEncvzE7W-N z(ZHO<2X5m(tGI@Oqln{Ea6OSQJ=aHc)Ep}i~%xu zK0eF$F(KOcUcBgTKt5i&u_goKkFfiFMW$%apFO~t@2d*zX|V=9m{_NLa|NWvwZ|ue zB;QRL<0^x0rw_Uv_S$lVv18se$0zeje3DK2R<1Q4fklxq);7au$%c1{#D#W4&CI_9 zVqZ99l=`<8!04beXe&BJLBAFB;)hTTfGlvdJtw+=>BpL{fZjteCv$#J02Vh)DgDy@ zRpVX$6x`JFiuFC=_4a?iI@ zn_WbxhbB7kz9xA^pI0WJC+JoXYm9vS($6%xxwdN~Ntn;YlKr Date: Fri, 25 May 2018 20:34:42 -0500 Subject: [PATCH 16/16] remove submodules --- .gitmodules | 3 --- hledger | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 hledger diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 8cda7c547..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "hledger"] - path = hledger - url = https://github.com/simonmichael/hledger/ diff --git a/hledger b/hledger deleted file mode 160000 index ceb553b84..000000000 --- a/hledger +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ceb553b842157bedeba0a6db3584e36fd9b21845