Merge branch 'master' into issue4356

This commit is contained in:
Kris Nuttycombe 2020-11-19 07:22:39 -07:00 committed by GitHub
commit 9a5f9bf5ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
830 changed files with 37856 additions and 23589 deletions

3
.gitignore vendored
View File

@ -7,6 +7,7 @@ src/zcash-cli
src/zcash-gtest
src/zcash-tx
src/test/test_bitcoin
zcutil/bin/
*zcashTest.pk
*zcashTest.vk
@ -54,6 +55,7 @@ src/univalue/gen
*.o-*
.zcash
*.a
*.lib
*.pb.cc
*.pb.h
.vscode
@ -116,5 +118,6 @@ libzcashconsensus.pc
contrib/debian/files
contrib/debian/substvars
src/fuzzing/*/input
src/fuzzing/*/output
src/fuzz.cpp

View File

@ -29,11 +29,6 @@ source code is not considered a derived work of these Autoconf macros or of the
dependencies. For further details see 'contrib/debian/copyright'.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic
software written by Eric Young (eay@cryptsoft.com).
Although almost all of the Zcash code is licensed under "permissive" open source
licenses, users and distributors should note that when built using the default
build options, Zcash depends on Oracle Berkeley DB 6.2.x, which is licensed

802
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -20,17 +20,27 @@ path = "src/rust/src/rustzcash.rs"
crate-type = ["staticlib"]
[dependencies]
bellman = "0.6"
bellman = "0.8"
blake2b_simd = "0.5"
blake2s_simd = "0.5"
ff = "0.6"
bls12_381 = "0.3"
group = "0.8"
libc = "0.2"
pairing = "0.16"
lazy_static = "1"
jubjub = "0.5"
subtle = "2.2"
rand_core = "0.5.1"
tracing = "0.1"
tracing-core = "0.1"
tracing-appender = "0.1"
zcash_history = "0.2"
zcash_primitives = "0.2"
zcash_proofs = "0.2"
zcash_primitives = "0.4"
zcash_proofs = "0.4"
ed25519-zebra = "2.0.0"
[dependencies.tracing-subscriber]
version = "0.2"
default-features = false
features = ["ansi", "chrono", "env-filter"]
[profile.release]
lto = true

View File

@ -33,18 +33,8 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
dist-hook:
-$(MAKE) -C $(top_distdir)/src/leveldb clean
-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
distcheck-hook:
$(MKDIR_P) $(top_distdir)/_build/src/leveldb
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
distcleancheck:
@:
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
$(MAKE) -C src $(patsubst src/%,%,$@)
@ -61,10 +51,10 @@ baseline.info:
baseline_filtered.info: baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
@ -76,10 +66,10 @@ leveldb_baseline.info: baseline_filtered.info
leveldb_baseline_filtered.info: leveldb_baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
@ -97,10 +87,10 @@ test_bitcoin.info: baseline_filtered_combined.info
test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
@ -115,10 +105,10 @@ zcash-gtest.info: baseline_filtered_combined.info
zcash-gtest_filtered.info: zcash-gtest.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-pc-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
@ -169,3 +159,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man
clean-local:
rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/
rm -rf afl-temp
distclean-local:
rm -f zcutil/bin/db_*
rmdir zcutil/bin 2>/dev/null || true

View File

@ -1,4 +1,4 @@
Zcash 3.0.0
Zcash 4.1.1
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
===========
@ -56,7 +56,9 @@ Build Zcash along with most dependencies from source by running the following co
./zcutil/build.sh -j$(nproc)
```
Currently, Zcash is only officially supported on Debian and Ubuntu.
Currently, Zcash is only officially supported on Debian and Ubuntu. See the
[Debian / Ubuntu build](https://zcash.readthedocs.io/en/latest/rtd_pages/Debian-Ubuntu-build.html)
for detailed instructions.
License
-------

View File

@ -5,10 +5,11 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
export LC_ALL=C
set -e
srcdir="$(dirname $0)"
cd "$srcdir"
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then
LIBTOOLIZE="${GLIBTOOLIZE}"
export LIBTOOLIZE
fi

View File

@ -1,5 +1,5 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
@ -33,21 +33,23 @@
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
#
# 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.
#serial 4
#serial 11
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
@ -57,26 +59,13 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
m4_if([$4], [], [ax_cxx_compile_cxx$1_try_default=true],
[$4], [default], [ax_cxx_compile_cxx$1_try_default=true],
[$4], [nodefault], [ax_cxx_compile_cxx$1_try_default=false],
[m4_fatal([invalid fourth argument `$4' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
m4_if([$4], [nodefault], [], [dnl
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi])
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for switch in -std=gnu++$1 -std=gnu++0x; do
for alternative in ${ax_cxx_compile_alternatives}; do
switch="-std=gnu++${alternative}"
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
@ -102,22 +91,27 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
ac_success=yes
done
if test x$ac_success = xyes; then
break
fi
done
@ -154,6 +148,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)
dnl Tests for new features in C++11
@ -191,11 +190,13 @@ namespace cxx11
struct Base
{
virtual ~Base() {}
virtual void f() {}
};
struct Derived : public Base
{
virtual ~Derived() override {}
virtual void f() override {}
};
@ -524,7 +525,7 @@ namespace cxx14
}
namespace test_digit_seperators
namespace test_digit_separators
{
constexpr auto ten_million = 100'000'000;
@ -566,3 +567,385 @@ namespace cxx14
#endif // __cplusplus >= 201402L
]])
dnl Tests for new features in C++17
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
// If the compiler admits that it is not ready for C++17, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201703L
#error "This is not a C++17 compiler"
#else
#include <initializer_list>
#include <utility>
#include <type_traits>
namespace cxx17
{
namespace test_constexpr_lambdas
{
constexpr int foo = [](){return 42;}();
}
namespace test::nested_namespace::definitions
{
}
namespace test_fold_expression
{
template<typename... Args>
int multiply(Args... args)
{
return (args * ... * 1);
}
template<typename... Args>
bool all(Args... args)
{
return (args && ...);
}
}
namespace test_extended_static_assert
{
static_assert (true);
}
namespace test_auto_brace_init_list
{
auto foo = {5};
auto bar {5};
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
static_assert(std::is_same<int, decltype(bar)>::value);
}
namespace test_typename_in_template_template_parameter
{
template<template<typename> typename X> struct D;
}
namespace test_fallthrough_nodiscard_maybe_unused_attributes
{
int f1()
{
return 42;
}
[[nodiscard]] int f2()
{
[[maybe_unused]] auto unused = f1();
switch (f1())
{
case 17:
f1();
[[fallthrough]];
case 42:
f1();
}
return f1();
}
}
namespace test_extended_aggregate_initialization
{
struct base1
{
int b1, b2 = 42;
};
struct base2
{
base2() {
b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
derived d2 {{}, {}, 4}; // value-initialized bases
}
namespace test_general_range_based_for_loop
{
struct iter
{
int i;
int& operator* ()
{
return i;
}
const int& operator* () const
{
return i;
}
iter& operator++()
{
++i;
return *this;
}
};
struct sentinel
{
int i;
};
bool operator== (const iter& i, const sentinel& s)
{
return i.i == s.i;
}
bool operator!= (const iter& i, const sentinel& s)
{
return !(i == s);
}
struct range
{
iter begin() const
{
return {0};
}
sentinel end() const
{
return {5};
}
};
void f()
{
range r {};
for (auto i : r)
{
[[maybe_unused]] auto v = i;
}
}
}
namespace test_lambda_capture_asterisk_this_by_value
{
struct t
{
int i;
int foo()
{
return [*this]()
{
return i;
}();
}
};
}
namespace test_enum_class_construction
{
enum class byte : unsigned char
{};
byte foo {42};
}
namespace test_constexpr_if
{
template <bool cond>
int f ()
{
if constexpr(cond)
{
return 13;
}
else
{
return 42;
}
}
}
namespace test_selection_statement_with_initializer
{
int f()
{
return 13;
}
int f2()
{
if (auto i = f(); i > 0)
{
return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
return 2;
default:
return 1;
}
}
}
namespace test_template_argument_deduction_for_class_templates
{
template <typename T1, typename T2>
struct pair
{
pair (T1 p1, T2 p2)
: m1 {p1},
m2 {p2}
{}
T1 m1;
T2 m2;
};
void f()
{
[[maybe_unused]] auto p = pair{13, 42u};
}
}
namespace test_non_type_auto_template_parameters
{
template <auto n>
struct B
{};
B<5> b1;
B<'a'> b2;
}
namespace test_structured_bindings
{
int arr[2] = { 1, 2 };
std::pair<int, int> pr = { 1, 2 };
auto f1() -> int(&)[2]
{
return arr;
}
auto f2() -> std::pair<int, int>&
{
return pr;
}
struct S
{
int x1 : 2;
volatile double y1;
};
S f3()
{
return {};
}
auto [ x1, y1 ] = f1();
auto& [ xr1, yr1 ] = f1();
auto [ x2, y2 ] = f2();
auto& [ xr2, yr2 ] = f2();
const auto [ x3, y3 ] = f3();
}
namespace test_exception_spec_type_system
{
struct Good {};
struct Bad {};
void g1() noexcept;
void g2();
template<typename T>
Bad
f(T*, T*);
template<typename T1, typename T2>
Good
f(T1*, T2*);
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
}
namespace test_inline_variables
{
template<class T> void f(T)
{}
template<class T> inline T g(T)
{
return T{};
}
template<> inline void f<>(int)
{}
template<> int g<>(int)
{
return 5;
}
}
} // namespace cxx17
#endif // __cplusplus < 201703L
]])

View File

@ -13,6 +13,10 @@ body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* The use of language or imagery that originates with, or has been
adopted as a symbol or "dog-whistle" for, any of: right-wing extremism,
anti-Semitism, Islamophobia, white supremacism, eugenics, homophobia, or
transphobia (whether or not the use by itself falls into those categories)
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment

View File

@ -1,8 +1,8 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
@ -61,8 +61,8 @@ case $host in
lt_cv_deplibs_check_method="pass_all"
;;
esac
dnl Require C++11 compiler (no GNU extensions)
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault])
dnl Require C++17 compiler (no GNU extensions)
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
dnl Check if -latomic is required for <std::atomic>
CHECK_ATOMIC
@ -105,12 +105,6 @@ AC_ARG_ENABLE([mining],
[enable_mining=$enableval],
[enable_mining=yes])
AC_ARG_ENABLE([proton],
[AS_HELP_STRING([--enable-proton],
[enable Proton (AMQP messaging) (default is no)])],
[use_proton=$enableval],
[use_proton=no])
AC_ARG_ENABLE(tests,
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
[use_tests=$enableval],
@ -298,7 +292,36 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
AX_CHECK_COMPILE_FLAG([-Wself-assign],[CXXFLAGS="$CXXFLAGS -Wno-self-assign"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
# Check for optional instruction set support. Enabling these does _not_ imply that all code will
# be compiled with them, rather that specific objects/libs may use them after checking for runtime
# compatibility.
AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]])
fi
TEMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
AC_MSG_CHECKING(for assembler crc32 support)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdint.h>
#if defined(_MSC_VER)
#include <intrin.h>
#elif defined(__GNUC__) && defined(__SSE4_2__)
#include <nmmintrin.h>
#endif
]],[[
uint64_t l = 0;
l = _mm_crc32_u8(l, 0);
l = _mm_crc32_u32(l, 0);
l = _mm_crc32_u64(l, 0);
return l;
]])],
[ AC_MSG_RESULT(yes); enable_hwcrc32=yes],
[ AC_MSG_RESULT(no)]
)
CXXFLAGS="$TEMP_CXXFLAGS"
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_ARG_WITH([utils],
@ -362,7 +385,7 @@ case $host in
fi
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE"
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -w"
fi
@ -384,7 +407,7 @@ case $host in
;;
*darwin*)
TARGET_OS=darwin
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port)
@ -406,12 +429,7 @@ case $host in
dnl It's safe to add these paths even if the functionality is disabled by
dnl the user (--without-wallet for example).
openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
if test x$openssl_prefix != x; then
PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH
fi
if test x$bdb_prefix != x; then
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
LIBS="$LIBS -L$bdb_prefix/lib"
@ -441,9 +459,11 @@ case $host in
OBJCXXFLAGS="$CXXFLAGS"
;;
*linux*)
TARGET_OS=linux
LEVELDB_TARGET_FLAGS="-DOS_LINUX"
;;
*)
OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}"
;;
esac
@ -666,31 +686,6 @@ if test x$enable_wallet != xno; then
BITCOIN_FIND_BDB62
fi
dnl Check Qpid Proton headers and library exist
if test x$use_proton = xyes; then
AC_CHECK_HEADERS([proton/connection.hpp],
[],
[AC_MSG_WARN([Proton headers not found, disabling Proton support])
use_proton=no])
AC_CHECK_LIB([qpid-proton-cpp-static], [main],
[PROTON_LIBS="-lqpid-proton-cpp-static"],
[AC_MSG_WARN([Proton qpid-proton-cpp-static library not found, disabling Proton support])
use_proton=no])
AC_CHECK_LIB([qpid-proton-core-static], [main],
[PROTON_LIBS+=" -lqpid-proton-core-static"],
[AC_MSG_WARN([Proton qpid-proton-core-static library not found, disabling Proton support])
use_proton=no])
AC_CHECK_LIB([qpid-proton-static], [main],
[PROTON_LIBS+=" -lqpid-proton-static"],
[AC_MSG_WARN([Proton qpid-proton-static library not found, disabling Proton support])
use_proton=no])
fi
if test x$use_proton = xyes; then
AC_DEFINE(ENABLE_PROTON, 1, [Define to 1 to enable Proton functions])
else
AC_DEFINE(ENABLE_PROTON, 0, [Define to 1 to enable Proton functions])
fi
if test x$build_bitcoin_utils$build_bitcoind$use_tests = xnonono; then
use_boost=no
else
@ -756,8 +751,6 @@ if test x$use_pkgconfig = xyes; then
m4_ifdef(
[PKG_CHECK_MODULES],
[
PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
if test x$TARGET_OS != xwindows; then
@ -777,14 +770,6 @@ if test x$use_pkgconfig = xyes; then
]
)
else
# BUG: Fix this:
echo 'BUG: configure does not yet check for the following dependencies if pkg-config is not on the system: libcrypto++'
AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
AC_CHECK_LIB([crypto], [main],CRYPTO_LIBS=-lcrypto, AC_MSG_ERROR(libcrypto missing))
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
@ -832,7 +817,7 @@ esac
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing],[CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-Wno-builtin-declaration-mismatch],[CXXFLAGS="$CXXFLAGS -Wno-builtin-declaration-mismatch"],,[[$CXXFLAG_WERROR]])
LIBZCASH_LIBS="$BOOST_SYSTEM_LIB -lcrypto -lsodium $RUST_LIBS"
LIBZCASH_LIBS="$BOOST_SYSTEM_LIB -lsodium $RUST_LIBS"
AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
@ -894,8 +879,6 @@ fi
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
AM_CONDITIONAL([ENABLE_PROTON], [test "x$use_proton" = "xyes"])
AC_MSG_CHECKING([whether to build test_bitcoin])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])
@ -926,6 +909,7 @@ AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
@ -958,17 +942,15 @@ AC_SUBST(PIC_FLAGS)
AC_SUBST(PIE_FLAGS)
AC_SUBST(SANITIZER_CXXFLAGS)
AC_SUBST(SANITIZER_LDFLAGS)
AC_SUBST(SSE42_CXXFLAGS)
AC_SUBST(LIBTOOL_APP_LDFLAGS)
AC_SUBST(BOOST_LIBS)
AC_SUBST(TESTDEFS)
AC_SUBST(LEVELDB_TARGET_FLAGS)
AC_SUBST(CRYPTO_LIBS)
AC_SUBST(SSL_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(LIBZCASH_LIBS)
AC_SUBST(PROTON_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile src/test/buildenv.py])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
@ -996,7 +978,7 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
unset PKG_CONFIG_LIBDIR
PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery"
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --with-bignum=no --enable-module-recovery"
AC_CONFIG_SUBDIRS([src/secp256k1 src/univalue])
AC_OUTPUT
@ -1015,7 +997,6 @@ esac
echo
echo "Options used to compile and link:"
echo " with wallet = $enable_wallet"
echo " with proton = $use_proton"
echo " with zmq = $use_zmq"
echo " with test = $use_tests"
echo " sanitizers = $use_sanitizers"

View File

@ -6,11 +6,6 @@ Wallet Tools
### [BitRPC](/contrib/bitrpc) ###
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
### [SpendFrom](/contrib/spendfrom) ###
Use the raw transactions API to send coins received on a particular
address (or addresses).
Repository Tools
---------------------
@ -18,9 +13,6 @@ Repository Tools
Specific tools for developers working on this repository.
Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG.
### [Verify-Commits](/contrib/verify-commits) ###
Tool to verify that every merge commit was signed by a developer using the above `github-merge.sh` script.
### [Linearize](/contrib/linearize) ###
Construct a linear, no-fork, best version of the blockchain.
@ -44,18 +36,8 @@ Gavin's notes on getting gitian builds up and running using KVM.
### [Gitian-downloader](/contrib/gitian-downloader)
Various PGP files of core developers.
### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.
Test and Verify Tools
---------------------
### [TestGen](/contrib/testgen) ###
Utilities to generate test vectors for the data-driven Bitcoin tests.
### [Test Patches](/contrib/test-patches) ###
These patches are applied when the automated pull-tester
tests each pull and when master is tested using jenkins.
### [Verify SF Binaries](/contrib/verifysfbinaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge.
Utilities to generate test vectors for the data-driven Bitcoin tests.

View File

@ -1,48 +0,0 @@
#!/usr/bin/env python2
# Copyright (c) 2017-2019 The Zcash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://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

View File

@ -1,6 +1,6 @@
ARG FROMBASEOS
ARG FROMBASEOS_BUILD_TAG=latest
FROM electriccoinco/zcashd-build:$FROMBASEOS$FROMBASEOS_BUILD_TAG
FROM electriccoinco/zcashd-build-$FROMBASEOS$FROMBASEOS_BUILD_TAG
ARG DUMBINIT_VERSION=1.2.2
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMBINIT_VERSION}/dumb-init_${DUMBINIT_VERSION}_amd64

View File

@ -1,17 +1,4 @@
ARG ARCHLINUX_TAG=20200205
FROM archlinux:$ARCHLINUX_TAG
RUN pacman -Syyu --noconfirm \
&& pacman -S --noconfirm \
base-devel \
git \
python3 \
python-pip \
wget
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/bin/dumb-init
RUN python -m pip install virtualenv
FROM electriccoinco/zcashd-build-arch
# Buildbot user
ARG BUILDBOT_USER=zcbbworker
@ -25,15 +12,11 @@ RUN useradd --home-dir /home/$BUILDBOT_USER \
USER $BUILDBOT_USER
WORKDIR /home/$BUILDBOT_USER
ADD bbworker-requirements.txt requirements.txt
RUN python -m venv venv \
&& . venv/bin/activate \
&& python -m pip install \
buildbot-worker \
pyflakes \
pyblake2 \
pyzmq \
requests \
twisted[tls]
&& python -m pip install wheel \
&& python -m pip install -r requirements.txt
# Buildbot worker
ARG BUILDBOT_WORKER_NAME=arch-docker
@ -46,7 +29,7 @@ RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
&& echo "OS: Centos 8" > $BUILDBOT_WORKER_NAME/info/host
ADD buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]

View File

@ -1,16 +1,4 @@
FROM centos:8
RUN yum update -y \
&& dnf group install -y "Development Tools" \
&& yum install -y \
python3 \
python3-devel \
wget
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/bin/dumb-init
RUN alternatives --set python /usr/bin/python3 \
&& python3 -m pip install virtualenv
FROM electriccoinco/zcashd-build-centos8
# Buildbot user
ARG BUILDBOT_USER=zcbbworker
@ -24,15 +12,11 @@ RUN useradd --home-dir /home/$BUILDBOT_USER \
USER $BUILDBOT_USER
WORKDIR /home/$BUILDBOT_USER
ADD bbworker-requirements.txt requirements.txt
RUN python3 -m venv venv \
&& . venv/bin/activate \
&& python3 -m pip install \
buildbot-worker \
pyflakes \
pyblake2 \
pyzmq \
requests \
twisted[tls]
&& python -m pip install wheel \
&& python -m pip install -r requirements.txt
# Buildbot worker
ARG BUILDBOT_WORKER_NAME=centos8-docker
@ -45,7 +29,7 @@ RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
&& echo "OS: Centos 8" > $BUILDBOT_WORKER_NAME/info/host
ADD buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]

View File

@ -0,0 +1,30 @@
ARG FROMBASEOS
ARG FROMBASEOS_BUILD_TAG
FROM $FROMBASEOS:$FROMBASEOS_BUILD_TAG
ARG DEBIAN_FRONTEND=noninteractive
ADD apt-package-list.txt /tmp/apt-package-list.txt
RUN apt-get update \
&& apt-get install -y $(tr "\n" " " < /tmp/apt-package-list.txt) \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 1
ARG PYTHONVERSION=3.7.5
RUN apt-get install -y \
build-essential \
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
libnss3-dev \
libssl-dev \
libreadline-dev \
libffi-dev \
curl
WORKDIR /tmp
RUN curl https://www.python.org/ftp/python/$PYTHONVERSION/Python-$PYTHONVERSION.tar.xz -o python.tar.xz \
&& tar -xf python.tar.xz \
&& cd Python-$PYTHONVERSION \
&& ./configure --enable-optimizations \
&& make -j 8 \
&& make altinstall \
&& update-alternatives --install /usr/bin/python python /usr/local/bin/python3.7 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.7 1

View File

@ -0,0 +1,23 @@
ARG ARCHLINUX_TAG
FROM archlinux:$ARCHLINUX_TAG
RUN pacman -Syyu --noconfirm \
&& pacman -S --noconfirm \
base-devel \
git \
python3 \
python-pip \
wget
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/bin/dumb-init
RUN python -m pip install virtualenv
# AUR for libtinfo5 Source: https://dev.to/cloudx/testing-our-package-build-in-the-docker-world-34p0
RUN useradd builduser -m \
&& passwd -d builduser \
&& cd /home/builduser \
&& git clone "https://aur.archlinux.org/ncurses5-compat-libs.git" ncurses5-compat-libs \
&& chown builduser -R ncurses5-compat-libs \
&& (printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers) \
&& sudo -u builduser bash -c 'gpg --keyserver pool.sks-keyservers.net --recv-keys 702353E0F7E48EDB' \
&& sudo -u builduser bash -c 'cd ~/ncurses5-compat-libs && makepkg -si --noconfirm'

View File

@ -0,0 +1,14 @@
FROM centos:8
RUN yum update -y \
&& dnf group install -y "Development Tools" \
&& yum install -y \
ncurses-compat-libs \
python3 \
python3-devel \
wget
RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/bin/dumb-init
RUN alternatives --set python /usr/bin/python3 \
&& python3 -m pip install virtualenv

View File

@ -1,6 +1,6 @@
ARG FROMBASEOS
ARG FROMBASEOS_BUILD_TAG=latest
FROM electriccoinco/zcashd-build:$FROMBASEOS$FROMBASEOS_BUILD_TAG
FROM electriccoinco/zcashd-build-$FROMBASEOS$FROMBASEOS_BUILD_TAG
RUN useradd -ms /bin/bash -U debian
USER debian:debian

View File

@ -3,11 +3,17 @@ bsdmainutils
build-essential
cmake
curl
g++-aarch64-linux-gnu
git
lcov
libcap-dev
libffi-dev
libtinfo5
libtool
libssl-dev
libz-dev
libbz2-dev
mingw-w64
pkg-config
python3
python3-dev

View File

@ -1,7 +1,6 @@
buildbot-worker
pyblake2
pyflakes
python-qpid-proton
pyutil
pyzmq
requests

75
contrib/ci-builders/docker-build.sh Normal file → Executable file
View File

@ -1,37 +1,52 @@
# Debian
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-build:debian9
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-build:debian10
#!/usr/bin/env bash
docker push electriccoinco/zcashd-build:debian9
docker push electriccoinco/zcashd-build:debian10
export LC_ALL=C
set -exo pipefail
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-gitian:debian9
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-gitian:debian10
# Debian 9
docker build . -f Dockerfile-build-python.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-build-debian9
docker push electriccoinco/zcashd-build-debian9
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-bbworker-debian9
docker push electriccoinco/zcashd-bbworker-debian9
docker push electriccoinco/zcashd-gitian:debian9
docker push electriccoinco/zcashd-gitian:debian10
# Debian 10
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-build-debian10
docker push electriccoinco/zcashd-build-debian10
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-gitian-debian10
docker push electriccoinco/zcashd-gitian-debian10
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-bbworker-debian10
docker push electriccoinco/zcashd-bbworker-debian10
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=9 -t electriccoinco/zcashd-bbworker:debian9
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=debian --build-arg FROMBASEOS=debian --build-arg FROMBASEOS_BUILD_TAG=10 -t electriccoinco/zcashd-bbworker:debian10
# Ubuntu 16.04
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=16.04 -t electriccoinco/zcashd-build-ubuntu1604
docker push electriccoinco/zcashd-build-ubuntu1604
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1604 -t electriccoinco/zcashd-gitian-ubuntu1604
docker push electriccoinco/zcashd-gitian-ubuntu1604
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1604 -t electriccoinco/zcashd-bbworker-ubuntu1604
docker push electriccoinco/zcashd-bbworker-ubuntu1604
docker push electriccoinco/zcashd-bbworker:debian9
docker push electriccoinco/zcashd-bbworker:debian10
# Ubuntu 18.04, 20.04
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-build-ubuntu1804
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-build-ubuntu2004
docker push electriccoinco/zcashd-build-ubuntu1804
docker push electriccoinco/zcashd-build-ubuntu2004
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1804 -t electriccoinco/zcashd-gitian-ubuntu1804
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=2004 -t electriccoinco/zcashd-gitian-ubuntu2004
docker push electriccoinco/zcashd-gitian-ubuntu1804
docker push electriccoinco/zcashd-gitian-ubuntu2004
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=1804 -t electriccoinco/zcashd-bbworker-ubuntu1804
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=2004 -t electriccoinco/zcashd-bbworker-ubuntu2004
docker push electriccoinco/zcashd-bbworker-ubuntu1804
docker push electriccoinco/zcashd-bbworker-ubuntu2004
# Ubuntu
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-build:ubuntu18.04
docker build . -f Dockerfile-build.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-build:ubuntu20.04
# Centos8
docker build . -f Dockerfile-build.centos8 -t electriccoinco/zcashd-build-centos8
docker build . -f Dockerfile-bbworker.centos8 -t electriccoinco/zcashd-bbworker-centos8
docker push electriccoinco/zcashd-build-centos8
docker push electriccoinco/zcashd-bbworker-centos8
docker push electriccoinco/zcashd-build:ubuntu18.04
docker push electriccoinco/zcashd-build:ubuntu20.04
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-gitian:ubuntu18.04
docker build . -f Dockerfile-gitian.apt --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-gitian:ubuntu20.04
docker push electriccoinco/zcashd-gitian:ubuntu18.04
docker push electriccoinco/zcashd-gitian:ubuntu20.04
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=18.04 -t electriccoinco/zcashd-bbworker:ubuntu18.04
docker build . -f Dockerfile-bbworker.apt --build-arg BASEOS=ubuntu --build-arg FROMBASEOS=ubuntu --build-arg FROMBASEOS_BUILD_TAG=20.04 -t electriccoinco/zcashd-bbworker:ubuntu20.04
docker push electriccoinco/zcashd-bbworker:ubuntu18.04
docker push electriccoinco/zcashd-bbworker:ubuntu20.04
# Arch 20200908
docker build . -f Dockerfile-build.arch --build-arg ARCHLINUX_TAG=20200908 -t electriccoinco/zcashd-build-arch
docker build . -f Dockerfile-bbworker.arch -t electriccoinco/zcashd-bbworker-arch
docker push electriccoinco/zcashd-build-arch
docker push electriccoinco/zcashd-bbworker-arch

View File

@ -1,3 +1,51 @@
zcash (4.1.1) stable; urgency=medium
* 4.1.1 release.
-- Electric Coin Company <team@electriccoin.co> Mon, 16 Nov 2020 10:23:40 -0700
zcash (4.1.0) stable; urgency=medium
* 4.1.0 release.
-- Electric Coin Company <team@electriccoin.co> Mon, 02 Nov 2020 13:40:54 -0700
zcash (4.1.0~rc1) stable; urgency=medium
* 4.1.0-rc1 release.
-- Electric Coin Company <team@electriccoin.co> Wed, 28 Oct 2020 02:51:45 +0800
zcash (4.0.0) stable; urgency=medium
* 4.0.0 release.
-- Electric Coin Company <team@electriccoin.co> Tue, 01 Sep 2020 13:31:19 -0600
zcash (4.0.0~rc1) stable; urgency=medium
* 4.0.0-rc1 release.
-- Electric Coin Company <team@electriccoin.co> Wed, 26 Aug 2020 10:17:07 -0600
zcash (3.1.0) stable; urgency=medium
* 3.1.0 release.
-- Electric Coin Company <team@electriccoin.co> Tue, 28 Jul 2020 07:02:06 +0800
zcash (3.1.0~rc2) stable; urgency=medium
* 3.1.0-rc2 release.
-- Electric Coin Company <team@electriccoin.co> Wed, 15 Jul 2020 21:51:09 +0800
zcash (3.1.0~rc1) stable; urgency=medium
* 3.1.0-rc1 release.
-- Electric Coin Company <team@electriccoin.co> Tue, 14 Jul 2020 14:38:11 +0800
zcash (3.0.0) stable; urgency=medium
* 3.0.0 release.

View File

@ -54,6 +54,8 @@ Copyright: 2008, Benjamin Kosnik <bkoz@redhat.com>
2014-2015, Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
2015, Paul Norman <penorman@mac.com>
2015, Moritz Klammler <moritz@klammler.eu>
2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
2019 Enji Cooper <yaneurabeya@gmail.com>
License: GNU-All-permissive-License
Files: build-aux/m4/ax_gcc_func_attribute.m4
@ -77,7 +79,9 @@ Copyright: 2008, Steven G. Johnson <stevenj@alum.mit.edu>
License: GPLv3-or-later-with-Autoconf-exception
Files: qa/zcash/checksec.sh
Copyright: 2009-2011, Tobias Klein
Copyright: 2014-2015, Brian Davis
2013, Robin David
2009-2011, Tobias Klein
License: BSD-3clause-Tobias-Klein
Files: depends/sources/libsodium-*.tar.gz
@ -95,10 +99,6 @@ Copyright: 1990, 2016 Oracle and/or its affiliates;
2000-2005 INRIA, France Telecom
License: BDB
Files: depends/sources/openssl-*.tar.gz
Copyright: 1998-2016 The OpenSSL Project and 1995-1998 Eric Young
License: OpenSSL+SSLeay
Files: depends/sources/zeromq-*.tar.gz
Copyright:
1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@ -116,14 +116,28 @@ 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: depends/sources/utfcpp-*.tar.gz
Copyright: 2006 Nemanja Trifunovic
License: Boost-Software-License-1.0
Files: src/crypto/ctaes/*
Copyright: Copyright (c) 2016 Pieter Wuille
License: Expat
Files: src/rust/include/tracing.h
src/rust/src/tracing_ffi.rs
Copyright: Copyright (c) 2020 Jack Grigg
License: Expat
Files: src/rust/include/tracing/map.h
Copyright: Copyright (c) 2012 William Swanson
License: Expat-with-advertising-clause
Files: src/secp256k1/*
Copyright: Copyright (c) 2013 Pieter Wuille
License: Expat
Comment: This copyright entry excludes files explicitly listed below.
Files: src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
Copyright: 2008 Don Anderson <dda@sleepycat.com>
License: GNU-All-permissive-License
@ -919,128 +933,6 @@ License: BDB
* THE POSSIBILITY OF SUCH DAMAGE.
*/
License: OpenSSL+SSLeay
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts.
.
OpenSSL License
---------------
.
/* ====================================================================
* Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
.
Original SSLeay License
-----------------------
.
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
License: BSD-3clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -1195,222 +1087,6 @@ 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
@ -1446,3 +1122,28 @@ License: GPLv3-or-later-with-Autoconf-exception
Comment:
The "special exception" is extended to the versions of files covered by
this license that are distributed with this software.
License: Expat-with-advertising-clause
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the authors or
their institutions shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without
prior written authorization from the authors.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
@ -46,7 +46,7 @@ for extension in extensions:
filePath = os.getcwd() + filePath
modifiedTime = getLastGitModifiedDate(filePath)
if len(modifiedTime) > 0 and str(year) in modifiedTime:
print n,"Last Git Modified: ", modifiedTime, " - ", filePath
print(n,"Last Git Modified: ", modifiedTime, " - ", filePath)
os.popen(command % (last_year,year,filePath))
n = n + 1

View File

@ -1,5 +1,6 @@
#!/bin/sh
#!/usr/bin/env bash
export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
SRCDIR=${SRCDIR:-$TOPDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
@ -11,9 +12,9 @@ ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx}
[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1
# The autodetected version git tag can screw up manpage output a little bit
ZECVERSTR=$($ZCASHCLI --version | head -n1 | awk '{ print $NF }')
ZECVER=$(echo $ZECVERSTR | awk -F- '{ OFS="-"; NF--; print $0; }')
ZECCOMMIT=$(echo $ZECVERSTR | awk -F- '{ print $NF }')
read -r -a ZECVERSTR <<< "$($ZCASHCLI --version | head -n1 | awk '{ print $NF }')"
read -r -a ZECVER <<< "$(echo $ZECVERSTR | awk -F- '{ OFS="-"; NF--; print $0; }')"
read -r -a ZECCOMMIT <<< "$(echo $ZECVERSTR | awk -F- '{ print $NF }')"
# Create a footer file with copyright content.
# This gets autodetected fine for zcashd if --version-string is not set,

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys
@ -44,30 +44,30 @@ for folder in folders:
[pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path],
stderr=subprocess.STDOUT).rstrip('\n')
except:
print "pngcrush is not installed, aborting..."
print("pngcrush is not installed, aborting...")
sys.exit(0)
#verify
if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT):
print "PNG file "+file+" is corrupted after crushing, check out pngcursh version"
print("PNG file "+file+" is corrupted after crushing, check out pngcursh version")
sys.exit(1)
fileMetaMap['sha256New'] = file_hash(file_path)
fileMetaMap['contentHashPost'] = content_hash(file_path)
if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']:
print "Image contents of PNG file "+file+" before and after crushing don't match"
print("Image contents of PNG file "+file+" before and after crushing don't match")
sys.exit(1)
fileMetaMap['psize'] = os.path.getsize(file_path)
outputArray.append(fileMetaMap)
print("done\n"),
print "summary:\n+++++++++++++++++"
print("summary:\n+++++++++++++++++")
for fileDict in outputArray:
oldHash = fileDict['sha256Old']
newHash = fileDict['sha256New']
totalSaveBytes += fileDict['osize'] - fileDict['psize']
print fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n"
print(fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n")
print "completed. Total reduction: "+str(totalSaveBytes)+" bytes"
print("completed. Total reduction: "+str(totalSaveBytes)+" bytes")

View File

@ -1,12 +1,12 @@
#!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Copyright (c) 2016-2019 The Zcash developers
# Copyright (c) 2016-2020 The Zcash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
'''
A script to check that the (Linux) executables produced by gitian only contain
allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
still compatible with the minimum supported Linux distribution versions.
allowed gcc and glibc version symbols. This makes sure they are still compatible
with the minimum supported Linux distribution versions.
Example usage:
@ -18,55 +18,83 @@ import re
import sys
import os
# Debian 6.0.9 (Squeeze) has:
# Ubuntu 16.04 LTS (Xenial Xerus; End of Standard Support April 2021, EOL April 2022) has:
#
# - g++ version 4.4.5 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=g%2B%2B)
# - libc version 2.11.3 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libc6)
# - libstdc++ version 4.4.5 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libstdc%2B%2B6)
# - g++ version 4.5.3 (https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=g%2B%2B)
# - libc6 version 2.23 (https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=libc6)
#
# Ubuntu 10.04.4 (Lucid Lynx) has:
# Debian 9 (Stretch; EOL 2020-07-06, LTS EOL in 2022) has:
#
# - g++ version 4.4.3 (http://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=lucid&section=all)
# - libc version 2.11.1 (http://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=lucid&section=all)
# - libstdc++ version 4.4.3 (http://packages.ubuntu.com/search?suite=lucid&section=all&arch=any&keywords=libstdc%2B%2B&searchon=names)
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=g%2B%2B)
# - libc6 version 2.24 (https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libc6)
#
# Taking the minimum of these as our target.
# RedHat Enterprise Linux 8 (EOL: long and complicated) is based on Fedora 28 (EOL 2019-05-28) and uses the same base packages:
#
# According to GNU ABI document (http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
# GCC 4.4.0: GCC_4.4.0
# GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3
# (glibc) GLIBC_2_11
# - g++ version 8.0.1 (https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/g/ search for gcc-)
# - libc6 version 2.27 (https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/g/ search for glibc)
#
# CentOS 8 (Full update EOL May 2024, Maintenance EOL 2029-05-31) has:
#
# - g++ version 8.3.1 (http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/ search for libgcc)
# - libc6 version 2.28 (http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/ search for glibc)
#
# Fedora 31 (EOL ~November 2020) has:
#
# - g++ version 9.2.1 (https://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/Packages/g/ search for gcc-)
# - libc6 version 2.30 (https://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/Packages/g/ search for glibc)
#
# Arch is a rolling release, and as of October 2020 has packages for:
#
# - g++ version 8.4.0 / 9.3.0 / 10.2.0 (https://www.archlinux.org/packages/?q=gcc)
# - libc6 version 2.32 (https://www.archlinux.org/packages/?q=glibc)
#
# We take the minimum of these as our target. In practice, if we build on Xenial without
# upgrading GCC or libc, then we should get a binary that works for all these systems, and
# later ones.
#
# According to the GNU ABI document (http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
# GCC 4.5.3: GCC_4.5.0, GLIBCXX_3.4.14, CXXABI_1.3.4
# libc6: GLIBC_2_23
# We statically link libc++ and libc++abi in our builds. Set this to allow dynamic linking to libstdc++.
ALLOW_DYNAMIC_LIBSTDCXX = False
MAX_VERSIONS = {
'GCC': (4,4,0),
'CXXABI': (1,3,3),
'GLIBCXX': (3,4,13),
'GLIBC': (2,11)
'GCC': (4,5,0),
'GLIBC': (2,23),
}
if ALLOW_DYNAMIC_LIBSTDCXX:
MAX_VERSIONS.update({
'GLIBCXX': (3,4,14),
'CXXABI': (1,3,4),
})
# See here for a description of _IO_stdin_used:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
# Ignore symbols that are exported as part of every executable
IGNORE_EXPORTS = {
'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used'
'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used'
}
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
# Allowed NEEDED libraries
ALLOWED_LIBRARIES = {
# zcashd
'libgcc_s.so.1', # GCC base support
'libc.so.6', # C library
'libstdc++.so.6', # C++ standard library
'libpthread.so.0', # threading
'libanl.so.1', # DNS resolve
'libm.so.6', # math library
'librt.so.1', # real-time (clock)
'libgomp.so.1', # OpenMP support library
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
'ld-linux.so.2', # 32-bit dynamic linker
'libdl.so.2' # programming interface to dynamic linker
# zcashd
'libgcc_s.so.1', # GCC support library (also used by clang)
'libc.so.6', # C library
'libpthread.so.0', # threading
'libanl.so.1', # DNS resolver
'libm.so.6', # math library
'librt.so.1', # real-time (POSIX compatibility)
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
'ld-linux.so.2', # 32-bit dynamic linker
'libdl.so.2' # programming interface to dynamic linker
}
if ALLOW_DYNAMIC_LIBSTDCXX:
ALLOWED_LIBRARIES.add('libstdc++.so.6') # C++ standard library
class CPPFilt(object):
'''
@ -138,6 +166,7 @@ if __name__ == '__main__':
cppfilt = CPPFilt()
retval = 0
for filename in sys.argv[1:]:
print("Checking %s..." % (filename,))
# Check imported symbols
for sym,version in read_symbols(filename, True):
if version and not check_version(MAX_VERSIONS, version):
@ -154,7 +183,12 @@ if __name__ == '__main__':
if library_name not in ALLOWED_LIBRARIES:
print('%s: NEEDED library %s is not allowed' % (filename, library_name))
retval = 1
print()
if retval == 0:
print("Everything OK")
else:
print("Note: this script is intended to ensure that Gitian builds meet our compatibility policy.")
print("The above warnings do not necessarily mean the program(s) will not work on your system.")
exit(retval)

View File

@ -1,14 +1,16 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Test script for security-check.py
'''
from __future__ import division,print_function
import subprocess
import sys
import unittest
def write_testcode(filename):
with open(filename, 'w') as f:
with open(filename, 'w', encoding="utf8") as f:
f.write('''
#include <stdio.h>
int main()
@ -20,7 +22,7 @@ def write_testcode(filename):
def call_security_check(cc, source, executable, options):
subprocess.check_call([cc,source,'-o',executable] + options)
p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
(stdout, stderr) = p.communicate()
return (p.returncode, stdout.rstrip())

View File

@ -65,10 +65,6 @@ This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://www.opensource.org/licenses/mit-license.php>.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young.
```
### Persist data to the host

View File

@ -1,5 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
export LC_ALL=C
set -eo pipefail
if [[ ${1} == "--version" ]];then

View File

@ -1,9 +1,8 @@
---
name: "zcash-3.0.0"
name: "zcash-4.1.1"
enable_cache: true
distro: "debian"
suites:
- "jessie"
- "stretch"
architectures:
- "amd64"
@ -32,13 +31,13 @@ remotes:
files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-unknown-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --enable-hardening"
HOSTS="x86_64-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --enable-hardening --enable-werror"
MAKEOPTS="V=1"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="date ar ranlib nm strip objcopy"
HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
HOST_CXXFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
HOST_CFLAGS=""
HOST_CXXFLAGS=""
HOST_LDFLAGS=-static-libstdc++
export QT_RCC_TEST=0
@ -55,7 +54,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@ -67,7 +66,7 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
@ -87,7 +86,7 @@ script: |
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
NO_PROTON="x" make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done
# Faketime for binaries

View File

@ -20,7 +20,7 @@ script: |
# Create global faketime wrappers
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}

View File

@ -24,10 +24,10 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
- "MacOSX10.9.sdk.tar.gz"
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin11"
HOSTS="x86_64-apple-darwin16"
CONFIGFLAGS="--enable-reduce-exports --disable-bench GENISOIMAGE=$WRAP_DIR/genisoimage"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
@ -48,7 +48,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@ -60,7 +60,7 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
@ -80,7 +80,7 @@ script: |
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.gz
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
# Build dependencies for each host
for i in $HOSTS; do

View File

@ -47,7 +47,7 @@ script: |
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
@ -59,7 +59,7 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
@ -75,14 +75,14 @@ script: |
for i in $HOSTS; do
mkdir -p ${WRAP_DIR}/${i}
for prog in collect2; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}/${prog}
REAL=$(${i}-gcc -print-prog-name=${prog})
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
chmod +x ${WRAP_DIR}/${i}/${prog}
done
for prog in gcc g++; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}

View File

@ -1,11 +0,0 @@
Sample configuration files for:
SystemD: bitcoind.service
Upstart: bitcoind.conf
OpenRC: bitcoind.openrc
bitcoind.openrcconf
CentOS: bitcoind.init
have been made available to assist packagers in creating node packages here.
See doc/init.md for more information.

View File

@ -1,65 +0,0 @@
description "Bitcoin Core Daemon"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
env BITCOIND_BIN="/usr/bin/bitcoind"
env BITCOIND_USER="bitcoin"
env BITCOIND_GROUP="bitcoin"
env BITCOIND_PIDDIR="/var/run/bitcoind"
# upstart can't handle variables constructed with other variables
env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid"
env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
env BITCOIND_DATADIR="/var/lib/bitcoind"
expect fork
respawn
respawn limit 5 120
kill timeout 60
pre-start script
# this will catch non-existent config files
# bitcoind will check and exit with this very warning, but it can do so
# long after forking, leaving upstart to think everything started fine.
# since this is a commonly encountered case on install, just check and
# warn here.
if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then
echo "ERROR: You must set a secure rpcpassword to run bitcoind."
echo "The setting must appear in $BITCOIND_CONFIGFILE"
echo
echo "This password is security critical to securing wallets "
echo "and must not be the same as the rpcuser setting."
echo "You can generate a suitable random password using the following"
echo "command from the shell:"
echo
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
echo
echo "It is also recommended that you also set alertnotify so you are "
echo "notified of problems:"
echo
echo "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
"admin@foo.com"
echo
exit 1
fi
mkdir -p "$BITCOIND_PIDDIR"
chmod 0755 "$BITCOIND_PIDDIR"
chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_PIDDIR"
chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_CONFIGFILE"
chmod 0660 "$BITCOIND_CONFIGFILE"
end script
exec start-stop-daemon \
--start \
--pidfile "$BITCOIND_PIDFILE" \
--chuid $BITCOIND_USER:$BITCOIND_GROUP \
--exec "$BITCOIND_BIN" \
-- \
-pid="$BITCOIND_PIDFILE" \
-conf="$BITCOIND_CONFIGFILE" \
-datadir="$BITCOIND_DATADIR" \
-disablewallet \
-daemon

View File

@ -1,67 +0,0 @@
#!/bin/bash
#
# bitcoind The bitcoin core server.
#
#
# chkconfig: 345 80 20
# description: bitcoind
# processname: bitcoind
#
# Source function library.
. /etc/init.d/functions
# you can override defaults in /etc/sysconfig/bitcoind, see below
if [ -f /etc/sysconfig/bitcoind ]; then
. /etc/sysconfig/bitcoind
fi
RETVAL=0
prog=bitcoind
# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind
lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind}
# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN
bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind}
# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS
bitcoind_opts=${BITCOIND_OPTS--disablewallet}
start() {
echo -n $"Starting $prog: "
daemon $DAEMONOPTS $bitcoind $bitcoind_opts
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart)
stop
start
;;
*)
echo "Usage: service $prog {start|stop|status|restart}"
exit 1
;;
esac

View File

@ -1,92 +0,0 @@
#!/sbin/runscript
# backward compatibility for existing gentoo layout
#
if [ -d "/var/lib/bitcoin/.bitcoin" ]; then
BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin"
else
BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind"
fi
BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf}
BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}}
BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
name="Bitcoin Core Daemon"
description="Bitcoin cryptocurrency P2P network daemon"
command="/usr/bin/bitcoind"
command_args="-pid=\"${BITCOIND_PIDFILE}\" \
-conf=\"${BITCOIND_CONFIGFILE}\" \
-datadir=\"${BITCOIND_DATADIR}\" \
-daemon \
${BITCOIND_OPTS}"
required_files="${BITCOIND_CONFIGFILE}"
start_stop_daemon_args="-u ${BITCOIND_USER} \
-N ${BITCOIND_NICE} -w 2000"
pidfile="${BITCOIND_PIDFILE}"
# The retry schedule to use when stopping the daemon. Could be either
# a timeout in seconds or multiple signal/timeout pairs (like
# "SIGKILL/180 SIGTERM/300")
retry="${BITCOIND_SIGTERM_TIMEOUT}"
depend() {
need localmount net
}
# verify
# 1) that the datadir exists and is writable (or create it)
# 2) that a directory for the pid exists and is writable
# 3) ownership and permissions on the config file
start_pre() {
checkpath \
-d \
--mode 0750 \
--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
"${BITCOIND_DATADIR}"
checkpath \
-d \
--mode 0755 \
--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
"${BITCOIND_PIDDIR}"
checkpath -f \
-o ${BITCOIND_USER}:${BITCOIND_GROUP} \
-m 0660 \
${BITCOIND_CONFIGFILE}
checkconfig || return 1
}
checkconfig()
{
if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
eerror ""
eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
eerror ""
eerror "This password is security critical to securing wallets "
eerror "and must not be the same as the rpcuser setting."
eerror "You can generate a suitable random password using the following"
eerror "command from the shell:"
eerror ""
eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
eerror ""
eerror "It is also recommended that you also set alertnotify so you are "
eerror "notified of problems:"
eerror ""
eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
"admin@foo.com"
eerror ""
return 1
fi
}

View File

@ -1,33 +0,0 @@
# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind
# Config file location
#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
# What directory to write pidfile to? (created and owned by $BITCOIND_USER)
#BITCOIND_PIDDIR="/var/run/bitcoind"
# What filename to give the pidfile
#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid"
# Where to write bitcoind data (be mindful that the blockchain is large)
#BITCOIND_DATADIR="/var/lib/bitcoind"
# User and group to own bitcoind process
#BITCOIND_USER="bitcoin"
#BITCOIND_GROUP="bitcoin"
# Path to bitcoind executable
#BITCOIND_BIN="/usr/bin/bitcoind"
# Nice value to run bitcoind under
#BITCOIND_NICE=0
# Additional options (avoid -conf and -datadir, use flags above)
BITCOIND_OPTS="-disablewallet"
# The timeout in seconds OpenRC will wait for bitcoind to terminate
# after a SIGTERM has been raised.
# Note that this will be mapped as argument to start-stop-daemon's
# '--retry' option, which means you can specify a retry schedule
# here. For more information see man 8 start-stop-daemon.
BITCOIND_SIGTERM_TIMEOUT=60

View File

@ -1,22 +0,0 @@
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \
-conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target

View File

@ -71,7 +71,7 @@ def get_blk_dt(blk_hdr):
def get_block_hashes(settings):
blkindex = []
f = open(settings['hashlist'], "r")
f = open(settings['hashlist'], "r", encoding="utf8")
for line in f:
line = line.rstrip()
blkindex.append(line)
@ -251,7 +251,7 @@ if __name__ == '__main__':
print("Usage: linearize-data.py CONFIG-FILE")
sys.exit(1)
f = open(sys.argv[1])
f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search('^\s*#', line)

View File

@ -79,7 +79,7 @@ if __name__ == '__main__':
print("Usage: linearize-hashes.py CONFIG-FILE")
sys.exit(1)
f = open(sys.argv[1])
f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search('^\s*#', line)

View File

@ -1 +0,0 @@
{ CFBundleDisplayName = "Bitcoin Core"; CFBundleName = "Bitcoin Core"; }

Binary file not shown.

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,15 +1,123 @@
### MacDeploy ###
# MacOS Deployment
For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package:
sudo easy_install argparse
## SDK Extraction
This script should not be run manually, instead, after building as usual:
### Step 1: Obtaining `Xcode.app`
make deploy
Our current macOS SDK
(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be
extracted from
[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip).
In order to download this, you may need to first
[log in with an Apple ID here](https://developer.apple.com/download/more/).
During the process, the disk image window will pop up briefly where the fancy
settings are applied. This is normal, please do not interfere.
The file is ~7.8 GB.
When finished, it will produce `Bitcoin-Core.dmg`.
After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
archive. This makes the SDK less-trivial to extract on non-macOS machines. One
approach (tested on Debian Buster) is outlined below:
```bash
# Install/clone tools needed for extracting Xcode.app
apt install cpio
git clone https://github.com/bitcoin-core/apple-sdk-tools.git
# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current
# working directory
python3 apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i
```
On macOS the process is more straightforward:
```bash
xip -x Xcode_11.3.1.xip
```
The extracted files require ~17 GB of disk space.
### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app`
To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run
the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the
previous stage) as the first argument.
```bash
# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from
# the supplied Xcode.app
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app'
```
## Deterministic macOS DMG Notes
Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple
`binutils` (`ld`, `ar`, etc) and DMG authoring tools.
Apple uses `clang` extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
`-target`, `-mmacosx-version-min`, and `--sysroot`, which are all necessary when
building for macOS.
Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the
FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several
other tools are needed as well such as `install_name_tool`, `lipo`, and `nmedit`. These
do not build under Linux, so they have been patched to do so. The work here was used as
a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
In order to build a working toolchain, the following source packages are needed from
Apple: `cctools`, `dyld`, and `ld64`.
These tools inject timestamps by default, which produce non-deterministic binaries. The
`ZERO_AR_DATE` environment variable is used to disable that.
This version of `cctools` has been patched to use the current version of `clang`'s headers
and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`.
To complicate things further, all builds must target a macOS SDK. These SDKs are free to
download, but are contained in an Xcode archive that is not redistributable. Instructions
on how to obtain this archive (Xcode_11.3.1.xip) were given earlier.
This file is many gigabytes in size, but most (but not all) of what we need is
contained only in a single directory:
```bash
Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
```
See the SDK Extraction notes above for how to obtain it.
The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are
created using these tools. The build process has been designed to avoid including the
SDK's files in Gitian's outputs. All interim tarballs are fully deterministic and may be freely
redistributed.
Note: the documentation below may be outdated.
`genisoimage` is used to create the initial DMG. It is not deterministic as-is, so it has been
patched. A system `genisoimage` will work fine, but it will not be deterministic because
the file-order will change between invocations. The patch can be seen here: [cdrkit-deterministic.patch](https://github.com/bitcoin/bitcoin/blob/master/depends/patches/native_cdrkit/cdrkit-deterministic.patch).
No effort was made to fix this cleanly, so it likely leaks memory badly, however it's only used for
a single invocation, so that's no real concern.
`genisoimage` cannot compress DMGs, so afterwards, the DMG tool from the
`libdmg-hfsplus` project is used to compress it. There are several bugs in this tool and its
maintainer has seemingly abandoned the project.
The DMG tool has the ability to create DMGs from scratch as well, but this functionality is
broken. Only the compression feature is currently used. Ideally, the creation could be fixed
and `genisoimage` would no longer be necessary.
Background images and other features can be added to DMG files by inserting a
`.DS_Store` before creation. This is generated by the script `contrib/macdeploy/custom_dsstore.py`.
As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in
order to satisfy the new Gatekeeper requirements. Because this private key cannot be
shared, we'll have to be a bit creative in order for the build process to remain somewhat
deterministic. Here's how it works:
- Builders use Gitian to create an unsigned release. This outputs an unsigned DMG which
users may choose to bless and run. It also outputs an unsigned app structure in the form
of a tarball, which also contains all of the tools that have been previously (deterministically)
built in order to create a final DMG.
- The Apple keyholder uses this unsigned app to create a detached signature, using the
script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs).
- Builders feed the unsigned app + detached signature back into Gitian. It uses the
pre-built tools to recombine the pieces into a deterministic DMG.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

View File

@ -1,52 +0,0 @@
#!/bin/sh
set -e
UNSIGNED="$1"
SIGNATURE="$2"
ARCH=x86_64
ROOTDIR=dist
TEMPDIR=signed.temp
OUTDIR=signed-app
if [ -z "$UNSIGNED" ]; then
echo "usage: $0 <unsigned app> <signature>"
exit 1
fi
if [ -z "$SIGNATURE" ]; then
echo "usage: $0 <unsigned app> <signature>"
exit 1
fi
rm -rf ${TEMPDIR} && mkdir -p ${TEMPDIR}
tar -C ${TEMPDIR} -xf ${UNSIGNED}
cp -rf "${SIGNATURE}"/* ${TEMPDIR}
if [ -z "${PAGESTUFF}" ]; then
PAGESTUFF=${TEMPDIR}/pagestuff
fi
if [ -z "${CODESIGN_ALLOCATE}" ]; then
CODESIGN_ALLOCATE=${TEMPDIR}/codesign_allocate
fi
find ${TEMPDIR} -name "*.sign" | while read i; do
SIZE=`stat -c %s "${i}"`
TARGET_FILE="`echo "${i}" | sed 's/\.sign$//'`"
echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
${CODESIGN_ALLOCATE} -i "${TARGET_FILE}" -a ${ARCH} ${SIZE} -o "${i}.tmp"
OFFSET=`${PAGESTUFF} "${i}.tmp" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
if [ -z ${QUIET} ]; then
echo "Attaching signature at offset ${OFFSET}"
fi
dd if="$i" of="${i}.tmp" bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
mv "${i}.tmp" "${TARGET_FILE}"
rm "${i}"
echo "Success."
done
mv ${TEMPDIR}/${ROOTDIR} ${OUTDIR}
rm -rf ${TEMPDIR}
echo "Signed: ${OUTDIR}"

View File

@ -1,47 +0,0 @@
#!/bin/sh
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Bitcoin-Qt.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
OUTROOT=osx
if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
echo "example: $0 -s MyIdentity"
exit 1
fi
rm -rf ${TEMPDIR} ${TEMPLIST}
mkdir -p ${TEMPDIR}
${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}"
grep -v CodeResources < "${TEMPLIST}" | while read i; do
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
SIZE=`pagestuff "$i" -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
OFFSET=`pagestuff "$i" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
SIGNFILE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}.sign"
DIRNAME="`dirname "${SIGNFILE}"`"
mkdir -p "${DIRNAME}"
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
dd if="$i" of="${SIGNFILE}" bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
done
grep CodeResources < "${TEMPLIST}" | while read i; do
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
RESOURCE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}"
DIRNAME="`dirname "${RESOURCE}"`"
mkdir -p "${DIRNAME}"
echo "Adding resource for: "${TARGETFILE}""
cp "${i}" "${RESOURCE}"
done
rm ${TEMPLIST}
tar -C "${TEMPDIR}" -czf "${OUT}" .
rm -rf "${TEMPDIR}"
echo "Created ${OUT}"

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>window_bounds</key>
<array>
<integer>300</integer>
<integer>300</integer>
<integer>800</integer>
<integer>620</integer>
</array>
<key>background_picture</key>
<string>background.tiff</string>
<key>icon_size</key>
<integer>96</integer>
<key>applications_symlink</key>
<true/>
<key>items_position</key>
<dict>
<key>Applications</key>
<array>
<integer>370</integer>
<integer>156</integer>
</array>
<key>Bitcoin-Qt.app</key>
<array>
<integer>128</integer>
<integer>156</integer>
</array>
</dict>
</dict>
</plist>

94
contrib/macdeploy/gen-sdk Executable file
View File

@ -0,0 +1,94 @@
#!/usr/bin/env python3
import argparse
import plistlib
import pathlib
import sys
import tarfile
import gzip
import os
import contextlib
@contextlib.contextmanager
def cd(path):
"""Context manager that restores PWD even if an exception was raised."""
old_pwd = os.getcwd()
os.chdir(str(path))
try:
yield
finally:
os.chdir(old_pwd)
def run():
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('xcode_app', metavar='XCODEAPP', nargs=1)
parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdktgz', required=False)
args = parser.parse_args()
xcode_app = pathlib.Path(args.xcode_app[0]).resolve()
assert xcode_app.is_dir(), "The supplied Xcode.app path '{}' either does not exist or is not a directory".format(xcode_app)
xcode_app_plist = xcode_app.joinpath("Contents/version.plist")
with xcode_app_plist.open('rb') as fp:
pl = plistlib.load(fp)
xcode_version = pl['CFBundleShortVersionString']
xcode_build_id = pl['ProductBuildVersion']
print("Found Xcode (version: {xcode_version}, build id: {xcode_build_id})".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id))
sdk_dir = xcode_app.joinpath("Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
sdk_plist = sdk_dir.joinpath("System/Library/CoreServices/SystemVersion.plist")
with sdk_plist.open('rb') as fp:
pl = plistlib.load(fp)
sdk_version = pl['ProductVersion']
sdk_build_id = pl['ProductBuildVersion']
print("Found MacOSX SDK (version: {sdk_version}, build id: {sdk_build_id})".format(sdk_version=sdk_version, sdk_build_id=sdk_build_id))
out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1")
assert xcode_libcxx_dir.is_dir()
if args.out_sdktgz:
out_sdktgz_path = pathlib.Path(args.out_sdktgz_path)
else:
# Construct our own out_sdktgz if not specified on the command line
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
"""Add all files in dir_to_add to tarfp, but prepend MEMBERPREFIX to the files'
names
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:
tarfp_add_with_base_change(tarfp, "foo/bar", "/root/bazdir")
would result in the following members being added to tarfp:
foo/bar/ -> corresponding to /root/bazdir
foo/bar/qux -> corresponding to /root/bazdir/qux
"""
def change_tarinfo_base(tarinfo):
if tarinfo.name and tarinfo.name.startswith("./"):
tarinfo.name = str(pathlib.Path(alt_base_dir, tarinfo.name))
if tarinfo.linkname and tarinfo.linkname.startswith("./"):
tarinfo.linkname = str(pathlib.Path(alt_base_dir, tarinfo.linkname))
return tarinfo
with cd(dir_to_add):
tarfp.add(".", recursive=True, filter=change_tarinfo_base)
print("Creating output .tar.gz file...")
with out_sdktgz_path.open("wb") as fp:
with gzip.GzipFile(fileobj=fp, compresslevel=9, mtime=0) as gzf:
with tarfile.open(mode="w", fileobj=gzf) as tarfp:
print("Adding MacOSX SDK {} files...".format(sdk_version))
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
print("Adding libc++ headers...")
tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name))
print("Done! Find the resulting gzipped tarball at:")
print(out_sdktgz_path.resolve())
if __name__ == '__main__':
run()

View File

@ -1,3 +1,10 @@
#!/usr/bin/env bash
#
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
export LC_ALL=C
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question

View File

@ -1,8 +1,4 @@
### Seeds ###
Utility to generate the seeds.txt list that is compiled into the client
(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).
The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this:
curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py
(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).

View File

@ -126,10 +126,10 @@ def main():
g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
g.write(' */\n')
with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
with open(os.path.join(indir,'nodes_main.txt'),'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_main', 8233)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
with open(os.path.join(indir,'nodes_test.txt'),'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_test', 18233)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')

View File

@ -1,879 +0,0 @@
1.34.168.128:8333
1.202.128.218:8333
2.30.0.210:8333
5.9.96.203:8333
5.45.71.130:8333
5.45.98.141:8333
5.102.145.68:8333
5.135.160.77:8333
5.189.134.246:8333
5.199.164.132:8333
5.249.135.102:8333
8.19.44.110:8333
8.22.230.8:8333
14.200.200.145:8333
18.228.0.188:8333
18.228.0.200:8333
23.24.168.97:8333
23.28.35.227:8333
23.92.76.170:8333
23.99.64.119:8333
23.228.166.128:8333
23.229.45.32:8333
24.8.105.128:8333
24.16.69.137:8333
24.94.98.96:8333
24.102.118.7:8333
24.118.166.228:8333
24.122.133.49:8333
24.166.97.162:8333
24.213.235.242:8333
24.226.107.64:8333
24.228.192.171:8333
27.140.133.18:8333
31.41.40.25:8333
31.43.101.59:8333
31.184.195.181:8333
31.193.139.66:8333
37.200.70.102:8333
37.205.10.151:8333
42.3.106.227:8333
42.60.133.106:8333
45.56.85.231:8333
45.56.102.228:8333
45.79.130.235:8333
46.28.204.61:11101
46.38.235.229:8333
46.59.2.74:8333
46.101.132.37:8333
46.101.168.50:8333
46.163.76.230:8333
46.166.161.103:8333
46.182.132.100:8333
46.223.36.94:8333
46.227.66.132:8333
46.227.66.138:8333
46.239.107.74:8333
46.249.39.100:8333
46.250.98.108:8333
50.7.37.114:8333
50.81.53.151:8333
50.115.43.253:8333
50.116.20.87:8333
50.116.33.92:8333
50.125.167.245:8333
50.143.9.51:8333
50.188.192.133:8333
54.77.162.76:8333
54.153.97.109:8333
54.165.192.125:8333
58.96.105.85:8333
59.167.196.135:8333
60.29.227.163:8333
61.35.225.19:8333
62.43.130.178:8333
62.109.49.26:8333
62.202.0.97:8333
62.210.66.227:8333
62.210.192.169:8333
64.74.98.205:8333
64.156.193.100:8333
64.203.102.86:8333
64.229.142.48:8333
65.96.193.165:8333
66.30.3.7:8333
66.114.33.49:8333
66.118.133.194:8333
66.135.10.126:8333
66.172.10.4:8333
66.194.38.250:8333
66.194.38.253:8333
66.215.192.104:8333
67.60.98.115:8333
67.164.35.36:8333
67.191.162.244:8333
67.207.195.77:8333
67.219.233.140:8333
67.221.193.55:8333
67.228.162.228:8333
68.50.67.199:8333
68.62.3.203:8333
68.65.205.226:9000
68.106.42.191:8333
68.150.181.198:8333
68.196.196.106:8333
68.224.194.81:8333
69.46.5.194:8333
69.50.171.238:8333
69.64.43.152:8333
69.65.41.13:8333
69.90.132.200:8333
69.143.1.243:8333
69.146.98.216:8333
69.165.246.38:8333
69.207.6.135:8333
69.251.208.26:8333
70.38.1.101:8333
70.38.9.66:8333
70.90.2.18:8333
71.58.228.226:8333
71.199.11.189:8333
71.199.193.202:8333
71.205.232.181:8333
71.236.200.162:8333
72.24.73.186:8333
72.52.130.110:8333
72.53.111.37:8333
72.235.38.70:8333
73.31.171.149:8333
73.32.137.72:8333
73.137.133.238:8333
73.181.192.103:8333
73.190.2.60:8333
73.195.192.137:8333
73.222.35.117:8333
74.57.199.180:8333
74.82.233.205:8333
74.85.66.82:8333
74.101.224.127:8333
74.113.69.16:8333
74.122.235.68:8333
74.193.68.141:8333
74.208.164.219:8333
75.100.37.122:8333
75.145.149.169:8333
75.168.34.20:8333
76.20.44.240:8333
76.100.70.17:8333
76.168.3.239:8333
76.186.140.103:8333
77.92.68.221:8333
77.109.101.142:8333
77.110.11.86:8333
77.242.108.18:8333
78.46.96.150:9020
78.84.100.95:8333
79.132.230.144:8333
79.133.43.63:8333
79.160.76.153:8333
79.169.34.24:8333
79.188.7.78:8333
80.217.226.25:8333
80.223.100.179:8333
80.240.129.221:8333
81.1.173.243:8333
81.7.11.50:8333
81.7.16.17:8333
81.66.111.3:8333
81.80.9.71:8333
81.140.43.138:8333
81.171.34.37:8333
81.174.247.50:8333
81.181.155.53:8333
81.184.5.253:8333
81.187.69.130:8333
81.230.3.84:8333
82.42.128.51:8333
82.74.226.21:8333
82.142.75.50:8333
82.199.102.10:8333
82.200.205.30:8333
82.221.108.21:8333
82.221.128.35:8333
82.238.124.41:8333
82.242.0.245:8333
83.76.123.110:8333
83.150.9.196:8333
83.162.196.192:8333
83.162.234.224:8333
83.170.104.91:8333
83.255.66.118:8334
84.2.34.104:8333
84.45.98.91:8333
84.47.161.150:8333
84.212.192.131:8333
84.215.169.101:8333
84.238.140.176:8333
84.245.71.31:8333
85.17.4.212:8333
85.114.128.134:8333
85.159.237.191:8333
85.166.130.189:8333
85.199.4.228:8333
85.214.66.168:8333
85.214.195.210:8333
85.229.0.73:8333
86.21.96.45:8333
87.48.42.199:8333
87.81.143.82:8333
87.81.251.72:8333
87.104.24.185:8333
87.104.168.104:8333
87.117.234.71:8333
87.118.96.197:8333
87.145.12.57:8333
87.159.170.190:8333
88.150.168.160:8333
88.208.0.79:8333
88.208.0.149:8333
88.214.194.226:8343
89.1.11.32:8333
89.36.235.108:8333
89.67.96.2:15321
89.98.16.41:8333
89.108.72.195:8333
89.156.35.157:8333
89.163.227.28:8333
89.212.33.237:8333
89.212.160.165:8333
89.231.96.83:8333
89.248.164.64:8333
90.149.193.199:8333
91.77.239.245:8333
91.106.194.97:8333
91.126.77.77:8333
91.134.38.195:8333
91.156.97.181:8333
91.207.68.144:8333
91.209.77.101:8333
91.214.200.205:8333
91.220.131.242:8333
91.220.163.18:8333
91.233.23.35:8333
92.13.96.93:8333
92.14.74.114:8333
92.27.7.209:8333
92.221.228.13:8333
92.255.207.73:8333
93.72.167.148:8333
93.74.163.234:8333
93.123.174.66:8333
93.152.166.29:8333
93.181.45.188:8333
94.19.12.244:8333
94.190.227.112:8333
94.198.135.29:8333
94.224.162.65:8333
94.226.107.86:8333
94.242.198.161:8333
95.31.10.209:8333
95.65.72.244:8333
95.84.162.95:8333
95.90.139.46:8333
95.183.49.27:8005
95.215.47.133:8333
96.23.67.85:8333
96.44.166.190:8333
97.93.225.74:8333
98.26.0.34:8333
98.27.225.102:8333
98.229.117.229:8333
98.249.68.125:8333
98.255.5.155:8333
99.101.240.114:8333
101.100.174.138:8333
101.251.203.6:8333
103.3.60.61:8333
103.30.42.189:8333
103.224.165.48:8333
104.36.83.233:8333
104.37.129.22:8333
104.54.192.251:8333
104.128.228.252:8333
104.128.230.185:8334
104.130.161.47:8333
104.131.33.60:8333
104.143.0.156:8333
104.156.111.72:8333
104.167.111.84:8333
104.193.40.248:8333
104.197.7.174:8333
104.197.8.250:8333
104.223.1.133:8333
104.236.97.140:8333
104.238.128.214:8333
104.238.130.182:8333
106.38.234.84:8333
106.185.36.204:8333
107.6.4.145:8333
107.150.2.6:8333
107.150.40.234:8333
107.155.108.130:8333
107.161.182.115:8333
107.170.66.231:8333
107.190.128.226:8333
107.191.106.115:8333
108.16.2.61:8333
109.70.4.168:8333
109.162.35.196:8333
109.163.235.239:8333
109.190.196.220:8333
109.191.39.60:8333
109.234.106.191:8333
109.238.81.82:8333
114.76.147.27:8333
115.28.224.127:8333
115.68.110.82:18333
118.97.79.218:8333
118.189.207.197:8333
119.228.96.233:8333
120.147.178.81:8333
121.41.123.5:8333
121.67.5.230:8333
122.107.143.110:8333
123.2.170.98:8333
123.110.65.94:8333
123.193.139.19:8333
125.239.160.41:8333
128.101.162.193:8333
128.111.73.10:8333
128.140.229.73:8333
128.175.195.31:8333
128.199.107.63:8333
128.199.192.153:8333
128.253.3.193:20020
129.123.7.7:8333
130.89.160.234:8333
131.72.139.164:8333
131.191.112.98:8333
133.1.134.162:8333
134.19.132.53:8333
137.226.34.42:8333
141.41.2.172:8333
141.255.128.204:8333
142.217.12.106:8333
143.215.129.126:8333
146.0.32.101:8337
147.229.13.199:8333
149.210.133.244:8333
149.210.162.187:8333
150.101.163.241:8333
151.236.11.189:8333
153.121.66.211:8333
154.20.2.139:8333
159.253.23.132:8333
162.209.106.123:8333
162.210.198.184:8333
162.218.65.121:8333
162.222.161.49:8333
162.243.132.6:8333
162.243.132.58:8333
162.248.99.164:53011
162.248.102.117:8333
163.158.35.110:8333
164.15.10.189:8333
164.40.134.171:8333
166.230.71.67:8333
167.160.161.199:8333
168.103.195.250:8333
168.144.27.112:8333
168.158.129.29:8333
170.75.162.86:8333
172.90.99.174:8333
172.245.5.156:8333
173.23.166.47:8333
173.32.11.194:8333
173.34.203.76:8333
173.171.1.52:8333
173.175.136.13:8333
173.230.228.139:8333
173.247.193.70:8333
174.49.132.28:8333
174.52.202.72:8333
174.53.76.87:8333
174.109.33.28:8333
176.28.12.169:8333
176.35.182.214:8333
176.36.33.113:8333
176.36.33.121:8333
176.58.96.173:8333
176.121.76.84:8333
178.62.70.16:8333
178.62.111.26:8333
178.76.169.59:8333
178.79.131.32:8333
178.162.199.216:8333
178.175.134.35:8333
178.248.111.4:8333
178.254.1.170:8333
178.254.34.161:8333
179.43.143.120:8333
179.208.156.198:8333
180.200.128.58:8333
183.78.169.108:8333
183.96.96.152:8333
184.68.2.46:8333
184.73.160.160:8333
184.94.227.58:8333
184.152.68.163:8333
185.7.35.114:8333
185.28.76.179:8333
185.31.160.202:8333
185.45.192.129:8333
185.66.140.15:8333
186.2.167.23:8333
186.220.101.142:8333
188.26.5.33:8333
188.75.136.146:8333
188.120.194.140:8333
188.121.5.150:8333
188.138.0.114:8333
188.138.33.239:8333
188.166.0.82:8333
188.182.108.129:8333
188.191.97.208:8333
188.226.198.102:8001
190.10.9.217:8333
190.75.143.144:8333
190.139.102.146:8333
191.237.64.28:8333
192.3.131.61:8333
192.99.225.3:8333
192.110.160.122:8333
192.146.137.1:8333
192.183.198.204:8333
192.203.228.71:8333
193.0.109.3:8333
193.12.238.204:8333
193.91.200.85:8333
193.234.225.156:8333
194.6.233.38:8333
194.63.143.136:8333
194.126.100.246:8333
195.134.99.195:8333
195.159.111.98:8333
195.159.226.139:8333
195.197.175.190:8333
198.48.199.108:8333
198.57.208.134:8333
198.57.210.27:8333
198.62.109.223:8333
198.167.140.8:8333
198.167.140.18:8333
199.91.173.234:8333
199.127.226.245:8333
199.180.134.116:8333
200.7.96.99:8333
201.160.106.86:8333
202.55.87.45:8333
202.60.68.242:8333
202.60.69.232:8333
202.124.109.103:8333
203.30.197.77:8333
203.88.160.43:8333
203.151.140.14:8333
203.219.14.204:8333
205.147.40.62:8333
207.235.39.214:8333
207.244.73.8:8333
208.12.64.225:8333
208.76.200.200:8333
209.40.96.121:8333
209.126.107.176:8333
209.141.40.149:8333
209.190.75.59:8333
209.208.111.142:8333
210.54.34.164:8333
211.72.66.229:8333
212.51.144.42:8333
212.112.33.157:8333
212.116.72.63:8333
212.126.14.122:8333
213.66.205.194:8333
213.111.196.21:8333
213.122.107.102:8333
213.136.75.175:8333
213.155.7.24:8333
213.163.64.31:8333
213.163.64.208:8333
213.165.86.136:8333
213.184.8.22:8333
216.15.78.182:8333
216.55.143.154:8333
216.115.235.32:8333
216.126.226.166:8333
216.145.67.87:8333
216.169.141.169:8333
216.249.92.230:8333
216.250.138.230:8333
217.20.171.43:8333
217.23.2.71:8333
217.23.2.242:8333
217.25.9.76:8333
217.40.226.169:8333
217.123.98.9:8333
217.155.36.62:8333
217.172.32.18:20993
218.61.196.202:8333
218.231.205.41:8333
220.233.77.200:8333
223.18.226.85:8333
223.197.203.82:8333
223.255.166.142:8333
[2001:1291:2bf:1::100]:8333
[2001:1418:100:5c2::2]:8333
[2001:16d8:dd24:0:86c9:681e:f931:256]:8333
[2001:19f0:1624:e6::579d:9428]:8333
[2001:19f0:300:1340:225:90ff:fec9:2b6d]:8333
[2001:19f0:4009:1405::64]:8333
[2001:1b40:5000:2e::3fb0:6571]:8333
[2001:410:a000:4050:8463:90b0:fffb:4e58]:8333
[2001:410:a002:cafe:8463:90b0:fffb:4e58]:8333
[2001:41d0:1:541e::1]:8333
[2001:41d0:1:6a34::3]:8333
[2001:41d0:1:6cd3::]:8333
[2001:41d0:1:8b26::1]:8333
[2001:41d0:1:a33d::1]:8333
[2001:41d0:1:b855::1]:8333
[2001:41d0:1:c139::1]:8333
[2001:41d0:1:c8d7::1]:8333
[2001:41d0:1:dd3f::1]:8333
[2001:41d0:1:e29d::1]:8333
[2001:41d0:1:f59f::33]:8333
[2001:41d0:1:f7cc::1]:8333
[2001:41d0:1:ff87::1]:8333
[2001:41d0:2:2f05::1]:8333
[2001:41d0:2:37c3::]:8200
[2001:41d0:2:3e13::1]:8333
[2001:41d0:2:8619::]:8333
[2001:41d0:2:9c94::1]:8333
[2001:41d0:2:a24f::]:8333
[2001:41d0:2:adbf::]:8333
[2001:41d0:2:b721::1]:8333
[2001:41d0:2:ee52::1]:8333
[2001:41d0:2:f1a5::]:8333
[2001:41d0:2:fa54::1]:8333
[2001:41d0:51:1::2036]:8333
[2001:41d0:52:a00::1a1]:8333
[2001:41d0:52:cff::6f5]:8333
[2001:41d0:52:d00::2c0]:8333
[2001:41d0:52:d00::cf2]:8333
[2001:41d0:8:1087::1]:8333
[2001:41d0:8:4a3c::b7c]:8333
[2001:41d0:8:6728::]:8333
[2001:41d0:8:b779::1]:8333
[2001:41d0:8:c30f::1]:8333
[2001:41d0:8:d2b2::1]:8333
[2001:41d0:8:d5c3::1]:8333
[2001:41d0:8:eb8b::]:8333
[2001:41d0:a:16d0::1]:8333
[2001:41d0:a:2b18::1]:8333
[2001:41d0:a:3a9c::1]:8333
[2001:41d0:a:4903::]:8333
[2001:41d0:a:57b::1]:8333
[2001:41d0:a:5c7a::]:8333
[2001:41d0:a:6c29::1]:8333
[2001:41d0:a:f482::1]:8333
[2001:41d0:b:854:b7c:b7c:b7c:b7c]:8333
[2001:41d0:d:111c::]:8333
[2001:44b8:4116:7801:4216:7eff:fe78:3fe4]:8333
[2001:470:1f08:837::2]:8333
[2001:470:1f08:c33::2]:8333
[2001:470:1f09:bca:218:7dff:fe10:be33]:8333
[2001:470:1f0f:22d::212:26]:8333
[2001:470:1f11:12d5::ae1:5611]:8333
[2001:470:1f14:57a::2]:8333
[2001:470:1f14:7d::2]:8333
[2001:470:1f15:57c::1]:8333
[2001:470:1f15:dda:3d9a:3f11:9a56:ed64]:8333
[2001:470:25:482::2]:8333
[2001:470:25:e4::2]:8333
[2001:470:4:26b::2]:8333
[2001:470:5f:5f::232]:8333
[2001:470:66:119::2]:8333
[2001:470:67:39d::71]:8333
[2001:470:6c4f::cafe]:8333
[2001:470:8:2e1::43]:8333
[2001:470:90a7:96::afe:6021]:8333
[2001:470:95c1::2]:8333
[2001:470:b1d0:ffff::1000]:8333
[2001:470:c1f2:3::201]:8333
[2001:470:d00d:0:3664:a9ff:fe9a:5150]:8333
[2001:470:e250:0:211:11ff:feb9:924c]:8333
[2001:4800:7817:101:be76:4eff:fe04:dc52]:8333
[2001:4800:7819:104:be76:4eff:fe04:7809]:8333
[2001:4800:7819:104:be76:4eff:fe05:c828]:8333
[2001:4802:7800:2:30d7:1775:ff20:1858]:8333
[2001:4802:7802:101:be76:4eff:fe20:256]:8333
[2001:4802:7802:103:be76:4eff:fe20:2de8]:8333
[2001:4830:1100:2e8::2]:8333
[2001:4ba0:fff7:181:dead::1]:8333
[2001:4ba0:fffa:5d::93]:8333
[2001:4ba0:ffff:1be:1:1005:0:1]:8335
[2001:4c48:110:101:216:3eff:fe24:1162]:8333
[2001:4dd0:f101::32]:8333
[2001:4dd0:ff00:867f::3]:8333
[2001:4dd0:ff00:9a67::9]:8333
[2001:4dd0:ff00:9c55:c23f:d5ff:fe6c:7ee9]:8333
[2001:5c0:1400:b::3cc7]:8333
[2001:5c0:1400:b::3d01]:8333
[2001:5c0:1400:b::8df]:8333
[2001:5c0:1501:300::3]:8333
[2001:610:1b19::3]:8333
[2001:620:500:fff0:f21f:afff:fecf:91cc]:8333
[2001:67c:1220:80c:ad:8de2:f7e2:c784]:8333
[2001:67c:21ec:1000::b]:8333
[2001:6f8:1296:0:76d4:35ff:feba:1d26]:8333
[2001:840:f000:4250:3e4a:92ff:fe6d:145f]:8333
[2001:8d8:840:500::39:1ae]:8333
[2001:980:efd8:0:21:de4a:2709:912]:8333
[2001:981:46:1::3]:8333
[2001:981:9319:2:c0:a8:c8:8]:8333
[2001:9d8:cafe:3::91]:8333
[2001:ad0:1:1:26be:5ff:fe25:959d]:8333
[2001:ba8:1f1:f34c::2]:8333
[2001:bc8:381c:100::1]:8333
[2002:175c:4caa::175c:4caa]:8333
[2002:4404:82f1:0:8d55:8fbb:15fa:f4e0]:8333
[2002:4475:2233:0:21f:5bff:fe33:9f70]:8333
[2002:596c:48c3::596c:48c3]:8333
[2002:8c6d:6521:9617:12bf:48ff:fed8:1724]:8333
[2002:a646:5e6a::1:2]:8333
[2002:b009:20c5::b009:20c5]:8333
[2400:8900::f03c:91ff:fe6e:823e]:8333
[2400:8900::f03c:91ff:fe70:d164]:8333
[2400:8901::f03c:91ff:fe37:9761]:8333
[2403:4200:403:2::ff]:8333
[2403:b800:1000:64:40a:e9ff:fe5f:94c1]:8333
[2403:b800:1000:64:9879:17ff:fe6a:a59f]:8333
[2600:3c00::f03c:91ff:fe18:59b2]:8333
[2600:3c00::f03c:91ff:fe37:a4b1]:8333
[2600:3c00::f03c:91ff:fe56:2973]:8333
[2600:3c00::f03c:91ff:fe6e:7297]:8333
[2600:3c00::f03c:91ff:fe84:8a6e]:8333
[2600:3c01::f03c:91ff:fe18:6adf]:8333
[2600:3c01::f03c:91ff:fe18:e217]:8333
[2600:3c01::f03c:91ff:fe33:1b31]:8333
[2600:3c01::f03c:91ff:fe33:2fe1]:8333
[2600:3c01::f03c:91ff:fe33:a03f]:8333
[2600:3c01::f03c:91ff:fe50:5e06]:8333
[2600:3c01::f03c:91ff:fe56:d645]:8333
[2600:3c01::f03c:91ff:fe6e:a3dc]:8333
[2600:3c01::f03c:91ff:fe89:a659]:8333
[2600:3c02::f03c:91ff:fe6e:6f0b]:8333
[2600:3c03::f03c:91ff:fe33:f6fb]:8333
[2600:3c03::f03c:91ff:fe50:5fa7]:8333
[2600:3c03::f03c:91ff:fe6e:1803]:8333
[2600:3c03::f03c:91ff:fe6e:4ac0]:8333
[2601:6:4800:47f:1e4e:1f4d:332c:3bf6]:8333
[2601:d:5400:fed:8d54:c1e8:7ed7:d45e]:8333
[2602:100:4b8f:6d2a:20c:29ff:feaf:c4c2]:8333
[2602:ffc5:1f::1f:2d61]:8333
[2602:ffc5:1f::1f:9211]:8333
[2602:ffc5::ffc5:b844]:8333
[2602:ffe8:100:2::457:936b]:8333
[2602:ffea:1001:125::2ad4]:8333
[2602:ffea:1001:6ff::837d]:8333
[2602:ffea:1001:72b::578b]:8333
[2602:ffea:1001:77a::9cae]:8333
[2602:ffea:1:2fe::6bc8]:8333
[2602:ffea:1:701::7968]:8333
[2602:ffea:1:70d::82ec]:8333
[2602:ffea:1:9ff::e957]:8333
[2602:ffea:1:a5d::4acb]:8333
[2602:ffea:a::24c4:d9fd]:8333
[2602:ffea:a::c06:ae32]:8333
[2604:0:c1:100:1ec1:deff:fe54:2235]:8333
[2604:180:1:1af::42a9]:8333
[2604:180::b208:398]:8333
[2604:2880::6072:aed]:8333
[2604:4080:1114:0:3285:a9ff:fe93:850c]:8333
[2604:7c00:17:3d0::5a4d]:8333
[2604:9a00:2100:a009:2::]:8333
[2604:a880:1:20::22a:4001]:8333
[2604:a880:800:10::752:f001]:8333
[2604:c00:88:32:216:3eff:fee4:fcca]:8333
[2604:c00:88:32:216:3eff:fef5:bc21]:8333
[2605:7980:1:2::1761:3d4e]:8333
[2605:e000:1417:4068:223:32ff:fe96:e2d]:8333
[2606:6000:a441:9903:5054:ff:fe78:66ff]:8333
[2606:df00:2::ae85:8fc6]:8333
[2607:5300:100:200::e7f]:8333
[2607:5300:10::a1]:8333
[2607:5300:60:116e::1]:8333
[2607:5300:60:1535::]:8333
[2607:5300:60:1b32::1]:8333
[2607:5300:60:2337::1]:8333
[2607:5300:60:2b90::1]:8333
[2607:5300:60:2d99::1]:8333
[2607:5300:60:3cb::1]:8333
[2607:5300:60:4a85::]:8333
[2607:5300:60:5112:0:2:4af5:63fe]:8333
[2607:5300:60:6dd5::]:8333
[2607:5300:60:a91::1]:8333
[2607:f1c0:820:1500::7f:3f44]:8333
[2607:f1c0:848:1000::48:943c]:8333
[2607:f948:0:1::7]:8333
[2607:fcd0:100:2300::4ad:e594]:8333
[2607:fcd0:100:2300::659e:9cb3]:8333
[2607:fcd0:100:2300::c74b:a8ae]:8333
[2607:fcd0:100:2300::d82:d8c2]:8333
[2607:fcd0:100:4300::8795:2fa8]:8333
[2607:fcd0:daaa:901::9561:e043]:8333
[2a00:1178:2:43:5054:ff:fee7:2eb6]:8333
[2a00:1328:e100:cc42:230:48ff:fe92:55d]:8333
[2a00:14f0:e000:80d2:cd1a::1]:8333
[2a00:16d8:c::5b6a:c261]:8333
[2a00:61e0:4083:6d01:6852:1376:e972:2091]:8333
[2a00:c98:2030:a02f:2::2]:8333
[2a01:1b0:7999:402::131]:8333
[2a01:1e8:e100:811c:700f:65f0:f72a:1084]:8333
[2a01:238:42da:c500:6546:1293:5422:ab40]:8333
[2a01:348:6:473::2]:8333
[2a01:368:e010:2::2]:8333
[2a01:430:17:1::ffff:549]:8333
[2a01:430:17:1::ffff:830]:8333
[2a01:488:66:1000:53a9:d04:0:1]:8333
[2a01:488:66:1000:57e6:578c:0:1]:8333
[2a01:488:66:1000:b01c:178d:0:1]:8333
[2a01:488:67:1000:523:fdce:0:1]:8333
[2a01:488:67:1000:b01c:30ab:0:1]:8333
[2a01:4f8:100:24aa::2]:8333
[2a01:4f8:100:44e7::2]:8333
[2a01:4f8:100:5128::2]:8333
[2a01:4f8:100:84a7::1:1]:8333
[2a01:4f8:110:516c::2]:8333
[2a01:4f8:110:536e::2]:8333
[2a01:4f8:120:62e6::2]:8333
[2a01:4f8:120:702e::2]:8333
[2a01:4f8:120:8005::2]:8333
[2a01:4f8:120:8203::2]:8333
[2a01:4f8:120:8422::2]:8333
[2a01:4f8:121:11eb::2]:8333
[2a01:4f8:121:261::2]:8333
[2a01:4f8:130:242b::10]:8333
[2a01:4f8:130:242b::5]:8333
[2a01:4f8:130:2468::3]:8333
[2a01:4f8:130:632c::2]:8333
[2a01:4f8:130:6366::2]:8333
[2a01:4f8:130:6426::2]:8333
[2a01:4f8:130:934f::2]:8333
[2a01:4f8:131:2070::2]:8333
[2a01:4f8:131:54a2::2]:8333
[2a01:4f8:140:80ad::2]:8333
[2a01:4f8:141:186::2]:8333
[2a01:4f8:150:210b::2]:8333
[2a01:4f8:150:2263::5]:8333
[2a01:4f8:150:2349::2]:8333
[2a01:4f8:150:61ee::2]:8333
[2a01:4f8:150:7088:5054:ff:fe45:bff2]:8333
[2a01:4f8:150:8324::2]:9001
[2a01:4f8:151:1d8::2]:8333
[2a01:4f8:151:5128::2]:8333
[2a01:4f8:151:6347::2]:9001
[2a01:4f8:161:526d::2]:8333
[2a01:4f8:161:9349::2]:8333
[2a01:4f8:162:23c6::2]:8333
[2a01:4f8:162:4348::2]:8333
[2a01:4f8:162:7345::2]:8333
[2a01:4f8:162:7383::2]:8333
[2a01:4f8:162:74e3::2]:8333
[2a01:4f8:190:6065::2]:8333
[2a01:4f8:190:6349::2]:8333
[2a01:4f8:190:64c9::2]:8333
[2a01:4f8:190:91ce::2]:8333
[2a01:4f8:191:2194::83]:8333
[2a01:4f8:191:40a1::2]:8333
[2a01:4f8:191:4a7::2]:8333
[2a01:4f8:191:63b4:5000::1]:8333
[2a01:4f8:191:7121::2]:8333
[2a01:4f8:191:83a2::2]:8333
[2a01:4f8:191:93c4::2]:8333
[2a01:4f8:192:60a9:0:1:5:2]:8333
[2a01:4f8:192:73b2::2]:8333
[2a01:4f8:192:8098::2]:8333
[2a01:4f8:192:db::2]:8333
[2a01:4f8:200:1012::2]:8333
[2a01:4f8:200:22e3::2]:8333
[2a01:4f8:200:414e::2]:8333
[2a01:4f8:200:63af::222]:8333
[2a01:4f8:200:71e3:78b4:f3ff:fead:e8cf]:8333
[2a01:4f8:201:5164::2]:8333
[2a01:4f8:201:6011::4]:8333
[2a01:4f8:201:60d5::2]:8333
[2a01:4f8:202:53c3::2]:8333
[2a01:4f8:210:24aa::2]:8333
[2a01:4f8:210:502f::2]:8333
[2a01:4f8:211:14cf::2]:8333
[2a01:4f8:211:1a59::2]:8333
[2a01:4f8:211:2ac1::2]:8333
[2a01:4f8:211:cca::2]:8333
[2a01:4f8:a0:22a5::2]:8333
[2a01:4f8:a0:5023::2]:8333
[2a01:4f8:a0:5243::2]:8333
[2a01:4f8:a0:74c8::2]:8333
[2a01:4f8:a0:8227::2]:8333
[2a01:4f8:a0:822d::2]:8333
[2a01:4f8:d13:2183::2]:8333
[2a01:608:ffff:a009:8bf5:879d:e51a:f837]:8333
[2a01:79d:469e:ed94:c23f:d5ff:fe65:20c5]:8333
[2a01:7c8:aab5:3e6:5054:ff:fed7:4e54]:8333
[2a01:7e00::f03c:91ff:fe18:301e]:8333
[2a01:7e00::f03c:91ff:fe18:7749]:8333
[2a01:7e00::f03c:91ff:fe33:2d67]:8333
[2a01:7e00::f03c:91ff:fe33:347c]:8333
[2a01:7e00::f03c:91ff:fe33:ae50]:8333
[2a01:7e00::f03c:91ff:fe56:6b5c]:8333
[2a01:7e00::f03c:91ff:fe56:bee6]:8333
[2a01:7e00::f03c:91ff:fe69:4895]:8333
[2a01:7e00::f03c:91ff:fe69:9912]:8333
[2a01:7e00::f03c:91ff:fe6e:26ee]:8333
[2a01:7e00::f03c:91ff:fe73:42f1]:8333
[2a01:7e00::f03c:91ff:fe84:434f]:8333
[2a01:7e00::f03c:91ff:fe84:b36b]:8333
[2a01:7e00::f03c:91ff:fe89:1faa]:8333
[2a01:7e00::f03c:91ff:fe98:816]:8333
[2a01:7e00::f03c:91ff:fedb:352e]:8333
[2a01:7e00::f03c:91ff:fedb:4a1d]:8333
[2a01:e34:edbb:6750:224:1dff:fe89:3897]:8333
[2a01:e35:2f1d:3fb0:7187:c7ba:bcfc:80ce]:8333
[2a01:e35:8787:96f0:9032:9297:39ae:496d]:8333
[2a01:e35:8a3f:47c0:c617:feff:fe3c:9fbd]:8333
[2a01:e35:8b66:6a0:4900:9dfd:d841:d025]:8333
[2a02:168:4a01::39]:8333
[2a02:168:5404:2:c23f:d5ff:fe6a:512e]:8333
[2a02:180:1:1::5b8f:538c]:8333
[2a02:2028:1016::2]:8333
[2a02:2528:503:2::14]:8333
[2a02:2528:503:2::15]:8333
[2a02:2528:ff00:81a6:21e:c5ff:fe8d:f9a5]:8333
[2a02:2770:5:0:21a:4aff:fee4:c7db]:8333
[2a02:2770:8:0:21a:4aff:fe7b:3dcd]:8333
[2a02:348:5e:5a29::1]:8333
[2a02:7aa0:1619::202f:c06a]:8333
[2a02:8109:8e40:35fc:ba27:ebff:feae:cf16]:8333
[2a02:af8:6:1500::1:130]:8333
[2a02:c200:0:10:1:0:6314:2222]:8333
[2a02:c200:0:10:2:3:3295:1]:8332
[2a02:c200:0:10:3:0:5449:1]:8333
[2a02:c200:1:10:2:3:5899:1]:8333
[2a02:c200:1:10::2705:1]:8333
[2a02:ce80:0:20::1]:8333
[2a02:fe0:c321:27e0:6ef0:49ff:fe11:a61d]:8333
[2a03:4000:2:496::8]:8333
[2a03:b0c0:0:1010::62:f001]:8333
[2a03:f80:ed16:ca7:ea75:b12d:2af:9e2a]:8333
3ffk7iumtx3cegbi.onion:8333
3hshaantu6ot4upz.onion:8333
45c5lc77qgpikafy.onion:8333
77mx2jsxaoyesz2p.onion:8333
7g7j54btiaxhtsiy.onion:8333
b6fr7dlbu2kpiysf.onion:8333
bitcoincfqcssig5.onion:8333
bitcoinostk4e4re.onion:8333
bmutjfrj5btseddb.onion:8333
drp4pvejybx2ejdr.onion:8333
gixnv56d63buypan.onion:8333
h2vlpudzphzqxutd.onion:8333
hhiv5pnxenvbf4am.onion:8333
lzxpkn6ptp3ohh63.onion:8333
msphsgfiqfq5stne.onion:8333
ncwk3lutemffcpc4.onion:8333
okdzjarwekbshnof.onion:8333
sjdomi4yb2dwkjbc.onion:8333
uvwozwxlihntigbb.onion:8333
v6ylz45dn5ybpk4d.onion:8333
vk3qjdehyy4dwcxw.onion:8333
vqpye2k5rcqvj5mq.onion:8333
xudkoztdfrsuyyou.onion:8333
z55v4ostefnwfy32.onion:8333

View File

@ -1,11 +0,0 @@
# List of fixed seed nodes for testnet
# Onion nodes
thfsmmn2jbitcoin.onion
it2pj4f7657g3rhi.onion
nkf5e6b7pl4jfd4a.onion
4zhkir2ofl7orfom.onion
t6xj6wilh4ytvcs7.onion
i6y6ivorwakd7nw3.onion
ubqj4rsu3nqtxmtp.onion

View File

@ -1,35 +0,0 @@
### SpendFrom ###
Use the raw transactions API to send coins received on a particular
address (or addresses).
### Usage: ###
Depends on [jsonrpc](http://json-rpc.org/).
spendfrom.py --from=FROMADDRESS1[,FROMADDRESS2] --to=TOADDRESS --amount=amount \
--fee=fee --datadir=/path/to/.bitcoin --testnet --dry_run
With no arguments, outputs a list of amounts associated with addresses.
With arguments, sends coins received by the `FROMADDRESS` addresses to the `TOADDRESS`.
### Notes ###
- You may explicitly specify how much fee to pay (a fee more than 1% of the amount
will fail, though, to prevent bitcoin-losing accidents). Spendfrom may fail if
it thinks the transaction would never be confirmed (if the amount being sent is
too small, or if the transaction is too many bytes for the fee).
- If a change output needs to be created, the change will be sent to the last
`FROMADDRESS` (if you specify just one `FROMADDRESS`, change will go back to it).
- If `--datadir` is not specified, the default datadir is used.
- The `--dry_run` option will just create and sign the transaction and print
the transaction data (as hexadecimal), instead of broadcasting it.
- If the transaction is created and broadcast successfully, a transaction id
is printed.
- If this was a tool for end-users and not programmers, it would have much friendlier
error-handling.

View File

@ -1,9 +0,0 @@
from distutils.core import setup
setup(name='btcspendfrom',
version='1.0',
description='Command-line utility for bitcoin "coin control"',
author='Gavin Andresen',
author_email='gavin@bitcoinfoundation.org',
requires=['jsonrpc'],
scripts=['spendfrom.py'],
)

View File

@ -1,267 +0,0 @@
#!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bitcoin-Qt running
# on localhost.
#
# Depends on jsonrpc
#
from decimal import *
import getpass
import math
import os
import os.path
import platform
import sys
import time
from jsonrpc import ServiceProxy, json
BASE_FEE=Decimal("0.001")
def check_json_precision():
"""Make sure json library being used does not lose precision converting BTC values"""
n = Decimal("20000000.00000003")
satoshis = int(json.loads(json.dumps(float(n)))*1.0e8)
if satoshis != 2000000000000003:
raise RuntimeError("JSON encode/decode loses precision")
def determine_db_dir():
"""Return the default location of the bitcoin data directory"""
if platform.system() == "Darwin":
return os.path.expanduser("~/Library/Application Support/Bitcoin/")
elif platform.system() == "Windows":
return os.path.join(os.environ['APPDATA'], "Bitcoin")
return os.path.expanduser("~/.bitcoin")
def read_bitcoin_config(dbdir):
"""Read the bitcoin.conf file from dbdir, returns dictionary of settings"""
from ConfigParser import SafeConfigParser
class FakeSecHead(object):
def __init__(self, fp):
self.fp = fp
self.sechead = '[all]\n'
def readline(self):
if self.sechead:
try: return self.sechead
finally: self.sechead = None
else:
s = self.fp.readline()
if s.find('#') != -1:
s = s[0:s.find('#')].strip() +"\n"
return s
config_parser = SafeConfigParser()
config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "bitcoin.conf"))))
return dict(config_parser.items("all"))
def connect_JSON(config):
"""Connect to a bitcoin JSON-RPC server"""
testnet = config.get('testnet', '0')
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
if not 'rpcport' in config:
config['rpcport'] = 18232 if testnet else 8232
connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
try:
result = ServiceProxy(connect)
# ServiceProxy is lazy-connect, so send an RPC command mostly to catch connection errors,
# but also make sure the bitcoind we're talking to is/isn't testnet:
if result.getmininginfo()['testnet'] != testnet:
sys.stderr.write("RPC server at "+connect+" testnet setting mismatch\n")
sys.exit(1)
return result
except:
sys.stderr.write("Error connecting to RPC server at "+connect+"\n")
sys.exit(1)
def unlock_wallet(bitcoind):
info = bitcoind.getinfo()
if 'unlocked_until' not in info:
return True # wallet is not encrypted
t = int(info['unlocked_until'])
if t <= time.time():
try:
passphrase = getpass.getpass("Wallet is locked; enter passphrase: ")
bitcoind.walletpassphrase(passphrase, 5)
except:
sys.stderr.write("Wrong passphrase\n")
info = bitcoind.getinfo()
return int(info['unlocked_until']) > time.time()
def list_available(bitcoind):
address_summary = dict()
address_to_account = dict()
for info in bitcoind.listreceivedbyaddress(0):
address_to_account[info["address"]] = info["account"]
unspent = bitcoind.listunspent(0)
for output in unspent:
# listunspent doesn't give addresses, so:
rawtx = bitcoind.getrawtransaction(output['txid'], 1)
vout = rawtx["vout"][output['vout']]
pk = vout["scriptPubKey"]
# This code only deals with ordinary pay-to-bitcoin-address
# or pay-to-script-hash outputs right now; anything exotic is ignored.
if pk["type"] != "pubkeyhash" and pk["type"] != "scripthash":
continue
address = pk["addresses"][0]
if address in address_summary:
address_summary[address]["total"] += vout["value"]
address_summary[address]["outputs"].append(output)
else:
address_summary[address] = {
"total" : vout["value"],
"outputs" : [output],
"account" : address_to_account.get(address, "")
}
return address_summary
def select_coins(needed, inputs):
# Feel free to improve this, this is good enough for my simple needs:
outputs = []
have = Decimal("0.0")
n = 0
while have < needed and n < len(inputs):
outputs.append({ "txid":inputs[n]["txid"], "vout":inputs[n]["vout"]})
have += inputs[n]["amount"]
n += 1
return (outputs, have-needed)
def create_tx(bitcoind, fromaddresses, toaddress, amount, fee):
all_coins = list_available(bitcoind)
total_available = Decimal("0.0")
needed = amount+fee
potential_inputs = []
for addr in fromaddresses:
if addr not in all_coins:
continue
potential_inputs.extend(all_coins[addr]["outputs"])
total_available += all_coins[addr]["total"]
if total_available < needed:
sys.stderr.write("Error, only %f BTC available, need %f\n"%(total_available, needed));
sys.exit(1)
#
# Note:
# Python's json/jsonrpc modules have inconsistent support for Decimal numbers.
# Instead of wrestling with getting json.dumps() (used by jsonrpc) to encode
# Decimals, I'm casting amounts to float before sending them to bitcoind.
#
outputs = { toaddress : float(amount) }
(inputs, change_amount) = select_coins(needed, potential_inputs)
if change_amount > BASE_FEE: # don't bother with zero or tiny change
change_address = fromaddresses[-1]
if change_address in outputs:
outputs[change_address] += float(change_amount)
else:
outputs[change_address] = float(change_amount)
rawtx = bitcoind.createrawtransaction(inputs, outputs)
signed_rawtx = bitcoind.signrawtransaction(rawtx)
if not signed_rawtx["complete"]:
sys.stderr.write("signrawtransaction failed\n")
sys.exit(1)
txdata = signed_rawtx["hex"]
return txdata
def compute_amount_in(bitcoind, txinfo):
result = Decimal("0.0")
for vin in txinfo['vin']:
in_info = bitcoind.getrawtransaction(vin['txid'], 1)
vout = in_info['vout'][vin['vout']]
result = result + vout['value']
return result
def compute_amount_out(txinfo):
result = Decimal("0.0")
for vout in txinfo['vout']:
result = result + vout['value']
return result
def sanity_test_fee(bitcoind, txdata_hex, max_fee):
class FeeError(RuntimeError):
pass
try:
txinfo = bitcoind.decoderawtransaction(txdata_hex)
total_in = compute_amount_in(bitcoind, txinfo)
total_out = compute_amount_out(txinfo)
if total_in-total_out > max_fee:
raise FeeError("Rejecting transaction, unreasonable fee of "+str(total_in-total_out))
tx_size = len(txdata_hex)/2
kb = tx_size/1000 # integer division rounds down
if kb > 1 and fee < BASE_FEE:
raise FeeError("Rejecting no-fee transaction, larger than 1000 bytes")
if total_in < 0.01 and fee < BASE_FEE:
raise FeeError("Rejecting no-fee, tiny-amount transaction")
# Exercise for the reader: compute transaction priority, and
# warn if this is a very-low-priority transaction
except FeeError as err:
sys.stderr.write((str(err)+"\n"))
sys.exit(1)
def main():
import optparse
parser = optparse.OptionParser(usage="%prog [options]")
parser.add_option("--from", dest="fromaddresses", default=None,
help="addresses to get bitcoins from")
parser.add_option("--to", dest="to", default=None,
help="address to get send bitcoins to")
parser.add_option("--amount", dest="amount", default=None,
help="amount to send")
parser.add_option("--fee", dest="fee", default="0.0",
help="fee to include")
parser.add_option("--datadir", dest="datadir", default=determine_db_dir(),
help="location of bitcoin.conf file with RPC username/password (default: %default)")
parser.add_option("--testnet", dest="testnet", default=False, action="store_true",
help="Use the test network")
parser.add_option("--dry_run", dest="dry_run", default=False, action="store_true",
help="Don't broadcast the transaction, just create and print the transaction data")
(options, args) = parser.parse_args()
check_json_precision()
config = read_bitcoin_config(options.datadir)
if options.testnet: config['testnet'] = True
bitcoind = connect_JSON(config)
if options.amount is None:
address_summary = list_available(bitcoind)
for address,info in address_summary.iteritems():
n_transactions = len(info['outputs'])
if n_transactions > 1:
print("%s %.8f %s (%d transactions)"%(address, info['total'], info['account'], n_transactions))
else:
print("%s %.8f %s"%(address, info['total'], info['account']))
else:
fee = Decimal(options.fee)
amount = Decimal(options.amount)
while unlock_wallet(bitcoind) == False:
pass # Keep asking for passphrase until they get it right
txdata = create_tx(bitcoind, options.fromaddresses.split(","), options.to, amount, fee)
sanity_test_fee(bitcoind, txdata, amount*Decimal("0.01"))
if options.dry_run:
print(txdata)
else:
txid = bitcoind.sendrawtransaction(txdata)
print(txid)
if __name__ == '__main__':
main()

View File

@ -1,7 +0,0 @@
### Test Patches ###
These patches are applied when the automated pull-tester
tests each pull and when master is tested using jenkins.
You can find more information about the tests run at
[http://jenkins.bluematt.me/pull-tester/files/
](http://jenkins.bluematt.me/pull-tester/files/)

View File

@ -1,20 +0,0 @@
commit cfae26916dba311f6f75d444301c1f9362267c3e
Author: Matt Corallo <git@bluematt.me>
Date: Sun Mar 24 20:45:50 2013 -0400
Revert "Checkpoint at first block in 11 March chain fork"
This reverts commit f817c496a1482d05b22c8e539de67f07db1c09d9.
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 62234b9..9b11f0b 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -44,7 +44,6 @@ namespace Checkpoints
(193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
(210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
(216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
- (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
;
static const CCheckpointData data = {
&mapCheckpoints,

View File

@ -1,7 +1,10 @@
#!/bin/bash
# Copyright (c) 2013 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
if [ -d "$1" ]; then
cd "$1"
cd "$1" || exit 1
else
echo "Usage: $0 <datadir>" >&2
echo "Removes obsolete Bitcoin database files" >&2

View File

@ -1,15 +0,0 @@
#!/bin/sh
INPUT=$(</dev/stdin)
VALID=false
IFS=$'\n'
for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
case "$LINE" in "[GNUPG:] VALIDSIG"*)
while read KEY; do
case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac
done < ./contrib/verify-commits/trusted-keys
esac
done
if ! $VALID; then
exit 1
fi
echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null

View File

@ -1,16 +0,0 @@
#!/bin/bash
if ! [[ "$2" =~ [git@]?[www.]?github.com[:|/]bitcoin/bitcoin[.git]? ]]; then
exit 0
fi
while read LINE; do
set -- A $LINE
if [ "$4" != "refs/heads/master" ]; then
continue
fi
if ! ./contrib/verify-commits/verify-commits.sh $3 > /dev/null 2>&1; then
echo "ERROR: A commit is not signed, can't push"
./contrib/verify-commits/verify-commits.sh
exit 1
fi
done < /dev/stdin

View File

@ -1 +0,0 @@
053038e5ba116cb319fb85f3cb3e062cf1b3df15

View File

@ -1,5 +0,0 @@
71A3B16735405025D447E8F274810B012346C9A6
1F4410F6A89268CE3197A84C57896D2FF8F0B657
01CDF4627A3B88AAE4A571C87588242FBE38D3A8
AF8BE07C7049F3A26B239D5325B3083201782B2F
81291FA67D2C379A006A053FEAB5AF94D9E9ABE7

View File

@ -1,51 +0,0 @@
#!/bin/sh
DIR=$(dirname "$0")
echo "Please verify all commits in the following list are not evil:"
git log "$DIR"
VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
HAVE_FAILED=false
IS_SIGNED () {
if [ $1 = $VERIFIED_ROOT ]; then
return 0;
fi
if ! git -c "gpg.program=${DIR}/gpg.sh" verify-commit $1 > /dev/null 2>&1; then
return 1;
fi
local PARENTS=$(git show -s --format=format:%P $1)
for PARENT in $PARENTS; do
if IS_SIGNED $PARENT > /dev/null; then
return 0;
fi
done
if ! "$HAVE_FAILED"; then
echo "No parent of $1 was signed with a trusted key!" > /dev/stderr
echo "Parents are:" > /dev/stderr
for PARENT in $PARENTS; do
git show -s $PARENT > /dev/stderr
done
HAVE_FAILED=true
fi
return 1;
}
if [ x"$1" = "x" ]; then
TEST_COMMIT="HEAD"
else
TEST_COMMIT="$1"
fi
IS_SIGNED "$TEST_COMMIT"
RES=$?
if [ "$RES" = 1 ]; then
if ! "$HAVE_FAILED"; then
echo "$TEST_COMMIT was not signed with a trusted key!"
fi
else
echo "There is a valid path from $TEST_COMMIT to $VERIFIED_ROOT where all commits are signed!"
fi
exit $RES

View File

@ -1,6 +0,0 @@
### Verify Binaries ###
This script attempts to download the signature file `SHA256SUMS.asc` from https://bitcoin.org.
It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file.
The script returns 0 if everything passes the checks. It returns 1 if either the signature check or the hash check doesn't pass. If an error occurs the return value is 2.

View File

@ -1,119 +0,0 @@
#!/bin/bash
### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org
### It first checks if the signature passes, and then downloads the files specified in
### the file, and checks if the hashes of these files match those that are specified
### in the signature file.
### The script returns 0 if everything passes the checks. It returns 1 if either the
### signature check or the hash check doesn't pass. If an error occurs the return value is 2
function clean_up {
for file in $*
do
rm "$file" 2> /dev/null
done
}
WORKINGDIR="/tmp/bitcoin"
TMPFILE="hashes.tmp"
#this URL is used if a version number is not specified as an argument to the script
SIGNATUREFILE="https://bitcoin.org/bin/0.9.2.1/SHA256SUMS.asc"
SIGNATUREFILENAME="SHA256SUMS.asc"
RCSUBDIR="test/"
BASEDIR="https://bitcoin.org/bin/"
VERSIONPREFIX="bitcoin-"
RCVERSIONSTRING="rc"
if [ ! -d "$WORKINGDIR" ]; then
mkdir "$WORKINGDIR"
fi
cd "$WORKINGDIR"
#test if a version number has been passed as an argument
if [ -n "$1" ]; then
#let's also check if the version number includes the prefix 'bitcoin-',
# and add this prefix if it doesn't
if [[ $1 == "$VERSIONPREFIX"* ]]; then
VERSION="$1"
else
VERSION="$VERSIONPREFIX$1"
fi
#now let's see if the version string contains "rc", and strip it off if it does
# and simultaneously add RCSUBDIR to BASEDIR, where we will look for SIGNATUREFILENAME
if [[ $VERSION == *"$RCVERSIONSTRING"* ]]; then
BASEDIR="$BASEDIR${VERSION/%-$RCVERSIONSTRING*}/"
BASEDIR="$BASEDIR$RCSUBDIR"
else
BASEDIR="$BASEDIR$VERSION/"
fi
SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME"
else
BASEDIR="${SIGNATUREFILE%/*}/"
fi
#first we fetch the file containing the signature
WGETOUT=$(wget -N "$BASEDIR$SIGNATUREFILENAME" 2>&1)
#and then see if wget completed successfully
if [ $? -ne 0 ]; then
echo "Error: couldn't fetch signature file. Have you specified the version number in the following format?"
echo "[bitcoin-]<version>-[rc[0-9]] (example: bitcoin-0.9.2-rc1)"
echo "wget output:"
echo "$WGETOUT"|sed 's/^/\t/g'
exit 2
fi
#then we check it
GPGOUT=$(gpg --yes --decrypt --output "$TMPFILE" "$SIGNATUREFILENAME" 2>&1)
#return value 0: good signature
#return value 1: bad signature
#return value 2: gpg error
RET="$?"
if [ $RET -ne 0 ]; then
if [ $RET -eq 1 ]; then
#and notify the user if it's bad
echo "Bad signature."
elif [ $RET -eq 2 ]; then
#or if a gpg error has occurred
echo "gpg error. Do you have Gavin's code signing key installed?"
fi
echo "gpg output:"
echo "$GPGOUT"|sed 's/^/\t/g'
clean_up $SIGNATUREFILENAME $TMPFILE
exit "$RET"
fi
#here we extract the filenames from the signature file
FILES=$(awk '{print $2}' "$TMPFILE")
#and download these one by one
for file in in $FILES
do
wget --quiet -N "$BASEDIR$file"
done
#check hashes
DIFF=$(diff <(sha256sum $FILES) "$TMPFILE")
if [ $? -eq 1 ]; then
echo "Hashes don't match."
echo "Offending files:"
echo "$DIFF"|grep "^<"|awk '{print "\t"$3}'
exit 1
elif [ $? -gt 1 ]; then
echo "Error executing 'diff'"
exit 2
fi
#everything matches! clean up the mess
clean_up $FILES $SIGNATUREFILENAME $TMPFILE
exit 0

View File

@ -4,7 +4,7 @@ SOURCES_PATH ?= $(BASEDIR)/sources
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_WALLET ?=
PRIORITY_DOWNLOAD_PATH ?= https://download.z.cash/depends-sources
FALLBACK_DOWNLOAD_PATH ?= https://download.z.cash/depends-sources
BUILD ?= $(shell ./config.guess)
HOST ?= $(BUILD)
@ -14,8 +14,7 @@ HASH_LENGTH:=11
DOWNLOAD_CONNECT_TIMEOUT:=10
DOWNLOAD_RETRIES:=3
CRATE_REGISTRY:=vendored-sources
LIBRUSTZCASH_OVERRIDE ?=
CRATE_ARCHIVE = $(SOURCES_PATH)/vendored-crates.tar.gz
host:=$(BUILD)
ifneq ($(HOST),)
@ -78,19 +77,18 @@ include packages/packages.mk
wallet_packages_$(NO_WALLET) = $(wallet_packages)
NO_PROTON_$(WITH_PROTON) = 1
proton_packages_$(NO_PROTON_) = $(proton_packages)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(rust_packages) $(proton_packages_) $(wallet_packages_)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(wallet_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
all_packages = $(packages) $(native_packages)
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk cargo-checksum.sh
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils)
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
include funcs.mk
binutils_path=$($($(host_arch)_$(host_os)_native_binutils)_prefixbin)
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
final_build_id+=$(shell echo -n $(final_build_id_long) | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
@ -100,6 +98,12 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
$(AT)echo copying packages: $^
$(AT)echo to: $(@D)
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
$(AT)if test -f "$(CRATE_ARCHIVE)"; \
then echo Extracting pre-vendored crates from $(CRATE_ARCHIVE)...; \
tar xf $(CRATE_ARCHIVE) -C $(@D); \
else echo Vendoring crates...; \
$(@D)/native/bin/cargo vendor --locked --manifest-path $(BASEDIR)/../Cargo.toml $(@D)/$(CRATE_REGISTRY); \
fi
$(AT)touch $@
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
@ -107,17 +111,17 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
-e 's|@AR@|$(binutils_path)$(host_AR)|' \
-e 's|@RANLIB@|$(binutils_path)$(host_RANLIB)|' \
-e 's|@NM@|$(binutils_path)$(host_NM)|' \
-e 's|@STRIP@|$(binutils_path)$(host_STRIP)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@rust_target@|$(call rust_target,rust,$(canonical_host),$(host_os))|' \
-e 's|@rust_target@|$(call rust_target,native_rust,$(canonical_host),$(host_os))|' \
-e 's|@no_wallet@|$(NO_WALLET)|' \
-e 's|@debug@|$(DEBUG)|' \
$< > $@
@ -134,14 +138,18 @@ endef
define check_or_remove_sources
mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \
$(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \
( if test -f $($(package)_all_sources); then echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; fi; \
( test -z "$($(package)_all_sources)" || ( echo $($(package)_all_sources) | xargs -n 1 test ! -f ) || echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; \
rm -f $($(package)_all_sources) $($(1)_fetched))
endef
check-packages:
@$(foreach package,$(all_packages),$(call check_or_remove_cached,$(package));)
@$(foreach package,$(packages),$(call check_or_remove_cached,$(package));)
@$(foreach package,$(rust_crates),$(call check_or_remove_cached,$(package));)
@$(foreach package,$(native_packages),$(call check_or_remove_cached,$(package));)
check-sources:
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
@$(foreach package,$(packages),$(call check_or_remove_sources,$(package));)
@$(foreach package,$(rust_crates),$(call check_or_remove_sources,$(package));)
@$(foreach package,$(native_packages),$(call check_or_remove_sources,$(package));)
$(host_prefix)/share/config.site: check-packages
@ -150,14 +158,25 @@ check-packages: check-sources
install: check-packages $(host_prefix)/share/config.site
crates_download_dir=$(base_download_dir)/crates
download-crates: native_rust
$(AT)echo Vendoring crates...
$(AT)mkdir -p $(SOURCES_PATH)
$(AT)rm -rf $(crates_download_dir)
$(AT)mkdir -p $(crates_download_dir)
$(AT)tar xf $(native_rust_cached) -C $(crates_download_dir)
$(AT)$(crates_download_dir)/native/bin/cargo vendor --locked --manifest-path $(BASEDIR)/../Cargo.toml $(crates_download_dir)/$(CRATE_REGISTRY)
$(AT)cd $(crates_download_dir); find $(CRATE_REGISTRY) | sort | tar --no-recursion -czf $(CRATE_ARCHIVE) -T -
$(AT)rm -rf $(crates_download_dir)
download-one: check-sources $(all_sources)
download-osx:
@$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
@$(MAKE) -s HOST=x86_64-apple-darwin14 download-one
download-linux:
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
@$(MAKE) -s HOST=x86_64-pc-linux-gnu download-one
download-win:
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
download: download-osx download-linux download-win
download: download-crates download-osx download-linux download-win
.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources
.PHONY: install cached download-crates download-one download-osx download-linux download-win download check-packages check-sources

View File

@ -22,8 +22,11 @@ Common `host-platform-triplets` for cross compilation are:
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
- `x86_64-apple-darwin11` for MacOSX
- `arm-linux-gnueabihf` for Linux ARM
- `x86_64-apple-darwin16` for macOS
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
- `riscv32-linux-gnu` for Linux RISC-V 32 bit
- `riscv64-linux-gnu` for Linux RISC-V 64 bit
No other options are needed, the paths are automatically configured.
@ -33,10 +36,9 @@ The following can be set when running make: make FOO=bar
SOURCES_PATH: downloaded sources will be placed here
BASE_CACHE: built packages will be placed here
SDK_PATH: Path where sdk's can be found (used by OSX)
PRIORITY_DOWNLOAD_PATH: Try fetching source files from here before using their own URLs
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
DEBUG: disable some optimizations and enable more runtime checking
LIBRUSTZCASH_OVERRIDE: Path to a local librustzcash repository
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to bitcoin's configure. In this case, `--disable-wallet`.

View File

@ -19,4 +19,5 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool)
darwin_OTOOL:=$(shell xcrun -f otool)
darwin_NM:=$(shell xcrun -f nm)
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
darwin_native_binutils=
darwin_native_toolchain=

View File

@ -1,13 +0,0 @@
echo "{\"files\":{$(
find . -type f | # Get list of file paths
grep -v $1 | # Exclude Makefile hashes
grep -v '[.]stamp_' | # Exclude Makefile stamps
sed 's|^[.]/||' | # Remove leading ./
sort | # Sort (for uniformity)
xargs $2 | # Get SHA256 hashes (assumes standard 'H(A) A' format)
awk -v OFS='":"' '{print $2, $1}' | # 'H(A) A' -> 'A":"H(A)'
sed 's|^|"|' | # 'A":"H(A)' -> '"A":"H(A)'
sed 's|$|"|' | # '"A":"H(A)' -> '"A":"H(A)"'
tr '\n' ',' | # Concatenate lines with commas
sed 's|,$||' # Remove any trailing comma (to fit JSON spec)
)},\"package\":$3}" > .cargo-checksum.json

993
depends/config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,7 @@ export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig
export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS -static-libstdc++ -lc++abi"
CC="@CC@"
CXX="@CXX@"

2923
depends/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@ -19,32 +19,19 @@ define int_get_all_dependencies
$(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
endef
define download_and_check_file
($(build_DOWNLOAD) "$(1)/$(2).temp" $(3) && echo "$(4) $(1)/$(2).temp" > $(1)/.$(2).hash && $(build_SHA256SUM) -c $(1)/.$(2).hash)
endef
define fetch_file
(test -f $$($(1)_source_dir)/$(4) || \
( mkdir -p $$($(1)_download_dir) && echo Fetching $(1)... && \
( $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(PRIORITY_DOWNLOAD_PATH)/$(4)" || \
$(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" ) && \
echo "$(5) $$($(1)_download_dir)/$(4).temp" > $$($(1)_download_dir)/.$(4).hash && \
$(build_SHA256SUM) -c $$($(1)_download_dir)/.$(4).hash && \
( $(call download_and_check_file,$$($(1)_download_dir),$(4),"$(2)/$(3)",$(5)) || \
$(call download_and_check_file,$$($(1)_download_dir),$(4),"$(FALLBACK_DOWNLOAD_PATH)/$(4)",$(5)) ) && \
mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \
rm -rf $$($(1)_download_dir) ))
endef
define generate_crate_checksum
$(BASEDIR)/cargo-checksum.sh "$($(1)_file_name)" "$(build_SHA256SUM)" "\"$($(1)_sha256_hash)\""
endef
define generate_unpackaged_crate_checksum
$(BASEDIR)/cargo-checksum.sh "$($(1)_file_name)" "$(build_SHA256SUM)" "null"
endef
define vendor_crate_source
mkdir -p $($(1)_staging_prefix_dir)/$(CRATE_REGISTRY) && \
cp -r $($(1)_extract_dir) $($(1)_staging_prefix_dir)/$(CRATE_REGISTRY)/$($(1)_crate_versioned_name) && \
cd $($(1)_staging_prefix_dir)/$(CRATE_REGISTRY)/$($(1)_crate_versioned_name) && \
rm -r `basename $($(1)_patch_dir)` .stamp_* .$($(1)_file_name).hash
endef
define int_get_build_recipe_hash
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
@ -52,19 +39,19 @@ endef
define int_get_build_id
$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies)))
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps))
$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
final_build_id_long+=$($(package)_build_id_long)
#override platform specific files and hashes
$(eval $(1)_file_name=$(if $($(1)_exact_file_name),$($(1)_exact_file_name),$(if $($(1)_file_name_$(host_os)),$($(1)_file_name_$(host_os)),$($(1)_file_name))))
$(eval $(1)_sha256_hash=$(if $($(1)_exact_sha256_hash),$($(1)_exact_sha256_hash),$(if $($(1)_sha256_hash_$(host_os)),$($(1)_sha256_hash_$(host_os)),$($(1)_sha256_hash))))
$(eval $(1)_file_name=$(if $($(1)_exact_file_name),$($(1)_exact_file_name),$(if $($(1)_file_name_$(host_arch)_$(host_os)),$($(1)_file_name_$(host_arch)_$(host_os)),$(if $($(1)_file_name_$(host_os)),$($(1)_file_name_$(host_os)),$($(1)_file_name)))))
$(eval $(1)_sha256_hash=$(if $($(1)_exact_sha256_hash),$($(1)_exact_sha256_hash),$(if $($(1)_sha256_hash_$(host_arch)_$(host_os)),$($(1)_sha256_hash_$(host_arch)_$(host_os)),$(if $($(1)_sha256_hash_$(host_os)),$($(1)_sha256_hash_$(host_os)),$($(1)_sha256_hash)))))
$(eval $(1)_download_file=$(if $($(1)_exact_download_file),$($(1)_exact_download_file),$(if $($(1)_download_file_$(host_arch)_$(host_os)),$($(1)_download_file_$(host_arch)_$(host_os)),$(if $($(1)_download_file_$(host_os)),$($(1)_download_file_$(host_os)),$(if $($(1)_download_file),$($(1)_download_file),$($(1)_file_name))))))
#compute package-specific paths
$(1)_build_subdir?=.
$(1)_download_file?=$($(1)_file_name)
$(1)_source_dir:=$(SOURCES_PATH)
$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
@ -148,7 +135,7 @@ $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
ifneq ($($(1)_nm),)
$(1)_autoconf += NM="$$($(1)_nm)"
@ -258,4 +245,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
#special exception: if a toolchain package exists, all non-native packages depend on it
$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))

View File

@ -1,17 +1,44 @@
OSX_MIN_VERSION=10.8
OSX_SDK_VERSION=10.11
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
LD64_VERSION=253.9
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++
OSX_MIN_VERSION=10.12
OSX_SDK_VERSION=10.15.1
XCODE_VERSION=11.3.1
XCODE_BUILD_ID=11C505
LD64_VERSION=530
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
# Flag explanations:
#
# -mlinker-version
#
# Ensures that modern linker features are enabled. See here for more
# details: https://github.com/bitcoin/bitcoin/pull/19407.
#
# -B$(build_prefix)/bin
#
# Explicitly point to our binaries (e.g. cctools) so that they are
# ensured to be found and preferred over other possibilities.
#
# -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1
#
# Forces clang to use the libc++ headers from our SDK and completely
# forget about the libc++ headers from the standard directories
#
# TODO: Once we start requiring a clang version that has the
# -stdlib++-isystem<directory> flag first introduced here:
# https://reviews.llvm.org/D64089, we should use that instead. Read the
# differential summary there for more details.
#
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)
darwin_release_CFLAGS=-O1
darwin_release_CFLAGS=-O3
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
darwin_native_binutils=native_cctools
darwin_native_toolchain=native_cctools

View File

@ -1,12 +1,22 @@
default_host_CC = $(host_toolchain)gcc
default_host_CXX = $(host_toolchain)g++
default_host_AR = $(host_toolchain)ar
default_host_RANLIB = $(host_toolchain)ranlib
default_host_STRIP = $(host_toolchain)strip
# Flag explanations:
#
# -B$(build_prefix)/bin
#
# Explicitly point to our binaries (e.g. cctools) so that they are
# ensured to be found and preferred over other possibilities.
#
default_host_CC = clang -target $(host) -B$(build_prefix)/bin
default_host_CXX = clang++ -target $(host) -B$(build_prefix)/bin -stdlib=libc++
default_host_AR = llvm-ar
default_host_RANLIB = llvm-ranlib
default_host_STRIP = llvm-strip
default_host_LIBTOOL = $(host_toolchain)libtool
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
default_host_OTOOL = $(host_toolchain)otool
default_host_NM = $(host_toolchain)nm
default_host_NM = llvm-nm
$(host_os)_native_binutils?=native_clang
$(host_os)_native_toolchain?=native_clang
define add_host_tool_func
$(host_os)_$1?=$$(default_host_$1)

View File

@ -1,7 +1,7 @@
freebsd_CFLAGS=-pipe
freebsd_CXXFLAGS=$(freebsd_CFLAGS)
freebsd_release_CFLAGS=-O1
freebsd_release_CFLAGS=-O3
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
freebsd_debug_CFLAGS=-O1
@ -9,23 +9,12 @@ freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
freebsd_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
ifeq (86,$(findstring 86,$(build_arch)))
i686_freebsd_CC=gcc -m32
i686_freebsd_CXX=g++ -m32
i686_freebsd_AR=ar
i686_freebsd_RANLIB=ranlib
i686_freebsd_NM=nm
i686_freebsd_STRIP=strip
# Changes below have not been tested. If you try to build on FreeBSD,
# please let us know how it goes.
freebsd_LDFLAGS?=-fuse-ld=lld
x86_64_freebsd_CC=gcc -m64
x86_64_freebsd_CXX=g++ -m64
x86_64_freebsd_AR=ar
x86_64_freebsd_RANLIB=ranlib
x86_64_freebsd_NM=nm
x86_64_freebsd_STRIP=strip
else
i686_freebsd_CC=$(default_host_CC) -m32
i686_freebsd_CXX=$(default_host_CXX) -m32
x86_64_freebsd_CC=$(default_host_CC) -m64
x86_64_freebsd_CXX=$(default_host_CXX) -m64
endif

View File

@ -1,7 +1,7 @@
linux_CFLAGS=-pipe
linux_CXXFLAGS=$(linux_CFLAGS)
linux_release_CFLAGS=-O1
linux_release_CFLAGS=-O3
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
linux_debug_CFLAGS=-O1
@ -9,23 +9,17 @@ linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
ifeq (86,$(findstring 86,$(build_arch)))
i686_linux_CC=gcc -m32
i686_linux_CXX=g++ -m32
i686_linux_AR=ar
i686_linux_RANLIB=ranlib
i686_linux_NM=nm
i686_linux_STRIP=strip
linux_LDFLAGS?=-fuse-ld=lld
x86_64_linux_CC=gcc -m64
x86_64_linux_CXX=g++ -m64
x86_64_linux_AR=ar
x86_64_linux_RANLIB=ranlib
x86_64_linux_NM=nm
x86_64_linux_STRIP=strip
else
i686_linux_CC=$(default_host_CC) -m32
i686_linux_CXX=$(default_host_CXX) -m32
x86_64_linux_CC=$(default_host_CC) -m64
x86_64_linux_CXX=$(default_host_CXX) -m64
# Clang doesn't appear to find these multilib paths by default,
# so help it out if we are cross-compiling.
ifneq ($(canonical_host),$(build))
# CFLAGS is copied to CXXFLAGS after it is fully-evaluated.
linux_CFLAGS += -idirafter /usr/$(host)/include
linux_LDFLAGS += -L/usr/$(host)/lib
endif

View File

@ -1,7 +1,9 @@
mingw32_CFLAGS=-pipe
mingw32_CXXFLAGS=$(mingw32_CFLAGS)
mingw32_CXXFLAGS=$(mingw32_CFLAGS) -isystem $(host_prefix)/include/c++/v1
mingw32_release_CFLAGS=-O1
mingw32_LDFLAGS?=-fuse-ld=lld
mingw32_release_CFLAGS=-O3
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
mingw32_debug_CFLAGS=-O1

View File

@ -5,6 +5,9 @@ The package "mylib" will be used here as an example
General tips:
- mylib_foo is written as $(package)_foo in order to make recipes more similar.
- Secondary dependency packages relative to the Zcash binaries/libraries (i.e.
those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) should
be built statically. See [below](#secondary-dependencies) for more details.
## Identifiers
Each package is required to define at least these variables:
@ -146,3 +149,38 @@ $($(package)_config_opts) will be appended.
Most autotools projects can be properly staged using:
$(MAKE) DESTDIR=$($(package)_staging_dir) install
## Build outputs:
In general, the output of a depends package should not contain any libtool
archives. Instead, the package should output `.pc` (`pkg-config`) files where
possible.
From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives):
> Libtool pulls in all direct and indirect dependencies into the .la files it
> creates. This leads to massive overlinking, which is toxic to the Gentoo
> ecosystem, as it leads to a massive number of unnecessary rebuilds.
## Secondary dependencies:
Secondary dependency packages relative to the Zcash binaries/libraries (i.e.
those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`)
should be built statically. The arguments for statically linking secondary
dependencies are similar to those for primary dependencies: it is preferable
for promptness of security updates; consensus compatibility; ease of
debugging and reproduction of user issues; avoiding unintended breakage
due to incompatible changes; and portability across OS distributions. It also
improves general build reliability as illustrated by the following example:
When linking an executable against a shared library `libprimary` that has its
own shared dependency `libsecondary`, we may need to specify the path to
`libsecondary` on the link command using the `-rpath/-rpath-link` options, it is
not sufficient to just say `libprimary`.
For us, it's much easier to just link a static `libsecondary` into a shared
`libprimary`. Especially because in our case, we are linking against a dummy
`libprimary` anyway that we'll throw away. We don't care if the end-user has a
static or dynamic `libseconday`, that's not our concern. With a static
`libseconday`, when we need to link `libprimary` into our executable, there's no
dependency chain to worry about as `libprimary` has all the symbols.

View File

@ -4,9 +4,14 @@ $(package)_download_path=https://download.oracle.com/berkeley-db
$(package)_file_name=db-$($(package)_version).tar.gz
$(package)_sha256_hash=47612c8991aa9ac2f6be721267c8d3cdccf5ac83105df8e50809daea24e95dc7
$(package)_build_subdir=build_unix
$(package)_patches=winioctl-and-atomic_init_db.patch
ifneq ($(host_os),darwin)
$(package)_dependencies=libcxx
endif
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
@ -14,13 +19,12 @@ ifneq ($(build_os),darwin)
$(package)_config_opts_darwin=--disable-atomicsupport
endif
$(package)_config_opts_aarch64=--disable-atomicsupport
$(package)_cxxflags=-std=c++11
$(package)_cxxflags+=-std=c++17
$(package)_ldflags+=-static-libstdc++ -lc++abi
endef
define $(package)_preprocess_cmds
sed -i.old 's/WinIoCtl.h/winioctl.h/g' src/dbinc/win_db.h && \
sed -i.old 's/__atomic_compare_exchange\\(/__atomic_compare_exchange_db(/' src/dbinc/atomic.h && \
sed -i.old 's/atomic_init/atomic_init_db/' src/dbinc/atomic.h src/mp/mp_region.c src/mp/mp_mvcc.c src/mp/mp_fget.c src/mutex/mut_method.c src/mutex/mut_tas.c
patch -p1 <$($(package)_patch_dir)/winioctl-and-atomic_init_db.patch
endef
define $(package)_config_cmds
@ -32,5 +36,11 @@ define $(package)_build_cmds
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
cd $(BASEDIR)/../zcutil && \
mkdir -p bin && \
mv -f $($(package)_staging_dir)$(host_prefix)/bin/db_* bin
endef

View File

@ -1,9 +1,13 @@
package=boost
$(package)_version=1_70_0
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source
$(package)_version=1_74_0
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.74.0/source
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
$(package)_patches=darwin.diff
$(package)_sha256_hash=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
$(package)_patches=iostreams-106.patch signals2-noise.patch
ifneq ($(host_os),darwin)
$(package)_dependencies=libcxx
endif
define $(package)_set_vars
$(package)_config_opts_release=variant=release
@ -16,18 +20,20 @@ $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win3
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
$(package)_toolset_$(host_os)=gcc
$(package)_toolset_$(host_os)=clang
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
$(package)_cxxflags+=-std=c++17 -fvisibility=hidden
$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
$(package)_ldflags+=-static-libstdc++ -lc++abi
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/darwin.diff
patch -p2 < $($(package)_patch_dir)/iostreams-106.patch && \
patch -p2 < $($(package)_patch_dir)/signals2-noise.patch
endef
define $(package)_config_cmds
@ -42,3 +48,12 @@ endef
define $(package)_stage_cmds
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
endef
# Boost uses the MSVC convention of libboost_foo.lib as the naming pattern when
# compiling for Windows, even though we use MinGW which follows the libfoo.a
# convention. This causes issues with lld, so we rename all .lib files to .a.
ifeq ($(host_os),mingw32)
define $(package)_postprocess_cmds
for f in lib/*.lib; do mv -- "$$$$f" "$$$${f%.lib}.a"; done
endef
endif

View File

@ -1,15 +0,0 @@
package=crate_aes
$(package)_crate_name=aes
$(package)_version=0.3.2
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_aes_soft
$(package)_crate_name=aes-soft
$(package)_version=0.3.3
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_aesni
$(package)_crate_name=aesni
$(package)_version=0.6.0
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_arrayref
$(package)_crate_name=arrayref
$(package)_version=0.3.5
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_arrayvec
$(package)_crate_name=arrayvec
$(package)_version=0.4.11
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_autocfg
$(package)_crate_name=autocfg
$(package)_version=0.1.6
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_bellman
$(package)_crate_name=bellman
$(package)_version=0.6.0
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=2be536193834affcd8a6d362963e66dec8c6bca4d2009f5bac55ec9002776ff2
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_bigint
$(package)_crate_name=bigint
$(package)_version=4.4.1
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=ebecac13b3c745150d7b6c3ea7572d372f09d627c2077e893bf26c5c7f70d282
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_bit_vec
$(package)_crate_name=bit-vec
$(package)_version=0.4.4
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_blake2b_simd
$(package)_crate_name=blake2b_simd
$(package)_version=0.5.8
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=5850aeee1552f495dd0250014cf64b82b7c8879a89d83b33bbdace2cc4f63182
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

View File

@ -1,15 +0,0 @@
package=crate_blake2s_simd
$(package)_crate_name=blake2s_simd
$(package)_version=0.5.8
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=979da0ce13c897d6be19e005ea77ac12b0fea0157aeeee7feb8c49f91386f0ea
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds
$(call generate_crate_checksum,$(package))
endef
define $(package)_stage_cmds
$(call vendor_crate_source,$(package))
endef

Some files were not shown because too many files have changed in this diff Show More