Repository: Gulden/gulden-official Branch: master Commit: 63d424c0b30f Files: 2078 Total size: 30.4 MB Directory structure: gitextract_g53w6fs0/ ├── .gitattributes ├── .github/ │ └── ISSUE_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── .mailmap ├── .travis.yml ├── CONTRIBUTING.md ├── COPYING ├── COPYING_munt ├── COPYING_upstream ├── INSTALL.md ├── Makefile.am ├── README.md ├── autogen.sh ├── changelog.txt ├── configure.ac ├── contrib/ │ ├── Munt-cli.bash-completion │ ├── Munt-daemon.bash-completion │ ├── Munt-tx.bash-completion │ ├── README.md │ ├── devtools/ │ │ ├── security-check.py │ │ ├── split-debug.sh.in │ │ ├── symbol-check.py │ │ └── test-security-check.py │ ├── guix/ │ │ ├── INSTALL.md │ │ ├── README.md │ │ ├── guix-attest │ │ ├── guix-build │ │ ├── guix-clean │ │ ├── guix-codesign │ │ ├── guix-verify │ │ ├── libexec/ │ │ │ ├── build.sh │ │ │ ├── codesign.sh │ │ │ └── prelude.bash │ │ └── manifest.scm │ ├── init/ │ │ ├── README.md │ │ ├── daemon.conf │ │ ├── daemon.init │ │ ├── daemon.openrc │ │ ├── daemon.openrcconf │ │ └── daemon.service │ ├── macdeploy/ │ │ ├── DS_Store │ │ ├── LICENSE │ │ ├── README.md │ │ ├── background.tiff │ │ ├── background@2x.tiff │ │ ├── custom_dsstore.py │ │ ├── detached-sig-apply.sh │ │ ├── detached-sig-create.sh │ │ ├── extract-osx-sdk.sh │ │ └── fancy.plist │ ├── qos/ │ │ ├── README.md │ │ └── tc.sh │ ├── shell/ │ │ ├── git-utils.bash │ │ └── realpath.bash │ ├── testgen/ │ │ ├── README.md │ │ ├── base58.py │ │ └── gen_base58_test_vectors.py │ ├── tidy_datadir.sh │ └── zmq/ │ ├── zmq_sub.py │ └── zmq_sub3.4.py ├── dependabot.yml ├── depends/ │ ├── .gitignore │ ├── README.md │ ├── builders/ │ │ ├── darwin.mk │ │ ├── default.mk │ │ ├── linux.mk │ │ ├── mingw32.mk │ │ └── mingw64.mk │ ├── config.guess │ ├── config.site.in │ ├── config.sub │ ├── description.md │ ├── funcs.mk │ ├── gen_id │ ├── hosts/ │ │ ├── android.mk │ │ ├── darwin.mk │ │ ├── default.mk │ │ ├── ios.mk │ │ ├── linux.mk │ │ ├── mingw32.mk │ │ └── mingw64.mk │ ├── packages/ │ │ ├── bdb.mk │ │ ├── boost.mk │ │ ├── djinni.mk │ │ ├── electron_node_headers.mk │ │ ├── libcryptopp.mk │ │ ├── libcryptoppunity.mk │ │ ├── libevent.mk │ │ ├── miniupnpc.mk │ │ ├── native_biplist.mk │ │ ├── native_cctools.mk │ │ ├── native_cdrkit.mk │ │ ├── native_clang.mk │ │ ├── native_ds_store.mk │ │ ├── native_libdmg-hfsplus.mk │ │ ├── native_libtapi.mk │ │ ├── native_mac_alias.mk │ │ ├── node_addon_api.mk │ │ ├── openssl.mk │ │ ├── packages.mk │ │ ├── protobufunity.mk │ │ ├── qrencode.mk │ │ ├── rapidcheck.mk │ │ ├── zeromq.mk │ │ └── zlib.mk │ ├── packages.md │ ├── patches/ │ │ └── electron_node_headers/ │ │ └── node.def │ └── sdk.guess ├── developer-tools/ │ ├── README.md │ ├── build_docker.sh │ ├── build_node.sh │ ├── djinni_generate_bindings.sh │ ├── docker-build/ │ │ ├── Dockerfile │ │ ├── README.md │ │ └── build.sh │ ├── genbootstrap.sh │ ├── gencheckpoints.sh │ ├── genstaticdiffs.sh │ ├── genstaticfilters.sh │ ├── mobile/ │ │ ├── android/ │ │ │ ├── build_android_core.sh │ │ │ ├── build_targets/ │ │ │ │ ├── aarch64-linux-android-clang │ │ │ │ ├── arm-linux-androideabi-clang │ │ │ │ ├── x86-clang │ │ │ │ └── x86_64-clang │ │ │ ├── fetch_android.sh │ │ │ └── ndk_definitions.conf │ │ ├── ios/ │ │ │ ├── build_ios_core.sh │ │ │ └── build_targets/ │ │ │ ├── aarch64 │ │ │ └── x86_64 │ │ └── thirdparty.licenses.sh │ ├── node/ │ │ └── node.def │ ├── private.conf.example │ └── python/ │ ├── genbootstrap.py │ ├── gencheckpoints.py │ ├── genstaticdiffs.py │ └── genstaticfilters.py ├── doc/ │ ├── .gitignore │ ├── Doxyfile.in │ ├── REST-interface.md │ ├── benchmarking.md │ ├── building.md │ ├── building_windows.md │ ├── developer-notes.md │ ├── developer_guidelines.md │ ├── files.md │ ├── fuzzing.md │ ├── init.md │ ├── reduce-traffic.md │ ├── stack_trace_from_frozen_process.md │ ├── translation_strings_policy.md │ └── zmq.md ├── libscriptconsensus.pc.in ├── mining_documentation/ │ └── historical_list_of_mining_pools.md ├── share/ │ ├── genbuild.sh │ ├── rpcauth/ │ │ ├── README.md │ │ └── rpcauth.py │ ├── rpcuser/ │ │ ├── README.md │ │ └── rpcuser.py │ ├── seeds/ │ │ ├── nodes_main.txt │ │ └── nodes_test.txt │ └── setup.nsi.in ├── src/ │ ├── LRUCache/ │ │ ├── COPYING │ │ └── LRUCache11.hpp │ ├── Makefile.am │ ├── Makefile.bench.include │ ├── Makefile.crc32c.include │ ├── Makefile.leveldb.include │ ├── Makefile.sigmabench.include │ ├── Makefile.test.include │ ├── Makefile.univalue.include │ ├── addrdb.cpp │ ├── addrdb.h │ ├── addrman.cpp │ ├── addrman.h │ ├── alert.cpp │ ├── alert.h │ ├── amount.h │ ├── appname.h │ ├── arith_uint256.cpp │ ├── arith_uint256.h │ ├── attributes.h │ ├── base58.cpp │ ├── base58.h │ ├── bench/ │ │ ├── .gitignore │ │ ├── Examples.cpp │ │ ├── base58.cpp │ │ ├── bench.cpp │ │ ├── bench.h │ │ ├── bench_munt.cpp │ │ ├── bench_sigma.cpp │ │ ├── ccoins_caching.cpp │ │ ├── checkblock.cpp │ │ ├── checkqueue.cpp │ │ ├── coin_selection.cpp │ │ ├── crypto_hash.cpp │ │ ├── data/ │ │ │ └── block413567.raw │ │ ├── lockedpool.cpp │ │ ├── mempool_eviction.cpp │ │ ├── perf.cpp │ │ ├── perf.h │ │ ├── prevector_destructor.cpp │ │ ├── rollingbloom.cpp │ │ └── verify_script.cpp │ ├── blockencodings.cpp │ ├── blockencodings.h │ ├── blockfilter.cpp │ ├── blockfilter.h │ ├── blockstore.cpp │ ├── blockstore.h │ ├── bloom.cpp │ ├── bloom.h │ ├── chain.cpp │ ├── chain.h │ ├── chainparams.cpp │ ├── chainparams.h │ ├── chainparamsbase.cpp │ ├── chainparamsbase.h │ ├── chainparamsseeds.h │ ├── checkpoints.cpp │ ├── checkpoints.h │ ├── checkqueue.h │ ├── cli-main.cpp │ ├── cli-res.rc │ ├── clientversion.cpp │ ├── clientversion.h │ ├── coins.cpp │ ├── coins.h │ ├── compat/ │ │ ├── arch.h │ │ ├── assumptions.h │ │ ├── byteswap.h │ │ ├── cpuid.h │ │ ├── endian.h │ │ ├── glibc_sanity.cpp │ │ ├── glibcxx_sanity.cpp │ │ ├── sanity.h │ │ ├── sse.h │ │ ├── sse2neon.h │ │ ├── strnlen.cpp │ │ └── sys.h │ ├── compat.h │ ├── compressor.cpp │ ├── compressor.h │ ├── config/ │ │ └── .empty │ ├── consensus/ │ │ ├── consensus.h │ │ ├── merkle.cpp │ │ ├── merkle.h │ │ ├── params.h │ │ ├── tx_verify.cpp │ │ ├── tx_verify.h │ │ └── validation.h │ ├── controllers/ │ │ ├── rpccontroller.cpp │ │ └── rpccontroller.h │ ├── core_io.h │ ├── core_memusage.h │ ├── core_read.cpp │ ├── core_write.cpp │ ├── crc32c/ │ │ ├── .appveyor.yml │ │ ├── .clang-format │ │ ├── .clang_complete │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── .travis.yml │ │ ├── .ycm_extra_conf.py │ │ ├── AUTHORS │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── Crc32cConfig.cmake.in │ │ ├── LICENSE │ │ ├── README.md │ │ ├── include/ │ │ │ └── crc32c/ │ │ │ └── crc32c.h │ │ └── src/ │ │ ├── crc32c.cc │ │ ├── crc32c_arm64.cc │ │ ├── crc32c_arm64.h │ │ ├── crc32c_arm64_check.h │ │ ├── crc32c_arm64_unittest.cc │ │ ├── crc32c_benchmark.cc │ │ ├── crc32c_capi_unittest.c │ │ ├── crc32c_config.h.in │ │ ├── crc32c_extend_unittests.h │ │ ├── crc32c_internal.h │ │ ├── crc32c_portable.cc │ │ ├── crc32c_portable_unittest.cc │ │ ├── crc32c_prefetch.h │ │ ├── crc32c_prefetch_unittest.cc │ │ ├── crc32c_read_le.h │ │ ├── crc32c_read_le_unittest.cc │ │ ├── crc32c_round_up.h │ │ ├── crc32c_round_up_unittest.cc │ │ ├── crc32c_sse42.cc │ │ ├── crc32c_sse42.h │ │ ├── crc32c_sse42_check.h │ │ ├── crc32c_sse42_unittest.cc │ │ ├── crc32c_test_main.cc │ │ └── crc32c_unittest.cc │ ├── crypto/ │ │ ├── chacha20.cpp │ │ ├── chacha20.h │ │ ├── common.h │ │ ├── hash/ │ │ │ ├── city.cpp │ │ │ ├── city.h │ │ │ ├── cityconfig.h │ │ │ ├── hash.h │ │ │ ├── scrypt-sse2.cpp │ │ │ ├── scrypt.cpp │ │ │ ├── scrypt.h │ │ │ └── sigma/ │ │ │ ├── README.md │ │ │ ├── argon_echo/ │ │ │ │ ├── argon2.cpp │ │ │ │ ├── argon_echo.h │ │ │ │ ├── blake2/ │ │ │ │ │ ├── blake2-impl.h │ │ │ │ │ ├── blake2.h │ │ │ │ │ ├── blake2b.cpp │ │ │ │ │ ├── blamka-round-opt_avx2.h │ │ │ │ │ ├── blamka-round-opt_avx512f.h │ │ │ │ │ ├── blamka-round-opt_sse2.h │ │ │ │ │ ├── blamka-round-opt_sse3.h │ │ │ │ │ └── blamka-round-ref.h │ │ │ │ ├── core.cpp │ │ │ │ ├── core.h │ │ │ │ ├── opt/ │ │ │ │ │ ├── core_opt_arm_cortex_a53.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a53.h │ │ │ │ │ ├── core_opt_arm_cortex_a53_aes.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a53_aes.h │ │ │ │ │ ├── core_opt_arm_cortex_a57.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a57.h │ │ │ │ │ ├── core_opt_arm_cortex_a57_aes.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a57_aes.h │ │ │ │ │ ├── core_opt_arm_cortex_a72.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a72.h │ │ │ │ │ ├── core_opt_arm_cortex_a72_aes.cpp │ │ │ │ │ ├── core_opt_arm_cortex_a72_aes.h │ │ │ │ │ ├── core_opt_arm_thunderx_aes.cpp │ │ │ │ │ ├── core_opt_arm_thunderx_aes.h │ │ │ │ │ ├── core_opt_avx.cpp │ │ │ │ │ ├── core_opt_avx.h │ │ │ │ │ ├── core_opt_avx2.cpp │ │ │ │ │ ├── core_opt_avx2.h │ │ │ │ │ ├── core_opt_avx2_aes.cpp │ │ │ │ │ ├── core_opt_avx2_aes.h │ │ │ │ │ ├── core_opt_avx512f.cpp │ │ │ │ │ ├── core_opt_avx512f.h │ │ │ │ │ ├── core_opt_avx512f_aes.cpp │ │ │ │ │ ├── core_opt_avx512f_aes.h │ │ │ │ │ ├── core_opt_avx_aes.cpp │ │ │ │ │ ├── core_opt_avx_aes.h │ │ │ │ │ ├── core_opt_hybrid.cpp │ │ │ │ │ ├── core_opt_hybrid.h │ │ │ │ │ ├── core_opt_sse2.cpp │ │ │ │ │ ├── core_opt_sse2.h │ │ │ │ │ ├── core_opt_sse2_aes.cpp │ │ │ │ │ ├── core_opt_sse2_aes.h │ │ │ │ │ ├── core_opt_sse3.cpp │ │ │ │ │ ├── core_opt_sse3.h │ │ │ │ │ ├── core_opt_sse3_aes.cpp │ │ │ │ │ ├── core_opt_sse3_aes.h │ │ │ │ │ ├── core_opt_sse4.cpp │ │ │ │ │ ├── core_opt_sse4.h │ │ │ │ │ ├── core_opt_sse4_aes.cpp │ │ │ │ │ └── core_opt_sse4_aes.h │ │ │ │ └── ref.cpp │ │ │ ├── echo256/ │ │ │ │ ├── COPYING │ │ │ │ ├── echo256_opt.cpp │ │ │ │ ├── echo256_opt.h │ │ │ │ ├── opt/ │ │ │ │ │ ├── echo256_opt_arm_cortex_a53.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a53.h │ │ │ │ │ ├── echo256_opt_arm_cortex_a53_aes.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a53_aes.h │ │ │ │ │ ├── echo256_opt_arm_cortex_a57.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a57.h │ │ │ │ │ ├── echo256_opt_arm_cortex_a57_aes.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a57_aes.h │ │ │ │ │ ├── echo256_opt_arm_cortex_a72.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a72.h │ │ │ │ │ ├── echo256_opt_arm_cortex_a72_aes.cpp │ │ │ │ │ ├── echo256_opt_arm_cortex_a72_aes.h │ │ │ │ │ ├── echo256_opt_arm_thunderx_aes.cpp │ │ │ │ │ ├── echo256_opt_arm_thunderx_aes.h │ │ │ │ │ ├── echo256_opt_avx.cpp │ │ │ │ │ ├── echo256_opt_avx.h │ │ │ │ │ ├── echo256_opt_avx2.cpp │ │ │ │ │ ├── echo256_opt_avx2.h │ │ │ │ │ ├── echo256_opt_avx2_aes.cpp │ │ │ │ │ ├── echo256_opt_avx2_aes.h │ │ │ │ │ ├── echo256_opt_avx512f.cpp │ │ │ │ │ ├── echo256_opt_avx512f.h │ │ │ │ │ ├── echo256_opt_avx512f_aes.cpp │ │ │ │ │ ├── echo256_opt_avx512f_aes.h │ │ │ │ │ ├── echo256_opt_avx_aes.cpp │ │ │ │ │ ├── echo256_opt_avx_aes.h │ │ │ │ │ ├── echo256_opt_sse3.cpp │ │ │ │ │ ├── echo256_opt_sse3.h │ │ │ │ │ ├── echo256_opt_sse3_aes.cpp │ │ │ │ │ ├── echo256_opt_sse3_aes.h │ │ │ │ │ ├── echo256_opt_sse4.cpp │ │ │ │ │ ├── echo256_opt_sse4.h │ │ │ │ │ ├── echo256_opt_sse4_aes.cpp │ │ │ │ │ └── echo256_opt_sse4_aes.h │ │ │ │ └── sphlib/ │ │ │ │ ├── aes_helper.c │ │ │ │ ├── echo.cpp │ │ │ │ ├── sph_echo.h │ │ │ │ └── sph_types.h │ │ │ ├── shavite3_256/ │ │ │ │ ├── COPYING │ │ │ │ ├── opt/ │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a53.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a53.h │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a53_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a53_aes.h │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a57.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a57.h │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a57_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a57_aes.h │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a72.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a72.h │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a72_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_cortex_a72_aes.h │ │ │ │ │ ├── shavite3_256_opt_arm_thunderx_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_arm_thunderx_aes.h │ │ │ │ │ ├── shavite3_256_opt_avx.cpp │ │ │ │ │ ├── shavite3_256_opt_avx.h │ │ │ │ │ ├── shavite3_256_opt_avx2.cpp │ │ │ │ │ ├── shavite3_256_opt_avx2.h │ │ │ │ │ ├── shavite3_256_opt_avx2_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_avx2_aes.h │ │ │ │ │ ├── shavite3_256_opt_avx512f.cpp │ │ │ │ │ ├── shavite3_256_opt_avx512f.h │ │ │ │ │ ├── shavite3_256_opt_avx512f_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_avx512f_aes.h │ │ │ │ │ ├── shavite3_256_opt_avx_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_avx_aes.h │ │ │ │ │ ├── shavite3_256_opt_sse3.cpp │ │ │ │ │ ├── shavite3_256_opt_sse3.h │ │ │ │ │ ├── shavite3_256_opt_sse3_aes.cpp │ │ │ │ │ ├── shavite3_256_opt_sse3_aes.h │ │ │ │ │ ├── shavite3_256_opt_sse4.cpp │ │ │ │ │ ├── shavite3_256_opt_sse4.h │ │ │ │ │ ├── shavite3_256_opt_sse4_aes.cpp │ │ │ │ │ └── shavite3_256_opt_sse4_aes.h │ │ │ │ ├── ref/ │ │ │ │ │ ├── AESround.h │ │ │ │ │ ├── portable.h │ │ │ │ │ ├── shavite3_256_ref_compress.h │ │ │ │ │ ├── shavite3_ref.cpp │ │ │ │ │ └── shavite3_ref.h │ │ │ │ ├── shavite3_256_aesni.h │ │ │ │ ├── shavite3_256_opt.cpp │ │ │ │ └── shavite3_256_opt.h │ │ │ ├── sigma.cpp │ │ │ └── sigma.h │ │ ├── hmac_sha256.cpp │ │ ├── hmac_sha256.h │ │ ├── hmac_sha512.cpp │ │ ├── hmac_sha512.h │ │ ├── ripemd160.cpp │ │ ├── ripemd160.h │ │ ├── scrypt/ │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── crypto_scrypt.cpp │ │ │ ├── crypto_scrypt.h │ │ │ ├── crypto_scrypt_smix.cpp │ │ │ ├── crypto_scrypt_smix.h │ │ │ ├── crypto_scrypt_smix_sse2.cpp │ │ │ ├── crypto_scrypt_smix_sse2.h │ │ │ ├── sha256_scrypt.cpp │ │ │ └── sha256_scrypt.h │ │ ├── sha1.cpp │ │ ├── sha1.h │ │ ├── sha256.cpp │ │ ├── sha256.h │ │ ├── sha256_arm_shani.cpp │ │ ├── sha256_sse4.cpp │ │ ├── sha256_x86_shani.cpp │ │ ├── sha512.cpp │ │ └── sha512.h │ ├── cuckoocache.h │ ├── daemon-main.cpp │ ├── daemon-res.rc │ ├── data/ │ │ ├── chainparams_mainnet_static_checkpoint_data.cpp │ │ ├── core-packages.licenses │ │ ├── static_diff_data.cpp │ │ ├── staticfiltercp │ │ └── staticfiltercptestnet │ ├── dbwrapper.cpp │ ├── dbwrapper.h │ ├── frontend/ │ │ ├── android/ │ │ │ └── unity_wallet/ │ │ │ ├── .gitignore │ │ │ ├── app/ │ │ │ │ ├── build.gradle │ │ │ │ ├── proguard-rules.pro │ │ │ │ └── src/ │ │ │ │ ├── androidTest/ │ │ │ │ │ └── java/ │ │ │ │ │ └── unity_wallet/ │ │ │ │ │ └── ExampleInstrumentedTest.kt │ │ │ │ ├── main/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── assets/ │ │ │ │ │ │ ├── font_awesome_free.license.txt │ │ │ │ │ │ ├── font_awesome_pro.license.txt │ │ │ │ │ │ └── glyphicons_license.txt │ │ │ │ │ ├── java/ │ │ │ │ │ │ ├── barcodereader/ │ │ │ │ │ │ │ ├── BarcodeCaptureActivity.kt │ │ │ │ │ │ │ ├── BarcodeTracker.kt │ │ │ │ │ │ │ ├── CameraSource.kt │ │ │ │ │ │ │ └── CameraSourcePreview.kt │ │ │ │ │ │ └── unity_wallet/ │ │ │ │ │ │ ├── ActivityManager.kt │ │ │ │ │ │ ├── AppContext.kt │ │ │ │ │ │ ├── Authentication.kt │ │ │ │ │ │ ├── BackgroundSync.kt │ │ │ │ │ │ ├── Common.kt │ │ │ │ │ │ ├── Config.kt │ │ │ │ │ │ ├── Constants.kt │ │ │ │ │ │ ├── Currency.kt │ │ │ │ │ │ ├── LicenseActivity.kt │ │ │ │ │ │ ├── SendCoinsFragment.kt │ │ │ │ │ │ ├── TransactionInfoActivity.kt │ │ │ │ │ │ ├── URIHandlerActivity.kt │ │ │ │ │ │ ├── UnityCore.kt │ │ │ │ │ │ ├── UpgradeActivity.kt │ │ │ │ │ │ ├── WalletActivity.kt │ │ │ │ │ │ ├── WelcomeActivity.kt │ │ │ │ │ │ ├── jniunifiedbackend/ │ │ │ │ │ │ │ ├── AccountLinkRecord.java │ │ │ │ │ │ │ ├── AccountRecord.java │ │ │ │ │ │ │ ├── AddressRecord.java │ │ │ │ │ │ │ ├── BalanceRecord.java │ │ │ │ │ │ │ ├── BannedPeerRecord.java │ │ │ │ │ │ │ ├── BlockInfoRecord.java │ │ │ │ │ │ │ ├── IAccountsController.java │ │ │ │ │ │ │ ├── IAccountsListener.java │ │ │ │ │ │ │ ├── IGenerationController.java │ │ │ │ │ │ │ ├── IGenerationListener.java │ │ │ │ │ │ │ ├── ILibraryController.java │ │ │ │ │ │ │ ├── ILibraryListener.java │ │ │ │ │ │ │ ├── IP2pNetworkController.java │ │ │ │ │ │ │ ├── IP2pNetworkListener.java │ │ │ │ │ │ │ ├── IRpcController.java │ │ │ │ │ │ │ ├── IRpcListener.java │ │ │ │ │ │ │ ├── IWalletController.java │ │ │ │ │ │ │ ├── IWalletListener.java │ │ │ │ │ │ │ ├── IWitnessController.java │ │ │ │ │ │ │ ├── InputRecord.java │ │ │ │ │ │ │ ├── LegacyWalletResult.java │ │ │ │ │ │ │ ├── MnemonicRecord.java │ │ │ │ │ │ │ ├── MonitorListener.java │ │ │ │ │ │ │ ├── MonitorRecord.java │ │ │ │ │ │ │ ├── MutationRecord.java │ │ │ │ │ │ │ ├── OutputRecord.java │ │ │ │ │ │ │ ├── PaymentResultStatus.java │ │ │ │ │ │ │ ├── PeerRecord.java │ │ │ │ │ │ │ ├── QrCodeRecord.java │ │ │ │ │ │ │ ├── ResultRecord.java │ │ │ │ │ │ │ ├── TransactionRecord.java │ │ │ │ │ │ │ ├── TransactionStatus.java │ │ │ │ │ │ │ ├── UriRecipient.java │ │ │ │ │ │ │ ├── UriRecord.java │ │ │ │ │ │ │ ├── WalletLockStatus.java │ │ │ │ │ │ │ ├── WitnessAccountStatisticsRecord.java │ │ │ │ │ │ │ ├── WitnessEstimateInfoRecord.java │ │ │ │ │ │ │ └── WitnessFundingResultRecord.java │ │ │ │ │ │ ├── main_activity_fragments/ │ │ │ │ │ │ │ ├── LocalCurrencyFragment.kt │ │ │ │ │ │ │ ├── MutationFragment.kt │ │ │ │ │ │ │ ├── ReceiveFragment.kt │ │ │ │ │ │ │ ├── SendFragment.kt │ │ │ │ │ │ │ ├── SettingsFragment.kt │ │ │ │ │ │ │ └── WalletSettingsFragment.kt │ │ │ │ │ │ ├── ui/ │ │ │ │ │ │ │ ├── AddressBookAdapter.kt │ │ │ │ │ │ │ ├── DisplayHelpers.kt │ │ │ │ │ │ │ ├── EnterRecoveryPhraseActivity.kt │ │ │ │ │ │ │ ├── LocalCurrenciesAdapter.kt │ │ │ │ │ │ │ ├── MutationAdapter.kt │ │ │ │ │ │ │ ├── ShowRecoveryPhraseActivity.kt │ │ │ │ │ │ │ ├── monitor/ │ │ │ │ │ │ │ │ ├── BlockListAdapter.kt │ │ │ │ │ │ │ │ ├── BlockListFragment.kt │ │ │ │ │ │ │ │ ├── BlockListViewModel.kt │ │ │ │ │ │ │ │ ├── NetworkMonitorActivity.kt │ │ │ │ │ │ │ │ ├── PeerListAdapter.kt │ │ │ │ │ │ │ │ ├── PeerListFragment.kt │ │ │ │ │ │ │ │ ├── PeerListViewModel.kt │ │ │ │ │ │ │ │ └── ProcessingFragment.kt │ │ │ │ │ │ │ └── widgets/ │ │ │ │ │ │ │ ├── ActionMultiAutoCompleteTextView.kt │ │ │ │ │ │ │ ├── AuthenticatedRecoveryView.kt │ │ │ │ │ │ │ ├── HideBalanceView.kt │ │ │ │ │ │ │ ├── LockView.kt │ │ │ │ │ │ │ └── UnityBuildInfoView.kt │ │ │ │ │ │ └── util/ │ │ │ │ │ │ ├── ActivityHelpers.kt │ │ │ │ │ │ ├── AppBaseActivity.kt │ │ │ │ │ │ ├── AppBaseFragment.kt │ │ │ │ │ │ ├── Button.kt │ │ │ │ │ │ ├── CoroutineHelpers.kt │ │ │ │ │ │ ├── DeviceInfo.kt │ │ │ │ │ │ ├── SwipeToDeleteCallback.kt │ │ │ │ │ │ └── ViewPagerTabs.java │ │ │ │ │ └── res/ │ │ │ │ │ ├── anim/ │ │ │ │ │ │ └── shake.xml │ │ │ │ │ ├── color/ │ │ │ │ │ │ └── bottom_nav_color_selector.xml │ │ │ │ │ ├── drawable/ │ │ │ │ │ │ ├── ic_fontawesome_arrow_up_right_from_square.xml │ │ │ │ │ │ ├── ic_fontawesome_arrow_up_right_from_square_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_arrow_up_right_from_square_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_bolt_lightning.xml │ │ │ │ │ │ ├── ic_fontawesome_bolt_lightning_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_bolt_lightning_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_chart_network.xml │ │ │ │ │ │ ├── ic_fontawesome_chart_network_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_chart_network_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_down.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_down_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_down_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_up.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_up_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_circle_arrow_up_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_copy.xml │ │ │ │ │ │ ├── ic_fontawesome_copy_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_copy_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_cube.xml │ │ │ │ │ │ ├── ic_fontawesome_cube_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_cube_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_gear.xml │ │ │ │ │ │ ├── ic_fontawesome_gear_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_gear_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_lock.xml │ │ │ │ │ │ ├── ic_fontawesome_lock_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_lock_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_share_nodes.xml │ │ │ │ │ │ ├── ic_fontawesome_share_nodes_light.xml │ │ │ │ │ │ ├── ic_fontawesome_share_nodes_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_square_list.xml │ │ │ │ │ │ ├── ic_fontawesome_square_list_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_square_list_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_square_x.xml │ │ │ │ │ │ ├── ic_fontawesome_square_x_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_square_x_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_trash.xml │ │ │ │ │ │ ├── ic_fontawesome_trash_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_trash_solid.xml │ │ │ │ │ │ ├── ic_fontawesome_wave_pulse.xml │ │ │ │ │ │ ├── ic_fontawesome_wave_pulse_regular.xml │ │ │ │ │ │ ├── ic_fontawesome_wave_pulse_solid.xml │ │ │ │ │ │ ├── ic_launcher_foreground.xml │ │ │ │ │ │ ├── ic_logo.xml │ │ │ │ │ │ ├── ic_logo_white.xml │ │ │ │ │ │ ├── ic_scan_target.xml │ │ │ │ │ │ ├── shape_square_button.xml │ │ │ │ │ │ ├── shape_square_button_disabled.xml │ │ │ │ │ │ ├── shape_square_button_enabled.xml │ │ │ │ │ │ └── shape_square_button_with_border.xml │ │ │ │ │ ├── drawable-v24/ │ │ │ │ │ │ └── shape_square_button.xml │ │ │ │ │ ├── layout/ │ │ │ │ │ │ ├── access_code_entry.xml │ │ │ │ │ │ ├── access_code_recovery.xml │ │ │ │ │ │ ├── activity_enter_recovery_phrase.xml │ │ │ │ │ │ ├── activity_license.xml │ │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ │ ├── activity_network_monitor.xml │ │ │ │ │ │ ├── activity_show_recovery_phrase.xml │ │ │ │ │ │ ├── activity_transaction_info.xml │ │ │ │ │ │ ├── activity_upgrade.xml │ │ │ │ │ │ ├── activity_welcome.xml │ │ │ │ │ │ ├── add_address_entry.xml │ │ │ │ │ │ ├── address_book_list_item.xml │ │ │ │ │ │ ├── barcode_capture.xml │ │ │ │ │ │ ├── block_list_fragment.xml │ │ │ │ │ │ ├── block_row.xml │ │ │ │ │ │ ├── content_transaction_info.xml │ │ │ │ │ │ ├── fragment_local_currencies.xml │ │ │ │ │ │ ├── fragment_mutation.xml │ │ │ │ │ │ ├── fragment_receive.xml │ │ │ │ │ │ ├── fragment_send.xml │ │ │ │ │ │ ├── fragment_send_coins.xml │ │ │ │ │ │ ├── local_currency_list_item.xml │ │ │ │ │ │ ├── mutation_list_item.xml │ │ │ │ │ │ ├── mutation_list_item_with_header.xml │ │ │ │ │ │ ├── numeric_keypad.xml │ │ │ │ │ │ ├── peer_list_fragment.xml │ │ │ │ │ │ ├── peer_list_row.xml │ │ │ │ │ │ ├── pref_about_app.xml │ │ │ │ │ │ ├── pref_view_recovery.xml │ │ │ │ │ │ ├── preference_fragment_layout.xml │ │ │ │ │ │ ├── processing_fragment.xml │ │ │ │ │ │ ├── text_input_address_label.xml │ │ │ │ │ │ ├── transaction_info_item.xml │ │ │ │ │ │ └── upgrade_password.xml │ │ │ │ │ ├── layout-land/ │ │ │ │ │ │ └── barcode_capture.xml │ │ │ │ │ ├── menu/ │ │ │ │ │ │ ├── blocks_context.xml │ │ │ │ │ │ ├── navigation.xml │ │ │ │ │ │ ├── network_monitor_navigation.xml │ │ │ │ │ │ └── share_menu.xml │ │ │ │ │ ├── mipmap-anydpi-v26/ │ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ │ ├── raw/ │ │ │ │ │ │ └── license.txt │ │ │ │ │ ├── values/ │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ ├── dimens.xml │ │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ ├── styles.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-ca/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-de/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-en-rAU/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-en-rCA/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-en-rGB/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-en-rUS/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-en-rZA/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-es/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-fi/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-fr/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-it/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-ja/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-ko/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-nl/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-no/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-pl/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-pt/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-pt-rBR/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-ru/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-v23/ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── values-vi/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-zh-rCN/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ ├── values-zh-rTW/ │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── values.xml │ │ │ │ │ └── xml/ │ │ │ │ │ ├── fragment_settings.xml │ │ │ │ │ └── fragment_wallet_settings.xml │ │ │ │ └── test/ │ │ │ │ └── java/ │ │ │ │ └── unity_wallet/ │ │ │ │ └── ExampleUnitTest.kt │ │ │ ├── build.gradle │ │ │ ├── gradle/ │ │ │ │ └── wrapper/ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ │ ├── gradle.properties │ │ │ ├── gradlew │ │ │ ├── gradlew.bat │ │ │ └── settings.gradle │ │ ├── electron_sample/ │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ ├── renderer.js │ │ │ └── run.sh │ │ ├── electron_vue/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── babel.config.js │ │ │ ├── holdinAPI.js.in │ │ │ ├── libunity/ │ │ │ │ ├── copy.js │ │ │ │ └── generate.js │ │ │ ├── notarize.js │ │ │ ├── package.json │ │ │ ├── public/ │ │ │ │ └── index.html │ │ │ ├── setup.js │ │ │ ├── sign.js │ │ │ ├── src/ │ │ │ │ ├── App.vue │ │ │ │ ├── AppStatus.js │ │ │ │ ├── AppWallet.vue │ │ │ │ ├── EventBus.js │ │ │ │ ├── background.js │ │ │ │ ├── components/ │ │ │ │ │ ├── AccountHeader.vue │ │ │ │ │ ├── AccountTooltip.vue │ │ │ │ │ ├── ActivityIndicator.vue │ │ │ │ │ ├── AppLoader.vue │ │ │ │ │ ├── ClipboardField.vue │ │ │ │ │ ├── ConfirmDialog.vue │ │ │ │ │ ├── CurrencyInput.vue │ │ │ │ │ ├── ModalDialog.vue │ │ │ │ │ ├── PhraseInput.vue │ │ │ │ │ ├── SelectList.vue │ │ │ │ │ ├── TransactionDetailsDialog.vue │ │ │ │ │ ├── UnlockWalletDialog.vue │ │ │ │ │ ├── index.js │ │ │ │ │ └── layout/ │ │ │ │ │ ├── AppButtonSection.vue │ │ │ │ │ ├── AppFormField.vue │ │ │ │ │ ├── AppSection.vue │ │ │ │ │ ├── ContentWrapper.vue │ │ │ │ │ ├── FooterButton.vue │ │ │ │ │ └── MainHeader.vue │ │ │ │ ├── css/ │ │ │ │ │ ├── app.less │ │ │ │ │ ├── app_styles.less │ │ │ │ │ ├── css-reset.css │ │ │ │ │ ├── fonts.less │ │ │ │ │ └── variables.less │ │ │ │ ├── i18n.js │ │ │ │ ├── layouts/ │ │ │ │ │ ├── AccountsSection.vue │ │ │ │ │ ├── SetupLayout.vue │ │ │ │ │ └── WalletLayout.vue │ │ │ │ ├── locales/ │ │ │ │ │ ├── en.json │ │ │ │ │ └── nl.json │ │ │ │ ├── main.js │ │ │ │ ├── router/ │ │ │ │ │ └── index.js │ │ │ │ ├── store/ │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules/ │ │ │ │ │ │ ├── app.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── mining.js │ │ │ │ │ │ └── wallet.js │ │ │ │ │ └── syncState.js │ │ │ │ ├── unity/ │ │ │ │ │ ├── Controllers.js │ │ │ │ │ └── LibUnity.js │ │ │ │ ├── util.js │ │ │ │ ├── views/ │ │ │ │ │ ├── AboutDialog/ │ │ │ │ │ │ └── index.vue │ │ │ │ │ ├── Account/ │ │ │ │ │ │ ├── AccountSettings.vue │ │ │ │ │ │ ├── MiningAccount/ │ │ │ │ │ │ │ ├── Send.vue │ │ │ │ │ │ │ ├── SetupMining.vue │ │ │ │ │ │ │ └── index.vue │ │ │ │ │ │ ├── SavingAccount/ │ │ │ │ │ │ │ ├── AddSavingAccount.vue │ │ │ │ │ │ │ ├── LinkSavingAccount.vue │ │ │ │ │ │ │ ├── OptimiseAccount.vue │ │ │ │ │ │ │ ├── RenewAccount.vue │ │ │ │ │ │ │ └── index.vue │ │ │ │ │ │ ├── SpendingAccount/ │ │ │ │ │ │ │ ├── AddSpendingAccount.vue │ │ │ │ │ │ │ ├── ConfirmTransactionDialog.vue │ │ │ │ │ │ │ ├── Receive.vue │ │ │ │ │ │ │ ├── Send.vue │ │ │ │ │ │ │ ├── TransactionDetails.vue │ │ │ │ │ │ │ ├── Transactions.vue │ │ │ │ │ │ │ └── index.vue │ │ │ │ │ │ └── index.vue │ │ │ │ │ ├── DebugDialog/ │ │ │ │ │ │ ├── DebugConsole.vue │ │ │ │ │ │ ├── InformationPage.vue │ │ │ │ │ │ ├── PeerDetailsDialog.vue │ │ │ │ │ │ ├── PeersPage.vue │ │ │ │ │ │ └── index.vue │ │ │ │ │ ├── Settings/ │ │ │ │ │ │ ├── ChangePassword.vue │ │ │ │ │ │ ├── SettingsList.vue │ │ │ │ │ │ ├── ViewRecoveryPhrase.vue │ │ │ │ │ │ └── index.vue │ │ │ │ │ └── Setup.vue │ │ │ │ └── walletPath.js │ │ │ ├── ui-config.json │ │ │ └── vue.config.js │ │ └── lite/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── holdinAPI.js.in │ │ ├── libunity/ │ │ │ ├── copy.js │ │ │ └── generate.js │ │ ├── notarize.js │ │ ├── package.json │ │ ├── public/ │ │ │ └── index.html │ │ ├── setup.js │ │ ├── sign.js │ │ ├── src/ │ │ │ ├── App.vue │ │ │ ├── AppStatus.js │ │ │ ├── AppWallet.vue │ │ │ ├── EventBus.js │ │ │ ├── background.js │ │ │ ├── components/ │ │ │ │ ├── AccountHeader.vue │ │ │ │ ├── AccountTooltip.vue │ │ │ │ ├── ActivityIndicator.vue │ │ │ │ ├── AppLoader.vue │ │ │ │ ├── ClipboardField.vue │ │ │ │ ├── ConfirmDialog.vue │ │ │ │ ├── CurrencyInput.vue │ │ │ │ ├── ModalDialog.vue │ │ │ │ ├── PhraseInput.vue │ │ │ │ ├── SelectList.vue │ │ │ │ ├── TransactionDetailsDialog.vue │ │ │ │ ├── UnlockWalletDialog.vue │ │ │ │ ├── WalletPasswordDialog.vue │ │ │ │ ├── index.js │ │ │ │ └── layout/ │ │ │ │ ├── AppButtonSection.vue │ │ │ │ ├── AppFormField.vue │ │ │ │ ├── AppSection.vue │ │ │ │ ├── ContentWrapper.vue │ │ │ │ ├── FooterButton.vue │ │ │ │ └── MainHeader.vue │ │ │ ├── css/ │ │ │ │ ├── app.less │ │ │ │ ├── app_styles.less │ │ │ │ ├── css-reset.css │ │ │ │ ├── fonts.less │ │ │ │ └── variables.less │ │ │ ├── i18n.js │ │ │ ├── layouts/ │ │ │ │ ├── AccountsSection.vue │ │ │ │ ├── SetupLayout.vue │ │ │ │ └── WalletLayout.vue │ │ │ ├── locales/ │ │ │ │ ├── en.json │ │ │ │ └── nl.json │ │ │ ├── main.js │ │ │ ├── router/ │ │ │ │ └── index.js │ │ │ ├── store/ │ │ │ │ ├── index.js │ │ │ │ ├── modules/ │ │ │ │ │ ├── app.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── mining.js │ │ │ │ │ └── wallet.js │ │ │ │ └── syncState.js │ │ │ ├── unity/ │ │ │ │ ├── Controllers.js │ │ │ │ └── LibUnity.js │ │ │ ├── util.js │ │ │ ├── views/ │ │ │ │ ├── Account/ │ │ │ │ │ ├── AccountSettings.vue │ │ │ │ │ ├── SpendingAccount/ │ │ │ │ │ │ ├── ConfirmTransactionDialog.vue │ │ │ │ │ │ ├── Receive.vue │ │ │ │ │ │ ├── Send.vue │ │ │ │ │ │ ├── TransactionDetails.vue │ │ │ │ │ │ ├── Transactions.vue │ │ │ │ │ │ └── index.vue │ │ │ │ │ └── index.vue │ │ │ │ ├── DebugDialog/ │ │ │ │ │ ├── DebugConsole.vue │ │ │ │ │ ├── InformationPage.vue │ │ │ │ │ ├── PeerDetailsDialog.vue │ │ │ │ │ ├── PeersPage.vue │ │ │ │ │ └── index.vue │ │ │ │ ├── Settings/ │ │ │ │ │ ├── ChangePassword.vue │ │ │ │ │ ├── SettingsList.vue │ │ │ │ │ ├── ViewRecoveryPhrase.vue │ │ │ │ │ └── index.vue │ │ │ │ └── Setup.vue │ │ │ └── walletPath.js │ │ ├── ui-config.json │ │ └── vue.config.js │ ├── fs.cpp │ ├── fs.h │ ├── generation/ │ │ ├── generation.h │ │ ├── miner.cpp │ │ ├── miner.h │ │ ├── witness.cpp │ │ ├── witness.h │ │ ├── witnessrewardtemplate.cpp │ │ └── witnessrewardtemplate.h │ ├── hash.cpp │ ├── hash.h │ ├── httprpc.cpp │ ├── httprpc.h │ ├── httpserver.cpp │ ├── httpserver.h │ ├── indirectmap.h │ ├── init.cpp │ ├── init.h │ ├── key.cpp │ ├── key.h │ ├── keystore.cpp │ ├── keystore.h │ ├── leveldb/ │ │ ├── .appveyor.yml │ │ ├── .clang-format │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── NEWS │ │ ├── README.md │ │ ├── TODO │ │ ├── benchmarks/ │ │ │ ├── db_bench.cc │ │ │ ├── db_bench_sqlite3.cc │ │ │ └── db_bench_tree_db.cc │ │ ├── cmake/ │ │ │ └── leveldbConfig.cmake │ │ ├── db/ │ │ │ ├── autocompact_test.cc │ │ │ ├── builder.cc │ │ │ ├── builder.h │ │ │ ├── c.cc │ │ │ ├── c_test.c │ │ │ ├── corruption_test.cc │ │ │ ├── db_impl.cc │ │ │ ├── db_impl.h │ │ │ ├── db_iter.cc │ │ │ ├── db_iter.h │ │ │ ├── db_test.cc │ │ │ ├── dbformat.cc │ │ │ ├── dbformat.h │ │ │ ├── dbformat_test.cc │ │ │ ├── dumpfile.cc │ │ │ ├── fault_injection_test.cc │ │ │ ├── filename.cc │ │ │ ├── filename.h │ │ │ ├── filename_test.cc │ │ │ ├── leveldbutil.cc │ │ │ ├── log_format.h │ │ │ ├── log_reader.cc │ │ │ ├── log_reader.h │ │ │ ├── log_test.cc │ │ │ ├── log_writer.cc │ │ │ ├── log_writer.h │ │ │ ├── memtable.cc │ │ │ ├── memtable.h │ │ │ ├── recovery_test.cc │ │ │ ├── repair.cc │ │ │ ├── skiplist.h │ │ │ ├── skiplist_test.cc │ │ │ ├── snapshot.h │ │ │ ├── table_cache.cc │ │ │ ├── table_cache.h │ │ │ ├── version_edit.cc │ │ │ ├── version_edit.h │ │ │ ├── version_edit_test.cc │ │ │ ├── version_set.cc │ │ │ ├── version_set.h │ │ │ ├── version_set_test.cc │ │ │ ├── write_batch.cc │ │ │ ├── write_batch_internal.h │ │ │ └── write_batch_test.cc │ │ ├── doc/ │ │ │ ├── benchmark.html │ │ │ ├── impl.md │ │ │ ├── index.md │ │ │ ├── log_format.md │ │ │ └── table_format.md │ │ ├── helpers/ │ │ │ └── memenv/ │ │ │ ├── memenv.cc │ │ │ ├── memenv.h │ │ │ └── memenv_test.cc │ │ ├── include/ │ │ │ └── leveldb/ │ │ │ ├── c.h │ │ │ ├── cache.h │ │ │ ├── comparator.h │ │ │ ├── db.h │ │ │ ├── dumpfile.h │ │ │ ├── env.h │ │ │ ├── export.h │ │ │ ├── filter_policy.h │ │ │ ├── iterator.h │ │ │ ├── options.h │ │ │ ├── slice.h │ │ │ ├── status.h │ │ │ ├── table.h │ │ │ ├── table_builder.h │ │ │ └── write_batch.h │ │ ├── issues/ │ │ │ ├── issue178_test.cc │ │ │ ├── issue200_test.cc │ │ │ └── issue320_test.cc │ │ ├── port/ │ │ │ ├── README.md │ │ │ ├── port.h │ │ │ ├── port_config.h.in │ │ │ ├── port_example.h │ │ │ ├── port_stdcxx.h │ │ │ └── thread_annotations.h │ │ ├── table/ │ │ │ ├── block.cc │ │ │ ├── block.h │ │ │ ├── block_builder.cc │ │ │ ├── block_builder.h │ │ │ ├── filter_block.cc │ │ │ ├── filter_block.h │ │ │ ├── filter_block_test.cc │ │ │ ├── format.cc │ │ │ ├── format.h │ │ │ ├── iterator.cc │ │ │ ├── iterator_wrapper.h │ │ │ ├── merger.cc │ │ │ ├── merger.h │ │ │ ├── table.cc │ │ │ ├── table_builder.cc │ │ │ ├── table_test.cc │ │ │ ├── two_level_iterator.cc │ │ │ └── two_level_iterator.h │ │ └── util/ │ │ ├── arena.cc │ │ ├── arena.h │ │ ├── arena_test.cc │ │ ├── bloom.cc │ │ ├── bloom_test.cc │ │ ├── cache.cc │ │ ├── cache_test.cc │ │ ├── coding.cc │ │ ├── coding.h │ │ ├── coding_test.cc │ │ ├── comparator.cc │ │ ├── crc32c.cc │ │ ├── crc32c.h │ │ ├── crc32c_test.cc │ │ ├── env.cc │ │ ├── env_posix.cc │ │ ├── env_posix_test.cc │ │ ├── env_posix_test_helper.h │ │ ├── env_test.cc │ │ ├── env_windows.cc │ │ ├── env_windows_test.cc │ │ ├── env_windows_test_helper.h │ │ ├── filter_policy.cc │ │ ├── hash.cc │ │ ├── hash.h │ │ ├── hash_test.cc │ │ ├── histogram.cc │ │ ├── histogram.h │ │ ├── logging.cc │ │ ├── logging.h │ │ ├── logging_test.cc │ │ ├── mutexlock.h │ │ ├── no_destructor.h │ │ ├── no_destructor_test.cc │ │ ├── options.cc │ │ ├── posix_logger.h │ │ ├── random.h │ │ ├── status.cc │ │ ├── status_test.cc │ │ ├── testharness.cc │ │ ├── testharness.h │ │ ├── testutil.cc │ │ ├── testutil.h │ │ └── windows_logger.h │ ├── limitedmap.h │ ├── llvm-cpumodel-hack.cpp │ ├── logging.cpp │ ├── logging.h │ ├── memusage.h │ ├── merkleblock.cpp │ ├── merkleblock.h │ ├── net.cpp │ ├── net.h │ ├── net_processing.cpp │ ├── net_processing.h │ ├── netaddress.cpp │ ├── netaddress.h │ ├── netbase.cpp │ ├── netbase.h │ ├── netmessagemaker.h │ ├── node/ │ │ ├── context.cpp │ │ └── context.h │ ├── noui.cpp │ ├── noui.h │ ├── obj/ │ │ └── .gitignore │ ├── obj-test/ │ │ └── .gitignore │ ├── policy/ │ │ ├── feerate.cpp │ │ ├── feerate.h │ │ ├── fees.cpp │ │ ├── fees.h │ │ ├── policy.cpp │ │ ├── policy.h │ │ ├── rbf.cpp │ │ └── rbf.h │ ├── pow/ │ │ ├── diff.h │ │ ├── diff_common.cpp │ │ ├── diff_common.h │ │ ├── diff_delta.cpp │ │ ├── diff_delta.h │ │ ├── diff_old.cpp │ │ ├── diff_old.h │ │ ├── pow.cpp │ │ └── pow.h │ ├── prevector.h │ ├── primitives/ │ │ ├── block.cpp │ │ ├── block.h │ │ ├── transaction.cpp │ │ └── transaction.h │ ├── protocol.cpp │ ├── protocol.h │ ├── pubkey.cpp │ ├── pubkey.h │ ├── random.cpp │ ├── random.h │ ├── randomenv.cpp │ ├── randomenv.h │ ├── rest.cpp │ ├── reverse_iterator.h │ ├── reverselock.h │ ├── rpc/ │ │ ├── accounts.cpp │ │ ├── accounts.h │ │ ├── blockchain.cpp │ │ ├── blockchain.h │ │ ├── client.cpp │ │ ├── client.h │ │ ├── mining.cpp │ │ ├── misc.cpp │ │ ├── netrpc.cpp │ │ ├── protocol.cpp │ │ ├── protocol.h │ │ ├── rawtransaction.cpp │ │ ├── register.h │ │ ├── server.cpp │ │ └── server.h │ ├── scheduler.cpp │ ├── scheduler.h │ ├── script/ │ │ ├── consensus.cpp │ │ ├── consensus.h │ │ ├── interpreter.cpp │ │ ├── interpreter.h │ │ ├── ismine.cpp │ │ ├── ismine.h │ │ ├── script.cpp │ │ ├── script.h │ │ ├── script_error.cpp │ │ ├── script_error.h │ │ ├── sigcache.cpp │ │ ├── sigcache.h │ │ ├── sign.cpp │ │ ├── sign.h │ │ ├── standard.cpp │ │ └── standard.h │ ├── secp256k1/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── COPYING │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── TODO │ │ ├── autogen.sh │ │ ├── build-aux/ │ │ │ └── m4/ │ │ │ ├── ax_jni_include_dir.m4 │ │ │ ├── ax_prog_cc_for_build.m4 │ │ │ └── bitcoin_secp.m4 │ │ ├── configure.ac │ │ ├── contrib/ │ │ │ ├── lax_der_parsing.c │ │ │ ├── lax_der_parsing.h │ │ │ ├── lax_der_privatekey_parsing.c │ │ │ └── lax_der_privatekey_parsing.h │ │ ├── include/ │ │ │ ├── secp256k1.h │ │ │ ├── secp256k1_ecdh.h │ │ │ └── secp256k1_recovery.h │ │ ├── libsecp256k1.pc.in │ │ ├── obj/ │ │ │ └── .gitignore │ │ ├── sage/ │ │ │ ├── group_prover.sage │ │ │ ├── secp256k1.sage │ │ │ └── weierstrass_prover.sage │ │ └── src/ │ │ ├── asm/ │ │ │ └── field_10x26_arm.s │ │ ├── basic-config.h │ │ ├── bench.h │ │ ├── bench_ecdh.c │ │ ├── bench_internal.c │ │ ├── bench_recover.c │ │ ├── bench_sign.c │ │ ├── bench_verify.c │ │ ├── ecdsa.h │ │ ├── ecdsa_impl.h │ │ ├── eckey.h │ │ ├── eckey_impl.h │ │ ├── ecmult.h │ │ ├── ecmult_const.h │ │ ├── ecmult_const_impl.h │ │ ├── ecmult_gen.h │ │ ├── ecmult_gen_impl.h │ │ ├── ecmult_impl.h │ │ ├── field.h │ │ ├── field_10x26.h │ │ ├── field_10x26_impl.h │ │ ├── field_5x52.h │ │ ├── field_5x52_asm_impl.h │ │ ├── field_5x52_impl.h │ │ ├── field_5x52_int128_impl.h │ │ ├── field_impl.h │ │ ├── gen_context.c │ │ ├── group.h │ │ ├── group_impl.h │ │ ├── hash.h │ │ ├── hash_impl.h │ │ ├── java/ │ │ │ ├── org/ │ │ │ │ └── bitcoin/ │ │ │ │ ├── NativeSecp256k1.java │ │ │ │ ├── NativeSecp256k1Test.java │ │ │ │ ├── NativeSecp256k1Util.java │ │ │ │ └── Secp256k1Context.java │ │ │ ├── org_bitcoin_NativeSecp256k1.c │ │ │ ├── org_bitcoin_NativeSecp256k1.h │ │ │ ├── org_bitcoin_Secp256k1Context.c │ │ │ └── org_bitcoin_Secp256k1Context.h │ │ ├── modules/ │ │ │ ├── ecdh/ │ │ │ │ ├── Makefile.am.include │ │ │ │ ├── main_impl.h │ │ │ │ └── tests_impl.h │ │ │ └── recovery/ │ │ │ ├── Makefile.am.include │ │ │ ├── main_impl.h │ │ │ └── tests_impl.h │ │ ├── num.h │ │ ├── num_gmp.h │ │ ├── num_gmp_impl.h │ │ ├── num_impl.h │ │ ├── scalar.h │ │ ├── scalar_4x64.h │ │ ├── scalar_4x64_impl.h │ │ ├── scalar_8x32.h │ │ ├── scalar_8x32_impl.h │ │ ├── scalar_impl.h │ │ ├── scalar_low.h │ │ ├── scalar_low_impl.h │ │ ├── secp256k1.c │ │ ├── testrand.h │ │ ├── testrand_impl.h │ │ ├── tests.c │ │ ├── tests_exhaustive.c │ │ └── util.h │ ├── serialize.h │ ├── span.h │ ├── streams.h │ ├── support/ │ │ ├── allocators/ │ │ │ ├── secure.h │ │ │ └── zeroafterfree.h │ │ ├── cleanse.cpp │ │ ├── cleanse.h │ │ ├── events.h │ │ ├── lockedpool.cpp │ │ └── lockedpool.h │ ├── sync.cpp │ ├── sync.h │ ├── test/ │ │ ├── DoS_tests.cpp │ │ ├── README.md │ │ ├── addrman_tests.cpp │ │ ├── allocator_tests.cpp │ │ ├── amount_tests.cpp │ │ ├── arith_uint256_tests.cpp │ │ ├── base32_tests.cpp │ │ ├── base58_tests.cpp │ │ ├── base64_tests.cpp │ │ ├── bip32_tests.cpp │ │ ├── bip39_tests.cpp │ │ ├── blockencodings_tests.cpp │ │ ├── bloom_tests.cpp │ │ ├── bswap_tests.cpp │ │ ├── checkqueue_tests.cpp │ │ ├── coins_tests.cpp │ │ ├── compress_tests.cpp │ │ ├── crypto_tests.cpp │ │ ├── cuckoocache_tests.cpp │ │ ├── data/ │ │ │ ├── README.md │ │ │ ├── base58_encode_decode.json │ │ │ ├── base58_keys_invalid.json │ │ │ ├── base58_keys_valid.json │ │ │ ├── script_tests.json │ │ │ ├── sighash.json │ │ │ ├── tx_invalid.json │ │ │ ├── tx_valid.json │ │ │ ├── wallet-linked-no-password-protobuf │ │ │ ├── wallet-linked-password-5281-protobuf │ │ │ ├── wallet-seed-no-password-protobuf │ │ │ └── wallet-seed-password-1234-protobuf │ │ ├── dbwrapper_tests.cpp │ │ ├── getarg_tests.cpp │ │ ├── hash_tests.cpp │ │ ├── key_tests.cpp │ │ ├── limitedmap_tests.cpp │ │ ├── main_tests.cpp │ │ ├── mempool_tests.cpp │ │ ├── merkle_tests.cpp │ │ ├── miner_tests.cpp │ │ ├── multisig_tests.cpp │ │ ├── net_tests.cpp │ │ ├── netbase_tests.cpp │ │ ├── pmt_tests.cpp │ │ ├── policyestimator_tests.cpp │ │ ├── pow_tests.cpp │ │ ├── prevector_tests.cpp │ │ ├── raii_event_tests.cpp │ │ ├── random_tests.cpp │ │ ├── reverselock_tests.cpp │ │ ├── rpc_tests.cpp │ │ ├── sanity_tests.cpp │ │ ├── scheduler_tests.cpp │ │ ├── script_P2SH_tests.cpp │ │ ├── script_tests.cpp │ │ ├── scriptnum10.h │ │ ├── scriptnum_tests.cpp │ │ ├── serialize_tests.cpp │ │ ├── sighash_tests.cpp │ │ ├── sigopcount_tests.cpp │ │ ├── skiplist_tests.cpp │ │ ├── streams_tests.cpp │ │ ├── test.cpp │ │ ├── test.h │ │ ├── test_fuzzy.cpp │ │ ├── test_main.cpp │ │ ├── testutil.cpp │ │ ├── testutil.h │ │ ├── timedata_tests.cpp │ │ ├── torcontrol_tests.cpp │ │ ├── transaction_tests.cpp │ │ ├── txvalidationcache_tests.cpp │ │ ├── uint256_tests.cpp │ │ ├── unity_tests.cpp │ │ ├── univalue_tests.cpp │ │ ├── util_tests.cpp │ │ └── versionbits_tests.cpp │ ├── threadinterrupt.cpp │ ├── threadinterrupt.h │ ├── threadsafety.h │ ├── timedata.cpp │ ├── timedata.h │ ├── tinyformat.h │ ├── torcontrol.cpp │ ├── torcontrol.h │ ├── tx-main.cpp │ ├── tx-res.rc │ ├── txdb.cpp │ ├── txdb.h │ ├── txmempool.cpp │ ├── txmempool.h │ ├── ui_interface.cpp │ ├── ui_interface.h │ ├── uint256.cpp │ ├── uint256.h │ ├── undo.h │ ├── unity/ │ │ ├── android/ │ │ │ ├── init_android.cpp │ │ │ └── logging_android.cpp │ │ ├── appmanager.cpp │ │ ├── appmanager.h │ │ ├── compat/ │ │ │ ├── android_wallet.cpp │ │ │ └── android_wallet.h │ │ ├── controllers/ │ │ │ ├── iaccountscontroller.cpp │ │ │ ├── igenerationcontroller.cpp │ │ │ ├── ip2pnetworkcontroller.cpp │ │ │ ├── irpccontroller.cpp │ │ │ ├── iwalletcontroller.cpp │ │ │ └── iwitnesscontroller.cpp │ │ ├── djinni/ │ │ │ ├── cpp/ │ │ │ │ ├── account_link_record.hpp │ │ │ │ ├── account_record.hpp │ │ │ │ ├── address_record.hpp │ │ │ │ ├── balance_record.hpp │ │ │ │ ├── banned_peer_record.hpp │ │ │ │ ├── block_info_record.hpp │ │ │ │ ├── i_accounts_controller.hpp │ │ │ │ ├── i_accounts_listener.hpp │ │ │ │ ├── i_generation_controller.hpp │ │ │ │ ├── i_generation_listener.hpp │ │ │ │ ├── i_library_controller.cpp │ │ │ │ ├── i_library_controller.hpp │ │ │ │ ├── i_library_listener.hpp │ │ │ │ ├── i_p2p_network_controller.hpp │ │ │ │ ├── i_p2p_network_listener.hpp │ │ │ │ ├── i_rpc_controller.hpp │ │ │ │ ├── i_rpc_listener.hpp │ │ │ │ ├── i_wallet_controller.hpp │ │ │ │ ├── i_wallet_listener.hpp │ │ │ │ ├── i_witness_controller.hpp │ │ │ │ ├── input_record.hpp │ │ │ │ ├── legacy_wallet_result.hpp │ │ │ │ ├── mnemonic_record.hpp │ │ │ │ ├── monitor_listener.hpp │ │ │ │ ├── monitor_record.hpp │ │ │ │ ├── mutation_record.hpp │ │ │ │ ├── output_record.hpp │ │ │ │ ├── payment_result_status.hpp │ │ │ │ ├── peer_record.cpp │ │ │ │ ├── peer_record.hpp │ │ │ │ ├── qr_code_record.hpp │ │ │ │ ├── result_record.hpp │ │ │ │ ├── transaction_record.hpp │ │ │ │ ├── transaction_status.hpp │ │ │ │ ├── uri_recipient.hpp │ │ │ │ ├── uri_record.hpp │ │ │ │ ├── wallet_lock_status.hpp │ │ │ │ ├── witness_account_statistics_record.hpp │ │ │ │ ├── witness_estimate_info_record.hpp │ │ │ │ └── witness_funding_result_record.hpp │ │ │ ├── jni/ │ │ │ │ ├── NativeAccountLinkRecord.cpp │ │ │ │ ├── NativeAccountLinkRecord.hpp │ │ │ │ ├── NativeAccountRecord.cpp │ │ │ │ ├── NativeAccountRecord.hpp │ │ │ │ ├── NativeAddressRecord.cpp │ │ │ │ ├── NativeAddressRecord.hpp │ │ │ │ ├── NativeBalanceRecord.cpp │ │ │ │ ├── NativeBalanceRecord.hpp │ │ │ │ ├── NativeBannedPeerRecord.cpp │ │ │ │ ├── NativeBannedPeerRecord.hpp │ │ │ │ ├── NativeBlockInfoRecord.cpp │ │ │ │ ├── NativeBlockInfoRecord.hpp │ │ │ │ ├── NativeIAccountsController.cpp │ │ │ │ ├── NativeIAccountsController.hpp │ │ │ │ ├── NativeIAccountsListener.cpp │ │ │ │ ├── NativeIAccountsListener.hpp │ │ │ │ ├── NativeIGenerationController.cpp │ │ │ │ ├── NativeIGenerationController.hpp │ │ │ │ ├── NativeIGenerationListener.cpp │ │ │ │ ├── NativeIGenerationListener.hpp │ │ │ │ ├── NativeILibraryController.cpp │ │ │ │ ├── NativeILibraryController.hpp │ │ │ │ ├── NativeILibraryListener.cpp │ │ │ │ ├── NativeILibraryListener.hpp │ │ │ │ ├── NativeIP2pNetworkController.cpp │ │ │ │ ├── NativeIP2pNetworkController.hpp │ │ │ │ ├── NativeIP2pNetworkListener.cpp │ │ │ │ ├── NativeIP2pNetworkListener.hpp │ │ │ │ ├── NativeIRpcController.cpp │ │ │ │ ├── NativeIRpcController.hpp │ │ │ │ ├── NativeIRpcListener.cpp │ │ │ │ ├── NativeIRpcListener.hpp │ │ │ │ ├── NativeIWalletController.cpp │ │ │ │ ├── NativeIWalletController.hpp │ │ │ │ ├── NativeIWalletListener.cpp │ │ │ │ ├── NativeIWalletListener.hpp │ │ │ │ ├── NativeIWitnessController.cpp │ │ │ │ ├── NativeIWitnessController.hpp │ │ │ │ ├── NativeInputRecord.cpp │ │ │ │ ├── NativeInputRecord.hpp │ │ │ │ ├── NativeLegacyWalletResult.hpp │ │ │ │ ├── NativeMnemonicRecord.cpp │ │ │ │ ├── NativeMnemonicRecord.hpp │ │ │ │ ├── NativeMonitorListener.cpp │ │ │ │ ├── NativeMonitorListener.hpp │ │ │ │ ├── NativeMonitorRecord.cpp │ │ │ │ ├── NativeMonitorRecord.hpp │ │ │ │ ├── NativeMutationRecord.cpp │ │ │ │ ├── NativeMutationRecord.hpp │ │ │ │ ├── NativeOutputRecord.cpp │ │ │ │ ├── NativeOutputRecord.hpp │ │ │ │ ├── NativePaymentResultStatus.hpp │ │ │ │ ├── NativePeerRecord.cpp │ │ │ │ ├── NativePeerRecord.hpp │ │ │ │ ├── NativeQrCodeRecord.cpp │ │ │ │ ├── NativeQrCodeRecord.hpp │ │ │ │ ├── NativeResultRecord.cpp │ │ │ │ ├── NativeResultRecord.hpp │ │ │ │ ├── NativeTransactionRecord.cpp │ │ │ │ ├── NativeTransactionRecord.hpp │ │ │ │ ├── NativeTransactionStatus.hpp │ │ │ │ ├── NativeUriRecipient.cpp │ │ │ │ ├── NativeUriRecipient.hpp │ │ │ │ ├── NativeUriRecord.cpp │ │ │ │ ├── NativeUriRecord.hpp │ │ │ │ ├── NativeWalletLockStatus.cpp │ │ │ │ ├── NativeWalletLockStatus.hpp │ │ │ │ ├── NativeWitnessAccountStatisticsRecord.cpp │ │ │ │ ├── NativeWitnessAccountStatisticsRecord.hpp │ │ │ │ ├── NativeWitnessEstimateInfoRecord.cpp │ │ │ │ ├── NativeWitnessEstimateInfoRecord.hpp │ │ │ │ ├── NativeWitnessFundingResultRecord.cpp │ │ │ │ └── NativeWitnessFundingResultRecord.hpp │ │ │ ├── node_js/ │ │ │ │ ├── NJSIAccountsController.cpp │ │ │ │ ├── NJSIAccountsController.hpp │ │ │ │ ├── NJSIAccountsListener.cpp │ │ │ │ ├── NJSIAccountsListener.hpp │ │ │ │ ├── NJSIGenerationController.cpp │ │ │ │ ├── NJSIGenerationController.hpp │ │ │ │ ├── NJSIGenerationListener.cpp │ │ │ │ ├── NJSIGenerationListener.hpp │ │ │ │ ├── NJSILibraryController.cpp │ │ │ │ ├── NJSILibraryController.hpp │ │ │ │ ├── NJSILibraryListener.cpp │ │ │ │ ├── NJSILibraryListener.hpp │ │ │ │ ├── NJSIP2pNetworkController.cpp │ │ │ │ ├── NJSIP2pNetworkController.hpp │ │ │ │ ├── NJSIP2pNetworkListener.cpp │ │ │ │ ├── NJSIP2pNetworkListener.hpp │ │ │ │ ├── NJSIRpcController.cpp │ │ │ │ ├── NJSIRpcController.hpp │ │ │ │ ├── NJSIRpcListener.cpp │ │ │ │ ├── NJSIRpcListener.hpp │ │ │ │ ├── NJSIWalletController.cpp │ │ │ │ ├── NJSIWalletController.hpp │ │ │ │ ├── NJSIWalletListener.cpp │ │ │ │ ├── NJSIWalletListener.hpp │ │ │ │ ├── NJSIWitnessController.cpp │ │ │ │ ├── NJSIWitnessController.hpp │ │ │ │ ├── NJSMonitorListener.cpp │ │ │ │ ├── NJSMonitorListener.hpp │ │ │ │ ├── unifiedbackend.cpp │ │ │ │ └── unifiedbackend_doc.js │ │ │ ├── objc/ │ │ │ │ ├── DBAccountLinkRecord+Private.h │ │ │ │ ├── DBAccountLinkRecord+Private.mm │ │ │ │ ├── DBAccountLinkRecord.h │ │ │ │ ├── DBAccountLinkRecord.mm │ │ │ │ ├── DBAccountRecord+Private.h │ │ │ │ ├── DBAccountRecord+Private.mm │ │ │ │ ├── DBAccountRecord.h │ │ │ │ ├── DBAccountRecord.mm │ │ │ │ ├── DBAddressRecord+Private.h │ │ │ │ ├── DBAddressRecord+Private.mm │ │ │ │ ├── DBAddressRecord.h │ │ │ │ ├── DBAddressRecord.mm │ │ │ │ ├── DBBalanceRecord+Private.h │ │ │ │ ├── DBBalanceRecord+Private.mm │ │ │ │ ├── DBBalanceRecord.h │ │ │ │ ├── DBBalanceRecord.mm │ │ │ │ ├── DBBannedPeerRecord+Private.h │ │ │ │ ├── DBBannedPeerRecord+Private.mm │ │ │ │ ├── DBBannedPeerRecord.h │ │ │ │ ├── DBBannedPeerRecord.mm │ │ │ │ ├── DBBlockInfoRecord+Private.h │ │ │ │ ├── DBBlockInfoRecord+Private.mm │ │ │ │ ├── DBBlockInfoRecord.h │ │ │ │ ├── DBBlockInfoRecord.mm │ │ │ │ ├── DBIAccountsController+Private.h │ │ │ │ ├── DBIAccountsController+Private.mm │ │ │ │ ├── DBIAccountsController.h │ │ │ │ ├── DBIAccountsListener+Private.h │ │ │ │ ├── DBIAccountsListener+Private.mm │ │ │ │ ├── DBIAccountsListener.h │ │ │ │ ├── DBIGenerationController+Private.h │ │ │ │ ├── DBIGenerationController+Private.mm │ │ │ │ ├── DBIGenerationController.h │ │ │ │ ├── DBIGenerationListener+Private.h │ │ │ │ ├── DBIGenerationListener+Private.mm │ │ │ │ ├── DBIGenerationListener.h │ │ │ │ ├── DBILibraryController+Private.h │ │ │ │ ├── DBILibraryController+Private.mm │ │ │ │ ├── DBILibraryController.h │ │ │ │ ├── DBILibraryController.mm │ │ │ │ ├── DBILibraryListener+Private.h │ │ │ │ ├── DBILibraryListener+Private.mm │ │ │ │ ├── DBILibraryListener.h │ │ │ │ ├── DBIP2pNetworkController+Private.h │ │ │ │ ├── DBIP2pNetworkController+Private.mm │ │ │ │ ├── DBIP2pNetworkController.h │ │ │ │ ├── DBIP2pNetworkListener+Private.h │ │ │ │ ├── DBIP2pNetworkListener+Private.mm │ │ │ │ ├── DBIP2pNetworkListener.h │ │ │ │ ├── DBIRpcController+Private.h │ │ │ │ ├── DBIRpcController+Private.mm │ │ │ │ ├── DBIRpcController.h │ │ │ │ ├── DBIRpcListener+Private.h │ │ │ │ ├── DBIRpcListener+Private.mm │ │ │ │ ├── DBIRpcListener.h │ │ │ │ ├── DBIWalletController+Private.h │ │ │ │ ├── DBIWalletController+Private.mm │ │ │ │ ├── DBIWalletController.h │ │ │ │ ├── DBIWalletListener+Private.h │ │ │ │ ├── DBIWalletListener+Private.mm │ │ │ │ ├── DBIWalletListener.h │ │ │ │ ├── DBIWitnessController+Private.h │ │ │ │ ├── DBIWitnessController+Private.mm │ │ │ │ ├── DBIWitnessController.h │ │ │ │ ├── DBInputRecord+Private.h │ │ │ │ ├── DBInputRecord+Private.mm │ │ │ │ ├── DBInputRecord.h │ │ │ │ ├── DBInputRecord.mm │ │ │ │ ├── DBLegacyWalletResult+Private.h │ │ │ │ ├── DBLegacyWalletResult.h │ │ │ │ ├── DBMnemonicRecord+Private.h │ │ │ │ ├── DBMnemonicRecord+Private.mm │ │ │ │ ├── DBMnemonicRecord.h │ │ │ │ ├── DBMnemonicRecord.mm │ │ │ │ ├── DBMonitorListener+Private.h │ │ │ │ ├── DBMonitorListener+Private.mm │ │ │ │ ├── DBMonitorListener.h │ │ │ │ ├── DBMonitorRecord+Private.h │ │ │ │ ├── DBMonitorRecord+Private.mm │ │ │ │ ├── DBMonitorRecord.h │ │ │ │ ├── DBMonitorRecord.mm │ │ │ │ ├── DBMutationRecord+Private.h │ │ │ │ ├── DBMutationRecord+Private.mm │ │ │ │ ├── DBMutationRecord.h │ │ │ │ ├── DBMutationRecord.mm │ │ │ │ ├── DBOutputRecord+Private.h │ │ │ │ ├── DBOutputRecord+Private.mm │ │ │ │ ├── DBOutputRecord.h │ │ │ │ ├── DBOutputRecord.mm │ │ │ │ ├── DBPaymentResultStatus+Private.h │ │ │ │ ├── DBPaymentResultStatus.h │ │ │ │ ├── DBPeerRecord+Private.h │ │ │ │ ├── DBPeerRecord+Private.mm │ │ │ │ ├── DBPeerRecord.h │ │ │ │ ├── DBPeerRecord.mm │ │ │ │ ├── DBQrCodeRecord+Private.h │ │ │ │ ├── DBQrCodeRecord+Private.mm │ │ │ │ ├── DBQrCodeRecord.h │ │ │ │ ├── DBQrCodeRecord.mm │ │ │ │ ├── DBResultRecord+Private.h │ │ │ │ ├── DBResultRecord+Private.mm │ │ │ │ ├── DBResultRecord.h │ │ │ │ ├── DBResultRecord.mm │ │ │ │ ├── DBTransactionRecord+Private.h │ │ │ │ ├── DBTransactionRecord+Private.mm │ │ │ │ ├── DBTransactionRecord.h │ │ │ │ ├── DBTransactionRecord.mm │ │ │ │ ├── DBTransactionStatus+Private.h │ │ │ │ ├── DBTransactionStatus.h │ │ │ │ ├── DBUriRecipient+Private.h │ │ │ │ ├── DBUriRecipient+Private.mm │ │ │ │ ├── DBUriRecipient.h │ │ │ │ ├── DBUriRecipient.mm │ │ │ │ ├── DBUriRecord+Private.h │ │ │ │ ├── DBUriRecord+Private.mm │ │ │ │ ├── DBUriRecord.h │ │ │ │ ├── DBUriRecord.mm │ │ │ │ ├── DBWalletLockStatus+Private.h │ │ │ │ ├── DBWalletLockStatus+Private.mm │ │ │ │ ├── DBWalletLockStatus.h │ │ │ │ ├── DBWalletLockStatus.mm │ │ │ │ ├── DBWitnessAccountStatisticsRecord+Private.h │ │ │ │ ├── DBWitnessAccountStatisticsRecord+Private.mm │ │ │ │ ├── DBWitnessAccountStatisticsRecord.h │ │ │ │ ├── DBWitnessAccountStatisticsRecord.mm │ │ │ │ ├── DBWitnessEstimateInfoRecord+Private.h │ │ │ │ ├── DBWitnessEstimateInfoRecord+Private.mm │ │ │ │ ├── DBWitnessEstimateInfoRecord.h │ │ │ │ ├── DBWitnessEstimateInfoRecord.mm │ │ │ │ ├── DBWitnessFundingResultRecord+Private.h │ │ │ │ ├── DBWitnessFundingResultRecord+Private.mm │ │ │ │ ├── DBWitnessFundingResultRecord.h │ │ │ │ └── DBWitnessFundingResultRecord.mm │ │ │ └── support-lib/ │ │ │ ├── djinni_common.hpp │ │ │ ├── ios-build-support-lib.sh │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── dropbox/ │ │ │ │ └── djinni/ │ │ │ │ └── NativeLibLoader.java │ │ │ ├── jni/ │ │ │ │ ├── Marshal.hpp │ │ │ │ ├── djinni_main.cpp │ │ │ │ ├── djinni_support.cpp │ │ │ │ └── djinni_support.hpp │ │ │ ├── nodejs/ │ │ │ │ └── win_delay_load_hook.cpp │ │ │ ├── objc/ │ │ │ │ ├── DJICppWrapperCache+Private.h │ │ │ │ ├── DJIError.h │ │ │ │ ├── DJIError.mm │ │ │ │ ├── DJIMarshal+Private.h │ │ │ │ ├── DJIObjcWrapperCache+Private.h │ │ │ │ └── DJIProxyCaches.mm │ │ │ ├── proxy_cache_impl.hpp │ │ │ ├── proxy_cache_interface.hpp │ │ │ ├── support-lib.iml │ │ │ └── support_lib.gyp │ │ ├── generic/ │ │ │ ├── init_generic.cpp │ │ │ ├── init_generic_node.cpp │ │ │ └── logging.cpp │ │ ├── glob.py │ │ ├── ios/ │ │ │ ├── init_ios.cpp │ │ │ ├── logging_ios.cpp │ │ │ └── munt_static/ │ │ │ └── MuntCore/ │ │ │ └── Info.plist │ │ ├── libinit.cpp │ │ ├── libinit.h │ │ ├── libmunt_unity.gyp │ │ ├── libunity.djinni │ │ ├── node_js/ │ │ │ ├── init_node_js.cpp │ │ │ └── logging_node_js.cpp │ │ ├── signals.h │ │ ├── unity_impl.cpp │ │ └── unity_impl.h │ ├── univalue/ │ │ ├── .gitignore │ │ ├── COPYING │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── TODO │ │ ├── autogen.sh │ │ ├── build-aux/ │ │ │ └── m4/ │ │ │ ├── .gitignore │ │ │ └── ax_cxx_compile_stdcxx.m4 │ │ ├── configure.ac │ │ ├── include/ │ │ │ └── univalue.h │ │ ├── lib/ │ │ │ ├── .gitignore │ │ │ ├── univalue.cpp │ │ │ ├── univalue_escapes.h │ │ │ ├── univalue_get.cpp │ │ │ ├── univalue_read.cpp │ │ │ ├── univalue_utffilter.h │ │ │ └── univalue_write.cpp │ │ ├── pc/ │ │ │ ├── libunivalue-uninstalled.pc.in │ │ │ └── libunivalue.pc.in │ │ ├── sources.mk │ │ └── test/ │ │ ├── .gitignore │ │ ├── fail1.json │ │ ├── fail10.json │ │ ├── fail11.json │ │ ├── fail12.json │ │ ├── fail13.json │ │ ├── fail14.json │ │ ├── fail15.json │ │ ├── fail16.json │ │ ├── fail17.json │ │ ├── fail18.json │ │ ├── fail19.json │ │ ├── fail2.json │ │ ├── fail20.json │ │ ├── fail21.json │ │ ├── fail22.json │ │ ├── fail23.json │ │ ├── fail24.json │ │ ├── fail25.json │ │ ├── fail26.json │ │ ├── fail27.json │ │ ├── fail28.json │ │ ├── fail29.json │ │ ├── fail3.json │ │ ├── fail30.json │ │ ├── fail31.json │ │ ├── fail32.json │ │ ├── fail33.json │ │ ├── fail34.json │ │ ├── fail35.json │ │ ├── fail36.json │ │ ├── fail37.json │ │ ├── fail38.json │ │ ├── fail39.json │ │ ├── fail4.json │ │ ├── fail40.json │ │ ├── fail41.json │ │ ├── fail42.json │ │ ├── fail44.json │ │ ├── fail45.json │ │ ├── fail5.json │ │ ├── fail6.json │ │ ├── fail7.json │ │ ├── fail8.json │ │ ├── fail9.json │ │ ├── no_nul.cpp │ │ ├── object.cpp │ │ ├── pass1.json │ │ ├── pass2.json │ │ ├── pass3.json │ │ ├── pass4.json │ │ ├── round1.json │ │ ├── round2.json │ │ ├── round3.json │ │ ├── round4.json │ │ ├── round5.json │ │ ├── round6.json │ │ ├── round7.json │ │ ├── test_json.cpp │ │ └── unitester.cpp │ ├── util/ │ │ ├── bytevectorhash.cpp │ │ ├── bytevectorhash.h │ │ ├── check.h │ │ ├── getuniquepath.cpp │ │ ├── getuniquepath.h │ │ ├── macros.h │ │ ├── moneystr.cpp │ │ ├── moneystr.h │ │ ├── overloaded.h │ │ ├── strencodings.cpp │ │ ├── strencodings.h │ │ ├── syscall_sandbox.cpp │ │ ├── syscall_sandbox.h │ │ ├── thread.cpp │ │ ├── thread.h │ │ ├── threadnames.cpp │ │ ├── threadnames.h │ │ ├── time.cpp │ │ └── time.h │ ├── util.cpp │ ├── util.h │ ├── validation/ │ │ ├── validation.cpp │ │ ├── validation.h │ │ ├── validation_mempool.cpp │ │ ├── validation_misc.cpp │ │ ├── validationinterface.cpp │ │ ├── validationinterface.h │ │ ├── versionbitsvalidation.cpp │ │ ├── versionbitsvalidation.h │ │ ├── witnessvalidation.cpp │ │ └── witnessvalidation.h │ ├── version.h │ ├── versionbits.cpp │ ├── versionbits.h │ ├── wallet/ │ │ ├── account.cpp │ │ ├── account.h │ │ ├── coincontrol.h │ │ ├── crypter.cpp │ │ ├── crypter.h │ │ ├── db.cpp │ │ ├── db.h │ │ ├── extwallet.cpp │ │ ├── extwallet.h │ │ ├── feebumper.cpp │ │ ├── feebumper.h │ │ ├── merkletx.cpp │ │ ├── merkletx.h │ │ ├── mnemonic.cpp │ │ ├── mnemonic.h │ │ ├── rpcdump.cpp │ │ ├── rpcwallet.cpp │ │ ├── rpcwallet.h │ │ ├── spvscanner.cpp │ │ ├── spvscanner.h │ │ ├── test/ │ │ │ ├── accounting_tests.cpp │ │ │ ├── crypto_tests.cpp │ │ │ ├── wallet_test_fixture.cpp │ │ │ ├── wallet_test_fixture.h │ │ │ └── wallet_tests.cpp │ │ ├── wallet.cpp │ │ ├── wallet.h │ │ ├── wallet_init.cpp │ │ ├── wallet_ismine.cpp │ │ ├── wallet_keypool.cpp │ │ ├── wallet_transaction.cpp │ │ ├── walletbalance.cpp │ │ ├── walletdb.cpp │ │ ├── walletdb.h │ │ ├── walletdberrors.h │ │ ├── wallettx.cpp │ │ ├── wallettx.h │ │ ├── witness_operations.cpp │ │ └── witness_operations.h │ ├── warnings.cpp │ ├── warnings.h │ ├── witnessutil.cpp │ ├── witnessutil.h │ └── zmq/ │ ├── zmqabstractnotifier.cpp │ ├── zmqabstractnotifier.h │ ├── zmqconfig.h │ ├── zmqnotificationinterface.cpp │ ├── zmqnotificationinterface.h │ ├── zmqpublishnotifier.cpp │ └── zmqpublishnotifier.h ├── technical_documentation/ │ ├── accelerated_testnet.md │ ├── account_system.md │ ├── gui_development.md │ └── transaction_format.md └── test/ ├── README.md ├── config.ini.in ├── functional/ │ ├── .gitignore │ ├── README.md │ ├── combine_logs.py │ ├── combined_log_template.html │ ├── create_cache.py │ ├── data/ │ │ ├── invalid_txs.py │ │ ├── rpc_getblockstats.json │ │ └── rpc_psbt.json │ ├── example_test.py │ ├── feature_assumevalid.py │ ├── feature_bip68_sequence.py │ ├── feature_block.py │ ├── feature_blocksdir.py │ ├── feature_cltv.py │ ├── feature_config_args.py │ ├── feature_csv_activation.py │ ├── feature_dbcrash.py │ ├── feature_dersig.py │ ├── feature_fee_estimation.py │ ├── feature_filelock.py │ ├── feature_help.py │ ├── feature_includeconf.py │ ├── feature_logging.py │ ├── feature_maxuploadtarget.py │ ├── feature_minchainwork.py │ ├── feature_notifications.py │ ├── feature_nulldummy.py │ ├── feature_proxy.py │ ├── feature_pruning.py │ ├── feature_rbf.py │ ├── feature_reindex.py │ ├── feature_segwit.py │ ├── feature_shutdown.py │ ├── feature_uacomment.py │ ├── feature_versionbits_warning.py │ ├── interface_cli.py │ ├── interface_http.py │ ├── interface_rest.py │ ├── interface_rpc.py │ ├── interface_zmq.py │ ├── mempool_accept.py │ ├── mempool_limit.py │ ├── mempool_packages.py │ ├── mempool_persist.py │ ├── mempool_reorg.py │ ├── mempool_resurrect.py │ ├── mempool_spend_coinbase.py │ ├── mining_basic.py │ ├── mining_getblocktemplate_longpoll.py │ ├── mining_prioritisetransaction.py │ ├── p2p_compactblocks.py │ ├── p2p_disconnect_ban.py │ ├── p2p_feefilter.py │ ├── p2p_fingerprint.py │ ├── p2p_invalid_block.py │ ├── p2p_invalid_locator.py │ ├── p2p_invalid_messages.py │ ├── p2p_invalid_tx.py │ ├── p2p_leak.py │ ├── p2p_leak_tx.py │ ├── p2p_mempool.py │ ├── p2p_node_network_limited.py │ ├── p2p_segwit.py │ ├── p2p_sendheaders.py │ ├── p2p_timeouts.py │ ├── p2p_unrequested_blocks.py │ ├── rpc_bind.py │ ├── rpc_blockchain.py │ ├── rpc_createmultisig.py │ ├── rpc_decodescript.py │ ├── rpc_deprecated.py │ ├── rpc_deriveaddresses.py │ ├── rpc_fundrawtransaction.py │ ├── rpc_getblockstats.py │ ├── rpc_getchaintips.py │ ├── rpc_help.py │ ├── rpc_invalidateblock.py │ ├── rpc_misc.py │ ├── rpc_named_arguments.py │ ├── rpc_net.py │ ├── rpc_preciousblock.py │ ├── rpc_psbt.py │ ├── rpc_rawtransaction.py │ ├── rpc_scantxoutset.py │ ├── rpc_signmessage.py │ ├── rpc_signrawtransaction.py │ ├── rpc_txoutproof.py │ ├── rpc_uptime.py │ ├── rpc_users.py │ ├── test_framework/ │ │ ├── __init__.py │ │ ├── address.py │ │ ├── authproxy.py │ │ ├── bignum.py │ │ ├── blocktools.py │ │ ├── coverage.py │ │ ├── descriptors.py │ │ ├── key.py │ │ ├── messages.py │ │ ├── mininode.py │ │ ├── netutil.py │ │ ├── script.py │ │ ├── segwit_addr.py │ │ ├── siphash.py │ │ ├── socks5.py │ │ ├── test_framework.py │ │ ├── test_node.py │ │ ├── util.py │ │ └── wallet_util.py │ ├── test_runner.py │ ├── tool_wallet.py │ ├── wallet_abandonconflict.py │ ├── wallet_address_types.py │ ├── wallet_backup.py │ ├── wallet_balance.py │ ├── wallet_basic.py │ ├── wallet_bumpfee.py │ ├── wallet_coinbase_category.py │ ├── wallet_create_tx.py │ ├── wallet_createwallet.py │ ├── wallet_disable.py │ ├── wallet_dump.py │ ├── wallet_encryption.py │ ├── wallet_fallbackfee.py │ ├── wallet_groups.py │ ├── wallet_hd.py │ ├── wallet_import_rescan.py │ ├── wallet_import_with_label.py │ ├── wallet_importmulti.py │ ├── wallet_importprunedfunds.py │ ├── wallet_keypool.py │ ├── wallet_keypool_topup.py │ ├── wallet_listreceivedby.py │ ├── wallet_listsinceblock.py │ ├── wallet_listtransactions.py │ ├── wallet_multiwallet.py │ ├── wallet_resendwallettransactions.py │ ├── wallet_txn_clone.py │ ├── wallet_txn_doublespend.py │ └── wallet_zapwallettxes.py ├── fuzz/ │ └── test_runner.py ├── lint/ │ ├── README.md │ ├── check-doc.py │ ├── check-rpc-mappings.py │ ├── commit-script-check.sh │ ├── git-subtree-check.sh │ ├── lint-all.sh │ ├── lint-assertions.sh │ ├── lint-circular-dependencies.sh │ ├── lint-filenames.sh │ ├── lint-format-strings.py │ ├── lint-format-strings.sh │ ├── lint-include-guards.sh │ ├── lint-includes.sh │ ├── lint-locale-dependence.sh │ ├── lint-logs.sh │ ├── lint-python-dead-code.sh │ ├── lint-python-utf8-encoding.sh │ ├── lint-python.sh │ ├── lint-rpc-help.sh │ ├── lint-shebang.sh │ ├── lint-shell-locale.sh │ ├── lint-shell.sh │ ├── lint-spelling.ignore-words.txt │ ├── lint-spelling.sh │ ├── lint-tests.sh │ └── lint-whitespace.sh ├── sanitizer_suppressions/ │ ├── lsan │ ├── tsan │ └── ubsan └── util/ ├── data/ │ ├── blanktxv1.hex │ ├── blanktxv1.json │ ├── blanktxv2.hex │ ├── blanktxv2.json │ ├── tt-delin1-out.hex │ ├── tt-delin1-out.json │ ├── tt-delout1-out.hex │ ├── tt-delout1-out.json │ ├── tt-locktime317000-out.hex │ ├── tt-locktime317000-out.json │ ├── tx394b54bb.hex │ ├── txcreate1.hex │ ├── txcreate1.json │ ├── txcreate2.hex │ ├── txcreate2.json │ ├── txcreatedata1.hex │ ├── txcreatedata1.json │ ├── txcreatedata2.hex │ ├── txcreatedata2.json │ ├── txcreatedata_seq0.hex │ ├── txcreatedata_seq0.json │ ├── txcreatedata_seq1.hex │ ├── txcreatedata_seq1.json │ ├── txcreatemultisig1.hex │ ├── txcreatemultisig1.json │ ├── txcreatemultisig2.hex │ ├── txcreatemultisig2.json │ ├── txcreatemultisig3.hex │ ├── txcreatemultisig3.json │ ├── txcreatemultisig4.hex │ ├── txcreatemultisig4.json │ ├── txcreatemultisig5.json │ ├── txcreateoutpubkey1.hex │ ├── txcreateoutpubkey1.json │ ├── txcreateoutpubkey2.hex │ ├── txcreateoutpubkey2.json │ ├── txcreateoutpubkey3.hex │ ├── txcreateoutpubkey3.json │ ├── txcreatescript1.hex │ ├── txcreatescript1.json │ ├── txcreatescript2.hex │ ├── txcreatescript2.json │ ├── txcreatescript3.hex │ ├── txcreatescript3.json │ ├── txcreatescript4.hex │ ├── txcreatescript4.json │ ├── txcreatesignv1.hex │ ├── txcreatesignv1.json │ ├── txcreatesignv2.hex │ └── util-test.json ├── rpcauth-test.py └── util-test.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ src/clientversion.cpp export-subst ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ This issue tracker is only for technical issues related to Gulden. General support questions and/or support requests and are best directed to our slack. Please ensure you are running the latest version of the software before reporting issues. ### Describe the issue ### Can you reliably reproduce the issue? #### If so, please list the steps to reproduce below: 1. 2. 3. ### Expected behaviour Tell us what should happen ### Actual behaviour Tell us what happens instead ### Screenshots. If the issue is related to the GUI, screenshots can be added to this issue via drag & drop. ### What version of Gulden are you using? List the version number/commit ID, and if it is an official binary, self compiled or a distribution package such as PPA. ### Machine specs: - OS: - CPU: - RAM: - Disk size: - Disk Type (HD/SDD): ### Any extra information that might be useful in the debugging process. This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. ================================================ FILE: .gitignore ================================================ *.tar.gz *.exe # autoreconf Makefile.in aclocal.m4 autom4te.cache/ build-aux/config.guess build-aux/config.sub build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh build-aux/m4/libtool.m4 build-aux/m4/lt~obsolete.m4 build-aux/m4/ltoptions.m4 build-aux/m4/ltsugar.m4 build-aux/m4/ltversion.m4 build-aux/missing build-aux/compile build-aux/test-driver config.log config.status configure libtool src/config/gulden-config.h src/config/gulden-config.h.in src/config/stamp-h1 share/setup.nsi share/qt/Info.plist src/univalue/gen src/qt/*.moc src/qt/_Gulden/*.moc src/qt/moc_*.cpp src/qt/_Gulden/moc_*.cpp src/qt/forms/ui_*.h src/qt/_Gulden/forms/ui_*.h src/qt/qfonticon/moc_*.cpp src/qt/test/moc*.cpp .deps .dirstamp .libs .*.swp *.*~* *.bak *.rej *.orig *.pyc *.o *.o-* *.patch *.a *.pb.cc *.pb.h *.log *.trs *.dmg *.json.h *.raw.h #libtool object files *.lo *.la # Compilation and Qt preprocessor part *.qm Makefile Makefile.am.user Gulden-tx Gulden-cli GuldenD /src/qt/Gulden # Unit-tests Makefile.test test_Gulden test_gulden # Resources cpp qrc_*.cpp # Mac specific .DS_Store build #lcov *.gcno *.gcda /*.info test_bitcoin.coverage/ total.coverage/ coverage_percent.txt #build tests linux-coverage-build linux-build win32-build test/config.ini test/cache/* !src/leveldb*/Makefile /doc/doxygen/ libguldenconsensus.pc contrib/devtools/split-debug.sh contrib/gitian-descriptors/*.yml #Auto generated npm files src/frontend/electron/dist #Private local config file for developer tools private.conf #Generated by translation system, not actually used by build src/qt/guldenstrings.cpp src/test/test_gulden_fuzzy debug debug2 release massif profile releasewithdebug foo foo2 *.po # In tree build files take form of /build/ and/or /build_ /build* # In tree files auto generated and/or downloaded for the Android build /developer-tools/android-ndk-gulden/ /djinni/ xcuserdata # Android Studio/IntelliJ IDE .idea ================================================ FILE: .gitmodules ================================================ ================================================ FILE: .mailmap ================================================ Willem de Jonge Willem de Jonge Malcolm MacLeod Malcolm Malcolm MacLeod Malcolm James MacLeod ================================================ FILE: .travis.yml ================================================ language: minimal dist: trusty sudo: required cache: ccache: true directories: - depends/built - depends/sdk-sources - $HOME/.ccache env: global: - MAKEJOBS=-j3 - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID - CCACHE_SIZE=500M - CCACHE_TEMPDIR=/tmp/.ccache-temp - CCACHE_COMPRESS=1 - CCACHE_DIR=$HOME/.ccache - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out - WINEDEBUG=fixme-all - DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache" matrix: include: - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-7 env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" HOST=x86_64-unknown-linux-gnu PACKAGES="libqrencode-dev libminiupnpc-dev libqwt-qt5-dev libqwt-headers python3-zmq libqt5webkit5-dev qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=false GOAL="install" GULDEN_CONFIG='--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS="-DBYPASS_TEST_REWRITES"' # - os: linux # addons: # apt: # sources: # - ubuntu-toolchain-r-test # packages: # - g++-7 # env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" HOST=x86_64-unknown-linux-gnu PACKAGES="libqrencode-dev libminiupnpc-dev python3-zmq protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=true GOAL="install" GULDEN_CONFIG='--enable-zmq --disable-wallet --with-gui=no --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS="-DBYPASS_TEST_REWRITES"' - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-7 env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" HOST=x86_64-unknown-linux-gnu PACKAGES="libqrencode-dev libminiupnpc-dev python3-zmq protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=true GOAL="install" GULDEN_CONFIG='--enable-zmq --disable-wallet --with-gui=no --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS="-DBYPASS_TEST_REWRITES"' #Tests only make dist - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-7 env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" HOST=x86_64-unknown-linux-gnu PACKAGES="libqrencode-dev libminiupnpc-dev libqwt-qt5-dev libqwt-headers python3-zmq libqt5webkit5-dev qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 ALLOW_HOST_PACKAGES=1" DIST_ONLY=true GOAL="install" GULDEN_CONFIG='--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS="-DBYPASS_TEST_REWRITES"' before_install: - eval "${MATRIX_EVAL}" - export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g") install: - env | grep -E '^(CCACHE_|WINEDEBUG|DISPLAY|BOOST_TEST_RANDOM|CONFIG_SHELL|TRAVIS)' | tee /tmp/env - DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env ubuntu:18.04) - DOCKER_EXEC () { docker exec $DOCKER_ID bash -c "cd $PWD && $*"; } - if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi - travis_retry DOCKER_EXEC apt-get update - travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES before_script: - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS; fi # Start xvfb if needed, as documented at https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI - if [ "$NEED_XVFB" = 1 ]; then DOCKER_EXEC /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac; fi script: - export TRAVIS_COMMIT_LOG=`git log --format=fuller -1` - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST - GULDEN_CONFIG_ALL="--enable-werror --disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib" - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi - test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh - mkdir build && cd build - DOCKER_EXEC "echo 'prefix=/usr' | tee /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'exec_prefix=/usr' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'libdir=/usr/lib64' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'includedir=/usr/include/qwt' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'Name:Qwt' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'Description:Qt Widgets for Technical Applications' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'Version:6.1.3' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'Libs:-lqwt-qt5' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC "echo 'Cflags:-I/usr/include/qwt' | tee -a /usr/share/pkgconfig/Qt5Qwt.pc" - DOCKER_EXEC ../configure --cache-file=config.cache $GULDEN_CONFIG_ALL $GULDEN_CONFIG || ( cat config.log && false) - if [ "DIST_ONLY" = "true" ]; then DOCKER_EXEC make dist; fi - if [ "DIST_ONLY" != "true" ]; then DOCKER_EXEC make $MAKEJOBS; fi # - if [ "$RUN_TESTS" = "true" ]; then travis_wait 60 DOCKER_EXEC ./src/test/test_gulden; fi after_script: - echo $TRAVIS_COMMIT_RANGE - echo $TRAVIS_COMMIT_LOG notifications: slack: secure: iNEHGC+a1uC0bGNKDH85XuSwk18Jyqb8t02dosNcZd46L1eZyUrcL/AoQBVw/r8Ay+dOUcTY6arjKrkobPjvXGpamrJo0ejI6vZlfe8t1nR+P7feYLDhYeJQ4yb6ZV7uKzOP+ZocoEoTKttsHkoWKGGNuNzHcPcjhzLkYmY3MHfGmIQDVcU6DAGGTw6SQB1FkMbOWpgpqXndidEpX6N8pdZ3gCG3EFLKI/xQAVlyvzEmQOc4uP4vLMVhCQVc03MgnQIm5DpbsPdMMp4h24ysstTIFk6zO8qwjqzeePr4bRWTYRdaVxIHvd269bo7rCMn7p+Apc+xHnDIaCHJbzrI7HN8iJ4Pe9W4MTOR/GUNesfQhnrkWndSYRfObTzpfZHOgdv+K9dQ+A+kn3CUEQfLXFtwtmafgpVzQ0PeU3mLqXJt1zzYVoxCSqyO/dpye9Ezr5cPged29a35lL80ChIywlL83EkbcXpctoA9AHu4M44h1gTCG5oleulsuQjEPnNZYdEKuY2uAmB0dszzbgu1R+BBVmnBQSW0LT1AwJGD/30SihQZhY+vXrJOBBTrQl6mrA7iX5kAe2o5kGCkVuKj/o8P9ia5LF88PsWibYm4cB+wt07DxVK/rjZDw/yi0+G59D6HrF0B2i8Jg7yJOQ2JyC3Au/1d+17tHmxqAdp6xPE= ================================================ FILE: CONTRIBUTING.md ================================================ Contributing to Munt ============================ Want to contribute to Munt? There are many ways you can contribute, see below. Opening issues -------------------- Open an issue to report bugs or to propose new features. Note please first check for existing issues before reporting new ones; and ideally check with the slack support channels that your issue is legitimate. Contributing code --------------------------- Code contributions are always welcome, simply submit a pull request for it to be reviewed. For larger changes first check with the developers and Munt community whether the changes are ones that fit the vision of the project and are not already being worked on by someone else, to avoid dissapointment and/or wasting your time. Keep your pull requests as clean as possible, don't mix multiple issues into one request, don't make unnecesssary formatting or name changes that make the patch larger than it needs to be, these can rather be split into multiple requests. View [the developer guidelines](./doc/developer_guidelines.md) for basic code style standards and suggestions. Testing --------------------------- Read here about our [testnet](./technical_documentation/accelerated_testnet.md) which includes a testbed for merchant integration and join the community on slack for further communication/assistance. Localisation/Translation ----------------------- Improvements/additions to the localisations are always welcome, however please don't modify the .ts files directly - the correct place to participate in translation is our translation portal translate.munt.org Discussion around translation can be had in the #translate channel on our slack. ================================================ FILE: COPYING ================================================ For licensing of all original portions of the code coming from the Munt project, please review the license in this file or in COPYING_munt which is an unmodified copy of the GNU Lesser General Public License v3 For licensing of all original unmodified portions of code coming from upstream, please review COPYING_upstream which is an unmodified copy of the upstream license. For licensing of all portions of the code in specific subdirectories, please review the COPYING or LICENSE file for the sub directory in question: src/secp256k1/COPYING; src/LRUCache/COPYING; src/crypto/ctaes/COPYING; src/univalue/COPYING; src/leveldb/LICENSE. In all cases review also the licensing comments in the files themselves which superceed the above when present. All code in this repository falls under the above licenses unless specifically stated otherwise in the file. All modifications to all files, irrespective of the original licensing of the file form part of the work of the Munt project and are subject to the GNU Lesser General Public License v3, please review the text below or in COPYING_munt which is an unmodified copy of the GNU Lesser General Public License v3. ----------------------------------------------------- GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser 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 Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ================================================ FILE: COPYING_munt ================================================ GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser 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 Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ================================================ FILE: COPYING_upstream ================================================ The MIT License (MIT) Copyright (c) 2009-2017 The Bitcoin Core developers 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 OR COPYRIGHT HOLDERS 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. ================================================ FILE: INSTALL.md ================================================ Windows ================ Download and install the latest .exe setup file from [releases](https://github.com/muntorg/munt-official/releases) Linux ================ Desktop users - Download and install the latest .AppImage from [releases](https://github.com/muntorg/munt-official/releases) Server/Embeddeded - Download and decompress the latest binaries for your architecture from [releases](https://github.com/muntorg/munt-official/releases) macOS ================ Download and install the latest .dmg file from [releases](https://github.com/muntorg/munt-official/releases) Building ================ See [build instructions](./doc/building.md) for instructions on building Munt. ================================================ FILE: Makefile.am ================================================ # Copyright (c) 2013-2016 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # File contains modifications by: The Centure developers # All modifications: # Copyright (c) 2016-2022 The Centure developers # Authored by: Malcolm MacLeod (mmacleod@gmx.com) # Distributed under the GNU Lesser General Public License v3, see the accompanying # file COPYING ACLOCAL_AMFLAGS = -I build-aux/m4 SUBDIRS = src .PHONY: deploy FORCE GZIP_ENV="-9n" export PYTHONPATH DAEMON_BIN=$(top_builddir)/src/$(_DAEMON_NAME)$(EXEEXT) CLI_BIN=$(top_builddir)/src/$(_CLI_NAME)$(EXEEXT) WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) empty := space := $(empty) $(empty) OSX_APP=Munt.app OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME)) OSX_DMG = $(OSX_VOLNAME).dmg OSX_BACKGROUND_SVG=background.svg OSX_BACKGROUND_IMAGE=background.tiff OSX_BACKGROUND_IMAGE_DPIS=36 72 OSX_DSSTORE_GEN=DS_Store OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist OSX_INSTALLER_ICONS=$(top_srcdir)/src/frontend/electron/build/icon.icns DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) DIST_CONTRIB = $(top_srcdir)/contrib/Munt-cli.bash-completion \ $(top_srcdir)/contrib/Munt-tx.bash-completion \ $(top_srcdir)/contrib/Munt-daemon.bash-completion \ $(top_srcdir)/contrib/init BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ $(top_srcdir)/contrib/devtools/security-check.py WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/icon.ico \ $(top_srcdir)/share/pixmaps/nsis-header.bmp \ $(top_srcdir)/share/pixmaps/nsis-wizard.bmp OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \ $(top_srcdir)/contrib/macdeploy/$(OSX_DSSTORE_GEN) \ $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \ $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh COVERAGE_INFO = baseline_filtered_combined.info baseline.info \ leveldb_baseline.info test_filtered.info total_coverage.info \ baseline_filtered.info functional_test.info functional_test_filtered.info \ leveldb_baseline_filtered.info test_coverage.info test.info dist-hook: -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - strip: all-recursive $(MKDIR_P) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(DAEMON_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(CLI_BIN) $(top_builddir)/release $(WIN_INSTALLER): all-recursive @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \ echo error: could not build $@ @echo built $@ $(OSX_APP)/Contents/PkgInfo: $(MKDIR_P) $(@D) @echo "APPL????" > $@ $(OSX_APP)/Contents/Resources/empty.lproj: $(MKDIR_P) $(@D) @touch $@ $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) $(MKDIR_P) $(@D) $(INSTALL_DATA) $< $@ $(OSX_APP)/Contents/Resources/Munt.icns: $(OSX_INSTALLER_ICONS) $(MKDIR_P) $(@D) $(INSTALL_DATA) $< $@ $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(MKDIR_P) $(@D) echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ $(OSX_APP)/Contents/Resources/Munt.icns $(OSX_APP)/Contents/Info.plist \ $(OSX_APP)/Contents/MacOS/Munt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings osx_volname: echo $(OSX_VOLNAME) >$@ if BUILD_DARWIN $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME) $(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG) sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@ $(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG) sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@ $(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png tiffutil -cathidpicheck $^ -out $@ deploydir: $(OSX_DMG) else APP_DIST_DIR=$(top_builddir)/dist APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/.VolumeIcon.icns $(APP_DIST_DIR)/Applications $(APP_DIST_DIR)/Applications: @rm -f $@ @cd $(@D); $(LN_S) /Applications $(@F) $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Munt $(OSX_DMG): $(APP_DIST_EXTRAS) $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist dpi%.$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_SVG) sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d $* -p $* | $(IMAGEMAGICK_CONVERT) - $@ OSX_BACKGROUND_IMAGE_DPIFILES := $(foreach dpi,$(OSX_BACKGROUND_IMAGE_DPIS),dpi$(dpi).$(OSX_BACKGROUND_IMAGE)) $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIFILES) $(MKDIR_P) $(@D) $(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@ $(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/$(OSX_DSSTORE_GEN) $(APP_DIST_DIR)/.VolumeIcon.icns: $(top_srcdir)/src/qt/res/icons/Munt.icns $(INSTALL) $< $@ deploydir: $(APP_DIST_EXTRAS) endif if TARGET_DARWIN appbundle: $(OSX_APP_BUILT) deploy: $(OSX_DMG) endif if TARGET_WINDOWS deploy: $(WIN_INSTALLER) endif $(DAEMON_BIN): FORCE $(MAKE) -C src $(@F) $(CLI_BIN): FORCE $(MAKE) -C src $(@F) if USE_LCOV baseline.info: $(LCOV) -c -i -d $(abs_builddir)/src -o $@ baseline_filtered.info: baseline.info $(LCOV) -r $< "/usr/include/*" -o $@ leveldb_baseline.info: baseline_filtered.info $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@ leveldb_baseline_filtered.info: leveldb_baseline.info $(LCOV) -r $< "/usr/include/*" -o $@ baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ test.info: baseline_filtered_combined.info $(MAKE) -C src/ check $(LCOV) -c -d $(abs_builddir)/src -t test -o $@ $(LCOV) -z -d $(abs_builddir)/src $(LCOV) -z -d $(abs_builddir)/src/leveldb test_filtered.info: test.info $(LCOV) -r $< "/usr/include/*" -o $@ functional_test.info: test_filtered.info -@TIMEOUT=15 python test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS) $(LCOV) -c -d $(abs_builddir)/src --t functional-tests -o $@ $(LCOV) -z -d $(abs_builddir)/src $(LCOV) -z -d $(abs_builddir)/src/leveldb functional_test_filtered.info: functional_test.info $(LCOV) -r $< "/usr/include/*" -o $@ test_coverage.info: baseline_filtered_combined.info test_filtered.info $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_filtered.info -o $@ total_coverage.info: baseline_filtered_combined.info test_filtered.info functional_test_filtered.info $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt test.coverage/.dirstamp: test_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ total.coverage/.dirstamp: total_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ cov: test.coverage/.dirstamp total.coverage/.dirstamp endif dist_noinst_SCRIPTS = autogen.sh EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) COPYING COPYING_munt COPYING_upstream EXTRA_DIST += \ test/util/util-test.py \ test/util/data/util-test.json \ test/util/data/blanktxv1.hex \ test/util/data/blanktxv1.json \ test/util/data/blanktxv2.hex \ test/util/data/blanktxv2.json \ test/util/data/tt-delin1-out.hex \ test/util/data/tt-delin1-out.json \ test/util/data/tt-delout1-out.hex \ test/util/data/tt-delout1-out.json \ test/util/data/tt-locktime317000-out.hex \ test/util/data/tt-locktime317000-out.json \ test/util/data/tx394b54bb.hex \ test/util/data/txcreate1.hex \ test/util/data/txcreate1.json \ test/util/data/txcreate2.hex \ test/util/data/txcreate2.json \ test/util/data/txcreatedata1.hex \ test/util/data/txcreatedata1.json \ test/util/data/txcreatedata2.hex \ test/util/data/txcreatedata2.json \ test/util/data/txcreatedata_seq0.hex \ test/util/data/txcreatedata_seq0.json \ test/util/data/txcreatedata_seq1.hex \ test/util/data/txcreatedata_seq1.json \ test/util/data/txcreatemultisig1.hex \ test/util/data/txcreatemultisig1.json \ test/util/data/txcreatemultisig2.hex \ test/util/data/txcreatemultisig2.json \ test/util/data/txcreatemultisig3.hex \ test/util/data/txcreatemultisig3.json \ test/util/data/txcreatemultisig4.hex \ test/util/data/txcreatemultisig4.json \ test/util/data/txcreateoutpubkey1.hex \ test/util/data/txcreateoutpubkey1.json \ test/util/data/txcreateoutpubkey2.hex \ test/util/data/txcreateoutpubkey2.json \ test/util/data/txcreateoutpubkey3.hex \ test/util/data/txcreateoutpubkey3.json \ test/util/data/txcreatescript1.hex \ test/util/data/txcreatescript1.json \ test/util/data/txcreatescript2.hex \ test/util/data/txcreatescript2.json \ test/util/data/txcreatescript3.hex \ test/util/data/txcreatescript3.json \ test/util/data/txcreatescript4.hex \ test/util/data/txcreatescript4.json \ test/util/data/txcreatesignv1.hex \ test/util/data/txcreatesignv1.json \ test/util/data/txcreatesignv2.hex \ src/data/chainparams_mainnet_static_checkpoint_data.cpp \ src/data/static_diff_data.cpp CLEANFILES = $(OSX_DMG) $(WIN_INSTALLER) .INTERMEDIATE: $(COVERAGE_INFO) DISTCHECK_CONFIGURE_FLAGS = --enable-man clean-local: rm -rf coverage_percent.txt test.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP) rm -rf test/functional/__pycache__ ================================================ FILE: README.md ================================================
Munt

Munt is a witness-secured decentralized network for payments, digital assets, finance and more
Munt takes the basic blockchain concept and improves on the areas where it has shortcomings in order to make a product that is more suitable for every day use.

The project is driven at the core by a focus on key concepts of usability and quality.

Join the Munt project today and help build the future!

ci build status
open issues
closed issues
total downloads
commits 1y
active_branch
### License All code, binaries and other assets in this repository are subject to [The GNU Lesser General Public License v3](https://github.com/muntorg/munt-official/blob/master/COPYING_munt) except where explicitely stated otherwise. ### Branches `master` branch tracks the current public release; is generally updated only for each release (with accompanying tag) and very occasionally for minor documentation or other commits. If all you want is to build/track the current version of the sofrware than use the `master` branch. `develop` branch tracks current major development branch This is where most development that will go into the next major release is always taking place (feature branches are merged into here) and is linked in the table at the top of this README as the `dev branch`. For development changes you will generally want to work on this branch. Major features are worked on in temporary feature branches until they can be merged back into one of the development branches. The currently most active branch, where most development that will go into the next major release is taking place is linked in the table at the top of this README as the `dev branch` and may be updated as development mandates seperate branches, for development changes you will generally want to work on this branch. Old versions that are still maintained get their own version branch e.g. there might be `2.4_development` even if we are already on `3.x` development series ### Contributing If you are thinking about contributing toward the development of Munt in some capacity whether small or large, code or translating; Please read [this guide](./CONTRIBUTING.md) first for information on how to do so. ### Technical documentation * [PoW² whitepaper](.//technical_documentation/PoW2.pdf); [PoW² activation](./technical_documentation/PoW2_activation.md) * [Transaction format](./technical_documentation/transaction_format.md) * [Account system](./technical_documentation/account_system.md) * [Accelerated testnet](./technical_documentation/accelerated_testnet.md) * [Official testnet](./technical_documentation/accelerated_testnet.md#official-testnet) ### Community Connect with the community through one or more of the following: [Website](https://munt.org) ◾ [Slack](https://munt.org/join) ◾ [Twitter](https://twitter.com/munt_org) ◾ [Facebook](http://facebook.com/gulden) ◾ [Meetup](https://www.meetup.com/gulden) ◾ [Reddit](https://www.reddit.com/r/munt) ◾ [IRC](https://web.libera.chat/?channels=Muntorg) ### Downloading The latest binaries and installers can be found [here](https://github.com/muntorg/munt-official/releases) for all platforms, including raspbian. ### Building [Binaries](https://github.com/munt/munt-official/releases) for both the UI as well as the daemon and command line interface for multiple architectures. For those who really need too or are technically inclined it is of course possible to build the software yourself. Please read the [build instructions](./doc/building.md) before attempting to build the software and/or seeking support. ### Additional technical information |Technical specifications|Main network|[Testnet](./technical_documentation/accelerated_testnet.md#official-testnet)| |:-----------|:---------|:---------| |Consensus algorithm:|PoW² SIGMA/Witness|PoW² SIGMA/Witness| |Recommended transaction confirmations:|2|2| |Block reward SIGMA:|75 (10|65) MUNT|1000 MUNT| |Block reward witness:|15 MUNT|20 MUNT| |Block interval target:|150 seconds (2.5 minutes)|Configurable| |Difficulty adjustment period:|Every block|Every block| |Difficulty adjustment algorithm:|Delta|Delta| |Total coins to be minted over time:|750M|-| |P2P Port|9231|9923| |RPC Port|9232|9924| |P2P Network Header|fcfef7e0|Look in debug.log| |Address version byte|38 (G)|65 (T)| |P2SH version byte|98 (g)|127 (t)| |BIP44 coin type|87 0x80000057|87 0x80000057| |**Infrastructure**|**Main network**|**[Testnet](./technical_documentation/accelerated_testnet.md#official-testnet)**| |Official block explorer|https://explorer.munt.org/|-| |Community block explorer|https://muntbook.org/|-| |Community block explorer|https://munt.chainviewer.org/|-| |DNS Seed 1|seed.gulden.com|-| |DNS Seed 2|amsterdam.gulden.com|-| |DNS Seed 3|rotterdam.gulden.network|-| ================================================ FILE: autogen.sh ================================================ #!/bin/sh # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. set -e srcdir="$(dirname $0)" cd "$srcdir" if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then LIBTOOLIZE="${GLIBTOOLIZE}" export LIBTOOLIZE fi which autoreconf >/dev/null || \ (echo "configuration failed, please install autoconf first" && exit 1) autoreconf --install --force --warnings=all ================================================ FILE: changelog.txt ================================================ 3.0.5 Final release by Centure developers Relicensed under the GNU Lesser General Public License v3 General maintenance, version bump of most electron/vue/node libraries, update of checkpoints and other data etc. UI - Transaction export functionality UI - Add a basic about dialog displaying licensing information 3.0.4 Maintenence release, no major changes. 3.0.2 CORE - Fix a crash that was triggering on windows builds 3.0.1 Software rebrands to Munt name. This build represents our final switch from Qt to Electron for UI builds, Qt is completely removed from the codebase, users who require Qt specific functionality should remain on 2.5.0 until the 3.x series matures and gains more features UI - New electron based UI CORE - Switch to guix for macOS builds as well; all official builds now done on guix CORE - Update various library dependencies to latest versions NET - Bump MIN_PEER_PROTO_VERSION to 70020; This will disconnect from network all peers not on 2.5.0 or above UI - Native M1/arm64 builds for macOS 2.5.0 Introduce reward changes At block 1'619'997 chain forks and per block dev reward is removed, with a once off dev payment of 100'000'000 NLG paid into address GSTG9pQ6yRdGurmjUDGwm8FyYc272vP13b To keep the eventual supply at exactly 700'000'000 other small changes are then made: * First halving is brought forward to block 2'074'989 * We slightly alter the rounding of each halving step to give cleaner numbers * We continue halving for more rounds all the way down to 0.00000001 reward * Final reward amount continues until block 433'009'989 with the 12.2709 NLG for this period being slowly paid out over a very very long period Halving schedule as follows (every four years): 5 mining, 7.5 witness 2 mining, 4 witness 1 mining, 2 witness 0.5 mining, 1 witness 0.2 mining, 0.5 witness 0.1 mining, 0.2 witness 0.05 mining, 0.1 witness 0.02 mining, 0.05 witness 0.01 mining, 0.02 witness 0.005 mining, 0.01 witness 0.002 mining, 0.005 witness 0.001 mining, 0.002 witness 0.0005 mining, 0.001 witness 0.0002 mining, 0.0005 witness 0.0001 mining, 0.0002 witness 0.00005 mining, 0.0001 witness 0.00002 mining, 0.00005 witness 0.00001 mining, 0.00002 witness 0.000005 mining, 0.00001 witness 0.000002 mining, 0.000005 witness 0.000001 mining, 0.000002 witness 0.0000005 mining, 0.000001 witness 0.0000002 mining, 0.0000005 witness 0.0000001 mining, 0.0000002 witness 0.00000005 mining, 0.0000001 witness 0.00000002 mining, 0.00000005 witness 0.00000001 mining, 0.00000002 witness (Stays here until completion - block 433'009'989) 2.4.11 This build aims to be the final 2.4.x series release after issues were found that prevented 2.4.8 from being so. As such it will likely represent the final Qt UI release with 2.5 series of builds replacing Qt with the electron UI. CORE - Implement several important fixes to the fast path of the "index based" portion of the coin cache, these issues would have resulted in nodes temporarily falling out of sync (until restarted) in some instances had the fast path been turned on however it has been off until now CORE - Turn on the fast path for "index based" portion of the coin caches, this should drastically improve node performance in some instances CORE - Introduce optimised sha256 implementations to take advantage of available CPU features (SSE4, neon etc.) when available/possible CORE - Various performance improvements, removal of lock contention in some instances CORE - Various improvements to mutexes to make it easier to spot issues as well as for better performance CORE - Improved debug logging in various places throghout the program CORE - Update linux builds to GCC 11 CORE - Update macOS builds to clang 14 (sdk 12) CORE - Update android builds to clang 12 (ndk r23b) CORE - Update windows builds to GCC 10 CORE - Switch to guix instead of gitian for official builds (all except macOS which will switch also for subsequent releases) CORE - With all compilers updated we are now able to target C++20 CORE - Update libraries (boost 1.77.0; zmq 4.3.4; univalue 1.0.4; leveldb 1.22+) CORE - Flush chainstate more frequently to prevent nodes having to resync if they terminate uncleanly after a full sync etc. LITE - Fix issue that was preventing lite wallet from functioning on testnet LITE - Fix a crash on macOS at program exit LITE - Fix/improve behaviour of loading/synchronisation screen and make it smoother LITE - Native M1/arm64 builds macOS RPC - Add a 'loaded' paramater to results of 'getmempoolinfo' command RPC - Improve/fix 'fundrawtransaction' command that failed in some instances RPC - Improve/fix help text for several commands QA - Introduction of more unit and functional tests Dozens of other stability, code quality, build system, testing etc. related fixes and improvements. 2.4.8 Final maintanence release ahead of upcoming 2.5 series of builds; 2.5 will fully activate witness sync and drop the deprecated Qt UI in favour of the electron one (Edit: This ended up not being the case) 2.4.7 CORE - Fix an issue that would cause witness loop to terminate under some error conditions CORE - Remove behaviour that would cause a complete resync under some error conditions, only do this on mobile/spv wallets and favour a plain assert on regular wallets instead RPC - Improve output for `validateaddress` command when used on witness addresses MISC - Various minor logging improvements to help with stability and user support 2.4.6 CORE - Introduce a discount on relay fees for transactions that contain mining/witness rewards 2.4.5 CORE - Chain stability fix for rare issue experienced by some peers 2.4.4 UI - Fix witness earning estimates for recent reward changes CORE - Improve regression in coin cache performance 2.4.3 CONSENSUS - Fix an issue with fresh syncs stalling, regression was introduced in 2.4.1 release CONSENSUS - Fix a rare issue with index based utxo getting corrupted (memory only, disk data remained valid) CORE - Fix an issue that was causing unnecessarily frequent flushing to disk; this should bring large performance improvements for machines with slow disks CORE - CORE: Major load time performance increase on large wallets, especially on machines with slower disks CORE - Introduce some code that makes it easier for users that missed the fork to update with any manual intervention CORE - Introduce some performance improvements to the code CORE - Various regtest/testing improvements and general codebase cleanup 2.4.1 RPC - Add arena setup time to "gethashps" output RPC - New command "getlinkedaccount" as counterpart for existing "importlinkedaccount" command CORE - Fix a DoS attack that can be utilised against miners 2.4.0 CONSENSUS - Implement proposed reward reductions and halving, as decided by community and GAB Reward changes to take place at block 1'400'000 Halvings every 842'500 blocks, this is roughly four years assuming stable block times (a tiny fraction over in order to make things work out smoothly) Very minor truncation based rounding applied when halving in order to keep numbers clean and end on a clean supply amount Final supply of 700'000'000 with last reward mined on block 17'727'500 CORE - Implement a new/simplified way of tracking the witness specific portion of the UTXO set, this improves code simplicity as well as efficiency in a variety of ways CORE - Implement methods/functionality to track/encode witness set "deltas" (changes) between blocks CONSENSUS - Store the witness set delta as part of each header, this allows for a very efficient syncing method which we are calling "witness sync" CONSENSUS - Enable spending of addresses with uncompressed keys again CONSENSUS - Allow renewal of multiple parts of the same witness account in a single transaction instead of requiring a renewal for each part CORE/UI - Introduce a separate mining parameter for number of threads to use for "arena setup" when mining so that this can be set independently of "mining threads" CORE - Fix a sync issue that would sometimes cause new installs to get stuck when syncing the first few blocks CORE - Apply some optimisations to ConnectBlock calls that should improve performance quite substantially on some machines RPC - "setgenerate" gains an extra parameter for the above, all miners should be aware of this as previous setgenerate syntax may fail RPC - New command "setwitnessrewardaddress" RPC - New command "restoreaccount" RPC - Improve behaviour of "deleteaccount" to permanently remove/purge accounts from the wallet if they are readonly accounts; as opposed to the regular behaviour of just hiding accounts that applies to other account types RPC - Fix return value of "enablenetwork" command RPC - Add "selected_shavite_implementation", "selected_echo_implementation" and "selected_argon_implementation" to "getmininginfo" output UI - Show "elapsed" time to current date for witness accounts ZMQ - Add a new ZMQ channel "zmqpubwallettx" And a variety of other small performance, stability and code quality enhancements, general maintenence etc. many of which are backported from the Florin project. 2.3.12 CORE - Mining/Witness stability fix; Fix an issue that was causing periodic freezing of some mining/witnessing nodes 2.3.11 Reduce eventual supply to a total of 750'000'000 coins as first step in implementing the supply reduction that has been requested by community/GAB; The intention is for the rewards to also change (as requested) however this will take place in a later release after a bit more time has been allowed for technical consideration of the implications. MISC - Minor performance improvements to witnessing RPC - New RPC command "submitheader" RPC - Fix an issue where "rotatewitnessaddress" would fail if used on account that has never performed any witness actions RPC - Introduce "forcesigseg" command (Only useful for development) RPC - Add command "repairwalletfromutxo" RPC - New command "decodeblock" RPC - New "defrag" command, this can be used to recombine lots of small "dust" outputs into one single output again RPC - New command "invalidateunwitnessedblocksatheight" This build contains quite a large variety of misc. bug fixes, code improvements and stability fixes, quite a few backported from Novo development. 2.3.10 MISC - New URI handlers "guldenlite:" and "guldenpro:" for specific targeting of lite/pro apps; "gulden:" URI handler still remains and will be used to target whichever app is installed UI - Add in-app sell functionality (as companion to recent buy functionality); In collaboration with Blockhut 2.3.9 RPC - Add 'selected_witness_index' info to 'getwitnessoutput' command Debug - Introduce split debug uploads for all linux/windows builds and add documentation on how to utilise it Bench - Add some additional benchmark info to "bench_sigma" tool 2.3.0.8 Fix a regression in SPV wallets causing sync issues on some devices 2.3.0.7 Minor maintenence release, introduce new buy behaviour into desktop wallets 2.3.0.6 LITE/UI - New/Improved buy functionality RPC - Introduce range based 'getwitnessinfo' ability for explorers and similar 2.3.0.5 Initial release of new "lite" wallet; an SPV based desktop wallet with trimmed down feature set for those who want something fast but with less features than the core wallet RPC - Fix '*' behaviour in listaccounts command RPC - Give 'decodescript' the ability to decode old phase3 transactions 2.3.0.4 CORE - Fix a crash in SIGMA verification code that could be triggered in some (relatively rare) instances RPC - Hide various "hidden" developer RPC commands from the autocomplete RPC - Introduce a new command "repairwitnessaddress" that can be used to repair a wallet if the witness key for a witness address is not available while wallet is locked (which is required for witnessing) RPC - Extend "validateaddress" command to give more information for witness addresses CORE - Minor improvement when renewing witness accounts; check for and repair any instances of missing witness key when doing a renewal 2.3.0.2 RPC - Implement new command "removeallorphans" RPC - Introduce a new command "checkwalletagainstutxo" NET - Increase minimum peer protocol version to ban old peers CORE - Checkpoint server deactivation has kicked in, so take away check and permanently disable auto checkpoints instead 2.3.0.1 Maintenance release, update to new code signing certificates. 2.3.0.0 CORE - Set checkpoint server deactivation for 1602774915 (Thursday, 15-Oct-20 15:15:15 UTC) Checkpointing is now no longer required with witnessing now fully implemented and stable as per the original whitepaper specification NET - Disallow all peers below protocol version 70018 after timestamp server deactivates RPC - Correction to return value of 'enablenetwork' command 2.2.0.14 CORE - Implement a change that improves mining efficiency for update miners CORE - Increment protocol version and ban older peer versions, this will lead to some bandwidth savings for nodes and make the network more efficient 2.2.0.12 CORE - Undo accidental increase in mining subsidy [Activate at block: 1228004] UI - Fix a minor regression in witness funding dialog 2.2.0.11 UI - Fix up display of various phase3 related accounts/transactions for older wallets. 2.2.0.10 CORE - Change dev subsidy reward to 80 NLG per block, as decided by GAB [Activate at block: 1226652 (Estimate 09/07/2020 @ 2:30pm (UTC+2)] CORE - Activate changes to the Delta difficulty adjustment algorithm, which should see slightly smoother block times [Activates at timestamp: 1599494400 09/07/2020 @ 6:00pm (UTC+2)] CORE - Fix a bug that was preventing witnesses from taking advantage of the ability to add transactions to the block they witness This should lead to smoother transaction verification (lower average time until first confirm) and also allow witnesses to earn a small amount extra through transaction rewards CMDFLAG - Implement blockmaxsize flag for witness block creation as well, previously was only for mining block creation RPC - Introduce some special case code to 'move' command to assist a small amount of 'legacy' phase3 witness accounts that otherwise experience difficulty being emptied when lock expires RPC - Fix balance display for 'getaccountbalances' RPC - Add rescan paramater to 'importwitnesskeys' RPC - Remove 'getwitnessinfo' support for all blocks prior to phase5 UI - Improve estimated earnings calculation in UI CORE - Fix a bug where in rare instances a "null" transaction could potentially be added to the wallet and make the wallet falsely appear corrupted on reload. There is no known release version of the code that could trigger this, however we protect against any future mistakes that might allow it to be sure CORE - Remove various phase3 related parts of the codebase, these removals improve application performance and simplify the codebase CORE - Remove old official testnet and start a new improved testnet in its place CORE - Introduce "genesis witness" concept for testnet, that allows accelerated testnets to start with witnessing/phase5 already active from block 0 CORE - Introduce various unity/node.js/electron related changes to the codebase, that will allow for electron UI to be adopted in future. Electron UI already in relatively advanced stages but needs further work before merge NB! (Only relevant for old phase3 accounts, does not apply to phase4 accounts) With the removal of special purpose phase3 code this release introduces some potential oddities to transaction lists for accounts that locked/unlocked funds to a phase 3 witness, instead of showing as a lock/unlock these actions will show as sending/receiving external funds. Witness generation actions of old phase 3 accounts will still show correctly. This will be cleaned up as part of the ongoing work on a new UI, and will show correctly again in future. 2.2.0.7 NET - Improve networking performance NET - Remove support for old protocol versions that are no longer supported RPC - Fix a crash in gettxoutsetinfo; Improve gettxoutsetinfo behaviour for new transaction output types RPC - Fix GetNetworkHashPS calculation; It was incorrectly including witness 'work' in the mining calculation and returning an overly high number as a result RPC - Introduce 'pow_time' and 'witness_time' fields to all block based RPC commands that include 'time' in the output; Change 'time' to display the most accurate time always (witness time if available, otherwise pow time) MINING - Prevent mining of orphan blocks while wallet is still syncing on startup UI - Fix a balance display issue some wallets were experiencing CORE - Fix a rare crash that was being triggered in some nodes CORE - Various performance improvements from removal of parts of the phase3 backwards support 2.2.0.6 UI - Fix a UI freeze that was occuring on 'finished' witness accounts RPC - Fix a crash in 'signrawtransaction' when signing new transaction types (of non script type) RPC - Improve 'dumpblockgaps' command to output data for both witness and PoW timestamps; previous behaviour considered PoW timestamps only RPC - Backport/add 'uptime' command from upstream RPC - Backport/add 'getblockstats' command from upstream RPC - Update second paramater of 'estimatesmartfee' from bool to string to match changes in upstream RPC - Add output of witness/spending pubkeyhash when calling validateaddress on a witness address CORE - Fix an issue some wallets were having with signing extend/optimise transactions CORE - Remove various parts of the old phase3 codebase, this should bring performance improvements 2.2.0.5 UI - Fix UI behaviour for upgrading expired witness accounts UI - Improve UI behaviour for displaying 'extend' button for witness accounts UI - Add/Fix "Ctrl+L" shortcut to clear debug console text RPC - Make 'renewwitnessaccount' command work also for upgrading witness accounts CORE - Restore 'first' mining address for those miners whose address was changed to a new one by buils containing the issue that was fixed in 2.2.0.3 release CORE - Improve mining behaviour for v2 transactions, insert an extra nonce, this is unlikely to matter at current mining speeds in any way but is better for correctness anyway. (Only really relevant in fringe cases like mining with -limitdeltadiffdrop=0) 2.2.0.4 UI - Fix display of witness locktime end date UI - Improve phase4 witness renewal so that multi-part witness accounts can renew all parts in one go UI - Fix display of witness earnings graph for expired accounts UI - Fix witness renewal for phase3; A regression broke it in some instances CORE - Fix an issue with txdb 'corrupting' its index based outpoints; also repair already corrupted databases in place CORE - Increase the size of the maximum allowed fee on the network to 2 NLG 2.2.0.3 UI - Fix issue where a witness account that had o nly partially been emptied could not be fully emptied UI - Fix a bug in witness overview when transaction was still pending first confirmation after funding UI - Fix some issues where transactions spending money out of witness accounts were not displaying the right amount in transaction list UI - Fix an issue with witness graph display strangely CORE - Fix an issue where mining address would change if doing a restore on top of an existing block chain CORE - Temporarily lower default memory usage on pis for first batch of 2.2 pi upgrades; we will raise these limits again in future 2.2.0.2 UI - Minor fixes to witness dialog CORE - Minor stability fixes 2.2.0.1 UI - Minor cosmetic fixes CORE - Minor stability fixes 2.2.0.0 This release incorporates several major feature branches, which combined involve over years of major development effort. Highlights include: * The final phase of our PoW² rollout, which brings new functionality to witness addresses/accounts * Our new 'v2' transaction format * Unity; A single unified codebase backend that is shared between desktop and mobile wallets PoW² phase4: CORE - Ability to compound witness earnings becomes active CORE - Delta difficulty adjustments now uses the more accurate witness time instead of the mining time, which should improve block timings and reduce hash rate swings UI - Easily toggle compounding on/off for a witness account UI - Extend the locktime and/or quantity of a witness account via UI UI - New optimise button which can be used on large witness accounts (>1% network weight) to divide/combine into smaller/larger parts for better earnings UI - Improved dialog for funding witness accounts; Also automatically optimizes large witness accounts (>1% network weight) into multiple parts when creating if appropriate RPC - Various Phase4 RPC commands become active: Add funds to a witness account and/or extend the lock period - extendwitnessaccount "funding_account" "witness_account" "amount" "time" Add funds to a witness address and/or extend the lock period - extendwitnessaddress "funding_account" "witness_address" "amount" "time" Split a witness account into multiple witness addresses; Lock period is not changed this exists for the benefit of users whose weight is too large for the network - splitwitnessaccount "funding_account" "witness_account" "amounts" Merge multiple identical witness addresses into a single one; Only works on identical accounts i.e. ones that have previously been split - mergewitnessaccount "funding_account" "witness_account" Change the witness key on an account where the key may have been compromised or as a periodic precaution - rotatewitnessaccount "funding_account" "witness_account" Change the witness key on an address where the key may have been compromised or as a periodic precaution - rotatewitnessaddress "funding_account" "witness_address" Set a witness account to compound all or part of the earnings it receives - setwitnesscompound "witness_account" "amount" Check the compounding settings for a witness account - getwitnesscompound "witness_account" Set an address or script other than the default for witness reward payout - setwitnessrewardscript "witness_account" "destination" force_pubkey Get the current address or script that has been set for witness reward payout - getwitnessrewardscript "witness_account" Set the compounding template for a witness account; Can be used to managed advanced configurations of how the reward should be paid out - setwitnessrewardtemplate "witness_account" [["destination1" (,"amount") (,"percentage%") (,"remainder") (,"compound_overflow")], ["destination2" ...], ...] Get the compounding template for a witness account - getwitnessrewardtemplate "witness_account" v2 transaction format (SegSig): CORE - New compact transaction format, with a "only pay for what you use" philosophy. Extensible transaction output/input types and flags for easier future extendability in various directions. Uses various built in methods like compact amount representation to ensure transactions are as small as possible while being efficient to process. CORE - Transaction functionality like RBF using proper built in flags instead of magic values CORE - Three new initial transaction types (extensible to more) * Script - Bitcoin compatible 'script' format as in v1 transaction format, for more complex types of transactions that require this functionality * StandardKeyHash - A compact and concise format for regular day to day transactions without the extra unnecessary processing overhead of a scripting language * PoW2WitnessOutput - A compact and concise format for witness transactions; Replaces the sub-optimal requirement of placing all the witnessing information in; More compact, faster to process and leads to a cleaner code base CORE - Compact transaction signatures used throghout for smaller transaction size CORE - Introduce 'index based outpoints' to new transaction format; allowing for reduction of transaction size in many cases. CORE - Remove unncessary requirement of 'OP_0' from multisig transaction signatures (Legacy bitcoin bug) CORE - Transaction signatures are seperate from the transaction script; Similar to SegWit, but done in a more efficient way that doesn't have to worry about backwards compatibility CORE - Remove sources of transaction malleability; Similar to SegWit, but done in a more efficient way that doesn't have to worry about backwards compatibility Other: CORE - Extend recovery phrase with (optional) birth number UI - Option to hide status bar when synchronized (default enabled). Disable to always show status indicators. RPC - Implement new 'importlinkedaccount' command. RPC - Add an optional purge option to 'deleteseed' command. RPC - Add 'initialblockdownload', 'automatic_pruning' and 'prune_target_size' fields to 'getblockchaininfo' results RPC - Add 'fail_count' and 'action_nonce' data to 'getwitnessinfo' command. And numerous more smaller changes and bug fixes, for a comprehensive list view the commit history on our github repository. 2.1.0.24 CORE - Lower default memory usage on devices with <1gb memory. CORE - Update to V2 nocks API for IBAN transactions. CORE - Several minor mining improvements UI - Display arena setup time in mining UI RPC - Improve 'resetdatadirpartial' and 'resetdatadirfull' functionality. 2.1.0.22 UI - Performance improvement when syncing with a wallet that has a witness account and lots of transactions UI - Introduce a way to show/hide orphan transactions in account transaction list UI - Transaction list export functionality, and button for account transaction list export UI - Add a context menu item to remove all orphan transactions for an account UI - New 'recipient' input field and related functionality for IBAN payments CORE - Fix an issue with reporting of peer IPv6 addresses CORE - Fix an issue with dual IPv6/IPv4 binds CORE - Fix an issue when binding multiple listening sockets 2.1.0.20 UI - Various minor UI fixes. CORE - Minor enhancements to SIGMA mining performance. CORE - Fix some periodic crashes and minor stability issues with SIGMA mining. CMDFLAG - New config flag "sigmaalgo" which can be used to bypass automatic algorithm detection. (Valid options currently are: ref, avx512f, avx2, avx, sse4.2, ssse3, avx512faes, avx2aes, avxaes, sse4.2aes, ssse3aes) 2.1.0.19 UI - Introduce an 'open datadir' button to debug info window UI - Fix a small bug with sending funds from mining account CORE - Fix various minor race conditions in code CORE - Minor improvements to default settings for low memory machines RPC - New support specific RPC commands to aid support staff in assisting users: resetdatadirpartial, resetdatadirfull, getcheckpoint, getlastblocks, resetconfig, resetconfig_pi_lowmem, resetconfig_pi_medmem RPC - Improve responsiveness of 'setgenerate' and 'getgenerate' commands RPC - Update output of getblock and other commands to include pre/post nonce 2.1.0.18 MISC - Introduce small new feature to help update users who got stuck on a fork UI - Automatically lower the mining memory limits on 32 bit systems that can't handle 4GB of process memory UI - Various minor improvements to mining UI CORE - Fix an issue with autodetection of mining accounts when recovering from phrase CORE - Improve the way total network hashrate is estimated (RPC: getnetworkhashps) RPC - New RPC command 'getminingrewardaddress' RPC - Improve the way human difficulty is displayed for SIGMA so that its more human friendly (not fractional) 2.1.0.17 MISC - Update checkpoints CORE - Improve upgrade procedure for any users who failed to upgrade for previous releases in time and were temporarily stuck on a fork. UI - Minor improvements to information display in mining dialog. 2.1.0.16 CORE - Temporarily reduce witness reward back to 20, due to unexpected complications with adjusting witness rewards during phase3. Reward will be restored to 30 at a future date after further discussion on how to proceed. 2.1.0.15 CORE - Adjust minimum PoW limit; as with delta hashrate is much slower than regular PoW algorithms. 2.1.0.14 CORE - Reduce mainnet proof of work limit to be lower as SIGMA works at a much lower difficulty, and is causing blocks to take very long to solve. 2.1.0.12 UI - Introduce new basic user interface for mining UI - Fix a bug on windows where closing the debug dialog with main app hidden could cause the entire app to close CORE - Introduce new 'mining' account type RPC - New command 'createminingaccount' RPC - New command 'setminingrewardaddress' RPC - Modify 'setgenerate' behaviour to work with mining accounts when present, a regular account can still be used by explicitely passing an account name when calling 'setgenerate' CMDFLAG - New flag '-genmemlimit' to go with existing '-gen' and '-genproclimit' 2.1.0.11 This release introduces the new SIGMA PoW algorithm, a 'CPU friendly' algorithm designed to better suit Guldens needs than the previous algorithm scrypt that was used before. CORE - Introduce new utility 'bench_sigma' for testing/benchmarking SIGMA outside of the Gulden app itself. CORE - Fix DOS vulnerability (crash) in witness bundle input checking CORE - Introduce SIGMA as the new PoW algorithm in testnet builds. CORE - Minor improve to Delta difficulty adjustment algorithm to work better with SIGMA CORE - Introduce new/modified reward schedule for development funding and slight increase in witness rewards (as per GAB decision) RPC - Modify 'setgenerate' command to take a memory paramater for SIGMA RPC - Improve output of 'getnetworkhashps' command RPC - Drop support for 'getblocktemplate' - it is not required for CPU mining and we can simplify the codebase without it. 2.1.0.7 RPC - Fix a bug in InvalidateBlock behaviour when called on a block that isn't currently in the main chain. CORE - Minor improvement to mining behaviour when an absent witness is present. UI - Fix a windows only issue with non-ASCII wallet paths. (Introduced by bdb upgrade) 2.1.0.6 MISC - Update checkpoints. CORE - Introduce an improvement to checkpoint server mechanism to temporarily help stabalise chain against mining instability. Mechanism will be removed once phase4 and/or SIGMA are active and is just a temporary measure. 2.1.0.5 CORE - Fix a rare issue where witnessing devices would fail to witness due to not completing a proper rescan after importing a witness address. CORE - Improve transaction propagation speed by pushing mempool to new connections CORE - Introduce builds of the UI client for all architectures ("arm" and "aarch64" previously did not have) CORE - Introduce "riscv64" to the list of officially supported architectures. CORE - Introduce AppImage installers for "arm" and "aarch64" RPC - New command "getaccountaddress" to get current receiving address (as would be displayed in UI) for an account. MISC - Update to newer version of Qt which should improve various minor UI aspects. 2.1.0.4 MISC - Minor maintenance release, update checkpoints and other minor changes CORE - Introduce some code to automatically detect and clear the failed verification status of blocks in certain situations where it is safe to do so. This will make it easier for users who fail to update before a fork to update after the fork without having to issue any manual commands. CORE - Add some additional logging of error conditions to the witness loop. CORE - Fix a potential race condition in networking code, that may have been the cause of very rare intermittent network related crashes. Detected on android as part of "unity" project. UI - Fix a display issue with "local currency" mouse-over tooltips. UI - Fix a small display update issue when switching between witness and normal accounts in some instances. UI - Clean up the language selection list in options dialog. ZMQ - Fix a bug in the NotifyStalledWitness ZMQ code. 2.1.0.3 UI - Modify witness QR for better interoperability with external apps. UI - Remove embedded webkit for buy page in favour of simply launching buy page in an external browser. RPC - Minor RPC fixes. 2.1.0.1 UI - Implement an address tab for witness accounts, for easier access of the current active witness account address and for better integration with third party monitoring apps. 2.1.0.0 CORE - Implement a few consensus level changes for witnessing, these are minor improvements but are better to make now before phase 4 activation for the sake of future code cleanliness. These changes will, these changes will activate at block 881000 (Estimated around 17-18th January 2019) all 2.0.x users should attempt to update before then, all 1.6.x users can remain on 1.6.x - contact developers for assistance if in doubt. UI - Minor UI fixes 2.0.0.17 RPC - Introduce new debug command verifywitnessaddress UI - Update styling and graphics 2.0.0.15 UI - Fix font issues with macOS mojave 2.0.0.14 CORE - Fix for upstream critical vulnerability CVE-2018-17144 2.0.0.12 UI - Improve visual look of the "all" button in the send coins dialog. UI - Fix a problem with increasing memory consumption over time that was affecting some users. UI - Fix an issue where emptying an "unlocked" witness account first required restarting the wallet. UI - Fix an issue where an "unlocked" witness account would show incorrect statistical information. CORE - Reduce memory footprint and improve performance of witness validation. 2.0.0.11 UI - Display full converted balance in upper left for forex (Euro or other currency) display instead of only available balance; Add a tooltip to break down the different amounts when hovered over. UI - Fix an issue where the transaction list would sometimes show confusing more recent timestamps when importing a witness-only key or recovering from phrase. RPC - New command "getaddress" as a way to easily get Gulden address(es) from a pubkey or script. RPC - New command "emptymempool" to temporarily empty the mempool of all transactions, useful for debugging as well as a last resort tool if mining pools ever find themselves in a situation where mempool is somehow misbehaving. RPC - Fix a crash when calling 'validateaddress' with no wallet. CORE - Fix a "CreateBlock" issue that was triggering in rare circumstances and affecting "getblocktemplate" RPC calls by miners when it did. CORE - Fix a crash that can occur during rescan when using zapwallettxes. CORE - Enable witness renewal and emptying of witness accounts whose lock period has expired - from block 797000 onwards. CMDFLAG - New command line flag "-disablenet" to start with networking disabled, useful in some debugging scenarios. CMDFLAG - New command line flag "-zmqpubstalledwitness=
" to turn on zmq monitoring for stalled witnesses. ZMQ - Add new message "stalledwitness" which can be used by services to monitor for slow and absent witnesses - enabled via CMDFLAG "zmqpubstalledwitness" 2.0.0.10 RPC - Make "getrescanprogress" command more responsive. UI - Fix an issue with "orphaned" witness earnings incorrectly showing as part of account balance. UI - Add a user alert message if number of witnesses on the network drops below 100 as a precaution to help keep the number of witnesses high. UI - Fix a bug with wallet rescan progress display. UI - Another fix to prevent "Failed to calculate witness info for candidate block" dialog from showing in situations where it isn't really harmful. UI - Fix an issue some users were having with unlocking wallet. UI - Fix an issue where the receive coins dialog would, when creating a new account, in certain instances temporarily show the address for a different account. UI - Allow emptying of non-witness funds if normal funds are somehow sent to a witness account address. UI - Fix a small glitch where empty wallet balance would occasionally display as -0.00 UI - Fix a transaction view issue where "locked from" transactions were occasionally displayed as "received from" instead. RPC - Fix a small issue with one of the weights being output incorrectly in `getwitnessinfo` command. RPC - Add some additional PoW² related output to 'getblock' and 'getheader' calls. RPC - Fix an occasional/intermittent issue where getblocktemplate would fail when called by mining pools CMDFLAG - Default "minimallogging" flag to on for arm and aarch64 architectures. CORE - Fix a block relay issue that combined with other factors was occasionally leading to temporary chain stalls. 2.0.0.9 CORE - Major witness validation performance improvement and memory usage reduction due to partial chain cloning CORE - Move some invalid block logic earlier in the block check process, this should help address some issues users have been experiencing as well as further stabalise the network. CORE - Simplify phase2/phase3 checks now that we know the final blocks where they activated; This will help performance in various ways and simplifies the code. CORE - Some minor performance improvements UI - Fix an underlying issue that was causing a "scary" looking message dialog to occasionally pop up and bother some users. UI - Fix an issue with witness earnings graph display for units other than "blocks" UI - Fix an occasional/random UI lockup when password dialog shows from backup page. CMDFLAG - Add a new flag `limitdeltadiffdrop=n` for mining pools, larger mining pools should set this to 0. Medium pools 1-6, very small pools can leave it off. CMDFLAG - Add new "minimallogging" flag for the benefit of users with limited disk space e.g. pi users 2.0.0.7 CORE - Fix a crash for users who run with -disablewallet 2.0.0.6 CORE - Stability fix for a minor crash issue some users might otherwise experience in phase 3. UI - Some very minor localisation and UI cleanups UI - Fix a balance display issue WALLET - Implement detection for an issue with incorrect HD index counter incrementing that may have affected some users in past versions of the software. Users who are affected are in no immediate danger but should be warned to rectify the issue regardless. NET - No longer advertise or establish outgoing connections to outdated (1.6.x) peers but allow incoming connections from them. 2.0.0.4 UI - Fix a (phase 3 only) issue where the transaction list sometimes displaying unnecessary duplicate "rejected" earning messages for every valid earning message. RPC - Add two commands disablewitnessing/enablewitnessing - useful for various testing scenarios and some other fringe use cases. NET - Fix an annoying instability issue (crash) in the networking code that is triggered by the checkpoint system in some scenarios. 2.0.0.2 UI - Implement an improved "new account" page; which makes witnessing more visible as well as better displays and advertizes various other capabilities of our wallets. UI - Resolve a minor issue where old Legacy accounts were incorrectly hidden by UI in some circumstances, due to an old already fixed issue that was in some older 1.6.x wallets. CMDFLAG - Add a new command line flag "-resyncforblockindexupgrade" for the benefit of some devices that may be having trouble upgrading. CMDFLAG - Add a new command line flag "-reverseheaders" to allow control over whether to use reverse headers or not. CORE - Various code quality improvements; travis now running with '-Werror -Wall -Wextra' for first time. 2.0.0.1 RPC - Fix a small issue with rescan progress percentage CORE - Fix an issue with locked wallets and account indexes that was triggering assertions in some cases. UI - Fix a possible minor crash that some users may have been encountering during upgrade. UI - Fix an issue with GuldenD and repeated unlock requests, limit to a single unlock request. 2.0.0 This release incorporates three new major feature branches, which combined involve over a year of intense development effort: * PoW² - See https://github.com/Gulden/gulden-official/raw/master/technical_documentation/Gulden_PoW2.pdf for technical information Highlights include: Ability to lock funds for a period of time and earn rewards while securing the network. Drastically enhanced network security. UI - New "witness overview" dialog with info and statistics on witness accounts, complete with a graph showing current and predicted earnings. UI - New "witness fund" dialog, with estimate to help pick the right weight when funding an account. CORE - New blockchain consensus rules for a PoW² driven blockchain with determistic witnessing. CORE - New address type for two key witness accounts CORE - New account types for witnessing, including special behaviour (hardening) of the witness key chain so that witness keys can be shared without compromising wallet security. CORE - New witness-only account types for linked witnessing between main wallet and a backup witness device. CORE - Automatic witnessing of incoming blocks in exchange for rewards RPC - New commands: View a statistical/informational snapshot of the witness system for any block in the blockchain - getwitnessinfo "block_specifier" verbose mine_only Create a new witness account - createwitnessaccount "name" Lock funds into a witness account - fundwitnessaccount "funding_account" "witness_account" "amount" "time" "force_multiple" Add funds to a witness account and/or extend the lock period - extendwitnessaccount "funding_account" "witness_account" "amount" "time" Add funds to a witness address and/or extend the lock period - extendwitnessaddress "funding_account" "witness_address" "amount" "time" Export a URL for creation of a linked "witness-only" account - getwitnessaccountkeys "witness_account" Import a "witness-only" account from a URL that has previously been exported - importwitnesskeys "account_name" "encoded_key_url" "create_account" Split a witness account into multiple witness addresses; Lock period is not changed this exists for the benefit of users whose weight is too large for the network - splitwitnessaccount "funding_account" "witness_account" "amounts" Merge multiple identical witness addresses into a single one; Only works on identical accounts i.e. ones that have previously been split - mergewitnessaccount "funding_account" "witness_account" Renew a witness account that has expired due to failiure to witness - renewwitnessaccount "witness_account" Change the witness key on an account where the key may have been compromised or as a periodic precaution - rotatewitnessaccount "funding_account" "witness_account" Change the witness key on an account where the key may have been compromised or as a periodic precaution - rotatewitnessaddress "funding_account" "witness_address" Set a witness account to compound all or part of the earnings it receives (phase 4 only) - setwitnesscompound "witness_account" "amount" Check the compounding settings for a witness account - getwitnesscompound "witness_account" Set an address or script other than the default for witness reward payout - setwitnessrewardscript "witness_account" "address_or_script" force_pubkey Get the current address or script that has been set for witness reward payout - getwitnessrewardscript "witness_account" RPC - GetBlockTemplate support for mining in conjunction with phase 3 witnessing. * SegSig - A new transaction format. See https://github.com/Gulden/gulden-official/blob/master/technical_documentation/transaction_format.md for technical information. Highlights include: Solving of malleability issues; More compact transactions (over 50% in some cases) leading to increased network capacity for peak transaction periods; New transaction types (for PoW²); Extensible transaction types for future development. CORE - Implement fixes for transaction malleability CORE - Implement new more compact transaction format CORE - Implement two new transaction types "StandardKeyHash" and "PoW2_Witness" CORE - Implement version scheme allowing easy future creation of additional compact special purpose transactions CORE - Witness based version bit activation, for better control of future updates. Feature activation can now be controlled by "miner voting", "witness voting" or a combination at developer discretion. * Sonic - The sonic project involves multiple changes to the p2p networking stack within Gulden. Highlights include: A switch to boost::asio for the networking stack to replace the old select() based networking code; Multiple improvements to the initial chain synchronisation process, including reverse header synchronisation, making it drastically faster; Removal of limitations to how many peers a server can handle, which helps solve scalability/congestion issues on the network in peak usage periods. * Non exhaustive list of additional general changes. UI - Gulden desktop client gains an automatic update check to alert users of updates. Update check is cryptographically secured to ensure that it cannot be tampered with. UI - Improved handling of wallet alerts/warnings through a new warning dialog. UI - New "all" button on send coin screen to send all funds. UI - Major reworking of send coin screen including improved Nocks integration and many other bug fixes. UI - Improve handling of small window sizes; hide some window elements on smaller windows when necessary. UI - Add localisation for the loading/splash screen when wallet first opens. CORE - Improved handling of "private key" imports. CORE - Major performance improvements for wallets with lots of transactions. CORE - Major performance improvements for wallets with lots of accounts. CORE - Performance improvements when creating new accounts. CORE - Numerous other performance improvements throughout the wallet. CORE - Major reworking of application life cycle management (open/close); so that it is faster and more consistent across applications. This forms the first step of our future "Unity" project, and fixes various crash at exit bugs and possible sources of wallet corruption. CMDFLAG - Add a -windowtitle command flag, primarily intended to be used to assist with testing so that multiple program instances can be easily distinguished. CMDFLAG - Add a new -disableui flag to start with just a RPC console (and wallet); Useful for some types of debugging. RPC - New command 'getaccountbalances' return a list of individual balances for all accounts. RPC - New command 'listunspentforaccount' as account specific counterpart for listunspent. RPC - New command 'rescan' to trigger a wallet rescan (Same as Tools>rescan via UI). RPC - New command 'getrescanprogress' to view the progress percentageof an ongoing wallet rescan. RPC - New command 'getimmaturebalance' as conterpart to 'getunconfirmedbalance' RPC - Add account capability to 'sendmany' command. RPC - Modify 'listaccounts' command to take an optional second paramater to filter on account state. Add a new "state" field to the output and clarify better the difference between "type" and "HD_type" And many more changes and bug fixes, for a comprehensive list view the commit history on our github repository. 1.6.4.8 Minor maintenence release. UI - Introduce a new informational widget and other minor UI improvements that make it move obvious to users that the wallet is not yet available during initial sync. UI - Add a new menu item for setting the currency. UI - Fix a crash in the send dialog on machines with no network connection. UI - Remove bitcoin payment option from send screen CORE - Update checkpoints, static difficulties, static seeds and other static information to help assist new users with better syncing experience. 1.6.4.7 Minor testnet related release. 1.6.4.6 RPC - Fix an issue introduced in 1.6.4.3 which can cause users running with "-disablewallet" to experience RPC freezes when calling certain RPC commands. 1.6.4.5 UI - Fix "run on boot" links that were broken by testnet changes and other minor "run on boot" corrections. 1.6.4.1 Minor bugfix release. UI - Some small translation changes RPC - Add an HDIndex flag to 'listaccounts' RPC output, useful for debugging HD wallet issues. CORE - Speed up address allocation when -keypool is set to a larger than default size. 1.6.4 CMDFLAG - Add new command line flag '-coinbasesignature' to make it easy to add coinbase signatures to generated blocks (predominantly meant for testnet) CMDFLAG - Add new command line flag '-accountpool' to increase the default account look ahead size. (Needed in some cases to find accounts on rescan when large account gaps are present) UI - Add a special warning if the users wallet.dat is readonly (instead of displaying a generic/scary 'corrupted wallet' message) UI - Improvements to send dialog, improve handling when user tries to send amounts equal too or larger than available balance. UI - New menu item for importing private keys. UI - New menu item to allow users to easily rescan without having to use command line flags or mess around in RPC console. UI - Improve the way rescan (and other actions that require progress) display in the program. UI - Fix a bug where transaction screen would sometimes show transactions for all accounts instead of just the active one. RPC - Modify createaccount command so that it can also create legacy accounts. RPC - New commands for read only (watch) HD accounts. getreadonlyaccount, importreadonlyaccount. RPC - New command for read only (watch) HD seeds, getreadonlyseed. RPC - New 'deleteaccount' command RPC - Modify 'move' command so that it can handle `-1` as input for the amount field, passing '-1' will calculate the available balance in the account for the confirmation level passed and transfer all of it. RPC - Merge a bug fix from user 'mezrin' for 'dumpwallet' command. RPC - Fix a bug in command 'gettransaction' where transaction would not show if 'rpconlylistsecuredtransactions' flag was set to false. CORE/RPC/UI - Support for read only (watch) HD accounts. CORE/RPC/UI - Support for read only (watch) HD seeds. CORE - Assorted other minor bug fixes. 1.6.3 RPC - Fix incorrect getaddressesbyaccount output. CORE - Fix a possible crash in the checkpoint system. 1.6.2 RPC - Bring back command that was removed in 1.6.0, adapted to the new account system - getaccount "Guldenaddress" RPC - Bring back command that was removed in 1.6.0, adapted to the new account system - getaddressesbyaccount "account" 1.6.1 Minor bugfix release. 1.6.0 UI - New user interface with drastic improvements over the old user interface. UI - Ticker/Exchange rate integration into app. UI - In wallet support for buying coins with euro via nocks. UI/RPC/CORE - New 'account based' wallet internals. UI - New in wallet buy support for bitcoin and IBAN via nocks API. UI/RPC/CORE - Full support for BIP33 and BIP44 HD wallet standards with mnemonics. UI/CORE - Implement support for synchronised mobile accounts. CORE - Update to upstream bitcoin 0.13 codebase providing numerous bug fixes and improvements. CORE - Improve the checkpointing code, fix a checkpoint corruption issue that some users were experiencing. RPC - Change 'rpconlylistsecuredtransactions' to be on by default. 1.5.5 CORE - Introduce a checkpoint system to protect against 50% attacks. UI - Update the UI so that only checkpointed transactions are marked as 'final' RPC - Update several commands so that exchanges can make use of the checkpoint system to be double spend proof. 1.5.4 Minor bugfix release. 1.5.3 Minor bugfix release. 1.5.2 Minor bugfix release. CORE - Updated to new seed nodes. UI - Fixed an issue with some external URIs not working on OSX machines. CORE - Add the KGW fix to all platforms. 1.5.1 UI - Rebrand to Gulden, updated UI. CORE - Implement a fix for KGW difficulty algorithm on 32 bit systems - linux only. 1.5.0 CORE - New updated codebase based on bitcoin 0.10/0.11 CORE - Impement a new difficulty adjustment algorithm named DELTA. ================================================ FILE: configure.ac ================================================ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 7) define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2022) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Centure]]) AC_INIT([Munt],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@munt.org],[Munt]) AC_CONFIG_SRCDIR([src/init.cpp]) AC_CONFIG_HEADERS([src/config/build-config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])]) PKG_PROG_PKG_CONFIG if test "$PKG_CONFIG" = ""; then AC_MSG_ERROR([pkg-config not found]) fi m4_define([_DAEMON_NAME], [Munt-daemon]) m4_define([_CLI_NAME], [Munt-cli]) m4_define([_GUI_NAME], [Munt]) m4_define([_TX_NAME], [Munt-tx]) [_DAEMON_NAME]=_DAEMON_NAME [_CLI_NAME]=_CLI_NAME [_GUI_NAME]=_GUI_NAME [_TX_NAME]=_TX_NAME AC_DEFINE(DAEMON_NAME, "_DAEMON_NAME", [Command name of the deamon binary]) AC_DEFINE(CLI_NAME, "_CLI_NAME", [Command name of the cli binary]) AC_DEFINE(GUI_NAME, "_GUI_NAME", [Command name of the gui binary]) AC_DEFINE(TX_NAME, "_TX_NAME", [Command name of the tx binary]) dnl Unless the user specified ARFLAGS, force it to be cr AC_ARG_VAR([ARFLAGS], [Flags for the archiver, defaults to if not set]) if test "${ARFLAGS+set}" != "set"; then ARFLAGS="cr" fi AC_CANONICAL_HOST AH_TOP([#ifndef BUILD_CONFIG_H]) AH_TOP([#define BUILD_CONFIG_H]) AH_BOTTOM([#endif //BUILD_CONFIG_H]) dnl faketime breaks configure and is only needed for make. Disable it here. unset FAKETIME dnl Automake init set-up and checks AM_INIT_AUTOMAKE([1.13 no-define subdir-objects foreign]) dnl faketime messes with timestamps and causes configure to be re-run. dnl --disable-maintainer-mode can be used to bypass this. AM_MAINTAINER_MODE([enable]) dnl make the compilation flags quiet unless V=1 is used AM_SILENT_RULES([yes]) dnl Compiler checks (here before libtool). if test "${CXXFLAGS+set}" = "set"; then CXXFLAGS_overridden=yes else CXXFLAGS_overridden=no fi AC_PROG_CXX dnl By default, libtool for mingw refuses to link static libs into a dll for dnl fear of mixing pic/non-pic objects, and import/export complications. Since dnl we have those under control, re-enable that functionality. case $host in *mingw*) lt_cv_deplibs_check_method="pass_all" ;; esac AC_ARG_WITH([seccomp], [AS_HELP_STRING([--with-seccomp], [enable experimental syscall sandbox feature (-sandbox), default is yes if seccomp-bpf is detected under Linux x86_64])], [seccomp_found=$withval], [seccomp_found=auto]) dnl Require C++17 compiler (no GNU extensions) AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory], [nodefault]) dnl Check if -latomic is required for CHECK_ATOMIC dnl Check for compiler (not cpu/runtime) intrinsic support. INTRINSIC_FLAG_CHECK dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures dnl that we get the same -std flags for both. m4_ifdef([AC_PROG_OBJCXX],[ if test "${OBJCXX+set}" = ""; then OBJCXX="${CXX}" fi AC_PROG_OBJCXX ]) dnl Since libtool 1.5.2 (released 2004-01-25), on Linux libtool no longer dnl sets RPATH for any directories in the dynamic linker search path. dnl See more: https://wiki.debian.org/RpathIssue LT_PREREQ([1.5.2]) dnl Libtool init checks. LT_INIT([pic-only win32-dll]) LIBTOOL="$LIBTOOL --preserve-dup-deps" dnl Check/return PATH for base programs. AC_PATH_TOOL([AR], [ar]) AC_PATH_TOOL([RANLIB], [ranlib]) AC_PATH_TOOL([STRIP], [strip]) AC_PATH_TOOL([GCOV], [gcov]) AC_PATH_PROG([LCOV], [lcov]) dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python]) AC_PATH_PROG([GENHTML], [genhtml]) AC_PATH_PROG([GIT], [git]) AC_PATH_PROG([CCACHE], [ccache]) AC_PATH_PROG([XGETTEXT], [xgettext]) AC_PATH_PROG([HEXDUMP], [hexdump]) AC_PATH_TOOL(READELF, readelf) AC_PATH_TOOL(CPPFILT, c++filt) AC_PATH_TOOL([OBJCOPY], [objcopy]) AC_PATH_PROG(DJINNI_RUN, djinni-run,, $prefix/bin) AC_ARG_VAR([PYTHONPATH], [Augments the default search path for python module files]) # Enable wallet AC_ARG_ENABLE([wallet], [AS_HELP_STRING([--disable-wallet], [disable wallet (enabled by default)])], [enable_wallet=$enableval], [enable_wallet=yes]) AC_ARG_WITH([bdb], [AS_HELP_STRING([--without-bdb], [disable bdb wallet support (default is enabled if wallet is enabled)])], [use_bdb=$withval], [use_bdb=auto]) AC_ARG_WITH([miniupnpc], [AS_HELP_STRING([--with-miniupnpc], [enable UPNP (default is yes if libminiupnpc is found)])], [use_upnp=$withval], [use_upnp=auto]) AC_ARG_ENABLE([upnp-default], [AS_HELP_STRING([--enable-upnp-default], [if UPNP is enabled, turn it on at startup (default is no)])], [use_upnp_default=$enableval], [use_upnp_default=no]) AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]), [use_tests=$enableval], [use_tests=yes]) AC_ARG_ENABLE(gui-tests, AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]), [use_gui_tests=$enableval], [use_gui_tests=$use_tests]) AC_ARG_WITH([rapidcheck], [AS_HELP_STRING([--with-rapidcheck], [enable RapidCheck property based tests (default is yes if librapidcheck is found)])], [use_rapidcheck=$withval], [use_rapidcheck=auto]) AC_ARG_ENABLE(bench, AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]), [use_bench=$enableval], [use_bench=yes]) AC_ARG_ENABLE([extended-functional-tests], AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]), [use_extended_functional_tests=$enableval], [use_extended_functional_tests=no]) AC_ARG_WITH([qrencode], [AS_HELP_STRING([--with-qrencode], [enable QR code support (default is yes if qt is enabled and libqrencode is found)])], [use_qr=$withval], [use_qr=auto]) AC_ARG_ENABLE([hardening], [AS_HELP_STRING([--disable-hardening], [do not attempt to harden the resulting executables (default is to harden when possible)])], [use_hardening=$enableval], [use_hardening=auto]) AC_ARG_ENABLE([reduce-exports], [AS_HELP_STRING([--enable-reduce-exports], [attempt to reduce exported symbols in the resulting executables (default is no)])], [use_reduce_exports=$enableval], [use_reduce_exports=no]) AC_ARG_ENABLE([ccache], [AS_HELP_STRING([--disable-ccache], [do not use ccache for building (default is to use if found)])], [use_ccache=$enableval], [use_ccache=auto]) dnl Suppress warnings from external headers (e.g. Boost, Qt). dnl May be useful if warnings from external headers clutter the build output dnl too much, so that it becomes difficult to spot Core warnings dnl or if they cause a build failure with --enable-werror. AC_ARG_ENABLE([suppress-external-warnings], [AS_HELP_STRING([--enable-suppress-external-warnings], [Suppress warnings from external headers (default is no)])], [suppress_external_warnings=$enableval], [suppress_external_warnings=no]) AC_ARG_ENABLE([lcov], [AS_HELP_STRING([--enable-lcov], [enable lcov testing (default is no)])], [use_lcov=yes], [use_lcov=no]) AC_ARG_ENABLE([zmq], [AS_HELP_STRING([--disable-zmq], [disable ZMQ notifications])], [use_zmq=$enableval], [use_zmq=yes]) AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], []) AC_ARG_ENABLE(man, [AS_HELP_STRING([--disable-man], [do not install man pages (default is to install)])],, enable_man=yes) AM_CONDITIONAL([ENABLE_MAN], [test "$enable_man" != "no"]) dnl Enable debug AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [use compiler flags and macros suited for debugging (default is no)])], [enable_debug=$enableval], [enable_debug=no]) dnl Enable different -fsanitize options AC_ARG_WITH([sanitizers], [AS_HELP_STRING([--with-sanitizers], [comma separated list of extra sanitizers to build with (default is none enabled)])], [use_sanitizers=$withval]) dnl Enable gprof profiling AC_ARG_ENABLE([gprof], [AS_HELP_STRING([--enable-gprof], [use gprof profiling compiler flags (default is no)])], [enable_gprof=$enableval], [enable_gprof=no]) dnl Turn warnings into errors AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [Treat compiler warnings as errors (default is no)])], [enable_werror=$enableval], [enable_werror=no]) # Strong warnings AC_ARG_ENABLE([strong-warnings], [AS_HELP_STRING([--disable-strong-warnings], [Use compiler flags to generate extra warnings (default is yes)])], [strong_warnings=$enableval], [strong_warnings=yes]) AC_LANG_PUSH([C++]) AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) if test "x$enable_debug" = xyes; then CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER" if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -g3 -O0" fi if test "x$GXX" = xyes; then CXXFLAGS="$CXXFLAGS -g3 -O0" fi fi ERROR_CXXFLAGS= if test "x$enable_werror" = "xyes"; then if test "x$CXXFLAG_WERROR" = "x"; then AC_MSG_ERROR("enable-werror set but -Werror is not usable") fi AX_CHECK_COMPILE_FLAG([-Werror],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror"],,[[$CXXFLAG_WERROR]]) fi if test "x$strong_warnings" = "xyes"; then AX_CHECK_COMPILE_FLAG([-Wall],[CXXFLAGS="$CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wextra],[CXXFLAGS="$CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) ## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all ## unknown options if any other warning is produced. Test the -Wfoo case, and ## set the -Wno-foo case if it works. AX_CHECK_COMPILE_FLAG([-Wunused-parameter],[CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"],,[[$CXXFLAG_WERROR]]) 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]]) AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]]) fi CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" AC_ARG_WITH([utils], [AS_HELP_STRING([--with-utils], [build ]_CLI_NAME[ ]_TX_NAME[ binaries (default=yes)])], [build_utils=$withval], [build_utils=yes]) AC_ARG_WITH([node-js-libs], [AS_HELP_STRING([--with-node-js-libs], [build node.js library (default=no)])], [build_libs_node_js=$withval], [build_libs_node_js=no]) AC_ARG_WITH([jni-libs], [AS_HELP_STRING([--with-jni-libs], [build jni library (default=no)])], [build_libs_jni=$withval], [build_libs_jni=no]) AC_ARG_WITH([objc-libs], [AS_HELP_STRING([--with-objc-libs], [build objc library (default=no)])], [build_libs_objc=$withval], [build_libs_objc=no]) AC_ARG_WITH([daemon], [AS_HELP_STRING([--with-daemon], [build ]_DAEMON_NAME[ daemon (default=yes)])], [build_daemon=$withval], [build_daemon=yes]) case $host in *mingw*) TARGET_OS=windows AC_CHECK_LIB([mingwthrd],[main], [], [AC_MSG_ERROR([libmingwthrd missing])]) AC_CHECK_LIB([kernel32], [GetModuleFileNameA], [], [AC_MSG_ERROR([libkernel32 missing])]) AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])]) AC_CHECK_LIB([gdi32], [main], [], [AC_MSG_ERROR([libgdi32 missing])]) AC_CHECK_LIB([comdlg32], [main], [], [AC_MSG_ERROR([libcomdlg32 missing])]) AC_CHECK_LIB([winspool], [main], [], [AC_MSG_ERROR([libwinspool missing])]) AC_CHECK_LIB([winmm], [main], [], [AC_MSG_ERROR([libwinmm missing])]) AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])]) AC_CHECK_LIB([comctl32], [main], [], [AC_MSG_ERROR([libcomctl32 missing])]) AC_CHECK_LIB([ole32], [CoCreateInstance], [], [AC_MSG_ERROR([libole32 missing])]) AC_CHECK_LIB([oleaut32], [main], [], [AC_MSG_ERROR([liboleaut32 missing])]) AC_CHECK_LIB([uuid], [main], [], [AC_MSG_ERROR([libuuid missing])]) AC_CHECK_LIB([rpcrt4], [main], [], [AC_MSG_ERROR([librpcrt4 missing])]) AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])]) AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])]) AC_CHECK_LIB([mswsock], [main], [], [AC_MSG_ERROR([libmswsock missing])]) AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])]) AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])]) AC_CHECK_LIB([crypt32], [main], [], [AC_MSG_ERROR([libcrypt32 missing])]) dnl -static is interpreted by libtool, where it has a different meaning. dnl In libtool-speak, it's -all-static. AX_CHECK_LINK_FLAG([-static], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"]) AC_PATH_PROG([MAKENSIS], [makensis], [none]) if test "$MAKENSIS" = "none"; then AC_MSG_WARN([makensis not found. Cannot create installer.]) fi AC_PATH_TOOL([WINDRES], [windres], [none]) if test "$WINDRES" = "none"; then AC_MSG_ERROR([windres not found]) fi CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601" if test "x$CXXFLAGS_overridden" = "xno"; then CXXFLAGS="$CXXFLAGS -w" fi case $host in i?86-*) WINDOWS_BITS=32 ;; x86_64-*) WINDOWS_BITS=64 ;; *) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;; esac AC_SUBST(WINDOWS_BITS) dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are dnl also overridden to prevent their insertion later. dnl This should only affect dll's. archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" postdeps_CXX= ;; *darwin*) TARGET_OS=darwin if test x$cross_compiling != xyes; then BUILD_OS=darwin AC_CHECK_PROG([PORT],port, port) if test x$PORT = xport; then dnl add default macports paths CPPFLAGS="$CPPFLAGS -isystem /opt/local/include" LIBS="$LIBS -L/opt/local/lib" if test -d /opt/local/include/db48; then CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48" LIBS="$LIBS -L/opt/local/lib/db48" fi fi AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert) AC_CHECK_PROG([BREW],brew, brew) if test x$BREW = xbrew; then dnl These Homebrew packages may be keg-only, meaning that they won't be found dnl in expected paths because they may conflict with system files. Ask dnl Homebrew where each one is located, then adjust paths accordingly. dnl It's safe to add these paths even if the functionality is disabled by dnl the user (--without-wallet or --without-gui 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 "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then bdb_prefix=$($BREW --prefix berkeley-db@4 2>/dev/null) dnl This must precede the call to CENTURE_FIND_BDB48 below. BDB_CFLAGS="-I$bdb_prefix/include" BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8" fi fi else case $build_os in *darwin*) BUILD_OS=darwin ;; *) AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool) AC_PATH_TOOL([OTOOL], [otool], otool) AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage) AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert) AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert) AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp) dnl libtool will try to strip the static lib, which is a problem for dnl cross-builds because strip attempts to call a hard-coded ld, dnl which may not exist in the path. Stripping the .a is not dnl necessary, so just disable it. old_striplib= ;; esac fi AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"]) CPPFLAGS="$CPPFLAGS -DMAC_OSX" OBJCXXFLAGS="$CXXFLAGS" ;; *android*) dnl make sure android stays above linux for hosts like *linux-android* dnl libtool insists on inserting -nostdlib and other things which break our build, the below works around this archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname" postdeps_CXX= ;; *linux*) TARGET_OS=linux ;; esac if test x$use_extended_functional_tests != xno; then AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended) fi if test "$use_lcov" = "yes"; then if test "$LCOV" = ""; then AC_MSG_ERROR([lcov testing requested but lcov not found]) fi if test "$GCOV" = ""; then AC_MSG_ERROR("[lcov testing requested but gcov not found]) fi if test "$PYTHON" = ""; then AC_MSG_ERROR([lcov testing requested but python not found]) fi if test "$GENHTML" = ""; then AC_MSG_ERROR([lcov testing requested but genhtml not found]) fi LCOV="$LCOV --gcov-tool=$GCOV" AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"], [AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")]) AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"], [AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")]) fi dnl Check for endianness AC_C_BIGENDIAN dnl Check for pthread compile/link requirements AX_PTHREAD dnl The following macro will add the necessary defines to build-config.h, but dnl they also need to be passed down to any subprojects. Pull the results out of dnl the cache and add them to CPPFLAGS. AC_SYS_LARGEFILE dnl detect POSIX or GNU variant of strerror_r AC_FUNC_STRERROR_R if test "$ac_cv_sys_file_offset_bits" != "" && test "$ac_cv_sys_file_offset_bits" != "no" && test "$ac_cv_sys_file_offset_bits" != "unknown"; then CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" fi if test "$ac_cv_sys_large_files" != "" && test "$ac_cv_sys_large_files" != "no" && test "$ac_cv_sys_large_files" != "unknown"; then CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" fi AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) AX_GCC_FUNC_ATTRIBUTE([visibility]) AX_GCC_FUNC_ATTRIBUTE([dllexport]) AX_GCC_FUNC_ATTRIBUTE([dllimport]) if test "$enable_gprof" = "yes"; then dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense, dnl we simply make them mutually exclusive here. Additionally, hardened toolchains may force dnl -pie by default, in which case it needs to be turned off with -no-pie. if test "$use_hardening" = "yes"; then AC_MSG_ERROR([gprof profiling is not compatible with hardening. Reconfigure with --disable-hardening or --disable-gprof]) fi use_hardening=no AX_CHECK_COMPILE_FLAG([-pg],[GPROF_CXXFLAGS="-pg"], [AC_MSG_ERROR([gprof profiling requested but not available])], [$CXXFLAG_WERROR]) AX_CHECK_LINK_FLAG([-no-pie], [GPROF_LDFLAGS="-no-pie"]) AX_CHECK_LINK_FLAG([-pg], [GPROF_LDFLAGS="$GPROF_LDFLAGS -pg"], [AC_MSG_ERROR([gprof profiling requested but not available])], [$GPROF_LDFLAGS]) fi AC_SEARCH_LIBS([clock_gettime],[rt]) if test "$TARGET_OS" != "windows"; then dnl All windows code is PIC, forcing it on just adds useless compile warnings AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"]) fi if test "$use_hardening" != "no"; then use_hardening=yes AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[ AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[ HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE" ]) HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2" ]) AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"]) AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) if test "$TARGET_OS" != "windows"; then AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"]) AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-pie"], ["-Werror"]) fi case $host in *mingw*) AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])]) ;; esac fi dnl this flag screws up non-darwin gcc even when the check fails. special-case it. if test x$TARGET_OS = xdarwin; then AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) fi AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) AC_CHECK_DECLS([getifaddrs, freeifaddrs],,, [#include #include ] ) AC_CHECK_DECLS([strnlen]) dnl These are used for daemonization in daemon binary AC_CHECK_DECLS([fork]) AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,, [#if HAVE_ENDIAN_H #include #elif HAVE_SYS_ENDIAN_H #include #endif]) AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,, [#if HAVE_BYTESWAP_H #include #endif]) AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll]) dnl Check for MSG_NOSIGNAL AC_MSG_CHECKING(for MSG_NOSIGNAL) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ int f = MSG_NOSIGNAL; ]])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ], [ AC_MSG_RESULT(no)] ) dnl Check for MSG_DONTWAIT AC_MSG_CHECKING(for MSG_DONTWAIT) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ int f = MSG_DONTWAIT; ]])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_DONTWAIT, 1,[Define this symbol if you have MSG_DONTWAIT]) ], [ AC_MSG_RESULT(no)] ) dnl Check for malloc_info (for memory statistics information in getmemoryinfo) AC_MSG_CHECKING([for getmemoryinfo]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ int f = malloc_info(0, NULL); ]])], [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOC_INFO], [1], [Define this symbol if you have malloc_info]) ], [ AC_MSG_RESULT([no])] ) dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas) AC_MSG_CHECKING([for mallopt M_ARENA_MAX]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ mallopt(M_ARENA_MAX, 1); ]])], [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOPT_ARENA_MAX], [1], [Define this symbol if you have mallopt with M_ARENA_MAX]) ], [ AC_MSG_RESULT([no])] ) AC_MSG_CHECKING([for visibility attribute]) AC_LINK_IFELSE([AC_LANG_SOURCE([ int foo_def( void ) __attribute__((visibility("default"))); int main(){} ])], [ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT([no]) if test "$use_reduce_exports" = "yes"; then AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.]) fi ] ) dnl check for gmtime_r(), fallback to gmtime_s() if that is unavailable dnl fail if neither are available. AC_MSG_CHECKING([for gmtime_r]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ gmtime_r((const time_t *) nullptr, (struct tm *) nullptr); ]])], [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GMTIME_R], [1], [Define this symbol if gmtime_r is available]) ], [ AC_MSG_RESULT([no]); AC_MSG_CHECKING([for gmtime_s]); AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ gmtime_s((struct tm *) nullptr, (const time_t *) nullptr); ]])], [ AC_MSG_RESULT([yes])], [ AC_MSG_RESULT([no]); AC_MSG_ERROR([Both gmtime_r and gmtime_s are unavailable]) ] ) ] ) dnl Check for different ways of gathering OS randomness AC_MSG_CHECKING([for Linux getrandom syscall]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #include ]], [[ syscall(SYS_getrandom, nullptr, 32, 0); ]])], [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYS_GETRANDOM], [1], [Define this symbol if the Linux getrandom system call is available]) ], [ AC_MSG_RESULT([no])] ) AC_MSG_CHECKING([for getentropy]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ getentropy(nullptr, 32) ]])], [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY], [1], [Define this symbol if the BSD getentropy system call is available]) ], [ AC_MSG_RESULT([no])] ) AC_MSG_CHECKING(for sysctl KERN_ARND) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], [[ static const int name[2] = {CTL_KERN, KERN_ARND}; sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL_ARND, 1,[Define this symbol if the BSD sysctl(KERN_ARND) is available]) ], [ AC_MSG_RESULT(no)] ) # Check for reduced exports if test x$use_reduce_exports = xyes; then AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"], [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])]) fi dnl Check for libminiupnpc (optional) if test x$use_upnp != xno; then AC_CHECK_HEADERS( [miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], [AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])], [have_miniupnpc=no] ) fi AC_MSG_CHECKING([for fdatasync]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ fdatasync(0); ]])], [ AC_MSG_RESULT([yes]); HAVE_FDATASYNC=1 ], [ AC_MSG_RESULT([no]); HAVE_FDATASYNC=0 ] ) AC_DEFINE_UNQUOTED([HAVE_FDATASYNC], [$HAVE_FDATASYNC], [Define to 1 if fdatasync is available.]) AC_MSG_CHECKING([for F_FULLFSYNC]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ fcntl(0, F_FULLFSYNC, 0); ]])], [ AC_MSG_RESULT([yes]); HAVE_FULLFSYNC=1 ], [ AC_MSG_RESULT([no]); HAVE_FULLFSYNC=0 ] ) dnl crc32c platform checks AC_MSG_CHECKING([for __builtin_prefetch]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ char data = 0; const char* address = &data; __builtin_prefetch(address, 0, 0); ]])], [ AC_MSG_RESULT([yes]); HAVE_BUILTIN_PREFETCH=1 ], [ AC_MSG_RESULT([no]); HAVE_BUILTIN_PREFETCH=0 ] ) AC_MSG_CHECKING([for _mm_prefetch]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ char data = 0; const char* address = &data; _mm_prefetch(address, _MM_HINT_NTA); ]])], [ AC_MSG_RESULT([yes]); HAVE_MM_PREFETCH=1 ], [ AC_MSG_RESULT([no]); HAVE_MM_PREFETCH=0 ] ) dnl Check for Djinni if test x$build_libs_objc != xno; then if test x$DJINNI_OBJCXXFLAGS = x; then DJINNI_OBJCXXFLAGS=-I$prefix/include/objc fi AC_SUBST(DJINNI_OBJCXXFLAGS) fi if test "$enable_wallet" != "no"; then dnl Check for libdb_cxx only if wallet enabled if test "$use_bdb" != "no"; then CENTURE_FIND_BDB48 fi dnl Disable wallet if --without-bdb if test "$use_bdb" = "no"; then if test "$enable_wallet" = "yes"; then AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.]) fi enable_wallet=no fi fi if test "$build_utils$build_libs_node_js$build_libs_jni$build_libs_objc$build_daemon$use_tests$use_bench" = "nononononono"; then use_boost=no else use_boost=yes fi if test "$use_boost" = "yes"; then dnl Minimum required Boost version define(MINIMUM_REQUIRED_BOOST, 1.68.0) dnl Check for boost libs AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST]) AX_BOOST_SYSTEM AX_BOOST_FILESYSTEM AX_BOOST_PROGRAM_OPTIONS AX_BOOST_THREAD AX_BOOST_CHRONO dnl Boost 1.56 through 1.62 allow using std::atomic instead of its own atomic dnl counter implementations. In 1.63 and later the std::atomic approach is default. m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS" if test x$use_reduce_exports = xyes; then AC_MSG_CHECKING([for working boost reduced exports]) TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ #if BOOST_VERSION >= 104900 // Everything is okay #else # error Boost version is too old #endif ]])],[ AC_MSG_RESULT(yes) ],[ AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.]) ]) CPPFLAGS="$TEMP_CPPFLAGS" fi fi if test "$use_reduce_export" = "yes"; then CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS" AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"]) fi if test "$use_tests" = "yes"; then if test "$HEXDUMP" = ""; then AC_MSG_ERROR(hexdump is required for tests) fi if test "$use_boost" = "yes"; then AX_BOOST_UNIT_TEST_FRAMEWORK dnl Determine if -DBOOST_TEST_DYN_LINK is needed AC_MSG_CHECKING([for dynamic linked boost test]) TEMP_LIBS="$LIBS" LIBS="$LIBS $BOOST_LDFLAGS $BOOST_UNIT_TEST_FRAMEWORK_LIB" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_LINK_IFELSE([AC_LANG_SOURCE([ #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MAIN #include ])], [AC_MSG_RESULT(yes)] [TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"], [AC_MSG_RESULT(no)]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" fi fi if test "$use_boost" = "yes"; then BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB" dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums dnl using c++98 constructs. Unfortunately, this implementation detail leaked into dnl the abi. This was fixed in 1.57. dnl When building against that installed version using c++11, the headers pick up dnl on the native c++11 scoped enum support and enable it, however it will fail to dnl link. This can be worked around by disabling c++11 scoped enums if linking will dnl fail. dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51. TEMP_LIBS="$LIBS" LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_MSG_CHECKING([for mismatched boost c++11 scoped enums]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700 #define BOOST_NO_SCOPED_ENUMS #define BOOST_NO_CXX11_SCOPED_ENUMS #define CHECK #endif #include ]],[[ #if defined(CHECK) boost::filesystem::copy_file("foo", "bar"); #else choke; #endif ]])], [AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if dnl a working version is available, else fall back to sleep. sleep was removed dnl after 1.56. dnl If neither is available, abort. TEMP_LIBS="$LIBS" LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]],[[ #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); #else choke me #endif ]])], [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])], [boost_sleep=no]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" if test x$boost_sleep != xyes; then TEMP_LIBS="$LIBS" LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include ]],[[ #if BOOST_VERSION <= 105600 boost::this_thread::sleep(boost::posix_time::milliseconds(0)); #else choke me #endif ]])], [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])], [boost_sleep=no]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" fi if test "$boost_sleep" != "yes"; then AC_MSG_ERROR(No working boost sleep implementation found.) fi fi : dnl m4_ifdef( [PKG_CHECK_MODULES], [ PKG_CHECK_MODULES([CRYPTOPP], [libcryptopp],, PKG_CHECK_MODULES([CRYPTOPP], [libcrypto++],, [AC_MSG_ERROR(libcryptopp not found.)])) PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)]) PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)]) PKG_CHECK_MODULES([PROTOBUF], [protobuf],[have_protobuf=yes],[have_protobuf=no]) if test x$build_utils$build_daemon$use_tests$build_libs_node_js != xnononono; then PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)]) if test x$TARGET_OS != xwindows; then PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)]) fi fi ] ) dnl ZMQ check if test "$use_zmq" = "yes"; then PKG_CHECK_MODULES([ZMQ], [libzmq >= 4], AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]), [AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) use_zmq=no]) else AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) fi if test "$use_zmq" = "yes"; then dnl Assume libzmq was built for static linking case $host in *mingw*) ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" ;; esac fi save_CXXFLAGS="${CXXFLAGS}" CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}" AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT #include ]) CXXFLAGS="${save_CXXFLAGS}" dnl RapidCheck Property Based Testing enable_property_tests=no if test "$use_rapidcheck" = "auto"; then AC_CHECK_HEADERS([rapidcheck.h], [enable_property_tests=yes]) elif test "$use_rapidcheck" != "no"; then enable_property_tests=yes fi RAPIDCHECK_LIBS= if test "$enable_property_tests" = "yes"; then RAPIDCHECK_LIBS=-lrapidcheck fi AC_SUBST(RAPIDCHECK_LIBS) AM_CONDITIONAL([ENABLE_PROPERTY_TESTS], [test "$enable_property_tests" = "yes"]) AC_MSG_CHECKING([whether to build _DAEMON_NAME]) AM_CONDITIONAL([BUILD_DAEMON], [test "$build_daemon" = "yes"]) AC_MSG_RESULT($build_daemon) AC_MSG_CHECKING([whether to build utils (_CLI_NAME _TX_NAME)]) AM_CONDITIONAL([BUILD_UTILS], [test "$build_utils" = "yes"]) AC_MSG_RESULT($build_utils) AC_MSG_CHECKING([whether to build node.js libraries]) AM_CONDITIONAL([BUILD_LIBS_NODE_JS], [test "$build_libs_node_js" = "yes"]) AC_MSG_RESULT($build_libs_node_js) AC_MSG_CHECKING([whether to build jni libraries]) AM_CONDITIONAL([BUILD_LIBS_JNI], [test "$build_libs_jni" = "yes"]) AC_MSG_RESULT($build_libs_jni) AC_MSG_CHECKING([whether to build objc libraries]) AM_CONDITIONAL([BUILD_LIBS_OBJC], [test "$build_libs_objc" = "yes"]) AC_MSG_RESULT($build_libs_objc) AC_LANG_POP if test "$use_ccache" != "no"; then AC_MSG_CHECKING([if ccache should be used]) if test "$CCACHE" = ""; then if test "$use_ccache" = "yes"; then AC_MSG_ERROR([ccache not found.]); else use_ccache=no fi else use_ccache=yes CC="$ac_cv_path_CCACHE $CC" CXX="$ac_cv_path_CCACHE $CXX" fi AC_MSG_RESULT($use_ccache) if test "$use_ccache" = "yes"; then AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) fi fi dnl enable wallet AC_MSG_CHECKING([if wallet should be enabled]) if test "$enable_wallet" != "no"; then AC_MSG_RESULT([yes]) AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions]) enable_wallet=yes else AC_MSG_RESULT([no]) fi dnl enable upnp support AC_MSG_CHECKING([whether to build with support for UPnP]) if test "$have_miniupnpc" = "no"; then if test "$use_upnp" = "yes"; then AC_MSG_ERROR([UPnP requested but cannot be built. Use --without-miniupnpc]) fi AC_MSG_RESULT([no]) else if test "$use_upnp" != "no"; then AC_MSG_RESULT([yes]) AC_MSG_CHECKING([whether to build with UPnP enabled by default]) use_upnp=yes upnp_setting=0 if test "$use_upnp_default" != "no"; then use_upnp_default=yes upnp_setting=1 fi AC_MSG_RESULT([$use_upnp_default]) AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state]) if test "$TARGET_OS" = "windows"; then MINIUPNPC_CPPFLAGS="-DSTATICLIB -DMINIUPNP_STATICLIB" fi else AC_MSG_RESULT([no]) fi fi AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"]) AC_MSG_CHECKING([whether to build test_munt]) if test "$use_tests" = "yes"; then AC_MSG_RESULT([yes]) BUILD_TEST="yes" else AC_MSG_RESULT([no]) BUILD_TEST="" fi AC_MSG_CHECKING([whether to reduce exports]) if test "$use_reduce_exports" = "yes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi if test "$build_utils$build_libs_node_js$build_libs_jni$build_libs_objc$build_daemon$use_bench$use_tests" = "nonononononono"; then AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-jni-libs --with-objc-libs --with-daemon --with-gui --enable-bench or --enable-tests]) fi AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"]) AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"]) AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"]) AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"]) AM_CONDITIONAL([ENABLE_TESTS], [test "$BUILD_TEST" = "yes"]) AM_CONDITIONAL([ENABLE_BENCH], [test "$use_bench" = "yes"]) AM_CONDITIONAL([USE_QRCODE], [test "$use_qr" = "yes"]) AM_CONDITIONAL([USE_LCOV], [test "$use_lcov" = "yes"]) AM_CONDITIONAL([WORDS_BIGENDIAN], [test "$ac_cv_c_bigendian" = "yes"]) AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"]) AM_CONDITIONAL([TARGET_INTEL], [test x$host_cpu = xx86_64 -o x$host_cpu = xi686]) AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version]) AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version]) AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision]) AC_DEFINE(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD, [Version Build]) AC_DEFINE(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE, [Version is release]) AC_DEFINE(COPYRIGHT_YEAR, _COPYRIGHT_YEAR, [Copyright year]) AC_DEFINE(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS", [Copyright holder(s) before %s replacement]) AC_DEFINE(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION", [Replacement for %s in copyright holders string]) define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])]) AC_DEFINE(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL", [Copyright holder(s)]) AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR) AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR) AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION) AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS") AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION") AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL") AC_SUBST([_DAEMON_NAME]) AC_SUBST([_GUI_NAME]) AC_SUBST([_CLI_NAME]) AC_SUBST([_TX_NAME]) AC_SUBST(RELDFLAGS) AC_SUBST(DEBUG_CPPFLAGS) AC_SUBST(WARN_CXXFLAGS) AC_SUBST(NOWARN_CXXFLAGS) AC_SUBST(DEBUG_CXXFLAGS) AC_SUBST(COMPAT_LDFLAGS) AC_SUBST(ERROR_CXXFLAGS) AC_SUBST(HARDENED_CXXFLAGS) AC_SUBST(HARDENED_CPPFLAGS) AC_SUBST(HARDENED_LDFLAGS) AC_SUBST(PIC_FLAGS) AC_SUBST(PIE_FLAGS) AC_SUBST(SANITIZER_CXXFLAGS) AC_SUBST(SANITIZER_LDFLAGS) AC_SUBST(LIBTOOL_APP_LDFLAGS) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) AC_SUBST(BOOST_LIBS) AC_SUBST(TESTDEFS) AC_SUBST(MINIUPNPC_CPPFLAGS) AC_SUBST(MINIUPNPC_LIBS) AC_SUBST(HAVE_FDATASYNC) AC_SUBST(HAVE_FULLFSYNC) AC_SUBST(HAVE_BUILTIN_PREFETCH) AC_SUBST(HAVE_MM_PREFETCH) AC_SUBST(CRYPTO_LIBS) AC_SUBST(QWT_LIBS) AC_SUBST(HAVE_WEBENGINE_VIEW) AC_SUBST(SSL_LIBS) AC_SUBST(EVENT_LIBS) AC_SUBST(EVENT_PTHREADS_LIBS) AC_SUBST(ZMQ_LIBS) AC_SUBST(PROTOBUF_LIBS) AC_SUBST(QR_LIBS) AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi test/config.ini]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) AC_CONFIG_FILES([doc/Doxyfile]) AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) AC_CONFIG_LINKS([test/util/util-test.py:test/util/util-test.py]) dnl boost's m4 checks do something really nasty: they export these vars. As a dnl result, they leak into secp256k1's configure and crazy things happen. dnl Until this is fixed upstream and we've synced, we'll just un-export them. CPPFLAGS_TEMP="$CPPFLAGS" unset CPPFLAGS CPPFLAGS="$CPPFLAGS_TEMP" LDFLAGS_TEMP="$LDFLAGS" unset LDFLAGS LDFLAGS="$LDFLAGS_TEMP" LIBS_TEMP="$LIBS" unset LIBS LIBS="$LIBS_TEMP" PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" unset PKG_CONFIG_PATH PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP" 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_CONFIG_SUBDIRS([src/secp256k1]) AC_OUTPUT dnl Taken from https://wiki.debian.org/RpathIssue case $host in *-*-linux-gnu) AC_MSG_RESULT([Fixing libtool for -rpath problems.]) sed < libtool > libtool-2 \ 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' mv libtool-2 libtool chmod 755 libtool ;; esac dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows case ${OS} in *Windows*) sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini mv test/config-2.ini test/config.ini ;; esac echo echo "Options used to compile and link:" echo " with wallet = $enable_wallet" if test "$enable_wallet" != "no"; then echo " with bdb = $use_bdb" fi echo " with zmq = $use_zmq" echo " with test = $use_tests" echo " with bench = $use_bench" echo " with upnp = $use_upnp" echo " debug enabled = $enable_debug" echo " werror = $enable_werror" echo echo " target os = $TARGET_OS" echo " build os = $BUILD_OS" echo echo " CC = $CC" echo " CFLAGS = $CFLAGS" echo " CPPFLAGS = $CPPFLAGS" echo " CXX = $CXX" echo " CXXFLAGS = $CXXFLAGS" echo " LDFLAGS = $LDFLAGS" echo " ARFLAGS = $ARFLAGS" echo echo " Binaries:" echo " daemon: $build_daemon" echo " cli: $build_utils" echo " tx: $build_utils" echo echo " Libraries:" echo " jni: $build_libs_jni" echo " objc: $build_libs_objc" echo " node_js: $build_libs_node_js" ================================================ FILE: contrib/Munt-cli.bash-completion ================================================ # bash programmable completion for Munt-cli(1) # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # call $Munt-cli for RPC _munt_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do case "$i" in -conf=*|-datadir=*|-regtest|-rpc*|-testnet) rpcargs=( "${rpcargs[@]}" "$i" ) ;; esac done $munt_cli "${rpcargs[@]}" "$@" } # Add wallet accounts to COMPREPLY _munt_accounts() { local accounts accounts=$(_munt_rpc listaccounts | awk -F '"' '{ print $2 }') COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } _munt_cli() { local cur prev words=() cword local munt_cli # save and use original argument to invoke Munt-cli for -help, help and RPC # as Munt-cli might not be in $PATH munt_cli="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword if ((cword > 5)); then case ${words[cword-5]} in sendtoaddress) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; esac fi if ((cword > 4)); then case ${words[cword-4]} in importaddress|listtransactions|setban) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; signrawtransaction) COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) return 0 ;; esac fi if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) _munt_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; esac fi if ((cword > 2)); then case ${words[cword-2]} in addnode) COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) return 0 ;; setban) COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) return 0 ;; fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; move|setaccount) _munt_accounts return 0 ;; esac fi case "$prev" in backupwallet|dumpwallet|importwallet) _filedir return 0 ;; getaddednodeinfo|getrawmempool|lockunspent|setgenerate) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) _munt_accounts return 0 ;; esac case "$cur" in -conf=*) cur="${cur#*=}" _filedir return 0 ;; -datadir=*) cur="${cur#*=}" _filedir -d return 0 ;; -*=*) # prevent nonsense completions return 0 ;; *) local helpopts commands # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then helpopts=$($munt_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then commands=$(_munt_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) # Prevent space if an argument is desired if [[ $COMPREPLY == *= ]]; then compopt -o nospace fi return 0 ;; esac } && complete -F _munt_cli Munt-cli # Local variables: # mode: shell-script # sh-basic-offset: 4 # sh-indent-comment: t # indent-tabs-mode: nil # End: # ex: ts=4 sw=4 et filetype=sh ================================================ FILE: contrib/Munt-daemon.bash-completion ================================================ # bash programmable completion for Munt-daemon(1) and Munt(1) # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. _Munt_daemon() { local cur prev words=() cword local Munt_daemon # save and use original argument to invoke Munt-daemon for -help # it might not be in $PATH Munt_daemon="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword case "$cur" in -conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*) cur="${cur#*=}" _filedir return 0 ;; -datadir=*) cur="${cur#*=}" _filedir -d return 0 ;; -*=*) # prevent nonsense completions return 0 ;; *) # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then local helpopts helpopts=$($Munt_daemon -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi # Prevent space if an argument is desired if [[ $COMPREPLY == *= ]]; then compopt -o nospace fi return 0 ;; esac } && complete -F _Munt_daemon Munt-daemon Munt # Local variables: # mode: shell-script # sh-basic-offset: 4 # sh-indent-comment: t # indent-tabs-mode: nil # End: # ex: ts=4 sw=4 et filetype=sh ================================================ FILE: contrib/Munt-tx.bash-completion ================================================ # bash programmable completion for Munt-tx(1) # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. _munt_tx() { local cur prev words=() cword local munt_tx # save and use original argument to invoke Munt-tx for -help # it might not be in $PATH munt_tx="$1" COMPREPLY=() _get_comp_words_by_ref -n =: cur prev words cword case "$cur" in load=*:*) cur="${cur#load=*:}" _filedir return 0 ;; *=*) # prevent attempts to complete other arguments return 0 ;; esac if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then # only options (or an uncompletable hex-string) allowed # parse Munt-tx -help for options local helpopts helpopts=$($munt_tx -help | sed -e '/^ -/ p' -e d ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) else # only commands are allowed # parse -help for commands local helpcmds helpcmds=$($munt_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) fi # Prevent space if an argument is desired if [[ $COMPREPLY == *= ]]; then compopt -o nospace fi return 0 } && complete -F _munt_tx Munt-tx # Local variables: # mode: shell-script # sh-basic-offset: 4 # sh-indent-comment: t # indent-tabs-mode: nil # End: # ex: ts=4 sw=4 et filetype=sh ================================================ FILE: contrib/README.md ================================================ Repository Tools --------------------- ### [Qos](/contrib/qos) ### A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Munt network. This means one can have an always-on Munt-daemon instance running, and another local Munt-daemon/Munt instance which connects to this node and receives blocks from it. ### [Seeds](/contrib/seeds) ### Utility to generate the pnSeed[] array that is compiled into the client. Build Tools and Keys --------------------- ### [guix(/contrib/guix) ### Notes on getting guix builds up and running, scripts for running guix builds. ### [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 Munt tests. ================================================ FILE: contrib/devtools/security-check.py ================================================ #!/usr/bin/env python # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, and the program will be silent. Otherwise the exit status will be 1 and it will log which executables failed which checks. Needs `readelf` (for ELF) and `objdump` (for PE). ''' from __future__ import division,print_function,unicode_literals import subprocess import sys import os READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump') NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning def check_ELF_PIE(executable): ''' Check for position independent executable (PIE), allowing for address space randomization. ''' p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') ok = False for line in stdout.split(b'\n'): line = line.split() if len(line)>=2 and line[0] == b'Type:' and line[1] == b'DYN': ok = True return ok def get_ELF_program_headers(executable): '''Return type and flags for ELF program headers''' p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') in_headers = False count = 0 headers = [] for line in stdout.split(b'\n'): if line.startswith(b'Program Headers:'): in_headers = True if line == b'': in_headers = False if in_headers: if count == 1: # header line ofs_typ = line.find(b'Type') ofs_offset = line.find(b'Offset') ofs_flags = line.find(b'Flg') ofs_align = line.find(b'Align') if ofs_typ == -1 or ofs_offset == -1 or ofs_flags == -1 or ofs_align == -1: raise ValueError('Cannot parse elfread -lW output') elif count > 1: typ = line[ofs_typ:ofs_offset].rstrip() flags = line[ofs_flags:ofs_align].rstrip() headers.append((typ, flags)) count += 1 return headers def check_ELF_NX(executable): ''' Check that no sections are writable and executable (including the stack) ''' have_wx = False have_gnu_stack = False for (typ, flags) in get_ELF_program_headers(executable): if typ == b'GNU_STACK': have_gnu_stack = True if b'W' in flags and b'E' in flags: # section is both writable and executable have_wx = True return have_gnu_stack and not have_wx def check_ELF_RELRO(executable): ''' Check for read-only relocations. GNU_RELRO program header must exist Dynamic section must have BIND_NOW flag ''' have_gnu_relro = False for (typ, flags) in get_ELF_program_headers(executable): # Note: not checking flags == 'R': here as linkers set the permission differently # This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions. # However, the dynamic linker need to write to this area so these are RW. # Glibc itself takes care of mprotecting this area R after relocations are finished. # See also http://permalink.gmane.org/gmane.comp.gnu.binutils/71347 if typ == b'GNU_RELRO': have_gnu_relro = True have_bindnow = False p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') for line in stdout.split(b'\n'): tokens = line.split() if len(tokens)>1 and tokens[1] == b'(BIND_NOW)' or (len(tokens)>2 and tokens[1] == b'(FLAGS)' and b'BIND_NOW' in tokens[2]): have_bindnow = True return have_gnu_relro and have_bindnow def check_ELF_Canary(executable): ''' Check for use of stack canary ''' p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') ok = False for line in stdout.split(b'\n'): if b'__stack_chk_fail' in line: ok = True return ok def get_PE_dll_characteristics(executable): ''' Get PE DllCharacteristics bits. Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386' and bits is the DllCharacteristics value. ''' p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') arch = '' bits = 0 for line in stdout.split('\n'): tokens = line.split() if len(tokens)>=2 and tokens[0] == 'architecture:': arch = tokens[1].rstrip(',') if len(tokens)>=2 and tokens[0] == 'DllCharacteristics': bits = int(tokens[1],16) return (arch,bits) IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020 IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040 IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100 def check_PE_DYNAMIC_BASE(executable): '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)''' (arch,bits) = get_PE_dll_characteristics(executable) reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE return (bits & reqbits) == reqbits # On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE # to have secure ASLR. def check_PE_HIGH_ENTROPY_VA(executable): '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR''' (arch,bits) = get_PE_dll_characteristics(executable) if arch == 'i386:x86-64': reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA else: # Unnecessary on 32-bit assert(arch == 'i386') reqbits = 0 return (bits & reqbits) == reqbits def check_PE_NX(executable): '''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)''' (arch,bits) = get_PE_dll_characteristics(executable) return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT CHECKS = { 'ELF': [ ('PIE', check_ELF_PIE), ('NX', check_ELF_NX), ('RELRO', check_ELF_RELRO), ('Canary', check_ELF_Canary) ], 'PE': [ ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE), ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA), ('NX', check_PE_NX) ] } def identify_executable(executable): with open(filename, 'rb') as f: magic = f.read(4) if magic.startswith(b'MZ'): return 'PE' elif magic.startswith(b'\x7fELF'): return 'ELF' return None if __name__ == '__main__': retval = 0 for filename in sys.argv[1:]: try: etype = identify_executable(filename) if etype is None: print('%s: unknown format' % filename) retval = 1 continue failed = [] warning = [] for (name, func) in CHECKS[etype]: if not func(filename): if name in NONFATAL: warning.append(name) else: failed.append(name) if failed: print('%s: failed %s' % (filename, ' '.join(failed))) retval = 1 if warning: print('%s: warning %s' % (filename, ' '.join(warning))) except IOError: print('%s: cannot open' % filename) retval = 1 exit(retval) ================================================ FILE: contrib/devtools/split-debug.sh.in ================================================ #!/bin/sh if [ $# -ne 3 ]; then echo "usage: $0 " fi @OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3 @OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2 @STRIP@ --enable-deterministic-archives -p -s $2 @OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2 ================================================ FILE: contrib/devtools/symbol-check.py ================================================ #!/usr/bin/env python3 # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the (Linux) executables produced by guix only contain allowed gcc, glibc and libstdc++ version symbols. This makes sure they are still compatible with the minimum supported Linux distribution versions. Example usage: find ../build -type f -executable | xargs python contrib/devtools/symbol-check.py ''' import subprocess import re import sys import os # Debian 6.0.9 (Squeeze) has: # # - g++ version 4.4.5 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=g%2B%2B) # - libc version 2.11.3 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libc6) # - libstdc++ version 4.4.5 (https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libstdc%2B%2B6) # # Ubuntu 10.04.4 (Lucid Lynx) has: # # - g++ version 4.4.3 (http://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=lucid§ion=all) # - libc version 2.11.1 (http://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=lucid§ion=all) # - libstdc++ version 4.4.3 (http://packages.ubuntu.com/search?suite=lucid§ion=all&arch=any&keywords=libstdc%2B%2B&searchon=names) # # Taking the minimum of these as our target. # # 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 # MAX_VERSIONS = { 'GCC': (4,4,0), 'CXXABI': (1,3,3), 'GLIBCXX': (3,4,13), 'GLIBC': (2,11) } # 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', 'stdin', 'stdout', 'stderr' } READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt') # Allowed NEEDED libraries ALLOWED_LIBRARIES = { # Munt-daemon and Munt (qt) 'libgcc_s.so.1', # GCC base support 'libc.so.6', # C library 'libpthread.so.0', # threading 'libanl.so.1', # DNS resolve 'libm.so.6', # math library 'librt.so.1', # real-time (clock) 'ld-linux-x86-64.so.2', # 64-bit dynamic linker 'ld-linux.so.2', # 32-bit dynamic linker # Munt (qt) only 'libX11-xcb.so.1', # part of X11 'libX11.so.6', # part of X11 'libxcb.so.1', # part of X11 'libfontconfig.so.1', # font support 'libfreetype.so.6', # font parsing 'libdl.so.2' # programming interface to dynamic linker } class CPPFilt(object): ''' Demangle C++ symbol names. Use a pipe to the 'c++filt' command. ''' def __init__(self): self.proc = subprocess.Popen(CPPFILT_CMD, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True) def __call__(self, mangled): self.proc.stdin.write(mangled + '\n') self.proc.stdin.flush() return self.proc.stdout.readline().rstrip() def close(self): self.proc.stdin.close() self.proc.stdout.close() self.proc.wait() def read_symbols(executable, imports=True): ''' Parse an ELF executable and return a list of (symbol,version) tuples for dynamic, imported symbols. ''' p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip())) syms = [] for line in stdout.splitlines(): line = line.split() if len(line)>7 and re.match('[0-9]+:$', line[0]): (sym, _, version) = line[7].partition('@') is_import = line[6] == 'UND' if version.startswith('@'): version = version[1:] if is_import == imports: syms.append((sym, version)) return syms def check_version(max_versions, version): if '_' in version: (lib, _, ver) = version.rpartition('_') else: lib = version ver = '0' ver = tuple([int(x) for x in ver.split('.')]) if not lib in max_versions: return False return ver <= max_versions[lib] def read_libraries(filename): p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) (stdout, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') libraries = [] for line in stdout.splitlines(): tokens = line.split() if len(tokens)>2 and tokens[1] == '(NEEDED)': match = re.match('^Shared library: \[(.*)\]$', ' '.join(tokens[2:])) if match: libraries.append(match.group(1)) else: raise ValueError('Unparseable (NEEDED) specification') return libraries if __name__ == '__main__': cppfilt = CPPFilt() retval = 0 for filename in sys.argv[1:]: # Check imported symbols for sym,version in read_symbols(filename, True): if version and not check_version(MAX_VERSIONS, version): print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version)) retval = 1 # Check exported symbols for sym,version in read_symbols(filename, False): if sym in IGNORE_EXPORTS: continue print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym))) retval = 1 # Check dependency libraries for library_name in read_libraries(filename): if library_name not in ALLOWED_LIBRARIES: print('%s: NEEDED library %s is not allowed' % (filename, library_name)) retval = 1 sys.exit(retval) ================================================ FILE: contrib/devtools/test-security-check.py ================================================ #!/usr/bin/env python2 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Test script for security-check.py ''' from __future__ import division,print_function import subprocess import unittest def write_testcode(filename): with open(filename, 'w') as f: f.write(''' #include int main() { printf("the quick brown fox jumps over the lazy god\\n"); return 0; } ''') 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) (stdout, stderr) = p.communicate() return (p.returncode, stdout.rstrip()) class TestSecurityChecks(unittest.TestCase): def test_ELF(self): source = 'test1.c' executable = 'test1' cc = 'gcc' write_testcode(source) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro']), (1, executable+': failed PIE NX RELRO Canary')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro']), (1, executable+': failed PIE RELRO Canary')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro']), (1, executable+': failed PIE RELRO')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE']), (1, executable+': failed RELRO')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE']), (0, '')) def test_PE(self): source = 'test1.c' executable = 'test1.exe' cc = 'i686-w64-mingw32-gcc' write_testcode(source) self.assertEqual(call_security_check(cc, source, executable, []), (1, executable+': failed PIE NX')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']), (1, executable+': failed PIE')) self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']), (0, '')) if __name__ == '__main__': unittest.main() ================================================ FILE: contrib/guix/INSTALL.md ================================================ # Guix Installation and Setup This only needs to be done once per machine. If you have already completed the installation and setup, please proceed to [perform a build](./README.md). Otherwise, you may choose from one of the following options to install Guix: 1. Using the official **shell installer script** [⤓ skip to section][install-script] - Maintained by Guix developers - Easiest (automatically performs *most* setup) - Works on nearly all Linux distributions - Only installs latest release - Binary installation only, requires high level of trust - Note: The script needs to be run as root, so it should be inspected before it's run 2. Using the official **binary tarball** [⤓ skip to section][install-bin-tarball] - Maintained by Guix developers - Normal difficulty (full manual setup required) - Works on nearly all Linux distributions - Installs any release - Binary installation only, requires high level of trust 3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker] - Maintained by fanquake - Easy (automatically performs *some* setup) - Works wherever Docker images work - Installs any release - Binary installation only, requires high level of trust 4. Using a **distribution-maintained package** [⤓ skip to section][install-distro-pkg] - Maintained by distribution's Guix package maintainer - Normal difficulty (manual setup required) - Works only on distributions with Guix packaged, see: https://repology.org/project/guix/versions - Installs a release decided on by package maintainer - Source or binary installation depending on the distribution 5. Building **from source** [⤓ skip to section][install-source] - Maintained by you - Hard, but rewarding - Can be made to work on most Linux distributions - Installs any commit (more granular) - Source installation, requires lower level of trust ## Options 1 and 2: Using the official shell installer script or binary tarball The installation instructions for both the official shell installer script and the binary tarballs can be found in the GNU Guix Manual's [Binary Installation section](https://guix.gnu.org/manual/en/html_node/Binary-Installation.html). Note that running through the binary tarball installation steps is largely equivalent to manually performing what the shell installer script does. Note that at the time of writing (July 5th, 2021), the shell installer script automatically creates an `/etc/profile.d` entry which the binary tarball installation instructions do not ask you to create. However, you will likely need this entry for better desktop integration. Please see [this section](#add-an-etcprofiled-entry) for instructions on how to add a `/etc/profile.d/guix.sh` entry. Regardless of which installation option you chose, the changes to `/etc/profile.d` will not take effect until the next shell or desktop session, so you should log out and log back in. ## Option 3: Using fanquake's Docker image Please refer to fanquake's instructions [here](https://github.com/fanquake/core-review/tree/master/guix). Note that the `Dockerfile` is largely equivalent to running through the binary tarball installation steps. ## Option 4: Using a distribution-maintained package Note that this section is based on the distro packaging situation at the time of writing (July 2021). Guix is expected to be more widely packaged over time. For an up-to-date view on Guix's package status/version across distros, please see: https://repology.org/project/guix/versions ### Debian 11 (Bullseye)/Ubuntu 21.04 (Hirsute Hippo) Guix v1.2.0 is available as a distribution package starting in [Debian 11](https://packages.debian.org/bullseye/guix) and [Ubuntu 21.04](https://packages.ubuntu.com/hirsute/guix). Note that if you intend on using Guix without using any substitutes (more details [here][security-model]), v1.2.0 has a known problem when building GnuTLS from source. Solutions and workarounds are documented [here](#gnutls-test-suite-fail-status-request-revoked). To install: ```sh sudo apt install guix ``` For up-to-date information on Debian and Ubuntu's release history: - [Debian release history](https://www.debian.org/releases/) - [Ubuntu release history](https://ubuntu.com/about/release-cycle) ### Arch Linux Guix is available in the AUR as [`guix`](https://aur.archlinux.org/packages/guix/), please follow the installation instructions in the Arch Linux Wiki ([live link](https://wiki.archlinux.org/index.php/Guix#AUR_Package_Installation), [2021/03/30 permalink](https://wiki.archlinux.org/index.php?title=Guix&oldid=637559#AUR_Package_Installation)) to install Guix. At the time of writing (2021/03/30), the `check` phase will fail if the path to guix's build directory is longer than 36 characters due to an anachronistic character limit on the shebang line. Since the `check` phase happens after the `build` phase, which may take quite a long time, it is recommended that users either: 1. Skip the `check` phase - For `makepkg`: `makepkg --nocheck ...` - For `yay`: `yay --mflags="--nocheck" ...` - For `paru`: `paru --nocheck ...` 2. Or, check their build directory's length beforehand - For those building with `makepkg`: `pwd | wc -c` ## Option 5: Building from source Building Guix from source is a rather involved process but a rewarding one for those looking to minimize trust and maximize customizability (e.g. building a particular commit of Guix). Previous experience with using autotools-style build systems to build packages from source will be helpful. *hic sunt dracones.* I strongly urge you to at least skim through the entire section once before you start issuing commands, as it will save you a lot of unnecessary pain and anguish. ### Installing common build tools There are a few basic build tools that are required for most things we'll build, so let's install them now: Text transformation/i18n: - `autopoint` (sometimes packaged in `gettext`) - `help2man` - `po4a` - `texinfo` Build system tools: - `g++` w/ C++11 support - `libtool` - `autoconf` - `automake` - `pkg-config` (sometimes packaged as `pkgconf`) - `make` - `cmake` Miscellaneous: - `git` - `gnupg` - `python3` ### Building and Installing Guix's dependencies In order to build Guix itself from source, we need to first make sure that the necessary dependencies are installed and discoverable. The most up-to-date list of Guix's dependencies is kept in the ["Requirements" section](https://guix.gnu.org/manual/en/html_node/Requirements.html) of the Guix Reference Manual. Depending on your distribution, most or all of these dependencies may already be packaged and installable without manually building and installing. For reference, the graphic below outlines Guix v1.3.0's dependency graph: ![bootstrap map](https://user-images.githubusercontent.com/6399679/125064185-a9a59880-e0b0-11eb-82c1-9b8e5dc9950d.png) #### Guile ##### Choosing a Guile version and sticking to it One of the first things you need to decide is which Guile version you want to use: Guile v2.2 or Guile v3.0. Unlike the python2 to python3 transition, Guile v2.2 and Guile v3.0 are largely compatible, as evidenced by the fact that most Guile packages and even [Guix itself](https://guix.gnu.org/en/blog/2020/guile-3-and-guix/) support running on both. What is important here is that you **choose one**, and you **remain consistent** with your choice throughout **all Guile-related packages**, no matter if they are installed via the distribution's package manager or installed from source. This is because the files for Guile packages are installed to directories which are separated based on the Guile version. ###### Example: Checking that Ubuntu's `guile-git` is compatible with your chosen Guile version On Ubuntu Focal: ```sh $ apt show guile-git Package: guile-git ... Depends: guile-2.2, guile-bytestructures, libgit2-dev ... ``` As you can see, the package `guile-git` depends on `guile-2.2`, meaning that it was likely built for Guile v2.2. This means that if you decided to use Guile v3.0 on Ubuntu Focal, you would need to build guile-git from source instead of using the distribution package. On Ubuntu Hirsute: ```sh $ apt show guile-git Package: guile-git ... Depends: guile-3.0 | guile-2.2, guile-bytestructures (>= 1.0.7-3~), libgit2-dev (>= 1.0) ... ``` In this case, `guile-git` depends on either `guile-3.0` or `guile-2.2`, meaning that it would work no matter what Guile version you decided to use. ###### Corner case: Multiple versions of Guile on one system It is recommended to only install one version of Guile, so that build systems do not get confused about which Guile to use. However, if you insist on having both Guile v2.2 and Guile v3.0 installed on your system, then you need to **consistently** specify one of `GUILE_EFFECTIVE_VERSION=3.0` or `GUILE_EFFECTIVE_VERSION=2.2` to all `./configure` invocations for Guix and its dependencies. ##### Installing Guile Guile is most likely already packaged for your distribution, so after you have [chosen a Guile version](#choosing-a-guile-version-and-sticking-to-it), install it via your distribution's package manager. If your distribution splits packages into `-dev`-suffixed and non-`-dev`-suffixed sub-packages (as is the case for Debian-derived distributions), please make sure to install both. For example, to install Guile v2.2 on Debian/Ubuntu: ```sh apt install guile-2.2 guile-2.2-dev ``` #### Mixing distribution packages and source-built packages At the time of writing, most distributions have _some_ of Guix's dependencies packaged, but not all. This means that you may want to install the distribution package for some dependencies, and manually build-from-source for others. Distribution packages usually install to `/usr`, which is different from the default `./configure` prefix of source-built packages: `/usr/local`. This means that if you mix-and-match distribution packages and source-built packages and do not specify exactly `--prefix=/usr` to `./configure` for source-built packages, you will need to augment the `GUILE_LOAD_PATH` and `GUILE_LOAD_COMPILED_PATH` environment variables so that Guile will look under the right prefix and find your source-built packages. For example, if you are using Guile v2.2, and have Guile packages in the `/usr/local` prefix, either add the following lines to your `.profile` or `.bash_profile` so that the environment variable is properly set for all future shell logins, or paste the lines into a POSIX-style shell to temporarily modify the environment variables of your current shell session. ```sh # Help Guile v2.2.x find packages in /usr/local export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.2${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH" ``` Note that these environment variables are used to check for packages during `./configure`, so they should be set as soon as possible should you want to use a prefix other than `/usr`. #### Building and installing source-built packages ***IMPORTANT**: A few dependencies have non-obvious quirks/errata which are documented in the sub-sections immediately below. Please read these sections before proceeding to build and install these packages.* Although you should always refer to the README or INSTALL files for the most accurate information, most of these dependencies use autoconf-style build systems (check if there's a `configure.ac` file), and will likely do the right thing with the following: Clone the repository and check out the latest release: ```sh git clone /.git cd git tag -l # check for the latest release git checkout ``` For autoconf-based build systems (if `./autogen.sh` or `configure.ac` exists at the root of the repository): ```sh ./autogen.sh || autoreconf -vfi ./configure --prefix= make sudo make install ``` For CMake-based build systems (if `CMakeLists.txt` exists at the root of the repository): ```sh mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX= sudo cmake --build . --target install ``` If you choose not to specify exactly `--prefix=/usr` to `./configure`, please make sure you've carefully read the [previous section] on mixing distribution packages and source-built packages. ##### Binding packages require `-dev`-suffixed packages Relevant for: - Everyone When building bindings, the `-dev`-suffixed version of the original package needs to be installed. For example, building `Guile-zlib` on Debian-derived distributions requires that `zlib1g-dev` is installed. When using bindings, the `-dev`-suffixed version of the original package still needs to be installed. This is particularly problematic when distribution packages are mispackaged like `guile-sqlite3` is in Ubuntu Focal such that installing `guile-sqlite3` does not automatically install `libsqlite3-dev` as a dependency. Below is a list of relevant Guile bindings and their corresponding `-dev` packages in Debian at the time of writing. | Guile binding package | -dev Debian package | |-----------------------|---------------------| | guile-gcrypt | libgcrypt-dev | | guile-git | libgit2-dev | | guile-lzlib | liblz-dev | | guile-ssh | libssh-dev | | guile-sqlite3 | libsqlite3-dev | | guile-zlib | zlib1g-dev | ##### `guile-git` actually depends on `libgit2 >= 1.1` Relevant for: - Those building `guile-git` from source against `libgit2 < 1.1` - Those installing `guile-git` from their distribution where `guile-git` is built against `libgit2 < 1.1` As of v0.4.0, `guile-git` claims to only require `libgit2 >= 0.28.0`, however, it actually requires `libgit2 >= 1.1`, otherwise, it will be confused by a reference of `origin/keyring`: instead of interpreting the reference as "the 'keyring' branch of the 'origin' remote", the reference is interpreted as "the branch literally named 'origin/keyring'" This is especially notable because Ubuntu Focal packages `libgit2 v0.28.4`, and `guile-git` is built against it. Should you be in this situation, you need to build both `libgit2 v1.1.x` and `guile-git` from source. Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527 ##### `{scheme,guile}-bytestructures` v1.0.8 and v1.0.9 are broken for Guile v2.2 Relevant for: - Those building `{scheme,guile}-bytestructures` from source against Guile v2.2 Commit [707eea3](https://github.com/TaylanUB/scheme-bytestructures/commit/707eea3a85e1e375e86702229ebf73d496377669) introduced a regression for Guile v2.2 and was first included in v1.0.8, this was later corrected in commit [ec9a721](https://github.com/TaylanUB/scheme-bytestructures/commit/ec9a721957c17bcda13148f8faa5f06934431ff7) and included in v1.1.0. TL;DR If you decided to use Guile v2.2, do not use `{scheme,guile}-bytestructures` v1.0.8 or v1.0.9. ### Building and Installing Guix itself Start by cloning Guix: ``` git clone https://git.savannah.gnu.org/git/guix.git cd guix ``` You will likely want to build the latest release, however, if the latest release when you're reading this is still 1.2.0 then you may want to use 95aca29 instead to avoid a problem in the GnuTLS test suite. ``` git branch -a -l 'origin/version-*' # check for the latest release git checkout ``` Bootstrap the build system: ``` ./bootstrap ``` Configure with the recommended `--localstatedir` flag: ``` ./configure --localstatedir=/var ``` Note: If you intend to hack on Guix in the future, you will need to supply the same `--localstatedir=` flag for all future Guix `./configure` invocations. See the last paragraph of this [section](https://guix.gnu.org/manual/en/html_node/Requirements.html) for more details. Build Guix (this will take a while): ``` make -j$(nproc) ``` Install Guix: ``` sudo make install ``` ### Post-"build from source" Setup #### Creating and starting a `guix-daemon-original` service with a fixed `argv[0]` At this point, guix will be installed to `${bindir}`, which is likely `/usr/local/bin` if you did not override directory variables at `./configure`-time. More information on standard Automake directory variables can be found [here](https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html). However, the Guix init scripts and service configurations for Upstart, systemd, SysV, and OpenRC are installed (in `${libdir}`) to launch `${localstatedir}/guix/profiles/per-user/root/current-guix/bin/guix-daemon`, which does not yet exist, and will only exist after [`root` performs their first `guix pull`](#guix-pull-as-root). We need to create a `-original` version of these init scripts that's pointed to the binaries we just built and `make install`'ed in `${bindir}` (normally, `/usr/local/bin`). Example for `systemd`, run as `root`: ```sh # Create guix-daemon-original.service by modifying guix-daemon.service libdir=# set according to your PREFIX (default is /usr/local/lib) bindir="$(dirname $(command -v guix-daemon))" sed -E -e "s|/\S*/guix/profiles/per-user/root/current-guix/bin/guix-daemon|${bindir}/guix-daemon|" "${libdir}"/systemd/system/guix-daemon.service > /etc/systemd/system/guix-daemon-original.service chmod 664 /etc/systemd/system/guix-daemon-original.service # Make systemd recognize the new service systemctl daemon-reload # Make sure that the non-working guix-daemon.service is stopped and disabled systemctl stop guix-daemon systemctl disable guix-daemon # Make sure that the working guix-daemon-original.service is started and enabled systemctl enable guix-daemon-original systemctl start guix-daemon-original ``` #### Creating `guix-daemon` users / groups Please see the [relevant section](https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html) in the Guix Reference Manual for more details. ## Optional setup At this point, you are set up to [use Guix to build Bitcoin Core](./README.md#usage). However, if you want to polish your setup a bit and make it "what Guix intended", then read the next few subsections. ### Add an `/etc/profile.d` entry This section definitely does not apply to you if you installed Guix using: 1. The shell installer script 2. fanquake's Docker image 3. Debian's `guix` package #### Background Although Guix knows how to update itself and its packages, it does so in a non-invasive way (it does not modify `/usr/local/bin/guix`). Instead, it does the following: - After a `guix pull`, it updates `/var/guix/profiles/per-user/$USER/current-guix`, and creates a symlink targeting this directory at `$HOME/.config/guix/current` - After a `guix install`, it updates `/var/guix/profiles/per-user/$USER/guix-profile`, and creates a symlink targeting this directory at `$HOME/.guix-profile` Therefore, in order for these operations to affect your shell/desktop sessions (and for the principle of least astonishment to hold), their corresponding directories have to be added to well-known environment variables like `$PATH`, `$INFOPATH`, `$XDG_DATA_DIRS`, etc. In other words, if `$HOME/.config/guix/current/bin` does not exist in your `$PATH`, a `guix pull` will have no effect on what `guix` you are using. Same goes for `$HOME/.guix-profile/bin`, `guix install`, and installed packages. Helpfully, after a `guix pull` or `guix install`, a message will be printed like so: ``` hint: Consider setting the necessary environment variables by running: GUIX_PROFILE="$HOME/.guix-profile" . "$GUIX_PROFILE/etc/profile" Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'. ``` However, this is somewhat tedious to do for both `guix pull` and `guix install` for each user on the system that wants to properly use `guix`. I recommend that you instead add an entry to `/etc/profile.d` instead. This is done by default when installing the Debian package later than 1.2.0-4 and when using the shell script installer. #### Instructions Create `/etc/profile.d/guix.sh` with the following content: ```sh # _GUIX_PROFILE: `guix pull` profile _GUIX_PROFILE="$HOME/.config/guix/current" if [ -L $_GUIX_PROFILE ]; then export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" # Export INFOPATH so that the updated info pages can be found # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info # When INFOPATH is unset, add a trailing colon so that Emacs # searches 'Info-default-directory-list'. export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" fi # GUIX_PROFILE: User's default profile GUIX_PROFILE="$HOME/.guix-profile" [ -L $GUIX_PROFILE ] || return GUIX_LOCPATH="$GUIX_PROFILE/lib/locale" export GUIX_PROFILE GUIX_LOCPATH [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile" # set XDG_DATA_DIRS to include Guix installations export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" ``` Please note that this will not take effect until the next shell or desktop session (log out and log back in). ### `guix pull` as root Before you do this, you need to read the section on [choosing your security model][security-model] and adjust `guix` and `guix-daemon` flags according to your choice, as invoking `guix pull` may pull substitutes from substitute servers (which you may not want). As mentioned in a previous section, Guix expects `${localstatedir}/guix/profiles/per-user/root/current-guix` to be populated with `root`'s Guix profile, `guix pull`-ed and built by some former version of Guix. However, this is not the case when we build from source. Therefore, we need to perform a `guix pull` as `root`: ```sh sudo --login guix pull --branch=version- # or sudo --login guix pull --commit= ``` `guix pull` is quite a long process (especially if you're using `--no-substitute`). If you encounter build problems, please refer to the [troubleshooting section](#troubleshooting). Note that running a bare `guix pull` with no commit or branch specified will pull the latest commit on Guix's master branch, which is likely fine, but not recommended. If you installed Guix from source, you may get an error like the following: ```sh error: while creating symlink '/root/.config/guix/current' No such file or directory ``` To resolve this, simply: ``` sudo mkdir -p /root/.config/guix ``` Then try the `guix pull` command again. After the `guix pull` finishes successfully, `${localstatedir}/guix/profiles/per-user/root/current-guix` should be populated. #### Using the newly-pulled `guix` by restarting the daemon Depending on how you installed Guix, you should now make sure that your init scripts and service configurations point to the newly-pulled `guix-daemon`. ##### If you built Guix from source If you followed the instructions for [fixing argv\[0\]][fix-argv0], you can now do the following: ```sh systemctl stop guix-daemon-original systemctl disable guix-daemon-original systemctl enable guix-daemon systemctl start guix-daemon ``` ##### If you installed Guix via the Debian/Ubuntu distribution packages You will need to create a `guix-daemon-latest` service which points to the new `guix` rather than a pinned one. ```sh # Create guix-daemon-latest.service by modifying guix-daemon.service sed -E -e "s|/usr/bin/guix-daemon|/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon|" /etc/systemd/system/guix-daemon.service > /lib/systemd/system/guix-daemon-latest.service chmod 664 /lib/systemd/system/guix-daemon-latest.service # Make systemd recognize the new service systemctl daemon-reload # Make sure that the old guix-daemon.service is stopped and disabled systemctl stop guix-daemon systemctl disable guix-daemon # Make sure that the new guix-daemon-latest.service is started and enabled systemctl enable guix-daemon-latest systemctl start guix-daemon-latest ``` ##### If you installed Guix via lantw44's Arch Linux AUR package At the time of writing (July 5th, 2021) the systemd unit for "updated Guix" is `guix-daemon-latest.service`, therefore, you should do the following: ```sh systemctl stop guix-daemon systemctl disable guix-daemon systemctl enable guix-daemon-latest systemctl start guix-daemon-latest ``` ##### Otherwise... Simply do: ```sh systemctl restart guix-daemon ``` ### Checking everything If you followed all the steps above to make your Guix setup "prim and proper," you can check that you did everything properly by running through this checklist. 1. `/etc/profile.d/guix.sh` should exist and be sourced at each shell login 2. `guix describe` should not print `guix describe: error: failed to determine origin`, but rather something like: ``` Generation 38 Feb 22 2021 16:39:31 (current) guix f350df4 repository URL: https://git.savannah.gnu.org/git/guix.git branch: version-1.2.0 commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7 ``` 3. `guix-daemon` should be running from `${localstatedir}/guix/profiles/per-user/root/current-guix` # Troubleshooting ## Derivation failed to build When you see a build failure like below: ``` building /gnu/store/...-foo-3.6.12.drv... / 'check' phasenote: keeping build directory `/tmp/guix-build-foo-3.6.12.drv-0' builder for `/gnu/store/...-foo-3.6.12.drv' failed with exit code 1 build of /gnu/store/...-foo-3.6.12.drv failed View build log at '/var/log/guix/drvs/../...-foo-3.6.12.drv.bz2'. cannot build derivation `/gnu/store/...-qux-7.69.1.drv': 1 dependencies couldn't be built cannot build derivation `/gnu/store/...-bar-3.16.5.drv': 1 dependencies couldn't be built cannot build derivation `/gnu/store/...-baz-2.0.5.drv': 1 dependencies couldn't be built guix time-machine: error: build of `/gnu/store/...-baz-2.0.5.drv' failed ``` It means that `guix` failed to build a package named `foo`, which was a dependency of `qux`, `bar`, and `baz`. Importantly, note that the last "failed" line is not necessarily the root cause, the first "failed" line is. Most of the time, the build failure is due to a spurious test failure or the package's build system/test suite breaking when running multi-threaded. To rebuild _just_ this derivation in a single-threaded fashion (please don't forget to add other `guix` flags like `--no-substitutes` as appropriate): ```sh $ guix build --cores=1 /gnu/store/...-foo-3.6.12.drv ``` If the single-threaded rebuild did not succeed, you may need to dig deeper. You may view `foo`'s build logs in `less` like so (please replace paths with the path you see in the build failure output): ```sh $ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less ``` `foo`'s build directory is also preserved and available at `/tmp/guix-build-foo-3.6.12.drv-0`. However, if you fail to build `foo` multiple times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build failure output for the most accurate, up-to-date information. ### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem which rejects characters not present in the UTF-8 character code set. An example is ZFS with the utf8only=on option set. More information: https://bugs.python.org/issue37584 ### GnuTLS: test-suite FAIL: status-request-revoked *The derivation is likely identified by: `/gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv`* This unfortunate error is most common for non-substitute builders who installed Guix v1.2.0. The problem stems from the fact that one of GnuTLS's tests uses a hardcoded certificate which expired on 2020-10-24. What's more unfortunate is that this GnuTLS derivation is somewhat special in Guix's dependency graph and is not affected by the package transformation flags like `--without-tests=`. The easiest solution for those encountering this problem is to install a newer version of Guix. However, there are ways to work around this issue: #### Workaround 1: Using substitutes for this single derivation If you've authorized the official Guix build farm's key (more info [here](./README.md#step-1-authorize-the-signing-keys)), then you can use substitutes just for this single derivation by invoking the following: ```sh guix build --substitute-urls="https://ci.guix.gnu.org" /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv ``` See [this section](./README.md#removing-authorized-keys) for instructions on how to remove authorized keys if you don't want to keep the build farm's key authorized. #### Workaround 2: Temporarily setting the system clock back This workaround was described [here](https://issues.guix.gnu.org/44559#5). Basically: 1. Turn off networking 2. Turn off NTP 3. Set system time to 2020-10-01 4. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv 5. Set system time back to accurate current time 6. Turn NTP back on 7. Turn networking back on ### coreutils: FAIL: tests/tail-2/inotify-dir-recreate The inotify-dir-create test fails on "remote" filesystems such as overlayfs (Docker's default filesystem) due to the filesystem being mistakenly recognized as non-remote. A relatively easy workaround to this is to make sure that a somewhat traditional filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For Docker users, this might mean [using a volume][docker/volumes], [binding mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap) [mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag. Please see the following links for more details: - An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940) - A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935) - A commit to skip this test in Guix has been merged into the core-updates branch: [savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4) [install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball [install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball [install-fanquake-docker]: #option-3-using-fanquakes-docker-image [install-distro-pkg]: #option-4-using-a-distribution-maintained-package [install-source]: #option-5-building-from-source [fix-argv0]: #creating-and-starting-a-guix-daemon-original-service-with-a-fixed-argv0 [security-model]: ./README.md#choosing-your-security-model [docker/volumes]: https://docs.docker.com/storage/volumes/ [docker/bind-mnt]: https://docs.docker.com/storage/bind-mounts/ [docker/tmpfs]: https://docs.docker.com/storage/tmpfs/ ================================================ FILE: contrib/guix/README.md ================================================ # Bootstrappable Bitcoin Core Builds This directory contains the files necessary to perform bootstrappable Bitcoin Core builds. [Bootstrappability][b17e] furthers our binary security guarantees by allowing us to _audit and reproduce_ our toolchain instead of blindly _trusting_ binary downloads. We achieve bootstrappability by using Guix as a functional package manager. # Requirements Conservatively, you will need an x86_64 machine with: - 16GB of free disk space on the partition that /gnu/store will reside in - 8GB of free disk space **per platform triple** you're planning on building (see the `HOSTS` [environment variable description][env-vars-list]) # Installation and Setup If you don't have Guix installed and set up, please follow the instructions in [INSTALL.md](./INSTALL.md) # Usage If you haven't considered your security model yet, please read [the relevant section](#choosing-your-security-model) before proceeding to perform a build. ## Making the Xcode SDK available for macOS cross-compilation In order to perform a build for macOS (which is included in the default set of platform triples to build), you'll need to extract the macOS SDK tarball using tools found in the [`macdeploy` directory](../macdeploy/README.md). You can then either point to the SDK using the `SDK_PATH` environment variable: ```sh # Extract the SDK tarball to /path/to/parent/dir/of/extracted/SDK/Xcode---extracted-SDK-with-libcxx-headers tar -C /path/to/parent/dir/of/extracted/SDK -xaf /path/to/Xcode---extracted-SDK-with-libcxx-headers.tar.gz # Indicate where to locate the SDK tarball export SDK_PATH=/path/to/parent/dir/of/extracted/SDK ``` or extract it into `depends/SDKs`: ```sh mkdir -p depends/SDKs tar -C depends/SDKs -xaf /path/to/SDK/tarball ``` ## Building *The author highly recommends at least reading over the [common usage patterns and examples](#common-guix-build-invocation-patterns-and-examples) section below before starting a build. For a full list of customization options, see the [recognized environment variables][env-vars-list] section.* To build Bitcoin Core reproducibly with all default options, invoke the following from the top of a clean repository: ```sh ./contrib/guix/guix-build ``` ## Codesigning build outputs The `guix-codesign` command attaches codesignatures (produced by codesigners) to existing non-codesigned outputs. Please see the [release process documentation](/doc/release-process.md) for more context. It respects many of the same environment variable flags as `guix-build`, with 2 crucial differences: 1. Since only Windows and macOS build outputs require codesigning, the `HOSTS` environment variable will have a sane default value of `x86_64-w64-mingw32 x86_64-apple-darwin arm64-apple-darwin` instead of all the platforms. 2. The `guix-codesign` command ***requires*** a `DETACHED_SIGS_REPO` flag. * _**DETACHED_SIGS_REPO**_ Set the directory where detached codesignatures can be found for the current Bitcoin Core version being built. _REQUIRED environment variable_ An invocation with all default options would look like: ``` env DETACHED_SIGS_REPO= ./contrib/guix/guix-codesign ``` ## Cleaning intermediate work directories By default, `guix-build` leaves all intermediate files or "work directories" (e.g. `depends/work`, `guix-build-*/distsrc-*`) intact at the end of a build so that they are available to the user (to aid in debugging, etc.). However, these directories usually take up a large amount of disk space. Therefore, a `guix-clean` convenience script is provided which cleans the current `git` worktree to save disk space: ``` ./contrib/guix/guix-clean ``` ## Attesting to build outputs Much like how Gitian build outputs are attested to in a `gitian.sigs` repository, Guix build outputs are attested to in the [`guix.sigs` repository](https://github.com/bitcoin-core/guix.sigs). After you've cloned the `guix.sigs` repository, to attest to the current worktree's commit/tag: ``` env GUIX_SIGS_REPO= SIGNER= ./contrib/guix/guix-attest ``` See `./contrib/guix/guix-attest --help` for more information on the various ways `guix-attest` can be invoked. ## Verifying build output attestations After at least one other signer has uploaded their signatures to the `guix.sigs` repository: ``` git -C pull env GUIX_SIGS_REPO= ./contrib/guix/guix-verify ``` ## Common `guix-build` invocation patterns and examples ### Keeping caches and SDKs outside of the worktree If you perform a lot of builds and have a bunch of worktrees, you may find it more efficient to keep the depends tree's download cache, build cache, and SDKs outside of the worktrees to avoid duplicate downloads and unnecessary builds. To help with this situation, the `guix-build` script honours the `SOURCES_PATH`, `BASE_CACHE`, and `SDK_PATH` environment variables and will pass them on to the depends tree so that you can do something like: ```sh env SOURCES_PATH="$HOME/depends-SOURCES_PATH" BASE_CACHE="$HOME/depends-BASE_CACHE" SDK_PATH="$HOME/macOS-SDKs" ./contrib/guix/guix-build ``` Note that the paths that these environment variables point to **must be directories**, and **NOT symlinks to directories**. See the [recognized environment variables][env-vars-list] section for more details. ### Building a subset of platform triples Sometimes you only want to build a subset of the supported platform triples, in which case you can override the default list by setting the space-separated `HOSTS` environment variable: ```sh env HOSTS='x86_64-w64-mingw32 x86_64-apple-darwin' ./contrib/guix/guix-build ``` See the [recognized environment variables][env-vars-list] section for more details. ### Controlling the number of threads used by `guix` build commands Depending on your system's RAM capacity, you may want to decrease the number of threads used to decrease RAM usage or vice versa. By default, the scripts under `./contrib/guix` will invoke all `guix` build commands with `--cores="$JOBS"`. Note that `$JOBS` defaults to `$(nproc)` if not specified. However, astute manual readers will also notice that `guix` build commands also accept a `--max-jobs=` flag (which defaults to 1 if unspecified). Here is the difference between `--cores=` and `--max-jobs=`: > Note: When I say "derivation," think "package" `--cores=` - controls the number of CPU cores to build each derivation. This is the value passed to `make`'s `--jobs=` flag. `--max-jobs=` - controls how many derivations can be built in parallel - defaults to 1 Therefore, the default is for `guix` build commands to build one derivation at a time, utilizing `$JOBS` threads. Specifying the `$JOBS` environment variable will only modify `--cores=`, but you can also modify the value for `--max-jobs=` by specifying `$ADDITIONAL_GUIX_COMMON_FLAGS`. For example, if you have a LOT of memory, you may want to set: ```sh export ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8' ``` Which allows for a maximum of 8 derivations to be built at the same time, each utilizing `$JOBS` threads. Or, if you'd like to avoid spurious build failures caused by issues with parallelism within a single package, but would still like to build multiple packages when the dependency graph allows for it, you may want to try: ```sh export JOBS=1 ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8' ``` See the [recognized environment variables][env-vars-list] section for more details. ## Recognized environment variables * _**HOSTS**_ Override the space-separated list of platform triples for which to perform a bootstrappable build. _(defaults to "x86\_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu x86\_64-w64-mingw32 x86\_64-apple-darwin arm64-apple-darwin")_ * _**SOURCES_PATH**_ Set the depends tree download cache for sources. This is passed through to the depends tree. Setting this to the same directory across multiple builds of the depends tree can eliminate unnecessary redownloading of package sources. The path that this environment variable points to **must be a directory**, and **NOT a symlink to a directory**. * _**BASE_CACHE**_ Set the depends tree cache for built packages. This is passed through to the depends tree. Setting this to the same directory across multiple builds of the depends tree can eliminate unnecessary building of packages. The path that this environment variable points to **must be a directory**, and **NOT a symlink to a directory**. * _**SDK_PATH**_ Set the path where _extracted_ SDKs can be found. This is passed through to the depends tree. Note that this is should be set to the _parent_ directory of the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of `$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`). The path that this environment variable points to **must be a directory**, and **NOT a symlink to a directory**. * _**JOBS**_ Override the number of jobs to run simultaneously, you might want to do so on a memory-limited machine. This may be passed to: - `guix` build commands as in `guix environment --cores="$JOBS"` - `make` as in `make --jobs="$JOBS"` - `xargs` as in `xargs -P"$JOBS"` See [here](#controlling-the-number-of-threads-used-by-guix-build-commands) for more details. _(defaults to the value of `nproc` outside the container)_ * _**SOURCE_DATE_EPOCH**_ Override the reference UNIX timestamp used for bit-for-bit reproducibility, the variable name conforms to [standard][r12e/source-date-epoch]. _(defaults to the output of `$(git log --format=%at -1)`)_ * _**V**_ If non-empty, will pass `V=1` to all `make` invocations, making `make` output verbose. Note that any given value is ignored. The variable is only checked for emptiness. More concretely, this means that `V=` (setting `V` to the empty string) is interpreted the same way as not setting `V` at all, and that `V=0` has the same effect as `V=1`. * _**SUBSTITUTE_URLS**_ A whitespace-delimited list of URLs from which to download pre-built packages. A URL is only used if its signing key is authorized (refer to the [substitute servers section](#option-1-building-with-substitutes) for more details). * _**ADDITIONAL_GUIX_COMMON_FLAGS**_ Additional flags to be passed to all `guix` commands. * _**ADDITIONAL_GUIX_TIMEMACHINE_FLAGS**_ Additional flags to be passed to `guix time-machine`. * _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_ Additional flags to be passed to the invocation of `guix environment` inside `guix time-machine`. # Choosing your security model No matter how you installed Guix, you need to decide on your security model for building packages with Guix. Guix allows us to achieve better binary security by using our CPU time to build everything from scratch. However, it doesn't sacrifice user choice in pursuit of this: users can decide whether or not to use **substitutes** (pre-built packages). ## Option 1: Building with substitutes ### Step 1: Authorize the signing keys Depending on the installation procedure you followed, you may have already authorized the Guix build farm key. In particular, the official shell installer script asks you if you want the key installed, and the debian distribution package authorized the key during installation. You can check the current list of authorized keys at `/etc/guix/acl`. At the time of writing, a `/etc/guix/acl` with just the Guix build farm key authorized looks something like: ```lisp (acl (entry (public-key (ecc (curve Ed25519) (q #8D156F295D24B0D9A86FA5741A840FF2D24F60F7B6C4134814AD55625971B394#) ) ) (tag (guix import) ) ) ) ``` If you've determined that the official Guix build farm key hasn't been authorized, and you would like to authorize it, run the following as root: ``` guix archive --authorize < /var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub ``` If `/var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub` doesn't exist, try: ```sh guix archive --authorize < /share/guix/ci.guix.gnu.org.pub ``` Where `` is likely: - `/usr` if you installed from a distribution package - `/usr/local` if you installed Guix from source and didn't supply any prefix-modifying flags to Guix's `./configure` For dongcarl's substitute server at https://guix.carldong.io, run as root: ```sh wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize ``` #### Removing authorized keys To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the `(entry (public-key ...))` entry. ### Step 2: Specify the substitute servers Once its key is authorized, the official Guix build farm at https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag is supplied. This default list of substitute servers is overridable both on a `guix-daemon` level and when you invoke `guix` commands. See examples below for the various ways of adding dongcarl's substitute server after having [authorized his signing key](#authorize-the-signing-keys). Change the **default list** of substitute servers by starting `guix-daemon` with the `--substitute-urls` option (you will likely need to edit your init script): ```sh guix-daemon --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org' ``` Override the default list of substitute servers by passing the `--substitute-urls` option for invocations of `guix` commands: ```sh guix --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org' ``` For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment variable: ```sh export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org' ``` ## Option 2: Disabling substitutes on an ad-hoc basis If you prefer not to use any substitutes, make sure to supply `--no-substitutes` like in the following snippet. The first build will take a while, but the resulting packages will be cached for future builds. For direct invocations of `guix`: ```sh guix --no-substitutes ``` For the scripts under `./contrib/guix/`: ```sh export ADDITIONAL_GUIX_COMMON_FLAGS='--no-substitutes' ``` ## Option 3: Disabling substitutes by default `guix-daemon` accepts a `--no-substitutes` flag, which will make sure that, unless otherwise overridden by a command line invocation, no substitutes will be used. If you start `guix-daemon` using an init script, you can edit said script to supply this flag. # Purging/Uninstalling Guix In the extraordinarily rare case where you messed up your Guix installation in an irreversible way, you may want to completely purge Guix from your system and start over. 1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source). 2. Remove all build users and groups You may check for relevant users and groups using: ``` getent passwd | grep guix getent group | grep guix ``` Then, you may remove users and groups using: ``` sudo userdel sudo groupdel ``` 3. Remove all possible Guix-related directories - `/var/guix/` - `/var/log/guix/` - `/gnu/` - `/etc/guix/` - `/home/*/.config/guix/` - `/home/*/.cache/guix/` - `/home/*/.guix-profile/` - `/root/.config/guix/` - `/root/.cache/guix/` - `/root/.guix-profile/` [b17e]: https://bootstrappable.org/ [r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/ [guix/install.sh]: https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh [guix/bin-install]: https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html [guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html [guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html [guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html [guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html [debian/guix-bullseye]: https://packages.debian.org/bullseye/guix [ubuntu/guix-hirsute]: https://packages.ubuntu.com/hirsute/guix [fanquake/guix-docker]: https://github.com/fanquake/core-review/tree/master/guix [env-vars-list]: #recognized-environment-variables ================================================ FILE: contrib/guix/guix-attest ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # Source the common prelude, which: # 1. Checks if we're at the top directory of the repository # 2. Defines a few common functions and variables # # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" ################### ## Sanity Checks ## ################### ################ # Required non-builtin commands should be invokable ################ check_tools cat env basename mkdir diff sort if [ -z "$NO_SIGN" ]; then # make it possible to override the gpg binary GPG=${GPG:-gpg} # $GPG can contain extra arguments passed to the binary # so let's check only the existence of arg[0] # shellcheck disable=SC2206 GPG_ARRAY=($GPG) check_tools "${GPG_ARRAY[0]}" fi ################ # Required env vars should be non-empty ################ cmd_usage() { cat < \\ SIGNER=GPG_KEY_NAME[=SIGNER_NAME] \\ [ NO_SIGN=1 ] ./contrib/guix/guix-attest Example w/o overriding signing name: env GUIX_SIGS_REPO=/home/achow101/guix.sigs \\ SIGNER=achow101 \\ ./contrib/guix/guix-attest Example overriding signing name: env GUIX_SIGS_REPO=/home/dongcarl/guix.sigs \\ SIGNER=0x96AB007F1A7ED999=dongcarl \\ ./contrib/guix/guix-attest Example w/o signing, just creating SHA256SUMS: env GUIX_SIGS_REPO=/home/achow101/guix.sigs \\ SIGNER=achow101 \\ NO_SIGN=1 \\ ./contrib/guix/guix-attest EOF } if [ -z "$GUIX_SIGS_REPO" ] || [ -z "$SIGNER" ]; then cmd_usage exit 1 fi ################ # GUIX_SIGS_REPO should exist as a directory ################ if [ ! -d "$GUIX_SIGS_REPO" ]; then cat << EOF ERR: The specified GUIX_SIGS_REPO is not an existent directory: '$GUIX_SIGS_REPO' Hint: Please clone the guix.sigs repository and point to it with the GUIX_SIGS_REPO environment variable. EOF cmd_usage exit 1 fi ################ # The key specified in SIGNER should be usable ################ IFS='=' read -r gpg_key_name signer_name <<< "$SIGNER" if [ -z "${signer_name}" ]; then signer_name="$gpg_key_name" fi if [ -z "$NO_SIGN" ] && ! ${GPG} --dry-run --list-secret-keys "${gpg_key_name}" >/dev/null 2>&1; then echo "ERR: GPG can't seem to find any key named '${gpg_key_name}'" exit 1 fi ################ # We should be able to find at least one output ################ echo "Looking for build output SHA256SUMS fragments in ${OUTDIR_BASE}" shopt -s nullglob sha256sum_fragments=( "$OUTDIR_BASE"/*/SHA256SUMS.part ) # This expands to an array of directories... shopt -u nullglob noncodesigned_fragments=() codesigned_fragments=() if (( ${#sha256sum_fragments[@]} )); then echo "Found build output SHA256SUMS fragments:" for outdir in "${sha256sum_fragments[@]}"; do echo " '$outdir'" case "$outdir" in "$OUTDIR_BASE"/*-codesigned/SHA256SUMS.part) codesigned_fragments+=("$outdir") ;; *) noncodesigned_fragments+=("$outdir") ;; esac done echo else echo "ERR: Could not find any build output SHA256SUMS fragments in ${OUTDIR_BASE}" exit 1 fi ############## ## Attest ## ############## # Usage: out_name $outdir # # HOST: The output directory being attested # out_name() { basename "$(dirname "$1")" } shasum_already_exists() { cat < "$temp_noncodesigned" if [ -e noncodesigned.SHA256SUMS ]; then # The SHA256SUMS already exists, make sure it's exactly what we # expect, error out if not if diff -u noncodesigned.SHA256SUMS "$temp_noncodesigned"; then echo "A noncodesigned.SHA256SUMS file already exists for '${VERSION}' and is up-to-date." else shasum_already_exists noncodesigned.SHA256SUMS exit 1 fi else mv "$temp_noncodesigned" noncodesigned.SHA256SUMS fi else echo "ERR: No noncodesigned outputs found for '${VERSION}', exiting..." exit 1 fi temp_all="$(mktemp)" trap 'rm -rf -- "$temp_all"' EXIT if (( ${#codesigned_fragments[@]} )); then # Note: all.SHA256SUMS attests to all of $sha256sum_fragments, but is # not needed if there are no $codesigned_fragments cat "${sha256sum_fragments[@]}" \ | sort -u \ | sort -k2 \ | basenameify_SHA256SUMS \ > "$temp_all" if [ -e all.SHA256SUMS ]; then # The SHA256SUMS already exists, make sure it's exactly what we # expect, error out if not if diff -u all.SHA256SUMS "$temp_all"; then echo "An all.SHA256SUMS file already exists for '${VERSION}' and is up-to-date." else shasum_already_exists all.SHA256SUMS exit 1 fi else mv "$temp_all" all.SHA256SUMS fi else # It is fine to have the codesigned outputs be missing (perhaps the # detached codesigs have not been published yet), just print a log # message instead of erroring out echo "INFO: No codesigned outputs found for '${VERSION}', skipping..." fi if [ -z "$NO_SIGN" ]; then echo "Signing SHA256SUMS to produce SHA256SUMS.asc" for i in *.SHA256SUMS; do if [ ! -e "$i".asc ]; then ${GPG} --detach-sign \ --digest-algo sha256 \ --local-user "$gpg_key_name" \ --armor \ --output "$i".asc "$i" else echo "Signature already there" fi done else echo "Not signing SHA256SUMS as \$NO_SIGN is not empty" fi echo "" ) ================================================ FILE: contrib/guix/guix-build ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # Source the common prelude, which: # 1. Checks if we're at the top directory of the repository # 2. Defines a few common functions and variables # # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" ################### ## SANITY CHECKS ## ################### ################ # Required non-builtin commands should be invocable ################ check_tools cat mkdir make getent curl git guix ################ # GUIX_BUILD_OPTIONS should be empty ################ # # GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that # can perform builds. This seems like what we want instead of # ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually # _appended_ to normal command-line options. Meaning that they will take # precedence over the command-specific ADDITIONAL_GUIX__FLAGS. # # This seems like a poor user experience. Thus we check for GUIX_BUILD_OPTIONS's # existence here and direct users of this script to use our (more flexible) # custom environment variables. if [ -n "$GUIX_BUILD_OPTIONS" ]; then cat << EOF Error: Environment variable GUIX_BUILD_OPTIONS is not empty: '$GUIX_BUILD_OPTIONS' Unfortunately this script is incompatible with GUIX_BUILD_OPTIONS, please unset GUIX_BUILD_OPTIONS and use ADDITIONAL_GUIX_COMMON_FLAGS to set build options across guix commands or ADDITIONAL_GUIX__FLAGS to set build options for a specific guix command. See contrib/guix/README.md for more details. EOF exit 1 fi ################ # The git worktree should not be dirty ################ if ! git diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then cat << EOF ERR: The current git worktree is dirty, which may lead to broken builds. Aborting... Hint: To make your git worktree clean, You may want to: 1. Commit your changes, 2. Stash your changes, or 3. Set the 'FORCE_DIRTY_WORKTREE' environment variable if you insist on using a dirty worktree EOF exit 1 fi mkdir -p "$VERSION_BASE" ################ # Build directories should not exist ################ # Default to building for all supported HOSTs (overridable by environment) export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu}" # Usage: distsrc_for_host HOST # # HOST: The current platform triple we're building for # distsrc_for_host() { echo "${DISTSRC_BASE}/distsrc-${VERSION}-${1}" } # Accumulate a list of build directories that already exist... hosts_distsrc_exists="" for host in $HOSTS; do if [ -e "$(distsrc_for_host "$host")" ]; then hosts_distsrc_exists+=" ${host}" fi done if [ -n "$hosts_distsrc_exists" ]; then # ...so that we can print them out nicely in an error message cat << EOF ERR: Build directories for this commit already exist for the following platform triples you're attempting to build, probably because of previous builds. Please remove, or otherwise deal with them prior to starting another build. Aborting... Hint: To blow everything away, you may want to use: $ ./contrib/guix/guix-clean Specifically, this will remove all files without an entry in the index, excluding the SDK directory, the depends download cache, the depends built packages cache, the garbage collector roots for Guix environments, and the output directory. EOF for host in $hosts_distsrc_exists; do echo " ${host} '$(distsrc_for_host "$host")'" done exit 1 else mkdir -p "$DISTSRC_BASE" fi ################ # When building for darwin, the macOS SDK should exist ################ for host in $HOSTS; do case "$host" in *darwin*) OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=@@g')" if [ -e "$OSX_SDK" ]; then echo "Found macOS SDK at '${OSX_SDK}', using..." break else echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, exiting..." exit 1 fi ;; esac done ################ # VERSION_BASE should have enough space ################ avail_KiB="$(df -Pk "$VERSION_BASE" | sed 1d | tr -s ' ' | cut -d' ' -f4)" total_required_KiB=0 for host in $HOSTS; do case "$host" in *darwin*) required_KiB=440000 ;; *mingw*) required_KiB=7600000 ;; *) required_KiB=6400000 ;; esac total_required_KiB=$((total_required_KiB+required_KiB)) done if (( total_required_KiB > avail_KiB )); then total_required_GiB=$((total_required_KiB / 1048576)) avail_GiB=$((avail_KiB / 1048576)) echo "Performing a Munt Core Guix build for the selected HOSTS requires ${total_required_GiB} GiB, however, only ${avail_GiB} GiB is available. Please free up some disk space before performing the build." exit 1 fi ################ # Check that we can connect to the guix-daemon ################ cat << EOF Checking that we can connect to the guix-daemon... Hint: If this hangs, you may want to try turning your guix-daemon off and on again. EOF if ! guix gc --list-failures > /dev/null; then cat << EOF ERR: Failed to connect to the guix-daemon, please ensure that one is running and reachable. EOF exit 1 fi # Developer note: we could use `guix repl` for this check and run: # # (import (guix store)) (close-connection (open-connection)) # # However, the internal API is likely to change more than the CLI invocation ################ # Services database must have basic entries ################ if ! getent services http https ftp > /dev/null 2>&1; then cat << EOF ERR: Your system's C library cannot find service database entries for at least one of the following services: http, https, ftp. Hint: Most likely, /etc/services does not exist yet (common for docker images and minimal distros), or you don't have permissions to access it. If /etc/services does not exist yet, you may want to install the appropriate package for your distro which provides it. On Debian/Ubuntu: netbase On Arch Linux: iana-etc For more information, see: getent(1), services(5) EOF fi ######### # SETUP # ######### # Determine the maximum number of jobs to run simultaneously (overridable by # environment) JOBS="${JOBS:-$(nproc)}" # Usage: host_to_commonname HOST # # HOST: The current platform triple we're building for # host_to_commonname() { case "$1" in *darwin*) echo osx ;; *mingw*) echo win ;; *linux*) echo linux ;; *) exit 1 ;; esac } # Determine the reference time used for determinism (overridable by environment) SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}" # Precious directories are those which should not be cleaned between successive # guix builds depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH CODESIGN_PATH' precious_dir_names="${depends_precious_dir_names} OUTDIR_BASE PROFILES_BASE" # Usage: contains IFS-SEPARATED-LIST ITEM contains() { for i in ${1}; do if [ "$i" = "${2}" ]; then return 0 # Found! fi done return 1 } # If the user explicitly specified a precious directory, create it so we # can map it into the container for precious_dir_name in $precious_dir_names; do precious_dir_path="${!precious_dir_name}" if [ -n "$precious_dir_path" ]; then if [ ! -e "$precious_dir_path" ]; then mkdir -p "$precious_dir_path" elif [ -L "$precious_dir_path" ]; then echo "ERR: ${precious_dir_name} cannot be a symbolic link" exit 1 elif [ ! -d "$precious_dir_path" ]; then echo "ERR: ${precious_dir_name} must be a directory" exit 1 fi fi done mkdir -p "$VAR_BASE" # Record the _effective_ values of precious directories such that guix-clean can # avoid clobbering them if appropriate. # # shellcheck disable=SC2046,SC2086 { # Get depends precious dir definitions from depends make -C "${PWD}/depends" \ --no-print-directory \ -- $(printf "print-%s\n" $depends_precious_dir_names) # Get remaining precious dir definitions from the environment for precious_dir_name in $precious_dir_names; do precious_dir_path="${!precious_dir_name}" if ! contains "$depends_precious_dir_names" "$precious_dir_name"; then echo "${precious_dir_name}=${precious_dir_path}" fi done } > "${VAR_BASE}/precious_dirs" # Make sure an output directory exists for our builds OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}" mkdir -p "$OUTDIR_BASE" # Download the depends sources now as we won't have internet access in the build # container for host in $HOSTS; do make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} done # Usage: outdir_for_host HOST SUFFIX # # HOST: The current platform triple we're building for # outdir_for_host() { echo "${OUTDIR_BASE}/${1}${2:+-${2}}" } # Usage: profiledir_for_host HOST SUFFIX # # HOST: The current platform triple we're building for # profiledir_for_host() { echo "${PROFILES_BASE}/${1}${2:+-${2}}" } ######### # BUILD # ######### # Function to be called when building for host ${1} and the user interrupts the # build int_trap() { cat << EOF ** INT received while building ${1}, you may want to clean up the relevant work directories (e.g. distsrc-*) before rebuilding Hint: To blow everything away, you may want to use: $ ./contrib/guix/guix-clean Specifically, this will remove all files without an entry in the index, excluding the SDK directory, the depends download cache, the depends built packages cache, the garbage collector roots for Guix environments, and the output directory. EOF } # Deterministically build Munt # shellcheck disable=SC2153 for host in $HOSTS; do # Display proper warning when the user interrupts the build trap 'int_trap ${host}' INT ( # Required for 'contrib/guix/manifest.scm' to output the right manifest # for the particular $HOST we're building for export HOST="$host" # shellcheck disable=SC2030 cat << EOF INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}: ...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set} ...running at most ${JOBS:?not set} jobs ...from worktree directory: '${PWD}' ...bind-mounted in container to: '/munt' ...in build directory: '$(distsrc_for_host "$HOST")' ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")' ...outputting in: '$(outdir_for_host "$HOST")' ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")' EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # # Explanation of `guix environment` flags: # # --container run command within an isolated container # # Running in an isolated container minimizes build-time differences # between machines and improves reproducibility # # --pure unset existing environment variables # # Same rationale as --container # # --no-cwd do not share current working directory with an # isolated container # # When --container is specified, the default behavior is to share # the current working directory with the isolated container at the # same exact path (e.g. mapping '/home/satoshi/munt/' to # '/home/satoshi/munt/'). This means that the $PWD inside the # container becomes a source of irreproducibility. --no-cwd disables # this behaviour. # # --share=SPEC for containers, share writable host file system # according to SPEC # # --share="$PWD"=/munt # # maps our current working directory to /munt # inside the isolated container, which we later cd # into. # # While we don't want to map our current working directory to the # same exact path (as this introduces irreproducibility), we do want # it to be at a _fixed_ path _somewhere_ inside the isolated # container so that we have something to build. '/munt' was # chosen arbitrarily. # # ${SOURCES_PATH:+--share="$SOURCES_PATH"} # # make the downloaded depends sources path available # inside the isolated container # # The isolated container has no network access as it's in a # different network namespace from the main machine, so we have to # make the downloaded depends sources available to it. The sources # should have been downloaded prior to this invocation. # # --keep-failed keep build tree of failed builds # # When builds of the Guix environment itself (not Munt Core) # fail, it is useful for the build tree to be kept for debugging # purposes. # # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} # # fetch substitute from SUBSTITUTE_URLS if they are # authorized # # Depending on the user's security model, it may be desirable to use # substitutes (pre-built packages) from servers that the user trusts. # Please read the README.md in the same directory as this file for # more information. # # shellcheck disable=SC2086,SC2031 time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ --share="$PWD"=/munt \ --share="$DISTSRC_BASE"=/distsrc-base \ --share="$OUTDIR_BASE"=/outdir-base \ --expose="$(git rev-parse --git-common-dir)" \ ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ ${BASE_CACHE:+--share="$BASE_CACHE"} \ ${SDK_PATH:+--share="$SDK_PATH"} \ ${CODESIGN_PATH:+--share="$CODESIGN_PATH"} \ --cores="$JOBS" \ --keep-failed \ --fallback \ --link-profile \ --root="$(profiledir_for_host "${HOST}")" \ ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \ ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ -- env HOST="$host" \ DISTNAME="$DISTNAME" \ JOBS="$JOBS" \ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ ${V:+V=1} \ ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ ${BASE_CACHE:+BASE_CACHE="$BASE_CACHE"} \ ${SDK_PATH:+SDK_PATH="$SDK_PATH"} \ ${CODESIGN_PATH:+CODESIGN_PATH="$CODESIGN_PATH"} \ DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \ OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ bash -c "cd /munt && bash contrib/guix/libexec/build.sh" ) done ================================================ FILE: contrib/guix/guix-clean ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # Source the common prelude, which: # 1. Checks if we're at the top directory of the repository # 2. Defines a few common functions and variables # # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" ################### ## Sanity Checks ## ################### ################ # Required non-builtin commands should be invokable ################ check_tools cat mkdir make git guix ############# ## Clean ## ############# # Usage: under_dir MAYBE_PARENT MAYBE_CHILD # # If MAYBE_CHILD is a subdirectory of MAYBE_PARENT, print the relative path # from MAYBE_PARENT to MAYBE_CHILD. Otherwise, return 1 as the error code. # # NOTE: This does not perform any symlink-resolving or path canonicalization. # under_dir() { local path_residue path_residue="${2##"${1}"}" if [ -z "$path_residue" ] || [ "$path_residue" = "$2" ]; then return 1 else echo "$path_residue" fi } # Usage: dir_under_git_root MAYBE_CHILD # # If MAYBE_CHILD is under the current git repository and exists, print the # relative path from the git repository's top-level directory to MAYBE_CHILD, # otherwise, exit with an error code. # dir_under_git_root() { local rv rv="$(under_dir "$(git_root)" "$1")" [ -n "$rv" ] && echo "$rv" } shopt -s nullglob found_precious_dirs_files=( "${version_base_prefix}"*/"${var_base_basename}/precious_dirs" ) # This expands to an array of directories... shopt -u nullglob exclude_flags=() for precious_dirs_file in "${found_precious_dirs_files[@]}"; do # Make sure the precious directories (e.g. SOURCES_PATH, BASE_CACHE, SDK_PATH) # are excluded from git-clean echo "Found precious_dirs file: '${precious_dirs_file}'" # Exclude the precious_dirs file itself if dirs_file_exclude_fragment=$(dir_under_git_root "$(dirname "$precious_dirs_file")"); then exclude_flags+=( --exclude="${dirs_file_exclude_fragment}/precious_dirs" ) fi # Read each 'name=dir' pair from the precious_dirs file while IFS='=' read -r name dir; do # Add an exclusion flag if the precious directory is under the git root. if under=$(dir_under_git_root "$dir"); then echo "Avoiding ${name}: ${under}" exclude_flags+=( --exclude="$under" ) fi done < "$precious_dirs_file" done git clean -xdff "${exclude_flags[@]}" ================================================ FILE: contrib/guix/guix-codesign ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # Source the common prelude, which: # 1. Checks if we're at the top directory of the repository # 2. Defines a few common functions and variables # # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" ################### ## SANITY CHECKS ## ################### ################ # Required non-builtin commands should be invocable ################ check_tools cat mkdir git guix ################ # Required env vars should be non-empty ################ cmd_usage() { cat < \\ ./contrib/guix/guix-codesign EOF } if [ -z "$DETACHED_SIGS_REPO" ]; then cmd_usage exit 1 fi ################ # GUIX_BUILD_OPTIONS should be empty ################ # # GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that # can perform builds. This seems like what we want instead of # ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually # _appended_ to normal command-line options. Meaning that they will take # precedence over the command-specific ADDITIONAL_GUIX__FLAGS. # # This seems like a poor user experience. Thus we check for GUIX_BUILD_OPTIONS's # existence here and direct users of this script to use our (more flexible) # custom environment variables. if [ -n "$GUIX_BUILD_OPTIONS" ]; then cat << EOF Error: Environment variable GUIX_BUILD_OPTIONS is not empty: '$GUIX_BUILD_OPTIONS' Unfortunately this script is incompatible with GUIX_BUILD_OPTIONS, please unset GUIX_BUILD_OPTIONS and use ADDITIONAL_GUIX_COMMON_FLAGS to set build options across guix commands or ADDITIONAL_GUIX__FLAGS to set build options for a specific guix command. See contrib/guix/README.md for more details. EOF exit 1 fi ################ # The codesignature git worktree should not be dirty ################ if ! git -C "$DETACHED_SIGS_REPO" diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then cat << EOF ERR: The DETACHED CODESIGNATURE git worktree is dirty, which may lead to broken builds. Aborting... Hint: To make your git worktree clean, You may want to: 1. Commit your changes, 2. Stash your changes, or 3. Set the 'FORCE_DIRTY_WORKTREE' environment variable if you insist on using a dirty worktree EOF exit 1 fi ################ # Build directories should not exist ################ # Default to building for all supported HOSTs (overridable by environment) export HOSTS="${HOSTS:-x86_64-w64-mingw32 x86_64-apple-darwin arm64-apple-darwin}" # Usage: distsrc_for_host HOST # # HOST: The current platform triple we're building for # distsrc_for_host() { echo "${DISTSRC_BASE}/distsrc-${VERSION}-${1}-codesigned" } # Accumulate a list of build directories that already exist... hosts_distsrc_exists="" for host in $HOSTS; do if [ -e "$(distsrc_for_host "$host")" ]; then hosts_distsrc_exists+=" ${host}" fi done if [ -n "$hosts_distsrc_exists" ]; then # ...so that we can print them out nicely in an error message cat << EOF ERR: Build directories for this commit already exist for the following platform triples you're attempting to build, probably because of previous builds. Please remove, or otherwise deal with them prior to starting another build. Aborting... Hint: To blow everything away, you may want to use: $ ./contrib/guix/guix-clean Specifically, this will remove all files without an entry in the index, excluding the SDK directory, the depends download cache, the depends built packages cache, the garbage collector roots for Guix environments, and the output directory. EOF for host in $hosts_distsrc_exists; do echo " ${host} '$(distsrc_for_host "$host")'" done exit 1 else mkdir -p "$DISTSRC_BASE" fi ################ # Unsigned tarballs SHOULD exist ################ # Usage: outdir_for_host HOST SUFFIX # # HOST: The current platform triple we're building for # outdir_for_host() { echo "${OUTDIR_BASE}/${1}${2:+-${2}}" } unsigned_tarball_for_host() { case "$1" in *mingw*) echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz" ;; *darwin*) echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz" ;; *) exit 1 ;; esac } # Accumulate a list of build directories that already exist... hosts_unsigned_tarball_missing="" for host in $HOSTS; do if [ ! -e "$(unsigned_tarball_for_host "$host")" ]; then hosts_unsigned_tarball_missing+=" ${host}" fi done if [ -n "$hosts_unsigned_tarball_missing" ]; then # ...so that we can print them out nicely in an error message cat << EOF ERR: Unsigned tarballs do not exist ... EOF for host in $hosts_unsigned_tarball_missing; do echo " ${host} '$(unsigned_tarball_for_host "$host")'" done exit 1 fi ################ # Check that we can connect to the guix-daemon ################ cat << EOF Checking that we can connect to the guix-daemon... Hint: If this hangs, you may want to try turning your guix-daemon off and on again. EOF if ! guix gc --list-failures > /dev/null; then cat << EOF ERR: Failed to connect to the guix-daemon, please ensure that one is running and reachable. EOF exit 1 fi # Developer note: we could use `guix repl` for this check and run: # # (import (guix store)) (close-connection (open-connection)) # # However, the internal API is likely to change more than the CLI invocation ######### # SETUP # ######### # Determine the maximum number of jobs to run simultaneously (overridable by # environment) JOBS="${JOBS:-$(nproc)}" # Determine the reference time used for determinism (overridable by environment) SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}" # Make sure an output directory exists for our builds OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}" mkdir -p "$OUTDIR_BASE" # Usage: profiledir_for_host HOST SUFFIX # # HOST: The current platform triple we're building for # profiledir_for_host() { echo "${PROFILES_BASE}/${1}${2:+-${2}}" } ######### # BUILD # ######### # Function to be called when codesigning for host ${1} and the user interrupts # the codesign int_trap() { cat << EOF ** INT received while codesigning ${1}, you may want to clean up the relevant work directories (e.g. distsrc-*) before recodesigning Hint: To blow everything away, you may want to use: $ ./contrib/guix/guix-clean Specifically, this will remove all files without an entry in the index, excluding the SDK directory, the depends download cache, the depends built packages cache, the garbage collector roots for Guix environments, and the output directory. EOF } # Deterministically build Munt # shellcheck disable=SC2153 for host in $HOSTS; do # Display proper warning when the user interrupts the build trap 'int_trap ${host}' INT ( # Required for 'contrib/guix/manifest.scm' to output the right manifest # for the particular $HOST we're building for export HOST="$host" # shellcheck disable=SC2030 cat << EOF INFO: Codesigning ${VERSION:?not set} for platform triple ${HOST:?not set}: ...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set} ...from worktree directory: '${PWD}' ...bind-mounted in container to: '/munt' ...in build directory: '$(distsrc_for_host "$HOST")' ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")' ...outputting in: '$(outdir_for_host "$HOST" codesigned)' ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)' ...using detached signatures in: '${DETACHED_SIGS_REPO:?not set}' ...bind-mounted in container to: '/detached-sigs' EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # # Explanation of `guix environment` flags: # # --container run command within an isolated container # # Running in an isolated container minimizes build-time differences # between machines and improves reproducibility # # --pure unset existing environment variables # # Same rationale as --container # # --no-cwd do not share current working directory with an # isolated container # # When --container is specified, the default behavior is to share # the current working directory with the isolated container at the # same exact path (e.g. mapping '/home/satoshi/munt/' to # '/home/satoshi/munt/'). This means that the $PWD inside the # container becomes a source of irreproducibility. --no-cwd disables # this behaviour. # # --share=SPEC for containers, share writable host file system # according to SPEC # # --share="$PWD"=/munt # # maps our current working directory to /munt # inside the isolated container, which we later cd # into. # # While we don't want to map our current working directory to the # same exact path (as this introduces irreproducibility), we do want # it to be at a _fixed_ path _somewhere_ inside the isolated # container so that we have something to build. '/munt' was # chosen arbitrarily. # # ${SOURCES_PATH:+--share="$SOURCES_PATH"} # # make the downloaded depends sources path available # inside the isolated container # # The isolated container has no network access as it's in a # different network namespace from the main machine, so we have to # make the downloaded depends sources available to it. The sources # should have been downloaded prior to this invocation. # # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} # # fetch substitute from SUBSTITUTE_URLS if they are # authorized # # Depending on the user's security model, it may be desirable to use # substitutes (pre-built packages) from servers that the user trusts. # Please read the README.md in the same directory as this file for # more information. # # shellcheck disable=SC2086,SC2031 time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ --share="$PWD"=/munt \ --share="$DISTSRC_BASE"=/distsrc-base \ --share="$OUTDIR_BASE"=/outdir-base \ --share="$DETACHED_SIGS_REPO"=/detached-sigs \ --expose="$(git rev-parse --git-common-dir)" \ --expose="$(git -C "$DETACHED_SIGS_REPO" rev-parse --git-common-dir)" \ ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ --cores="$JOBS" \ --keep-failed \ --fallback \ --link-profile \ --root="$(profiledir_for_host "${HOST}" codesigned)" \ ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \ ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ -- env HOST="$host" \ DISTNAME="$DISTNAME" \ JOBS="$JOBS" \ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ ${V:+V=1} \ ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \ OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)" \ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ DETACHED_SIGS_REPO=/detached-sigs \ UNSIGNED_TARBALL="$(OUTDIR_BASE=/outdir-base && unsigned_tarball_for_host "$HOST")" \ bash -c "cd /munt && bash contrib/guix/libexec/codesign.sh" ) done ================================================ FILE: contrib/guix/guix-verify ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # Source the common prelude, which: # 1. Checks if we're at the top directory of the repository # 2. Defines a few common functions and variables # # shellcheck source=libexec/prelude.bash source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash" ################### ## Sanity Checks ## ################### ################ # Required non-builtin commands should be invokable ################ check_tools cat diff gpg ################ # Required env vars should be non-empty ################ cmd_usage() { cat < [ SIGNER= ] ./contrib/guix/guix-verify Example overriding signer's manifest to use as base env GUIX_SIGS_REPO=/home/dongcarl/guix.sigs SIGNER=achow101 ./contrib/guix/guix-verify EOF } if [ -z "$GUIX_SIGS_REPO" ]; then cmd_usage exit 1 fi ################ # GUIX_SIGS_REPO should exist as a directory ################ if [ ! -d "$GUIX_SIGS_REPO" ]; then cat << EOF ERR: The specified GUIX_SIGS_REPO is not an existent directory: '$GUIX_SIGS_REPO' Hint: Please clone the guix.sigs repository and point to it with the GUIX_SIGS_REPO environment variable. EOF cmd_usage exit 1 fi ############## ## Verify ## ############## OUTSIGDIR_BASE="${GUIX_SIGS_REPO}/${VERSION}" echo "Looking for signature directories in '${OUTSIGDIR_BASE}'" echo "" # Usage: verify compare_manifest current_manifest verify() { local compare_manifest="$1" local current_manifest="$2" if ! gpg --quiet --batch --verify "$current_manifest".asc "$current_manifest" 1>&2; then echo "ERR: Failed to verify GPG signature in '${current_manifest}'" echo "" echo "Hint: Either the signature is invalid or the public key is missing" echo "" failure=1 elif ! diff --report-identical "$compare_manifest" "$current_manifest" 1>&2; then echo "ERR: The SHA256SUMS attestation in these two directories differ:" echo " '${compare_manifest}'" echo " '${current_manifest}'" echo "" failure=1 else echo "Verified: '${current_manifest}'" echo "" fi } shopt -s nullglob all_noncodesigned=( "$OUTSIGDIR_BASE"/*/noncodesigned.SHA256SUMS ) shopt -u nullglob echo "--------------------" echo "" if (( ${#all_noncodesigned[@]} )); then compare_noncodesigned="${all_noncodesigned[0]}" if [[ -n "$SIGNER" ]]; then signer_noncodesigned="$OUTSIGDIR_BASE/$SIGNER/noncodesigned.SHA256SUMS" if [[ -f "$signer_noncodesigned" ]]; then echo "Using $SIGNER's manifest as the base to compare against" compare_noncodesigned="$signer_noncodesigned" else echo "Unable to find $SIGNER's manifest, using the first one found" fi else echo "No SIGNER provided, using the first manifest found" fi for current_manifest in "${all_noncodesigned[@]}"; do verify "$compare_noncodesigned" "$current_manifest" done echo "DONE: Checking output signatures for noncodesigned.SHA256SUMS" echo "" else echo "WARN: No signature directories with noncodesigned.SHA256SUMS found" echo "" fi shopt -s nullglob all_all=( "$OUTSIGDIR_BASE"/*/all.SHA256SUMS ) shopt -u nullglob echo "--------------------" echo "" if (( ${#all_all[@]} )); then compare_all="${all_all[0]}" if [[ -n "$SIGNER" ]]; then signer_all="$OUTSIGDIR_BASE/$SIGNER/all.SHA256SUMS" if [[ -f "$signer_all" ]]; then echo "Using $SIGNER's manifest as the base to compare against" compare_all="$signer_all" else echo "Unable to find $SIGNER's manifest, using the first one found" fi else echo "No SIGNER provided, using the first manifest found" fi for current_manifest in "${all_all[@]}"; do verify "$compare_all" "$current_manifest" done # Sanity check: there should be no entries that exist in # noncodesigned.SHA256SUMS that doesn't exist in all.SHA256SUMS if [[ "$(comm -23 <(sort "$compare_noncodesigned") <(sort "$compare_all") | wc -c)" -ne 0 ]]; then echo "ERR: There are unique lines in noncodesigned.SHA256SUMS which" echo " do not exist in all.SHA256SUMS, something went very wrong." exit 1 fi echo "DONE: Checking output signatures for all.SHA256SUMS" echo "" else echo "WARN: No signature directories with all.SHA256SUMS found" echo "" fi echo "====================" echo "" if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then echo "ERR: Unable to perform any verifications as no signature directories" echo " were found" echo "" exit 1 fi if [ -n "$failure" ]; then exit 1 fi ================================================ FILE: contrib/guix/libexec/build.sh ================================================ #!/usr/bin/env bash # Copyright (c) 2019-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C set -e -o pipefail export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix # environment`. It does make sense for at least `guix environment --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line. # # This line should be placed before any commands which creates files. umask 0022 if [ -n "$V" ]; then # Print both unexpanded (-v) and expanded (-x) forms of commands as they are # read from this file. set -vx # Set VERBOSE for CMake-based builds export VERBOSE="$V" fi # Check that required environment variables are set cat << EOF Required environment variables as seen inside the container: DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set} DISTNAME: ${DISTNAME:?not set} HOST: ${HOST:?not set} SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set} JOBS: ${JOBS:?not set} DISTSRC: ${DISTSRC:?not set} OUTDIR: ${OUTDIR:?not set} EOF ACTUAL_OUTDIR="${OUTDIR}" OUTDIR="${DISTSRC}/output" ##################### # Environment Setup # ##################### # The depends folder also serves as a base-prefix for depends packages for # $HOSTs after successfully building. BASEPREFIX="${PWD}/depends" # Given a package name and an output name, return the path of that output in our # current guix environment store_path() { grep --extended-regexp "/[^-]{32}-${1}-[^-]+${2:+-${2}}" "${GUIX_ENVIRONMENT}/manifest" \ | head --lines=1 \ | sed --expression='s|^[[:space:]]*"||' \ --expression='s|"[[:space:]]*$||' } # Set environment variables to point the NATIVE toolchain to the right # includes/libs NATIVE_GCC="$(store_path gcc-toolchain)" NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)" unset LIBRARY_PATH unset CPATH unset C_INCLUDE_PATH unset CPLUS_INCLUDE_PATH unset OBJC_INCLUDE_PATH unset OBJCPLUS_INCLUDE_PATH export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64:${NATIVE_GCC_STATIC}/lib:${NATIVE_GCC_STATIC}/lib64" export C_INCLUDE_PATH="${NATIVE_GCC}/include" export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include" export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include" export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include" prepend_to_search_env_var() { export "${1}=${2}${!1:+:}${!1}" } # Set environment variables to point the CROSS toolchain to the right # includes/libs for $HOST case "$HOST" in *mingw*) # Determine output paths to use in CROSS_* environment variables CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")" CROSS_GCC="$(store_path "gcc-cross-${HOST}")" CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)" CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) # The search path ordering is generally: # 1. gcc-related search paths # 2. libc-related search paths # 2. kernel-header-related search paths (not applicable to mingw-w64 hosts) export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include" export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib" ;; *darwin*) # The CROSS toolchain for darwin uses the SDK and ignores environment variables. # See depends/hosts/darwin.mk for more details. ;; *linux*) CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")" CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)" CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")" CROSS_GCC="$(store_path "gcc-cross-${HOST}")" CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)" CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include" export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib" ;; *) exit 1 ;; esac # Sanity check CROSS_*_PATH directories IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}" for p in "${PATHS[@]}"; do if [ -n "$p" ] && [ ! -d "$p" ]; then echo "'$p' doesn't exist or isn't a directory... Aborting..." exit 1 fi done # Disable Guix ld auto-rpath behavior case "$HOST" in *darwin*) # The auto-rpath behavior is necessary for darwin builds as some native # tools built by depends refer to and depend on Guix-built native # libraries # # After the native packages in depends are built, the ld wrapper should # no longer affect our build, as clang would instead reach for # x86_64-apple-darwin-ld from cctools ;; *) export GUIX_LD_WRAPPER_DISABLE_RPATH=yes ;; esac # Make /usr/bin if it doesn't exist [ -e /usr/bin ] || mkdir -p /usr/bin # Symlink file and env to a conventional path [ -e /usr/bin/file ] || ln -s --no-dereference "$(command -v file)" /usr/bin/file [ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env # Determine the correct value for -Wl,--dynamic-linker for the current $HOST case "$HOST" in *linux*) glibc_dynamic_linker=$( case "$HOST" in i686-linux-gnu) echo /lib/ld-linux.so.2 ;; x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;; arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;; aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;; riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;; powerpc64-linux-gnu) echo /lib64/ld64.so.1;; powerpc64le-linux-gnu) echo /lib64/ld64.so.2;; *) exit 1 ;; esac ) ;; esac # Environment variables for determinism export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name" export TZ="UTC" case "$HOST" in *darwin*) # cctools AR, unlike GNU binutils AR, does not have a deterministic mode # or a configure flag to enable determinism by default, it only # understands if this env-var is set or not. See: # # https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334 export ZERO_AR_DATE=yes ;; esac #################### # Depends Building # #################### # Build the depends tree, overriding variables that assume multilib gcc make -C depends --jobs="$JOBS" HOST="$HOST" \ ${V:+V=1} \ ${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \ ${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \ ${SDK_PATH+SDK_PATH="$SDK_PATH"} \ ${CODESIGN_PATH+CODESIGN_PATH="$CODESIGN_PATH"} \ i686_linux_CC=i686-linux-gnu-gcc \ i686_linux_CXX=i686-linux-gnu-g++ \ i686_linux_AR=i686-linux-gnu-ar \ i686_linux_RANLIB=i686-linux-gnu-ranlib \ i686_linux_NM=i686-linux-gnu-nm \ i686_linux_STRIP=i686-linux-gnu-strip \ x86_64_linux_CC=x86_64-linux-gnu-gcc \ x86_64_linux_CXX=x86_64-linux-gnu-g++ \ x86_64_linux_AR=x86_64-linux-gnu-ar \ x86_64_linux_RANLIB=x86_64-linux-gnu-ranlib \ x86_64_linux_NM=x86_64-linux-gnu-nm \ x86_64_linux_STRIP=x86_64-linux-gnu-strip \ FORCE_USE_SYSTEM_CLANG=1 \ EXTRA_PACKAGES='node_addon_api electron_node_headers' ########################### # Source Tarball Building # ########################### GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz" # Create the source tarball if not already there if [ ! -e "$GIT_ARCHIVE" ]; then mkdir -p "$(dirname "$GIT_ARCHIVE")" git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD fi mkdir -p "$OUTDIR" ########################### # Binary Tarball Building # ########################### # CONFIGFLAGS CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary --disable-man --enable-zmq --with-node-js-libs --with-qrencode" # CFLAGS HOST_CFLAGS="-O2 -g" HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) case "$HOST" in *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;; *mingw*) HOST_CFLAGS+=" -fno-ident" # Hardening currently breaks mingw builds because it pulls libssp in as a dep; even though this isn't meant to happen (gcc is meant to be providing these symbols) # disable for now until we can investigate further CONFIGFLAGS+=" --disable-hardening " ;; *darwin*) unset HOST_CFLAGS ;; esac # CXXFLAGS HOST_CXXFLAGS="$HOST_CFLAGS" case "$HOST" in arm-linux-gnueabihf) HOST_CXXFLAGS="${HOST_CXXFLAGS} -Wno-psabi" ;; esac # LDFLAGS case "$HOST" in # static libstdc++ is giving is undefined symbol issues when using our lib with the latest electron, so remove it for now, but this should be investigated further. # *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++ -Wl,-O2" ;; *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -lstdc++ -Wl,-O3" ;; *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;; esac # Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by # avoiding a PowerPC64 optimisation available in glibc 2.22 and later. # https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html case "$HOST" in *powerpc64*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,--no-tls-get-addr-optimize" ;; esac case "$HOST" in powerpc64-linux-*|riscv64-linux-*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,-z,noexecstack" ;; esac # Make $HOST-specific native binaries from depends available in $PATH export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" mkdir -p "$DISTSRC" ( cd "$DISTSRC" # Extract the source tarball tar --strip-components=1 -xf "${GIT_ARCHIVE}" case "$HOST" in *mingw*) export HOST_CXXFLAGS="${HOST_CXXFLAGS} -I/munt/depends/${HOST}/include/node -I/munt/depends/${HOST}/include/node-addon-api -fPIC -fdata-sections -ffunction-sections -fomit-frame-pointer -DNAPI_VERSION=5 -DDJINNI_NODEJS -DNODE_HOST_BINARY=node.exe -DUSING_UV_SHARED=1 -DUSING_V8_SHARED=1 -DV8_DEPRECATION_WARNINGS=1 -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DBUILDING_NODE_EXTENSION -D_WINDLL -lminiupnpc" export HOST_LDFLAGS="${HOST_LDFLAGS} -fPIC -Bsymbolic -lnode -Wl,--gc-sections" ;; *darwin*) export HOST_CXXFLAGS="${HOST_CXXFLAGS} -I/munt/depends/${HOST}/include/node -I/munt/depends/${HOST}/include/node-addon-api -fPIC -fdata-sections -ffunction-sections -fomit-frame-pointer -DNAPI_VERSION=5 -DDJINNI_NODEJS -D_HAS_EXCEPTIONS=1" export HOST_LDFLAGS="${HOST_LDFLAGS} -fPIC -Bsymbolic -Wl,-undefined -Wl,dynamic_lookup" ;; *linux*) export HOST_CXXFLAGS="${HOST_CXXFLAGS} -I/munt/depends/${HOST}/include/node -I/munt/depends/${HOST}/include/node-addon-api -fPIC -fdata-sections -ffunction-sections -fomit-frame-pointer -DNAPI_VERSION=5 -DDJINNI_NODEJS -lminiupnpc" export HOST_LDFLAGS="${HOST_LDFLAGS} -fPIC -Bsymbolic -Wl,--gc-sections" ;; esac export HOST_CFLAGS=${HOST_CFLAGS} #end electron specific setup ./autogen.sh # Configure this DISTSRC for $HOST # shellcheck disable=SC2086 env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \ ./configure --prefix=/ \ --disable-ccache \ --disable-maintainer-mode \ --disable-dependency-tracking \ --with-protoc-bindir=/munt/depends/${HOST}/native/bin/ \ ${CONFIGFLAGS} \ ${HOST_CFLAGS:+CFLAGS="${HOST_CFLAGS}"} \ ${HOST_CXXFLAGS:+CXXFLAGS="${HOST_CXXFLAGS}"} \ ${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"} sed -i.old 's/-lstdc++ //g' config.status libtool # Build Munt make --jobs="$JOBS" ${V:+V=1} # Check that symbol/security checks tools are sane. #make test-security-check ${V:+V=1} # Perform basic security checks on a series of executables. make -C src --jobs=1 check-security ${V:+V=1} # Check that executables only contain allowed version symbols. make -C src --jobs=1 check-symbols ${V:+V=1} mkdir -p "$OUTDIR" #fixme: We do some duplicate work here (split debug symbols and sign then later do this again); we should improve the process so its only done once. case "$HOST" in *mingw*) # Move executables into release folder mkdir release find . -name "*.exe" | xargs --max-procs 32 -i cp {} release/ # Split debug symbols find "release" -type f -executable -print0 | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg #Sign all executables find release -name "*.exe" | xargs --max-procs 32 -i sh -c "(osslsigncode -spc \"${CODESIGN_PATH}/codesign.spc\" -key \"${CODESIGN_PATH}/codesign.key\" -n \"Munt\" -i \"https://www.Munt.org\" -in \"{}\" -out \"{}s\") && (mv {}s {})" # Make os-specific installer make deploy ${V:+V=1} # Sign the installer as well; place result in output folder find -name "*setup*.exe" | xargs -i sh -c "(osslsigncode -spc \"${CODESIGN_PATH}/codesign.spc\" -key \"${CODESIGN_PATH}/codesign.key\" -n \"Munt\" -i \"https://www.Munt.org\" -in \"{}\" -out \"${OUTDIR}/${DISTNAME}-win64-setup.exe\")" ;; esac # Setup the directory where our Munt build for HOST will be # installed. This directory will also later serve as the input for our # binary tarballs. INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p "${INSTALLPATH}" # Install built Munt to $INSTALLPATH case "$HOST" in *darwin*) make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1} ;; *) make install DESTDIR="${INSTALLPATH}" ${V:+V=1} ;; esac mkdir ${OUTDIR}/nodelib case "$HOST" in *mingw*) cp -f src/.libs/lib_unity_node_js-0.dll ${OUTDIR}/nodelib/libmunt_${HOST}.node ;; *darwin*) cp -f src/.libs/lib_unity_node_js.0.so ${OUTDIR}/nodelib/libmunt_${HOST}.node ;; *) cp -f src/.libs/lib_unity_node_js.so.0.0.0 ${OUTDIR}/nodelib/libmunt_${HOST}.node esac #darwin builds choke one split-debug.sh script, but other platforms need to run it or we have giant binaries to deal with #run for every platform except darwin for now until we can make this work also on darwin case "$HOST" in *darwin*) ;; *) ${DISTSRC}/contrib/devtools/split-debug.sh ${OUTDIR}/nodelib/libmunt_${HOST}.node ${OUTDIR}/nodelib/libmunt_${HOST}.node ${OUTDIR}/nodelib/libmunt_${HOST}.node.dbg esac ( cd installed # Prune libtool and object archives find . -name "lib*.la" -delete find . -name "lib*.a" -delete # Prune pkg-config files rm -rf "${DISTNAME}/lib/pkgconfig" case "$HOST" in *darwin*) ;; *) # Split binaries and libraries from their debug symbols { find "${DISTNAME}/bin" -type f -executable -print0 if [ -d ${DISTNAME}/lib ]; then find "${DISTNAME}/lib" -type f -print0 fi } | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg esac # Sign binaries after debug symbols split case "$HOST" in *mingw*) find "${DISTNAME}/bin" -name "*.exe" | xargs --max-procs 32 -i sh -c "(osslsigncode -spc \"${CODESIGN_PATH}/codesign.spc\" -key \"${CODESIGN_PATH}/codesign.key\" -n \"Munt\" -i \"https://www.Munt.org\" -in \"{}\" -out \"{}s\") && (mv {}s {})" ;; esac # Finally, deterministically produce {non-,}debug binary tarballs ready # for release case "$HOST" in *mingw*) find "${DISTNAME}" -not -name "*.dbg" -print0 \ | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" find "${DISTNAME}" -not -name "*.dbg" \ | sort \ | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" && exit 1 ) find "${DISTNAME}" -name "*.dbg" -print0 \ | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" find "${DISTNAME}" -name "*.dbg" \ | sort \ | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" && exit 1 ) ;; *linux*) find "${DISTNAME}" -not -name "*.dbg" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | pigz -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) find "${DISTNAME}" -name "*.dbg" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | pigz -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) ;; *darwin*) find "${DISTNAME}" -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ | pigz -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) ;; esac ) # $DISTSRC/installed ) # $DISTSRC rm -rf "$ACTUAL_OUTDIR" mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \ || ( rm -rf "$ACTUAL_OUTDIR" && exit 1 ) ( cd /outdir-base { echo "$GIT_ARCHIVE" find "$ACTUAL_OUTDIR" -type f } | xargs realpath --relative-base="$PWD" \ | xargs sha256sum \ | sort -k2 \ | sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part ) ================================================ FILE: contrib/guix/libexec/codesign.sh ================================================ #!/usr/bin/env bash # Copyright (c) 2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C set -e -o pipefail export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix # environment`. It does make sense for at least `guix environment --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line. # # This line should be placed before any commands which creates files. umask 0022 if [ -n "$V" ]; then # Print both unexpanded (-v) and expanded (-x) forms of commands as they are # read from this file. set -vx # Set VERBOSE for CMake-based builds export VERBOSE="$V" fi # Check that required environment variables are set cat << EOF Required environment variables as seen inside the container: UNSIGNED_TARBALL: ${UNSIGNED_TARBALL:?not set} DETACHED_SIGS_REPO: ${DETACHED_SIGS_REPO:?not set} DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set} DISTNAME: ${DISTNAME:?not set} HOST: ${HOST:?not set} SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set} DISTSRC: ${DISTSRC:?not set} OUTDIR: ${OUTDIR:?not set} EOF ACTUAL_OUTDIR="${OUTDIR}" OUTDIR="${DISTSRC}/output" git_head_version() { local recent_tag if recent_tag="$(git -C "$1" describe --exact-match HEAD 2> /dev/null)"; then echo "${recent_tag#v}" else git -C "$1" rev-parse --short=12 HEAD fi } CODESIGNATURE_GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}-codesignatures-$(git_head_version "$DETACHED_SIGS_REPO").tar.gz" # Create the codesignature tarball if not already there if [ ! -e "$CODESIGNATURE_GIT_ARCHIVE" ]; then mkdir -p "$(dirname "$CODESIGNATURE_GIT_ARCHIVE")" git -C "$DETACHED_SIGS_REPO" archive --output="$CODESIGNATURE_GIT_ARCHIVE" HEAD fi mkdir -p "$OUTDIR" mkdir -p "$DISTSRC" ( cd "$DISTSRC" tar -xf "$UNSIGNED_TARBALL" mkdir -p codesignatures tar -C codesignatures -xf "$CODESIGNATURE_GIT_ARCHIVE" case "$HOST" in *mingw*) find "$PWD" -name "*-unsigned.exe" | while read -r infile; do infile_base="$(basename "$infile")" # Codesigned *-unsigned.exe and output to OUTDIR osslsigncode attach-signature \ -in "$infile" \ -out "${OUTDIR}/${infile_base/-unsigned}" \ -sigin codesignatures/win/"$infile_base".pem done ;; *darwin*) # Apply detached codesignatures to dist/ (in-place) signapple apply dist/Munt-Qt.app codesignatures/osx/dist # Make an uncompressed DMG from dist/ xorrisofs -D -l -V "$(< osx_volname)" -no-pad -r -dir-mode 0755 \ -o uncompressed.dmg \ dist \ -- -volume_date all_file_dates ="$SOURCE_DATE_EPOCH" # Compress uncompressed.dmg and output to OUTDIR ./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-${HOST}.dmg" ;; *) exit 1 ;; esac ) # $DISTSRC rm -rf "$ACTUAL_OUTDIR" mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \ || ( rm -rf "$ACTUAL_OUTDIR" && exit 1 ) ( cd /outdir-base { echo "$UNSIGNED_TARBALL" echo "$CODESIGNATURE_GIT_ARCHIVE" find "$ACTUAL_OUTDIR" -type f } | xargs realpath --relative-base="$PWD" \ | xargs sha256sum \ | sort -k2 \ | sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part ) ================================================ FILE: contrib/guix/libexec/prelude.bash ================================================ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail # shellcheck source=contrib/shell/realpath.bash source contrib/shell/realpath.bash # shellcheck source=contrib/shell/git-utils.bash source contrib/shell/git-utils.bash ################ # Required non-builtin commands should be invocable ################ check_tools() { for cmd in "$@"; do if ! command -v "$cmd" > /dev/null 2>&1; then echo "ERR: This script requires that '$cmd' is installed and available in your \$PATH" exit 1 fi done } check_tools cat env readlink dirname basename git ################ # We should be at the top directory of the repository ################ same_dir() { local resolved1 resolved2 resolved1="$(bash_realpath "${1}")" resolved2="$(bash_realpath "${2}")" [ "$resolved1" = "$resolved2" ] } if ! same_dir "${PWD}" "$(git_root)"; then cat << EOF ERR: This script must be invoked from the top level of the git repository Hint: This may look something like: env FOO=BAR ./contrib/guix/guix- EOF exit 1 fi ################ # Execute "$@" in a pinned, possibly older version of Guix, for reproducibility # across time. time-machine() { # shellcheck disable=SC2086 guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \ --commit=998eda3067c7d21e0d9bb3310d2f5a14b8f1c681 \ --cores="$JOBS" \ --keep-failed \ --fallback \ ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \ ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \ -- "$@" } ################ # Set common variables ################ VERSION="${FORCE_VERSION:-$(git_head_version)}" DISTNAME="${DISTNAME:-munt-${VERSION}}" version_base_prefix="${PWD}/guix-build-" VERSION_BASE="${version_base_prefix}${VERSION}" # TOP DISTSRC_BASE="${DISTSRC_BASE:-${VERSION_BASE}}" OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}" var_base_basename="var" VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}" profiles_base_basename="profiles" PROFILES_BASE="${PROFILES_BASE:-${VAR_BASE}/${profiles_base_basename}}" ================================================ FILE: contrib/guix/manifest.scm ================================================ (use-modules (gnu) (gnu packages) (gnu packages autotools) (gnu packages base) (gnu packages bash) (gnu packages bison) (gnu packages certs) (gnu packages cdrom) (gnu packages check) (gnu packages cmake) (gnu packages commencement) (gnu packages compression) (gnu packages cross-base) (gnu packages curl) (gnu packages file) (gnu packages gawk) (gnu packages gcc) (gnu packages gnome) (gnu packages installers) (gnu packages linux) (gnu packages llvm) (gnu packages mingw) (gnu packages moreutils) (gnu packages perl) (gnu packages pkg-config) (gnu packages python) (gnu packages python-crypto) (gnu packages python-web) (gnu packages shells) (gnu packages tls) (gnu packages version-control) (guix build-system gnu) (guix build-system python) (guix build-system trivial) (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) (guix packages) (guix profiles) (guix utils)) (define-syntax-rule (search-our-patches file-name ...) "Return the list of absolute file names corresponding to each FILE-NAME found in ./patches relative to the current file." (parameterize ((%patch-path (list (string-append (dirname (current-filename)) "/patches")))) (list (search-patch file-name) ...))) (define (make-ssp-fixed-gcc xgcc) "Given a XGCC package, return a modified package that uses the SSP function from glibc instead of from libssp.so. Our `symbol-check' script will complain if we link against libssp.so, and thus will ensure that this works properly. Taken from: http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" (package (inherit xgcc) (arguments (substitute-keyword-arguments (package-arguments xgcc) ((#:make-flags flags) `(cons "gcc_cv_libc_provides_ssp=yes" ,flags)))))) (define (make-gcc-rpath-link xgcc) "Given a XGCC package, return a modified package that replace each instance of -rpath in the default system spec that's inserted by Guix with -rpath-link" (package (inherit xgcc) (arguments (substitute-keyword-arguments (package-arguments xgcc) ((#:phases phases) `(modify-phases ,phases (add-after 'pre-configure 'replace-rpath-with-rpath-link (lambda _ (substitute* (cons "gcc/config/rs6000/sysv4.h" (find-files "gcc/config" "^gnu-user.*\\.h$")) (("-rpath=") "-rpath-link=")) #t)))))))) (define building-on (string-append (list-ref (string-split (%current-system) #\-) 0) "-guix-linux-gnu")) (define (explicit-cross-configure package) (package-with-extra-configure-variable package "--build" building-on)) (define (make-cross-toolchain target base-gcc-for-libc base-kernel-headers base-libc base-gcc) "Create a cross-compilation toolchain package for TARGET" (let* ((xbinutils (cross-binutils target)) ;; 1. Build a cross-compiling gcc without targeting any libc, derived ;; from BASE-GCC-FOR-LIBC (xgcc-sans-libc (explicit-cross-configure (cross-gcc target #:xgcc base-gcc-for-libc #:xbinutils xbinutils))) ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived ;; from BASE-KERNEL-HEADERS (xkernel (cross-kernel-headers target base-kernel-headers xgcc-sans-libc xbinutils)) ;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL, ;; derived from BASE-LIBC (xlibc (explicit-cross-configure (cross-libc target base-libc xgcc-sans-libc xbinutils xkernel))) ;; 4. Build a cross-compiling gcc targeting XLIBC, derived from ;; BASE-GCC (xgcc (explicit-cross-configure (cross-gcc target #:xgcc base-gcc #:xbinutils xbinutils #:libc xlibc)))) ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and ;; XGCC (package (name (string-append target "-toolchain")) (version (package-version xgcc)) (source #f) (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs `(("binutils" ,xbinutils) ("libc" ,xlibc) ("libc:static" ,xlibc "static") ("gcc" ,xgcc) ("gcc-lib" ,xgcc "lib"))) (synopsis (string-append "Complete GCC tool chain for " target)) (description (string-append "This package provides a complete GCC tool chain for " target " development.")) (home-page (package-home-page xgcc)) (license (package-license xgcc))))) (define base-gcc gcc-10) (define base-linux-kernel-headers linux-libre-headers-5.15) ;; https://gcc.gnu.org/install/configure.html (define (hardened-gcc gcc) (package-with-extra-configure-variable ( package-with-extra-configure-variable gcc "--enable-default-ssp" "yes") "--enable-default-pie" "yes")) (define* (make-munt-cross-toolchain target #:key (base-gcc-for-libc base-gcc) (base-kernel-headers base-linux-kernel-headers) (base-libc (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.24))) (base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc)))) "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values desirable for building Bitcoin Core release binaries." (make-cross-toolchain target base-gcc-for-libc base-kernel-headers base-libc base-gcc)) (define (make-gcc-with-pthreads gcc) (package-with-extra-configure-variable (package-with-extra-patches gcc (search-our-patches "gcc-10-remap-guix-store.patch")) "--enable-threads" "posix")) (define (make-mingw-w64-cross-gcc cross-gcc) (package-with-extra-patches cross-gcc (search-our-patches "vmov-alignment.patch" "gcc-broken-longjmp.patch"))) (define (make-mingw-pthreads-cross-toolchain target) "Create a cross-compilation toolchain package for TARGET" (let* ((xbinutils (cross-binutils target)) (pthreads-xlibc mingw-w64-x86_64-winpthreads) (pthreads-xgcc (make-gcc-with-pthreads (cross-gcc target #:xgcc (make-ssp-fixed-gcc (make-mingw-w64-cross-gcc base-gcc)) #:xbinutils xbinutils #:libc pthreads-xlibc)))) ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and ;; XGCC (package (name (string-append target "-posix-toolchain")) (version (package-version pthreads-xgcc)) (source #f) (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs `(("binutils" ,xbinutils) ("libc" ,pthreads-xlibc) ("gcc" ,pthreads-xgcc) ("gcc-lib" ,pthreads-xgcc "lib"))) (synopsis (string-append "Complete GCC tool chain for " target)) (description (string-append "This package provides a complete GCC tool chain for " target " development.")) (home-page (package-home-page pthreads-xgcc)) (license (package-license pthreads-xgcc))))) (define (make-nsis-for-gcc-10 base-nsis) (package-with-extra-patches base-nsis (search-our-patches "nsis-gcc-10-memmove.patch" "nsis-disable-installer-reloc.patch"))) (define (fix-ppc64-nx-default lief) (package-with-extra-patches lief (search-our-patches "lief-fix-ppc64-nx-default.patch"))) (define-public lief (package (name "python-lief") (version "0.12.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lief-project/LIEF.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'parallel-jobs ;; build with multiple cores (lambda _ (substitute* "setup.py" (("self.parallel if self.parallel else 1") (number->string (parallel-job-count))))))))) (native-inputs `(("cmake" ,cmake))) (home-page "https://github.com/lief-project/LIEF") (synopsis "Library to Instrument Executable Formats") (description "Python library to to provide a cross platform library which can parse, modify and abstract ELF, PE and MachO formats.") (license license:asl2.0))) (define osslsigncode (package (name "osslsigncode") (version "2.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/mtrojnar/" name "/archive/" version ".tar.gz")) (sha256 (base32 "0byri6xny770wwb2nciq44j5071122l14bvv65axdd70nfjf0q2s")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool))) (inputs `(("openssl" ,openssl))) (arguments `(#:configure-flags `("--without-gsf" "--without-curl" "--disable-dependency-tracking"))) (home-page "https://github.com/mtrojnar/osslsigncode") (synopsis "Authenticode signing and timestamping tool") (description "osslsigncode is a small tool that implements part of the functionality of the Microsoft tool signtool.exe - more exactly the Authenticode signing and timestamping. But osslsigncode is based on OpenSSL and cURL, and thus should be able to compile on most platforms where these exist.") (license license:gpl3+))) ; license is with openssl exception (define-public python-elfesteem (let ((commit "2eb1e5384ff7a220fd1afacd4a0170acff54fe56")) (package (name "python-elfesteem") (version (git-version "0.1" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/LRGH/elfesteem") (commit commit))) (file-name (git-file-name name commit)) (sha256 (base32 "07x6p8clh11z8s1n2kdxrqwqm2almgc5qpkcr9ckb6y5ivjdr5r6")))) (build-system python-build-system) ;; There are no tests, but attempting to run python setup.py test leads to ;; PYTHONPATH problems, just disable the test (arguments '(#:tests? #f)) (home-page "https://github.com/LRGH/elfesteem") (synopsis "ELF/PE/Mach-O parsing library") (description "elfesteem parses ELF, PE and Mach-O files.") (license license:lgpl2.1)))) (define-public python-oscrypto (package (name "python-oscrypto") (version "1.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wbond/oscrypto") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1d4d8s4z340qhvb3g5m5v3436y3a71yc26wk4749q64m09kxqc3l")) (patches (search-our-patches "oscrypto-hard-code-openssl.patch")))) (build-system python-build-system) (native-search-paths (list (search-path-specification (variable "SSL_CERT_FILE") (file-type 'regular) (separator #f) ;single entry (files '("etc/ssl/certs/ca-certificates.crt"))))) (propagated-inputs `(("python-asn1crypto" ,python-asn1crypto) ("openssl" ,openssl))) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'hard-code-path-to-libscrypt (lambda* (#:key inputs #:allow-other-keys) (let ((openssl (assoc-ref inputs "openssl"))) (substitute* "oscrypto/__init__.py" (("@GUIX_OSCRYPTO_USE_OPENSSL@") (string-append openssl "/lib/libcrypto.so" "," openssl "/lib/libssl.so"))) #t))) (add-after 'unpack 'disable-broken-tests (lambda _ ;; This test is broken as there is no keyboard interrupt. (substitute* "tests/test_trust_list.py" (("^(.*)class TrustListTests" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_tls.py" (("^(.*)class TLSTests" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) #t)) (replace 'check (lambda _ (invoke "python" "run.py" "tests") #t))))) (home-page "https://github.com/wbond/oscrypto") (synopsis "Compiler-free Python crypto library backed by the OS") (description "oscrypto is a compilation-free, always up-to-date encryption library for Python.") (license license:expat))) (define-public python-oscryptotests (package (inherit python-oscrypto) (name "python-oscryptotests") (propagated-inputs `(("python-oscrypto" ,python-oscrypto))) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'hard-code-path-to-libscrypt (lambda* (#:key inputs #:allow-other-keys) (chdir "tests") #t))))))) (define-public python-certvalidator (let ((commit "a145bf25eb75a9f014b3e7678826132efbba6213")) (package (name "python-certvalidator") (version (git-version "0.1" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/achow101/certvalidator") (commit commit))) (file-name (git-file-name name commit)) (sha256 (base32 "1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k")))) (build-system python-build-system) (propagated-inputs `(("python-asn1crypto" ,python-asn1crypto) ("python-oscrypto" ,python-oscrypto) ("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'disable-broken-tests (lambda _ (substitute* "tests/test_certificate_validator.py" (("^(.*)class CertificateValidatorTests" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_crl_client.py" (("^(.*)def test_fetch_crl" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_ocsp_client.py" (("^(.*)def test_fetch_ocsp" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_registry.py" (("^(.*)def test_build_paths" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_validate.py" (("^(.*)def test_revocation_mode_hard" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "tests/test_validate.py" (("^(.*)def test_revocation_mode_soft" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) #t)) (replace 'check (lambda _ (invoke "python" "run.py" "tests") #t))))) (home-page "https://github.com/wbond/certvalidator") (synopsis "Python library for validating X.509 certificates and paths") (description "certvalidator is a Python library for validating X.509 certificates or paths. Supports various options, including: validation at a specific moment in time, whitelisting and revocation checks.") (license license:expat)))) (define-public python-altgraph (package (name "python-altgraph") (version "0.17") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ronaldoussoren/altgraph") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb")))) (build-system python-build-system) (home-page "https://github.com/ronaldoussoren/altgraph") (synopsis "Python graph (network) package") (description "altgraph is a fork of graphlib: a graph (network) package for constructing graphs, BFS and DFS traversals, topological sort, shortest paths, etc. with graphviz output.") (license license:expat))) (define-public python-macholib (package (name "python-macholib") (version "1.14") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ronaldoussoren/macholib") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42")))) (build-system python-build-system) (propagated-inputs `(("python-altgraph" ,python-altgraph))) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'disable-broken-tests (lambda _ ;; This test is broken as there is no keyboard interrupt. (substitute* "macholib_tests/test_command_line.py" (("^(.*)class TestCmdLine" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line))) (substitute* "macholib_tests/test_dyld.py" (("^(.*)def test_\\S+_find" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line)) (("^(.*)def testBasic" line indent) (string-append indent "@unittest.skip(\"Disabled by Guix\")\n" line)) ) #t))))) (home-page "https://github.com/ronaldoussoren/macholib") (synopsis "Python library for analyzing and editing Mach-O headers") (description "macholib is a Macho-O header analyzer and editor. It's typically used as a dependency analysis tool, and also to rewrite dylib references in Mach-O headers to be @executable_path relative. Though this tool targets a platform specific file format, it is pure python code that is platform and endian independent.") (license license:expat))) (define-public python-signapple (let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6")) (package (name "python-signapple") (version (git-version "0.1" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/achow101/signapple") (commit commit))) (file-name (git-file-name name commit)) (sha256 (base32 "0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg")))) (build-system python-build-system) (propagated-inputs `(("python-asn1crypto" ,python-asn1crypto) ("python-oscrypto" ,python-oscrypto) ("python-certvalidator" ,python-certvalidator) ("python-elfesteem" ,python-elfesteem) ("python-requests" ,python-requests) ("python-macholib" ,python-macholib))) ;; There are no tests, but attempting to run python setup.py test leads to ;; problems, just disable the test (arguments '(#:tests? #f)) (home-page "https://github.com/achow101/signapple") (synopsis "Mach-O binary signature tool") (description "signapple is a Python tool for creating, verifying, and inspecting signatures in Mach-O binaries.") (license license:expat)))) (define (make-glibc-without-werror glibc) (package-with-extra-configure-variable glibc "enable_werror" "no")) (define (make-glibc-with-stack-protector glibc) (package-with-extra-configure-variable glibc "--enable-stack-protector" "all")) (define (make-glibc-with-bind-now glibc) (package-with-extra-configure-variable glibc "--enable-bind-now" "yes")) (define-public glibc-2.24 (package (inherit glibc-2.31) (version "2.24") (source (origin (method git-fetch) (uri (git-reference (url "https://sourceware.org/git/glibc.git") (commit "0d7f1ed30969886c8dde62fbf7d2c79967d4bace"))) (file-name (git-file-name "glibc" "0d7f1ed30969886c8dde62fbf7d2c79967d4bace")) (sha256 (base32 "0g5hryia5v1k0qx97qffgwzrz4lr4jw3s5kj04yllhswsxyjbic3")) (patches (search-our-patches "glibc-ldd-x86_64.patch" "glibc-versioned-locpath.patch" "glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch" "glibc-2.24-no-build-time-cxx-header-run.patch" "glibc-2.24-fcommon.patch" "glibc-2.24-guix-prefix.patch")))))) (define-public glibc-2.27/munt-patched (package (inherit glibc-2.31) (version "2.27") (source (origin (method git-fetch) (uri (git-reference (url "https://sourceware.org/git/glibc.git") (commit "23158b08a0908f381459f273a984c6fd328363cb"))) (file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb")) (sha256 (base32 "1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca")) (patches (search-our-patches "glibc-ldd-x86_64.patch" "glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch" "glibc-2.27-dont-redefine-nss-database.patch" "glibc-2.27-guix-prefix.patch")))))) (packages->manifest (append (list ;; The Basics bash which coreutils util-linux ;; File(system) inspection file grep diffutils findutils ;; File transformation patch gawk sed moreutils ;; Compression and archiving tar bzip2 gzip xz pigz ;; Build tools gnu-make libtool-2.4.7 autoconf-2.71 automake pkg-config bison ;; Native GCC 10 toolchain gcc-toolchain-10 (list gcc-toolchain-10 "static") ;; Scripting perl python-3 ;; Git git-minimal ;; Tests (fix-ppc64-nx-default lief)) (let ((target (getenv "HOST"))) (cond ((string-suffix? "-mingw32" target) ;; Windows (list zip (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32") (make-nsis-for-gcc-10 nsis-x86_64) osslsigncode)) ((string-contains target "-linux-") (list (cond ((string-contains target "riscv64-") (make-munt-cross-toolchain target #:base-libc (make-glibc-with-stack-protector (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27/munt-patched))))) (else (make-munt-cross-toolchain target))))) ((string-contains target "darwin") (list clang-toolchain-10 binutils cmake xorriso python-signapple)) (else '()))))) ================================================ FILE: contrib/init/README.md ================================================ Sample configuration files for: ``` SystemD: daemon.service Upstart: daemon.conf OpenRC: daemon.openrc daemon.openrcconf CentOS: daemon.init ``` have been made available to assist packagers in creating node packages here. See doc/init.md for more information. ================================================ FILE: contrib/init/daemon.conf ================================================ description "Munt Core Daemon" start on runlevel [2345] stop on starting rc RUNLEVEL=[016] env DAEMON_BIN="/usr/bin/Munt-daemon" env DAEMON_USER="munt" env DAEMON_GROUP="munt" env DAEMON_PIDDIR="/var/run/munt_daemon" # upstart can't handle variables constructed with other variables env DAEMON_PIDFILE="/var/run/munt_daemon/munt_daemon.pid" env DAEMON_CONFIGFILE="/etc/munt/munt.conf" env DAEMON_DATADIR="/var/lib/munt_daemon" expect fork respawn respawn limit 5 120 kill timeout 60 pre-start script # this will catch non-existent config files # daemon 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=' "$DAEMON_CONFIGFILE" ; then echo "ERROR: You must set a secure rpcpassword." echo "The setting must appear in $DAEMON_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 \"Munt Alert\"" \ "admin@foo.com" echo exit 1 fi mkdir -p "$DAEMON_PIDDIR" chmod 0755 "$DAEMON_PIDDIR" chown $DAEMON_USER:$DAEMON_GROUP "$DAEMON_PIDDIR" chown $DAEMON_USER:$DAEMON_GROUP "$DAEMON_CONFIGFILE" chmod 0660 "$DAEMON_CONFIGFILE" end script exec start-stop-daemon \ --start \ --pidfile "$DAEMON_PIDFILE" \ --chuid $DAEMON_USER:$DAEMON_GROUP \ --exec "$DAEMON_BIN" \ -- \ -pid="$DAEMON_PIDFILE" \ -conf="$DAEMON_CONFIGFILE" \ -datadir="$DAEMON_DATADIR" \ -disablewallet \ -daemon ================================================ FILE: contrib/init/daemon.init ================================================ #!/bin/bash # # Munt-daemon The Munt core server. # # # chkconfig: 345 80 20 # description: Munt-daemon # processname: Munt-daemon # # Source function library. . /etc/init.d/functions # you can override defaults in /etc/sysconfig/munt_daemon, see below if [ -f /etc/sysconfig/munt_daemon ]; then . /etc/sysconfig/munt_daemon fi RETVAL=0 prog=Munt-daemon # you can override the lockfile via DAEMON_LOCKFILE in /etc/sysconfig/munt_daemon lockfile=${DAEMON_LOCKFILE-/var/lock/subsys/munt_daemon} # daemon bin defaults to /usr/bin/Munt-daemon, override with DAEMON_BIN daemon_bin=${DAEMON_BIN-/usr/bin/Munt-daemon} # daemon opts default to -disablewallet, override with DAEMON_OPTS daemon_opts=${DAEMON_OPTS--disablewallet} start() { echo -n $"Starting $prog: " daemon $DAEMONOPTS $daemon_bin $daemon_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 ================================================ FILE: contrib/init/daemon.openrc ================================================ #!/sbin/runscript # backward compatibility for existing gentoo layout # if [ -d "/var/lib/munt/.munt" ]; then DAEMON_DEFAULT_DATADIR="/var/lib/munt/.munt" else DAEMON_DEFAULT_DATADIR="/var/lib/munt_daemon" fi DAEMON_CONFIGFILE=${DAEMON_CONFIGFILE:-/etc/munt/munt.conf} DAEMON_PIDDIR=${DAEMON_PIDDIR:-/var/run/munt_daemon} DAEMON_PIDFILE=${DAEMON_PIDFILE:-${DAEMON_PIDDIR}/munt_daemon.pid} DAEMON_DATADIR=${DAEMON_DATADIR:-${DAEMON_DEFAULT_DATADIR}} DAEMON_USER=${DAEMON_USER:-${DAEMON_USER:-munt}} DAEMON_GROUP=${DAEMON_GROUP:-munt} DAEMON_BIN=${DAEMON_BIN:-/usr/bin/Munt-daemon} DAEMON_NICE=${DAEMON_NICE:-${NICELEVEL:-0}} DAEMON_OPTS="${DAEMON_OPTS:-${DAEMON_OPTS}}" name="Munt Core Daemon" description="Munt cryptocurrency P2P network daemon" command="/usr/bin/Munt-daemon" command_args="-pid=\"${DAEMON_PIDFILE}\" \ -conf=\"${DAEMON_CONFIGFILE}\" \ -datadir=\"${DAEMON_DATADIR}\" \ -daemon \ ${DAEMON_OPTS}" required_files="${DAEMON_CONFIGFILE}" start_stop_daemon_args="-u ${DAEMON_USER} \ -N ${DAEMON_NICE} -w 2000" pidfile="${DAEMON_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="${DAEMON_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 "${DAEMON_USER}:${DAEMON_GROUP}" \ "${DAEMON_DATADIR}" checkpath \ -d \ --mode 0755 \ --owner "${DAEMON_USER}:${DAEMON_GROUP}" \ "${DAEMON_PIDDIR}" checkpath -f \ -o ${DAEMON_USER}:${DAEMON_GROUP} \ -m 0660 \ ${DAEMON_CONFIGFILE} checkconfig || return 1 } checkconfig() { if ! grep -qs '^rpcpassword=' "${DAEMON_CONFIGFILE}" ; then eerror "" eerror "ERROR: You must set a secure rpcpassword." eerror "The setting must appear in ${DAEMON_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 \"Munt Alert\"" \ "admin@foo.com" eerror "" return 1 fi } ================================================ FILE: contrib/init/daemon.openrcconf ================================================ # /etc/conf.d/munt_daemon: config file for /etc/init.d/munt_daemon # Config file location #DAEMON_CONFIGFILE="/etc/munt/munt.conf" # What directory to write pidfile to? (created and owned by $DAEMON_USER) #DAEMON_PIDDIR="/var/run/munt_daemon" # What filename to give the pidfile #DAEMON_PIDFILE="${DAEMON_PIDDIR}/munt_daemon.pid" # Where to write data (be mindful that the blockchain is large) #DAEMON_DATADIR="/var/lib/munt_daemon" # User and group to own process #DAEMON_USER="munt" #DAEMON_GROUP="munt" # Path to executable #DAEMON_BIN="/usr/bin/Munt-daemon" # Nice value to run under #DAEMON_NICE=0 # Additional options (avoid -conf and -datadir, use flags above) #DAEMON_OPTS="" # The timeout in seconds OpenRC will wait for daemon 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. DAEMON_SIGTERM_TIMEOUT=60 ================================================ FILE: contrib/init/daemon.service ================================================ [Unit] Description=Munt distributed currency daemon After=network.target [Service] User=munt Group=munt Type=forking PIDFile=/var/lib/munt_daemon/munt_daemon.pid ExecStart=/usr/bin/Munt-daemon -daemon -pid=/var/lib/munt_daemon/munt_daemon.pid \ -conf=/etc/munt/munt.conf -datadir=/var/lib/munt_daemon -disablewallet Restart=always PrivateTmp=true TimeoutStopSec=60s TimeoutStartSec=2s StartLimitInterval=120s StartLimitBurst=5 [Install] WantedBy=multi-user.target ================================================ FILE: contrib/macdeploy/LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. 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. Copyright (C) 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 . 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: Copyright (C) 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 . 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 . ================================================ FILE: contrib/macdeploy/README.md ================================================ ### MacDeploy ### 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 This script should not be run manually, instead, after building as usual: make deploy During the process, the disk image window will pop up briefly where the fancy settings are applied. This is normal, please do not interfere. When finished, it will produce `Munt-Core.dmg`. ================================================ FILE: contrib/macdeploy/custom_dsstore.py ================================================ #!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{300, 280}, {500, 343}}', 'ContainerShowSidebar': False, 'SidebarWidth': 0, 'ShowTabView': False, 'PreviewPaneVisibility': False, 'ShowToolbar': False, 'ShowSidebar': False, 'ShowPathbar': True } icvp = { 'gridOffsetX': 0.0, 'textSize': 12.0, 'viewOptionsVersion': 1, 'backgroundImageAlias': b'\x00\x00\x00\x00\x02\x1e\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x94\\\xb0H+\x00\x05\x00\x00\x00\x98\x0fbackground.tiff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\xd19\xb0\xf8\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\r\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b.background\x00\x00\x10\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x11\x00\x08\x00\x00\xd19\xb0\xf8\x00\x00\x00\x01\x00\x04\x00\x00\x00\x98\x00\x0e\x00 \x00\x0f\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00.\x00t\x00i\x00f\x00f\x00\x0f\x00\x02\x00\x00\x00\x12\x00\x1c/.background/background.tiff\x00\x14\x01\x06\x00\x00\x00\x00\x01\x06\x00\x02\x00\x00\x0cMacintosh HD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x97\xab\xc3H+\x00\x00\x01\x88[\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02u\xab\x8d\xd1\x94\\\xb0devrddsk\xff\xff\xff\xff\x00\x00\t \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07munt\x00\x00\x10\x00\x08\x00\x00\xce\x97\xab\xc3\x00\x00\x00\x11\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x01\x00\x14\x01\x88[\x88\x00\x16\xa9\t\x00\x08\xfaR\x00\x08\xfaQ\x00\x02d\x8e\x00\x0e\x00\x02\x00\x00\x00\x0f\x00\x1a\x00\x0c\x00M\x00a\x00c\x00i\x00n\x00t\x00o\x00s\x00h\x00 \x00H\x00D\x00\x13\x00\x01/\x00\x00\x15\x00\x02\x00\x14\xff\xff\x00\x00\xff\xff\x00\x00', 'backgroundColorBlue': 1.0, 'iconSize': 96.0, 'backgroundColorGreen': 1.0, 'arrangeBy': 'none', 'showIconPreview': True, 'gridSpacing': 100.0, 'gridOffsetY': 0.0, 'showItemInfo': False, 'labelOnBottom': True, 'backgroundType': 2, 'backgroundColorRed': 1.0 } alias = Alias.from_bytes(icvp['backgroundImageAlias']) alias.volume.name = package_name_ns alias.volume.posix_path = '/Volumes/' + package_name_ns alias.volume.disk_image_alias.target.filename = package_name_ns + '.temp.dmg' alias.volume.disk_image_alias.target.carbon_path = 'Macintosh HD:Users:\x00muntuser:\x00Documents:\x00munt:\x00munt:\x00' + package_name_ns + '.temp.dmg' alias.volume.disk_image_alias.target.posix_path = 'Users/muntuser/Documents/munt/munt/' + package_name_ns + '.temp.dmg' alias.target.carbon_path = package_name_ns + ':.background:\x00background.tiff' icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes()) ds['.']['icvp'] = icvp ds['.']['vSrn'] = ('long', 1) ds['Applications']['Iloc'] = (370, 156) ds['Munt.app']['Iloc'] = (128, 156) ds.flush() ds.close() ================================================ FILE: contrib/macdeploy/detached-sig-apply.sh ================================================ #!/bin/sh # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. set -e UNSIGNED="$1" SIGNATURE="$2" ARCH=x86_64 ROOTDIR=dist TEMPDIR=signed.temp OUTDIR=signed-app if [ -z "$UNSIGNED" ]; then echo "usage: $0 " exit 1 fi if [ -z "$SIGNATURE" ]; then echo "usage: $0 " 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}" ================================================ FILE: contrib/macdeploy/detached-sig-create.sh ================================================ #!/bin/sh # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. set -e ROOTDIR=dist BUNDLE="${ROOTDIR}/Munt.app" CODESIGN=codesign TEMPDIR=sign.temp TEMPLIST=${TEMPDIR}/signatures.txt OUT=signature-osx.tar.gz OUTROOT=osx if [ ! -n "$1" ]; then echo "usage: $0 " 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}" ================================================ FILE: contrib/macdeploy/extract-osx-sdk.sh ================================================ #!/bin/bash # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. set -e INPUTFILE="Xcode_7.3.1.dmg" HFSFILENAME="5.hfs" SDKDIR="Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" 7z x "${INPUTFILE}" "${HFSFILENAME}" SDKNAME="$(basename "${SDKDIR}")" SDKDIRINODE=$(ifind -n "${SDKDIR}" "${HFSFILENAME}") fls "${HFSFILENAME}" -rpF ${SDKDIRINODE} | while read type inode filename; do inode="${inode::-1}" if [ "${filename:0:14}" = "usr/share/man/" ]; then continue fi filename="${SDKNAME}/$filename" echo "Extracting $filename ..." mkdir -p "$(dirname "$filename")" if [ "$type" = "l/l" ]; then ln -s "$(icat "${HFSFILENAME}" $inode)" "$filename" else icat "${HFSFILENAME}" $inode >"$filename" fi done echo "Building ${SDKNAME}.tar.gz ..." MTIME="$(istat "${HFSFILENAME}" "${SDKDIRINODE}" | perl -nle 'm/Content Modified:\s+(.*?)\s\(/ && print $1')" find "${SDKNAME}" | sort | tar --no-recursion --mtime="${MTIME}" --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > "${SDKNAME}.tar.gz" echo 'All done!' ================================================ FILE: contrib/macdeploy/fancy.plist ================================================ window_bounds 300 300 800 620 background_picture background.tiff icon_size 96 applications_symlink items_position Applications 370 156 Munt.app 128 156 ================================================ FILE: contrib/qos/README.md ================================================ ### QoS (Quality of service) ### This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Munt network. It limits outbound TCP traffic with a source or destination port of 9231, but not if the destination IP is within a LAN. This means one can have an always-on Munt-daemon instance running, and another local Munt-daemon/Munt instance which connects to this node and receives blocks from it. ================================================ FILE: contrib/qos/tc.sh ================================================ # Copyright (c) 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. #network interface on which to limit traffic IF="eth0" #limit of the network interface in question LINKCEIL="1gbit" #limit outbound Munt protocol traffic to this rate LIMIT="160kbit" #defines the IPv4 address space for which you wish to disable rate limiting LOCALNET_V4="192.168.0.0/16" #defines the IPv6 address space for which you wish to disable rate limiting LOCALNET_V6="fe80::/10" #delete existing rules tc qdisc del dev ${IF} root #add root class tc qdisc add dev ${IF} root handle 1: htb default 10 #add parent class tc class add dev ${IF} parent 1: classid 1:1 htb rate ${LINKCEIL} ceil ${LINKCEIL} #add our two classes. one unlimited, another limited tc class add dev ${IF} parent 1:1 classid 1:10 htb rate ${LINKCEIL} ceil ${LINKCEIL} prio 0 tc class add dev ${IF} parent 1:1 classid 1:11 htb rate ${LIMIT} ceil ${LIMIT} prio 1 #add handles to our classes so packets marked with go into the class with "... handle fw ..." tc filter add dev ${IF} parent 1: protocol ip prio 1 handle 1 fw classid 1:10 tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11 if [ ! -z "${LOCALNET_V6}" ] ; then # v6 cannot have the same priority value as v4 tc filter add dev ${IF} parent 1: protocol ipv6 prio 3 handle 1 fw classid 1:10 tc filter add dev ${IF} parent 1: protocol ipv6 prio 4 handle 2 fw classid 1:11 fi #delete any existing rules #disable for now #ret=0 #while [ $ret -eq 0 ]; do # iptables -t mangle -D OUTPUT 1 # ret=$? #done #limit outgoing traffic to and from port 9231. but not when dealing with a host on the local network # (defined by $LOCALNET_V4 and $LOCALNET_V6) # --set-mark marks packages matching these criteria with the number "2" (v4) # --set-mark marks packages matching these criteria with the number "4" (v6) # these packets are filtered by the tc filter with "handle 2" # this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT} iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 9231 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2 iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 9231 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2 if [ ! -z "${LOCALNET_V6}" ] ; then ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 9231 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4 ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 9231 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4 fi ================================================ FILE: contrib/shell/git-utils.bash ================================================ #!/usr/bin/env bash git_root() { git rev-parse --show-toplevel 2> /dev/null } git_head_version() { local recent_tag if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then echo "${recent_tag#v}" else git rev-parse --short=12 HEAD fi } ================================================ FILE: contrib/shell/realpath.bash ================================================ #!/usr/bin/env bash # Based on realpath.sh written by Michael Kropat # Found at: https://github.com/mkropat/sh-realpath/blob/65512368b8155b176b67122aa395ac580d9acc5b/realpath.sh bash_realpath() { canonicalize_path "$(resolve_symlinks "$1")" } resolve_symlinks() { _resolve_symlinks "$1" } _resolve_symlinks() { _assert_no_path_cycles "$@" || return local dir_context path if path=$(readlink -- "$1"); then dir_context=$(dirname -- "$1") _resolve_symlinks "$(_prepend_dir_context_if_necessary "$dir_context" "$path")" "$@" else printf '%s\n' "$1" fi } _prepend_dir_context_if_necessary() { if [ "$1" = . ]; then printf '%s\n' "$2" else _prepend_path_if_relative "$1" "$2" fi } _prepend_path_if_relative() { case "$2" in /* ) printf '%s\n' "$2" ;; * ) printf '%s\n' "$1/$2" ;; esac } _assert_no_path_cycles() { local target path target=$1 shift for path in "$@"; do if [ "$path" = "$target" ]; then return 1 fi done } canonicalize_path() { if [ -d "$1" ]; then _canonicalize_dir_path "$1" else _canonicalize_file_path "$1" fi } _canonicalize_dir_path() { (cd "$1" 2>/dev/null && pwd -P) } _canonicalize_file_path() { local dir file dir=$(dirname -- "$1") file=$(basename -- "$1") (cd "$dir" 2>/dev/null && printf '%s/%s\n' "$(pwd -P)" "$file") } ================================================ FILE: contrib/testgen/README.md ================================================ ### TestGen ### Utilities to generate test vectors for the data-driven Munt tests. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ================================================ FILE: contrib/testgen/base58.py ================================================ # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Munt base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return bytes( (n,) ) __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __b58base = len(__b58chars) b58chars = __b58chars def b58encode(v): """ encode v, which is a string of bytes, to base58. """ long_value = 0 for (i, c) in enumerate(v[::-1]): long_value += (256**i) * ord(c) result = '' while long_value >= __b58base: div, mod = divmod(long_value, __b58base) result = __b58chars[mod] + result long_value = div result = __b58chars[long_value] + result # Munt does a little leading-zero-compression: # leading 0-bytes in the input become leading-1s nPad = 0 for c in v: if c == '\0': nPad += 1 else: break return (__b58chars[0]*nPad) + result def b58decode(v, length = None): """ decode v into a string of len bytes """ long_value = 0 for (i, c) in enumerate(v[::-1]): long_value += __b58chars.find(c) * (__b58base**i) result = bytes() while long_value >= 256: div, mod = divmod(long_value, 256) result = chr(mod) + result long_value = div result = chr(long_value) + result nPad = 0 for c in v: if c == __b58chars[0]: nPad += 1 else: break result = chr(0)*nPad + result if length is not None and len(result) != length: return None return result def checksum(v): """Return 32-bit checksum based on SHA256""" return SHA256.new(SHA256.new(v).digest()).digest()[0:4] def b58encode_chk(v): """b58encode a string, with 32-bit checksum""" return b58encode(v + checksum(v)) def b58decode_chk(v): """decode a base58 string, check and remove checksum""" result = b58decode(v) if result is None: return None if result[-4:] == checksum(result[:-4]): return result[:-4] else: return None def get_bcaddress_version(strAddress): """ Returns None if strAddress is invalid. Otherwise returns integer version of address. """ addr = b58decode_chk(strAddress) if addr is None or len(addr)!=21: return None version = addr[0] return ord(version) if __name__ == '__main__': # Test case (from http://gitorious.org/bitcoin/python-base58.git) assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') is 0 _ohai = 'o hai'.encode('ascii') _tmp = b58encode(_ohai) assert _tmp == 'DYB3oMS' assert b58decode(_tmp, 5) == _ohai print("Tests passed") ================================================ FILE: contrib/testgen/gen_base58_test_vectors.py ================================================ #!/usr/bin/env python # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # Released under MIT License import os from itertools import islice from base58 import b58encode_chk, b58decode_chk, b58chars import random from binascii import b2a_hex # key types PUBKEY_ADDRESS = 38 SCRIPT_ADDRESS = 98 PUBKEY_ADDRESS_TEST = 65 SCRIPT_ADDRESS_TEST = 127 PRIVKEY = 38+128 PRIVKEY_TEST = 65+128 metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed'] # templates for valid sequences templates = [ # prefix, payload_size, suffix, metadata # None = N/A ((PUBKEY_ADDRESS,), 20, (), (False, False, 'pubkey', None)), ((SCRIPT_ADDRESS,), 20, (), (False, False, 'script', None)), ((PUBKEY_ADDRESS_TEST,), 20, (), (False, True, 'pubkey', None)), ((SCRIPT_ADDRESS_TEST,), 20, (), (False, True, 'script', None)), ((PRIVKEY,), 32, (), (True, False, None, False)), ((PRIVKEY,), 32, (1,), (True, False, None, True)), ((PRIVKEY_TEST,), 32, (), (True, True, None, False)), ((PRIVKEY_TEST,), 32, (1,), (True, True, None, True)) ] def is_valid(v): '''Check vector v for validity''' result = b58decode_chk(v) if result is None: return False for template in templates: prefix = str(bytearray(template[0])) suffix = str(bytearray(template[2])) if result.startswith(prefix) and result.endswith(suffix): if (len(result) - len(prefix) - len(suffix)) == template[1]: return True return False def gen_valid_vectors(): '''Generate valid test vectors''' while True: for template in templates: prefix = str(bytearray(template[0])) payload = os.urandom(template[1]) suffix = str(bytearray(template[2])) rv = b58encode_chk(prefix + payload + suffix) assert is_valid(rv) metadata = dict([(x,y) for (x,y) in zip(metadata_keys,template[3]) if y is not None]) yield (rv, b2a_hex(payload), metadata) def gen_invalid_vector(template, corrupt_prefix, randomize_payload_size, corrupt_suffix): '''Generate possibly invalid vector''' if corrupt_prefix: prefix = os.urandom(1) else: prefix = str(bytearray(template[0])) if randomize_payload_size: payload = os.urandom(max(int(random.expovariate(0.5)), 50)) else: payload = os.urandom(template[1]) if corrupt_suffix: suffix = os.urandom(len(template[2])) else: suffix = str(bytearray(template[2])) return b58encode_chk(prefix + payload + suffix) def randbool(p = 0.5): '''Return True with P(p)''' return random.random() < p def gen_invalid_vectors(): '''Generate invalid test vectors''' # start with some manual edge-cases yield "", yield "x", while True: # kinds of invalid vectors: # invalid prefix # invalid payload length # invalid (randomized) suffix (add random data) # corrupt checksum for template in templates: val = gen_invalid_vector(template, randbool(0.2), randbool(0.2), randbool(0.2)) if random.randint(0,10)<1: # line corruption if randbool(): # add random character to end val += random.choice(b58chars) else: # replace random character in the middle n = random.randint(0, len(val)) val = val[0:n] + random.choice(b58chars) + val[n+1:] if not is_valid(val): yield val, if __name__ == '__main__': import sys, json iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors} try: uiter = iters[sys.argv[1]] except IndexError: uiter = gen_valid_vectors try: count = int(sys.argv[2]) except IndexError: count = 0 data = list(islice(uiter(), count)) json.dump(data, sys.stdout, sort_keys=True, indent=4) sys.stdout.write('\n') ================================================ FILE: contrib/tidy_datadir.sh ================================================ #!/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" else echo "Usage: $0 " >&2 echo "Removes obsolete Munt database files" >&2 exit 1 fi LEVEL=0 if [ -f wallet.dat -a -f addr.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=1; fi if [ -f wallet.dat -a -f peers.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=2; fi if [ -f wallet.dat -a -f peers.dat -a -f coins/CURRENT -a -f blktree/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=3; fi if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/CURRENT -a -f blocks/blk00000.dat ]; then LEVEL=4; fi case $LEVEL in 0) echo "Error: no Munt datadir detected." exit 1 ;; 1) echo "Detected old Munt datadir (before 0.7)." echo "Nothing to do." exit 0 ;; 2) echo "Detected Munt 0.7 datadir." ;; 3) echo "Detected Munt pre-0.8 datadir." ;; 4) echo "Detected Munt 0.8 datadir." ;; esac FILES="" DIRS="" if [ $LEVEL -ge 3 ]; then FILES=$(echo $FILES blk????.dat blkindex.dat); fi if [ $LEVEL -ge 2 ]; then FILES=$(echo $FILES addr.dat); fi if [ $LEVEL -ge 4 ]; then DIRS=$(echo $DIRS coins blktree); fi for FILE in $FILES; do if [ -f $FILE ]; then echo "Deleting: $FILE" rm -f $FILE fi done for DIR in $DIRS; do if [ -d $DIR ]; then echo "Deleting: $DIR/" rm -rf $DIR fi done echo "Done." ================================================ FILE: contrib/zmq/zmq_sub.py ================================================ #!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ ZMQ example using python3's asyncio Bitcoin should be started with the command line arguments: Munt-daemon -testnet -daemon \ -zmqpubhashblock=tcp://127.0.0.1:28332 \ -zmqpubrawtx=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ -zmqpubhashblock=tcp://127.0.0.1:28332 We use the asyncio library here. `self.handle()` installs itself as a future at the end of the function. Since it never returns with the event loop having an empty stack of futures, this creates an infinite loop. An alternative is to wrap the contents of `handle` inside `while True`. A blocking example using python 2.7 can be obtained from the git history: https://github.com/bitcoin/bitcoin/blob/37a7fe9e440b83e2364d5498931253937abe9294/contrib/zmq/zmq_sub.py """ import binascii import asyncio import zmq import zmq.asyncio import signal import struct import sys if not (sys.version_info.major >= 3 and sys.version_info.minor >= 5): print("This example only works with Python 3.5 and greater") exit(1) port = 28332 class ZMQHandler(): def __init__(self): self.loop = zmq.asyncio.install() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx") self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) async def handle(self) : msg = await self.zmqSubSocket.recv_multipart() topic = msg[0] body = msg[1] sequence = "Unknown" if len(msg[-1]) == 4: msgSequence = struct.unpack('= 3 and sys.version_info.minor >= 4): print("This example only works with Python 3.4 and greater") exit(1) port = 28332 class ZMQHandler(): def __init__(self): self.loop = zmq.asyncio.install() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx") self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) @asyncio.coroutine def handle(self) : msg = yield from self.zmqSubSocket.recv_multipart() topic = msg[0] body = msg[1] sequence = "Unknown" if len(msg[-1]) == 4: msgSequence = struct.unpack('. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$driver" break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)) case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; *:OS108:*:*) echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Twizzler:*:*) echo "$UNAME_MACHINE"-unknown-twizzler exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) case $(/usr/bin/arch -k) in Series*|S4*) UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case $(/bin/arch) in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=$(/usr/bin/uname -p) if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=$(/usr/bin/oslevel) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=$(uname -p) set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi else echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=$(/usr/bin/uname -p) case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case $UNAME_MACHINE in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then LIBCABI="$LIBC"x32 fi fi echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=$( (uname -p) 2>/dev/null) echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; arm64:Darwin:*:*) echo aarch64-apple-darwin"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=$(uname -p) case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=$(uname -p) if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) UNAME_MACHINE=$( (uname -p) 2>/dev/null) case $UNAME_MACHINE in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; *:AROS:*:*) echo "$UNAME_MACHINE"-unknown-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; *:Unleashed:*:*) echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" exit ;; esac # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown) uname -r = $( (uname -r) 2>/dev/null || echo unknown) uname -s = $( (uname -s) 2>/dev/null || echo unknown) uname -v = $( (uname -v) 2>/dev/null || echo unknown) /usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) /bin/uname -X = $( (/bin/uname -X) 2>/dev/null) hostinfo = $( (hostinfo) 2>/dev/null) /bin/universe = $( (/bin/universe) 2>/dev/null) /usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) /bin/arch = $( (/bin/arch) 2>/dev/null) /usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) /usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ================================================ FILE: depends/config.site.in ================================================ # shellcheck shell=sh disable=SC2034 # Many variables set will be used in # ./configure but shellcheck doesn't know # that, hence: disable=SC2034 true # Dummy command because shellcheck treats all directives before first # command as file-wide, and we only want to disable for one line. # # See: https://github.com/koalaman/shellcheck/wiki/Directive # shellcheck disable=SC2154 depends_prefix="$(cd "$(dirname "$ac_site_file")/.." && pwd)" cross_compiling=maybe host_alias="@HOST@" ac_tool_prefix="${host_alias}-" if test -z "$with_boost"; then with_boost="$depends_prefix" fi if test -z "$with_qt_plugindir"; then with_qt_plugindir="${depends_prefix}/plugins" fi if test -z "$with_qt_translationdir"; then with_qt_translationdir="${depends_prefix}/translations" fi if test -z "$with_qt_bindir" && test -z "@no_qt@"; then with_qt_bindir="${depends_prefix}/native/bin" fi if test -z "$with_mpgen" && test -n "@multiprocess@"; then with_mpgen="${depends_prefix}/native" fi if test -z "$with_qrencode" && test -n "@no_qr@"; then with_qrencode=no fi if test -z "$enable_wallet" && test -n "@no_wallet@"; then enable_wallet=no fi if test -z "$with_bdb" && test -n "@no_bdb@"; then with_bdb=no fi if test -z "$with_sqlite" && test -n "@no_sqlite@"; then with_sqlite=no fi if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then enable_multiprocess=yes fi if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then with_miniupnpc=no fi if test -z "$with_natpmp" && test -n "@no_natpmp@"; then with_natpmp=no fi if test -z "$with_gui" && test -n "@no_qt@"; then with_gui=no fi if test -n "@debug@" && test -z "@no_qt@" && test "$with_gui" != "no"; then with_gui=qt5_debug fi if test -z "$enable_zmq" && test -n "@no_zmq@"; then enable_zmq=no fi if test -z "$enable_usdt" && test -n "@no_usdt@"; then enable_usdt=no fi if test "@host_os@" = darwin; then BREW=no fi PATH="${depends_prefix}/native/bin:${PATH}" PKG_CONFIG="$(which pkg-config) --static" # These two need to remain exported because pkg-config does not see them # otherwise. That means they must be unexported at the end of configure.ac to # avoid ruining the cache. Sigh. export PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig" if test -z "@allow_host_packages@"; then export PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig" fi CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}" LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}" if test -n "@CC@" -a -z "${CC}"; then CC="@CC@" fi if test -n "@CXX@" -a -z "${CXX}"; then CXX="@CXX@" fi PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}" if test -n "@AR@"; then AR="@AR@" ac_cv_path_ac_pt_AR="${AR}" fi if test -n "@RANLIB@"; then RANLIB="@RANLIB@" ac_cv_path_ac_pt_RANLIB="${RANLIB}" fi if test -n "@NM@"; then NM="@NM@" ac_cv_path_ac_pt_NM="${NM}" fi if test -n "@debug@"; then enable_reduce_exports=no fi if test -n "@CFLAGS@"; then CFLAGS="@CFLAGS@ ${CFLAGS}" fi if test -n "@CXXFLAGS@"; then CXXFLAGS="@CXXFLAGS@ ${CXXFLAGS}" fi if test -n "@CPPFLAGS@"; then CPPFLAGS="@CPPFLAGS@ ${CPPFLAGS}" fi if test -n "@LDFLAGS@"; then LDFLAGS="@LDFLAGS@ ${LDFLAGS}" fi ================================================ FILE: depends/config.sub ================================================ #! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. timestamp='2021-04-30' # This file 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv4 ;; i*86v) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv ;; i*86sol2) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; *-*) # shellcheck disable=SC2162 IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') ;; os2-emx) kernel=os2 os=$(echo $basic_os | sed -e 's|os2-emx|emx|') ;; nto-qnx*) kernel=nto os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') ;; *-*) # shellcheck disable=SC2162 IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ================================================ FILE: depends/description.md ================================================ This is a system of building and caching dependencies necessary for building Munt. There are several features that make it different from most similar systems: ### It is designed to be builder and host agnostic In theory, binaries for any target OS/architecture can be created, from a builder running any OS/architecture. In practice, build-side tools must be specified when the defaults don't fit, and packages must be amended to work on new hosts. For now, a build architecture of x86_64 is assumed, either on Linux or macOS. ### No reliance on timestamps File presence is used to determine what needs to be built. This makes the results distributable and easily digestable by automated builders. ### Each build only has its specified dependencies available at build-time. For each build, the sysroot is wiped and the (recursive) dependencies are installed. This makes each build deterministic, since there will never be any unknown files available to cause side-effects. ### Each package is cached and only rebuilt as needed. Before building, a unique build-id is generated for each package. This id consists of a hash of all files used to build the package (Makefiles, packages, etc), and as well as a hash of the same data for each recursive dependency. If any portion of a package's build recipe changes, it will be rebuilt as well as any other package that depends on it. If any of the main makefiles (Makefile, funcs.mk, etc) are changed, all packages will be rebuilt. After building, the results are cached into a tarball that can be re-used and distributed. ### Package build results are (relatively) deterministic. Each package is configured and patched so that it will yield the same build-results with each consequent build, within a reasonable set of constraints. Some things like timestamp insertion are unavoidable, and are beyond the scope of this system. Additionally, the toolchain itself must be capable of deterministic results. When revisions are properly bumped, a cached build should represent an exact single payload. ### Sources are fetched and verified automatically Each package must define its source location and checksum. The build will fail if the fetched source does not match. Sources may be pre-seeded and/or cached as desired. ### Self-cleaning Build and staging dirs are wiped after use, and any previous version of a cached result is removed following a successful build. Automated builders should be able to build each revision and store the results with no further intervention. ================================================ FILE: depends/funcs.mk ================================================ define int_vars #Set defaults for vars which may be overridden per-package $(1)_cc=$$($$($(1)_type)_CC) $(1)_cxx=$$($$($(1)_type)_CXX) $(1)_objc=$$($$($(1)_type)_OBJC) $(1)_objcxx=$$($$($(1)_type)_OBJCXX) $(1)_ar=$$($$($(1)_type)_AR) $(1)_ranlib=$$($$($(1)_type)_RANLIB) $(1)_libtool=$$($$($(1)_type)_LIBTOOL) $(1)_nm=$$($$($(1)_type)_NM) $(1)_cflags=$$($$($(1)_type)_CFLAGS) \ $$($$($(1)_type)_$$(release_type)_CFLAGS) $(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \ $$($$($(1)_type)_$$(release_type)_CXXFLAGS) $(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \ $$($$($(1)_type)_$$(release_type)_LDFLAGS) \ -L$$($($(1)_type)_prefix)/lib $(1)_cppflags=$$($$($(1)_type)_CPPFLAGS) \ $$($$($(1)_type)_$$(release_type)_CPPFLAGS) \ -I$$($$($(1)_type)_prefix)/include $(1)_recipe_hash:= endef define int_get_all_dependencies $(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies)))) endef define fetch_file_inner ( mkdir -p $$($(1)_download_dir) && echo Fetching $(3) from $(2) && \ $(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 && \ mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \ rm -rf $$($(1)_download_dir) ) endef define fetch_file ( test -f $$($(1)_source_dir)/$(4) || \ ( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \ $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5)))) 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)) 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)_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) $($($(1)_type)_id)) $(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) #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) $(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix) $(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id) $(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version) $(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir) $(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash $(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id) $(1)_prefixbin:=$($($(1)_type)_prefix)/bin/ $(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz $(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources) #stamps $(1)_fetched=$(SOURCES_PATH)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name).hash $(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted $(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed $(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned $(1)_built=$$($(1)_build_dir)/.stamp_built $(1)_configured=$$($(1)_build_dir)/.stamp_configured $(1)_staged=$$($(1)_staging_dir)/.stamp_staged $(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path)) #default commands # The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior $(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash)) $(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source) $(1)_preprocess_cmds ?= $(1)_build_cmds ?= $(1)_config_cmds ?= $(1)_stage_cmds ?= $(1)_set_vars ?= all_sources+=$$($(1)_fetched) endef #$(foreach dep_target,$($(1)_all_dependencies),$(eval $(1)_dependency_targets=$($(dep_target)_cached))) define int_config_attach_build_config $(eval $(call $(1)_set_vars,$(1))) $(1)_cflags+=$($(1)_cflags_$(release_type)) $(1)_cflags+=$($(1)_cflags_$(host_arch)) $($(1)_cflags_$(host_arch)_$(release_type)) $(1)_cflags+=$($(1)_cflags_$(host_os)) $($(1)_cflags_$(host_os)_$(release_type)) $(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os)) $($(1)_cflags_$(host_arch)_$(host_os)_$(release_type)) $(1)_cxxflags+=$($(1)_cxxflags_$(release_type)) $(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)) $($(1)_cxxflags_$(host_arch)_$(release_type)) $(1)_cxxflags+=$($(1)_cxxflags_$(host_os)) $($(1)_cxxflags_$(host_os)_$(release_type)) $(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os)) $($(1)_cxxflags_$(host_arch)_$(host_os)_$(release_type)) $(1)_cppflags+=$($(1)_cppflags_$(release_type)) $(1)_cppflags+=$($(1)_cppflags_$(host_arch)) $($(1)_cppflags_$(host_arch)_$(release_type)) $(1)_cppflags+=$($(1)_cppflags_$(host_os)) $($(1)_cppflags_$(host_os)_$(release_type)) $(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os)) $($(1)_cppflags_$(host_arch)_$(host_os)_$(release_type)) $(1)_ldflags+=$($(1)_ldflags_$(release_type)) $(1)_ldflags+=$($(1)_ldflags_$(host_arch)) $($(1)_ldflags_$(host_arch)_$(release_type)) $(1)_ldflags+=$($(1)_ldflags_$(host_os)) $($(1)_ldflags_$(host_os)_$(release_type)) $(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os)) $($(1)_ldflags_$(host_arch)_$(host_os)_$(release_type)) $(1)_build_opts+=$$($(1)_build_opts_$(release_type)) $(1)_build_opts+=$$($(1)_build_opts_$(host_arch)) $$($(1)_build_opts_$(host_arch)_$(release_type)) $(1)_build_opts+=$$($(1)_build_opts_$(host_os)) $$($(1)_build_opts_$(host_os)_$(release_type)) $(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os)) $$($(1)_build_opts_$(host_arch)_$(host_os)_$(release_type)) $(1)_config_opts+=$$($(1)_config_opts_$(release_type)) $(1)_config_opts+=$$($(1)_config_opts_$(host_arch)) $$($(1)_config_opts_$(host_arch)_$(release_type)) $(1)_config_opts+=$$($(1)_config_opts_$(host_os)) $$($(1)_config_opts_$(host_os)_$(release_type)) $(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os)) $$($(1)_config_opts_$(host_arch)_$(host_os)_$(release_type)) $(1)_config_env+=$$($(1)_config_env_$(release_type)) $(1)_config_env+=$($(1)_config_env_$(host_arch)) $($(1)_config_env_$(host_arch)_$(release_type)) $(1)_config_env+=$($(1)_config_env_$(host_os)) $($(1)_config_env_$(host_os)_$(release_type)) $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(host_arch)_$(host_os)_$(release_type)) $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig $(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake $(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH) $(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH) $(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH) # Setting a --build type that differs from --host will explicitly enable # cross-compilation mode. Note that --build defaults to the output of # config.guess, which is what we set it too here. This also quells autoconf # warnings, "If you wanted to set the --build type, don't use --host.", # when using versions older than 2.70. $(1)_autoconf=./configure --build=$(BUILD) --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)" endif ifneq ($($(1)_ranlib),) $(1)_autoconf += RANLIB="$$($(1)_ranlib)" endif ifneq ($($(1)_ar),) $(1)_autoconf += AR="$$($(1)_ar)" endif ifneq ($($(1)_cflags),) $(1)_autoconf += CFLAGS="$$($(1)_cflags)" endif ifneq ($($(1)_cxxflags),) $(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)" endif ifneq ($($(1)_cppflags),) $(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)" endif ifneq ($($(1)_ldflags),) $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)" endif $(1)_cmake=env CC="$$($(1)_cc)" \ CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \ CXX="$$($(1)_cxx)" \ CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \ LDFLAGS="$$($(1)_ldflags)" \ cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" ifeq ($($(1)_type),build) $(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib" else ifneq ($(host),$(build)) $(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) $(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) $(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) endif endif endef define int_add_cmds $($(1)_fetched): mkdir -p $$(@D) $(SOURCES_PATH) rm -f $$@ touch $$@ cd $$(@D); $(call $(1)_fetch_cmds,$(1)) cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) touch $$@ $($(1)_extracted): | $($(1)_fetched) echo Extracting $(1)... mkdir -p $$(@D) cd $$(@D); $(call $(1)_extract_cmds,$(1)) touch $$@ $($(1)_preprocessed): | $($(1)_extracted) echo Preprocessing $(1)... mkdir -p $$(@D) $($(1)_patch_dir) $(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) touch $$@ $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) echo Configuring $(1)... rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) --no-same-owner -xf $($(package)_cached); ) mkdir -p $$(@D) +cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) touch $$@ $($(1)_built): | $($(1)_configured) echo Building $(1)... mkdir -p $$(@D) +cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) touch $$@ $($(1)_staged): | $($(1)_built) echo Staging $(1)... mkdir -p $($(1)_staging_dir)/$(host_prefix) cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1)) rm -rf $($(1)_extract_dir) touch $$@ $($(1)_postprocessed): | $($(1)_staged) echo Postprocessing $(1)... cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds) touch $$@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) echo Caching $(1)... cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - mkdir -p $$(@D) rm -rf $$(@D) && mkdir -p $$(@D) mv $$($(1)_staging_dir)/$$(@F) $$(@) rm -rf $($(1)_staging_dir) $($(1)_cached_checksum): $($(1)_cached) cd $$(@D); $(build_SHA256SUM) $$( $$(@) .PHONY: $(1) $(1): | $($(1)_cached_checksum) .SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) endef stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum define ext_add_stages $(foreach stage,$(stages), $(1)_$(stage): $($(1)_$(stage)) .PHONY: $(1)_$(stage)) endef # These functions create the build targets for each package. They must be # broken down into small steps so that each part is done for all packages # before moving on to the next step. Otherwise, a package's info # (build-id for example) would only be available to another package if it # happened to be computed already. #set the type for host/build packages. $(foreach native_package,$(native_packages),$(eval $(native_package)_type=build)) $(foreach package,$(packages),$(eval $(package)_type=$(host_arch)_$(host_os))) #set overridable defaults $(foreach package,$(all_packages),$(eval $(call int_vars,$(package)))) #include package files $(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk)) $(foreach package,$(packages),$(eval include packages/$(package).mk)) #compute a hash of all files that comprise this package's build recipe $(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package)))) #generate a unique id for this package, incorporating its dependencies as well $(foreach package,$(all_packages),$(eval $(call int_get_build_id,$(package)))) #compute final vars after reading package vars $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$(package)))) #create build targets $(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)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) )) ================================================ FILE: depends/gen_id ================================================ #!/usr/bin/env bash # Usage: env [ CC=... ] [ CXX=... ] [ AR=... ] [ RANLIB=... ] [ STRIP=... ] \ # [ DEBUG=... ] ./build-id [ID_SALT]... # # Prints to stdout a SHA256 hash representing the current toolset, used by # depends/Makefile as a build id for caching purposes (detecting when the # toolset has changed and the cache needs to be invalidated). # # If the DEBUG environment variable is non-empty and the system has `tee` # available in its $PATH, the pre-image to the SHA256 hash will be printed to # stderr. This is to help developers debug caching issues in depends. # This script explicitly does not `set -e` because id determination is mostly # opportunistic: it is fine that things fail, as long as they fail consistently. # Command variables (CC/CXX/AR) which can be blank are invoked with `bash -c`, # because the "command not found" error message printed by shells often include # the line number, like so: # # ./depends/gen_id: line 43: --version: command not found # # By invoking with `bash -c`, we ensure that the line number is always 1 ( # Redirect stderr to stdout exec 2>&1 echo "BEGIN ALL" # Include any ID salts supplied via command line echo "BEGIN ID SALT" echo "$@" echo "END ID SALT" # GCC only prints COLLECT_LTO_WRAPPER when invoked with just "-v", but we want # the information from "-v -E -" as well, so just include both. echo "BEGIN CC" bash -c "${CC} -v" bash -c "${CC} -v -E -xc -o /dev/null - < /dev/null" bash -c "${CC} -v -E -xobjective-c -o /dev/null - < /dev/null" echo "END CC" echo "BEGIN CXX" bash -c "${CXX} -v" bash -c "${CXX} -v -E -xc++ -o /dev/null - < /dev/null" bash -c "${CXX} -v -E -xobjective-c++ -o /dev/null - < /dev/null" echo "END CXX" echo "BEGIN AR" bash -c "${AR} --version" env | grep '^AR_' echo "ZERO_AR_DATE=${ZERO_AR_DATE}" echo "END AR" echo "BEGIN RANLIB" bash -c "${RANLIB} --version" env | grep '^RANLIB_' echo "END RANLIB" echo "BEGIN STRIP" bash -c "${STRIP} --version" env | grep '^STRIP_' echo "END STRIP" echo "END ALL" ) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then # When debugging and `tee` is available, output the preimage to stderr # in addition to passing through stdin to stdout tee >(cat 1>&2) else # Otherwise, passthrough stdin to stdout cat fi | ${SHA256SUM} - | cut -d' ' -f1 ================================================ FILE: depends/hosts/android.mk ================================================ android_cmake_system=Android ================================================ FILE: depends/hosts/darwin.mk ================================================ OSX_MIN_VERSION=10.10 OSX_SDK_VERSION?=12.0 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk LD64_VERSION=609 darwin_native_binutils=native_cctools ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) # FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang # from llvm.org # Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty darwin_native_toolchain=native_cctools clang_prog=$(build_prefix)/bin/clang clangxx_prog=$(clang_prog)++ llvm_config_prog=$(build_prefix)/bin/llvm-config clang_resource_dir=$(build_prefix)/lib/clang/$(native_clang_version) else # FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's # system darwin_native_toolchain= # We can't just use $(shell command -v clang) because GNU Make handles builtins # in a special way and doesn't know that `command` is a POSIX-standard builtin # prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90. # At the time of writing, GNU Make v4.2.1 is still being used in supported # distro releases. # # Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config") clang_resource_dir=$(shell clang -print-resource-dir) llvm_lib_dir=$(shell $(llvm_config_prog) --libdir) endif cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL # Make-only lowercase function lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) # For well-known tools provided by cctools, make sure that their well-known # variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG} # would. $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(host)-$(call lc,$(TOOL)))) # 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. # # -stdlib=libc++ -stdlib++-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 # # -Xclang -*system \ # -Xclang -*system \ # -Xclang -*system ... # # Adds path_a, path_b, and path_c to the bottom of clang's list of # include search paths. This is used to explicitly specify the list of # system include search paths and its ordering, rather than rely on # clang's autodetection routine. This routine has been shown to: # 1. Fail to pickup libc++ headers in $SYSROOT/usr/include/c++/v1 # when clang was built manually (see: https://github.com/bitcoin/bitcoin/pull/17919#issuecomment-656785034) # 2. Fail to pickup C headers in $SYSROOT/usr/include when # C_INCLUDE_DIRS was specified at configure time (see: https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9) # # Talking directly to cc1 with -Xclang here grants us access to specify # more granular categories for these system include search paths, and we # can use the correct categories that these search paths would have been # placed in if the autodetection routine had worked correctly. (see: # https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9#the-treatment) # # Furthermore, it places these search paths after any "non-Xclang" # specified search paths. This prevents any additional clang options or # environment variables from coming after or in between these system # include search paths, as that would be wrong in general but would also # break #include_next's. # darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ -u LIBRARY_PATH \ $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -isysroot$(OSX_SDK) \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ -u LIBRARY_PATH \ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -isysroot$(OSX_SDK) \ -stdlib=libc++ \ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include darwin_CFLAGS=-pipe darwin_CXXFLAGS=-pipe ifneq ($(LTO),) darwin_CFLAGS += -flto darwin_CXXFLAGS += -flto darwin_LDFLAGS += -flto endif darwin_release_CFLAGS=-O2 darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) darwin_debug_CFLAGS=-O1 darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) darwin_cmake_system=Darwin ================================================ FILE: depends/hosts/default.mk ================================================ ifneq ($(host),$(build)) host_toolchain:=$(host)- endif 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 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 define add_host_tool_func ifneq ($(filter $(origin $1),undefined default),) # Do not consider the well-known var $1 if it is undefined or is taking a value # that is predefined by "make" (e.g. the make variable "CC" has a predefined # value of "cc") $(host_os)_$1?=$$(default_host_$1) $(host_arch)_$(host_os)_$1?=$$($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1) else $(host_os)_$1=$(or $($1),$($(host_os)_$1),$(default_host_$1)) $(host_arch)_$(host_os)_$1=$(or $($1),$($(host_arch)_$(host_os)_$1),$$($(host_os)_$1)) $(host_arch)_$(host_os)_$(release_type)_$1=$(or $($1),$($(host_arch)_$(host_os)_$(release_type)_$1),$$($(host_os)_$1)) endif host_$1=$$($(host_arch)_$(host_os)_$1) endef define add_host_flags_func $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef $(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool)))) $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) ================================================ FILE: depends/hosts/ios.mk ================================================ aarch64_ios_SDK=$(shell xcrun --sdk iphoneos --show-sdk-path) x86_64_ios_SDK=$(shell xcrun --sdk iphonesimulator --show-sdk-path) ios_SDK=$($(host_arch)_ios_SDK) ios_ARCH=$(host_arch) ifeq ($(host_arch),aarch64) ios_ARCH=arm64 endif aarch64_ios_SYSTEM=apple-ios x86_64_ios_SYSTEM=apple-darwin ios_SYSTEM=$($(host_arch)_ios_SYSTEM) ios_TARGET=$(ios_ARCH)-$(ios_SYSTEM) ios_HOST=$(host_arch)-$(ios_SYSTEM) ios_CC=clang -target $(ios_TARGET) -isysroot $(ios_SDK) -fvisibility=default ios_CXX=clang++ -target $(ios_TARGET) -isysroot $(ios_SDK) -stdlib=libc++ -fvisibility=default ios_CFLAGS=-pipe ios_CXXFLAGS=$(ios_CFLAGS) ios_release_CFLAGS=-O2 ios_release_CXXFLAGS=$(ios_release_CFLAGS) ios_debug_CFLAGS=-O1 ios_debug_CXXFLAGS=$(ios_debug_CFLAGS) ios_native_toolchain= ios_AR=ar ios_RANLIB=ranlib ================================================ FILE: depends/hosts/linux.mk ================================================ linux_CFLAGS=-pipe linux_CXXFLAGS=$(linux_CFLAGS) linux_release_CFLAGS=-O2 linux_release_CXXFLAGS=$(linux_release_CFLAGS) linux_debug_CFLAGS=-O1 linux_debug_CXXFLAGS=$(linux_debug_CFLAGS) linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 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 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 endif linux_cmake_system=Linux ================================================ FILE: depends/hosts/mingw32.mk ================================================ ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),) mingw32_CXX := $(host)-g++-posix endif mingw32_CFLAGS=-pipe mingw32_CXXFLAGS=$(mingw32_CFLAGS) mingw32_release_CFLAGS=-O2 mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) mingw32_debug_CFLAGS=-O1 mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC mingw_cmake_system=Windows ================================================ FILE: depends/hosts/mingw64.mk ================================================ mingw64_CFLAGS=-pipe mingw64_CXXFLAGS=$(mingw64_CFLAGS) mingw64_release_CFLAGS=-O2 mingw64_release_CXXFLAGS=$(mingw64_release_CFLAGS) mingw64_debug_CFLAGS=-O1 mingw64_debug_CXXFLAGS=$(mingw64_debug_CFLAGS) mingw64_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC ================================================ FILE: depends/packages/bdb.mk ================================================ package=bdb $(package)_version=4.8.30 $(package)_download_path=http://download.oracle.com/berkeley-db $(package)_file_name=db-$($(package)_version).NC.tar.gz $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef $(package)_build_subdir=build_unix define $(package)_set_vars $(package)_config_opts=--disable-shared --enable-cxx --disable-replication $(package)_config_opts_mingw32=--enable-mingw $(package)_config_opts_mingw64=--enable-mingw $(package)_config_opts_linux=--with-pic $(package)_config_opts_android=--with-pic $(package)_cc+=-Wno-error=implicit-function-declaration $(package)_config_opts_ios=--host=$(ios_HOST) --enable-posixmutexes $(package)_cxxflags=-std=c++11 $(package)_cflags_ios=-Wno-implicit-function-declaration endef define $(package)_preprocess_cmds sed -i.old2 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \ sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist endef define $(package)_config_cmds ../dist/$($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) libdb_cxx-4.8.a libdb-4.8.a endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include endef ================================================ FILE: depends/packages/boost.mk ================================================ package=boost $(package)_version=1.77.0 $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/ $(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2 $(package)_sha256_hash=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854 define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared $(package)_config_opts_darwin=--toolset=clang-darwin runtime-link=shared $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static $(package)_config_opts_mingw64=binary-format=pe target-os=windows threadapi=win32 runtime-link=static $(package)_config_opts_x86_64_mingw32=address-model=64 $(package)_config_opts_x86_64_mingw64=address-model=64 $(package)_config_opts_i686_mingw32=address-model=64 $(package)_config_opts_i686_mingw64=address-model=64 $(package)_config_opts_i686_linux=address-model=32 architecture=x86 $(package)_config_opts_aarch64_ios=architecture=x86 target-os=iphone $(package)_config_opts_android=define=BOOST_FILESYSTEM_DISABLE_STATX $(package)_toolset_$(host_os)=gcc $(package)_toolset_darwin=clang-darwin $(package)_toolset_ios=darwin $(package)_archiver_$(host_os)=$($(package)_ar) $(package)_archiver_darwin=$($(package)_ar) $(package)_archiver_ios=libtool $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test $(package)_cxxflags=-std=c++17 $(package)_cxxflags_$(host_os)=-fvisibility=hidden $(package)_cxxflags_linux+=-fPIC $(package)_cxxflags_android+=-fPIC $(package)_cxxflags_ios=-fvisibility=default endef define $(package)_preprocess_cmds echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef define $(package)_config_cmds ./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries) endef define $(package)_build_cmds ./b2 --ignore-site-config -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage endef define $(package)_stage_cmds ./b2 --ignore-site-config -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install endef ================================================ FILE: depends/packages/djinni.mk ================================================ package=djinni $(package)_commit=da0f079711e863542b558aa31690605a8688ab55 $(package)_version=$($(package)_commit) $(package)_download_path=https://github.com/mjmacleod/djinni/archive/ $(package)_file_name=$($(package)_commit).tar.gz $(package)_sha256_hash=206c5e81695d9863bf07eee6cb5416c923ffe27d7fb83f4f27261bc24ce4937a define $(package)_build_cmds $(MAKE) djinni && \ ./support-lib/ios-build-support-lib.sh endef define $(package)_stage_cmds cp -R src $($(package)_staging_prefix_dir)/$(package) && \ mkdir -p $($(package)_staging_prefix_dir)/bin && \ ln -s ../djinni/run-assume-built $($(package)_staging_prefix_dir)/bin/djinni-run && \ mkdir -p $($(package)_staging_prefix_dir)/lib && \ cp support-lib/out/apple/libdjinni_support_lib_UNIVERSAL.a $($(package)_staging_prefix_dir)/lib/ && \ mkdir -p $($(package)_staging_prefix_dir)/include/objc && \ cp support-lib/*.hpp $($(package)_staging_prefix_dir)/include && \ cp support-lib/objc/*.h $($(package)_staging_prefix_dir)/include/objc endef ================================================ FILE: depends/packages/electron_node_headers.mk ================================================ package=electron_node_headers $(package)_version=18.15.0 $(package)_download_path=https://nodejs.org/dist/v$($(package)_version)/ $(package)_file_name=node-v$($(package)_version)-headers.tar.gz $(package)_sha256_hash=5ada31143933f0443d20769ae5942c4b1c5c80fe9f8a8221dae12ed9bec2ad2d $(package)_patches=node.def $(package)_makelibnode_mingw32=cp -f $($(package)_patch_dir)/node.def . && x86_64-w64-mingw32-dlltool -d node.def -y libnode.a $(package)_instlibnode_mingw32=&& mkdir $($(package)_staging_prefix_dir)/lib/ && cp libnode.a $($(package)_staging_prefix_dir)/lib define $(package)_preprocess_cmds $($(package)_makelibnode_$(host_os)) endef define $(package)_stage_cmds cp -r include $($(package)_staging_prefix_dir) $($(package)_instlibnode_$(host_os)) endef ================================================ FILE: depends/packages/libcryptopp.mk ================================================ package=libcryptopp $(package)_version=8.2.0 $(package)_download_path=https://github.com/weidai11/cryptopp/archive/ $(package)_file_name=CRYPTOPP_8_2_0.tar.gz $(package)_sha256_hash=e3bcd48a62739ad179ad8064b523346abb53767bcbefc01fe37303412292343e $(package)_makefile_darwin=GNUmakefile $(package)_makefile_linux=GNUmakefile $(package)_makefile_mingw32=GNUmakefile $(package)_makefile_mingw64=GNUmakefile $(package)_makefile=$($(package)_makefile_$(host_os)) $(package)_cxxflags_debug += $(package)_cxxflags_release += -DNDEBUG -O3 -fPIC $(package)_cxxflags += -std=c++17 define $(package)_preprocess_cmds endef define $(package)_set_vars endef define $(package)_config_cmds sed -Ei.old "s|[^A-Z][(]CXX[)]|$($(package)_cxx)|" GNUmakefile && \ sed -Ei.old "s|AR = libtool|AR = $($(package)_libtool)|" GNUmakefile && \ sed -Ei.old "s|CC=gcc|CC=$($(package)_cxx)|" GNUmakefile && \ sed -Ei.old "s|CC=clang|CC=$($(package)_cxx)|" GNUmakefile && \ sed -i.old 's|ifeq ($$$$(IS_ARM32),1)|ifeq ($$$$(IS_ARM32)$$$$(IS_ARMV8),10)|' GNUmakefile &&\ sed -i.old 's|CRYPTOGAMS_AES_FLAG = -march=armv7-a|CRYPTOGAMS_AES_FLAG = -march=armv7-a+fp|g' GNUmakefile &&\ sed -Ei.old "s|// [#]define CRYPTOPP_NO_CXX17|#define CRYPTOPP_NO_CXX17|" config.h && \ sed -Ei.old "s|[#] define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE|//# define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE|" config.h endef define $(package)_build_cmds PREFIX=$($(package)_staging_prefix_dir) CXXFLAGS="$($(package)_cxxflags)" $(MAKE) -f GNUmakefile libcryptopp.pc && \ PREFIX="$($(package)_staging_prefix_dir)" RANLIB="$($(package)_ranlib)" CXXFLAGS="$($(package)_cxxflags)" $(MAKE) -f $($(package)_makefile) static endef define $(package)_stage_cmds PREFIX=$($(package)_staging_prefix_dir) RANLIB=$($(package)_ranlib) CXXFLAGS="$($(package)_cxxflags)" $(MAKE) -f $($(package)_makefile) install-lib endef define $(package)_postprocess_cmds endef ================================================ FILE: depends/packages/libcryptoppunity.mk ================================================ package=libcryptopp $(package)_version=8.2.0 $(package)_download_path=https://github.com/robobit/cryptopp/archive/ $(package)_file_name=04e8eb372d436acb35a70d9aa8453beffbeaad66.tar.gz $(package)_sha256_hash=93e88e5b001cded565908f6c70cd36a5771b24d2a1c6a2d64401b8217b2dc8c0 $(package)_makefile_$(host_os)=GNUmakefile-cross $(package)_makefile=$($(package)_makefile_$(host_os)) $(package)_env_script_$(host_os)=./setenv-android-clang.sh $(package)_env_script_ios=./setenv-ios.sh $(package)_env_script=$($(package)_env_script_$(host_os)) $(package)_cxxflags_debug += -DDEBUG -DDEBUG_LOCKORDER $(package)_cxxflags_release += -DNDEBUG -O3 -fPIC $(package)_cxxflags += -std=c++17 $(package)_cross_target_$(host_arch)_$(host_os)=$(host_arch) $(package)_cross_target_aarch64_ios=arm64 $(package)_cross_target_x86_64_ios=x86_64 $(package)_cross_target=$($(package)_cross_target_$(host_arch)_$(host_os)) ifeq ($(host_os),android) $(package)_env_arch_arm=AOSP_FLAGS="-march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCRYPTOPP_DISABLE_ASM -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti" $(package)_env_arch_arm+=AOSP_STL_LIB="$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" $(package)_env_arch_aarch64=AOSP_FLAGS="-funwind-tables -fexceptions -frtti" $(package)_env_arch_aarch64+=AOSP_STL_LIB="$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a" $(package)_env_arch_x86_64=AOSP_FLAGS="-DCRYPTOPP_DISABLE_ASM" $(package)_env_arch_x86_64+=AOSP_STL_LIB="$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a" $(package)_env_arch_i686=AOSP_FLAGS="-DCRYPTOPP_DISABLE_ASM" $(package)_env_arch_i686+=AOSP_STL_LIB="$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a" $(package)_env=IS_ANDROID=1 $(package)_env+=$($(package)_env_arch_$(host_arch)) endif ifeq ($(host_os),ios) $(package)_env_arch_aarch64=IOS_FLAGS= $(package)_env_arch_x86_64=IOS_FLAGS=-DCRYPTOPP_DISABLE_ASM $(package)_env=IS_IOS=1 $(package)_env+=IOS_SYSROOT=$(ios_SDK) $(package)_env+=IOS_ARCH=$($(package)_cross_target) $(package)_env+=$($(package)_env_arch_$(host_arch)) endif define $(package)_preprocess_cmds sed -Ei.old "s|// [#]define CRYPTOPP_NO_CXX17|#define CRYPTOPP_NO_CXX17|" config.h && \ sed -Ei.old "s|[#] define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE|//# define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE|" config.h endef define $(package)_set_vars endef ifeq ($(host_os),android) define $(package)_config_cmds cp "$(NDK_ROOT)/sources/android/cpufeatures/cpu-features.h" . && \ cp "$(NDK_ROOT)/sources/android/cpufeatures/cpu-features.c" . endef else define $(package)_config_cmds endef endif define $(package)_build_cmds PREFIX=$($(package)_staging_prefix_dir) $(MAKE) -f GNUmakefile libcryptopp.pc && \ $($(package)_env) PREFIX=$($(package)_staging_prefix_dir) RANLIB=$($(package)_ranlib) $(MAKE) -f $($(package)_makefile) static endef define $(package)_stage_cmds PREFIX=$($(package)_staging_prefix_dir) RANLIB=$($(package)_ranlib) $(MAKE) -f $($(package)_makefile) install-lib endef define $(package)_postprocess_cmds endef ================================================ FILE: depends/packages/libevent.mk ================================================ package=libevent $(package)_version=2.1.12-stable $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb # When building for Windows, we set _WIN32_WINNT to target the same Windows # version as we do in configure. Due to quirks in libevents build system, this # is also required to enable support for ipv6. See #19375. define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts_release=--disable-debug-mode $(package)_config_opts_linux=--with-pic $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 endef define $(package)_preprocess_cmds cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux endef define $(package)_config_cmds $($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef define $(package)_postprocess_cmds rm lib/*.la && \ rm include/ev*.h && \ rm include/event2/*_compat.h endef ================================================ FILE: depends/packages/miniupnpc.mk ================================================ package=miniupnpc $(package)_version=2.2.2 $(package)_download_path=https://miniupnp.tuxfamily.org/files/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=888fb0976ba61518276fe1eda988589c700a3f2a69d71089260d75562afd3687 $(package)_patches=dont_leak_info.patch define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" $(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)" $(package)_build_opts_mingw32=-f Makefile.mingw $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch endef define $(package)_build_cmds $(MAKE) libminiupnpc.a $($(package)_build_opts) endef define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\ install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\ install libminiupnpc.a $($(package)_staging_prefix_dir)/lib endef ================================================ FILE: depends/packages/native_biplist.mk ================================================ package=native_biplist $(package)_version=1.0.3 $(package)_download_path=https://bitbucket.org/wooster/biplist/downloads $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages define $(package)_build_cmds python3 setup.py build endef define $(package)_stage_cmds mkdir -p $($(package)_install_libdir) && \ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) endef ================================================ FILE: depends/packages/native_cctools.mk ================================================ package=native_cctools $(package)_version=2ef2e931cf641547eb8a68cfebde61003587c9fd $(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=6b73269efdf5c58a070e7357b66ee760501388549d6a12b423723f45888b074b $(package)_build_subdir=cctools $(package)_dependencies=native_libtapi define $(package)_set_vars $(package)_config_opts=--target=$(host) --enable-lto-support $(package)_config_opts+=--with-llvm-config=$(llvm_config_prog) $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib $(package)_cc=$(clang_prog) $(package)_cxx=$(clangxx_prog) endef ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) define $(package)_preprocess_cmds mkdir -p $($(package)_staging_prefix_dir)/lib && \ cp $(llvm_lib_dir)/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub cctools endef else define $(package)_preprocess_cmds cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub cctools endef endif define $(package)_config_cmds $($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef define $(package)_postprocess_cmds rm -rf share endef ================================================ FILE: depends/packages/native_cdrkit.mk ================================================ package=native_cdrkit $(package)_version=1.1.11 $(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 $(package)_patches=cdrkit-deterministic.patch define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch endef # Starting with 10.1, GCC defaults to -fno-common, resulting in linking errors. # Pass -fcommon to retain the legacy behaviour. define $(package)_config_cmds cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) -DCMAKE_C_FLAGS="$$($(1)_cflags) -fcommon" endef define $(package)_build_cmds $(MAKE) genisoimage endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install endef define $(package)_postprocess_cmds rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump endef ================================================ FILE: depends/packages/native_clang.mk ================================================ package=native_clang $(package)_version=14.0.0 $(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version) ifneq (,$(findstring aarch64,$(BUILD))) $(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz $(package)_sha256_hash=1792badcd44066c79148ffeb1746058422cc9d838462be07e3cb19a4b724a1ee else $(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz $(package)_sha256_hash=61582215dafafb7b576ea30cc136be92c877ba1f1c31ddbbd372d6d65622fef5 endif define $(package)_preprocess_cmds rm -f $($(package)_extract_dir)/lib/libc++abi.so* endef define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \ mkdir -p $($(package)_staging_prefix_dir)/bin && \ cp bin/clang $($(package)_staging_prefix_dir)/bin/ && \ cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ && \ cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ cp -r lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ endef ================================================ FILE: depends/packages/native_ds_store.mk ================================================ package=native_ds_store $(package)_version=1.3.0 $(package)_download_path=https://github.com/dmgbuild/ds_store/archive/ $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=76b3280cd4e19e5179defa23fb594a9dd32643b0c80d774bd3108361d94fb46d $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages define $(package)_build_cmds python3 setup.py build endef define $(package)_stage_cmds mkdir -p $($(package)_install_libdir) && \ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) endef ================================================ FILE: depends/packages/native_libdmg-hfsplus.mk ================================================ package=native_libdmg-hfsplus $(package)_version=0.1 $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 $(package)_build_subdir=build define $(package)_preprocess_cmds mkdir build endef define $(package)_config_cmds cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin .. endef define $(package)_build_cmds $(MAKE) -C dmg endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install endef ================================================ FILE: depends/packages/native_libtapi.mk ================================================ package=native_libtapi $(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026 $(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61 ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) $(package)_dependencies=native_clang endif define $(package)_build_cmds CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh endef define $(package)_stage_cmds ./install.sh endef ================================================ FILE: depends/packages/native_mac_alias.mk ================================================ package=native_mac_alias $(package)_version=2.2.0 $(package)_download_path=https://github.com/dmgbuild/mac_alias/archive/ $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=421e6d7586d1f155c7db3e7da01ca0dacc9649a509a253ad7077b70174426499 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages define $(package)_build_cmds python3 setup.py build endef define $(package)_stage_cmds mkdir -p $($(package)_install_libdir) && \ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) endef ================================================ FILE: depends/packages/node_addon_api.mk ================================================ package=node_addon_api $(package)_version=7.0.0 $(package)_download_path=https://registry.npmjs.org/node-addon-api/-/ $(package)_file_name=node-addon-api-$($(package)_version).tgz $(package)_sha256_hash=0535f2f93f0d3f0d94b6724884bae940f1b45b08ee4dd5b0b5b85525c1f7748d define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/include && \ mkdir -p $($(package)_staging_prefix_dir)/include/node-addon-api && \ cp -r * $($(package)_staging_prefix_dir)/include/node-addon-api/ endef ================================================ FILE: depends/packages/openssl.mk ================================================ package=openssl $(package)_version=1.0.1k $(package)_download_path=https://www.openssl.org/source/old/1.0.1 $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c $(package)_patches=0001-Update-configure-for-m1-builds.patch define $(package)_set_vars $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl $(package)_config_opts+=no-camellia $(package)_config_opts+=no-capieng $(package)_config_opts+=no-cast $(package)_config_opts+=no-comp $(package)_config_opts+=no-dso $(package)_config_opts+=no-dtls1 $(package)_config_opts+=no-ec_nistp_64_gcc_128 $(package)_config_opts+=no-gost $(package)_config_opts+=no-gmp $(package)_config_opts+=no-heartbeats $(package)_config_opts+=no-idea $(package)_config_opts+=no-jpake $(package)_config_opts+=no-krb5 $(package)_config_opts+=no-libunbound $(package)_config_opts+=no-md2 $(package)_config_opts+=no-mdc2 $(package)_config_opts+=no-rc4 $(package)_config_opts+=no-rc5 $(package)_config_opts+=no-rdrand $(package)_config_opts+=no-rfc3779 $(package)_config_opts+=no-rsax $(package)_config_opts+=no-sctp $(package)_config_opts+=no-seed $(package)_config_opts+=no-sha0 $(package)_config_opts+=no-shared $(package)_config_opts+=no-ssl-trace $(package)_config_opts+=no-ssl2 $(package)_config_opts+=no-ssl3 $(package)_config_opts+=no-static_engine $(package)_config_opts+=no-store $(package)_config_opts+=no-unit-test $(package)_config_opts+=no-weak-ssl-ciphers $(package)_config_opts+=no-whirlpool $(package)_config_opts+=no-zlib $(package)_config_opts+=no-zlib-dynamic $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags) $(package)_config_opts_linux=-fPIC -Wa,--noexecstack $(package)_config_opts_x86_64_linux=linux-x86_64 $(package)_config_opts_i686_linux=linux-generic32 $(package)_config_opts_arm_linux=linux-generic32 $(package)_config_opts_armv7l_linux=linux-generic32 $(package)_config_opts_aarch64_linux=linux-generic64 $(package)_config_opts_mipsel_linux=linux-generic32 $(package)_config_opts_mips_linux=linux-generic32 $(package)_config_opts_powerpc_linux=linux-generic32 $(package)_config_opts_riscv32_linux=linux-generic32 $(package)_config_opts_riscv64_linux=linux-generic64 $(package)_config_opts_android=-fPIC -Wa,--noexecstack android $(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc $(package)_config_opts_aarch64_darwin=darwin64-arm64-cc $(package)_config_opts_x86_64_mingw32=mingw64 $(package)_config_opts_x86_64_mingw64=mingw64 $(package)_config_opts_i686_mingw32=mingw $(package)_config_opts_x86_64_ios=darwin64-x86_64-cc $(package)_config_opts_aarch64_ios=iphoneos-cross-arm64 $(package)_config_env_aarch64_ios=CROSS_TOP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" CROSS_SDK="iPhoneOS12.0.sdk" endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/0001-Update-configure-for-m1-builds.patch && \ LC_ALL=C sed -i.old "/define DATE/d" util/mkbuildinf.pl && \ LC_ALL=C sed -i.old "s|engines apps test|engines|" Makefile.org && \ LC_ALL=C sed -i.old "s|-mandroid||" Configure && \ LC_ALL=C sed -i.old "s|# iPhoneOS/iOS|\"iphoneos-cross-arm64\", \"$(package)_cc:-O3 -fomit-frame-pointer -fno-common -fembed-bitcode::-D_REENTRANT:iOS:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:::-fPIC -fno-common::\",|" Configure endef define $(package)_config_cmds $($(package)_config_env) ./Configure $($(package)_config_opts) endef define $(package)_build_cmds $(MAKE) -j1 build_libs libcrypto.pc libssl.pc openssl.pc endef define $(package)_stage_cmds $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw endef define $(package)_postprocess_cmds rm -rf share bin etc endef ================================================ FILE: depends/packages/packages.mk ================================================ packages:=boost openssl qrencode electron_node_headers node_addon_api qrencode_linux_packages = qrencode qrencode_android_packages = qrencode qrencode_darwin_packages = qrencode qrencode_mingw32_packages = qrencode ifneq ($(host_os),ios) ifneq ($(host_os),android) packages += libevent libcryptopp endif endif ios_packages = qrencode djinni libcryptoppunity libevent ifeq ($(host_os),android) packages += libcryptoppunity protobufunity endif bdb_packages=bdb zmq_packages=zeromq upnp_packages=miniupnpc natpmp_packages=libnatpmp multiprocess_packages = libmultiprocess capnp multiprocess_native_packages = native_libmultiprocess native_capnp usdt_linux_packages=systemtap darwin_native_packages = native_ds_store native_mac_alias ifneq ($(build_os),darwin) darwin_native_packages += native_cctools native_libtapi ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) darwin_native_packages+= native_clang endif endif ================================================ FILE: depends/packages/protobufunity.mk ================================================ package=protobuf $(package)_version=2.6.1 $(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version) $(package)_file_name=protobuf-$($(package)_version).tar.bz2 $(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 $(package)_cxxflags=-std=c++11 define $(package)_set_vars $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc $(package)_config_opts_linux=--with-pic $(package)_config_opts_android=--with-pic endef define $(package)_config_cmds $($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) -C src libprotobuf.la endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA endef define $(package)_postprocess_cmds rm lib/libprotoc.a && \ rm lib/*.la endef ================================================ FILE: depends/packages/qrencode.mk ================================================ package=qrencode $(package)_version=3.4.4 $(package)_download_path=https://fukuchi.org/works/qrencode/ $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 define $(package)_set_vars $(package)_config_opts=--disable-shared -without-tools --disable-sdltest $(package)_config_opts_linux=--with-pic $(package)_config_opts_aarch64_ios=--host aarch64-darwin $(package)_config_opts_x86_64_ios=--host x86_64-darwin endef define $(package)_preprocess_cmds cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use endef define $(package)_config_cmds $($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef ================================================ FILE: depends/packages/rapidcheck.mk ================================================ package=rapidcheck $(package)_version=3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3 $(package)_download_path=https://github.com/emil-e/rapidcheck/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=5fbf82755c9a647127e62563be079448ff8b1db9ca80a52a673dd9a88fdb714b define $(package)_config_cmds cmake -DCMAKE_INSTALL_PREFIX=$($(package)_staging_dir)$(host_prefix) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -DRC_INSTALL_ALL_EXTRAS=ON endef define $(package)_build_cmds $(MAKE) rapidcheck endef define $(package)_stage_cmds $(MAKE) rapidcheck install endef ================================================ FILE: depends/packages/zeromq.mk ================================================ package=zeromq $(package)_version=4.3.4 $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 $(package)_patches=remove_libstd_link.patch netbsd_kevent_void.patch define $(package)_set_vars $(package)_config_opts = --without-docs --disable-shared --disable-valgrind $(package)_config_opts += --disable-perf --disable-curve-keygen --disable-curve --disable-libbsd $(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci $(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking $(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking $(package)_config_opts_linux=--with-pic $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic $(package)_cxxflags+=-std=c++17 endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch && \ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config endef define $(package)_config_cmds ./autogen.sh && \ $($(package)_autoconf) endef define $(package)_build_cmds $(MAKE) src/libzmq.la endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA endef define $(package)_postprocess_cmds rm -rf bin share lib/*.la endef ================================================ FILE: depends/packages/zlib.mk ================================================ package=zlib $(package)_version=1.2.11 $(package)_download_path=http://www.zlib.net/fossils/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 $(package)_patches=mingw.patch define $(package)_set_vars $(package)_build_opts= CC="$($(package)_cc)" $(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC" $(package)_build_opts+=RANLIB="$($(package)_ranlib)" $(package)_build_opts+=AR="$($(package)_ar)" $(package)_build_opts_darwin+=AR="$($(package)_libtool)" $(package)_build_opts_darwin+=ARFLAGS="-o" endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/mingw.patch endef define $(package)_config_cmds ./configure --static --prefix=$(host_prefix) endef define $(package)_build_cmds $(MAKE) $($(package)_build_opts) libz.a endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts) endef ================================================ FILE: depends/packages.md ================================================ Each recipe consists of 3 main parts: defining identifiers, setting build variables, and defining build commands. 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 bitcoin binaries/libraries (i.e. those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't need to be shared and should be built statically whenever possible. See [below](#secondary-dependencies) for more details. ## Identifiers Each package is required to define at least these variables: $(package)_version: Version of the upstream library or program. If there is no version, a placeholder such as 1.0 can be used. $(package)_download_path: Location of the upstream source, without the file-name. Usually http, https or ftp. Secure transmission options like https should be preferred if available. $(package)_file_name: The upstream source filename available at the download path. $(package)_sha256_hash: The sha256 hash of the upstream file These variables are optional: $(package)_build_subdir: cd to this dir before running configure/build/stage commands. $(package)_download_file: The file-name of the upstream source if it differs from how it should be stored locally. This can be used to avoid storing file-names with strange characters. $(package)_dependencies: Names of any other packages that this one depends on. $(package)_patches: Filenames of any patches needed to build the package $(package)_extra_sources: Any extra files that will be fetched via $(package)_fetch_cmds. These are specified so that they can be fetched and verified via 'make download'. ## Build Variables: After defining the main identifiers, build variables may be added or customized before running the build commands. They should be added to a function called $(package)_set_vars. For example: define $(package)_set_vars ... endef Most variables can be prefixed with the host, architecture, or both, to make the modifications specific to that case. For example: Universal: $(package)_cc=gcc Linux only: $(package)_linux_cc=gcc x86_64 only: $(package)_x86_64_cc = gcc x86_64 linux only: $(package)_x86_64_linux_cc = gcc These variables may be set to override or append their default values. $(package)_cc $(package)_cxx $(package)_objc $(package)_objcxx $(package)_ar $(package)_ranlib $(package)_libtool $(package)_nm $(package)_cflags $(package)_cxxflags $(package)_ldflags $(package)_cppflags $(package)_config_env $(package)_build_env $(package)_stage_env $(package)_build_opts $(package)_config_opts The *_env variables are used to add environment variables to the respective commands. Many variables respect a debug/release suffix as well, in order to use them for only the appropriate build config. For example: $(package)_cflags_release = -O3 $(package)_cflags_i686_debug = -g $(package)_config_opts_release = --disable-debug These will be used in addition to the options that do not specify debug/release. All builds are considered to be release unless DEBUG=1 is set by the user. Other variables may be defined as needed. ## Build commands: For each build, a unique build dir and staging dir are created. For example, `work/build/mylib/1.0-1adac830f6e` and `work/staging/mylib/1.0-1adac830f6e`. The following build commands are available for each recipe: $(package)_fetch_cmds: Runs from: build dir Fetch the source file. If undefined, it will be fetched and verified against its hash. $(package)_extract_cmds: Runs from: build dir Verify the source file against its hash and extract it. If undefined, the source is assumed to be a tarball. $(package)_preprocess_cmds: Runs from: build dir/$(package)_build_subdir Preprocess the source as necessary. If undefined, does nothing. $(package)_config_cmds: Runs from: build dir/$(package)_build_subdir Configure the source. If undefined, does nothing. $(package)_build_cmds: Runs from: build dir/$(package)_build_subdir Build the source. If undefined, does nothing. $(package)_stage_cmds: Runs from: build dir/$(package)_build_subdir Stage the build results. If undefined, does nothing. The following variables are available for each recipe: $(1)_staging_dir: package's destination sysroot path $(1)_staging_prefix_dir: prefix path inside of the package's staging dir $(1)_extract_dir: path to the package's extracted sources $(1)_build_dir: path where configure/build/stage commands will be run $(1)_patch_dir: path where the package's patches (if any) are found Notes on build commands: For packages built with autotools, $($(package)_autoconf) can be used in the configure step to (usually) correctly configure automatically. Any $($(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 bitcoin binaries/libraries (i.e. those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't need to be shared and should be built statically whenever possible. This 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 `libsecondary`, that's not our concern. With a static `libsecondary`, when we need to link `libprimary` into our executable, there's no dependency chain to worry about as `libprimary` has all the symbols. ## Build targets: To build an individual package (useful for debugging), following build targets are available. make ${package} make ${package}_fetched make ${package}_extracted make ${package}_preprocessed make ${package}_configured make ${package}_built make ${package}_staged make ${package}_postprocessed make ${package}_cached make ${package}_cached_checksum ================================================ FILE: depends/patches/electron_node_headers/node.def ================================================ LIBRARY node.exe EXPORTS uv_default_loop uv_queue_work napi_acquire_threadsafe_function napi_add_env_cleanup_hook napi_add_finalizer napi_adjust_external_memory napi_async_destroy napi_async_init napi_call_function napi_call_threadsafe_function napi_cancel_async_work napi_close_callback_scope napi_close_escapable_handle_scope napi_close_handle_scope napi_coerce_to_bool napi_coerce_to_number napi_coerce_to_object napi_coerce_to_string napi_create_array napi_create_array_with_length napi_create_arraybuffer napi_create_async_work napi_create_bigint_int64 napi_create_bigint_uint64 napi_create_bigint_words napi_create_buffer napi_create_buffer_copy napi_create_dataview napi_create_date napi_create_double napi_create_error napi_create_external napi_create_external_arraybuffer napi_create_external_buffer napi_create_function napi_create_int32 napi_create_int64 napi_create_object napi_create_promise napi_create_range_error napi_create_reference napi_create_string_latin1 napi_create_string_utf16 napi_create_string_utf8 napi_create_symbol napi_create_threadsafe_function napi_create_type_error napi_create_typedarray napi_create_uint32 napi_define_class napi_define_properties napi_delete_async_work napi_delete_element napi_delete_property napi_delete_reference napi_detach_arraybuffer napi_escape_handle napi_fatal_error napi_fatal_exception napi_get_and_clear_last_exception napi_get_array_length napi_get_arraybuffer_info napi_get_boolean napi_get_buffer_info napi_get_cb_info napi_get_dataview_info napi_get_date_value napi_get_element napi_get_global napi_get_instance_data napi_get_last_error_info napi_get_named_property napi_get_new_target napi_get_node_version napi_get_null napi_get_property napi_get_property_names napi_get_prototype napi_get_reference_value napi_get_threadsafe_function_context napi_get_typedarray_info napi_get_undefined napi_get_uv_event_loop napi_get_value_bigint_int64 napi_get_value_bigint_uint64 napi_get_value_bigint_words napi_get_value_bool napi_get_value_double napi_get_value_external napi_get_value_int32 napi_get_value_int64 napi_get_value_string_latin1 napi_get_value_string_utf16 napi_get_value_string_utf8 napi_get_value_uint32 napi_get_version napi_has_element napi_has_named_property napi_has_own_property napi_has_property napi_instanceof napi_is_array napi_is_arraybuffer napi_is_buffer napi_is_dataview napi_is_date napi_is_detached_arraybuffer napi_is_error napi_is_exception_pending napi_is_promise napi_is_typedarray napi_make_callback napi_module_register napi_new_instance napi_open_callback_scope napi_open_escapable_handle_scope napi_open_handle_scope napi_queue_async_work napi_ref_threadsafe_function napi_reference_ref napi_reference_unref napi_reject_deferred napi_release_threadsafe_function napi_remove_env_cleanup_hook napi_remove_wrap napi_resolve_deferred napi_run_script napi_set_element napi_set_instance_data napi_set_named_property napi_set_property napi_strict_equals napi_throw napi_throw_error napi_throw_range_error napi_throw_type_error napi_typeof napi_unref_threadsafe_function napi_unwrap napi_wrap ================================================ FILE: depends/sdk.guess ================================================ #! /bin/sh # Attempt to guess an SDK path for MacOS # Copyright 2019-2022 The Centure developers # Originally written by Malcolm MacLeod (mmacleod@gmx.com) if [ -d "$1/SDKs" ]; then echo "$1/SDKs" exit 0 fi if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" ]; then echo "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" exit 0 fi if [ -d "/Library/Developer/CommandLineTools/SDKs/" ]; then echo "/Library/Developer/CommandLineTools/SDKs/" exit 0 fi exit 0 ================================================ FILE: developer-tools/README.md ================================================ Developer tools --------------------- This directory, and sub-directories, contain various scripts that are not a core part of the repository itself, but aid developers with working with maintaining the repository, or building the repository for specific configurations and so forth. * build_docker.sh - Build Munt/Munt-daemon binaries inside a docker container * build_node.sh - Build a copy of the Munt core "unity" library that can be used from node/electron applications * build_android_core.sh - Build a copy of the Munt core "unity" library that can be used from android applications * build_ios_core.sh - Build a copy of the Munt core "unity" library that can be used from ios applications * gencheckpoints.sh - Generate updated/recent checkpoints to be used for new builds (result must be manually pasted into chainparams.cpp as appropriate) * genbootstrap.sh - Build a bootstrap file up until most recent blocks; If an existing checkpoint file exists then it will update the existing file instead of starting from genesis each time. * update_translations.sh - Sync the translation strings with the latest from translate.munt.org (bi-directional) Settings --------------------- ### private.conf.example ### All developer tools scripts make use of a single configuration file 'private.conf' in which developer specific settings/preferences can be set. 'private.conf' is included in .gitignore to prevent accidental commit to the repository. 'private.conf'example' serves as an easy reference of all possible options that can be set, new developers can copy this to create 'private.conf' and then alter options as needed. When adding new options to scripts please also add them to 'private.conf.example' to keep it complete. Adding/Developing new scripts --------------------- New scripts should be a bash shell script (.sh) that sources `private.conf`. It is okay to use other language such as python to do the bulk of the work, many of the existing scripts already do this, in such a case just place the `.py` part of the script in an appropriate place (e.g. python sub-folder) and have a wrapper `.sh` that sets things up. ================================================ FILE: developer-tools/build_docker.sh ================================================ #! /bin/bash set -e #Set up docker container cd developer-tools/docker-build docker build -t nlg-build . #Run the build cd ../../ docker run -it --mount type=bind,src=$PWD,dst=/work -w /work nlg-build ================================================ FILE: developer-tools/build_node.sh ================================================ #! /bin/bash set -e set -x NUM_PROCS=$(getconf _NPROCESSORS_ONLN) DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" PLATFORM=`./depends/config.guess` PLATFORM_VENDOR=`./depends/config.guess | cut -d- -f2` PLATFORM_OS=`./depends/config.guess | cut -d- -f3` if test -f developer-tools/private.conf; then source developer-tools/private.conf fi export CXXFLAGS="-fPIC -fdata-sections -ffunction-sections -fomit-frame-pointer -DNAPI_VERSION=5 -DDJINNI_NODEJS -D_HAS_EXCEPTIONS=1" export CFLAGS=${CXXFLAGS} if [ ${PLATFORM_VENDOR} = "apple" ]; then export LDFLAGS="-fPIC -Bsymbolic -Wl,-undefined -Wl,dynamic_lookup" else if [ ${PLATFORM_OS} = "mingw32" ] || [ ${PLATFORM_OS} = "mingw64" ]; then export LDFLAGS="-fPIC -Bsymbolic -L${DIR}/../build_node -lnode -Wl,--gc-sections" export EXTRA_CXX_FLAGS="-DNODE_HOST_BINARY=node.exe -DUSING_UV_SHARED=1 -DUSING_V8_SHARED=1 -DV8_DEPRECATION_WARNINGS=1 -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DBUILDING_NODE_EXTENSION -D_WINDLL" else export LDFLAGS="-fPIC -Bsymbolic -Wl,--gc-sections" fi fi cd depends make NO_QT=1 NO_UPNP=1 EXTRA_PACKAGES='qrencode node_addon_api electron_node_headers' -j ${NUM_PROCS} cd .. mkdir build_node | true cd build_node export CXXFLAGS="${CXXFLAGS} -I$PWD/../depends/${PLATFORM}/include/node -I$PWD/../depends/${PLATFORM}/include/node-addon-api ${EXTRA_CXX_FLAGS} -O2" export CFLAGS=${CXXFLAGS} ../autogen.sh #NB! Important to pass exmpty config.site here; otherwise msys2 has a default config.site that messes with (overrides) our own from the depends directory... CONFIG_SITE='' ../configure --prefix=$PWD/../depends/${PLATFORM} --disable-bench --disable-tests --disable-man --disable-zmq --without-utils --without-daemon --with-node-js-libs --with-qrencode --with-gui=no make V=1 -j ${NUM_PROCS} cd .. if test -f "build_node/src/.libs/lib_unity_node_js-0.dll"; then cp build_node/src/.libs/lib_unity_node_js-0.dll src/frontend/electron_sample/lib_unity.node cp build_node/src/.libs/lib_unity_node_js-0.dll src/frontend/electron_vue/src/unity/lib_unity.node cp build_node/src/.libs/lib_unity_node_js-0.dll src/frontend/lite/src/unity/lib_unity.node elif test -f "build_node/src/.libs/lib_unity_node_js.so"; then cp build_node/src/.libs/lib_unity_node_js.so src/frontend/electron_sample/lib_unity.node cp build_node/src/.libs/lib_unity_node_js.so src/frontend/electron_vue/src/unity/lib_unity.node cp build_node/src/.libs/lib_unity_node_js.so src/frontend/lite/src/unity/lib_unity.node fi ================================================ FILE: developer-tools/djinni_generate_bindings.sh ================================================ #!/bin/bash DJINNI_REPO=https://github.com/mjmacleod/djinni.git if [ ! -d djinni ]; then git clone --single-branch --branch gulden ${DJINNI_REPO} else cd djinni git pull origin cd .. fi rm -rf src/unity/djinni/* rm -rf src/frontend/android/unity_wallet/app/src/main/java/unity_wallet/jniunifiedbackend/* djinni/src/run \ --java-out ./src/frontend/android/unity_wallet/app/src/main/java/unity_wallet/jniunifiedbackend/ \ --java-package unity_wallet.jniunifiedbackend \ --java-implement-android-os-parcelable true \ --ident-java-field mFooBar \ --jni-out src/unity/djinni/jni/ \ --ident-jni-class NativeFooBar \ --ident-jni-file NativeFooBar \ --objc-out src/unity/djinni/objc/ \ --objc-type-prefix DB \ --objcpp-out src/unity/djinni/objc/ \ --node-out src/unity/djinni/node_js/ \ --node-package unifiedbackend \ --node-type-prefix NJS \ --cpp-out src/unity/djinni/cpp/ \ --idl src/unity/libunity.djinni mkdir src/unity/djinni/support-lib cp -rf djinni/support-lib/* src/unity/djinni/support-lib/ ================================================ FILE: developer-tools/docker-build/Dockerfile ================================================ # Build Munt () # # VERSION 0.1 FROM ubuntu:18.04 # Generic build tools RUN apt-get update && apt-get install -y \ build-essential \ libtool \ autotools-dev \ automake \ pkg-config \ bsdmainutils \ curl \ git \ ca-certificates \ ccache \ gawk \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # SDK prerequisites RUN apt-get update && apt-get install -y \ libqrencode-dev \ libminiupnpc-dev \ python3-zmq \ protobuf-compiler \ libdbus-1-dev \ libharfbuzz-dev \ libprotobuf-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* ADD *.sh /root/ CMD /root/build.sh ================================================ FILE: developer-tools/docker-build/README.md ================================================ # Docker image to compile the Munt binaries The build is for test and development purposes, the official binaries are build with guix and not this image. This image closely matches the [Travis build](https://travis-ci.org/Munt/munt-official/) ## Using this image Pull the Munt repository and run this image on it, like so: ``` git clone https://github.com/Munt/munt-official cd munt-official docker run -it --mount type=bind,src=$PWD,dst=/work -w /work robobit/nlg-build ``` This will pull the image from Docker hub, if you rather build your own: ``` git clone https://github.com/Munt/munt-official cd munt-official/developer-tools/docker-build docker build -t nlg-build . docker run -it --mount type=bind,src=$PWD,dst=/work -w /work nlg-build ``` ================================================ FILE: developer-tools/docker-build/build.sh ================================================ #!/bin/bash MAKEJOBS=-j3 HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_UPNP=1 ALLOW_HOST_PACKAGES=1" make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS ./autogen.sh mkdir -p build/$HOST && cd build/$HOST ../../configure LDFLAGS="-static-libstdc++" --cache-file=config.cache --prefix=/work/depends/$HOST --enable-werror --enable-zmq --enable-reduce-exports make $MAKEJOBS ================================================ FILE: developer-tools/genbootstrap.sh ================================================ #! /bin/bash set -e source developer-tools/private.conf python developer-tools/python/genbootstrap.py echo "compress bootstrap" xz -zkfe9T0 ${BOOTSTRAP_FILENAME} echo "done compressing bootstrap" ================================================ FILE: developer-tools/gencheckpoints.sh ================================================ #! /bin/bash set -e #Fetch our private configuration variables and then hand the rest of the work off to python script source developer-tools/private.conf python developer-tools/python/gencheckpoints.py > src/data/chainparams_mainnet_static_checkpoint_data.cpp ================================================ FILE: developer-tools/genstaticdiffs.sh ================================================ #! /bin/bash set -e #Fetch our private configuration variables and then hand the rest of the work off to python script source developer-tools/private.conf HEIGHT=$(python developer-tools/python/genstaticdiffs.py) sed -i 's/const int32_t nMaxHeight =.*/const int32_t nMaxHeight = '${HEIGHT}';/g' src/pow/diff_old.cpp sed -ri 's/nOldDiffSwitchoverBlock =([^,]+).*/nOldDiffSwitchoverBlock =\1, '${HEIGHT}');/g' src/pow/diff_common.cpp sed -i 's/ //g' ${STATICDIFF_FILENAME} ================================================ FILE: developer-tools/genstaticfilters.sh ================================================ #! /bin/bash set -e #Fetch our private configuration variables and then hand the rest of the work off to python script source developer-tools/private.conf $(python developer-tools/python/genstaticfilters.py) ================================================ FILE: developer-tools/mobile/android/build_android_core.sh ================================================ #! /bin/bash set -e set -x #Load NDK config source `dirname $0`/ndk_definitions.conf #Load private config MUNT_DEVTOOLS_CONF=${MUNT_DEVTOOLS_CONF:-developer-tools/private.conf} if [ -f $MUNT_DEVTOOLS_CONF ]; then source ${MUNT_DEVTOOLS_CONF} fi TARGETS_PATH=$(dirname ${BASH_SOURCE[0]})/build_targets while :; do case $1 in --nodepends) SKIP_DEPENDS=1 ;; --noconfig) SKIP_CONFIG=1 ;; --targets) shift delimiter="," s=$1$delimiter NDK_TARGETS=(); while [[ $s ]]; do NDK_TARGETS+=( ${TARGETS_PATH}/"${s%%"$delimiter"*}" ); s=${s#*"$delimiter"}; done; declare -p NDK_TARGETS ;; *) # Default case: No more options, so break out of the loop. break esac shift done if [ -z "${NDK_TARGETS}" ]; then NDK_TARGETS=( ${TARGETS_PATH}/* ) declare -p NDK_TARGETS fi mkdir src/frontend/android/unity_wallet/app/src/main/jniLibs | true NUM_PROCS=$(getconf _NPROCESSORS_ONLN) DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ASSETS=src/frontend/android/unity_wallet/app/src/main/assets mkdir ${ASSETS} | true mkdir ${ASSETS}Mainnet | true mkdir ${ASSETS}Testnet | true cp src/data/staticfiltercp ${ASSETS}Mainnet/staticfiltercp cp src/data/staticfiltercptestnet ${ASSETS}Testnet/staticfiltercp cp src/data/core-packages.licenses ${ASSETS}/core-packages.licenses export NDK_ROOT=${NDK_ROOT:-${PWD}/developer-tools/android-ndk/${NDK_VERSION}} case "$OSTYPE" in darwin*) BUILD_PLATFORM=darwin-x86_64 ;; *) BUILD_PLATFORM=linux-x86_64 ;; esac PREBUILT=${NDK_ROOT}/toolchains/llvm/prebuilt/${BUILD_PLATFORM} LIB_DIR=${PREBUILT}/sysroot/usr/lib TOOLS=${PREBUILT}/bin if [ -z "$SKIP_CONFIG" ] then ./autogen.sh else echo Skipping autogen fi for i in "${NDK_TARGETS[@]}" do source ${i} export AR=${TOOLS}/llvm-ar export AS=${TOOLS}/$target_host-as export CC=${TOOLS}/${clang_prefix}${ANDROID_LEVEL}-clang export CXX=${TOOLS}/${clang_prefix}${ANDROID_LEVEL}-clang++ export LD=${TOOLS}/llvm-ld export STRIP=${TOOLS}/llvm-strip export RANLIB=${TOOLS}/llvm-ranlib export LIBTOOL=libtool # build with debug symbols, android studio will take care of split-debug and stripping export CXXFLAGS="-O3 -fPIC -fdata-sections -ffunction-sections -fomit-frame-pointer ${march_flags} -DANDROID_STL=c++_shared -DEXPERIMENTAL_AUTO_CPP_THREAD_ATTACH ${target_opt_cflags} -g3" #visibility=hidden export CFLAGS=${CXXFLAGS} export LDFLAGS="-fPIC -Bsymbolic -Wl,--no-undefined -Wl,--gc-sections -Wl,--build-id" if [ -z "$SKIP_DEPENDS" ] then cd depends make HOST=$target_host NO_QT=1 NO_UPNP=1 EXTRA_PACKAGES='qrencode protobufunity' -j ${NUM_PROCS} cd .. else echo Skipping depends fi export TARGET_OS=android mkdir build_android_${target_host} | true cd build_android_${target_host} if [ -z "$SKIP_CONFIG" ] then ../configure --prefix=$PWD/../depends/$target_host ac_cv_c_bigendian=no ac_cv_sys_file_offset_bits=$target_bits --host=$target_host --disable-bench --enable-experimental-asm --disable-tests --disable-man --disable-zmq --without-utils --with-libs --without-daemon --with-jni-libs --with-qrencode --with-node-js-libs=no else echo Skipping explicit configure fi make V=1 -j ${NUM_PROCS} V=1 cd .. mkdir src/frontend/android/unity_wallet/app/src/main/jniLibs/${jni_lib} | true cp build_android_${target_host}/src/.libs/lib_unity_jni.so src/frontend/android/unity_wallet/app/src/main/jniLibs/${jni_lib}/ cp ${LIB_DIR}/${target_host}/libc++_shared.so src/frontend/android/unity_wallet/app/src/main/jniLibs/${jni_lib}/ done ================================================ FILE: developer-tools/mobile/android/build_targets/aarch64-linux-android-clang ================================================ clang_prefix=aarch64-linux-android target_host=aarch64-linux-android target_bits=64 jni_lib=arm64-v8a lib_dir=sysroot/usr/lib march_flags="-O3" target_opt_cflags="-DCRYPTOPP_ARM_ACLE_AVAILABLE -D__ARM_FEATURE_CRC32" ================================================ FILE: developer-tools/mobile/android/build_targets/arm-linux-androideabi-clang ================================================ clang_prefix=armv7a-linux-androideabi target_host=arm-linux-androideabi target_bits=32 jni_lib=armeabi-v7a lib_dir=sysroot/usr/lib march_flags="-mthumb -O3" target_opt_cflags=-DCRYPTOPP_ARM_ACLE_AVAILABLE ================================================ FILE: developer-tools/mobile/android/build_targets/x86-clang ================================================ clang_prefix=i686-linux-android target_host=i686-linux-android target_bits=32 jni_lib=x86 lib_dir=sysroot/usr/lib march_flags="-march=i686 -mtune=i686 -mssse3 -mfpmath=sse -m32" target_opt_cflags= ================================================ FILE: developer-tools/mobile/android/build_targets/x86_64-clang ================================================ clang_prefix=x86_64-linux-android target_host=x86_64-linux-android target_bits=64 jni_lib=x86_64 lib_dir=sysroot/usr/lib march_flags="-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=x86-64" target_opt_cflags= ================================================ FILE: developer-tools/mobile/android/fetch_android.sh ================================================ #!/bin/bash set -e set -x #Load NDK config source `dirname $0`/ndk_definitions.conf #Load private config source developer-tools/private.conf case "$OSTYPE" in darwin*) PLATFORM=darwin ;; *) PLATFORM=linux ;; esac export NDK_FILENAME=${NDK_VERSION}-${PLATFORM}.zip #sha256_file=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd mkdir ./developer-tools/android-ndk | true cd ./developer-tools/android-ndk curl -sSO https://dl.google.com/android/repository/${NDK_FILENAME} &> /dev/null #echo "${sha256_file} ${NDK_FILENAME}" | shasum -a 256 --check unzip -qq ${NDK_FILENAME} &> /dev/null rm ${NDK_FILENAME} cd - ================================================ FILE: developer-tools/mobile/android/ndk_definitions.conf ================================================ NDK_VERSION=android-ndk-r23b ANDROID_LEVEL=21 ================================================ FILE: developer-tools/mobile/ios/build_ios_core.sh ================================================ #! /bin/bash set -e set -x NPROC=`sysctl -n hw.physicalcpu` export CXXFLAGS="-O3" export CFLAGS=${CXXFLAGS} for i in $( dirname ${BASH_SOURCE[0]} )/build_targets/* do source ${i} cd depends make HOST=$target_host NO_ZMQ=1 NO_QT=1 NO_UPNP=1 -j $NPROC cd .. mkdir -p build/${target_host} cd build/${target_host} ../../autogen.sh ../../configure --prefix=$PWD/../../depends/$target_host --host=$target_host --disable-bench --enable-experimental-asm --disable-tests --disable-man --disable-zmq --without-utils --without-daemon --with-objc-libs --with-qrencode make -j $NPROC cd ../.. done ================================================ FILE: developer-tools/mobile/ios/build_targets/aarch64 ================================================ target_host=aarch64-ios ================================================ FILE: developer-tools/mobile/ios/build_targets/x86_64 ================================================ target_host=x86_64-ios ================================================ FILE: developer-tools/mobile/thirdparty.licenses.sh ================================================ #! /bin/bash set -e set -x OUTPUT=./src/data/core-packages.licenses echo "" > $OUTPUT echo "-- LevelDB" >> $OUTPUT cat ./src/leveldb/LICENSE >> $OUTPUT echo "-- QFontIcon" >> $OUTPUT cat ./src/qt/qfonticon/License.md >> $OUTPUT echo "-- QFontIcon" >> $OUTPUT cat ./src/qt/qfonticon/License.md >> $OUTPUT echo "-- scrypt" >> $OUTPUT cat ./src/crypto/scrypt/COPYING >> $OUTPUT echo "-- ctaes" >> $OUTPUT cat ./src/crypto/ctaes/COPYING >> $OUTPUT echo "-- libsecp256k1" >> $OUTPUT cat ./src/secp256k1/COPYING >> $OUTPUT echo "-- LRUCache11" >> $OUTPUT cat ./src/LRUCache/COPYING >> $OUTPUT echo "-- UniValue" >> $OUTPUT cat ./src/univalue/COPYING >> $OUTPUT echo "-- libqrencode" >> $OUTPUT cat <> $OUTPUT Copyright (C) 2006-2018 Kentaro Fukuchi This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA EOT echo "-- Bitcoin Core" >> $OUTPUT cat <> $OUTPUT The MIT License (MIT) Copyright (c) 2009-2019 The Bitcoin Core developers Copyright (c) 2009-2019 Bitcoin Developers 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 OR COPYRIGHT HOLDERS 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. EOT ================================================ FILE: developer-tools/node/node.def ================================================ LIBRARY node.exe EXPORTS uv_default_loop uv_queue_work napi_acquire_threadsafe_function napi_add_env_cleanup_hook napi_add_finalizer napi_adjust_external_memory napi_async_destroy napi_async_init napi_call_function napi_call_threadsafe_function napi_cancel_async_work napi_close_callback_scope napi_close_escapable_handle_scope napi_close_handle_scope napi_coerce_to_bool napi_coerce_to_number napi_coerce_to_object napi_coerce_to_string napi_create_array napi_create_array_with_length napi_create_arraybuffer napi_create_async_work napi_create_bigint_int64 napi_create_bigint_uint64 napi_create_bigint_words napi_create_buffer napi_create_buffer_copy napi_create_dataview napi_create_date napi_create_double napi_create_error napi_create_external napi_create_external_arraybuffer napi_create_external_buffer napi_create_function napi_create_int32 napi_create_int64 napi_create_object napi_create_promise napi_create_range_error napi_create_reference napi_create_string_latin1 napi_create_string_utf16 napi_create_string_utf8 napi_create_symbol napi_create_threadsafe_function napi_create_type_error napi_create_typedarray napi_create_uint32 napi_define_class napi_define_properties napi_delete_async_work napi_delete_element napi_delete_property napi_delete_reference napi_detach_arraybuffer napi_escape_handle napi_fatal_error napi_fatal_exception napi_get_and_clear_last_exception napi_get_array_length napi_get_arraybuffer_info napi_get_boolean napi_get_buffer_info napi_get_cb_info napi_get_dataview_info napi_get_date_value napi_get_element napi_get_global napi_get_instance_data napi_get_last_error_info napi_get_named_property napi_get_new_target napi_get_node_version napi_get_null napi_get_property napi_get_property_names napi_get_prototype napi_get_reference_value napi_get_threadsafe_function_context napi_get_typedarray_info napi_get_undefined napi_get_uv_event_loop napi_get_value_bigint_int64 napi_get_value_bigint_uint64 napi_get_value_bigint_words napi_get_value_bool napi_get_value_double napi_get_value_external napi_get_value_int32 napi_get_value_int64 napi_get_value_string_latin1 napi_get_value_string_utf16 napi_get_value_string_utf8 napi_get_value_uint32 napi_get_version napi_has_element napi_has_named_property napi_has_own_property napi_has_property napi_instanceof napi_is_array napi_is_arraybuffer napi_is_buffer napi_is_dataview napi_is_date napi_is_detached_arraybuffer napi_is_error napi_is_exception_pending napi_is_promise napi_is_typedarray napi_make_callback napi_module_register napi_new_instance napi_open_callback_scope napi_open_escapable_handle_scope napi_open_handle_scope napi_queue_async_work napi_ref_threadsafe_function napi_reference_ref napi_reference_unref napi_reject_deferred napi_release_threadsafe_function napi_remove_env_cleanup_hook napi_remove_wrap napi_resolve_deferred napi_run_script napi_set_element napi_set_instance_data napi_set_named_property napi_set_property napi_strict_equals napi_throw napi_throw_error napi_throw_range_error napi_throw_type_error napi_typeof napi_unref_threadsafe_function napi_unwrap napi_wrap ================================================ FILE: developer-tools/private.conf.example ================================================ # Set API key from translate.munt.org here to be able to run translation scripts #ONESKY_API_KEY= # Set this to a system or custom NDK path to have android build scripts use this as opposed to the ones fetched by fetch_android.sh #NDK_ROOT= # Comma delimited list of Android targets in mobile/android/build_targets/ for which to build the Unity library (if not set all will be build) #NDK_TARGETS= aarch64-linux-android-clang,arm-linux-androideabi-clang # Set this to 1 to skip building depends for android #SKIP_DEPENDS=1 # Set this to 1 to skip running configure for android #SKIP_CONFIG=1 # Set for gencheckpoints.py usage #CHECKPOINT_RPC_USER=xxx #CHECKPOINT_RPC_PASSWORD=yyy #CHECKPOINT_RPC_PORT=9232 #CHECKPOINT_RPC_IP=127.0.0.1 #CHECKPOINT_MSG_HEADER=fcfef7e0 ================================================ FILE: developer-tools/python/genbootstrap.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- """Generate bootstrap.dat Script will connect to Munt rpc server and fetch all blocks necessary to create a clean bootstrap.dat file The results are incremental i.e. you can re-run this periodically (if you leave the files in place) and it will update the exiting file with only the latest blocks instead of completely regenerating it First run is slow (few hours) but subsequent runs should be reasonably fast as they have much less work to do """ from bitcoinrpc.authproxy import AuthServiceProxy import sys import string import os import binascii import struct __copyright__ = 'Copyright (c) 2019-2022 The Centure developers' __license__ = 'Distributed under the GNU Lesser General Public License v3, see the accompanying file COPYING' __author__ = 'Malcolm MacLeod' __email__ = 'mmacleod@gmx.com' # ===== BEGIN USER SETTINGS ===== rpcuser=os.environ["CHECKPOINT_RPC_USER"] rpcpass=os.environ["CHECKPOINT_RPC_PASSWORD"] rpcport=os.environ["CHECKPOINT_RPC_PORT"] rpcip=os.environ["CHECKPOINT_RPC_IP"] messageheader=os.environ["CHECKPOINT_MSG_HEADER"] bootstrapfilename=os.environ["BOOTSTRAP_FILENAME"] # ====== END USER SETTINGS ====== access = AuthServiceProxy("http://"+rpcuser+":"+rpcpass+"@"+rpcip+":"+rpcport) bootstrap_start=0 try: bootstrap_file_last = open(bootstrapfilename+".pos", "r") bootstrap_start = int(bootstrap_file_last.read()); bootstrap_file_last.close() print("pre-existing bootstrap, starting from", bootstrap_start) bootstrap_file = open(bootstrapfilename, "ba") except IOError as e: print("no pre-existing bootstrap, starting from 0") bootstrap_file = open(bootstrapfilename, "wb") def print_bootstrap(height): hash = access.getblockhash(height) block_hex = access.getblock(hash, 0) block_bin = binascii.unhexlify(block_hex) bootstrap_file.write(binascii.unhexlify(messageheader)) bootstrap_file.write(struct.pack('i', len(block_bin))) bootstrap_file.write(block_bin) # generate bootstrap from genesis->chaintip-100 chain_height = access.getblockcount() last_bootstrap = chain_height - 100 h = bootstrap_start while h < last_bootstrap: if (h % 1000 == 0): print("writing block ", h) print_bootstrap(h) h = h + 1 bootstrap_file.close() bootstrap_file_last = open(bootstrapfilename+".pos", "w") bootstrap_file_last.write(str(last_bootstrap)); bootstrap_file_last.close() print("done writing bootstrap, final height: ", last_bootstrap) ================================================ FILE: developer-tools/python/gencheckpoints.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- """Generate C++ code for the compiled-in checkpoints. Script will connect to Munt rpc server. Generated code goes into chainparams.cpp """ from bitcoinrpc.authproxy import AuthServiceProxy import sys import string import os __copyright__ = 'Copyright (c) 2018-2022 The Centure developers' __license__ = 'Distributed under the GNU Lesser General Public License v3, see the accompanying file COPYING' __author__ = 'Willem de Jonge' __email__ = 'willem@isnapp.nl' # ===== BEGIN USER SETTINGS ===== rpcuser=os.environ["CHECKPOINT_RPC_USER"] rpcpass=os.environ["CHECKPOINT_RPC_PASSWORD"] rpcport=os.environ["CHECKPOINT_RPC_PORT"] rpcip=os.environ["CHECKPOINT_RPC_IP"] # ====== END USER SETTINGS ====== # code format example: # { 50000, { uint256S("0x5baeb5a5c3d5fefbb094623e85e3e16a1ea47875b5ffd1ff5a200e639908a059"), 1400560264 } }, access = AuthServiceProxy("http://"+rpcuser+":"+rpcpass+"@"+rpcip+":"+rpcport) def print_checkpoint(height): hash = access.getblockhash(height) block = access.getblock(hash) print(' {{ {height:6}, {{ uint256S(\"0x{hash}\"), {time} }} }},'.format(height=block['height'], hash=block['hash'], time=block['time'], bits=block['bits'])) # checkpoints are generated at regular intervals, in addition 2 extra checkpoints are generated # close to the tip this is a performance optimization which is most notable right after a release with new checkpoints # the extra before last checkpoint helps initial partial sync, which needs 2 checkpoints for secure initialization chain_height = access.getblockcount() last_checkpoint = chain_height - 1 * 576 extra_before_last = last_checkpoint - 2 * 576 checkpoint_period = 5000 h = 0 while h < extra_before_last: print_checkpoint(h) h = h + checkpoint_period print_checkpoint(extra_before_last) print_checkpoint(last_checkpoint) ================================================ FILE: developer-tools/python/genstaticdiffs.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- from bitcoinrpc.authproxy import AuthServiceProxy import sys import string import os __copyright__ = 'Copyright (c) 2018-2022 The Centure developers' __license__ = 'Distributed under the GNU Lesser General Public License v3, see the accompanying file COPYING' __author__ = 'Malcolm MacLeod' __email__ = 'mmacleod@gmx.com' # ===== BEGIN USER SETTINGS ===== rpcuser=os.environ["CHECKPOINT_RPC_USER"] rpcpass=os.environ["CHECKPOINT_RPC_PASSWORD"] rpcport=os.environ["CHECKPOINT_RPC_PORT"] rpcip=os.environ["CHECKPOINT_RPC_IP"] difffilename=os.environ["STATICDIFF_FILENAME"] # ====== END USER SETTINGS ====== access = AuthServiceProxy("http://"+rpcuser+":"+rpcpass+"@"+rpcip+":"+rpcport) chain_height = access.getblockcount() access.dumpdiffarray(chain_height, difffilename) print(chain_height) ================================================ FILE: developer-tools/python/genstaticfilters.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- from bitcoinrpc.authproxy import AuthServiceProxy import sys import string import os __copyright__ = 'Copyright (c) 2022 The Gulden developers' __license__ = 'Distributed under the GULDEN software license, see the accompanying file COPYING' __author__ = 'Malcolm MacLeod' __email__ = 'mmacleod@gmx.com' # ===== BEGIN USER SETTINGS ===== rpcuser=os.environ["CHECKPOINT_RPC_USER"] rpcpass=os.environ["CHECKPOINT_RPC_PASSWORD"] rpcport=os.environ["CHECKPOINT_RPC_PORT"] rpcip=os.environ["CHECKPOINT_RPC_IP"] filename=os.environ["STATICFILTER_FILENAME"] # ====== END USER SETTINGS ====== access = AuthServiceProxy("http://"+rpcuser+":"+rpcpass+"@"+rpcip+":"+rpcport) if os.path.exists(filename): os.remove(filename) access.dumpfiltercheckpoints(filename) ================================================ FILE: doc/.gitignore ================================================ Doxyfile ================================================ FILE: doc/Doxyfile.in ================================================ # Doxyfile 1.8.12 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "Munt Core" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "P2P Digital Currency" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = doc/munt_logo_doxygen.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = doc/doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 0. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 0 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.f90 \ *.f \ *.for \ *.vhd \ *.vhdl # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = src/leveldb \ src/json \ src/test # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = boost \ google # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.munt.Munt-Core # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.munt.Munt-Core # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /