Compare commits

...

570 Commits

Author SHA1 Message Date
luigi1111 c8214782fb
Merge pull request #9243
c4e1c5a ringct: fix trunc_amount field name change (jeffro256)
2024-03-12 12:45:35 -04:00
jeffro256 c4e1c5a640
ringct: fix trunc_amount field name change
Caused in commit 05231400ce, PR #9035.
2024-03-11 20:21:22 -05:00
luigi1111 2d855f8d67
Merge pull request #9237
bcb15d3 Revert 'http_client: reduce number of packets sent for small bodies' (jeffro256)
2024-03-11 15:55:37 -04:00
luigi1111 8e61ddb413
Merge pull request #9228
c40d8b2 depends: add riscv64 linux build tag (selsta)
2024-03-11 15:52:09 -04:00
jeffro256 bcb15d3b00
Revert "http_client: reduce number of packets sent for small bodies"
This reverts commit 0ae5c91e50.
2024-03-10 23:04:44 -05:00
selsta c40d8b213c
depends: add riscv64 linux build tag 2024-03-09 21:15:28 +01:00
luigi1111 1bec71279e
Merge pull request #9225
a01d7cc Fixed mempool pruning (SChernykh)
2024-03-08 20:27:34 -05:00
luigi1111 769202bc52
Merge pull request #9219
e6f4875 wallet2: adjust fee during backlog, fix set priority (selsta)
2024-03-08 20:26:58 -05:00
SChernykh a01d7ccbfd Fixed mempool pruning
- Fixed undefined behavior after a call to `remove_tx_from_transient_lists` (it used an invalid iterator)
- Fixed `txCompare` (it wasn't strictly weak ordered)
2024-03-08 21:04:16 +01:00
luigi1111 d6d55b507a
Merge pull request #9222
66e5081 get_block_template_backlog: better sorting logic (SChernykh)
2024-03-08 13:45:41 -05:00
luigi1111 c23951f339
Merge pull request #9218
7815023 tx_memory_pool: make double spends a no-drop offense (jeffro256)
2024-03-08 10:43:20 -05:00
SChernykh 66e5081eae get_block_template_backlog: better sorting logic
std::sort is unstable, so it can return random sets of transactions when mempool has many transactions with the same fee/byte. It can result in p2pool mining empty blocks sometimes because it doesn't pick up "new" transactions immediately.
2024-03-08 14:50:01 +01:00
selsta e6f4875219
wallet2: adjust fee during backlog, fix set priority 2024-03-08 14:13:58 +01:00
luigi1111 4b255808d0
Merge pull request #9214
399b884 unit_tests: fix strtoul unit test (jeffro256)
2024-03-07 21:37:42 -05:00
luigi1111 6ade592adf
Merge pull request #9195
2a2da79 free function serialization DSL (jeffro256)
2024-03-07 21:37:05 -05:00
luigi1111 2dced15f85
Merge pull request #9187
695084e depends: add download commands for freebsd & android sources (tobtoht)
2024-03-07 21:35:02 -05:00
luigi1111 ce88edc3f7
Merge pull request #9184
7043238 Remove instructions for Void Linux, add NixOS (Siren)
2024-03-07 21:34:39 -05:00
luigi1111 c3ebfb132f
Merge pull request #9179
e499e74 actions: update to v4 actions (tobtoht)
2024-03-07 21:34:13 -05:00
luigi1111 e2cf644bef
Merge pull request #9170
1bc09fc depends: add riscv64 to gitignore (tobtoht)
2024-03-07 21:25:00 -05:00
luigi1111 4582656f60
Merge pull request #9169
119e341 depends: remove unwind (tobtoht)
2024-03-07 21:24:30 -05:00
luigi1111 6e4ef12e50
Merge pull request #9168
0c9a5c5 depends: remove ccache (tobtoht)
2024-03-07 21:23:43 -05:00
luigi1111 1d24774b5b
Merge pull request #9167
442146a depends: libusb: update to 1.0.27 (tobtoht)
2024-03-07 21:22:17 -05:00
luigi1111 20dbf99795
Merge pull request #9166
5f1b5c2 depends: eudev: update to 3.2.14 (tobtoht)
2024-03-07 21:21:42 -05:00
jeffro256 7815023117
tx_memory_pool: make double spends a no-drop offense
Nodes who see different txs in a double spend attack will drop each other, splitting the network.
Issue found by @boog900.
2024-03-07 09:23:51 -06:00
jeffro256 399b884a9c
unit_tests: fix strtoul unit test 2024-03-07 09:05:09 -06:00
jeffro256 2a2da79943
free function serialization DSL
Example usage for Seraphis types (in global or `sp` namespace):

```
BEGIN_SERIALIZE_OBJECT_FN(sp::SpCoinbaseEnoteCore)
    FIELD_F(onetime_address)
    VARINT_FIELD_F(amount)
END_SERIALIZE()

BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteCore)
    FIELD_F(onetime_address)
    FIELD_F(amount_commitment)
END_SERIALIZE()
```
2024-02-24 11:24:47 -06:00
luigi1111 7b7958bbd9
Merge pull request #9004
cdab0d4 cmake: require libsodium (tobtoht)
684bfca depends: move sodium to packages (tobtoht)
2024-02-24 10:46:59 -05:00
tobtoht cdab0d489c
cmake: require libsodium 2024-02-24 16:26:43 +01:00
tobtoht 684bfca765
depends: move sodium to packages 2024-02-24 16:25:13 +01:00
luigi1111 9c9cb6e458
Merge pull request #9191
3313933 docs: omit i2p port number from ANONYMITY_NETWORKS (selsta)
2024-02-24 10:17:48 -05:00
luigi1111 b12766a652
Merge pull request #9189
f7670c9 cryptonote_core: early out on out of bounds scaling parameter (selsta)
2024-02-24 10:16:54 -05:00
luigi1111 7c22754432
Merge pull request #9182
538f19b depends: android_ndk: update to 18b (tobtoht)
2024-02-24 10:15:34 -05:00
luigi1111 7b8fd2d1a0
Merge pull request #9165
c334d0e depends: openssl: update to 3.0.13 (tobtoht)
2024-02-24 10:13:42 -05:00
luigi1111 7ba726c142
Merge pull request #9164
b26155b depends: expat: update to 2.6.0 (tobtoht)
2024-02-24 10:13:19 -05:00
luigi1111 b616c64953
Merge pull request #9163
edcc1e4 depends: unbound: update to 1.19.1 (tobtoht)
2024-02-24 10:12:31 -05:00
luigi1111 72d87cd10a
Merge pull request #9160
c50ade5 Daemon-specific proxy for the wallet-rpc. (0xFFFC0000)
2024-02-24 10:11:51 -05:00
luigi1111 3078e44847
Merge pull request #9155
ed50938 Zero initialize rctSigBase elements (Lee *!* Clagett)
2024-02-24 10:07:54 -05:00
luigi1111 f2493d9139
Merge pull request #9143
b1c9a80 Add <cstdint> to aligned test (Lee *!* Clagett)
2024-02-24 10:06:57 -05:00
luigi1111 486ae9f1cf
Merge pull request #9138
cd7ccfb Disable/fix ports with I2P (Lee Clagett)
2024-02-24 10:05:25 -05:00
luigi1111 7904879326
Merge pull request #9137
8d25418 daemon: warn user on specifiying ZMQ args with --no-zmq (jeffro256)
2024-02-24 10:04:56 -05:00
luigi1111 9132d4eea0
Merge pull request #9132
9cd4757 Cleanup extra memory allocation, and port boost::shared_ptr to std::shared_ptr. (0xFFFC0000)
2024-02-24 10:04:04 -05:00
luigi1111 400b313caf
Merge pull request #9128
ba902f9 actions: remove unnecessary packages (tobtoht)
2024-02-24 10:00:27 -05:00
luigi1111 c12ee59ebd
Merge pull request #9125
0c545f6 epee/test: remove levin_protocol_handler and core_proxy tests (jeffro256)
2024-02-24 09:59:50 -05:00
luigi1111 49bfb8fd63
Merge pull request #9121
afe5167 depends: update config scripts (jeffro256)
2024-02-24 09:58:59 -05:00
luigi1111 2dc918402c
Merge pull request #9006
47042ce wallet2: call on_reorg callback in handle_reorg (j-berman)
2024-02-24 09:57:55 -05:00
luigi1111 92a3b2c97e
Merge pull request #9005
0d763a1 depends: move cmake system config to hosts files (tobtoht)
2024-02-24 09:57:09 -05:00
luigi1111 b91c433788
Merge pull request #8940
48b7d08 epee binary: container can read from empty seq of any type (jeffro256)
2024-02-24 09:55:58 -05:00
luigi1111 ee104bc9d5
Merge pull request #8861
b13c5f6 wallet: feature: transfer amount with fee included (jeffro256)
2024-02-24 09:54:56 -05:00
selsta 33139336a2
docs: omit i2p port number from ANONYMITY_NETWORKS 2024-02-21 01:01:32 +01:00
jeffro256 b13c5f6669
wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:06 -06:00
selsta f7670c9387
cryptonote_core: early out on out of bounds scaling parameter 2024-02-21 00:02:27 +01:00
tobtoht 695084ecad
depends: add download commands for freebsd & android sources 2024-02-20 16:36:29 +01:00
Siren 7043238261 Remove instructions for Void Linux, add NixOS 2024-02-20 01:33:21 +02:00
tobtoht 119e3410bb
depends: remove unwind 2024-02-19 22:35:26 +01:00
tobtoht e499e74b8e
actions: update to v4 actions 2024-02-19 00:01:22 +01:00
0xFFFC0000 c50ade514f
Daemon-specific proxy for the wallet-rpc.
1. Daemon-specific proxy is exclusive with global proxy (--proxy).
2. If you set global proxy (--proxy) you cannot set daemon-specific proxy.
3. If you don't set global proxy, you can set proxy (or not set) proxy for
each daemon connection with the proxy field in jsonrpc to the wallet-rpc.
2024-02-18 18:36:52 +00:00
jeffro256 48b7d0895a
epee binary: container can read from empty seq of any type 2024-02-16 15:53:07 -06:00
tobtoht 1bc09fce59
depends: add riscv64 to gitignore 2024-02-13 22:36:20 +01:00
tobtoht 0c9a5c5587
depends: remove ccache 2024-02-13 20:54:02 +01:00
tobtoht 5f1b5c2c4a
depends: eudev: update to 3.2.14 2024-02-13 20:13:45 +01:00
tobtoht 442146a508
depends: libusb: update to 1.0.27 2024-02-13 19:28:42 +01:00
tobtoht c334d0e5f3
depends: openssl: update to 3.0.13 2024-02-13 18:45:59 +01:00
tobtoht b26155b8fa
depends: expat: update to 2.6.0 2024-02-13 18:20:19 +01:00
tobtoht edcc1e4618
depends: unbound: update to 1.19.1 2024-02-13 18:18:23 +01:00
tobtoht 538f19b0b7
depends: android_ndk: update to 18b 2024-02-12 19:31:15 +01:00
jeffro256 8d25418df0
daemon: warn user on specifiying ZMQ args with --no-zmq
Resolves https://github.com/monero-project/monero/issues/9127
2024-02-07 00:04:46 -06:00
Lee *!* Clagett ed50938af4 Zero initialize rctSigBase elements 2024-02-06 12:47:47 -05:00
Lee Clagett cd7ccfbdab Disable/fix ports with I2P 2024-01-30 13:40:05 -05:00
Lee *!* Clagett b1c9a809a0 Add <cstdint> to aligned test 2024-01-29 21:37:22 -05:00
0xFFFC0000 9cd4757c88
Cleanup extra memory allocation, and port boost::shared_ptr to std::shared_ptr. 2024-01-23 11:18:39 +03:30
tobtoht ba902f9303
actions: remove unnecessary packages 2024-01-19 19:50:03 +01:00
luigi1111 059028a30a
Merge pull request #9126
e7629dc CMake: only set policy CMP0148 to OLD if version >= 3.27 (jeffro256)
2024-01-19 13:45:01 -05:00
jeffro256 e7629dc46f
CMake: only set policy CMP0148 to OLD if version >= 3.27
Co-authored-by: 0xFFFC0000 <0xFFFC0000@proton.me>
2024-01-19 11:14:58 -06:00
luigi1111 39a698d22c
Merge pull request #9119
9690bfd gpg_keys: add 0xfffc0000 (0xFFFC0000)
2024-01-18 18:09:22 -05:00
luigi1111 79608f74d5
Merge pull request #9117
7d3b9b9 remove ARCH='x86-64' from release-static (woodser)
2024-01-18 18:08:52 -05:00
luigi1111 edff20040a
Merge pull request #9111
34e62d5 workflows: enable manual run of copyright update (plowsof)
dd978ee workflows: copyright commit author (plowsof)
2024-01-18 18:07:51 -05:00
luigi1111 663dcf3aa2
Merge pull request #9103
562bdb8 storages: add missing return (selsta)
2024-01-18 18:07:12 -05:00
luigi1111 eb904d709a
Merge pull request #9090
430b102 Cleanup scoped_ptr in src/common/dns_utils.cpp and header include: 	* No need for entire new class (Fix #8732). 	* Fix stdint.h header include in contrib/epee/include/net/http_base.h. (0xFFFC0000)
2024-01-18 18:06:23 -05:00
luigi1111 36addc1e56
Merge pull request #9084
01c6e4b OpenBSD: node server fix IP localhost by aliasing (mesaoptimizer)
2024-01-18 18:05:28 -05:00
luigi1111 e9a4deef81
Merge pull request #9079
eed975d Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:18 -05:00
luigi1111 8ee57110b0
Merge pull request #9077
2525200 serialization: remove container wrappers and serialize directly (jeffro256)
2024-01-18 18:02:31 -05:00
luigi1111 71ef573a14
Merge pull request #9076
eb083ca cmake: silence FindPythonInterp warning (tobtoht)
2024-01-18 18:02:09 -05:00
luigi1111 4b1910af13
Merge pull request #9073
53e632b fix merge mining with more than one merge mined chain (Crypto City)
2024-01-18 18:01:34 -05:00
luigi1111 7795895774
Merge pull request #9072
69a8175 Change std::result_of to auto (Lee Clagett)
2024-01-18 18:01:08 -05:00
luigi1111 5d3679c43c
Merge pull request #9069
a11e03a serialization: fix infinite loops and clean up dispatching (jeffro256)
2024-01-18 18:00:25 -05:00
luigi1111 6d00cf2c2d
Merge pull request #9061
085fdea Add compile-time check for input iterators in ::wire array writing (Lee *!* Clagett)
2024-01-18 17:59:47 -05:00
luigi1111 7b158679bf
Merge pull request #9060
cf2253c workflows: upload macOS binary after name change (selsta)
2024-01-18 17:59:18 -05:00
luigi1111 2eed43cef2
Merge pull request #9059
2766d12 MMS: Ignore 2 more API errors thrown by latest PyBitmessage (rbrunner7)
2024-01-18 17:58:57 -05:00
luigi1111 57799a8ca5
Merge pull request #9056
deb8c79 gpg_keys: add tobtoht (tobtoht)
2024-01-18 17:58:18 -05:00
luigi1111 9d7b253263
Merge pull request #9052
4acae11 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB (Lee *!* Clagett)
2024-01-18 17:57:30 -05:00
luigi1111 2a6f7efca6
Merge pull request #9049
1062b17 wallet: sign_tx: get tx pubkey from extra (tobtoht)
2024-01-18 17:56:55 -05:00
luigi1111 5f6646020e
Merge pull request #9023
b2eb47d wallet: mitigate statistical dependence for decoy selection within rings (jeffro256)
2024-01-18 17:55:49 -05:00
jeffro256 0c545f614a
epee/test: remove levin_protocol_handler and core_proxy tests 2024-01-17 17:17:16 -06:00
jeffro256 afe5167531
depends: update config scripts
The files are exact copies from the original repository (git://git.savannah.gnu.org/config.git),
in commit 28ea239c53a2d5d8800c472bc2452eaa16e37af2. The main reason for the update is because
loongarch was mentioned in PR #9114 and new the latest config files handle loongarch,
as well as WASM64, since the old files only cover WASM32. Tandem NSX and IA16, are also handled
in the newest config files, which covers the changes TheCharlatan made in 2018.
2024-01-12 12:54:26 -06:00
0xFFFC0000 9690bfda27
gpg_keys: add 0xfffc0000 2024-01-09 03:52:30 +03:30
woodser 7d3b9b98cb remove ARCH="x86-64" from release-static 2024-01-06 14:15:08 -05:00
plowsof 34e62d58db
workflows: enable manual run of copyright update 2024-01-02 17:18:07 +00:00
plowsof dd978ee437
workflows: copyright commit author
author is now copyCat
2024-01-02 17:16:06 +00:00
selsta 562bdb824b
storages: add missing return 2023-12-25 15:27:00 +01:00
0xFFFC0000 430b102aef Cleanup scoped_ptr in src/common/dns_utils.cpp and header include:
* No need for entire new class (Fix #8732).
	* Fix stdint.h header include in contrib/epee/include/net/http_base.h.
2023-12-19 16:54:37 +03:30
mesaoptimizer 01c6e4b4ad
OpenBSD: node server fix IP localhost by aliasing
The test node_server.bind_same_p2p_port fails by default on OpenBSD
for at least the debug build. Using the same ifconfig command as
described for MacOS results in the test passing.
2023-12-10 22:08:05 +01:00
Crypto City 53e632b435
fix merge mining with more than one merge mined chain
reported by sech1
2023-11-30 17:01:52 +00:00
Lee Clagett eed975db5d Fix missing checks for IsObject in ZMQ jsonrpc reading 2023-11-28 18:02:57 -05:00
jeffro256 2525200185
serialization: remove container wrappers and serialize directly
Some downstream code (most notably PR https://github.com/UkoeHB/monero/pull/25) wants to use the src/serialization lib
for storing information persistently. When one builds classes/machines wishing to serialize containers, they must use
the `serializable_*` container classes. In this case, this makes the Seraphis library code unnecessarily tightly coupled
with the src/serialization code since one cannot swap out their type of storage format without major refactoring of class
field types. By serializing STL containers directly, we can abstract the serialization details away, making for much
cleaner design. Also small bonus side effect of this change is that STL containers with custom Comparators, Allocators,
and Hashers are serializable. `std::multimap` is added to the list of serializable containers.

Depends upon https://github.com/monero-project/monero/pull/9069.
2023-11-28 14:06:24 -06:00
tobtoht eb083ca423
cmake: silence FindPythonInterp warning 2023-11-25 20:38:52 +01:00
Lee Clagett 69a8175edc Change std::result_of to auto 2023-11-20 17:16:42 -05:00
jeffro256 a11e03afa6
serialization: fix infinite loops and clean up dispatching
Resolves #8687
2023-11-18 03:47:55 -06:00
Lee *!* Clagett 085fdea88c Add compile-time check for input iterators in ::wire array writing 2023-11-06 16:26:39 -05:00
selsta cf2253c812
workflows: upload macOS binary after name change 2023-11-06 20:39:40 +01:00
luigi1111 ac02af9286
Merge pull request #9050
23179a0 wallet: fix multisig key memory leak (jeffro256)
2023-11-06 09:38:08 -05:00
luigi1111 cab0ebdeb5
Merge pull request #9045
504269e unit tests: fix running from pwd and auto test selected location (jeffro256)
2023-11-06 09:35:11 -05:00
luigi1111 b0ea37a198
Merge pull request #9044
5443240 core_tests: fix gcc7 compilation (selsta)
2023-11-06 09:34:37 -05:00
luigi1111 06cfcb73ae
Merge pull request #9042
ade57b6 JH hash compiler workarounds (SChernykh)
2023-11-06 09:33:35 -05:00
luigi1111 b22ba16dec
Merge pull request #9038
e191083 epee: remove dead code in math_helper and string_tools (jeffro256)
2023-11-06 09:31:33 -05:00
luigi1111 c03e404980
Merge pull request #9035
0523140 ringct: make 
ctSigBase serialization follow strict aliasing rule (jeffro256)
2023-11-06 09:28:18 -05:00
luigi1111 4ea2a194c7
Merge pull request #9033
56dab0f cryptonote_config: include cstdint (jeffro256)
2023-11-06 09:27:26 -05:00
luigi1111 3ab36f36f9
Merge pull request #9030
30cf537 unit tests: wallet_storage: generate in 'Ascii' format test (jeffro256)
2023-11-06 09:26:48 -05:00
luigi1111 26d37fe91d
Merge pull request #9028
9ea3257 gitian: add riscv64 support (selsta)
2023-11-06 09:25:24 -05:00
luigi1111 54e8463fe6
Merge pull request #8990
c17f73a add sp_transcript (koe) 51e40f7 add seraphis_crypto directory (koe)
2023-11-06 09:24:37 -05:00
luigi1111 a87f2bdd3f
Merge pull request #8979
80b5bf8 gcc: fix uninitialized constructor warnings (jeff)
2023-11-06 09:23:48 -05:00
luigi1111 476398687d
Merge pull request #8965
1e2e703 core_rpc_server: silence unused  warnings (jeffro256)
2023-11-06 09:23:08 -05:00
luigi1111 3cea45bc56
Merge pull request #8922
b4491c1 cmake: set -fno-aligned-allocation on macOS ARM (selsta)
df9f380 cmake: set BOOST_NO_AUTO_PTR to fix c++17 compilation (selsta)
5136974 device: boost -> std locks to fix c++17 compilation (selsta)
5965b02 cmake: set cpp17 standard (selsta)
2023-11-06 09:21:55 -05:00
tobtoht deb8c79a97
gpg_keys: add tobtoht 2023-11-05 16:15:19 +01:00
rbrunner7 2766d12a62 MMS: Ignore 2 more API errors thrown by latest PyBitmessage 2023-11-05 16:11:52 +01:00
koe c17f73a1a2 add sp_transcript 2023-11-04 21:56:42 -05:00
SChernykh ade57b694f JH hash compiler workarounds
- Fixed uninitialized `state->x` warning
- Fixed broken code with `-O3` or `-Ofast`

The old code is known to break GCC 10.1 and GCC 11.4
2023-11-04 21:01:07 +01:00
Lee *!* Clagett 4acae11327 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB 2023-11-04 13:42:14 -04:00
tobtoht 1062b172b6
wallet: sign_tx: get tx pubkey from extra 2023-11-02 15:19:05 +01:00
jeffro256 23179a0ba4
wallet: fix multisig key memory leak
Multisig keys per-transfer were being wiped, but not erased, which lead to a ginormous
quadratic bloat the more transfers and exports you performed with the wallet.
2023-11-02 02:58:50 -05:00
jeffro256 504269e6cf
unit tests: fix running from pwd and auto test selected location 2023-10-28 03:14:05 -05:00
selsta 5443240aa6
core_tests: fix gcc7 compilation 2023-10-28 04:26:27 +02:00
selsta b4491c1072
cmake: set -fno-aligned-allocation on macOS ARM
We set a deployment target that is lower than 10.14, which means
we have to disable aligned allocation otherwise compilation fails.
2023-10-26 04:02:27 +02:00
selsta df9f380671
cmake: set BOOST_NO_AUTO_PTR to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta 5136974da9
device: boost -> std locks to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta 5965b02aef
cmake: set cpp17 standard 2023-10-26 04:02:25 +02:00
luigi1111 053ba2cf07
Merge pull request #9026
9dc10bb Update RandomX to 1.2.1 (tevador)
2023-10-25 21:40:59 -04:00
luigi1111 5dbe2d0407
Merge pull request #9017
fe4a34e depends: zeromq: update to 4.3.5 (tobtoht)
2023-10-25 21:39:47 -04:00
luigi1111 40af6848f2
Merge pull request #9007
c8e4de1 depends: remove kernel version from darwin triplet (tobtoht)
2023-10-25 21:39:24 -04:00
luigi1111 b91ed92fa4
Merge pull request #9003
b9f1e37 depends: unwind: do not build for linux hosts (tobtoht)
2023-10-25 21:38:57 -04:00
luigi1111 e946315627
Merge pull request #9002
932bba3 depends: remove libiconv: unused (tobtoht)
2023-10-25 21:38:32 -04:00
luigi1111 10f208fbc5
Merge pull request #8989
9b231c9 add account_generators for mapping public EC generators to account keys (koe)
2023-10-25 21:37:37 -04:00
luigi1111 a1a40d67d2
Merge pull request #8987
1025e4f unit_test: set data dir relative to exe & add log-level arg (jeff)
2023-10-25 21:37:09 -04:00
luigi1111 fc4397010d
Merge pull request #8974
759293d wallet2: fix version check at hf version 1 (j-berman)
2023-10-25 21:36:36 -04:00
luigi1111 829c8f0ff9
Merge pull request #8972
f70d65c ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd (teknosquet)
2023-10-25 21:36:09 -04:00
luigi1111 e3d0154b5b
Merge pull request #8969
8190f25 KV_SERIALIZE: remove extraneous semicolons in DSL (jeffro256)
2023-10-25 21:35:43 -04:00
luigi1111 f10ed50431
Merge pull request #8967
eba9011 README: remove obsolete forum (maogo)
2023-10-25 21:35:17 -04:00
luigi1111 faffe09bdb
Merge pull request #8966
f71e2dc multisig: better errors for small malformed kex msgs (jeffro256)
2023-10-25 21:34:57 -04:00
luigi1111 1d3eba161f
Merge pull request #8963
294366f depends: openssl: update to 3.0.11 (tobtoht)
2023-10-25 21:34:36 -04:00
luigi1111 d5da693866
Merge pull request #8958
b0bf49a blockchain_db: add k-anonymity to txid fetching (jeffro256)
2023-10-25 21:34:06 -04:00
luigi1111 cf474d55f6
Merge pull request #8933
ebb7671 depends: use macOS 11 SDK with libc++ headers (tobtoht)
2023-10-25 21:31:40 -04:00
luigi1111 8f0343df16
Merge pull request #8752
c444a7e trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests (Dusan Klinec)
056c996 fix chaingen tests (Dusan Klinec)
2023-10-25 21:30:49 -04:00
jeffro256 e191083bed
epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
tobtoht ebb7671e0e
depends: use macOS 11 SDK with libc++ headers 2023-10-24 19:56:11 +02:00
jeffro256 05231400ce
ringct: make `rctSigBase` serialization follow strict aliasing rule
Accessing an object of type `char` thru an lvalue of type `crypto::hash8` is undefined behavior.
https://developers.redhat.com/blog/2020/06/03/the-joys-and-perils-of-aliasing-in-c-and-c-part-2
2023-10-23 16:28:02 -05:00
jeffro256 56dab0fad2
cryptonote_config: include cstdint
Header was using `uint64_t` without including `<cstdint>` which caused some issues downstream for windows builds
2023-10-22 18:02:54 -05:00
jeffro256 30cf537bcc
unit tests: wallet_storage: generate in "Ascii" format test 2023-10-21 18:37:12 -05:00
selsta 9ea325777f
gitian: add riscv64 support 2023-10-21 16:02:55 +02:00
tevador 9dc10bb223 Update RandomX to 1.2.1 2023-10-20 20:46:36 +02:00
jeffro256 b2eb47d875
wallet: mitigate statistical dependence for decoy selection within rings
Since we are required to check for uniqueness of decoy picks within any given
ring, and since some decoy picks may fail due to unlock time or malformed EC points,
the wallet2 decoy selection code was building up a larger than needed *unique* set of
decoys for each ring according to a certain distribution *without replacement*. After
filtering out the outputs that it couldn't use, it chooses from the remaining decoys
uniformly random *without replacement*.

The problem with this is that the picks later in the picking process are not independent
from the picks earlier in the picking process, and the later picks do not follow the
intended decoy distribution as closely as the earlier picks. To understand this
intuitively, imagine that you have 1023 marbles. You label 512 marbles with the letter A,
label 256 with the letter B, so on and so forth, finally labelling one marble with the
letter J. You put them all into a bag, shake it well, and pick 8 marbles from the bag,
but everytime you pick a marble of a certain letter, you remove all the other marbles
from that bag with the same letter. That very first pick, the odds of picking a certain
marble are exactly how you would expect: you are twice as likely to pick A as you are B,
twice as likely to pick B as you are C, etc. However, on the second pick, the odds of
getting the first pick are 0%, and the chances for everything else is higher. As you go
down the line, your picked marbles will have letters that are increasingly more unlikely
to pick if you hadn't remove the other marbles. In other words, the distribution of the
later marbles will be more "skewed" in comparison to your original distribution of marbles.

In Monero's decoy selection, this same statistical effect applies. It is not as dramatic
since the distribution is not so steep, and we have more unique values to choose from,
but the effect *is* measureable. Because of the protocol rules, we cannot have duplicate
ring members, so unless that restriction is removed, we will never have perfectly
independent picking. However, since the earlier picks are less affected by this
statistical effect, the workaround that this commit offers is to store the order that
the outputs were picked and commit to this order after fetching output information over RPC.
2023-10-17 00:53:40 -05:00
jeff 80b5bf8b3d
gcc: fix uninitialized constructor warnings 2023-10-16 16:48:27 -05:00
tobtoht fe4a34ebb2
depends: zeromq: update to 4.3.5 2023-10-10 00:08:44 +02:00
luigi1111 67d190ce7c
Merge pull request #9013
bb33daa add a test for the long term weight cache (Boog900)
65839b5 Fix: long term block weight cache The long term block weight cache was doing a wrong calculation when adding a new block to the cache. (Boog900)
2023-10-02 15:27:39 -04:00
Boog900 bb33daab1b
add a test for the long term weight cache 2023-10-02 01:38:10 +01:00
Boog900 65839b5ac1
Fix: long term block weight cache
The long term block weight cache was doing a wrong calculation when
adding a new block to the cache.
2023-10-01 13:40:06 +01:00
luigi1111 f29a3d45f3
Merge pull request #9000
9636375 storages: change error log category to serialization (selsta)
2023-09-30 14:45:06 -04:00
luigi1111 6d37eb0a01
Merge pull request #8998
9f981ac wallet: store watch-only wallet correctly when change_password() is called (jeff)
2023-09-30 14:43:40 -04:00
Dusan Klinec c444a7e002
trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests
- passphrase logic: remove backward compatibility for 2.4.3, code cleanup.
- fix LibUSB cmake for static builds on OSX
- tests: all tests now work with passphrase logic enabled. Passphrase test added with different passphrase. no_passphrase test added, Trezor pin test added. Testing wallet opening with correct and incorrect passphrase. Trezor test chain revamp, cleanup. Smaller chain, chain file versioning added.
- tests: Trezor tests support TEST_MINING_ENABLED, TEST_MINING_TIMEOUT env vars to change mining-related tests behaviour.
- requires protobuf@21 on osx for now (c++14), building with unlinked protobuf: `CMAKE_PREFIX_PATH=$(find /opt/homebrew/Cellar/protobuf@21 -maxdepth 1 -type d -name "21.*" -print -quit) \
make debug-test-trezor -j8`
2023-09-30 09:01:10 +02:00
Dusan Klinec 056c996703
fix chaingen tests
- fix tx create from sources, input locking. Originally, creating a synthetic transactions with chaingen could create a transaction with outputs that are still locked in the current block, thus failing chain validation by the daemon. Simple unlock check was added. Some buggy tests were fixed as well as new unlock-checking version of tx creation rejected those, fixes are simple - mostly using correct block after a rewind to construct a transaction
2023-09-29 19:11:20 +02:00
tobtoht c8e4de13f2
depends: remove kernel version from darwin triplet 2023-09-27 07:37:01 +02:00
j-berman 47042ce808 wallet2: call on_reorg callback in handle_reorg 2023-09-26 20:37:11 -07:00
tobtoht 0d763a19b8
depends: move cmake system config to hosts files 2023-09-26 16:46:51 +02:00
tobtoht b9f1e37d33
depends: unwind: do not build for linux hosts 2023-09-26 09:47:36 +02:00
tobtoht 932bba3b79
depends: remove libiconv: unused 2023-09-25 14:00:34 +02:00
selsta 9636375421
storages: change error log category to serialization 2023-09-22 19:05:55 +02:00
jeff 9f981ac219
wallet: store watch-only wallet correctly when `change_password()` is called
The Monero GUI code was calling `Monero::wallet::setPassword()` on every open/close for some reason,
and the old `store_to()` code called `store_keys()` with `watch_only=false`, even for watch-only wallets.
This caused a bug where the watch-only keys file got saved with with the JSON field `watch_only` set to 0,
and after saving a watch-only wallet once, a user could never open it back up against because `load()` errored out.
This never got brought up before this because you would have to change the file location of the watch-only
wallet to see this bug, and I guess that didn't happen often, but calling the new `store_to()` function with the
new `force_rewrite` parameter set to `true` triggers key restoring and the bug appeared.
2023-09-21 22:42:16 -05:00
tobtoht 294366f8af
depends: openssl: update to 3.0.11 2023-09-19 15:54:00 +02:00
luigi1111 90294f09ae
Merge pull request #8976
d4d8840 functional_tests: fix multisig tests noutputs assertion (jeffro256)
2023-09-14 22:20:10 -05:00
luigi1111 8a280dd6d0
Merge pull request #8937
1bea8ef wallet2: fix store_to() and change_password() (jeffro256)
2023-09-14 22:17:27 -05:00
koe 51e40f721b add seraphis_crypto directory 2023-09-10 16:49:58 -05:00
koe 9b231c9ac3 add account_generators for mapping public EC generators to account keys 2023-09-10 16:02:46 -05:00
jeff 1025e4fcb1
unit_test: set data dir relative to exe & add log-level arg 2023-09-10 02:18:50 -05:00
jeffro256 1bea8ef42a
wallet2: fix `store_to()` and `change_password()`
Resolves #8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
2023-08-23 11:48:18 -05:00
jeffro256 d4d884057c
functional_tests: fix multisig tests noutputs assertion
The changes to the multisig tests in #8914 and #8904 affected each other, this PR cleans up the code and fixes that issue.
2023-08-19 22:09:51 -05:00
j-berman 759293de08 wallet2: fix version check at hf version 1 2023-08-17 13:29:46 -07:00
luigi1111 8123d945f8
Merge pull request #8959
26fa796 docs: update ANONYMITY_NETWORKS (DonW16)
2023-08-17 10:27:34 -05:00
luigi1111 72211163b8
Merge pull request #8956
f7fb5c7 scan_tx: fix custom comparator for == case; fixes #8951 (j-berman)
2023-08-17 10:26:24 -05:00
luigi1111 e3c990f03a
Merge pull request #8955
192d87c remove more 'using namespace' statements from headers (jeffro256)
2023-08-17 10:25:51 -05:00
luigi1111 1ab593991c
Merge pull request #8950
a0e5c3c wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
2023-08-17 10:24:53 -05:00
luigi1111 28eca0cb79
Merge pull request #8927
1104b59 Update help for set command in simplewallet Add help for max-reorg-depth and load-deprecated-formats options (MasFlam)
2023-08-17 10:23:10 -05:00
luigi1111 6fc67869a1
Merge pull request #8924
ffbf9f4 blockchain_and_pool: move to crytonote_core and enforce its usage (jeffro256)
d6f86e5 Avoid nullptr dereference when constructing Blockchain and tx_memory_pool (lukas)
2023-08-17 10:21:40 -05:00
luigi1111 3b67d5fc5b
Merge pull request #8914
45b52de wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:20:20 -05:00
luigi1111 fc84506a96
Merge pull request #8913
2a2cf03 blockchain_db: add clarification to get_block_already_generated_coins (jeffro256)
2023-08-17 10:19:26 -05:00
luigi1111 30ba5a5280
Merge pull request #8890
e8cac61 core_rpc_server: return ID of submitted block (jeffro256)
2023-08-17 10:17:46 -05:00
luigi1111 83df9b1429
Merge pull request #8882
a8d2a58 wallet2: ensure transfers and sweeps use same fee calc logic (j-berman)
2023-08-17 10:17:22 -05:00
luigi1111 b9fd761a25
Merge pull request #8868
a6ce2dc Write interface for new serialization system (Lee *!* Clagett)
2023-08-17 10:14:17 -05:00
luigi1111 4cabfe7aba
Merge pull request #8853
6ff87ef net: tor_address: remove support for v2 onion addresses (tobtoht)
2023-08-17 10:11:12 -05:00
luigi1111 c490e38f56
Merge pull request #8840
503c3e0 core: do not force sync the db when finding a block in regtest mode (Crypto City)
2023-08-17 10:10:14 -05:00
luigi1111 01ee1682aa
Merge pull request #8786
0ae5c91 http_client: reduce number of packets sent for small bodies (jeffro256)
2023-08-17 10:08:29 -05:00
teknosquet f70d65c8bc
ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd
Signed-off-by: teknosquet <teknosquet@danwin1210.de>
2023-08-14 02:36:14 -05:00
Lee *!* Clagett a6ce2dc7c5 Write interface for new serialization system 2023-08-11 16:34:27 -04:00
jeffro256 8190f2532b
`KV_SERIALIZE`: remove extraneous semicolons in DSL
Prereq of https://github.com/monero-project/monero/pull/8867
2023-08-10 11:13:14 -05:00
maogo eba9011ca0
README: remove obsolete forum 2023-08-10 04:18:24 +02:00
jeffro256 f71e2dcdc8
multisig: better errors for small malformed kex msgs
Resolves https://github.com/monero-project/monero/issues/8493
2023-08-08 12:01:40 -05:00
jeffro256 1e2e7035e9
core_rpc_server: silence unused warnings 2023-08-01 17:46:34 -05:00
jeffro256 b0bf49a65a
blockchain_db: add k-anonymity to txid fetching
Read more about k-anonymity [here](https://en.wikipedia.org/wiki/K-anonymity). We implement this feature in the monero daemon for transactions
by providing a "Txid Template", which is simply a txid with all but `num_matching_bits` bits zeroed out, and the number `num_matching_bits`. We add an operation to `BlockchainLMDB` called
`get_txids_loose` which takes a txid template and returns all txids in the database (chain and mempool) that satisfy that template. Thus, a client can
ask about a specific transaction from a daemon without revealing the exact transaction they are inquiring about. The client can control the statistical
chance that other TXIDs (besides the one in question) match the txid template sent to the daemon up to a power of 2. For example, if a client sets their `num_matching_bits`
to 5, then statistically any txid has a 1/(2^5) chance to match. With `num_matching_bits`=10, there is a 1/(2^10) chance, so on and so forth.

Co-authored-by: ACK-J <60232273+ACK-J@users.noreply.github.com>
2023-08-01 17:25:25 -05:00
jeffro256 45b52de28e
wallet-rpc: restore from multisig seed 2023-07-28 12:17:14 -05:00
DonW16 26fa796315
docs: update ANONYMITY_NETWORKS
Removed version 2 onion addresses as they're deprecated from TOR and updated I2P/Tor Stream Used Twice section to reference tweets relevant to section.

Fixed grammatical errors and changed the wording within the Wallet RPC section to better explain the differences between a I2P hidden service and a TOR hidden service.
2023-07-28 00:02:33 +02:00
j-berman f7fb5c7faa scan_tx: fix custom comparator for == case; fixes #8951
Co-authored-by: woodser <woodser@protonmail.com>
2023-07-19 07:48:29 -07:00
jeffro256 192d87cd24
remove more 'using namespace' statements from headers 2023-07-18 22:46:43 -05:00
jeffro256 a0e5c3c326
wallet2: when checking frozen multisig tx set, don't assume order 2023-07-16 13:29:52 -05:00
luigi1111 00fd416a99
Merge pull request #8919
1c20198 Fixup error message. (ComputeryPony)
2023-07-06 21:41:12 -05:00
luigi1111 d5c7d1743f
Merge pull request #8904
369a5a8 wallet: respect frozen key images in multisig wallets (jeffro256)
2023-07-06 21:37:58 -05:00
luigi1111 58c5735af0
Merge pull request #8903
2608b24 Add CLSAG serialization to ZMQ code (Lee Clagett)
2023-07-06 21:36:45 -05:00
luigi1111 e67f82a164
Merge pull request #8902
c138a28 wallet2: take ignored-by-value outputs into account in balance (Crypto City)
2023-07-06 21:36:19 -05:00
luigi1111 f44820b2fb
Merge pull request #8901
ea053b6 Update tests/hash/main.cpp (0xFFFC0000)
6bae913 Tests: Add blake2b Test Cases for hash testing. 	* Adding blake2b test function to src/tests/hash 	* New files for testvector. 	* Adding the test to CMakeLists.txt 	* Adding brief documentation for the test. (0xFFFC0000)
2023-07-06 21:35:36 -05:00
luigi1111 9537329962
Merge pull request #8899
0961c2a Set SSL SNI even when server verification is disabled (Lee *!* Clagett)
2023-07-06 21:33:57 -05:00
luigi1111 cfa4583695
Merge pull request #8894
c589e15 Speed up perf_timer init on x86 (SChernykh)
2023-07-06 21:32:11 -05:00
luigi1111 c34dc5b215
Merge pull request #8854
d9c7cd5 common: do not use DNS to determine if address is local (tobtoht)
2023-07-06 21:30:34 -05:00
luigi1111 770b8fba3d
Merge pull request #8850
d391ac0 blockchain: ensure base fee cannot reach 0 (Crypto City)
2023-07-06 21:30:09 -05:00
luigi1111 00323bae5e
Merge pull request #8747
a668312 wallet: remove CLI code for non default ring sizes (Jeffro256)
2023-07-06 21:29:41 -05:00
luigi1111 7213d33017
Merge pull request #8662
16d17f6 add crypto/generators for direct access to canonical fixed generators (koe)
2023-07-06 21:27:56 -05:00
luigi1111 3a72c47445
Merge pull request #8344
70bbd25 core_rpc_server: new file: rpc_ssl.fingerprint (Jeffrey Ryan)
2023-07-06 21:27:16 -05:00
luigi1111 d80d17fbac
Merge pull request #8250
ce86368 Remove src/platform (Jeffrey)
2023-07-06 21:26:06 -05:00
luigi1111 41735185a8
Merge pull request #8888
a6639df wallet_rpc_server: dedup transfer RPC responses (jeffro256)
Very special PR.
2023-07-06 21:24:46 -05:00
tobtoht d9c7cd5a89
common: do not use DNS to determine if address is local
Co-authored-by: j-berman <justinberman@protonmail.com>
2023-07-03 13:34:39 +02:00
Jeffrey Ryan 70bbd2536b
core_rpc_server: new file: rpc_ssl.fingerprint 2023-07-02 19:38:51 -05:00
Jeffrey ce863683ab
Remove src/platform
All the files in src/platform are currently unused and unnecessary. See below:

* `mingw/alloca.h`: unused throughout project
* `msc/sys/param.h`:
    1. In `fix_darwin.patch`, `sys/param.h` is well-defined to be used only in OpenBSD environment
    2. `int-util.h` already handles when `sys/param.h` is not present and injects its own values
    3. `db_drivers/liblmdb/mdb.c` is a similar situation: already explicity handles different platforms
    4. `src/crypto/chacha.h` uses `int-util.h` for endianness context
* `msc/alloca.h`: unused
* `msc/inline_c.h`: not needed. the `inline` keyword is supported for C99 I believe, and certainly for C11, C14+
* `msc/stdbool.h`: `stdbool.h` is standard since C99, and MSVC has supported it for a long time (~10 years)
2023-07-02 19:29:18 -05:00
jeffro256 ffbf9f4766
blockchain_and_pool: move to crytonote_core and enforce its usage 2023-07-01 07:12:53 -05:00
MasFlam 1104b59c5b
Update help for set command in simplewallet
Add help for max-reorg-depth and load-deprecated-formats options
2023-07-01 12:01:07 +02:00
jeffro256 e8cac61f4b
core_rpc_server: return ID of submitted block 2023-06-30 15:31:35 -05:00
lukas d6f86e58a6
Avoid nullptr dereference when constructing Blockchain and tx_memory_pool 2023-06-30 20:27:05 +02:00
koe 16d17f6707 add crypto/generators for direct access to canonical fixed generators 2023-06-28 09:52:27 -05:00
Jeffro256 a668312cfa
wallet: remove CLI code for non default ring sizes 2023-06-27 20:18:21 +02:00
ComputeryPony 1c20198280
Fixup error message.
Looks like the extra MWARNING was supposed to be guarded by the if statement.
2023-06-27 12:56:35 -05:00
luigi1111 0a1eaf26f9
Merge pull request #8884
eeda4a8 wallet2: do not lose exception in current thread on refresh (Crypto City
 f868768 wallet2: fix missing exceptions from failing wallet refresh (Crypto City)
2023-06-27 11:48:27 -05:00
luigi1111 e7dc03f99b
Merge pull request #8880
ec0cdc4 depends: remove icu4c (tobtoht)
2023-06-27 11:46:54 -05:00
luigi1111 e4e8edd9c9
Merge pull request #8870
eb94356 Add to_hex::buffer (Lee *!* Clagett)
2023-06-27 11:45:48 -05:00
luigi1111 1261f0ac09
Merge pull request #8869
2c98a82 Add byte_stream alue_type and data() (Lee *!* Clagett)
2023-06-27 11:45:25 -05:00
luigi1111 0fbe21e9e9
Merge pull request #8862
9f80797 protocol: drop peers sending duplicate txes (moneromooo-monero)
2023-06-27 11:44:58 -05:00
luigi1111 f80fb18e5a
Merge pull request #8860
c430ba9 depends: update expat to 2.5.0 (tobtoht)
2023-06-27 11:44:23 -05:00
luigi1111 6775a1b50f
Merge pull request #8858
25a803f tests: remove unused perl scripts (tobtoht)
2023-06-27 11:43:48 -05:00
luigi1111 29337714c4
Merge pull request #8857
f7deb7d tests: remove daemon_tests (tobtoht)
2023-06-27 11:43:19 -05:00
luigi1111 d732cb3d3d
Merge pull request #8856
360a145 utils: remove munin_plugins (tobtoht)
2023-06-27 11:42:34 -05:00
luigi1111 b86a620b4d
Merge pull request #8855
bb83eb1 daemon: remove --fluffy-blocks (tobtoht)
2023-06-27 11:41:57 -05:00
luigi1111 1153246b8a
Merge pull request #8848
6b8dfb8 daemon: remove os-version (tobtoht)
2023-06-27 11:39:33 -05:00
luigi1111 794f59b8bd
Merge pull request #8844
7206ef8 cryptonote_basic: fix amount overflow detection on 32-bit systems (jeffro256)
2023-06-27 11:37:54 -05:00
luigi1111 1df7260bd3
Merge pull request #8839
24d56c5 bump lmdb sync threshold for performance (moneromooo-monero)
2023-06-27 11:36:29 -05:00
luigi1111 a897325fcd
Merge pull request #8832
092e964 Fixed RandomX initialization when mining from scratch (SChernykh)
2023-06-27 11:35:22 -05:00
luigi1111 d88296b17d
Merge pull request #8817
a32aeb9 Added Alpine Linux to list of packages (Dvd-Znf)
2023-06-27 11:34:22 -05:00
luigi1111 3d9f378ed4
Merge pull request #8804
ca6c42a Message about DNS_PUBLIC to help users with issue #8452 (OrvilleRed)
2023-06-27 11:33:45 -05:00
luigi1111 dd5445d685
Merge pull request #8795
724441a link against libz on non Apple/Windows (moneromooo-monero)
2023-06-27 11:32:53 -05:00
luigi1111 02ebe9090e
Merge pull request #8792
04dfdb3 epee: protect base64_chars, removed dead functions, speed up compile (Jeffro256)
2023-06-27 11:32:07 -05:00
luigi1111 570fd364aa
Merge pull request #8772
87e2a64 Allow option 'non-interactive' in monerod config file (almalh)
2023-06-27 11:31:27 -05:00
luigi1111 1723bba296
Merge pull request #8767
e212532 depends: upgrade OpenSSL to 3.0.9 (tobtoht)
2023-06-27 11:30:18 -05:00
luigi1111 97354d8533
Merge pull request #8731
6c73dc7 properly terminate interrupted TCP connection. fixes #8685 (j-berman)
2023-06-27 11:28:55 -05:00
luigi1111 57c58fd5bd
Merge pull request #8703
c90c1c3 Show IPv6 addresses in connection list (Guillaume Le Vaillant)
2023-06-27 11:28:24 -05:00
luigi1111 6ff41c17aa
Merge pull request #8701
7c36110 ci: update copyright (plowsof)
2023-06-27 11:27:47 -05:00
luigi1111 9480525dd2
Merge pull request #8661
f50b9e3 revisions (koe) e5aa058 vtnerd review comments (koe)
c60b11f add compare_func() method so user-defined comparison functions are easier to use (koe)
7329873 adjust is_sorted_and_unique() (koe)
3d60475 comment updates (koe) acfaaed add container helpers (koe)
2023-06-27 11:27:03 -05:00
luigi1111 e752b609fc
Merge pull request #8660
2a7435e variant: add mutable unwrap and visitation (koe)
bc3cec4 add variant class with cleaner interface than boost::variant<> (koe)
2023-06-27 11:25:52 -05:00
luigi1111 feb7fa4986
Merge pull request #8659
5c505bd performance test framework updates: allow custom test parameters, better error reporting (koe)
2023-06-27 11:24:47 -05:00
luigi1111 d79eb9fe3e
Merge pull request #8598
4f3a54b Remove invoke function in levin handler (Lee Clagett)
2023-06-27 11:23:45 -05:00
luigi1111 6f6e0776dd
Merge pull request #8568
e6b86af wallet2: fix rescanning tx via scan_tx (j-berman)
2023-06-27 11:21:31 -05:00
tobtoht e212532dd1
depends: upgrade OpenSSL to 3.0.9 2023-06-26 13:35:55 +02:00
jeffro256 2a2cf03764
blockchain_db: add clarification to get_block_already_generated_coins 2023-06-21 22:08:22 +02:00
j-berman e6b86af931 wallet2: fix rescanning tx via scan_tx
- Detach & re-process txs >= lowest scan height
- ensures that if a user calls scan_tx(tx1) after scanning tx2,
the wallet correctly processes tx1 and tx2
- if a user provides a tx with a height higher than the wallet's
last scanned height, the wallet will scan starting from that tx's
height
- scan_tx requires trusted daemon iff need to re-process existing
txs: in addition to querying a daemon for txids, if a user
provides a txid of a tx with height *lower* than any *already*
scanned txs in the wallet, then the wallet will also query the
daemon for all the *higher* txs as well. This is likely
unexpected behavior to a caller, and so to protect a caller from
revealing txid's to an untrusted daemon in an unexpected way,
require the daemon be trusted.
2023-06-15 02:21:29 -07:00
0xFFFC0000 ea053b6c61
Update tests/hash/main.cpp
Removing preprocessor macro and replacing it with constexpr.

Co-authored-by: Jeffro <jeffreyryan@tutanota.com>
2023-06-13 01:20:42 +03:30
jeffro256 369a5a8f9a wallet: respect frozen key images in multisig wallets
Before this change, if a multisig peer asked you to sign a transaction with a frozen enote, the wallet will do it without any error or warning. This change makes it
so that wallets will refuse to sign multisig transactions with frozen enotes.

Disclaimer: This PR was generously funded by @LocalMonero.
2023-06-12 16:47:28 -05:00
0xFFFC0000 6bae91304e Tests: Add blake2b Test Cases for hash testing.
* Adding blake2b test function to src/tests/hash
	* New files for testvector.
	* Adding the test to CMakeLists.txt
	* Adding brief documentation for the test.
2023-06-12 08:29:35 +03:30
Lee Clagett 2608b241c8 Add CLSAG serialization to ZMQ code 2023-06-10 11:55:48 -04:00
Crypto City c138a28f51
wallet2: take ignored-by-value outputs into account in balance 2023-06-10 06:41:17 +00:00
Lee *!* Clagett 0961c2abe4 Set SSL SNI even when server verification is disabled 2023-06-09 11:16:03 -04:00
SChernykh c589e1549b Speed up perf_timer init on x86
All Monero binaries have 1 second startup delay because of this code. This is especially noticeable and affects UX in Monero GUI wallet with local node where it often starts another monerod instance to run commands and query node status.
2023-06-08 07:56:05 +02:00
moneromooo-monero 9f80797086
protocol: drop peers sending duplicate txes 2023-06-07 06:56:21 +00:00
jeffro256 7206ef8ab8 cryptonote_basic: fix amount overflow detection on 32-bit systems
On systems where `ULONG_MAX` != `ULLONG_MAX` (e.g. most 32-bit systems), the `round_money_up` function will not correctly detect overflows.
2023-06-02 22:14:26 -05:00
jeffro256 a6639df9e4 wallet_rpc_server: dedup transfer RPC responses 2023-06-02 01:07:30 -05:00
Crypto City eeda4a8497
wallet2: do not lose exception in current thread on refresh 2023-05-30 17:08:05 +00:00
Crypto City f8687684e3
wallet2: fix missing exceptions from failing wallet refresh 2023-05-30 16:57:48 +00:00
j-berman a8d2a58190 wallet2: ensure transfers and sweeps use same fee calc logic
Ensures both transfers and sweeps use a fee that's calculated
from the tx's weight. Using different logic could theoretically
enable distinguishability between the two types of txs. We don't
want that.
2023-05-27 07:27:54 -07:00
tobtoht ec0cdc4acb
depends: remove icu4c 2023-05-26 16:17:31 +02:00
Lee *!* Clagett eb943562cb Add to_hex::buffer 2023-05-22 13:36:05 -04:00
Lee *!* Clagett 2c98a82e75 Add byte_stream `value_type` and `data()` 2023-05-21 13:35:18 -04:00
tobtoht c430ba95fd
depends: update expat to 2.5.0 2023-05-15 17:18:51 +02:00
tobtoht 25a803f31e
tests: remove unused perl scripts 2023-05-12 22:07:25 +02:00
luigi1111 94e67bf96b
Merge pull request #8842
c32befe fix missing <cstdint> includes (tobtoht)
2023-05-12 14:30:49 -05:00
tobtoht f7deb7d7ae
tests: remove daemon_tests 2023-05-12 21:24:55 +02:00
tobtoht 360a14588f
utils: remove munin_plugins 2023-05-12 17:50:50 +02:00
tobtoht bb83eb151a
daemon: remove --fluffy-blocks 2023-05-12 17:39:38 +02:00
tobtoht 6ff87ef89f
net: tor_address: remove support for v2 onion addresses 2023-05-12 17:09:54 +02:00
Crypto City d391ac0f7e
blockchain: ensure base fee cannot reach 0
reported by sech1
2023-05-11 13:47:57 +00:00
tobtoht 6b8dfb8fb9
daemon: remove os-version 2023-05-10 23:15:03 +02:00
tobtoht c32befe4f8
fix missing <cstdint> includes 2023-05-06 18:13:18 +02:00
Crypto City 503c3e06df
core: do not force sync the db when finding a block in regtest mode
for a slight performance boost in functional tests
2023-05-05 18:11:57 +00:00
moneromooo-monero 24d56c5975
bump lmdb sync threshold for performance
Force sync every 100k blocks instead of every 1k blocks. Bumping this
value is reported to make a big difference in sync performance, eg:
https://github.com/monero-project/monero/issues/8189
2023-05-05 18:07:44 +00:00
SChernykh 092e964a87 Fixed RandomX initialization when mining from scratch 2023-04-27 16:31:21 +02:00
luigi1111 a2e8d1d427
Merge pull request #8760
1698cb1 remove defunct light wallet code (tobtoht)
2023-04-26 14:02:25 -04:00
luigi1111 28e43b17c2
Merge pull request #8735
4080796 serialization: remove unused function dump_json (Jeffrey Ryan)
2023-04-26 14:01:45 -04:00
tobtoht 1698cb1f84
remove defunct light wallet code 2023-04-25 21:22:10 +02:00
Jeffrey Ryan 408079661d serialization: remove unused function dump_json 2023-04-25 11:39:55 -05:00
luigi1111 1c9686cb45
Merge pull request #8724
d2a591d wallet, simplewallet: Drop support for mine-to-use RPC system (Jeffrey Ryan)
2023-04-25 12:36:11 -04:00
luigi1111 0d9e790311
Merge pull request #8802
eb0e405 gamma picker: relax constructor requirements and test for selecting outputs from first spendable block (jeffro256)
2023-04-25 11:26:20 -04:00
luigi1111 d44350fb7f
Merge pull request #8798
f383fd3 wallet2: make m_process_pool_txs local to refresh method (jeffro256)
2023-04-25 11:25:29 -04:00
luigi1111 a5cf8b5c4c
Merge pull request #8797
833dd6b add libunbound to package list for OpenBSD (Nihal Jere)
2023-04-25 11:25:00 -04:00
luigi1111 df2eb0da0a
Merge pull request #8796
7a4a03d wallet2: do not commit transactions more than once (moneromooo-monero)
2023-04-25 11:24:15 -04:00
luigi1111 63e9b47bbe
Merge pull request #8791
3a34c63 depends: cleanup Makefile (tobtoht)
2023-04-25 11:23:19 -04:00
luigi1111 b2d603e61f
Merge pull request #8789
df9aa6b epee: remove dead code in net_helper (Jeffro256)
2023-04-25 11:22:50 -04:00
luigi1111 0db1b4503e
Merge pull request #8788
c61d33e wallet2: fix outdated wallet check (Crypto City)
2023-04-25 11:22:11 -04:00
luigi1111 b442d5d4c1
Merge pull request #8780
4e16559 rpc: give reason when sending non-hex raw tx (jeffro256)
2023-04-25 11:21:48 -04:00
luigi1111 5387018ade
Merge pull request #8771
2eaa523 cryptonote::transaction_prefix: fix IDE parsing error (koe)
2023-04-25 11:21:22 -04:00
luigi1111 8172e4d8ad
Merge pull request #8765
630906c cryptonote_basic: remove unused struct (tobtoht)
2023-04-25 11:20:12 -04:00
luigi1111 83100b6cbe
Merge pull request #8764
b13ddb9 Handle case where a command line flag is not allowed in the config file (almalh)
2023-04-25 11:19:38 -04:00
luigi1111 37feb225a6
Merge pull request #8750
5a7a5f1 build: BUILD_DEBUG_UTILITIES fix (Jeffro256)
2023-04-25 11:18:40 -04:00
Jeffrey Ryan d2a591d7c6 wallet, simplewallet: Drop support for mine-to-use RPC system
Using post-PR wallet with pre-PR node will generate error message specific to this PR and not generic "command failed" mesages.
2023-04-25 10:18:20 -05:00
luigi1111 8b617064d4
Merge pull request #8748
11a8360 simplewallet: print fully qualified filename for new wallets (moneromooo-monero)
2023-04-25 11:17:56 -04:00
luigi1111 4931462d1d
Merge pull request #8730
9e09093 wallet_rpc_server: allow creating more than 64 addresses at once (moneromooo-monero)
2023-04-25 11:17:22 -04:00
luigi1111 5e19f232d0
Merge pull request #8719
1082720 README: fix void ssl package (tobtoht)
2023-04-25 11:14:14 -04:00
luigi1111 aa5382c470
Merge pull request #8716
9c7d28b wallet2: add on_reorg callback (Crypto City)
2023-04-25 11:13:44 -04:00
luigi1111 9bf06ea75d
Merge pull request #8698
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-04-25 11:12:56 -04:00
luigi1111 af88341272
Merge pull request #8694
d89e7a2 util: make GMT timestamps explicit for clarity (moneromooo-monero)
2023-04-25 11:11:08 -04:00
luigi1111 ecf0d01aa2
Merge pull request #8679
b986421 adjust multiexp pippenger_cached_data for better reusability (koe)
2023-04-25 11:10:27 -04:00
almalh 87e2a64327
Allow option 'non-interactive' in monerod config file 2023-04-15 18:28:12 -04:00
Guillaume Le Vaillant c90c1c3fe1 Show IPv6 addresses in connection list 2023-04-14 13:34:30 +02:00
Dvd-Znf a32aeb9573
Added Alpine Linux to list of packages 2023-04-04 14:33:49 +03:00
jeffro256 eb0e4052b7 gamma picker: relax constructor requirements and test for selecting outputs from first spendable block 2023-04-02 20:06:09 -05:00
luigi1111 44ac52f929
Merge pull request #8810
d594981 Fixed deadlock and crash when syncing with full dataset on Windows (SChernykh)
2023-04-02 20:45:13 -04:00
luigi1111 5f2bbf78a0
Merge pull request #8808
caa7561 cryptonote core/protocol: don't drop peers for soft offenses (jeffro256)
2023-04-02 20:44:18 -04:00
luigi1111 441373b9ef
Merge pull request #8794
85a4558 wallet2: fix infinite loop in fake out selection (Crypto City)
2023-04-02 20:43:32 -04:00
Crypto City 85a45587f2
wallet2: fix infinite loop in fake out selection
The gamma picker and the caller code did not quite agree on the
number of rct outputs available for use - by one block - which
caused an infinite loop if the picker could never pick outputs
from that block but already had picked all other outputs from
previous blocks.

Also change the range to select from using code from UkoeHB.
2023-03-30 14:44:36 +00:00
jeffro256 caa7561705 cryptonote core/protocol: don't drop peers for soft offenses
Also: txs with tx_extra which is too large will not get published to ZMQ

Co-authored-by: SChernykh <sergey.v.chernykh@gmail.com>
2023-03-29 02:05:43 -05:00
SChernykh d59498101c Fixed deadlock and crash when syncing with full dataset on Windows
It's not allowed to use WaitForSingleObject with _beginthread, because the thread closes its own handle before exiting.

So the wait function will either wait on an invalid handle, or on a different handle used by something else.

Or, if it starts waiting before the thread exits, the behavior is undefined according to MS: "If this handle is closed while the wait is still pending, the function's behavior is undefined."

In my test sync I observed threads getting stuck infinitely on WaitForSingleObject, and then rx_set_main_seedhash spamming new threads when RandomX seed changes again. Eventually the system ran out of resources, and monerod aborted with "Couldn't start RandomX seed thread" message.

This PR fixes it by using `_beginthreadex` instead and explicitly closing the handle when it's safe.
2023-03-29 08:43:47 +02:00
OrvilleRed ca6c42a8e1 Message about DNS_PUBLIC to help users with issue #8452 2023-03-27 00:36:40 -04:00
luigi1111 abe74fda35
Merge pull request #8770
d7a81cc p2p: do not log to global when re-blocking a subnet (moneromooo-monero)
d84a0d7 p2p: avoid spam blocking ipv4 addresses in a blocked subnet (moneromooo-monero)
2023-03-24 22:54:32 -04:00
jeffro256 f383fd3cd0 wallet2: make m_process_pool_txs local to refresh method 2023-03-21 19:18:48 -05:00
moneromooo-monero 7a4a03d9d3
wallet2: do not commit transactions more than once
Fixes #8793
2023-03-21 21:05:53 +00:00
Nihal Jere 833dd6bb92 add libunbound to package list for OpenBSD 2023-03-21 14:20:49 -05:00
moneromooo-monero 724441a782
link against libz on non Apple/Windows
Needed by libcrypto at least
2023-03-21 14:36:48 +00:00
Jeffro256 04dfdb332e epee: protect base64_chars, removed dead functions, speed up compile 2023-03-20 16:02:48 -05:00
tobtoht 3a34c63ba9
depends: cleanup Makefile 2023-03-20 14:39:32 +01:00
jeffro256 0ae5c91e50 http_client: reduce number of packets sent for small bodies 2023-03-19 12:54:14 -05:00
Jeffro256 df9aa6bb04 epee: remove dead code in net_helper 2023-03-19 12:51:27 -05:00
Crypto City c61d33e24c
wallet2: fix outdated wallet check
it was mistaking the number of forks in the fork table for
the last fork, and assuming the table was including every
single fork
2023-03-19 17:43:37 +00:00
luigi1111 f307621678
Merge pull request #8775
1b27fcd device: Add ledger Stax device id to device detection (Francois Beutin)
2023-03-18 18:21:02 -04:00
luigi1111 b7dbf4fd7c
Merge pull request #8745
eaf5902 workflows: update dependencies to fix warnings (selsta)
2023-03-18 18:19:25 -04:00
luigi1111 6bebc2d08c
Merge pull request #8743
7a44eb7 depends: remove unused packages (tobtoht)
2023-03-18 18:19:01 -04:00
luigi1111 76dd14dfb1
Merge pull request #8733
3771641 Add a size limit for tx_extra in tx pool (tevador)
2023-03-18 18:18:13 -04:00
luigi1111 55fddad446
Merge pull request #8707
7159f92 verRctNonSemanticsSimpleCached: fix fragility (Jeffrey Ryan)
2023-03-18 18:17:05 -04:00
luigi1111 a511202222
Merge pull request #8076
c4af33e Enforce restricted # pool txs served via RPC + optimize chunked reqs (j-berman)
9752116 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call (rbrunner7)
2023-03-18 17:58:27 -04:00
Jeffrey Ryan 7159f92a57 verRctNonSemanticsSimpleCached: fix fragility 2023-03-17 18:45:35 -05:00
jeffro256 4e16559053 rpc: give reason when sending non-hex raw tx 2023-03-17 18:18:06 -05:00
Francois Beutin 1b27fcdf77
device: Add ledger Stax device id to device detection 2023-03-14 10:31:20 +01:00
koe 2eaa523af1 cryptonote::transaction_prefix: fix IDE parsing error 2023-03-09 15:18:21 -06:00
moneromooo-monero d7a81ccba1
p2p: do not log to global when re-blocking a subnet 2023-03-09 17:17:59 +00:00
j-berman c4af33eded Enforce restricted # pool txs served via RPC + optimize chunked reqs
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-03-07 20:35:45 +01:00
tobtoht 630906ce5b
cryptonote_basic: remove unused struct 2023-03-06 15:15:00 +01:00
almalh b13ddb9a16
Handle case where a command line flag is not allowed in the config file 2023-03-05 20:32:40 -05:00
moneromooo-monero d84a0d7430
p2p: avoid spam blocking ipv4 addresses in a blocked subnet 2023-03-01 16:56:56 +00:00
Jeffro256 5a7a5f17da build: BUILD_DEBUG_UTILITIES fix
Co-authored-by: Jethro Grassie <jtg@xtrabass.com>
2023-02-26 13:38:53 -06:00
tevador 3771641fc5 Add a size limit for tx_extra in tx pool 2023-02-26 10:26:53 +01:00
moneromooo-monero 11a836074d
simplewallet: print fully qualified filename for new wallets
from time to time, some people don't realize their wallets get
created in their current working directory
2023-02-24 10:22:48 +00:00
selsta eaf590274c
workflows: update dependencies to fix warnings 2023-02-20 04:11:10 +01:00
tobtoht 7a44eb7901
depends: remove unused packages 2023-02-16 14:42:19 +01:00
luigi1111 c5d10a4ac4
Merge pull request #8737
21fb856 depends: bump openssl to 1.1.1t (tobtoht)
2023-02-15 10:46:23 -05:00
luigi1111 3b765c509f
Merge pull request #8736
ac9a897 Revert 'epee: when loading a JSON RPC payload, ensure params is an object' (moneromooo-monero)
2023-02-15 10:45:53 -05:00
luigi1111 3f696f144c
Merge pull request #8720
d8a8448 p2p: add plowsof seed nodes (selsta)
69153e8 p2p: remove offline seed nodes (selsta)
2023-02-15 10:42:59 -05:00
koe 2a7435e026 variant: add mutable unwrap and visitation 2023-02-12 13:00:53 -06:00
tobtoht 21fb856eda depends: bump openssl to 1.1.1t
https://www.openssl.org/news/secadv/20230207.txt

Patch can be removed, it was included upstream.
2023-02-07 20:31:25 +01:00
moneromooo-monero ac9a8978ca
Revert "epee: when loading a JSON RPC payload, ensure params is an object"
This reverts commit b67e931843.

This turns out to be a bad idea, because we do have weird RPC which
do actually go counter to this
2023-02-07 12:12:02 +00:00
luigi1111 549a4b424a
Merge pull request #8713
eaa3aff depends: bump hidapi/libusb (tobtoht)
2023-02-06 12:37:08 -05:00
luigi1111 cd82b4fed0
Merge pull request #8712
cb756b6 blockchain-stats: print any remaining data at end of loop (Howard Chu)
2023-02-06 12:36:39 -05:00
luigi1111 5fae6d63a8
Merge pull request #8705
b247f98 Demote large pages warning to mdebug (SChernykh)
b27a171 RandomX: print VM allocation warnings only once (SChernykh)
2023-02-06 12:35:37 -05:00
luigi1111 889951e7c5
Merge pull request #8700
3461a19 daemonizer: don't uninstall windows service on exit (selsta)
2023-02-06 12:34:41 -05:00
luigi1111 3ff22aee95
Merge pull request #8699
f3420cb readline_buffer: disable bracketed paste escape sequences (Jeffrey Ryan)
2023-02-06 12:34:06 -05:00
luigi1111 2521f0e238
Merge pull request #8697
e91f35e win-service: enable auto startup (plowsof)
2023-02-06 12:33:03 -05:00
luigi1111 c12bc62306
Merge pull request #8693
bfd7c00 heed NO_COLOR environment variable (moneromooo-monero)
2023-02-06 12:26:02 -05:00
luigi1111 85702d70af
Merge pull request #8692
b67e931 epee: when loading a JSON RPC payload, ensure params is an object (moneromooo-monero)
2023-02-06 12:25:13 -05:00
luigi1111 672eedf9c2
Merge pull request #8691
934b798 rpc: do not misidentify coinbase txes as pruned (moneromooo-monero)
2023-02-06 12:24:17 -05:00
j-berman 6c73dc742e properly terminate interrupted TCP connection. fixes #8685 2023-02-04 22:03:51 +01:00
moneromooo-monero 9e09093a8d
wallet_rpc_server: allow creating more than 64 addresses at once
it's too low a limit (at least one person mentioned having to
call create_address in a loop due to it)
2023-02-03 16:57:48 +00:00
koe bc3cec4634 add variant class with cleaner interface than boost::variant<> 2023-01-30 22:03:35 -06:00
selsta d8a84489d2
p2p: add plowsof seed nodes 2023-01-27 14:15:31 +01:00
selsta 69153e870d
p2p: remove offline seed nodes 2023-01-27 14:06:45 +01:00
tobtoht eaa3aff81e
depends: bump hidapi/libusb
fixes Trezor connectivity issues on Windows 10/11

Co-authored-by: selsta <selsta@sent.at>
2023-01-25 21:50:46 +01:00
tobtoht 1082720980
README: fix void ssl package
https://voidlinux.org/news/2021/02/OpenSSL.html
2023-01-23 22:05:01 +01:00
Crypto City 9c7d28b8ed
wallet2: add on_reorg callback 2023-01-19 17:34:45 +00:00
Howard Chu cb756b6094
blockchain-stats: print any remaining data at end of loop
Fix #8711
2023-01-17 17:20:18 +00:00
SChernykh b247f985db Demote large pages warning to `mdebug` 2023-01-17 18:13:07 +01:00
mj-xmr 5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
SChernykh b27a17110d RandomX: print VM allocation warnings only once 2023-01-11 19:15:11 +01:00
luigi1111 50aa0e8b7f
Merge pull request #8675
1a568de Cache successful erRctNonSemanticsSimple calls (SChernykh)
2023-01-11 12:27:40 -05:00
luigi1111 75d80d431a
Merge pull request #8686
7a3a593 common: move boost_serialization_helper.h out and cleanup includes (Jeffrey Ryan)
2023-01-11 12:13:48 -05:00
luigi1111 ac87d8dac9
Merge pull request #8682
96677ff common: add missing includes (selsta)
2023-01-11 12:12:57 -05:00
luigi1111 451ff7bd91
Merge pull request #8677
fe8522c Bump WINVER to 0x0600 (Windows Vista) (SChernykh) dab7d01 Refactored rx-slow-hash.c (SChernykh)
2023-01-11 12:10:02 -05:00
luigi1111 ad80aa0f65
Merge pull request #8671
a160270 update readme with v0.18.1.2 version number (Gingeropolous)
2023-01-11 11:47:11 -05:00
luigi1111 3854cc04be
Merge pull request #8663
b1bce85 miscellaneous crypto updates (koe)
2023-01-11 11:45:40 -05:00
luigi1111 d3ad02fffb
Merge pull request #8653
61842f9 workflows: set a public DNS when doing tests (selsta)
2023-01-11 11:43:39 -05:00
luigi1111 0cb6a5c78a
Merge pull request #8651
6558e7e Correct/modernize build instructions for OpenBSD (Offshore Monero)
0e5ecd4 Turn readline off on OpenBSD because it is broken (Offshore Monero)
2023-01-11 11:43:08 -05:00
luigi1111 9489586add
Merge pull request #8648
8687da6 common: DNSResolver can handle hostnames without dot characters (Jeffrey Ryan)
2023-01-11 11:41:11 -05:00
luigi1111 719d5571ac
Merge pull request #8645
832173a gpg_keys: bump my key validity by another two years (moneromooo-monero)
2023-01-11 11:40:40 -05:00
luigi1111 b363eebd52
Merge pull request #8643
faaf2af p2p: fix exclusive node DNS resolution for certain hosts (Jeffrey Ryan)
2023-01-11 11:39:42 -05:00
luigi1111 ac8580c1f5
Merge pull request #8640
1a3ae18 p2p: fix back ping to discover healthy peers to connect to (j-berman)
2023-01-11 11:38:38 -05:00
luigi1111 a09b5b3c95
Merge pull request #8632
ab7102e epee: remove dead HTTP code (Jeffrey Ryan)
2023-01-11 11:37:37 -05:00
SChernykh fe8522c564 Bump WINVER to 0x0600 (Windows Vista)
This is required to use SRW locks in Windows - see `src/crypto/c_threads.h`
2023-01-09 07:48:00 +01:00
SChernykh dab7d01dc0 Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
2023-01-09 07:43:07 +01:00
plowsof 7c36110ec7 ci: update copyright 2023-01-06 04:58:05 +00:00
Jeffrey Ryan f3420cb750 readline_buffer: disable bracketed paste escape sequences 2023-01-04 16:04:32 -06:00
koe b1bce857c9 miscellaneous crypto updates 2023-01-03 16:50:08 -06:00
selsta 3461a19940
daemonizer: don't uninstall windows service on exit 2023-01-03 03:45:43 +01:00
plowsof e91f35e030 win-service: enable auto startup 2023-01-02 05:18:48 +00:00
moneromooo-monero d89e7a239d
util: make GMT timestamps explicit for clarity
For privacy reasons, time functions use GMT, to avoid logs leaking
timezones. It'd make more sense to use localtime for wallet output
(which are not logged by default), but that adds inconsistencies
which can also be confusing. So add a Z suffix for now to make it
clear these are not local time.
2023-01-01 10:38:13 +00:00
moneromooo-monero bfd7c00ced
heed NO_COLOR environment variable 2023-01-01 10:24:46 +00:00
moneromooo-monero b67e931843
epee: when loading a JSON RPC payload, ensure params is an object
this makes it easier to spot those mistakes by the caller
2023-01-01 10:10:28 +00:00
moneromooo-monero 934b798c74
rpc: do not misidentify coinbase txes as pruned 2023-01-01 09:30:59 +00:00
rbrunner7 9752116ed3 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call 2022-12-30 13:50:22 +01:00
koe f50b9e3803 revisions 2022-12-29 17:39:34 -06:00
koe e5aa058a8d vtnerd review comments 2022-12-24 19:15:27 -06:00
Jeffrey Ryan 7a3a593a77 common: move boost_serialization_helper.h out and cleanup includes 2022-12-22 12:18:02 -06:00
SChernykh 1a568deacb Cache successful `verRctNonSemanticsSimple` calls 2022-12-20 22:16:39 +01:00
koe c60b11f3da add compare_func() method so user-defined comparison functions are easier to use 2022-12-19 15:50:16 -06:00
selsta 96677fffcd
common: add missing includes 2022-12-18 18:30:08 +01:00
koe 73298734d6 adjust is_sorted_and_unique() 2022-12-18 10:18:46 -06:00
koe b986421b4f adjust multiexp pippenger_cached_data for better reusability 2022-12-16 11:48:57 -06:00
koe 3d60475753 comment updates 2022-12-15 13:04:34 -06:00
Gingeropolous a1602700b1
update readme with v0.18.1.2 version number
updated readme with all relevant instances of v0.18.0.0 changed to v0.18.1.2
2022-12-07 07:08:27 -05:00
koe acfaaeda7a add container helpers 2022-12-01 17:25:26 -06:00
koe 5c505bda29 performance test framework updates: allow custom test parameters, better error reporting 2022-12-01 17:07:52 -06:00
luigi1111 9367b432f6
Merge pull request #8635
8b8326a workflows: ubuntu 18.04 is deprecated (selsta)
2022-12-01 01:11:39 -06:00
luigi1111 7275a4d23b
Merge pull request #8627
a7bf3af Fix dandelion++ fluff/stem bug with local txes (Lee Clagett)
2022-12-01 01:10:20 -06:00
luigi1111 2f168da7f7
Merge pull request #8618
1114e7e fix(trezor-tests): fix trezor tests build, fix integrated addr test (Dusan Klinec)
2022-12-01 01:08:53 -06:00
luigi1111 179a87afae
Merge pull request #8616
cac5083 wallet2: fix create view-only wallet from existing wallet (j-berman)
2022-12-01 01:08:11 -06:00
luigi1111 1cfe69c7f1
Merge pull request #8610
97b86a0 wallet_api: take priority into account when estimating fee (selsta)
2022-12-01 01:05:14 -06:00
luigi1111 74d82f9e47
Merge pull request #8603
6f00070 workflows: skip ci when only changing documentation (selsta)
2022-12-01 01:03:24 -06:00
luigi1111 a5c7ae2761
Merge pull request #8602
8e98aaa workflows: build gitian on tag (selsta)
2022-12-01 01:02:49 -06:00
luigi1111 4a5f8a0c4d
Merge pull request #8575
98ce6f1 depends: remove unused file (selsta)
2022-12-01 01:02:25 -06:00
luigi1111 12489c69cb
Merge pull request #8572
50b7492 unit_tests: suppress memwipe unit warning (Jeffrey Ryan)
2022-12-01 01:01:34 -06:00
luigi1111 32a1cd1bf1
Merge pull request #8503
d06202d blockchain_prune: faster (moneromooo-monero)
2022-12-01 01:00:15 -06:00
Offshore Monero 6558e7e2c6 Correct/modernize build instructions for OpenBSD 2022-12-01 04:28:46 +00:00
Offshore Monero 0e5ecd4603 Turn readline off on OpenBSD because it is broken 2022-12-01 04:27:48 +00:00
selsta 61842f9d33
workflows: set a public DNS when doing tests 2022-11-28 11:37:33 +01:00
Jeffrey Ryan 8687da6276 common: DNSResolver can handle hostnames without dot characters
Unrelated, but similar code-wise to #8643. There is a check in `DNSResolver` which automatically fails to resolve hostnames which do not contain the `.` character. This PR removes that check.
2022-11-21 15:54:23 -06:00
Jeffrey Ryan faaf2af43b p2p: fix exclusive node DNS resolution for certain hosts
Fixes #8633. The function `append_net_address` did not parse hostname + port addresses (e.g. `bar:29080`) correctly if the hostname did not contain a `'.'` character.

@vtnerd comments 1

clear up 2nd conditional statement
2022-11-17 18:55:09 -06:00
moneromooo-monero 832173a490
gpg_keys: bump my key validity by another two years 2022-11-17 17:45:14 +00:00
Dusan Klinec 1114e7eed7
fix(trezor-tests): fix trezor tests build, fix integrated addr test
- fix integrated address test, it was not testing integrated address suport
- fix trezor test build as dependent classes were changed
- add a friend test class for Monero::WalletImpl to support wallet api tests
When using wallet_api in tests, synthetic chain is used. Without being able to set `allow_mismatched_daemon_version` in the underlying wallet, we are not able to use a synthetic chain with the tests
2022-11-17 12:12:23 +01:00
selsta 8e98aaa18d
workflows: build gitian on tag 2022-11-17 02:47:27 +01:00
j-berman 1a3ae18ef9 p2p: fix back ping to discover healthy peers to connect to 2022-11-14 16:54:45 -08:00
Jeffrey Ryan ab7102e31f epee: remove dead HTTP code
http_client.h
2022-11-13 20:27:21 -06:00
selsta 8b8326adfd
workflows: ubuntu 18.04 is deprecated 2022-11-14 02:15:26 +01:00
luigi1111 365fd45b03
Merge pull request #8593
be8efec workflows: ubuntu 18.04 is deprecated (selsta)
2022-10-28 00:52:41 -04:00
luigi1111 709ef69b01
Merge pull request #8590
74ec950 readme: fix instructions for win64 cross builds (erciccione)
2022-10-28 00:52:07 -04:00
luigi1111 9579ba58c7
Merge pull request #8580
ebb85d7 Add Gitian builds to README (duggavo)
2022-10-28 00:51:43 -04:00
luigi1111 e7d673e367
Merge pull request #8571
9274426 Keys: Update for expired 'rbrunner7' key, valid 2 years (rbrunner7)
2022-10-28 00:50:39 -04:00
luigi1111 400f236650
Merge pull request #8570
8923441 fix build in netbsd (mmyjona)
2022-10-28 00:50:17 -04:00
luigi1111 5b208f988a
Merge pull request #8569
b526a4b levin_abstract_invoke: remove dead code (Jeffrey Ryan)
2022-10-28 00:49:45 -04:00
luigi1111 05ccf6804f
Merge pull request #8564
f69adef Fix static builds for Ubuntu 22.04 (AgoraDesk / LocalMonero)
2022-10-28 00:49:22 -04:00
luigi1111 a43a5caefe
Merge pull request #8543
d21fd92 rpc: dont shrink slice when loading from binary (Jeffrey Ryan)
2022-10-28 00:48:48 -04:00
luigi1111 8672553e3d
Merge pull request #8529
09d69b6 rpc: remove overwriting value (SerHack)
2022-10-28 00:47:55 -04:00
luigi1111 f41c68648c
Merge pull request #8527
e988530 Remove redundant check (SerHack)
2022-10-28 00:47:26 -04:00
luigi1111 2ab0732d1a
Merge pull request #8525
501db2c Wallet RPC: remove duplicate line (SerHack)
2022-10-28 00:46:50 -04:00
luigi1111 45ffdc26a6
Merge pull request #8517
6f0fb76 blockchain: fix invalid memory read getting fee on empty chain (Crypto City)
2022-10-28 00:46:19 -04:00
luigi1111 aba564c86e
Merge pull request #8516
26c630f Update release check-list with lessons learned from v15/v16 fork (Seth For Privacy)
2022-10-28 00:45:42 -04:00
luigi1111 9f5c7209a0
Merge pull request #8355
23fde15 wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (moneromooo-monero) 5bb2369 wallet_rpc_server: add --no-initial-sync flag for quicker network binding (moneromooo-monero)
2022-10-28 00:44:59 -04:00
luigi1111 0407ee5135
Merge pull request #8319
b15aee2 readme edits squash (Gingeropolous)
2022-10-28 00:43:36 -04:00
Lee Clagett a7bf3aff2c Fix dandelion++ fluff/stem bug with local txes 2022-10-25 16:09:55 -04:00
j-berman cac5083427 wallet2: fix create view-only wallet from existing wallet 2022-10-18 13:48:43 -05:00
selsta 97b86a014c
wallet_api: take priority into account when estimating fee 2022-10-13 03:35:19 +02:00
selsta 6f000700f2
workflows: skip ci when only changing documentation 2022-10-01 21:32:58 +02:00
luigi1111 fc907a9570
Merge pull request #8587
8e7c7af Move update_checkpoints() to a later stage (SChernykh)
2022-09-26 15:00:35 -05:00
luigi1111 e44bf0b060
Merge pull request #8586
e9ce347 wallet2: fail to establish daemon cxn == 'Disconnected' cxn status (j-berman)
2022-09-26 14:59:43 -05:00
luigi1111 239d210a18
Merge pull request #8576
28f25c0 Second thread pool for IO (SChernykh)
2022-09-26 14:50:56 -05:00
luigi1111 8e04921ac4
Merge pull request #8574
fa7622c depends: remove unused Qt package (selsta)
2022-09-26 14:49:49 -05:00
luigi1111 cfe38f2242
Merge pull request #8420
6d8fa2b workflows: add android to depends (selsta)
2022-09-26 14:49:09 -05:00
luigi1111 0a10a4f870
Merge pull request #8329
4b0785f add an option to force-update multisig key exchange under some circumstances (koe)
2022-09-26 14:46:06 -05:00
Lee Clagett 4f3a54b2a0 Remove invoke function in levin handler 2022-09-26 16:47:18 +00:00
selsta be8efec6a1
workflows: ubuntu 18.04 is deprecated
And will soon be removed.
2022-09-24 21:02:41 +02:00
erciccione 74ec9503db
readme: fix instructions for win64 cross builds 2022-09-23 15:10:50 +02:00
SChernykh 8e7c7af05f Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:04:50 +02:00
j-berman e9ce347f83 wallet2: fail to establish daemon cxn == "Disconnected" cxn status 2022-09-21 21:54:57 -06:00
koe 4b0785f1c9 add an option to force-update multisig key exchange under some circumstances 2022-09-21 12:38:35 -05:00
duggavo ebb85d7152
Add Gitian builds to README 2022-09-21 13:29:58 +00:00
SChernykh 28f25c0dbc Second thread pool for IO 2022-09-20 09:59:58 +02:00
selsta 98ce6f1864
depends: remove unused file 2022-09-20 00:55:41 +02:00
selsta fa7622cfdc
depends: remove unused Qt package 2022-09-20 00:01:19 +02:00
Jeffrey Ryan 50b7492e67 unit_tests: suppress memwipe unit warning
Fixes warning:
```
warning: ‘*(uint32_t*)quux’ may be used uninitialized [-Wmaybe-uninitialized]
   49 |     MDEBUG(std::hex << std::setw(8) << std::setfill('0') << *(uint32_t*)quux);
warning: ‘quux’ may be used uninitialized [-Wmaybe-uninitialized]
   50 |     if (wipe) { ASSERT_TRUE(memcmp(quux, "bar", 3)); }
```
2022-09-16 10:47:00 -05:00
rbrunner7 9274426183
Keys: Update for expired 'rbrunner7' key, valid 2 years 2022-09-16 15:05:04 +02:00
mmyjona 8923441ff2
fix build in netbsd 2022-09-15 04:38:47 -07:00
luigi1111 c9cfa25183
Merge pull request #8556
b8271ab wallet2: check wallet compatibility with daemon's hard fork version (j-berman)
2022-09-15 00:35:03 -05:00
luigi1111 df37c148d4
Merge pull request #8551
eca7f6a Fix segfault restoring encrypted multisig seed (j-berman)
f713c3c Require user ack multisig is experimental to restore (j-berman)
564a7a3 multisig: fix #8537 seed restore (suggestions by @UkoeHB) (j-berman)
2022-09-15 00:34:05 -05:00
Jeffrey Ryan b526a4bf1e levin_abstract_invoke: remove dead code 2022-09-14 20:09:29 -05:00
j-berman b8271ab881 wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:24:24 -06:00
AgoraDesk / LocalMonero f69adef4c1 Fix static builds for Ubuntu 22.04
Link libbsd, libmd, libprotokit for ZMQ to fix static builds for Ubuntu 22.04
2022-09-13 00:11:02 +08:00
luigi1111 6402dbee69
Merge pull request #8554
76a5b54 Fix missing semi-colon in error message (j-berman)
2022-09-09 12:56:53 -05:00
luigi1111 87a4b37497
Merge pull request #8547
e410ab7 Windows: fix unicode file path support (tobtoht)
2022-09-09 12:54:30 -05:00
luigi1111 ed150fa821
Merge pull request #8538
3987827 Fix shared_ptr cycle in test_epee_connection.test_lifetime (Lee Clagett)
2022-09-09 12:53:51 -05:00
luigi1111 ddb434fc19
Merge pull request #8519
2639c4f rpc: skip bootstrap nodes that are lower than last checkpoint (selsta)
2022-09-09 12:49:46 -05:00
luigi1111 c89d06341a
Merge pull request #8513
959a3e6 wallet2: ensure imported outputs subaddresses are created (moneromooo-monero)
a098504 wallet2: better test on whether to allow output import (moneromooo-monero)
c5579ac allow exporting outputs in chunks (moneromooo-monero)
1e912ec wallet2: fixes for export/import output flow (j-berman)
692f1d4 wallet2: do not assume imported outputs must be non empty (moneromooo-monero)
67b6d6a wallet2: prevent importing outputs in a hot wallet (moneromooo-monero)
d9fc666 wallet2: fix missing subaddress indices in 'light' exported outputs (moneromooo-monero)
2022-09-09 12:48:47 -05:00
luigi1111 e553884d1f
Merge pull request #8348
a4cb77f epee: update 'http_server_handlers_map2.h' macros to use fully qualified names (Jeffrey Ryan)
2022-09-09 12:46:39 -05:00
j-berman eca7f6ae98 Fix segfault restoring encrypted multisig seed 2022-09-07 17:24:03 -06:00
j-berman 76a5b54d58 Fix missing semi-colon in error message
Co-authored-by: woodser <woodser@protonmail.com>
2022-09-06 18:41:16 -06:00
selsta 2639c4f2ff
rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:06:45 +02:00
j-berman f713c3c335 Require user ack multisig is experimental to restore 2022-09-06 11:59:28 -06:00
j-berman 564a7a31e8 multisig: fix #8537 seed restore (suggestions by @UkoeHB)
- spend secret key is no longer the sum of multisig key shares;
no need to check that is the case upon restore.
- restoring a multisig wallet from multisig info means that the
wallet must have already completed all setup rounds. Upon restore,
set the number of rounds completed accordingly.
2022-09-06 11:59:25 -06:00
tobtoht e410ab7478 Windows: fix unicode file path support 2022-09-02 12:22:24 +02:00
Jeffrey Ryan d21fd9242c rpc: dont shrink slice when loading from binary 2022-08-30 19:26:39 -05:00
Lee Clagett 3987827517 Fix shared_ptr cycle in test_epee_connection.test_lifetime 2022-08-26 20:12:13 -04:00
moneromooo-monero 959a3e627f
wallet2: ensure imported outputs subaddresses are created
reported by j-berman
2022-08-24 13:52:36 +00:00
luigi1111 5256fdd7a1
Merge pull request #8497
8305a9f depends: remove unused packages (selsta)
2022-08-22 22:52:50 -05:00
luigi1111 2807a24ecb
Merge pull request #8496
7b15f21 README: unbound is not vendored anymore (selsta)
2022-08-22 22:52:27 -05:00
luigi1111 af8b0fb815
Merge pull request #8495
796513f repo: remove ldns leftovers (selsta)
2022-08-22 22:51:55 -05:00
luigi1111 4e42d6c69d
Merge pull request #8490
f8d76ec version: bump master version number (selsta)
2022-08-22 22:50:47 -05:00
luigi1111 f46f16467a
Merge pull request #8486
6b61628 dns_util: remove outdated DNSSEC DS trust anchor (selsta)
2022-08-22 22:50:20 -05:00
luigi1111 ab63fbc549
Merge pull request #8465
04a1e28 ledger support for hf 15 (BP+, view tags) (j-berman)
2022-08-22 22:49:47 -05:00
luigi1111 386032dad9
Merge pull request #8462
f7f1445 device: set ledger min app version (selsta)
2022-08-22 22:49:07 -05:00
luigi1111 8112c52404
Merge pull request #8460
85e697f randomx: update submodule (selsta)
2022-08-22 22:48:29 -05:00
luigi1111 77053298ed
Merge pull request #8450
600de07 wallet_rpc_server: longer timeout for stop_mining (moneromooo-monero)
ac6db92 functional_tests: silence the cpu power test program (moneromooo-monero)
2022-08-22 22:47:45 -05:00
luigi1111 ae6ec3913d
Merge pull request #8444
308e3fa gpg_keys: add jeffro256 key (Jeffrey Ryan)
2022-08-22 22:47:12 -05:00
luigi1111 5e2c851132
Merge pull request #8442
ef1924a Bump to v0.18.1.0 (Seth For Privacy)
89a2df6 Migrate VERSION variable to non-export (Seth For Privacy)
b83874e Set version in ENV var (Seth For Privacy)
bb955d1 Bump Gitian build instructions to v0.18.0.0 (Seth For Privacy)
2022-08-22 22:46:34 -05:00
luigi1111 53a8cf7f8c
Merge pull request #8428
7a31d25 keccak: error out if passed mdlen 100 (moneromooo-monero)
2022-08-22 22:45:59 -05:00
luigi1111 ce80747c58
Merge pull request #8427
1fc60ca Publish submitted txs via zmq (j-berman)
2022-08-22 22:45:14 -05:00
luigi1111 f0f3879ba4
Merge pull request #8419
8ea6c33 Fix some paths for toolchain / build (Howard Chu)
2022-08-22 22:44:34 -05:00
luigi1111 645d752b19
Merge pull request #8415
628fdcd continue pool pruning even if a tx can't be found (j-berman)
2022-08-22 22:44:04 -05:00
luigi1111 3c78f4d3d4
Merge pull request #8381
f797655 Fixed get_block_template_backlog performance (SChernykh)
2022-08-22 22:43:12 -05:00
luigi1111 2056ef78a0
Merge pull request #8379
4a4936b Fix use of rtxn without a mdb_txn_safe wrapper (Howard Chu)
2022-08-22 22:41:08 -05:00
luigi1111 df02b56289
Merge pull request #8359
4d7f6f5 GCC: fix some unused warnings (Jeffrey Ryan)
2022-08-22 22:40:09 -05:00
luigi1111 67a27fb384
Merge pull request #8352
552528b Remove async_blocked_mode_client (Jeffrey Ryan)
3ee2174 string_coding: unused functions (Jeffrey Ryan)
285d9f0 http_server_handlers_map2: dead macros (Jeffrey Ryan)
2022-08-22 22:39:34 -05:00
luigi1111 8d0487d6b7
Merge pull request #8333
0093bc2 Focus Doxygen documentation (Jeffrey Ryan)
2022-08-22 22:38:56 -05:00
luigi1111 c286e030d4
Merge pull request #8323
564fa30 DOCS: Rework Portable storage format example (Jeffrey Ryan)
2022-08-22 22:38:26 -05:00
luigi1111 080fc69435
Merge pull request #8299
a0df140 feat(trezor): add HF15 support, BP+ (Dusan Klinec)
2022-08-22 22:37:08 -05:00
SerHack 09d69b6946
rpc: remove overwriting value 2022-08-22 10:34:50 +02:00
SerHack e988530e01
Remove redundant check 2022-08-22 10:19:12 +02:00
SerHack 501db2cedb
Wallet RPC: remove duplicate line 2022-08-21 10:52:33 +02:00
Crypto City 6f0fb76025
blockchain: fix invalid memory read getting fee on empty chain 2022-08-19 14:39:27 +00:00
Seth For Privacy 26c630f659
Update release check-list with lessons learned from v15/v16 fork 2022-08-19 08:14:20 -04:00
moneromooo-monero a0985044d9
wallet2: better test on whether to allow output import
Being offline is not a good enough heuristic, so we keep track
of whether the wallet ever refreshed from a daemon, which is a
lot better, and probably the best we can do without manual user
designation (which would break existing cold wallet setups till
the user designates those wallets)
2022-08-18 19:29:03 +00:00
moneromooo-monero c5579ac236
allow exporting outputs in chunks
this will make it easier huge wallets to do so without hitting
random limits (eg, max string size in node).
2022-08-18 06:53:41 +00:00
j-berman 1e912ecd8a
wallet2: fixes for export/import output flow
- only allow offline wallets to import outputs
- don't import empty outputs
- export subaddress indexes when exporting outputs
2022-08-16 14:22:42 +00:00
moneromooo-monero 692f1d4e3d
wallet2: do not assume imported outputs must be non empty 2022-08-16 14:22:33 +00:00
moneromooo-monero 67b6d6ae2c
wallet2: prevent importing outputs in a hot wallet 2022-08-16 14:22:33 +00:00
moneromooo-monero d9fc666db8
wallet2: fix missing subaddress indices in "light" exported outputs 2022-08-16 14:22:24 +00:00
moneromooo-monero d06202dcc0
blockchain_prune: faster
on my anecdotal SSD, goes from about 9 hours to 1h20.
2022-08-15 16:16:18 +00:00
selsta 8305a9f9ef
depends: remove unused packages 2022-08-11 18:19:54 +02:00
selsta 7b15f21ef0
README: unbound is not vendored anymore 2022-08-11 00:48:50 +02:00
selsta 796513ff5f
repo: remove ldns leftovers 2022-08-11 00:21:42 +02:00
Seth For Privacy ef1924a9cf
Bump to v0.18.1.0 2022-08-09 08:20:54 -04:00
selsta f8d76ecb57
version: bump master version number
Otherwise Ledger rejects the wallet.
2022-08-09 03:37:27 +02:00
j-berman 04a1e2875d ledger support for hf 15 (BP+, view tags) 2022-08-06 15:00:49 -07:00
selsta 6b61628881
dns_util: remove outdated DNSSEC DS trust anchor 2022-08-06 19:46:53 +02:00
SChernykh f79765579c Fixed get_block_template_backlog performance
Before the fix, it processed all transactions in the mempool which could be very slow when mempool grows to several MBs in size. I observed `get_block_template_backlog` taking up to 15 seconds of CPU time under high mempool load.

After the fix, only transactions that can potentially be mined in the next block will be processed (a bit more than the current block median weight).
2022-07-26 07:21:21 +02:00
selsta f7f14459f5
device: set ledger min app version 2022-07-24 21:01:22 +02:00
selsta 85e697fa7b
randomx: update submodule 2022-07-24 17:38:59 +02:00
Jeffrey Ryan 564fa30966 DOCS: Rework Portable storage format example
@jtgrassie pointed out that the example I provided was colored incorrectly. He also made the good point that the image wasn't easy to review/correct. I reworked the example so that it's text-only. It's easier to review and edit, and reveals the structure better in my opinion. Also this is easier for people who can't distinguish colors as easily.

Make sure to double-check this work because there's a decent chance I screwed up the comments. The actual byte data was generated and should be solid.
2022-07-22 12:20:03 -05:00
j-berman 1fc60cac58 Publish submitted txs via zmq 2022-07-21 11:36:00 -07:00
moneromooo-monero 600de07bcf wallet_rpc_server: longer timeout for stop_mining
That RPC will wait for mining to actually stop, which can be a while
if randomx has just started on randomx_init_dataset.

This fixes occasional failures in the mining functional test
2022-07-21 12:00:05 +00:00
moneromooo-monero ac6db928c2 functional_tests: silence the cpu power test program
it's very spammy and drowns the test output
2022-07-21 12:00:05 +00:00
Howard Chu 4a4936b8af
Fix use of rtxn without a mdb_txn_safe wrapper 2022-07-20 20:58:03 +01:00
Jeffrey Ryan 308e3fa302 gpg_keys: add jeffro256 key 2022-07-18 12:55:43 -05:00
Seth For Privacy 89a2df67cd
Migrate VERSION variable to non-export 2022-07-18 10:32:54 -04:00
Seth For Privacy b83874e9bd
Set version in ENV var 2022-07-18 10:14:44 -04:00
Seth For Privacy bb955d1a73
Bump Gitian build instructions to v0.18.0.0 2022-07-18 08:32:55 -04:00
Jeffrey Ryan 0093bc230a Focus Doxygen documentation
Right now Doxygen is documenting everything in the repo including submodules, everything in contrib,
util, tests, etc. This bogs down the documentation to the point where it is very hard to navigate. I think
it would be a good move to focus on documenting only the main C++ code which is specific to this repo.

Right now this means documenting `src/` (without SUPERCOP), `contrib/epee/`, `external/easylogging++`. After this commit,
Doxygen went from running >6000 graphs to about 2200 graphs.
2022-07-11 20:47:55 -05:00
Jeffrey Ryan 4d7f6f5cd5 GCC: fix some unused warnings
hash_extra: don't test for success in `jh_hash` and `skein_hash` since its guaranteed
device_ledger: move anonymous global variable apdu_verbose into .cpp file
Add comments to `refreshed` method variable in wallet2
2022-07-11 20:32:03 -05:00
moneromooo-monero 7a31d25b67
keccak: error out if passed mdlen 100
If we were to call it with 100, it would cause rsiz to be 0,
leading to an infinite loop.
This is really a pedantic patch, but since there's already a
range test, might as well make it better.
2022-07-11 17:43:59 +00:00
selsta 6d8fa2b9a9
workflows: add android to depends 2022-07-05 22:03:18 +02:00
Howard Chu 8ea6c339e4
Fix some paths for toolchain / build 2022-07-05 20:04:37 +01:00
j-berman 628fdcdd49 continue pool pruning even if a tx can't be found 2022-07-01 09:44:58 -07:00
Dusan Klinec a0df140fd6
feat(trezor): add HF15 support, BP+
- BP+ support added for Trezor
- old Trezor firmware version support removed, code cleanup
2022-06-20 19:42:56 +02:00
Jeffrey Ryan 552528b0ea Remove async_blocked_mode_client 2022-06-17 00:27:06 -05:00
moneromooo-monero 23fde151ee
wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing 2022-06-03 07:15:15 +00:00
moneromooo-monero 5bb2369b55
wallet_rpc_server: add --no-initial-sync flag for quicker network binding 2022-05-25 09:02:27 +00:00
Jeffrey Ryan 3ee2174892 string_coding: unused functions 2022-05-23 16:03:42 -05:00
Jeffrey Ryan 285d9f04d5 http_server_handlers_map2: dead macros 2022-05-23 15:31:13 -05:00
Jeffrey Ryan a4cb77f9f3 epee: update 'http_server_handlers_map2.h' macros to use fully qualified names
quick patch which fixes the issue where if you use some macros from `http_server_handlers_map2.h` you have to be in the `epee` namespace or it doesn't compile. Now can remove `using namespace epee;` from header file `core_rpc_server.h`, which caused a couple of name qualifying mistakes
2022-05-23 14:46:36 -05:00
Gingeropolous b15aee2b0d readme edits squash 2022-05-22 22:59:18 -04:00
878 changed files with 17749 additions and 12849 deletions

View File

@ -2,6 +2,9 @@ name: ci/gh-actions/cli
on:
push:
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
paths-ignore:
- 'docs/**'
@ -9,7 +12,7 @@ on:
# The below variables reduce repetitions across similar targets
env:
REMOVE_BUNDLED_BOOST : rm -rf /usr/local/share/boost
REMOVE_BUNDLED_PACKAGES : sudo rm -rf /usr/local
BUILD_DEFAULT_LINUX: |
cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build -j3
APT_INSTALL_LINUX: 'sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler ccache'
@ -20,6 +23,7 @@ env:
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
USE_DEVICE_TREZOR_MANDATORY: ON
jobs:
build-macos:
@ -27,16 +31,18 @@ jobs:
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- name: install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf ccache
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf@21 ccache
brew link protobuf@21
- name: build
run: |
${{env.CCACHE_SETTINGS}}
@ -51,18 +57,23 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: C:\Users\runneradmin\.ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- uses: eine/setup-msys2@v2
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git
- shell: msys2 {0}
run: |
curl -O https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-protobuf-c-1.4.1-1-any.pkg.tar.zst
curl -O https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-protobuf-21.9-1-any.pkg.tar.zst
pacman --noconfirm -U mingw-w64-x86_64-protobuf-c-1.4.1-1-any.pkg.tar.zst mingw-w64-x86_64-protobuf-21.9-1-any.pkg.tar.zst
- name: build
run: |
${{env.CCACHE_SETTINGS}}
@ -77,18 +88,18 @@ jobs:
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
matrix:
os: [ubuntu-latest, ubuntu-18.04]
os: [ubuntu-22.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-${{ matrix.os }}
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: remove bundled packages
run: ${{env.REMOVE_BUNDLED_PACKAGES}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
@ -101,20 +112,20 @@ jobs:
${{env.BUILD_DEFAULT_LINUX}}
libwallet-ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-libwallet-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-libwallet-
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: remove bundled packages
run: ${{env.REMOVE_BUNDLED_PACKAGES}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
@ -129,21 +140,21 @@ jobs:
test-ubuntu:
needs: build-ubuntu
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-build-ubuntu-latest-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-ubuntu-latest
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: remove bundled packages
run: ${{env.REMOVE_BUNDLED_PACKAGES}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
@ -151,10 +162,11 @@ jobs:
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: install Python dependencies
run: pip install requests psutil monotonic
run: pip install requests psutil monotonic zmq deepdiff
- name: tests
env:
CTEST_OUTPUT_ON_FAILURE: ON
DNS_PUBLIC: tcp://9.9.9.9
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
@ -166,8 +178,9 @@ jobs:
source-archive:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: archive
run: |
@ -176,7 +189,7 @@ jobs:
export OUTPUT="$VERSION.tar"
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
/home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: /home/runner/work/monero/monero/${{ env.OUTPUT }}

56
.github/workflows/copyright.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: ci/gh-actions/copyright
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Make changes to pull request
continue-on-error: true
shell: bash
run: |
year=$(date +%Y)
echo "YEAR=$(echo $year)" >> $GITHUB_ENV
find . -print0 | while IFS= read -r -d '' file
do
if [[ -d $file ]] || [[ $file == *".git"* ]]; then
continue
fi
line=$(grep .*Copyright.*Monero.* $file || true)
if [[ -z $line ]]; then
continue
fi
fromTo=$(grep -o "[0-9]\{4\}-[0-9]\{4\}" <<< $line || true)
if [[ ! -z $fromTo ]]; then
# string contains "FROM-TO"
# we need to replace FROM with current year
to=$(awk '{split($0, array, "-"); print array[2]}' <<< ${fromTo})
repl=${line/"$to"/"$year"}
else
# we only have a FROM year
# find occurance of 4 digits
from=$(grep -o "[0-9]\{4\}" <<< $line || true)
fromTo="${from}-${year}"
# replace FROM with FROM-TO
repl=${line/"$from"/"$fromTo"}
fi
sed -i "s|${line}|${repl}|g" $file
done
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Copyright: Update to ${{ env.YEAR }}"
committer: GitHub <noreply@github.com>
author: copyCat <copy@Cat.com>
signoff: false
branch: bump-copyright-year
delete-branch: true
title: "Copyright: Update to ${{ env.YEAR }}"
body: |
Happy new year!
draft: false

View File

@ -2,6 +2,9 @@ name: ci/gh-actions/depends
on:
push:
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
paths-ignore:
- 'docs/**'
@ -15,10 +18,11 @@ env:
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
USE_DEVICE_TREZOR_MANDATORY: ON
jobs:
build-cross:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
@ -36,40 +40,44 @@ jobs:
packages: "python3 gperf g++-aarch64-linux-gnu"
- name: "i686 Win"
host: "i686-w64-mingw32"
packages: "python3 g++-mingw-w64-i686 qttools5-dev-tools"
packages: "python3 g++-mingw-w64-i686"
- name: "i686 Linux"
host: "i686-pc-linux-gnu"
packages: "gperf cmake g++-multilib python3-zmq"
- name: "Win64"
host: "x86_64-w64-mingw32"
packages: "cmake python3 g++-mingw-w64-x86-64 qttools5-dev-tools"
packages: "cmake python3 g++-mingw-w64-x86-64"
- name: "x86_64 Linux"
host: "x86_64-unknown-linux-gnu"
packages: "gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
- name: "Cross-Mac x86_64"
host: "x86_64-apple-darwin11"
host: "x86_64-apple-darwin"
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
- name: "Cross-Mac aarch64"
host: "aarch64-apple-darwin11"
host: "aarch64-apple-darwin"
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
- name: "x86_64 Freebsd"
host: "x86_64-unknown-freebsd"
packages: "clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
- name: "ARMv8 Android"
host: "aarch64-linux-android"
packages: "gperf cmake python3"
name: ${{ matrix.toolchain.name }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Most volatile cache
- name: ccache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
restore-keys: ccache-${{ matrix.toolchain.host }}-
# Less volatile cache
- name: depends cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: contrib/depends/built
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
@ -78,7 +86,7 @@ jobs:
depends-${{ matrix.toolchain.host }}-
# Static cache
- name: OSX SDK cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: contrib/depends/sdk-sources
key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
@ -96,8 +104,8 @@ jobs:
run: |
${{env.CCACHE_SETTINGS}}
make depends target=${{ matrix.toolchain.host }} -j2
- uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
- uses: actions/upload-artifact@v4
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
with:
name: ${{ matrix.toolchain.name }}
path: |

49
.github/workflows/gitian.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: ci/gh-actions/gitian
on:
push:
tags:
- '*'
jobs:
build-gitian:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
operating-system:
- name: "Linux"
option: "l"
- name: "Windows"
option: "w"
- name: "Android"
option: "a"
- name: "FreeBSD"
option: "f"
- name: "macOS"
option: "m"
name: ${{ matrix.operating-system.name }}
steps:
- name: prepare
run: |
sudo apt update
curl -O https://raw.githubusercontent.com/monero-project/monero/${{ github.ref_name }}/contrib/gitian/gitian-build.py
chmod +x gitian-build.py
- name: setup
run: |
./gitian-build.py --setup --docker github-actions ${{ github.ref_name }}
- name: build
run: |
./gitian-build.py --docker --detach-sign --no-commit --build -j 3 -o ${{ matrix.operating-system.option }} github-actions ${{ github.ref_name }}
- name: post build
run: |
cd out/${{ github.ref_name }}
shasum -a256 *
echo \`\`\` >> $GITHUB_STEP_SUMMARY
shasum -a256 * >> $GITHUB_STEP_SUMMARY
echo \`\`\` >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.operating-system.name }}
path: |
out/${{ github.ref_name }}/*

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#
@ -28,6 +28,9 @@
#
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
cmake_minimum_required(VERSION 3.5)
message(STATUS "CMake version ${CMAKE_VERSION}")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
list(INSERT CMAKE_MODULE_PATH 0
@ -37,15 +40,15 @@ include(CheckCXXCompilerFlag)
include(CheckLinkerFlag)
include(CheckLibraryExists)
include(CheckFunctionExists)
if (POLICY CMP0148)
cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html
endif()
include(FindPythonInterp)
if (IOS)
INCLUDE(CmakeLists_IOS.txt)
endif()
cmake_minimum_required(VERSION 3.5)
message(STATUS "CMake version ${CMAKE_VERSION}")
project(monero)
option (USE_CCACHE "Use ccache if a usable instance is found" ON)
@ -96,7 +99,7 @@ enable_language(C ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
@ -219,7 +222,7 @@ function(forbid_undefined_symbols)
file(MAKE_DIRECTORY "${TEST_PROJECT}")
file(WRITE "${TEST_PROJECT}/CMakeLists.txt"
[=[
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.5)
project(test)
option(EXPECT_SUCCESS "" ON)
file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
@ -412,7 +415,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
else()
set(DEFAULT_BUILD_DEBUG_UTILITIES OFF)
endif()
option(BUILD_DEBUG_UTILITIES "Build debug utilities." DEFAULT_BUILD_DEBUG_UTILITIES)
option(BUILD_DEBUG_UTILITIES "Build debug utilities." ${DEFAULT_BUILD_DEBUG_UTILITIES})
if(OSSFUZZ)
message(STATUS "Using OSS-Fuzz fuzzing system")
@ -449,15 +452,12 @@ endif()
# Check if we're on OpenBSD. See the README.md for build instructions.
if(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
set(OPENBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
set(NETBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
set(BSDI TRUE)
endif()
# TODO: check bsdi, NetBSD, to see if they need the same FreeBSD changes
#
# elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
# set(NETBSD TRUE)
# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
# set(BSDI TRUE)
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
if(APPLE)
@ -531,7 +531,7 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
# On ARM, having libunwind package (with .so's only) installed breaks static link.
# When possible, avoid stack tracing using libunwind in favor of using easylogging++.
if (APPLE)
if (APPLE OR NETBSD)
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
elseif (DEPENDS AND NOT LINUX)
@ -704,7 +704,7 @@ endif()
include(CheckTrezor)
if(MSVC)
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /D__SSE4_1__")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10485760")
if(STATIC)
@ -712,7 +712,6 @@ if(MSVC)
string(REPLACE "/MD" "/MT" ${VAR} "${${VAR}}")
endforeach()
endif()
include_directories(SYSTEM src/platform/msc)
else()
include(TestCXXAcceptsFlag)
message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
@ -789,12 +788,11 @@ else()
set(WARNINGS "${WARNINGS} -Wno-error=unused-value -Wno-error=unused-but-set-variable")
set(MINGW_FLAG "${MINGW_FLAG} -DWIN32_LEAN_AND_MEAN")
set(Boost_THREADAPI win32)
include_directories(SYSTEM src/platform/mingw)
# mingw doesn't support LTO (multiple definition errors at link time)
set(USE_LTO_DEFAULT false)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760")
if(NOT BUILD_64)
add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
add_definitions(-DWINVER=0x0600 -D_WIN32_WINNT=0x0600)
endif()
endif()
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
@ -1004,6 +1002,9 @@ else()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
if(ARM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-aligned-allocation")
endif()
endif()
set(DEBUG_FLAGS "-g3")
@ -1075,8 +1076,14 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale)
set(BOOST_COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
if (WIN32)
list(APPEND BOOST_COMPONENTS locale)
endif()
find_package(Boost 1.58 QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
add_definitions(-DBOOST_NO_AUTO_PTR)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
if(NOT Boost_FOUND)
@ -1100,9 +1107,7 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
if(MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
if(DEPENDS)
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
else()
if(NOT DEPENDS)
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
endif()
elseif(APPLE OR OPENBSD OR ANDROID)
@ -1116,7 +1121,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
set(EXTRA_LIBRARIES socket nsl resolv)
elseif(NOT MSVC AND NOT DEPENDS)
find_library(RT rt)
set(EXTRA_LIBRARIES ${RT})
find_library(Z z)
set(EXTRA_LIBRARIES ${RT} ${Z})
endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
@ -1124,7 +1130,7 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
if (APPLE)
if(DEPENDS)
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit")
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit -framework Security")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(APPKIT AppKit)
@ -1139,7 +1145,9 @@ if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
endif()
endif()
option(USE_READLINE "Build with GNU readline support." ON)
if(NOT OPENBSD)
option(USE_READLINE "Build with GNU readline support." ON)
endif()
if(USE_READLINE AND NOT DEPENDS)
find_package(Readline)
if(READLINE_FOUND AND GNU_READLINE_FOUND)
@ -1171,13 +1179,20 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND
endif()
endif()
if(STATIC)
set(sodium_USE_STATIC_LIBS ON)
endif()
find_package(Sodium REQUIRED)
find_path(ZMQ_INCLUDE_PATH zmq.h)
find_library(ZMQ_LIB zmq)
find_library(PGM_LIBRARY pgm)
find_library(NORM_LIBRARY norm)
find_library(GSSAPI_LIBRARY gssapi_krb5)
find_library(PROTOLIB_LIBRARY protolib)
find_library(SODIUM_LIBRARY sodium)
find_library(BSD_LIBRARY bsd)
find_library(MD_LIBRARY md)
find_library(PROTOKIT_LIBRARY protokit)
if(NOT ZMQ_INCLUDE_PATH)
message(FATAL_ERROR "Could not find required header zmq.h")
@ -1197,8 +1212,17 @@ endif()
if(PROTOLIB_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}")
endif()
if(SODIUM_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
if(Sodium_FOUND)
set(ZMQ_LIB "${ZMQ_LIB};${sodium_LIBRARIES}")
endif()
if(BSD_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${BSD_LIBRARY}")
endif()
if(MD_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${MD_LIBRARY}")
endif()
if(PROTOKIT_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${PROTOKIT_LIBRARY}")
endif()
include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion

View File

@ -1,4 +1,4 @@
# Portions Copyright (c) 2017-2022, The Monero Project
# Portions Copyright (c) 2017-2023, The Monero Project
# This file is based off of the https://code.google.com/archive/p/ios-cmake/
# It has been altered for Monero iOS development
#

View File

@ -754,7 +754,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = .
INPUT = contrib/epee external/easylogging++ 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
@ -805,7 +805,7 @@ EXCLUDE_SYMLINKS = NO
# 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 = */build/* */contrib/depends/*
EXCLUDE_PATTERNS = */src/crypto/crypto_ops_builder/ref10*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the

View File

@ -1,4 +1,4 @@
Copyright (c) 2014-2022, The Monero Project
Copyright (c) 2014-2023, The Monero Project
All rights reserved.

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#
@ -104,7 +104,7 @@ release-all:
release-static:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
cd $(builddir)/release && cmake -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
coverage:
mkdir -p $(builddir)/debug

View File

@ -1,6 +1,6 @@
# Monero
Copyright (c) 2014-2022 The Monero Project.
Copyright (c) 2014-2023, The Monero Project
Portions Copyright (c) 2012-2013 The Cryptonote developers.
## Table of Contents
@ -20,6 +20,7 @@ Portions Copyright (c) 2012-2013 The Cryptonote developers.
- [Release staging schedule and protocol](#release-staging-schedule-and-protocol)
- [Compiling Monero from source](#compiling-monero-from-source)
- [Dependencies](#dependencies)
- [Gitian builds](#gitian-builds)
- [Internationalization](#Internationalization)
- [Using Tor](#using-tor)
- [Pruning](#Pruning)
@ -29,7 +30,6 @@ Portions Copyright (c) 2012-2013 The Cryptonote developers.
## Development resources
- Web: [getmonero.org](https://getmonero.org)
- Forum: [forum.getmonero.org](https://forum.getmonero.org)
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
- GitHub: [https://github.com/monero-project/monero](https://github.com/monero-project/monero)
- IRC: [#monero-dev on Libera](https://web.libera.chat/#monero-dev)
@ -117,10 +117,11 @@ See [LICENSE](LICENSE).
If you want to help out, see [CONTRIBUTING](docs/CONTRIBUTING.md) for a set of guidelines.
## Scheduled software upgrades
## Scheduled software/network upgrades
Monero uses a fixed-schedule software upgrade (hard fork) mechanism to implement new features. This means that users of Monero (end users and service providers) should run current versions and upgrade their software on a regular schedule. Software upgrades occur during the months of April and October. The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Monero software version. Below is the historical schedule and the projected schedule for the next upgrade.
Dates are provided in the format YYYY-MM-DD.
Monero uses a scheduled software/network upgrade (hard fork) mechanism to implement new features into the Monero software and network. This means that users of Monero (end users and service providers) should run current versions and upgrade their software when new releases are available. Software upgrades occur when new features are developed and implemented in the codebase. Network upgrades occur in tandem with software upgrades that modify the consensus rules of the Monero network. The required software for network upgrades will be available prior to the scheduled network upgrade date. Please check the repository prior to this date for the proper Monero software version. Below is the historical schedule and the projected schedule for the next upgrade.
Dates are provided in the format YYYY-MM-DD. The "Minimum" is the software version that follows the new consensus rules. The "Recommended" version may include bug fixes and other new features that do not affect the consensus rules.
| Software upgrade block height | Date | Fork version | Minimum Monero version | Recommended Monero version | Details |
@ -138,8 +139,8 @@ Dates are provided in the format YYYY-MM-DD.
| 1978433 | 2019-11-30 | v12 | v0.15.0.0 | v0.16.0.0 | New PoW based on RandomX, only allow >= 2 outputs, change to the block median used to calculate penalty, v1 coinbases are forbidden, rct sigs in coinbase forbidden, 10 block lock time for incoming outputs
| 2210000 | 2020-10-17 | v13 | v0.17.0.0 | v0.17.3.2 | New CLSAG transaction format
| 2210720 | 2020-10-18 | v14 | v0.17.1.1 | v0.17.3.2 | forbid old MLSAG transaction format
| 2688888 | 2022-08-13 | v15 | v0.18.0.0 | v0.18.0.0 | ringsize = 16, bulletproofs+, view tags, adjusted dynamic block weight algorithm
| 2689608 | 2022-08-14 | v16 | v0.18.0.0 | v0.18.0.0 | forbid old v14 transaction format
| 2688888 | 2022-08-13 | v15 | v0.18.0.0 | v0.18.1.2 | ringsize = 16, bulletproofs+, view tags, adjusted dynamic block weight algorithm
| 2689608 | 2022-08-14 | v16 | v0.18.0.0 | v0.18.1.2 | forbid old v14 transaction format
| XXXXXXX | XXX-XX-XX | XXX | vX.XX.X.X | vX.XX.X.X | XXX |
X's indicate that these details have not been determined as of commit date.
@ -165,20 +166,19 @@ library archives (`.a`).
| Dep | Min. version | Vendored | Debian/Ubuntu pkg | Arch pkg | Void pkg | Fedora pkg | Optional | Purpose |
| ------------ | ------------- | -------- | -------------------- | ------------ | ------------------ | ------------------- | -------- | --------------- |
| GCC | 5 | NO | `build-essential` | `base-devel` | `base-devel` | `gcc` | NO | |
| GCC | 7 | NO | `build-essential` | `base-devel` | `base-devel` | `gcc` | NO | |
| CMake | 3.5 | NO | `cmake` | `cmake` | `cmake` | `cmake` | NO | |
| pkg-config | any | NO | `pkg-config` | `base-devel` | `base-devel` | `pkgconf` | NO | |
| Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | `boost-devel` | NO | C++ libraries |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `libressl-devel` | `openssl-devel` | NO | sha256 sum |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | `openssl-devel` | NO | sha256 sum |
| libzmq | 4.2.0 | NO | `libzmq3-dev` | `zeromq` | `zeromq-devel` | `zeromq-devel` | NO | ZeroMQ library |
| OpenPGM | ? | NO | `libpgm-dev` | `libpgm` | | `openpgm-devel` | NO | For ZeroMQ |
| libnorm[2] | ? | NO | `libnorm-dev` | | | | YES | For ZeroMQ |
| libunbound | 1.4.16 | YES | `libunbound-dev` | `unbound` | `unbound-devel` | `unbound-devel` | NO | DNS resolver |
| libunbound | 1.4.16 | NO | `libunbound-dev` | `unbound` | `unbound-devel` | `unbound-devel` | NO | DNS resolver |
| libsodium | ? | NO | `libsodium-dev` | `libsodium` | `libsodium-devel` | `libsodium-devel` | NO | cryptography |
| libunwind | any | NO | `libunwind8-dev` | `libunwind` | `libunwind-devel` | `libunwind-devel` | YES | Stack traces |
| liblzma | any | NO | `liblzma-dev` | `xz` | `liblzma-devel` | `xz-devel` | YES | For libunwind |
| libreadline | 6.3.0 | NO | `libreadline6-dev` | `readline` | `readline-devel` | `readline-devel` | YES | Input editing |
| ldns | 1.6.17 | NO | `libldns-dev` | `ldns` | `libldns-devel` | `ldns-devel` | YES | SSL toolkit |
| expat | 1.1 | NO | `libexpat1-dev` | `expat` | `expat-devel` | `expat-devel` | YES | XML parsing |
| GTest | 1.5 | YES | `libgtest-dev`[1] | `gtest` | `gtest-devel` | `gtest-devel` | YES | Test suite |
| ccache | any | NO | `ccache` | `ccache` | `ccache` | `ccache` | YES | Compil. cache |
@ -205,23 +205,23 @@ then:
Install all dependencies at once on Debian/Ubuntu:
```
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz
```
Install all dependencies at once on Arch:
```
sudo pacman -Syu --needed base-devel cmake boost openssl zeromq libpgm unbound libsodium libunwind xz readline ldns expat gtest python3 ccache doxygen graphviz qt5-tools hidapi libusb protobuf systemd
sudo pacman -Syu --needed base-devel cmake boost openssl zeromq libpgm unbound libsodium libunwind xz readline expat gtest python3 ccache doxygen graphviz qt5-tools hidapi libusb protobuf systemd
```
Install all dependencies at once on Fedora:
```
sudo dnf install gcc gcc-c++ cmake pkgconf boost-devel openssl-devel zeromq-devel openpgm-devel unbound-devel libsodium-devel libunwind-devel xz-devel readline-devel ldns-devel expat-devel gtest-devel ccache doxygen graphviz qt5-linguist hidapi-devel libusbx-devel protobuf-devel protobuf-compiler systemd-devel
sudo dnf install gcc gcc-c++ cmake pkgconf boost-devel openssl-devel zeromq-devel openpgm-devel unbound-devel libsodium-devel libunwind-devel xz-devel readline-devel expat-devel gtest-devel ccache doxygen graphviz qt5-linguist hidapi-devel libusbx-devel protobuf-devel protobuf-compiler systemd-devel
```
Install all dependencies at once on openSUSE:
```
sudo zypper ref && sudo zypper in cppzmq-devel ldns-devel libboost_chrono-devel libboost_date_time-devel libboost_filesystem-devel libboost_locale-devel libboost_program_options-devel libboost_regex-devel libboost_serialization-devel libboost_system-devel libboost_thread-devel libexpat-devel libminiupnpc-devel libsodium-devel libunwind-devel unbound-devel cmake doxygen ccache fdupes gcc-c++ libevent-devel libopenssl-devel pkgconf-pkg-config readline-devel xz-devel libqt5-qttools-devel patterns-devel-C-C++-devel_C_C++
sudo zypper ref && sudo zypper in cppzmq-devel libboost_chrono-devel libboost_date_time-devel libboost_filesystem-devel libboost_locale-devel libboost_program_options-devel libboost_regex-devel libboost_serialization-devel libboost_system-devel libboost_thread-devel libexpat-devel libminiupnpc-devel libsodium-devel libunwind-devel unbound-devel cmake doxygen ccache fdupes gcc-c++ libevent-devel libopenssl-devel pkgconf-pkg-config readline-devel xz-devel libqt5-qttools-devel patterns-devel-C-C++-devel_C_C++
```
Install all dependencies at once on macOS with the provided Brewfile:
@ -345,7 +345,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (
```bash
git clone https://github.com/monero-project/monero.git
cd monero
git checkout v0.18.0.0
git checkout v0.18.1.2
```
* Build:
@ -464,10 +464,10 @@ application.
cd monero
```
* If you would like a specific [version/tag](https://github.com/monero-project/monero/tags), do a git checkout for that version. eg. 'v0.18.0.0'. If you don't care about the version and just want binaries from master, skip this step:
* If you would like a specific [version/tag](https://github.com/monero-project/monero/tags), do a git checkout for that version. eg. 'v0.18.1.2'. If you don't care about the version and just want binaries from master, skip this step:
```bash
git checkout v0.18.0.0
git checkout v0.18.1.2
```
* If you are on a 64-bit system, run:
@ -507,12 +507,12 @@ Monero is also available as a port or package as `monero-cli`.
### On OpenBSD:
You will need to add a few packages to your system. `pkg_add cmake gmake zeromq libiconv boost`.
You will need to add a few packages to your system. `pkg_add cmake gmake zeromq libiconv boost libunbound`.
The `doxygen` and `graphviz` packages are optional and require the xbase set.
Running the test suite also requires `py-requests` package.
Running the test suite also requires `py3-requests` package.
Build monero: `env DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/usr/local gmake release-static`
Build monero: `gmake`
Note: you may encounter the following error when compiling the latest version of Monero as a normal user:
@ -563,7 +563,9 @@ You can also cross-compile static binaries on Linux for Windows and macOS with t
* ```make depends target=x86_64-linux-gnu``` for 64-bit linux binaries.
* ```make depends target=x86_64-w64-mingw32``` for 64-bit windows binaries.
* Requires: `python3 g++-mingw-w64-x86-64 wine1.6 bc`
* ```make depends target=x86_64-apple-darwin11``` for macOS binaries.
* You also need to run:
```update-alternatives --set x86_64-w64-mingw32-g++ x86_64-w64-mingw32-g++-posix && update-alternatives --set x86_64-w64-mingw32-gcc x86_64-w64-mingw32-gcc-posix```
* ```make depends target=x86_64-apple-darwin``` for macOS binaries.
* Requires: `cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev`
* ```make depends target=i686-linux-gnu``` for 32-bit linux binaries.
* Requires: `g++-multilib bc`
@ -587,6 +589,20 @@ Using `depends` might also be easier to compile Monero on Windows than using MSY
The produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc. Passing `-DBACKCOMPAT=ON` to cmake will make sure that the binary will run on systems having at least libc version 2.17.
### Trezor hardware wallet support
If you have an issue with building Monero with Trezor support, you can disable it by setting `USE_DEVICE_TREZOR=OFF`, e.g.,
```bash
USE_DEVICE_TREZOR=OFF make release
```
For more information, please check out Trezor [src/device_trezor/README.md](src/device_trezor/README.md).
### Gitian builds
See [contrib/gitian/README.md](contrib/gitian/README.md).
## Installing Monero from a package
**DISCLAIMER: These packages are not part of this repository or maintained by this project's contributors, and as such, do not go through the same review process to ensure their trustworthiness and security.**
@ -610,10 +626,10 @@ More info and versions in the [Debian package tracker](https://tracker.debian.or
sudo pacman -S monero
```
* Void Linux:
* NixOS:
```bash
xbps-install -S monero
nix-shell -p monero-cli
```
* GuixSD
@ -632,6 +648,12 @@ More info and versions in the [Debian package tracker](https://tracker.debian.or
emerge net-p2p/monero
```
* Alpine Linux:
```bash
apk add monero
```
* macOS [(homebrew)](https://brew.sh/)
```bash
brew install monero

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,8 +1,27 @@
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON)
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON)
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
# Function for setting default options default values via env vars
function(_trezor_default_val val_name val_default)
if(NOT DEFINED ENV{${val_name}})
set(ENV{${val_name}} ${val_default})
endif()
endfunction()
# Define default options via env vars
_trezor_default_val(USE_DEVICE_TREZOR ON)
_trezor_default_val(USE_DEVICE_TREZOR_MANDATORY OFF)
_trezor_default_val(USE_DEVICE_TREZOR_PROTOBUF_TEST ON)
_trezor_default_val(USE_DEVICE_TREZOR_LIBUSB ON)
_trezor_default_val(USE_DEVICE_TREZOR_UDP_RELEASE OFF)
_trezor_default_val(USE_DEVICE_TREZOR_DEBUG OFF)
_trezor_default_val(TREZOR_DEBUG OFF)
# Main options
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" $ENV{USE_DEVICE_TREZOR})
OPTION(USE_DEVICE_TREZOR_MANDATORY "Trezor compilation is mandatory, fail build if Trezor support cannot be compiled" $ENV{USE_DEVICE_TREZOR_MANDATORY})
OPTION(USE_DEVICE_TREZOR_PROTOBUF_TEST "Trezor Protobuf test" $ENV{USE_DEVICE_TREZOR_PROTOBUF_TEST})
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" $ENV{USE_DEVICE_TREZOR_LIBUSB})
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" $ENV{USE_DEVICE_TREZOR_UDP_RELEASE})
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" $ENV{USE_DEVICE_TREZOR_DEBUG})
OPTION(TREZOR_DEBUG "Main Trezor debugging switch" $ENV{TREZOR_DEBUG})
# Helper function to fix cmake < 3.6.0 FindProtobuf variables
function(_trezor_protobuf_fix_vars)
@ -30,33 +49,62 @@ function(_trezor_protobuf_fix_vars)
endif()
endfunction()
macro(trezor_fatal_msg msg)
if ($ENV{USE_DEVICE_TREZOR_MANDATORY})
message(FATAL_ERROR
"${msg}\n"
"==========================================================================\n"
"[ERROR] To compile without Trezor support, set USE_DEVICE_TREZOR=OFF. "
"It is possible both via cmake variable and environment variable, e.g., "
"`USE_DEVICE_TREZOR=OFF make release`\n"
"For more information, please check src/device_trezor/README.md\n"
)
else()
message(WARNING
"${msg}\n"
"==========================================================================\n"
"[WARNING] Trezor support cannot be compiled! Skipping Trezor compilation. \n"
"For more information, please check src/device_trezor/README.md\n")
set(USE_DEVICE_TREZOR OFF)
return() # finish this cmake file processing (as this is macro).
endif()
endmacro()
# Use Trezor master switch
if (USE_DEVICE_TREZOR)
# Protobuf is required to build protobuf messages for Trezor
include(FindProtobuf OPTIONAL)
find_package(Protobuf)
FIND_PACKAGE(Protobuf CONFIG)
if (NOT Protobuf_FOUND)
FIND_PACKAGE(Protobuf)
endif()
_trezor_protobuf_fix_vars()
# Protobuf handling the cache variables set in docker.
if(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
message(STATUS "Could not find Protobuf")
# Early fail for optional Trezor support
if(${Protobuf_VERSION} GREATER 21)
trezor_fatal_msg("Trezor: Unsupported Protobuf version ${Protobuf_VERSION}. Please, use Protobuf v21.")
elseif(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
trezor_fatal_msg("Trezor: Could not find Protobuf")
elseif(NOT Protobuf_LIBRARY OR NOT EXISTS "${Protobuf_LIBRARY}")
message(STATUS "Protobuf library not found: ${Protobuf_LIBRARY}")
trezor_fatal_msg("Trezor: Protobuf library not found: ${Protobuf_LIBRARY}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_PROTOC_EXECUTABLE OR NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
message(STATUS "Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
trezor_fatal_msg("Trezor: Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_INCLUDE_DIR OR NOT EXISTS "${Protobuf_INCLUDE_DIR}")
message(STATUS "Protobuf include dir not found: ${Protobuf_INCLUDE_DIR}")
trezor_fatal_msg("Trezor: Protobuf include dir not found: ${Protobuf_INCLUDE_DIR}")
unset(Protobuf_FOUND)
else()
message(STATUS "Protobuf lib: ${Protobuf_LIBRARY}, inc: ${Protobuf_INCLUDE_DIR}, protoc: ${Protobuf_PROTOC_EXECUTABLE}")
message(STATUS "Trezor: Protobuf lib: ${Protobuf_LIBRARY}, inc: ${Protobuf_INCLUDE_DIR}, protoc: ${Protobuf_PROTOC_EXECUTABLE}")
set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
set(Protobuf_FOUND 1) # override found if all rquired info was provided by variables
set(Protobuf_FOUND 1) # override found if all required info was provided by variables
endif()
if(TREZOR_DEBUG)
set(USE_DEVICE_TREZOR_DEBUG 1)
message(STATUS "Trezor: debug build enabled")
endif()
# Compile debugging support (for tests)
@ -64,7 +112,7 @@ if (USE_DEVICE_TREZOR)
add_definitions(-DWITH_TREZOR_DEBUGGING=1)
endif()
else()
message(STATUS "Trezor support disabled by USE_DEVICE_TREZOR")
message(STATUS "Trezor: support disabled by USE_DEVICE_TREZOR")
endif()
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
@ -85,7 +133,7 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
endif()
if(NOT TREZOR_PYTHON)
message(STATUS "Trezor: Python not found")
trezor_fatal_msg("Trezor: Python not found")
endif()
endif()
@ -93,27 +141,42 @@ endif()
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_CURRENT_LIST_DIR}" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
trezor_fatal_msg("Trezor: Protobuf test generation failed: ${OUT} ${ERR}")
endif()
try_compile(Protobuf_COMPILE_TEST_PASSED
"${CMAKE_BINARY_DIR}"
SOURCES
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
"-DCMAKE_CXX_STANDARD=11"
LINK_LIBRARIES ${Protobuf_LIBRARY}
OUTPUT_VARIABLE OUTPUT
)
if(NOT Protobuf_COMPILE_TEST_PASSED)
message(STATUS "Protobuf Compilation test failed: ${OUTPUT}.")
if(ANDROID)
set(CMAKE_TRY_COMPILE_LINKER_FLAGS "${CMAKE_TRY_COMPILE_LINKER_FLAGS} -llog")
set(CMAKE_TRY_COMPILE_LINK_LIBRARIES "${CMAKE_TRY_COMPILE_LINK_LIBRARIES} log")
endif()
if(USE_DEVICE_TREZOR_PROTOBUF_TEST)
# For now, Protobuf v21 is the maximum supported version as v23 requires C++17. TODO: Remove once we move to C++17
if(${Protobuf_VERSION} GREATER 21)
trezor_fatal_msg("Trezor: Unsupported Protobuf version ${Protobuf_VERSION}. Please, use Protobuf v21.")
endif()
try_compile(Protobuf_COMPILE_TEST_PASSED
"${CMAKE_BINARY_DIR}"
SOURCES
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
CMAKE_FLAGS
CMAKE_EXE_LINKER_FLAGS ${CMAKE_TRY_COMPILE_LINKER_FLAGS}
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
"-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
LINK_LIBRARIES ${Protobuf_LIBRARY} ${CMAKE_TRY_COMPILE_LINK_LIBRARIES}
OUTPUT_VARIABLE OUTPUT
)
if(NOT Protobuf_COMPILE_TEST_PASSED)
trezor_fatal_msg("Trezor: Protobuf Compilation test failed: ${OUTPUT}.")
endif()
else ()
message(STATUS "Trezor: Protobuf Compilation test skipped, build may fail later")
endif()
endif()
# Try to build protobuf messages
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}")
set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}")
set(TREZOR_PROTOBUF_PARAMS "")
@ -123,59 +186,62 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_T
execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
trezor_fatal_msg("Trezor: protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
"OUT: ${OUT}, ERR: ${ERR}."
"Please read src/device_trezor/trezor/tools/README.md")
else()
message(STATUS "Trezor protobuf messages regenerated out: \"${OUT}.\"")
set(DEVICE_TREZOR_READY 1)
add_definitions(-DDEVICE_TREZOR_READY=1)
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DTREZOR_DEBUG=1)
message(STATUS "Trezor: protobuf messages regenerated out: \"${OUT}.\"")
set(DEVICE_TREZOR_READY 1)
add_definitions(-DDEVICE_TREZOR_READY=1)
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DTREZOR_DEBUG=1)
endif()
if(USE_DEVICE_TREZOR_UDP_RELEASE)
message(STATUS "Trezor: UDP transport enabled (emulator)")
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
endif()
if (Protobuf_INCLUDE_DIR)
include_directories(${Protobuf_INCLUDE_DIR})
endif()
# LibUSB support, check for particular version
# Include support only if compilation test passes
if (USE_DEVICE_TREZOR_LIBUSB)
find_package(LibUSB)
endif()
if (LibUSB_COMPILE_TEST_PASSED)
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
if(LibUSB_INCLUDE_DIRS)
include_directories(${LibUSB_INCLUDE_DIRS})
endif()
endif()
set(TREZOR_LIBUSB_LIBRARIES "")
if(LibUSB_COMPILE_TEST_PASSED)
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER})
message(STATUS "Trezor: compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
elseif(USE_DEVICE_TREZOR_LIBUSB AND NOT ANDROID)
trezor_fatal_msg("Trezor: LibUSB not found or test failed, please install libusb-1.0.26")
endif()
if (BUILD_GUI_DEPS)
set(TREZOR_DEP_LIBS "")
set(TREZOR_DEP_LINKER "")
if (Protobuf_LIBRARY)
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
endif()
if(USE_DEVICE_TREZOR_UDP_RELEASE)
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
endif()
if (Protobuf_INCLUDE_DIR)
include_directories(${Protobuf_INCLUDE_DIR})
endif()
# LibUSB support, check for particular version
# Include support only if compilation test passes
if (USE_DEVICE_TREZOR_LIBUSB)
find_package(LibUSB)
endif()
if (LibUSB_COMPILE_TEST_PASSED)
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
if(LibUSB_INCLUDE_DIRS)
include_directories(${LibUSB_INCLUDE_DIRS})
endif()
endif()
set(TREZOR_LIBUSB_LIBRARIES "")
if(LibUSB_COMPILE_TEST_PASSED)
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER})
message(STATUS "Trezor compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
endif()
if (BUILD_GUI_DEPS)
set(TREZOR_DEP_LIBS "")
set(TREZOR_DEP_LINKER "")
if (Protobuf_LIBRARY)
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
endif()
if (TREZOR_LIBUSB_LIBRARIES)
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}")
endif()
if (TREZOR_LIBUSB_LIBRARIES)
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}")
endif()
endif()
endif()

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -95,11 +95,35 @@ if ( LibUSB_FOUND )
endif ( LibUSB_FOUND )
if ( LibUSB_FOUND )
if (APPLE)
if(DEPENDS)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit -framework Security")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
find_library(SECURITY_FRAMEWORK Security)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${SECURITY_FRAMEWORK})
if(STATIC)
find_library(OBJC objc.a)
set(LIBUSB_DEP_LINKER ${OBJC})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
endif()
endif()
endif()
if (WIN32)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
endif()
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES})
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
@ -111,27 +135,6 @@ if ( LibUSB_FOUND )
# Library 1.0.16+ compilation test.
# The check_library_exists does not work well on Apple with shared libs.
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
if (APPLE)
if(DEPENDS)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
if(STATIC)
find_library(OBJC objc.a)
set(LIBUSB_DEP_LINKER ${OBJC})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
endif()
endif()
endif()
if (WIN32)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
endif()
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
try_compile(LibUSB_COMPILE_TEST_PASSED
${CMAKE_BINARY_DIR}
"${CMAKE_CURRENT_LIST_DIR}/test-libusb-version.c"

297
cmake/FindSodium.cmake Normal file
View File

@ -0,0 +1,297 @@
# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication
# along with this software. If not, see
#
# http://creativecommons.org/publicdomain/zero/1.0/
#
########################################################################
# Tries to find the local libsodium installation.
#
# On Windows the sodium_DIR environment variable is used as a default
# hint which can be overridden by setting the corresponding cmake variable.
#
# Once done the following variables will be defined:
#
# sodium_FOUND
# sodium_INCLUDE_DIR
# sodium_LIBRARY_DEBUG
# sodium_LIBRARY_RELEASE
#
#
# Furthermore an imported "sodium" target is created.
#
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(_GCC_COMPATIBLE 1)
endif()
# static library option
if (NOT DEFINED sodium_USE_STATIC_LIBS)
option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF)
endif()
if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST))
unset(sodium_LIBRARY CACHE)
unset(sodium_LIBRARY_DEBUG CACHE)
unset(sodium_LIBRARY_RELEASE CACHE)
unset(sodium_DLL_DEBUG CACHE)
unset(sodium_DLL_RELEASE CACHE)
set(sodium_USE_STATIC_LIBS_LAST ${sodium_USE_STATIC_LIBS} CACHE INTERNAL "internal change tracking variable")
endif()
########################################################################
# UNIX
if (UNIX)
# import pkg-config
find_package(PkgConfig QUIET)
if (PKG_CONFIG_FOUND)
pkg_check_modules(sodium_PKG QUIET libsodium)
endif()
if(sodium_USE_STATIC_LIBS)
foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a
list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
endif()
endforeach()
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
# if pkgconfig for libsodium doesn't provide
# static lib info, then override PKG_STATIC here..
if (NOT sodium_PKG_STATIC_FOUND)
set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
endif()
set(XPREFIX sodium_PKG_STATIC)
else()
if (NOT sodium_PKG_FOUND)
set(sodium_PKG_LIBRARIES sodium)
endif()
set(XPREFIX sodium_PKG)
endif()
find_path(sodium_INCLUDE_DIR sodium.h
HINTS ${${XPREFIX}_INCLUDE_DIRS}
)
find_library(sodium_LIBRARY_DEBUG NAMES ${${XPREFIX}_LIBRARIES}
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
find_library(sodium_LIBRARY_RELEASE NAMES ${${XPREFIX}_LIBRARIES}
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
########################################################################
# Windows
elseif (WIN32)
set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
mark_as_advanced(sodium_DIR)
find_path(sodium_INCLUDE_DIR sodium.h
HINTS ${sodium_DIR}
PATH_SUFFIXES include
)
if (MSVC)
# detect target architecture
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" [=[
#if defined _M_IX86
#error ARCH_VALUE x86_32
#elif defined _M_X64
#error ARCH_VALUE x86_64
#endif
#error ARCH_VALUE unknown
]=])
try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp"
OUTPUT_VARIABLE _COMPILATION_LOG
)
string(REGEX REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*" "\\1" _TARGET_ARCH "${_COMPILATION_LOG}")
# construct library path
if (_TARGET_ARCH STREQUAL "x86_32")
string(APPEND _PLATFORM_PATH "Win32")
elseif(_TARGET_ARCH STREQUAL "x86_64")
string(APPEND _PLATFORM_PATH "x64")
else()
message(FATAL_ERROR "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake.")
endif()
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
if (MSVC_VERSION LESS 1900)
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
if (sodium_USE_STATIC_LIBS)
string(APPEND _PLATFORM_PATH "/static")
else()
string(APPEND _PLATFORM_PATH "/dynamic")
endif()
string(REPLACE "$$CONFIG$$" "Debug" _DEBUG_PATH_SUFFIX "${_PLATFORM_PATH}")
string(REPLACE "$$CONFIG$$" "Release" _RELEASE_PATH_SUFFIX "${_PLATFORM_PATH}")
find_library(sodium_LIBRARY_DEBUG libsodium.lib
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX}
)
find_library(sodium_LIBRARY_RELEASE libsodium.lib
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
)
if (NOT sodium_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
find_library(sodium_DLL_DEBUG libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX}
)
find_library(sodium_DLL_RELEASE libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
endif()
elseif(_GCC_COMPATIBLE)
if (sodium_USE_STATIC_LIBS)
find_library(sodium_LIBRARY_DEBUG libsodium.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
find_library(sodium_LIBRARY_RELEASE libsodium.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
else()
find_library(sodium_LIBRARY_DEBUG libsodium.dll.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
find_library(sodium_LIBRARY_RELEASE libsodium.dll.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
file(GLOB _DLL
LIST_DIRECTORIES false
RELATIVE "${sodium_DIR}/bin"
"${sodium_DIR}/bin/libsodium*.dll"
)
find_library(sodium_DLL_DEBUG ${_DLL} libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES bin
)
find_library(sodium_DLL_RELEASE ${_DLL} libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES bin
)
endif()
else()
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
endif()
########################################################################
# unsupported
else()
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
endif()
########################################################################
# common stuff
# extract sodium version
if (sodium_INCLUDE_DIR)
set(_VERSION_HEADER "${_INCLUDE_DIR}/sodium/version.h")
if (EXISTS _VERSION_HEADER)
file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
string(REGEX REPLACE ".*#[ \t]*define[ \t]*SODIUM_VERSION_STRING[ \t]*\"([^\n]*)\".*" "\\1"
sodium_VERSION "${_VERSION_HEADER_CONTENT}")
set(sodium_VERSION "${sodium_VERSION}" PARENT_SCOPE)
endif()
endif()
# communicate results
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Sodium # The name must be either uppercase or match the filename case.
REQUIRED_VARS
sodium_LIBRARY_RELEASE
sodium_LIBRARY_DEBUG
sodium_INCLUDE_DIR
VERSION_VAR
sodium_VERSION
)
if(Sodium_FOUND)
set(sodium_LIBRARIES
optimized ${sodium_LIBRARY_RELEASE} debug ${sodium_LIBRARY_DEBUG})
endif()
# mark file paths as advanced
mark_as_advanced(sodium_INCLUDE_DIR)
mark_as_advanced(sodium_LIBRARY_DEBUG)
mark_as_advanced(sodium_LIBRARY_RELEASE)
if (WIN32)
mark_as_advanced(sodium_DLL_DEBUG)
mark_as_advanced(sodium_DLL_RELEASE)
endif()
# create imported target
if(sodium_USE_STATIC_LIBS)
set(_LIB_TYPE STATIC)
else()
set(_LIB_TYPE SHARED)
endif()
if(NOT TARGET sodium)
add_library(sodium ${_LIB_TYPE} IMPORTED)
endif()
set_target_properties(sodium PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
if (sodium_USE_STATIC_LIBS)
set_target_properties(sodium PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "SODIUM_STATIC"
IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}"
IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}"
)
else()
if (UNIX)
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}"
IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}"
)
elseif (WIN32)
set_target_properties(sodium PROPERTIES
IMPORTED_IMPLIB "${sodium_LIBRARY_RELEASE}"
IMPORTED_IMPLIB_DEBUG "${sodium_LIBRARY_DEBUG}"
)
if (NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND"))
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION_DEBUG "${sodium_DLL_DEBUG}"
)
endif()
if (NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND"))
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION_RELWITHDEBINFO "${sodium_DLL_RELEASE}"
IMPORTED_LOCATION_MINSIZEREL "${sodium_DLL_RELEASE}"
IMPORTED_LOCATION_RELEASE "${sodium_DLL_RELEASE}"
)
endif()
endif()
endif()

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -25,11 +25,11 @@ brew "unbound"
brew "libsodium"
brew "miniupnpc"
brew "readline"
brew "ldns"
brew "expat"
brew "ccache"
brew "doxygen"
brew "graphviz"
brew "libunwind-headers"
brew "xz"
brew "protobuf"
brew "protobuf@21", link: true
brew "libusb"

View File

@ -8,3 +8,4 @@ i686*
mips*
arm*
aarch64*
riscv64*

View File

@ -68,21 +68,6 @@ $(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host)
$(host_arch)_$(host_os)_host=$(host)
host_prefix=$($(host_arch)_$(host_os)_prefix)
build_prefix=$(host_prefix)/native
ifeq ($(host_os),mingw32)
host_cmake=Windows
endif
ifeq ($(host_os),linux)
host_cmake=Linux
endif
ifeq ($(host_os),freebsd)
host_cmake=FreeBSD
endif
ifeq ($(host_os),darwin)
host_cmake=Darwin
endif
ifeq ($(host_os),android)
host_cmake=Android
endif
AT_$(V):=
AT_:=@
@ -110,8 +95,7 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
qt_packages_$(NO_QT) = $(qt_packages)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
all_packages = $(packages) $(native_packages)
@ -122,17 +106,7 @@ $(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
include funcs.mk
CONF_PKGS := cmake-conf mxe-conf
build-only-$(1)_$(3): CMAKE_RUNRESULT_FILE = $(PREFIX)/share/cmake/modules/TryRunResults.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_FILE = $(PREFIX)/$(3)/share/cmake/mxe-conf.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_DIR = $(PREFIX)/$(3)/share/cmake/mxe-conf.d
build-only-$(1)_$(3): CMAKE_STATIC_BOOL = $(if $(findstring shared,$(3)),OFF,ON)
build-only-$(1)_$(3): CMAKE_SHARED_BOOL = $(if $(findstring shared,$(3)),ON,OFF)
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in)
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
@ -143,26 +117,6 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
$(AT)touch $@
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
$(AT)@mkdir -p $(@D)
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
-e 's|@debug@|$(DEBUG)|' \
$< > $@
$(AT)touch $@
$(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
$(AT)@mkdir -p $(@D)
$(AT)sed -e 's|@HOST@|$(host)|' \
@ -182,7 +136,7 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
-e 's|@debug@|$(DEBUG)|' \
-e 's|@release_type@|$(release_type)|' \
-e 's|@build_tests@|$(build_tests)|' \
-e 's|@depends@|$(host_cmake)|' \
-e 's|@cmake_system_name@|$($(host_os)_cmake_system)|' \
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
-e 's|@arch@|$(host_arch)|'\
$< > $@
@ -207,24 +161,26 @@ check-packages:
check-sources:
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
$(host_prefix)/share/config.site: check-packages
$(host_prefix)/share/toolchain.cmake: check-packages
check-packages: check-sources
install: check-packages $(host_prefix)/share/config.site
install: check-packages $(host_prefix)/share/toolchain.cmake
download-one: check-sources $(all_sources)
download-osx:
@$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
@$(MAKE) -s HOST=x86_64-apple-darwin download-one
download-linux:
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
download-win:
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
download: download-osx download-linux download-win
download-freebsd:
@$(MAKE) -s HOST=x86_64-unknown-freebsd download-one
download-android:
@$(MAKE) -s HOST=aarch64-linux-android download-one
download: download-osx download-linux download-win download-freebsd download-android
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources
.PHONY: install cached download-one download-osx download-linux download-win download-freebsd download-android download check-packages check-sources

View File

@ -1,6 +1,6 @@
### Usage
To build dependencies for the current arch+OS:
To build dependencies for the current arch+OS, from this working directory:
```bash
make
@ -20,17 +20,19 @@ make HOST=x86_64-w64-mingw32 -j4
A toolchain will be generated that's suitable for plugging into Monero's
cmake. In the above example, a dir named x86_64-w64-mingw32 will be
created. To use it for Monero:
created. To use it for Monero, from the top of the Monero source tree:
```bash
cmake -DCMAKE_TOOLCHAIN=`pwd`/contrib/depends/x86_64-w64-mingw32
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake ..
```
Common `host-platform-triplets` for cross compilation are:
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
- `x86_64-apple-darwin11` for MacOSX x86_64
- `x86_64-apple-darwin` for MacOSX x86_64
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
- `riscv64-linux-gnu` for Linux RISCV 64 bit

File diff suppressed because it is too large Load Diff

View File

@ -1,81 +0,0 @@
depends_prefix="`dirname ${ac_site_file}`/.."
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 x@host_os@ = xdarwin; then
BREW=no
PORT=no
fi
if test x@host_os@ = xmingw32; then
if test -z $with_qt_incdir; then
with_qt_incdir=$depends_prefix/include
fi
if test -z $with_qt_libdir; then
with_qt_libdir=$depends_prefix/lib
fi
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 PKGCONFIG_LIBDIR=
fi
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
CC="@CC@"
CXX="@CXX@"
OBJC="${CC}"
CCACHE=$depends_prefix/native/bin/ccache
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$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 diff suppressed because it is too large Load Diff

View File

@ -143,8 +143,11 @@ $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
ifeq ($(filter $(1),libusb unbound),)
$(1)_autoconf += --disable-dependency-tracking
endif
ifneq ($($(1)_nm),)
$(1)_autoconf += NM="$$($(1)_nm)"
endif

View File

@ -20,3 +20,4 @@ android_debug_CXXFLAGS=$(android_debug_CFLAGS)
android_native_toolchain=android_ndk
android_cmake_system=Android

View File

@ -1,12 +1,12 @@
OSX_MIN_VERSION=10.8
OSX_MIN_VERSION=10.13
LD64_VERSION=609
ifeq (aarch64, $(host_arch))
CC_target=arm64-apple-$(host_os)
else
CC_target=$(host)
endif
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -iwithsysroot/usr/include/c++/v1 -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)
@ -19,3 +19,5 @@ darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
darwin_native_toolchain=native_cctools darwin_sdk
darwin_cmake_system=Darwin

View File

@ -16,3 +16,4 @@ freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
freebsd_native_toolchain=freebsd_base
freebsd_cmake_system=FreeBSD

View File

@ -30,3 +30,5 @@ 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

View File

@ -9,3 +9,5 @@ mingw32_debug_CFLAGS=-O1
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
mingw32_cmake_system=Windows

View File

@ -1,8 +1,9 @@
package=android_ndk
$(package)_version=17b
$(package)_version=18b
$(package)_download_path=https://dl.google.com/android/repository/
$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
$(package)_sha256_hash=4f61cbe4bbf6406aa5ef2ae871def78010eed6271af72de83f8bd0b07a9fd3fd
$(package)_patches=api_definition.patch
define $(package)_set_vars
$(package)_config_opts_arm=--arch arm
@ -14,6 +15,11 @@ define $(package)_extract_cmds
unzip -q $($(1)_source_dir)/$($(package)_file_name)
endef
define $(package)_preprocess_cmds
cd android-ndk-r$($(package)_version) && \
patch -p1 < $($(package)_patch_dir)/api_definition.patch
endef
define $(package)_stage_cmds
android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
--install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\

View File

@ -3,7 +3,6 @@ $(package)_version=1_64_0
$(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1.64.0/
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
$(package)_dependencies=libiconv
$(package)_patches=fix_aroptions.patch fix_arm_arch.patch
define $(package)_set_vars
@ -22,7 +21,8 @@ $(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
$(package)_config_libraries_$(host_os)="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization"
$(package)_config_libraries_mingw32="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale"
$(package)_cxxflags=-std=c++11
$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
@ -35,7 +35,7 @@ define $(package)_preprocess_cmds
endef
define $(package)_config_cmds
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries_$(host_os))
endef
define $(package)_build_cmds

View File

@ -1,8 +1,8 @@
package=darwin_sdk
$(package)_version=11.1
$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
$(package)_version=12.2
$(package)_download_path=https://bitcoincore.org/depends-sources/sdks
$(package)_file_name=Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
$(package)_sha256_hash=df75d30ecafc429e905134333aeae56ac65fac67cb4182622398fd717df77619
define $(package)_stage_cmds
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\

View File

@ -1,9 +1,8 @@
package=eudev
$(package)_version=v3.2.6
$(package)_download_path=https://github.com/gentoo/eudev/archive/
$(package)_download_file=$($(package)_version).tar.gz
$(package)_version=3.2.14
$(package)_download_path=https://github.com/eudev-project/eudev/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
$(package)_sha256_hash=8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f
define $(package)_set_vars
$(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared

View File

@ -1,12 +1,12 @@
package=expat
$(package)_version=2.4.1
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_4_1
$(package)_version=2.6.0
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
$(package)_sha256_hash=ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba
define $(package)_set_vars
$(package)_config_opts=--enable-static
$(package)_config_opts=--disable-shared
$(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
$(package)_config_opts+=--enable-option-checking --without-xmlwf --with-pic
$(package)_config_opts+=--prefix=$(host_prefix)
endef
@ -23,6 +23,6 @@ define $(package)_stage_cmds
endef
define $(package)_postprocess_cmds
rm lib/*.la
rm -rf share lib/cmake lib/*.la
endef

View File

@ -1,30 +0,0 @@
package=graphviz
$(package)_version=2.40.1
$(package)_download_path=www.graphviz.org/pub/graphviz/stable/SOURCES/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421
define $(package)_preprocess_cmds
./autogen.sh
endef
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-multibye --without-purify --without-curses
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
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
endef

View File

@ -1,8 +1,8 @@
package=hidapi
$(package)_version=0.11.0
$(package)_download_path=https://github.com/libusb/hidapi/archive
$(package)_version=0.13.1
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=391d8e52f2d6a5cf76e2b0c079cfefe25497ba1d4659131297081fc0cd744632
$(package)_sha256_hash=476a2c9a4dc7d1fc97dd223b84338dbea3809a84caea2dcd887d9778725490e3
$(package)_linux_dependencies=libusb eudev
$(package)_patches=missing_win_include.patch

View File

@ -1,27 +0,0 @@
package=icu4c
$(package)_version=55.2
$(package)_download_path=https://github.com/unicode-org/icu/releases/download/release-55-2/
$(package)_file_name=$(package)-55_2-src.tgz
$(package)_sha256_hash=eda2aa9f9c787748a2e2d310590720ca8bcc6252adf6b4cfb03b65bef9d66759
$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch
define $(package)_set_vars
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC -DENABLE_STATIC=YES -DPGKDATA_MODE=static"
endef
define $(package)_config_cmds
patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\
mkdir builda &&\
mkdir buildb &&\
cd builda &&\
sh ../source/runConfigureICU Linux &&\
make &&\
cd ../buildb &&\
sh ../source/runConfigureICU MinGW --enable-static=yes --disable-shared --disable-layout --disable-layoutex --disable-tests --disable-samples --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\
$(MAKE) $($(package)_build_opts)
endef
define $(package)_stage_cmds
cd buildb &&\
$(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/*
endef

View File

@ -1,34 +0,0 @@
package=ldns
$(package)_version=1.7.1
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=8ac84c16bdca60e710eea75782356f3ac3b55680d40e1530d7cea474ac208229
$(package)_dependencies=openssl
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-static --with-drill
$(package)_config_opts+=--with-ssl=$(host_prefix)
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@ -1,23 +0,0 @@
package=libICE
$(package)_version=1.0.9
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
$(package)_dependencies=xtrans xproto
define $(package)_set_vars
$(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
$(package)_config_opts_linux=--with-pic
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

View File

@ -1,23 +0,0 @@
package=libSM
$(package)_version=1.2.2
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
$(package)_dependencies=xtrans xproto libICE
define $(package)_set_vars
$(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
$(package)_config_opts_linux=--with-pic
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

View File

@ -1,35 +0,0 @@
package=libiconv
$(package)_version=1.15
$(package)_download_path=https://ftp.gnu.org/gnu/libiconv
$(package)_file_name=libiconv-$($(package)_version).tar.gz
$(package)_sha256_hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
$(package)_patches=fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--disable-nls
$(package)_config_opts=--enable-static
$(package)_config_opts=--disable-shared
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ &&\
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
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
endef

View File

@ -1,10 +1,11 @@
package=libusb
$(package)_version=1.0.22
$(package)_download_path=https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-$($(package)_version)/
$(package)_version=1.0.27
$(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
$(package)_sha256_hash=ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . && \
autoreconf -i
endef
@ -13,19 +14,12 @@ define $(package)_set_vars
$(package)_config_opts_linux=--with-pic --disable-udev
$(package)_config_opts_mingw32=--disable-udev
$(package)_config_opts_darwin=--disable-udev
$(package)_config_opts_freebsd=--with-pic --disable-udev
endef
ifneq ($(host_os),darwin)
define $(package)_config_cmds
cp -f $(BASEDIR)/config.guess config.guess &&\
cp -f $(BASEDIR)/config.sub config.sub &&\
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
else
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
endif
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmd
$(MAKE)
@ -35,5 +29,6 @@ define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a
define $(package)_postprocess_cmds
cp -f lib/libusb-1.0.a lib/libusb.a
endef

View File

@ -1,20 +0,0 @@
package=native_biplist
$(package)_version=0.9
$(package)_download_path=https://pypi.python.org/packages/source/b/biplist
$(package)_file_name=biplist-$($(package)_version).tar.gz
$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_patches=sorted_list.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/sorted_list.patch
endef
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@ -1,25 +0,0 @@
package=native_ccache
$(package)_version=3.3.4
$(package)_download_path=https://samba.org/ftp/ccache
$(package)_file_name=ccache-$($(package)_version).tar.bz2
$(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567
define $(package)_set_vars
$(package)_config_opts=
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 -rf lib include
endef

View File

@ -1,26 +0,0 @@
package=native_cdrkit
$(package)_version=1.1.11
$(package)_download_path=https://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
define $(package)_config_cmds
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
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

View File

@ -24,6 +24,5 @@ define $(package)_stage_cmds
cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
cp -rf lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ && \
cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
endef

View File

@ -1,23 +0,0 @@
package=native_cmake
$(package)_version=3.14.0
$(package)_version_dot=v3.14
$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/
$(package)_file_name=cmake-$($(package)_version).tar.gz
$(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502
define $(package)_set_vars
$(package)_config_opts=
endef
define $(package)_config_cmds
./bootstrap &&\
./configure $($(package)_config_opts)
endef
define $(package)_build_cmd
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View File

@ -1,17 +0,0 @@
package=native_ds_store
$(package)_version=1.1.0
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@ -1,22 +0,0 @@
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

View File

@ -1,21 +0,0 @@
package=native_mac_alias
$(package)_version=1.1.0
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_patches=python3.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/python3.patch
endef
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@ -1,8 +1,9 @@
package=protobuf3
$(package)_version=3.6.1
$(package)_version=21.12
$(package)_version_protobuf_cpp=3.21.12
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
$(package)_sha256_hash=b3732e471a9bb7950f090fd0457ebd2536a9ba0891b7f3785919c654fe2a2529
$(package)_file_name=protobuf-cpp-$($(package)_version_protobuf_cpp).tar.gz
$(package)_sha256_hash=4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460
$(package)_cxxflags=-std=c++11
define $(package)_set_vars

View File

@ -1,21 +1,19 @@
package=openssl
$(package)_version=1.1.1l
$(package)_version=3.0.13
$(package)_download_path=https://www.openssl.org/source
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
$(package)_patches=fix_darwin.patch
$(package)_sha256_hash=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
define $(package)_set_vars
$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
$(package)_config_env_android=ANDROID_NDK_HOME="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
$(package)_build_env_android=ANDROID_NDK_HOME="$(host_prefix)/native"
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl
$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
$(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native"
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib
$(package)_config_opts+=no-capieng
$(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-heartbeats
$(package)_config_opts+=no-md2
$(package)_config_opts+=no-rc5
$(package)_config_opts+=no-rdrand
@ -23,8 +21,8 @@ $(package)_config_opts+=no-rfc3779
$(package)_config_opts+=no-sctp
$(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-tests
$(package)_config_opts+=no-unit-test
$(package)_config_opts+=no-weak-ssl-ciphers
$(package)_config_opts+=no-zlib
@ -50,8 +48,7 @@ $(package)_config_opts_x86_64_freebsd=BSD-x86_64
endef
define $(package)_preprocess_cmds
sed -i.old 's|"engines", "apps", "test", "util", "tools", "fuzz"|"engines", "tools"|' Configure && \
patch -p1 < $($(package)_patch_dir)/fix_darwin.patch
sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info
endef
define $(package)_config_cmds

View File

@ -1,39 +1,28 @@
packages:=boost openssl zeromq libiconv expat ldns unbound
# ccache is useless in gitian builds
ifneq ($(GITIAN),1)
native_packages := native_ccache
endif
packages:=boost openssl zeromq expat unbound sodium
hardware_packages := hidapi protobuf libusb
hardware_native_packages := native_protobuf
android_native_packages = android_ndk
android_packages = ncurses readline sodium
android_native_packages = android_ndk $(hardware_native_packages)
android_packages = ncurses readline protobuf
darwin_native_packages = $(hardware_native_packages)
darwin_packages = ncurses readline sodium $(hardware_packages)
darwin_packages = ncurses readline $(hardware_packages)
# not really native...
freebsd_native_packages = freebsd_base
freebsd_packages = ncurses readline sodium
freebsd_native_packages = freebsd_base $(hardware_native_packages)
freebsd_packages = ncurses readline protobuf libusb
linux_packages = eudev ncurses readline sodium $(hardware_packages)
linux_packages = eudev ncurses readline $(hardware_packages)
linux_native_packages = $(hardware_native_packages)
qt_packages = qt
ifeq ($(build_tests),ON)
packages += gtest
endif
ifneq ($(host_arch),riscv64)
linux_packages += unwind
endif
mingw32_packages = icu4c sodium $(hardware_packages)
mingw32_packages = $(hardware_packages)
mingw32_native_packages = $(hardware_native_packages)
ifneq ($(build_os),darwin)
darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
endif

View File

@ -1,21 +1,17 @@
package=protobuf
$(package)_version=$(native_$(package)_version)
$(package)_version_protobuf_cpp=$(native_$(package)_version_protobuf_cpp)
$(package)_download_path=$(native_$(package)_download_path)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package)
$(package)_cxxflags=-std=c++11
$(package)_patches=visibility.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
$(package)_config_opts_linux=--with-pic
endef
define $(package)_preprocess_cmds
patch -p0 < $($(package)_patch_dir)/visibility.patch
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef

View File

@ -1,175 +0,0 @@
PACKAGE=qt
$(package)_version=5.15.1
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=33960404d579675b7210de103ed06a72613bfc4305443e278e2d32a3eb1f3d8c
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib
$(package)_patches=fix_qt_pkgconfig.patch fix_no_printer.patch fix_rcc_determinism.patch no-xlib.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=46e0c0e3a511fbcc803a4146204062e47f6ed43b34d98a3c27372a03b8746bd8
$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=c98ee5f0f980bf68cbf0c94d62434816a92441733de50bd9adbe9b9055f03498
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
define $(package)_set_vars
$(package)_config_opts_release = -release
$(package)_config_opts_debug = -debug
$(package)_config_opts += -bindir $(build_prefix)/bin
$(package)_config_opts += -c++std c++11
$(package)_config_opts += -confirm-license
$(package)_config_opts += -dbus-runtime
$(package)_config_opts += -hostprefix $(build_prefix)
$(package)_config_opts += -no-compile-examples
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
$(package)_config_opts += -no-evdev
$(package)_config_opts += -no-gui
$(package)_config_opts += -no-freetype
$(package)_config_opts += -no-gif
$(package)_config_opts += -no-glib
$(package)_config_opts += -no-icu
$(package)_config_opts += -no-ico
$(package)_config_opts += -no-iconv
$(package)_config_opts += -no-kms
$(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libjpeg
$(package)_config_opts += -no-libudev
$(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-sql-db2
$(package)_config_opts += -no-sql-ibase
$(package)_config_opts += -no-sql-oci
$(package)_config_opts += -no-sql-tds
$(package)_config_opts += -no-sql-mysql
$(package)_config_opts += -no-sql-odbc
$(package)_config_opts += -no-sql-psql
$(package)_config_opts += -no-sql-sqlite
$(package)_config_opts += -no-sql-sqlite2
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -opensource
$(package)_config_opts += -no-openssl
$(package)_config_opts += -optimized-qmake
$(package)_config_opts += -pch
$(package)_config_opts += -pkg-config
$(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -no-libpng
$(package)_config_opts += -qt-pcre
$(package)_config_opts += -qt-harfbuzz
$(package)_config_opts += -no-zlib
$(package)_config_opts += -static
$(package)_config_opts += -silent
$(package)_config_opts += -v
$(package)_config_opts += -no-feature-bearermanagement
$(package)_config_opts += -no-feature-colordialog
$(package)_config_opts += -no-feature-dial
$(package)_config_opts += -no-feature-filesystemwatcher
$(package)_config_opts += -no-feature-fontcombobox
$(package)_config_opts += -no-feature-ftp
$(package)_config_opts += -no-feature-image_heuristic_mask
$(package)_config_opts += -no-feature-keysequenceedit
$(package)_config_opts += -no-feature-lcdnumber
$(package)_config_opts += -no-feature-pdf
$(package)_config_opts += -no-feature-printdialog
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printpreviewdialog
$(package)_config_opts += -no-feature-printpreviewwidget
$(package)_config_opts += -no-feature-sessionmanager
$(package)_config_opts += -no-feature-sql
$(package)_config_opts += -no-feature-statemachine
$(package)_config_opts += -no-feature-syntaxhighlighter
$(package)_config_opts += -no-feature-textbrowser
$(package)_config_opts += -no-feature-textodfwriter
$(package)_config_opts += -no-feature-topleveldomain
$(package)_config_opts += -no-feature-udpsocket
$(package)_config_opts += -no-feature-undocommand
$(package)_config_opts += -no-feature-undogroup
$(package)_config_opts += -no-feature-undostack
$(package)_config_opts += -no-feature-undoview
$(package)_config_opts += -no-feature-vnc
$(package)_config_opts += -no-feature-wizard
$(package)_config_opts_linux = -no-fontconfig
$(package)_config_opts_linux += -no-opengl
$(package)_config_opts_linux += -no-xcb
$(package)_config_opts_linux += -no-feature-xlib
endef
define $(package)_fetch_cmds
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
endef
define $(package)_extract_cmds
mkdir -p $($(package)_extract_dir) && \
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
mkdir qtbase && \
tar --strip-components=1 -xf $($(package)_source) -C qtbase && \
mkdir qttranslations && \
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
mkdir qttools && \
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
define $(package)_preprocess_cmds
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf && \
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s/LIBRARY_PATH/(CROSS_)?\0/g" qtbase/mkspecs/features/toolchain.prf
endef
define $(package)_config_cmds
export PKG_CONFIG_SYSROOT_DIR=/ && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
./configure $($(package)_config_opts) && \
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
$(MAKE) sub-src-clean && \
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
endef
define $(package)_build_cmds
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
$(MAKE) -C ../qttools/src/linguist/lrelease && \
$(MAKE) -C ../qttranslations
endef
define $(package)_stage_cmds
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
endef
define $(package)_postprocess_cmds
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
rm -f lib/lib*.la lib/*.prl plugins/*/*.prl
endef

View File

@ -1,17 +1,21 @@
package=unbound
$(package)_version=1.15.0
$(package)_version=1.19.1
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a480dc6c8937447b98d161fe911ffc76cfaffa2da18788781314e81339f1126f
$(package)_dependencies=openssl expat ldns
$(package)_sha256_hash=bc1d576f3dd846a0739adc41ffaa702404c6767d2b6082deb9f2f97cbb24a3a9
$(package)_dependencies=openssl expat
$(package)_patches=disable-glibc-reallocarray.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix)
$(package)_config_opts+=--with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no
$(package)_config_opts+=--without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
$(package)_config_opts_x86_64_darwin=ac_cv_func_SHA384_Init=yes
$(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
$(package)_cflags_mingw32+="-D_WIN32_WINNT=0x600"
endef
define $(package)_preprocess_cmds
@ -30,6 +34,3 @@ endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
endef

View File

@ -1,29 +0,0 @@
package=unwind
$(package)_version=1.5.0
$(package)_download_path=https://download.savannah.nongnu.org/releases/libunwind
$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017
$(package)_patches=fix_obj_order.patch
define $(package)_preprocess_cmds
patch -p0 < $($(package)_patch_dir)/fix_obj_order.patch
endef
define $(package)_config_cmds
cp -f $(BASEDIR)/config.guess config/config.guess &&\
cp -f $(BASEDIR)/config.sub config/config.sub &&\
$($(package)_autoconf) --disable-shared --enable-static --disable-tests --disable-documentation AR_FLAGS=$($(package)_arflags)
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
endef

View File

@ -1,21 +0,0 @@
package=xproto
$(package)_version=7.0.26
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
define $(package)_set_vars
$(package)_config_opts=--disable-shared
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

View File

@ -1,9 +1,8 @@
package=zeromq
$(package)_version=4.3.4
$(package)_version=4.3.5
$(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=06aba27b04c5822cb88a69677382a0f053367143.patch
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
@ -12,10 +11,6 @@ define $(package)_set_vars
$(package)_cxxflags=-std=c++11
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/06aba27b04c5822cb88a69677382a0f053367143.patch
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef

View File

@ -0,0 +1,15 @@
CMake 3.10.2 compatibility, see:
https://github.com/Kitware/CMake/blob/c1e087a9d3af74299d7681c9f9de59e5977a1539/Modules/Platform/Android-Determine.cmake#L105
diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
index b8172b2..1984595 100755
--- a/build/tools/make_standalone_toolchain.py
+++ b/build/tools/make_standalone_toolchain.py
@@ -208,6 +208,7 @@ def make_clang_scripts(install_dir, triple, api, windows):
target = '-'.join([arch, 'none', os_name, env])
common_flags = '-target {}{}'.format(target, api)
+ common_flags += ' -D__ANDROID_API__={}'.format(api)
# We only need mstackrealign to fix issues on 32-bit x86 pre-24. After 24,
# this consumes an extra register unnecessarily, which can cause issues for

View File

@ -1,67 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Fri, 12 Aug 2016 02:01:20 +1000
Subject: [PATCH 1/3] fix windres invocation options
windres doesn't recognise various gcc flags like -mms-bitfields,
-fopenmp, -mthreads etc. (basically not `-D` or `-I`)
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
index 1111111..2222222 100644
--- a/Modules/Platform/Windows-windres.cmake
+++ b/Modules/Platform/Windows-windres.cmake
@@ -1 +1 @@
-set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <SOURCE> <OBJECT>")
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 25 Jul 2017 20:34:56 +1000
Subject: [PATCH 2/3] add option to disable -isystem
taken from (not accepted):
https://gitlab.kitware.com/cmake/cmake/merge_requests/895
see also:
https://gitlab.kitware.com/cmake/cmake/issues/16291
https://gitlab.kitware.com/cmake/cmake/issues/16919
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 1111111..2222222 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -42,7 +42,7 @@ macro(__compiler_gnu lang)
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
+ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
endif()
endmacro()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 15 Aug 2017 15:25:06 +1000
Subject: [PATCH 3/3] add CPACK_NSIS_EXECUTABLE variable
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 1111111..2222222 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -384,7 +384,9 @@ int cmCPackNSISGenerator::InitializeInternal()
}
#endif
- nsisPath = cmSystemTools::FindProgram("makensis", path, false);
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
+ nsisPath = cmSystemTools::FindProgram(
+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
if (nsisPath.empty()) {
cmCPackLogger(

View File

@ -1,37 +0,0 @@
Don't build object files twice
When passed --enable-static and --enable-shared, icu will generate
both a shared and a static version of its libraries.
However, in order to do so, it builds each and every object file
twice: once with -fPIC (for the shared library), and once without
-fPIC (for the static library). While admittedly building -fPIC for a
static library generates a slightly suboptimal code, this is what all
the autotools-based project are doing. They build each object file
once, and they use it for both the static and shared libraries.
icu builds the object files for the shared library as .o files, and
the object files for static library as .ao files. By simply changing
the suffix of object files used for static libraries to ".o", we tell
icu to use the ones built for the shared library (i.e, with -fPIC),
and avoid the double build of icu.
On a fast build server, this brings the target icu build from
3m41.302s down to 1m43.926s (approximate numbers: some other builds
are running on the system at the same time).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/source/config/mh-linux
===================================================================
--- a/source/config/mh-linux
+++ b/source/config/mh-linux
@@ -38,7 +38,7 @@
## Shared object suffix
SO = so
## Non-shared intermediate object suffix
-STATIC_O = ao
+STATIC_O = o
## Compilation rules
%.$(STATIC_O): $(srcdir)/%.c

View File

@ -1,13 +0,0 @@
diff --git a/preload/configure b/preload/configure
index aab5c77..e20b8f0 100755
--- a/preload/configure
+++ b/preload/configure
@@ -588,7 +588,7 @@ MAKEFLAGS=
PACKAGE_NAME='libiconv'
PACKAGE_TARNAME='libiconv'
PACKAGE_VERSION='0'
-PACKAGE_STRING='libiconv 0'
+PACKAGE_STRING='libiconv0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

View File

@ -1,29 +0,0 @@
--- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000
+++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000
@@ -541,7 +541,7 @@
return HashableWrapper(n)
elif isinstance(root, dict):
n = {}
- for key, value in iteritems(root):
+ for key, value in sorted(iteritems(root)):
n[self.wrapRoot(key)] = self.wrapRoot(value)
return HashableWrapper(n)
elif isinstance(root, list):
@@ -616,7 +616,7 @@
elif isinstance(obj, dict):
size = proc_size(len(obj))
self.incrementByteCount('dictBytes', incr=1+size)
- for key, value in iteritems(obj):
+ for key, value in sorted(iteritems(obj)):
check_key(key)
self.computeOffsets(key, asReference=True)
self.computeOffsets(value, asReference=True)
@@ -714,7 +714,7 @@
keys = []
values = []
objectsToWrite = []
- for key, value in iteritems(obj):
+ for key, value in sorted(iteritems(obj)):
keys.append(key)
values.append(value)
for key in keys:

View File

@ -1,86 +0,0 @@
--- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400
+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500
@@ -1139,8 +1139,9 @@
scan_directory_tree(struct directory *this_dir, char *path,
struct directory_entry *de)
{
- DIR *current_dir;
+ int current_file;
char whole_path[PATH_MAX];
+ struct dirent **d_list;
struct dirent *d_entry;
struct directory *parent;
int dflag;
@@ -1164,7 +1165,8 @@
this_dir->dir_flags |= DIR_WAS_SCANNED;
errno = 0; /* Paranoia */
- current_dir = opendir(path);
+ //current_dir = opendir(path);
+ current_file = scandir(path, &d_list, NULL, alphasort);
d_entry = NULL;
/*
@@ -1173,12 +1175,12 @@
*/
old_path = path;
- if (current_dir) {
+ if (current_file >= 0) {
errno = 0;
- d_entry = readdir(current_dir);
+ d_entry = d_list[0];
}
- if (!current_dir || !d_entry) {
+ if (current_file < 0 || !d_entry) {
int ret = 1;
#ifdef USE_LIBSCHILY
@@ -1191,8 +1193,8 @@
de->isorec.flags[0] &= ~ISO_DIRECTORY;
ret = 0;
}
- if (current_dir)
- closedir(current_dir);
+ if(d_list)
+ free(d_list);
return (ret);
}
#ifdef ABORT_DEEP_ISO_ONLY
@@ -1208,7 +1210,7 @@
errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n");
errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n");
}
- closedir(current_dir);
+ free(d_list);
return (1);
}
#endif
@@ -1250,13 +1252,13 @@
* The first time through, skip this, since we already asked
* for the first entry when we opened the directory.
*/
- if (dflag)
- d_entry = readdir(current_dir);
+ if (dflag && current_file >= 0)
+ d_entry = d_list[current_file];
dflag++;
- if (!d_entry)
+ if (current_file < 0)
break;
-
+ current_file--;
/* OK, got a valid entry */
/* If we do not want all files, then pitch the backups. */
@@ -1348,7 +1350,7 @@
insert_file_entry(this_dir, whole_path, d_entry->d_name);
#endif /* APPLE_HYB */
}
- closedir(current_dir);
+ free(d_list);
#ifdef APPLE_HYB
/*

View File

@ -1,72 +0,0 @@
diff -dur a/mac_alias/alias.py b/mac_alias/alias.py
--- a/mac_alias/alias.py 2015-10-19 12:12:48.000000000 +0200
+++ b/mac_alias/alias.py 2016-04-03 12:13:12.037159417 +0200
@@ -243,10 +243,10 @@
alias = Alias()
alias.appinfo = appinfo
- alias.volume = VolumeInfo (volname.replace('/',':'),
+ alias.volume = VolumeInfo (volname.decode().replace('/',':'),
voldate, fstype, disktype,
volattrs, volfsid)
- alias.target = TargetInfo (kind, filename.replace('/',':'),
+ alias.target = TargetInfo (kind, filename.decode().replace('/',':'),
folder_cnid, cnid,
crdate, creator_code, type_code)
alias.target.levels_from = levels_from
@@ -261,9 +261,9 @@
b.read(1)
if tag == TAG_CARBON_FOLDER_NAME:
- alias.target.folder_name = value.replace('/',':')
+ alias.target.folder_name = value.decode().replace('/',':')
elif tag == TAG_CNID_PATH:
- alias.target.cnid_path = struct.unpack(b'>%uI' % (length // 4),
+ alias.target.cnid_path = struct.unpack('>%uI' % (length // 4),
value)
elif tag == TAG_CARBON_PATH:
alias.target.carbon_path = value
@@ -298,9 +298,9 @@
alias.target.creation_date \
= mac_epoch + datetime.timedelta(seconds=seconds)
elif tag == TAG_POSIX_PATH:
- alias.target.posix_path = value
+ alias.target.posix_path = value.decode()
elif tag == TAG_POSIX_PATH_TO_MOUNTPOINT:
- alias.volume.posix_path = value
+ alias.volume.posix_path = value.decode()
elif tag == TAG_RECURSIVE_ALIAS_OF_DISK_IMAGE:
alias.volume.disk_image_alias = Alias.from_bytes(value)
elif tag == TAG_USER_HOME_LENGTH_PREFIX:
@@ -422,13 +422,13 @@
# (so doing so is ridiculous, and nothing could rely on it).
b.write(struct.pack(b'>h28pI2shI64pII4s4shhI2s10s',
self.target.kind,
- carbon_volname, voldate,
+ carbon_volname, int(voldate),
self.volume.fs_type,
self.volume.disk_type,
self.target.folder_cnid,
carbon_filename,
self.target.cnid,
- crdate,
+ int(crdate),
self.target.creator_code,
self.target.type_code,
self.target.levels_from,
@@ -449,12 +449,12 @@
b.write(struct.pack(b'>hhQhhQ',
TAG_HIGH_RES_VOLUME_CREATION_DATE,
- 8, long(voldate * 65536),
+ 8, int(voldate * 65536),
TAG_HIGH_RES_CREATION_DATE,
- 8, long(crdate * 65536)))
+ 8, int(crdate * 65536)))
if self.target.cnid_path:
- cnid_path = struct.pack(b'>%uI' % len(self.target.cnid_path),
+ cnid_path = struct.pack('>%uI' % len(self.target.cnid_path),
*self.target.cnid_path)
b.write(struct.pack(b'>hh', TAG_CNID_PATH,
len(cnid_path)))

View File

@ -1,60 +0,0 @@
From 96ac8f13f4d0ee96baf5724d9f96c44c34b8606c Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen@gmail.com>
Date: Tue, 24 Aug 2021 22:40:14 +0100
Subject: [PATCH] Darwin platform allows to build on releases before
Yosemite/ios 8.
issue #16407 #16408
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16409)
---
crypto/rand/rand_unix.c | 5 +----
include/crypto/rand.h | 10 ++++++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 43f1069d151d..0f4525106af7 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -34,9 +34,6 @@
#if defined(__OpenBSD__)
# include <sys/param.h>
#endif
-#if defined(__APPLE__)
-# include <CommonCrypto/CommonRandom.h>
-#endif
#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
# include <sys/types.h>
@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
if (errno != ENOSYS)
return -1;
}
-# elif defined(__APPLE__)
+# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
return (ssize_t)buflen;
diff --git a/include/crypto/rand.h b/include/crypto/rand.h
index 5350d3a93119..674f840fd13c 100644
--- a/include/crypto/rand.h
+++ b/include/crypto/rand.h
@@ -20,6 +20,16 @@
# include <openssl/rand.h>
+# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
+# include <Availability.h>
+# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
+ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
+# define OPENSSL_APPLE_CRYPTO_RANDOM 1
+# include <CommonCrypto/CommonCryptoError.h>
+# include <CommonCrypto/CommonRandom.h>
+# endif
+# endif
+
/* forward declaration */
typedef struct rand_pool_st RAND_POOL;

View File

@ -1,159 +0,0 @@
--- src/google/protobuf/descriptor.cc.O 2018-07-30 22:16:10.000000000 +0000
+++ src/google/protobuf/descriptor.cc 2022-05-06 13:38:14.827309092 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <algorithm>
#include <functional>
#include <google/protobuf/stubs/hash.h>
@@ -7274,3 +7277,6 @@
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/extension_set.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/extension_set.cc 2022-05-06 14:48:55.369877050 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <google/protobuf/stubs/hash.h>
#include <tuple>
#include <utility>
@@ -1914,3 +1917,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/extension_set_heavy.cc.O 2018-07-30 22:16:10.000000000 +0000
+++ src/google/protobuf/extension_set_heavy.cc 2022-05-06 14:14:27.847320946 +0000
@@ -35,6 +35,10 @@
// Contains methods defined in extension_set.h which cannot be part of the
// lite library because they use descriptors or reflection.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/coded_stream.h>
@@ -814,3 +818,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/generated_message_reflection.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/generated_message_reflection.cc 2022-05-06 13:38:49.655540772 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <algorithm>
#include <set>
@@ -2420,3 +2423,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/map_field.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/map_field.cc 2022-05-06 13:34:44.913905697 +0000
@@ -28,6 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/map_field.h>
#include <google/protobuf/map_field_inl.h>
@@ -462,3 +466,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/text_format.cc.O 2018-07-30 22:16:11.000000000 +0000
+++ src/google/protobuf/text_format.cc 2022-05-06 13:34:58.881999517 +0000
@@ -32,6 +32,10 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <algorithm>
#include <float.h>
#include <math.h>
@@ -2258,3 +2262,6 @@
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/wire_format.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/wire_format.cc 2022-05-06 13:06:23.294219228 +0000
@@ -32,6 +32,10 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <stack>
#include <string>
#include <vector>
@@ -1445,3 +1449,7 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/stubs/status.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/stubs/status.cc 2022-05-06 15:18:53.393208814 +0000
@@ -27,6 +27,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/stubs/status.h>
#include <ostream>
@@ -132,3 +137,6 @@
} // namespace util
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif

View File

@ -1,19 +0,0 @@
--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
@@ -52,6 +52,7 @@
//
#include <QtCore/qglobal.h>
+#include <qpa/qplatformprintdevice.h>
#ifndef QT_NO_PRINTER
--- x/qtbase/src/plugins/plugins.pro
+++ y/qtbase/src/plugins/plugins.pro
@@ -9,6 +9,3 @@ qtHaveModule(gui) {
!android:qtConfig(library): SUBDIRS *= generic
}
qtHaveModule(widgets): SUBDIRS += styles
-
-!winrt:qtHaveModule(printsupport): \
- SUBDIRS += printsupport

View File

@ -1,11 +0,0 @@
--- old/qtbase/mkspecs/features/qt_module.prf
+++ new/qtbase/mkspecs/features/qt_module.prf
@@ -269,7 +269,7 @@ load(qt_installs)
load(qt_targets)
# this builds on top of qt_common
-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
CONFIG += create_pc
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
host_build: \

View File

@ -1,15 +0,0 @@
--- old/qtbase/src/tools/rcc/rcc.cpp
+++ new/qtbase/src/tools/rcc/rcc.cpp
@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
if (lib.formatVersion() >= 2) {
// last modified time stamp
const QDateTime lastModified = m_fileInfo.lastModified();
- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
+ if (sourceDate != 0)
+ lastmod = sourceDate;
+ lib.writeNumber8(lastmod);
if (text || pass1)
lib.writeChar('\n');
}

View File

@ -1,69 +0,0 @@
From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
From: Carl Dong <contact@carldong.me>
Date: Thu, 18 Jul 2019 17:22:05 -0400
Subject: [PATCH] Wrap xlib related code blocks in #if's
They are not necessary to compile QT.
---
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
index 7c62c2e2b3..c05c6c0a07 100644
--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -49,7 +49,9 @@
#include <QtGui/QWindow>
#include <QtGui/QBitmap>
#include <QtGui/private/qguiapplication_p.h>
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
#include <X11/cursorfont.h>
+#endif
#include <xcb/xfixes.h>
#include <xcb/xcb_image.h>
@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
xcb_flush(xcb_connection());
}
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
static int cursorIdForShape(int cshape)
{
int cursorId = 0;
@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape)
}
return cursorId;
}
+#endif
xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
{
@@ -556,7 +560,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
{
xcb_connection_t *conn = xcb_connection();
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
int cursorId = cursorIdForShape(cshape);
+#endif
xcb_cursor_t cursor = XCB_NONE;
// Try Xcursor first
@@ -586,6 +592,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
// Non-standard X11 cursors are created from bitmaps
cursor = createNonStandardCursor(cshape);
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
// Create a glpyh cursor if everything else failed
if (!cursor && cursorId) {
cursor = xcb_generate_id(conn);
@@ -593,6 +600,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
cursorId, cursorId + 1,
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
}
+#endif
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
const char *name = cursorNames[cshape].front();
---
2.22.0

View File

@ -1,11 +0,0 @@
--- config/ltmain.sh.0 2020-11-10 17:25:26.000000000 +0100
+++ config/ltmain.sh 2021-09-11 19:39:36.000000000 +0200
@@ -10768,6 +10768,8 @@
fi
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
tool_oldlib=$func_to_tool_file_result
+ oldobjs=`for obj in $oldobjs; do echo $obj; done | sort`
+ oldobjs=" `echo $oldobjs`"
eval cmds=\"$old_archive_cmds\"
func_len " $cmds"

View File

@ -1,22 +0,0 @@
From 06aba27b04c5822cb88a69677382a0f053367143 Mon Sep 17 00:00:00 2001
From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com>
Date: Thu, 22 Jul 2021 21:53:19 -0700
Subject: [PATCH] fix: building libzmq fails with error src/clock.cpp:131:16:
error: unused variable 'nsecs_per_usec'
---
src/clock.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/clock.cpp b/src/clock.cpp
index 93da90a8e..63c0100a5 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -195,6 +195,7 @@ uint64_t zmq::clock_t::now_us ()
#else
+ LIBZMQ_UNUSED (nsecs_per_usec);
// Use POSIX gettimeofday function to get precise time.
struct timeval tv;
int rc = gettimeofday (&tv, NULL);

View File

@ -1,29 +0,0 @@
package=protobuf
$(package)_version=$(native_$(package)_version)
$(package)_download_path=$(native_$(package)_download_path)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package)
$(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
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
endef

View File

@ -1,5 +1,5 @@
# Set the system name to one of Android, Darwin, FreeBSD, Linux, or Windows
SET(CMAKE_SYSTEM_NAME @depends@)
SET(CMAKE_SYSTEM_NAME @cmake_system_name@)
SET(CMAKE_SYSTEM_PROCESSOR @arch@)
SET(CMAKE_BUILD_TYPE @release_type@)
@ -27,14 +27,6 @@ SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
SET(UNBOUND_INCLUDE_DIR @prefix@/include)
SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
SET(LRELEASE_PATH @prefix@/native/bin CACHE FILEPATH "path to lrelease" FORCE)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
@ -43,8 +35,11 @@ SET(Protobuf_PROTOC_EXECUTABLE @prefix@/native/bin/protoc CACHE FILEPATH "Path t
SET(Protobuf_INCLUDE_DIR @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_INCLUDE_DIRS @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_LIBRARY @prefix@/lib/libprotobuf.a CACHE FILEPATH "Protobuf library")
endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
endif()
SET(ZMQ_INCLUDE_PATH @prefix@/include)
@ -70,15 +65,15 @@ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(ARCHITECTURE STREQUAL "aarch64")
SET(CLANG_TARGET "arm64-apple-darwin11")
SET(CONF_TRIPLE "aarch64-apple-darwin11")
SET(CLANG_TARGET "arm64-apple-darwin")
SET(CONF_TRIPLE "aarch64-apple-darwin")
SET(BUILD_TAG "mac-armv8")
SET(CMAKE_OSX_ARCHITECTURES "arm64")
set(ARM ON)
set(ARM_ID "armv8-a")
else()
SET(CLANG_TARGET "x86_64-apple-darwin11")
SET(CONF_TRIPLE "x86_64-apple-darwin11")
SET(CLANG_TARGET "x86_64-apple-darwin")
SET(CONF_TRIPLE "x86_64-apple-darwin")
SET(BUILD_TAG "mac-x64")
SET(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
@ -96,8 +91,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(BREW OFF)
SET(PORT OFF)
SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
SET(CMAKE_CXX_STANDARD 17)
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
@ -146,8 +141,11 @@ elseif(ARCHITECTURE STREQUAL "aarch64")
endif()
if(ARCHITECTURE STREQUAL "riscv64")
set(NO_AES ON)
set(ARCH "rv64imafdc")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(BUILD_TAG "linux-riscv64")
endif()
set(ARCH_ID "riscv64")
set(ARCH "rv64gc")
endif()
if(ARCHITECTURE STREQUAL "i686")

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2023, The Monero Project
#
# All rights reserved.
#

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019-2022, The Monero Project
// Copyright (c) 2019-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -1,4 +1,4 @@
// Copyright (c) 2020-2022, The Monero Project
// Copyright (c) 2020-2023, The Monero Project
//
// All rights reserved.
@ -74,6 +74,7 @@ namespace epee
public:
using char_type = std::uint8_t;
using Ch = char_type;
using value_type = char_type;
//! Increase internal buffer by at least `byte_stream_increase` bytes.
byte_stream() noexcept
@ -86,6 +87,7 @@ namespace epee
~byte_stream() noexcept = default;
byte_stream& operator=(byte_stream&& rhs) noexcept;
std::uint8_t* data() noexcept { return buffer_.get(); }
const std::uint8_t* data() const noexcept { return buffer_.get(); }
std::uint8_t* tellp() const noexcept { return next_write_; }
std::size_t available() const noexcept { return end_ - next_write_; }

View File

@ -29,6 +29,7 @@
#include <string>
#include <ctime>
#include <cstdint>
namespace epee
{

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018-2022, The Monero Project
// Copyright (c) 2018-2023, The Monero Project
//
// All rights reserved.

View File

@ -1,4 +1,4 @@
// Copyright (c) 2017-2022, The Monero Project
// Copyright (c) 2017-2023, The Monero Project
//
// All rights reserved.
//
@ -67,6 +67,9 @@ namespace epee
return out;
}
//! Write `src` as hex to `out`. `out` must be exactly 2x in size.
static bool buffer(span<char> out, const span<const std::uint8_t> src) noexcept;
//! Append `src` as hex to `out`.
static void buffer(std::ostream& out, const span<const std::uint8_t> src);

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -24,213 +24,20 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#pragma once
#include <cstdint> // uint64_t
#include <list>
#include <numeric>
#include <random>
#include <boost/timer/timer.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/random_generator.hpp>
#include "syncobj.h"
#include "time_helper.h"
#ifdef _WIN32
#include <sysinfoapi.h> // GetSystemTimeAsFileTime
#else
#include <sys/time.h> // gettimeofday
#endif
namespace epee
{
namespace math_helper
{
template<typename val, int default_base>
class average
{
public:
average()
{
m_base = default_base;
m_last_avg_val = 0;
}
bool set_base()
{
CRITICAL_REGION_LOCAL(m_lock);
m_base = default_base;
if(m_list.size() > m_base)
m_list.resize(m_base);
return true;
}
typedef val value_type;
void push(const value_type& vl)
{
CRITICAL_REGION_LOCAL(m_lock);
//#ifndef DEBUG_STUB
m_list.push_back(vl);
if(m_list.size() > m_base )
m_list.pop_front();
//#endif
}
double update(const value_type& vl)
{
CRITICAL_REGION_LOCAL(m_lock);
//#ifndef DEBUG_STUB
push(vl);
//#endif
return get_avg();
}
double get_avg()
{
CRITICAL_REGION_LOCAL(m_lock);
value_type vl = std::accumulate(m_list.begin(), m_list.end(), value_type(0));
if(m_list.size())
return m_last_avg_val = (double)(vl/m_list.size());
return m_last_avg_val = (double)vl;
}
value_type get_last_val()
{
CRITICAL_REGION_LOCAL(m_lock);
if(m_list.size())
return m_list.back();
return 0;
}
private:
unsigned int m_base;
double m_last_avg_val;
std::list<value_type> m_list;
critical_section m_lock;
};
#ifdef WINDOWS_PLATFORM
/************************************************************************/
/* */
/************************************************************************/
class timing_guard_base
{
public:
virtual ~timing_guard_base(){};
};
template<class T>
class timing_guard: public timing_guard_base
{
public:
timing_guard(T& avrg):m_avrg(avrg)
{
m_start_ticks = ::GetTickCount();
}
~timing_guard()
{
m_avrg.push(::GetTickCount()-m_start_ticks);
}
private:
T& m_avrg;
DWORD m_start_ticks;
};
template<class t_timing>
timing_guard_base* create_timing_guard(t_timing& timing){return new timing_guard<t_timing>(timing);}
#define BEGIN_TIMING_ZONE(timing_var) { boost::shared_ptr<math_helper::timing_guard_base> local_timing_guard_ptr(math_helper::create_timing_guard(timing_var));
#define END_TIMING_ZONE() }
#endif
//#ifdef WINDOWS_PLATFORM_EX
template<uint64_t default_time_window>
class speed
{
public:
speed()
{
m_time_window = default_time_window;
m_last_speed_value = 0;
}
bool chick()
{
#ifndef DEBUG_STUB
uint64_t ticks = misc_utils::get_tick_count();
CRITICAL_REGION_BEGIN(m_lock);
m_chicks.push_back(ticks);
CRITICAL_REGION_END();
//flush(ticks);
#endif
return true;
}
bool chick(size_t count)
{
for(size_t s = 0; s != count; s++)
chick();
return true;
}
size_t get_speed()
{
flush(misc_utils::get_tick_count());
return m_last_speed_value = m_chicks.size();
}
private:
bool flush(uint64_t ticks)
{
CRITICAL_REGION_BEGIN(m_lock);
std::list<uint64_t>::iterator it = m_chicks.begin();
while(it != m_chicks.end())
{
if(*it + m_time_window < ticks)
m_chicks.erase(it++);
else
break;
}
CRITICAL_REGION_END();
return true;
}
std::list<uint64_t> m_chicks;
uint64_t m_time_window;
size_t m_last_speed_value;
critical_section m_lock;
};
//#endif
template<class tlist>
void randomize_list(tlist& t_list)
{
for(typename tlist::iterator it = t_list.begin();it!=t_list.end();it++)
{
size_t offset = rand()%t_list.size();
typename tlist::iterator it_2 = t_list.begin();
for(size_t local_offset = 0;local_offset!=offset;local_offset++)
it_2++;
if(it_2 == it)
continue;
std::swap(*it_2, *it);
}
}
template<typename get_interval, bool start_immediate = true>
class once_a_time
{

View File

@ -1,4 +1,4 @@
// Copyright (c) 2017-2022, The Monero Project
// Copyright (c) 2017-2023, The Monero Project
//
// All rights reserved.
//

View File

@ -74,10 +74,10 @@ namespace misc_utils
struct call_befor_die_base
{
virtual ~call_befor_die_base(){}
virtual ~call_befor_die_base() = default;
};
typedef boost::shared_ptr<call_befor_die_base> auto_scope_leave_caller;
typedef std::shared_ptr<call_befor_die_base> auto_scope_leave_caller;
template<class t_scope_leave_handler>
@ -96,7 +96,7 @@ namespace misc_utils
template<class t_scope_leave_handler>
auto_scope_leave_caller create_scope_leave_handler(t_scope_leave_handler f)
{
auto_scope_leave_caller slc(new call_befor_die<t_scope_leave_handler>(f));
auto_scope_leave_caller slc = std::make_shared<call_befor_die<t_scope_leave_handler>>(f);
return slc;
}

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018-2022, The Monero Project
// Copyright (c) 2018-2023, The Monero Project
//
// All rights reserved.

View File

@ -54,7 +54,6 @@ namespace net_utils
std::string convert(char val);
std::string conver_to_url_format(const std::string& uri);
std::string convert_from_url_format(const std::string& uri);
std::string convert_to_url_format_force_all(const std::string& uri);
namespace http
{
@ -72,7 +71,6 @@ namespace http
virtual bool is_connected(bool *ssl = NULL) = 0;
virtual bool invoke(const boost::string_ref uri, const boost::string_ref method, const boost::string_ref body, std::chrono::milliseconds timeout, const http_response_info** ppresponse_info = NULL, const fields_list& additional_params = fields_list()) = 0;
virtual bool invoke_get(const boost::string_ref uri, std::chrono::milliseconds timeout, const std::string& body = std::string(), const http_response_info** ppresponse_info = NULL, const fields_list& additional_params = fields_list()) = 0;
virtual bool invoke_post(const boost::string_ref uri, const std::string& body, std::chrono::milliseconds timeout, const http_response_info** ppresponse_info = NULL, const fields_list& additional_params = fields_list()) = 0;
virtual uint64_t get_bytes_sent() const = 0;
virtual uint64_t get_bytes_received() const = 0;
};

View File

@ -583,11 +583,8 @@ namespace net_utils
break;
}
}
else if (ec.value())
terminate();
else {
cancel_timer();
on_interrupted();
terminate();
}
};
m_strand.post(

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018-2022, The Monero Project
// Copyright (c) 2018-2023, The Monero Project
//
// All rights reserved.

View File

@ -8,7 +8,7 @@
// ! (how ever if in some wonderful juristdictions that is not the case, then why not make another sub-class withat that members and licence it as epee part)
// ! Working on above premise, IF this is valid in your juristdictions, then consider this code as released as:
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//

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