Commit Graph

948 Commits

Author SHA1 Message Date
fanquake 26b15df99d
depends: set OSX_MIN_VERSION to 10.10 2018-07-25 07:30:27 +08:00
Wladimir J. van der Laan 4c6d1b9973
Merge #13699: contrib: correct version check
066d2973a6 contrib: correct version check (Karl-Johan Alm)

Pull request description:

  [ not(major >= 3 and minor >= 4) ] fails for '4.0':

  ```Python
  >>> major=4
  >>> minor=0
  >>> if not (major >= 3 and minor >= 5):
  ...     print('This example only works with Python 3.5 and greater')
  ...
  This example only works with Python 3.5 and greater
  ```

Tree-SHA512: 41cb8c5dabe0061ead37b0d6447b699c5d5e1a5551a75dd279bb2ec6d6afa51f8b27a48e01195093db7ec37b28ff6445d59646a4a2b6dcee37776afb60eac8dc
2018-07-18 14:51:12 +02:00
Karl-Johan Alm 066d2973a6
contrib: correct version check
[ not(major >= 3 and minor >= 4) ] fails for '4.0'
2018-07-18 16:46:19 +09:00
MarcoFalke fa7f8a7769
contrib: Clone core repo in gitian-build 2018-07-17 15:44:08 -04:00
MarcoFalke 9cdb19fe67
Merge #13623: Migrate gitian-build.sh to python
78f06e4af7 Migrate gitian-build.sh to python (Chun Kuan Lee)

Pull request description:

  Fixes #13620
  - Rename Mac OSX to MacOS, rename option from 'x' to 'm'
  - Fix a bug from b641f60425/contrib/gitian-build.sh (L338-L342)

Tree-SHA512: ff943055d5feca345bd17b64311374db3937d14d2f21493116fd7ab7b4cb7042480abd6a3d1d7640073b00bc0badb300e8dd32618bf73ba182df417c0633397a
2018-07-17 14:03:05 -04:00
Wladimir J. van der Laan 4027ec1d70
Merge #13647: Scripts and tools: Fix BIND_NOW check in security-check.py
37d363dd4a Tools: fix BIND_NOW check in security-check.py (Conrado Gouvea)

Pull request description:

  Previously, the BIND_NOW check would work only if it was the first value in FLAGS.

Tree-SHA512: 39cd83f673a6b521803be5585ada516f2db4eede718f0c5aea3377825ed1adcefed5bbb41dd9a5f24a26f7d27116cfc81bde7e26283232593b72768c5ae3d321
2018-07-17 17:14:15 +02:00
Chun Kuan Lee 78f06e4af7 Migrate gitian-build.sh to python 2018-07-16 13:01:09 +00:00
Chun Kuan Lee c1afe3232f Change gitian-descriptors to use bionic instead 2018-07-16 10:42:32 +00:00
MarcoFalke c0f1569557
Merge #13368: Update gitian-build.sh for docker
86967b2e35 Add option to use docker for gitian-build.sh (Andrew Chow)

Pull request description:

  Updates gitian-build.sh script for the docker virtualization method recently added to gitian-builder.

  Second commit depends on https://github.com/devrandom/gitian-builder/pull/185

Tree-SHA512: 0fa50b6c1be35a7a39f4a82816369637d3d0082922ac9876b80ae8156c795dec0ff34ad384b5348777042df8ddb6a72bbaeddd7002ef80557b10e2acf46632aa
2018-07-15 17:26:18 -04:00
Conrado Gouvea 37d363dd4a
Tools: fix BIND_NOW check in security-check.py
Previously, the BIND_NOW check would work only if it was the first value in FLAGS.
2018-07-12 13:16:01 -03:00
Wladimir J. van der Laan dcb154e5aa
Merge #13177: GCC-7 and glibc-2.27 back compat code
253f592909 Add stdin, stdout, stderr to ignored export list (Chun Kuan Lee)
fc6a9f2ab1 Use IN6ADDR_ANY_INIT instead of in6addr_any (Cory Fields)
908c1d7745 GCC-7 and glibc-2.27 compat code (Chun Kuan Lee)

Pull request description:

  The `__divmoddi4` code was modified from https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c . I manually find the older glibc version of log2f by objdump, use `.symver` to specify the certain version.

Tree-SHA512: e8d875652003618c73e019ccc420e7a25d46f4eaff1c7a1a6bfc1770b3b46f074b368b2cb14df541b5ab124cca41dede4e28fe863a670589b834ef6b8713f9c4
2018-07-12 17:46:29 +02:00
Jeff Frontz 85644354c5 Corrected text to reflect new[er] process of specifying fingerprints instead of individual keys. 2018-07-09 13:45:51 -04:00
DesWurstes 000000035b Obsolete #!/bin/bash shebang 2018-06-20 11:12:41 +03:00
Wladimir J. van der Laan 45c00f8416
Merge #13454: Make sure LC_ALL=C is set in all shell scripts
47776a958b Add linter: Make sure all shell scripts opt out of locale dependence using "export LC_ALL=C" (practicalswift)
3352da8da1 Add "export LC_ALL=C" to all shell scripts (practicalswift)

Pull request description:

  ~~Make sure `LC_ALL=C` is set when using `grep` range expressions.~~

  Make sure `LC_ALL=C` is set in all shell scripts.

  From the `grep(1)` documentation:

  > Within a bracket expression, a range expression consists of two characters separated by a hyphen. It matches any single character that sorts between the two characters, inclusive, using the locale's collating sequence and character set. For example, in the default C locale, `[a-d]` is equivalent to `[abcd]`. Many  locales sort characters in dictionary order, and in these locales `[a-d]` is typically not equivalent to `[abcd]`; it might be equivalent to `[aBbCcDd]`, for example. To obtain the traditional interpretation of bracket expressions, you can use the C locale by setting the `LC_ALL` environment variable to the value C.

  Context: [Locale issue found when reviewing #13450](https://github.com/bitcoin/bitcoin/pull/13450/files#r194877736)

Tree-SHA512: fd74d2612998f9b49ef9be24410e505d8c842716f84d085157fc7f9799d40e8a7b4969de783afcf99b7fae4f91bbb4559651f7dd6578a6a081a50bdea29f0909
2018-06-18 13:18:12 +02:00
Wladimir J. van der Laan a90ca4087a
Merge #13448: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python
c8176b3cc7 Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII encoding in Python (practicalswift)
634bd97001 Explicitly specify encoding when opening text files in Python code (practicalswift)

Pull request description:

  Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python.

  As requested by @laanwj in #13440.

Tree-SHA512: 1651c00fe220ceb273324abd6703aee504029b96c7ef0e3029145901762c733c9b9d24927da281394fd4681a5bff774336c04eed01fafea997bb32192c334c06
2018-06-16 15:23:14 +02:00
Loganaden Velvindron 9e2e5626da Fix CVE-2018-12356 by hardening the regex. 2018-06-15 21:45:32 +04:00
practicalswift 3352da8da1 Add "export LC_ALL=C" to all shell scripts 2018-06-14 15:27:52 +02:00
practicalswift 634bd97001 Explicitly specify encoding when opening text files in Python code 2018-06-12 21:34:52 +02:00
Wladimir J. van der Laan fa4b9065a8
Merge #13066: Migrate verify-commits script to python, run in travis
e5b2cd8e75 Use python instead of slow shell script on verify-commits (Chun Kuan Lee)

Pull request description:

  The cron job that runs every day would fail because of git checkout a single commit, not a branch.

  #12708 introduce a method to check whether merges are clean.
  However, there are four merges are not clean.
  So, I add a list of merges that are dirty and ignore them.

  Also, I modify the current shell script to python, it makes the script speed up a lot.
  The python code `tree_sha512sum` was copied from `github-merge.py`

  I've re-designed this. Now we verify all the things by default.
  - Add `--disable-tree-check` option, not to check SHA-512 tree
  - Add `--clean-merge NUMBER` option, only verify commits after <NUMBER> days ago

  Travis running time:

  |option|time|
  |-|-|
  |verify-commits.py|[25m47.02s(1547.02s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --disable-tree-check|[19m10.08s(1150.08s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --clean-merge 30|[9m18.18s(558.18s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --disable-tree-check --clean-merge 30|[1m16.51s(76.51s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|

  Since the cron job always fail, I've created a respository to verify this daily.
   [![Build Status](https://travis-ci.org/ken2812221/bitcoin-verify-commits.svg?branch=master)](https://travis-ci.org/ken2812221/bitcoin-verify-commits)

Tree-SHA512: 476bcf707d92ed3d431ca5642e013036df1506120d3dd2aa718f74240063ce856abd78f4c948336c2a6230dfe5c60c6f2d52d19bdb52d647a1c5f838eaa02e3b
2018-06-12 17:25:25 +02:00
Chun Kuan Lee e5b2cd8e75 Use python instead of slow shell script on verify-commits 2018-06-12 14:48:02 +00:00
Wladimir J. van der Laan 56f69360dc
Merge #13374: utils and libraries: checking for bitcoin address in translations
85f0135eae utils: checking for bitcoin addresses in translations (Max Kaplan)

Pull request description:

  Closes #13363

Tree-SHA512: 8509b4ab004139942c847b93d7b44096a13df8e429dd05459b430a1cf7eaef16c4906ab9dc854f4e635312e1ebb064cfab1bad97fec914c7e926c83ad45cc99b
2018-06-08 16:53:53 +02:00
Max Kaplan 85f0135eae
utils: checking for bitcoin addresses in translations
Checking for and removing any bitcoin addresses in translations
2018-06-05 07:49:21 -04:00
Giulio Lombardo 989c8990bb Rename “OS X” to the newer “macOS” convention 2018-06-04 13:04:04 +02:00
Chun Kuan Lee 253f592909 Add stdin, stdout, stderr to ignored export list 2018-06-02 19:44:33 +00:00
Andrew Chow 86967b2e35 Add option to use docker for gitian-build.sh 2018-06-01 14:04:41 -04:00
Wladimir J. van der Laan 3a8e3f4806
Merge #13340: doc: remove leftover check-doc documentation
93843f6891 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](https://github.com/bitcoin/bitcoin/pull/13281#issuecomment-392010168), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
2018-05-29 16:03:35 +02:00
Wladimir J. van der Laan e08c130c25
Merge #13320: Ensure gitian-build.sh uses bash
f44a0ebfff Ensure gitian-build.sh uses bash (Jeff Frontz)

Tree-SHA512: 88544d09015fde2c80e20c560d1e899df5dec108d89014d3f7ff182b56d7af4c29cb0a7297080bdca1cb01de69e26f31c820a47e6217f6846b0ae6e666d84fc2
2018-05-29 15:57:47 +02:00
Jeff Frontz f44a0ebfff Ensure gitian-build.sh uses bash
If the user has some other login shell (e.g., ksh), the bashisms in gitian-build.sh don't work so well.
2018-05-29 15:55:24 +02:00
fanquake 93843f6891
doc: remove leftover check-doc documentation 2018-05-29 21:49:34 +08:00
Wladimir J. van der Laan 2ac6315f44
Merge #13281: test: Move linters to test/lint, add readme
fa3c910bfe test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
2018-05-29 15:45:48 +02:00
MarcoFalke fa3c910bfe
test: Move linters to test/lint, add readme 2018-05-24 12:02:15 -04:00
MarcoFalke d792e47421
Merge #13228: Add script to detect circular dependencies between source modules
a7b295e91e Add circular dependencies script (Pieter Wuille)

Pull request description:

  This script finds dependencies between source code modules, treating the `.cpp` and `.h` file as one unit (so it will detect `A.cpp` depending on `B.h` where `B.cpp` depends on `A.h`). This can be used to find out which modules cannot be used independently from each other.

  It is very simplistic at this point, and assumes that a `.cpp` file's corresponding header has the exact same name, with `.cpp` replaced by `.h`. Furthermore, it assumes all `#include`s are relative to the `src/` directory.

  This is not a linter, and is not enforced through Travis or otherwise.

  This is the current output:

  ```
  $ ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}
  Circular dependency: chain -> pow -> chain
  Circular dependency: chainparamsbase -> util -> chainparamsbase
  Circular dependency: checkpoints -> validation -> checkpoints
  Circular dependency: init -> index/txindex -> init
  Circular dependency: init -> validation -> init
  Circular dependency: init -> net_processing -> init
  Circular dependency: init -> rpc/server -> init
  Circular dependency: init -> txdb -> init
  Circular dependency: init -> validationinterface -> init
  Circular dependency: random -> util -> random
  Circular dependency: sync -> util -> sync
  Circular dependency: txmempool -> validation -> txmempool
  Circular dependency: txmempool -> policy/fees -> txmempool
  Circular dependency: validation -> index/txindex -> validation
  Circular dependency: validation -> policy/policy -> validation
  Circular dependency: validation -> validationinterface -> validation
  Circular dependency: qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel
  Circular dependency: qt/bantablemodel -> qt/clientmodel -> qt/bantablemodel
  Circular dependency: qt/bitcoingui -> qt/walletview -> qt/bitcoingui
  Circular dependency: qt/bitcoingui -> qt/walletframe -> qt/bitcoingui
  Circular dependency: qt/bitcoingui -> qt/utilitydialog -> qt/bitcoingui
  Circular dependency: qt/clientmodel -> qt/peertablemodel -> qt/clientmodel
  Circular dependency: qt/paymentserver -> qt/walletmodel -> qt/paymentserver
  Circular dependency: qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel
  Circular dependency: qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog
  Circular dependency: qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel
  Circular dependency: qt/walletmodel -> qt/walletmodeltransaction -> qt/walletmodel
  Circular dependency: rpc/rawtransaction -> wallet/rpcwallet -> rpc/rawtransaction
  Circular dependency: wallet/coincontrol -> wallet/wallet -> wallet/coincontrol
  Circular dependency: wallet/fees -> wallet/wallet -> wallet/fees
  Circular dependency: wallet/rpcwallet -> wallet/wallet -> wallet/rpcwallet
  Circular dependency: wallet/walletdb -> wallet/wallet -> wallet/walletdb
  Circular dependency: txmempool -> validation -> policy/rbf -> txmempool
  Circular dependency: txmempool -> validation -> validationinterface -> txmempool
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/addressbookpage
  Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/guiutil
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/signverifymessagedialog -> qt/addressbookpage
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/receivecoinsdialog -> qt/addressbookpage
  Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/intro -> qt/guiutil
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/sendcoinsdialog -> qt/sendcoinsentry -> qt/addressbookpage
  ```

Tree-SHA512: 29bc985b7a41699f4666b0aaa785ca63c2145e84c37458536f4dcf8e3de8f1312cf0323fe09cb8f348a9d363583f76eac2d5bee574bc6a9f9cc97a9b0aad406f
2018-05-18 12:52:20 -04:00
Pieter Wuille a7b295e91e Add circular dependencies script 2018-05-16 16:55:47 -07:00
Cristian Mircea Messel 73cd5b25b9 [gui] Add proxy icon in statusbar 2018-05-15 23:23:56 +03:00
practicalswift 506c5785fb Enable Travis checking for two Python linting rules we are currently not violating 2018-05-11 09:18:19 +02:00
John Bampton 0d31ef4762 Enable W191 and W291 flake8 checks.
Remove trailing whitespace from Python files.
Convert tabs to spaces.
2018-05-11 07:59:05 +10:00
Andrew Chow 4d4185a4f0 Make gArgs aware of the arguments
gArgs knows what the available arguments are and their help. Getting
the help message is moved to gArgs and HelpMessage() is removed
2018-05-09 12:21:05 -04:00
Wladimir J. van der Laan bf9b03ddcc
Merge #13094: tests: Add test for 64-bit Windows PE, modify 32-bit test results
ab3f4dd tests: Add test for 64-bit PE, modify 32-bit test results (Chun Kuan Lee)

Pull request description:

  9a75d29b6f change the error result from `PIE` to `DYNAMIC_BASE`. And there are no test for 64-bit, so I made one

Tree-SHA512: 9d5643dadf4d9fc34ea32d94655bfb98eec2f7bc2820b4b0f525d5acf1cd22f3acf38bf8904dda4f50fd9ca5a5e56d566a392e6f804eea6e50e03cba40048621
2018-05-07 15:14:43 +02:00
MarcoFalke 4b75dcf0ec devtools: Make linter check LogPrint calls 2018-05-02 15:14:37 +02:00
Wladimir J. van der Laan 1408d6cf76
Revert #12769: Add systemd service to bitcoind in debian package
After discussion with Matt on IRC, this is not ready for prime time
until 2019 and shouldn't have been ACKed and merged.

- Revert "Add systemd service for bitcoind"

This reverts commit 2a87b1b07c.

- Revert "Sync contrib/debian from Matt Corallo's PPA"

This reverts commit 9085532d35.

Tree-SHA512: 439f4ccc3e196011af448b220adf26b0e653ac589bf4cfbbc276c1500c9d08f209c9d6101e4d232857779d9f25164cfb222ed30e3d63de116f9121e6ebde31c3
2018-05-01 17:05:06 +02:00
Wladimir J. van der Laan 35eb9d6c88
Merge #12769: Add systemd service to bitcoind in debian package
2a87b1b Add systemd service for bitcoind (ctp-tsteenholdt)
9085532 Sync contrib/debian from Matt Corallo's PPA (ctp-tsteenholdt)

Pull request description:

  On suggestion from @TheBlueMatt I have updated `contrib/debian` files to include a systemd service in the `bitcoind` build. Tested and working on Ubuntu 16.04 and 17.10.

  This fixes Issue #12758

Tree-SHA512: b6137fafee940c7410df1242c8716a87f47c5bc60eb8df3ad0184a50c2d67ef3f2728761c742670a0ad546ab6e7ad60472a721350cd6280b3bcbdc582e50ee07
2018-05-01 16:52:57 +02:00
MarcoFalke fa85de9ff5
Remove script to clean up datadirs
This reverts commit 33c055c4f1. (#2295)
2018-04-29 18:33:25 -04:00
Chun Kuan Lee ab3f4dd27f tests: Add test for 64-bit PE, modify 32-bit test results
9a75d29b6f change the error result from `PIE` to `DYNAMIC_BASE`. And there are no test for 64-bit, so I made one
2018-04-27 01:34:05 +08:00
ctp-tsteenholdt 2a87b1b07c Add systemd service for bitcoind
Adding systemd service for bitcoind, to provide for a simpler
out-of-the-box experience.

Configuration file is /etc/bitcoin/bitcoin.conf. This file is a
copy of the sample configuration file.

The service user 'bitcoin' is added during install. Its homedir
is in '/var/lib/bitcoin'.

bitcoind.service is disabled by default to allow the user to
configure it, before starting it the first time.

On package purge, the 'bitcoin' user as well as its homedir is
left intact, to not accidentally remove a wallet or something of
equal importance. Instead the user is presented with information
on how to perform the cleanup manually, after making sure all
important data has been backed up.
2018-04-20 08:34:12 -02:00
ctp-tsteenholdt 9085532d35 Sync contrib/debian from Matt Corallo's PPA 2018-04-20 08:31:58 -02:00
MarcoFalke 07825088f9
Merge #12972: Add python3 script shebang lint
2bff472992 [contrib] convert test-security-check to python3 (John Newbery)
958bf40489 add lint tool to check python3 shebang (practicalswift)

Pull request description:

  base58.py can executed by python3

Tree-SHA512: 30511204feefd4ccd5b4bf698fb88e516633e692dc95d31fe957b1c0c4879de25906355b28a5a0522171887315c8464a611e601ff00540db172d5bd463ee13d9
2018-04-16 16:03:22 -04:00
practicalswift 643aad17fa Enable additional flake8 rules 2018-04-16 17:25:11 +02:00
practicalswift f020aca297 Minor Python cleanups to make flake8 pass with the new rules enabled 2018-04-16 17:25:11 +02:00
John Newbery 2bff472992 [contrib] convert test-security-check to python3 2018-04-14 02:13:42 +08:00
practicalswift 958bf40489 add lint tool to check python3 shebang 2018-04-14 02:13:24 +08:00