Merge branch 'beta' into mergemaster
# Conflicts: # src/main.cpp
This commit is contained in:
48
contrib/amqp/amqp_sub.py
Normal file
48
contrib/amqp/amqp_sub.py
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# Requirements:
|
||||
# pip install python-qpid-proton
|
||||
|
||||
import binascii
|
||||
from proton.handlers import MessagingHandler
|
||||
from proton.reactor import Container
|
||||
|
||||
port = 5672
|
||||
|
||||
class Server(MessagingHandler):
|
||||
def __init__(self, url):
|
||||
super(Server, self).__init__()
|
||||
self.url = url
|
||||
self.senders = {}
|
||||
|
||||
def on_start(self, event):
|
||||
print "Listening on:", self.url
|
||||
self.container = event.container
|
||||
self.acceptor = event.container.listen(self.url)
|
||||
|
||||
def on_message(self, event):
|
||||
m = event.message
|
||||
topic = m.subject
|
||||
body = m.body
|
||||
sequence = str( m.properties['x-opt-sequence-number'] )
|
||||
if topic == "hashablock":
|
||||
print '- HASH BLOCK ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
elif topic == "hashtx":
|
||||
print '- HASH TX ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
elif topic == "rawblock":
|
||||
print '- RAW BLOCK HEADER ('+sequence+') -'
|
||||
print binascii.hexlify(body[:80])
|
||||
elif topic == "rawtx":
|
||||
print '- RAW TX ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
|
||||
try:
|
||||
Container(Server("127.0.0.1:%i" % port)).run()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
62
contrib/ci-workers/README.md
Normal file
62
contrib/ci-workers/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Zcash CI workers
|
||||
|
||||
This folder contains the Ansible playbooks for configuring a fresh OS
|
||||
installation for use as a Buildbot worker in Zcash's CI.
|
||||
|
||||
# Criteria for Adding Workers
|
||||
|
||||
a. Don't add workers until users complain about a problem on a platform
|
||||
that doesn't yet have workers or if we anticipate many users will use
|
||||
a platform, we may pre-emptively add an unsupported worker for it.
|
||||
|
||||
b. Prioritize the platforms that seem to have the most users.
|
||||
|
||||
c. When adding workers start by adding workers for the "most common"
|
||||
variant of any distro, then if users later encounter problems with a
|
||||
sub-variant, we can consider adding new workers at that point.
|
||||
Example: add Ubuntu Desktop before Xubuntu, on the assumption the
|
||||
former has a larger population base.
|
||||
|
||||
# Setting up a latent worker on Amazon EC2
|
||||
|
||||
- Add a regular (non-latent) worker to the master.cfg for dev-ci.z.cash, and
|
||||
deploy the changes.
|
||||
- This enables the Ansible playbook to run to completion, ending in the worker
|
||||
connecting to the master.
|
||||
|
||||
- Start a basic EC2 instance using the template AMI for the target OS.
|
||||
- Choose the smallest instance size, it won't be used for building Zcash.
|
||||
|
||||
- Figure out which user to log into the instance with.
|
||||
- E.g. for the Ubuntu template, use "ubuntu" instead of "root"
|
||||
- If you get an Ansible error later with a message like "Failed to connect to
|
||||
the host via ssh: Received message too long 1349281121\r\n", that means the
|
||||
instance is sending a text string in response to the SSH connection, and the
|
||||
Ansible protocol is balking. Try manually logging in with the same
|
||||
credentials to diagnose.
|
||||
|
||||
- Create `inventory/hosts` containing the following:
|
||||
|
||||
[zcash-ci-worker-unix]
|
||||
some-name ansible_host=<INSTANCE_IP> ansible_ssh_user=<USERNAME>
|
||||
|
||||
- Run `ansible-playbook -e buildbot_worker_host_template=templates/host.ec2.j2 -i inventory/hosts unix.yml`,
|
||||
passing in the worker's Buildbot name and password.
|
||||
- After a successful run, the worker should be connected to dev-ci.z.cash and
|
||||
visible in its worker list.
|
||||
|
||||
- Create an AMI from the instance. This is the worker AMI to put into the
|
||||
master.cfg for dev-ci.z.cash.
|
||||
- 16 GB of storage should be sufficient.
|
||||
|
||||
- SSH into the instance, and edit the worker config to connect to ci.z.cash.
|
||||
|
||||
- Create an AMI from the instance. This is the worker AMI to put into the
|
||||
master.cfg for ci.z.cash.
|
||||
- 16 GB of storage should be sufficient.
|
||||
|
||||
- Delete the instance (it is no longer needed).
|
||||
|
||||
- Edit the master.cfg to turn the new worker into a latent (using the new AMI
|
||||
IDs), add it to the appropriate worker groups, set up new builders etc.
|
||||
- Deploy this via the normal PR review process.
|
||||
2
contrib/ci-workers/ansible.cfg
Normal file
2
contrib/ci-workers/ansible.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
27
contrib/ci-workers/grind.yml
Normal file
27
contrib/ci-workers/grind.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
# Configure a Buildbot worker
|
||||
- include: unix.yml
|
||||
|
||||
- name: Install grind-specific worker dependencies
|
||||
hosts: zcash-ci-worker-unix
|
||||
become: true
|
||||
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
|
||||
tasks:
|
||||
- name: Get dependencies for distribution
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml"
|
||||
- "vars/{{ ansible_distribution }}.yml"
|
||||
- "vars/{{ ansible_os_family }}.yml"
|
||||
skip: true
|
||||
|
||||
- name: Install required packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ grind_deps }}"
|
||||
8
contrib/ci-workers/tasks/install-pip.yml
Normal file
8
contrib/ci-workers/tasks/install-pip.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Fetch pip installer
|
||||
get_url:
|
||||
url: https://bootstrap.pypa.io/get-pip.py
|
||||
dest: /tmp/get-pip.py
|
||||
|
||||
- name: Install pip
|
||||
command: "{{ ansible_python.executable }} /tmp/get-pip.py"
|
||||
17
contrib/ci-workers/templates/buildbot-worker.service.j2
Normal file
17
contrib/ci-workers/templates/buildbot-worker.service.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Buildbot worker
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/home/{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/twistd.pid
|
||||
WorkingDirectory=/home/{{ buildbot_worker_user }}
|
||||
ExecStart={{ pip_bin_dir }}/buildbot-worker start {{ buildbot_worker_name }}
|
||||
ExecReload={{ pip_bin_dir }}/buildbot-worker restart {{ buildbot_worker_name }}
|
||||
ExecStop={{ pip_bin_dir }}/buildbot-worker stop {{ buildbot_worker_name }}
|
||||
Restart=always
|
||||
User={{ buildbot_worker_user }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1
contrib/ci-workers/templates/host.ec2.j2
Normal file
1
contrib/ci-workers/templates/host.ec2.j2
Normal file
@@ -0,0 +1 @@
|
||||
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
|
||||
3
contrib/ci-workers/templates/host.j2
Normal file
3
contrib/ci-workers/templates/host.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
|
||||
Memory: {{ ansible_memtotal_mb }} MB
|
||||
CPU: {{ ansible_processor[1] }}
|
||||
152
contrib/ci-workers/unix.yml
Normal file
152
contrib/ci-workers/unix.yml
Normal file
@@ -0,0 +1,152 @@
|
||||
---
|
||||
- name: Configure a Buildbot worker for Zcash CI
|
||||
hosts: zcash-ci-worker-unix
|
||||
become: true
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
- vars/buildbot.yml
|
||||
|
||||
vars_prompt:
|
||||
- name: "buildbot_worker_admin"
|
||||
prompt: "Admin details"
|
||||
default: "Zcash <sysadmin@z.cash>"
|
||||
- name: "buildbot_worker_name"
|
||||
prompt: "Buildbot worker name (provided by ZECC)"
|
||||
private: no
|
||||
- name: "buildbot_worker_password"
|
||||
prompt: "Buildbot worker password (provided by ZECC)"
|
||||
|
||||
pre_tasks:
|
||||
- name: Install Python 2.7 for Ansible and Buildbot
|
||||
raw: test -e /usr/bin/python || test -e /usr/bin/python2 || test -e /usr/bin/python2.7 || test -e /usr/local/bin/python2.7 || (test -e /usr/bin/apt && apt -qqy update && apt install -qqy python) || (test -e /usr/bin/dnf && dnf install -qqy python2) || (test -e /usr/sbin/pkg && pkg install -qqy python2)
|
||||
register: output
|
||||
changed_when:
|
||||
- output.stdout != ""
|
||||
- output.stdout != "\r\n"
|
||||
|
||||
- name: Check if Python is in the configured location
|
||||
raw: test -e {{ ansible_python_interpreter }}
|
||||
ignore_errors: true
|
||||
register: python_check
|
||||
when: ansible_python_interpreter is defined
|
||||
|
||||
- name: Fail if configured Python is unavailable
|
||||
fail:
|
||||
msg: "Python is not accessible at {{ ansible_python_interpreter }} on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary."
|
||||
when: ansible_python_interpreter is defined and python_check.rc == 1
|
||||
|
||||
- name: Check if Python is in the default location
|
||||
raw: test -e /usr/bin/python
|
||||
ignore_errors: true
|
||||
register: python_check
|
||||
when: ansible_python_interpreter is undefined
|
||||
|
||||
- name: Fail if default Python is unavailable
|
||||
fail:
|
||||
msg: Python is not accessible at /usr/bin/python on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary.
|
||||
when: ansible_python_interpreter is undefined and python_check.rc == 1
|
||||
|
||||
- name: Gathering Facts
|
||||
setup:
|
||||
|
||||
- name: Fail if Python is the wrong version
|
||||
fail:
|
||||
msg: "The Python binary at {{ ansible_python.executable }} is version {{ ansible_python_version }}! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary."
|
||||
when: ansible_python.version.major != 2 or ansible_python.version.minor != 7
|
||||
|
||||
tasks:
|
||||
- name: Get dependencies for distribution
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml"
|
||||
- "vars/{{ ansible_distribution }}.yml"
|
||||
- "vars/{{ ansible_os_family }}.yml"
|
||||
skip: true
|
||||
|
||||
- name: Collate dependencies
|
||||
set_fact:
|
||||
package_deps: "{{ buildbot_deps + fetch_deps + conf_deps + build_deps + link_deps + dist_deps }}"
|
||||
python_modules: "{{ buildbot_modules + rpc_test_modules }}"
|
||||
|
||||
- name: Update rolling release [Arch Linux]
|
||||
pacman:
|
||||
update_cache: yes
|
||||
upgrade: yes
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
|
||||
- name: Install required packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ package_deps }}"
|
||||
|
||||
- name: Install pip [CentOS]
|
||||
include: tasks/install-pip.yml
|
||||
when: ansible_distribution == 'CentOS'
|
||||
|
||||
- name: Install required Python modules
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
with_items: "{{ python_modules }}"
|
||||
notify: restart buildbot-worker
|
||||
|
||||
- name: Set up the Buildbot worker user
|
||||
user:
|
||||
name: "{{ buildbot_worker_user }}"
|
||||
comment: Buildbot worker
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
|
||||
- name: Create Buildbot worker
|
||||
command: >
|
||||
buildbot-worker create-worker ~/{{ buildbot_worker_name }}
|
||||
{{ buildbot_master_host }}:{{ buildbot_master_port }}
|
||||
{{ buildbot_worker_name|quote }} {{ buildbot_worker_password|quote }}
|
||||
args:
|
||||
creates: "~/{{ buildbot_worker_name }}/buildbot.tac"
|
||||
become_user: "{{ buildbot_worker_user }}"
|
||||
|
||||
- name: Set admin details for Buildbot worker
|
||||
copy:
|
||||
content: "{{ buildbot_worker_admin }}"
|
||||
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/admin"
|
||||
owner: "{{ buildbot_worker_user }}"
|
||||
group: "{{ buildbot_worker_user }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Set host details for Buildbot worker
|
||||
template:
|
||||
src: "{{ buildbot_worker_host_template }}"
|
||||
dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/host"
|
||||
owner: "{{ buildbot_worker_user }}"
|
||||
group: "{{ buildbot_worker_user }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy Buildbot worker systemd service unit
|
||||
template:
|
||||
src: templates/buildbot-worker.service.j2
|
||||
dest: "/etc/systemd/system/buildbot-worker.service"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: reload systemd
|
||||
|
||||
- name: Start Buildbot worker.
|
||||
service:
|
||||
name: buildbot-worker
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
handlers:
|
||||
- name: restart buildbot-worker
|
||||
service:
|
||||
name: buildbot-worker
|
||||
state: restarted
|
||||
|
||||
- name: reload systemd
|
||||
command: /bin/systemctl daemon-reload
|
||||
7
contrib/ci-workers/vars/Archlinux.yml
Normal file
7
contrib/ci-workers/vars/Archlinux.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
buildbot_deps:
|
||||
- python2-pip
|
||||
build_deps:
|
||||
- multilib/gcc
|
||||
- make
|
||||
pip_bin_dir: /usr/bin
|
||||
13
contrib/ci-workers/vars/CentOS.yml
Normal file
13
contrib/ci-workers/vars/CentOS.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
buildbot_deps: [] # Empty to remove python-pip
|
||||
build_deps:
|
||||
- bzip2
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- make
|
||||
- patch
|
||||
dist_deps:
|
||||
- pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
- python-devel
|
||||
- redhat-rpm-config
|
||||
pip_bin_dir: /usr/bin
|
||||
6
contrib/ci-workers/vars/Debian.yml
Normal file
6
contrib/ci-workers/vars/Debian.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
dist_deps:
|
||||
- pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
- python-dev
|
||||
10
contrib/ci-workers/vars/Fedora.yml
Normal file
10
contrib/ci-workers/vars/Fedora.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
build_deps:
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- make
|
||||
- patch
|
||||
dist_deps:
|
||||
- pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
- python-devel
|
||||
- redhat-rpm-config
|
||||
9
contrib/ci-workers/vars/FreeBSD.yml
Normal file
9
contrib/ci-workers/vars/FreeBSD.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
buildbot_deps:
|
||||
- py27-pip
|
||||
build_deps:
|
||||
- gcc
|
||||
- gmake
|
||||
dist_deps:
|
||||
- bash
|
||||
- pkgconf # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
5
contrib/ci-workers/vars/Ubuntu.yml
Normal file
5
contrib/ci-workers/vars/Ubuntu.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
dist_deps:
|
||||
- pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
5
contrib/ci-workers/vars/buildbot.yml
Normal file
5
contrib/ci-workers/vars/buildbot.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
buildbot_worker_user: zcbbworker
|
||||
buildbot_master_host: dev-ci.z.cash
|
||||
buildbot_master_port: 9899
|
||||
buildbot_worker_host_template: templates/host.j2
|
||||
49
contrib/ci-workers/vars/default.yml
Normal file
49
contrib/ci-workers/vars/default.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
# These variables can be overridden in distribution files.
|
||||
|
||||
# Dependencies required to install Buildbot
|
||||
buildbot_deps:
|
||||
- python-pip # So we can install Python modules
|
||||
|
||||
# Dependencies required to download files
|
||||
fetch_deps:
|
||||
- git
|
||||
- wget # For zcutil/fetch-params.sh
|
||||
|
||||
# Dependencies required to configure Zcash
|
||||
conf_deps:
|
||||
- autoconf
|
||||
- automake
|
||||
- m4
|
||||
|
||||
# Dependencies required to compile Zcash
|
||||
build_deps:
|
||||
- g++
|
||||
- gcc
|
||||
- make
|
||||
|
||||
# Dependencies required to link Zcash
|
||||
link_deps:
|
||||
- libtool
|
||||
|
||||
# Additional distribution-specific dependencies
|
||||
dist_deps: []
|
||||
|
||||
# Additional grind-specific dependencies
|
||||
grind_deps:
|
||||
- lcov
|
||||
- valgrind
|
||||
|
||||
# Python modules required for a Zcash Buildbot worker
|
||||
buildbot_modules:
|
||||
- pip # Needs to be updated first so Buildbot installs
|
||||
- buildbot-worker
|
||||
- pyflakes
|
||||
|
||||
# Python modules required to run the Zcash RPC test suite
|
||||
rpc_test_modules:
|
||||
- pyblake2
|
||||
- pyzmq
|
||||
|
||||
# Environment variables
|
||||
pip_bin_dir: /usr/local/bin
|
||||
@@ -1,3 +1,93 @@
|
||||
zcash (1.0.15) stable; urgency=medium
|
||||
|
||||
* 1.0.15 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 28 Feb 2018 16:58:19 +0000
|
||||
|
||||
zcash (1.0.15~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.15-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sat, 24 Feb 2018 04:20:05 +0000
|
||||
|
||||
zcash (1.0.14) stable; urgency=medium
|
||||
|
||||
* 1.0.14 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 03 Jan 2018 23:54:16 +0100
|
||||
|
||||
zcash (1.0.14~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.14-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 22 Dec 2017 10:12:41 +0000
|
||||
|
||||
zcash (1.0.13) stable; urgency=medium
|
||||
|
||||
* 1.0.13 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Mon, 20 Nov 2017 12:31:53 +0000
|
||||
|
||||
zcash (1.0.13~rc2) stable; urgency=medium
|
||||
|
||||
* 1.0.13-rc2 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 17 Nov 2017 18:01:08 +0000
|
||||
|
||||
zcash (1.0.13~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.13-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 15 Nov 2017 00:02:21 +0000
|
||||
|
||||
zcash (1.0.12) stable; urgency=medium
|
||||
|
||||
* 1.0.12 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 28 Sep 2017 01:26:44 +0100
|
||||
|
||||
zcash (1.0.12~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.12-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Sat, 23 Sep 2017 10:51:36 +0100
|
||||
|
||||
zcash (1.0.11) stable; urgency=medium
|
||||
|
||||
* 1.0.11 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Tue, 15 Aug 2017 10:06:25 +0100
|
||||
|
||||
zcash (1.0.11~rc1) stable; urgency=medium
|
||||
|
||||
* 1.0.11-rc1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Tue, 01 Aug 2017 17:12:52 +0200
|
||||
|
||||
zcash (1.0.10+1) stable; urgency=medium
|
||||
|
||||
* 1.0.10-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Fri, 23 Jun 2017 19:50:41 -0700
|
||||
|
||||
zcash (1.0.10) stable; urgency=medium
|
||||
|
||||
* 1.0.10 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 22 Jun 2017 15:13:04 +1200
|
||||
|
||||
zcash (1.0.9) stable; urgency=medium
|
||||
|
||||
* 1.0.9 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Wed, 24 May 2017 12:51:06 -0700
|
||||
|
||||
zcash (1.0.8+1) jessie; urgency=high
|
||||
|
||||
* 1.0.8-1 release.
|
||||
|
||||
-- Zcash Company <team@z.cash> Thu, 13 Apr 2017 20:20:37 -0700
|
||||
|
||||
zcash (1.0.8) jessie; urgency=medium
|
||||
|
||||
* 1.0.8 release.
|
||||
|
||||
@@ -38,10 +38,6 @@ Files: depends/sources/openssl-*.tar.gz
|
||||
Copyright: 1998-2016 The OpenSSL Project and 1995-1998 Eric Young
|
||||
License: OpenSSL+SSLeay
|
||||
|
||||
Files: depends/sources/miniupnpc-*.tar.gz
|
||||
Copyright: 2005-2016 Thomas BERNARD
|
||||
License: BSD-3clause
|
||||
|
||||
Files: depends/sources/zeromq-*.tar.gz
|
||||
Copyright:
|
||||
1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
@@ -59,6 +55,18 @@ Files: depends/sources/google*.tar.gz
|
||||
Copyright: 2008 Google Inc.
|
||||
License: BSD-3clause-Google
|
||||
|
||||
Files: depends/sources/qpid-proton-*.tar.gz
|
||||
Copyright: 2012-2017 The Apache Software Foundation
|
||||
License: Apache-Qpid-Proton-with-BSD-Subcomponents
|
||||
|
||||
Files: src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
|
||||
Copyright: 2008 Don Anderson <dda@sleepycat.com>
|
||||
License: GNU-All-permissive-License
|
||||
|
||||
Files: src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
|
||||
Copyright: 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
License: GNU-All-permissive-License
|
||||
|
||||
License: Boost-Software-License-1.0
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
@@ -1091,3 +1099,226 @@ License: LGPL-with-ZeroMQ-exception
|
||||
Comment:
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: Apache-Qpid-Proton-with-BSD-Subcomponents
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
.
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
.
|
||||
1. Definitions.
|
||||
.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
.
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
.
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
.
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
.
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
.
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
.
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
.
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
.
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
.
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
.
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
.
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
.
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
.
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
.
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
.
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
.
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
.
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
.
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
.
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
.
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
.
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
.
|
||||
END OF TERMS AND CONDITIONS
|
||||
.
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
.
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
.
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
.
|
||||
PROTON SUBCOMPONENTS:
|
||||
.
|
||||
Proton includes freegetopt with a separate BSD license. Your use
|
||||
of the source code for freegetopt is subject to the terms and
|
||||
conditions of its license in examples/include/pncompat/internal/LICENSE.
|
||||
.
|
||||
The setup scripts for the python bindings include files derived by
|
||||
PyZMQ and are licensed with a separate Modified BSD license. Use of
|
||||
the source code in these setup files are subject to the terms and
|
||||
conditions in the license:
|
||||
proton-c/bindings/python/setuputils/PYZMQ_LICENSE.BSD.
|
||||
|
||||
License: GNU-All-permissive-License
|
||||
Copying and distribution of this file, with or without modification, are
|
||||
permitted in any medium without royalty provided the copyright notice
|
||||
and this notice are preserved. This file is offered as-is, without any
|
||||
warranty.
|
||||
|
||||
|
||||
@@ -4,25 +4,25 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
||||
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||
|
||||
ZCASHD=${ZCASHD:-$SRCDIR/zcashd}
|
||||
ZCASHCLI=${ZCASHCLI:-$SRCDIR/zcash-cli}
|
||||
ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx}
|
||||
KOMODOD=${KOMODOD:-$SRCDIR/komodod}
|
||||
KOMODOCLI=${KOMODOCLI:-$SRCDIR/komodo-cli}
|
||||
KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx}
|
||||
|
||||
[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1
|
||||
[ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1
|
||||
|
||||
# The autodetected version git tag can screw up manpage output a little bit
|
||||
ZECVER=($($ZCASHCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }'))
|
||||
KMDVER=($($KOMODOCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }'))
|
||||
|
||||
# Create a footer file with copyright content.
|
||||
# This gets autodetected fine for zcashd if --version-string is not set,
|
||||
# but has different outcomes for zcash-cli.
|
||||
# This gets autodetected fine for komodod if --version-string is not set,
|
||||
# but has different outcomes for komodo-cli.
|
||||
echo "[COPYRIGHT]" > footer.h2m
|
||||
$ZCASHD --version | sed -n '1!p' >> footer.h2m
|
||||
$KOMODOD --version | sed -n '1!p' >> footer.h2m
|
||||
|
||||
for cmd in $ZCASHD $ZCASHCLI $ZCASHTX; do
|
||||
for cmd in $KOMODOD $KOMODOCLI $KOMODOTX; do
|
||||
cmdname="${cmd##*/}"
|
||||
help2man -N --version-string=${ZECVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||
sed -i "s/\\\-${ZECVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||
help2man -N --version-string=${KMDVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||
sed -i "s/\\\-${KMDVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||
done
|
||||
|
||||
rm -f footer.h2m
|
||||
|
||||
@@ -12,6 +12,7 @@ import os
|
||||
|
||||
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
|
||||
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
|
||||
NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning
|
||||
|
||||
def check_ELF_PIE(executable):
|
||||
'''
|
||||
@@ -94,7 +95,7 @@ def check_ELF_RELRO(executable):
|
||||
raise IOError('Error opening file')
|
||||
for line in stdout.split(b'\n'):
|
||||
tokens = line.split()
|
||||
if len(tokens)>1 and tokens[1] == b'(BIND_NOW)' or (len(tokens)>2 and tokens[1] == b'(FLAGS)' and b'BIND_NOW' in tokens[2]):
|
||||
if len(tokens)>1 and tokens[1] == b'(BIND_NOW)' or (len(tokens)>2 and tokens[1] == b'(FLAGS)' and b'BIND_NOW' in tokens[2:]):
|
||||
have_bindnow = True
|
||||
return have_gnu_relro and have_bindnow
|
||||
|
||||
@@ -114,26 +115,50 @@ def check_ELF_Canary(executable):
|
||||
|
||||
def get_PE_dll_characteristics(executable):
|
||||
'''
|
||||
Get PE DllCharacteristics bits
|
||||
Get PE DllCharacteristics bits.
|
||||
Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
|
||||
and bits is the DllCharacteristics value.
|
||||
'''
|
||||
p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
raise IOError('Error opening file')
|
||||
arch = ''
|
||||
bits = 0
|
||||
for line in stdout.split('\n'):
|
||||
tokens = line.split()
|
||||
if len(tokens)>=2 and tokens[0] == 'architecture:':
|
||||
arch = tokens[1].rstrip(',')
|
||||
if len(tokens)>=2 and tokens[0] == 'DllCharacteristics':
|
||||
return int(tokens[1],16)
|
||||
return 0
|
||||
bits = int(tokens[1],16)
|
||||
return (arch,bits)
|
||||
|
||||
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020
|
||||
IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040
|
||||
IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100
|
||||
|
||||
def check_PE_PIE(executable):
|
||||
def check_PE_DYNAMIC_BASE(executable):
|
||||
'''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
|
||||
return bool(get_PE_dll_characteristics(executable) & 0x40)
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
|
||||
return (bits & reqbits) == reqbits
|
||||
|
||||
# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE
|
||||
# to have secure ASLR.
|
||||
def check_PE_HIGH_ENTROPY_VA(executable):
|
||||
'''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
if arch == 'i386:x86-64':
|
||||
reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
|
||||
else: # Unnecessary on 32-bit
|
||||
assert(arch == 'i386')
|
||||
reqbits = 0
|
||||
return (bits & reqbits) == reqbits
|
||||
|
||||
def check_PE_NX(executable):
|
||||
'''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)'''
|
||||
return bool(get_PE_dll_characteristics(executable) & 0x100)
|
||||
(arch,bits) = get_PE_dll_characteristics(executable)
|
||||
return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
|
||||
|
||||
CHECKS = {
|
||||
'ELF': [
|
||||
@@ -143,7 +168,8 @@ CHECKS = {
|
||||
('Canary', check_ELF_Canary)
|
||||
],
|
||||
'PE': [
|
||||
('PIE', check_PE_PIE),
|
||||
('DYNAMIC_BASE', check_PE_DYNAMIC_BASE),
|
||||
('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
|
||||
('NX', check_PE_NX)
|
||||
]
|
||||
}
|
||||
@@ -168,12 +194,18 @@ if __name__ == '__main__':
|
||||
continue
|
||||
|
||||
failed = []
|
||||
warning = []
|
||||
for (name, func) in CHECKS[etype]:
|
||||
if not func(filename):
|
||||
failed.append(name)
|
||||
if name in NONFATAL:
|
||||
warning.append(name)
|
||||
else:
|
||||
failed.append(name)
|
||||
if failed:
|
||||
print('%s: failed %s' % (filename, ' '.join(failed)))
|
||||
retval = 1
|
||||
if warning:
|
||||
print('%s: warning %s' % (filename, ' '.join(warning)))
|
||||
except IOError:
|
||||
print('%s: cannot open' % filename)
|
||||
retval = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
name: "zcash-1.0.8"
|
||||
name: "zcash-1.0.15"
|
||||
enable_cache: true
|
||||
distro: "debian"
|
||||
suites:
|
||||
@@ -85,7 +85,7 @@ script: |
|
||||
BASEPREFIX=`pwd`/depends
|
||||
# Build dependencies for each host
|
||||
for i in $HOSTS; do
|
||||
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
||||
NO_PROTON="x" make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
||||
done
|
||||
|
||||
# Faketime for binaries
|
||||
|
||||
160
contrib/komodo-cli.bash-completion
Normal file
160
contrib/komodo-cli.bash-completion
Normal file
@@ -0,0 +1,160 @@
|
||||
# bash programmable completion for komodo-cli(1)
|
||||
# Copyright (c) 2012-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# call $komodo-cli for RPC
|
||||
_komodo_rpc() {
|
||||
# determine already specified args necessary for RPC
|
||||
local rpcargs=()
|
||||
for i in ${COMP_LINE}; do
|
||||
case "$i" in
|
||||
-conf=*|-datadir=*|-regtest|-rpc*|-testnet)
|
||||
rpcargs=( "${rpcargs[@]}" "$i" )
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$komodo_cli "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add wallet accounts to COMPREPLY
|
||||
_komodo_accounts() {
|
||||
local accounts
|
||||
# Accounts are deprecated in komodo
|
||||
#accounts=$(_komodo_rpc listaccounts | awk -F '"' '{ print $2 }')
|
||||
accounts="\\\"\\\""
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
||||
}
|
||||
|
||||
_komodo_cli() {
|
||||
local cur prev words=() cword
|
||||
local komodo_cli
|
||||
|
||||
# save and use original argument to invoke komodo-cli for -help, help and RPC
|
||||
# as komodo-cli might not be in $PATH
|
||||
komodo_cli="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
if ((cword > 5)); then
|
||||
case ${words[cword-5]} in
|
||||
sendtoaddress)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 4)); then
|
||||
case ${words[cword-4]} in
|
||||
importaddress|listtransactions|setban)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
signrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 3)); then
|
||||
case ${words[cword-3]} in
|
||||
addmultisigaddress)
|
||||
_komodo_accounts
|
||||
return 0
|
||||
;;
|
||||
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ((cword > 2)); then
|
||||
case ${words[cword-2]} in
|
||||
addnode)
|
||||
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
setban)
|
||||
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
z_importkey|z_importviewingkey)
|
||||
COMPREPLY=( $( compgen -W "yes no whenkeyisnew" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_komodo_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet|dumpwallet|importwallet|z_exportwallet|z_importwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
getaddednodeinfo|getrawmempool|lockunspent|setgenerate)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
|
||||
_komodo_accounts
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-conf=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
-*=*) # prevent nonsense completions
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
local helpopts commands
|
||||
|
||||
# only parse -help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
helpopts=$($komodo_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
fi
|
||||
|
||||
# only parse help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
||||
commands=$(_komodo_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
|
||||
fi
|
||||
|
||||
COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
} &&
|
||||
complete -F _komodo_cli komodo-cli
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
@@ -1,15 +1,15 @@
|
||||
# bash programmable completion for bitcoin-tx(1)
|
||||
# bash programmable completion for komodo-tx(1)
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
_bitcoin_tx() {
|
||||
_komodo_tx() {
|
||||
local cur prev words=() cword
|
||||
local bitcoin_tx
|
||||
local komodo_tx
|
||||
|
||||
# save and use original argument to invoke bitcoin-tx for -help
|
||||
# save and use original argument to invoke komodo-tx for -help
|
||||
# it might not be in $PATH
|
||||
bitcoin_tx="$1"
|
||||
komodo_tx="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n =: cur prev words cword
|
||||
@@ -27,15 +27,15 @@ _bitcoin_tx() {
|
||||
|
||||
if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
|
||||
# only options (or an uncompletable hex-string) allowed
|
||||
# parse bitcoin-tx -help for options
|
||||
# parse komodo-tx -help for options
|
||||
local helpopts
|
||||
helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d )
|
||||
helpopts=$($komodo_tx -help | sed -e '/^ -/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
else
|
||||
# only commands are allowed
|
||||
# parse -help for commands
|
||||
local helpcmds
|
||||
helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
|
||||
helpcmds=$($komodo_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
|
||||
fi
|
||||
|
||||
@@ -46,7 +46,7 @@ _bitcoin_tx() {
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _bitcoin_tx zcash-tx
|
||||
complete -F _komodo_tx komodo-tx
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
57
contrib/komodod.bash-completion
Normal file
57
contrib/komodod.bash-completion
Normal file
@@ -0,0 +1,57 @@
|
||||
# bash programmable completion for komodod(1)
|
||||
# Copyright (c) 2012-2017 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2017 The komodo developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
_komodod() {
|
||||
local cur prev words=() cword
|
||||
local komodod
|
||||
|
||||
# save and use original argument to invoke komodod for -help
|
||||
# it might not be in $PATH
|
||||
komodod="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
|
||||
case "$cur" in
|
||||
-conf=*|-pid=*|-loadblock=*|-rpccookiefile=*|-wallet=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*|-exportdir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
-*=*) # prevent nonsense completions
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
||||
# only parse -help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
local helpopts
|
||||
helpopts=$($komodod -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
fi
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
} &&
|
||||
complete -F _komodod komodod
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
@@ -1,9 +1,9 @@
|
||||
# bash programmable completion for bitcoin-cli(1)
|
||||
# bash programmable completion for zcash-cli(1)
|
||||
# Copyright (c) 2012-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# call $bitcoin-cli for RPC
|
||||
# call $zcash-cli for RPC
|
||||
_zcash_rpc() {
|
||||
# determine already specified args necessary for RPC
|
||||
local rpcargs=()
|
||||
@@ -14,7 +14,7 @@ _zcash_rpc() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
$bitcoin_cli "${rpcargs[@]}" "$@"
|
||||
$zcash_cli "${rpcargs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Add wallet accounts to COMPREPLY
|
||||
@@ -28,11 +28,11 @@ _zcash_accounts() {
|
||||
|
||||
_zcash_cli() {
|
||||
local cur prev words=() cword
|
||||
local bitcoin_cli
|
||||
local zcash_cli
|
||||
|
||||
# save and use original argument to invoke bitcoin-cli for -help, help and RPC
|
||||
# as bitcoin-cli might not be in $PATH
|
||||
bitcoin_cli="$1"
|
||||
# save and use original argument to invoke zcash-cli for -help, help and RPC
|
||||
# as zcash-cli might not be in $PATH
|
||||
zcash_cli="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
@@ -82,10 +82,14 @@ _zcash_cli() {
|
||||
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction|z_importkey)
|
||||
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
z_importkey|z_importviewingkey)
|
||||
COMPREPLY=( $( compgen -W "yes no whenkeyisnew" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
move|setaccount)
|
||||
_zcash_accounts
|
||||
return 0
|
||||
@@ -127,7 +131,7 @@ _zcash_cli() {
|
||||
|
||||
# only parse -help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
helpopts=$($zcash_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
fi
|
||||
|
||||
# only parse help if senseful
|
||||
57
contrib/zcash-tx.bash-completion
Normal file
57
contrib/zcash-tx.bash-completion
Normal file
@@ -0,0 +1,57 @@
|
||||
# bash programmable completion for zcash-tx(1)
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
_zcash_tx() {
|
||||
local cur prev words=() cword
|
||||
local zcash_tx
|
||||
|
||||
# save and use original argument to invoke zcash-tx for -help
|
||||
# it might not be in $PATH
|
||||
zcash_tx="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n =: cur prev words cword
|
||||
|
||||
case "$cur" in
|
||||
load=*:*)
|
||||
cur="${cur#load=*:}"
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
*=*) # prevent attempts to complete other arguments
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
|
||||
# only options (or an uncompletable hex-string) allowed
|
||||
# parse zcash-tx -help for options
|
||||
local helpopts
|
||||
helpopts=$($zcash_tx -help | sed -e '/^ -/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
else
|
||||
# only commands are allowed
|
||||
# parse -help for commands
|
||||
local helpcmds
|
||||
helpcmds=$($zcash_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
|
||||
COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
|
||||
fi
|
||||
|
||||
# Prevent space if an argument is desired
|
||||
if [[ $COMPREPLY == *= ]]; then
|
||||
compopt -o nospace
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _zcash_tx zcash-tx
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
_zcashd() {
|
||||
local cur prev words=() cword
|
||||
local bitcoind
|
||||
local zcashd
|
||||
|
||||
# save and use original argument to invoke zcashd for -help
|
||||
# it might not be in $PATH
|
||||
bitcoind="$1"
|
||||
zcashd="$1"
|
||||
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref -n = cur prev words cword
|
||||
@@ -21,7 +21,7 @@ _zcashd() {
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
-datadir=*)
|
||||
-datadir=*|-exportdir=*)
|
||||
cur="${cur#*=}"
|
||||
_filedir -d
|
||||
return 0
|
||||
@@ -34,7 +34,7 @@ _zcashd() {
|
||||
# only parse -help if senseful
|
||||
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
||||
local helpopts
|
||||
helpopts=$($bitcoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
helpopts=$($zcashd -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
||||
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user