diff options
Diffstat (limited to 'patches/zano')
| -rw-r--r-- | patches/zano/0001-add-missing-include.patch | 64 | ||||
| -rw-r--r-- | patches/zano/0002-fix-build-issues.patch | 39 | ||||
| -rw-r--r-- | patches/zano/0003-fix-mingw-build-issues.patch | 61 | ||||
| -rw-r--r-- | patches/zano/0004-update-tor-connect.patch | 33 | ||||
| -rw-r--r-- | patches/zano/0005-fix-ios-builds.patch | 43 | ||||
| -rw-r--r-- | patches/zano/0006-use-boost-filesystem-instead-of-stdfs.patch | 80 | ||||
| -rw-r--r-- | patches/zano/0007-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch | 22 | ||||
| -rw-r--r-- | patches/zano/0008-increase-max-password.patch | 25 |
8 files changed, 367 insertions, 0 deletions
diff --git a/patches/zano/0001-add-missing-include.patch b/patches/zano/0001-add-missing-include.patch new file mode 100644 index 0000000..cd95528 --- /dev/null +++ b/patches/zano/0001-add-missing-include.patch @@ -0,0 +1,64 @@ +From a49fa9a64aebf69f15832291e70888ff18ed6040 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Thu, 31 Oct 2024 13:07:20 +0000 +Subject: [PATCH 1/5] add missing #include + +--- + src/currency_core/genesis.cpp | 1 + + src/currency_core/genesis.h | 2 +- + src/wallet/plain_wallet_api.cpp | 1 + + src/wallet/plain_wallet_api.h | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/currency_core/genesis.cpp b/src/currency_core/genesis.cpp +index a58dcb4e..c34b0285 100644 +--- a/src/currency_core/genesis.cpp ++++ b/src/currency_core/genesis.cpp +@@ -4,6 +4,7 @@ + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + + #include "genesis.h" ++#include <cstdint> + + namespace currency + { +diff --git a/src/currency_core/genesis.h b/src/currency_core/genesis.h +index 8ea77d89..d78cec97 100644 +--- a/src/currency_core/genesis.h ++++ b/src/currency_core/genesis.h +@@ -3,7 +3,7 @@ + // Copyright (c) 2014-2018 The Louisdor Project + // Distributed under the MIT/X11 software license, see the accompanying + // file COPYING or http://www.opensource.org/licenses/mit-license.php. +- ++#include <cstdint> + #pragma once + #include <string> + namespace currency +diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp +index bb322481..dccff76c 100644 +--- a/src/wallet/plain_wallet_api.cpp ++++ b/src/wallet/plain_wallet_api.cpp +@@ -6,6 +6,7 @@ + #ifdef ANDROID_BUILD + #include <android/log.h> + #endif ++#include <cstdint> + #include "plain_wallet_api.h" + #include "plain_wallet_api_defs.h" + #include "currency_core/currency_config.h" +diff --git a/src/wallet/plain_wallet_api.h b/src/wallet/plain_wallet_api.h +index f12eba03..177b8173 100644 +--- a/src/wallet/plain_wallet_api.h ++++ b/src/wallet/plain_wallet_api.h +@@ -6,6 +6,7 @@ + #pragma once + + #include <string> ++#include <cstdint> + #include "../common/error_codes.h" + + namespace plain_wallet +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0002-fix-build-issues.patch b/patches/zano/0002-fix-build-issues.patch new file mode 100644 index 0000000..9ff3f85 --- /dev/null +++ b/patches/zano/0002-fix-build-issues.patch @@ -0,0 +1,39 @@ +From 627750b0f1471c5d34755ca446d452429945d5d6 Mon Sep 17 00:00:00 2001 +From: cyan <cyjan@mrcyjanek.net> +Date: Sat, 2 Nov 2024 20:50:26 +0000 +Subject: [PATCH 2/5] fix build issues + +--- + contrib/db/libmdbx/CMakeLists.txt | 2 +- + contrib/db/libmdbx/packages/rpm/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/contrib/db/libmdbx/CMakeLists.txt b/contrib/db/libmdbx/CMakeLists.txt +index 75e9b3b0..01a5915c 100644 +--- a/contrib/db/libmdbx/CMakeLists.txt ++++ b/contrib/db/libmdbx/CMakeLists.txt +@@ -80,7 +80,7 @@ macro(add_mdbx_option NAME DESCRIPTION DEFAULT) + endmacro() + + # only for compatibility testing +-# set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD 17) + + if(NOT "$ENV{TEAMCITY_PROCESS_FLOW_ID}" STREQUAL "") + set(CI TEAMCITY) +diff --git a/contrib/db/libmdbx/packages/rpm/CMakeLists.txt b/contrib/db/libmdbx/packages/rpm/CMakeLists.txt +index 5949e9f0..e7b677bd 100644 +--- a/contrib/db/libmdbx/packages/rpm/CMakeLists.txt ++++ b/contrib/db/libmdbx/packages/rpm/CMakeLists.txt +@@ -12,7 +12,7 @@ set(MDBX_VERSION_STRING ${MDBX_VERSION_MAJOR}.${MDBX_VERSION_MINOR}.${MDBX_VERSI + enable_language(C) + enable_language(CXX) + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED on) + + add_definitions(-DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1 -D_GNU_SOURCE=1) +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0003-fix-mingw-build-issues.patch b/patches/zano/0003-fix-mingw-build-issues.patch new file mode 100644 index 0000000..48b4d65 --- /dev/null +++ b/patches/zano/0003-fix-mingw-build-issues.patch @@ -0,0 +1,61 @@ +From 1f7604d5b661f4490a1757e5ed1d6ed367ffb739 Mon Sep 17 00:00:00 2001 +From: cyan <cyjan@mrcyjanek.net> +Date: Sun, 3 Nov 2024 08:59:22 +0000 +Subject: [PATCH 3/5] fix mingw build issues + +--- + contrib/epee/include/misc_os_dependent.h | 4 ++-- + src/common/callstack_helper.cpp | 2 +- + src/crypto/ecrypt-config.h | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/contrib/epee/include/misc_os_dependent.h b/contrib/epee/include/misc_os_dependent.h +index c06e5d94..a2a979b9 100644 +--- a/contrib/epee/include/misc_os_dependent.h ++++ b/contrib/epee/include/misc_os_dependent.h +@@ -110,14 +110,14 @@ namespace misc_utils + } + + +-#if defined(__GNUC__) && !defined(__ANDROID__) ++#if defined(__GNUC__) && !defined(__ANDROID__) && !defined(_WIN32) + #include <execinfo.h> + #include <boost/core/demangle.hpp> + #endif + inline std::string print_trace_default() + { + std::stringstream ss; +-#if defined(__GNUC__) && !defined(__ANDROID__) ++#if defined(__GNUC__) && !defined(__ANDROID__) && !defined(_WIN32) + ss << std::endl << "STACK" << std::endl; + const size_t max_depth = 100; + size_t stack_depth; +diff --git a/src/common/callstack_helper.cpp b/src/common/callstack_helper.cpp +index b84fe5a8..c9eae839 100644 +--- a/src/common/callstack_helper.cpp ++++ b/src/common/callstack_helper.cpp +@@ -9,7 +9,7 @@ + #define NOMINMAX + #endif + #include <windows.h> +-#include <Psapi.h> ++#include <psapi.h> + #pragma comment(lib, "psapi.lib") + #pragma comment(lib, "dbghelp.lib") + +diff --git a/src/crypto/ecrypt-config.h b/src/crypto/ecrypt-config.h +index 9176de17..8b488135 100644 +--- a/src/crypto/ecrypt-config.h ++++ b/src/crypto/ecrypt-config.h +@@ -257,7 +257,7 @@ + + #ifdef _UI64_MAX + +-#if (_UI64_MAX / 0xFFFFFFFFui64 > 0xFFFFFFFFui64) ++#if (_UI64_MAX / 0xFFFFFFFF > 0xFFFFFFFF) + #ifndef I64T + #define I64T __int64 + #define U64C(v) (v##ui64) +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0004-update-tor-connect.patch b/patches/zano/0004-update-tor-connect.patch new file mode 100644 index 0000000..76cc59d --- /dev/null +++ b/patches/zano/0004-update-tor-connect.patch @@ -0,0 +1,33 @@ +From 7d05e6a8d62ad3302bd1bb1818db36bde5885bab Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Tue, 5 Nov 2024 10:35:03 -0500 +Subject: [PATCH 4/5] update tor-connect + +--- + .gitmodules | 2 +- + contrib/tor-connect | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index 57896bbb..4df859f8 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -7,7 +7,7 @@ + branch = main + [submodule "contrib/tor-connect"] + path = contrib/tor-connect +- url = https://github.com/hyle-team/tor-connect.git ++ url = https://github.com/MrCyjaneK/tor-connect.git + branch = main + [submodule "contrib/jwt-cpp"] + path = contrib/jwt-cpp +diff --git a/contrib/tor-connect b/contrib/tor-connect +index b589edb1..cc445b2f 160000 +--- a/contrib/tor-connect ++++ b/contrib/tor-connect +@@ -1 +1 @@ +-Subproject commit b589edb1906dccb387cfeded6ed12286c5f0405f ++Subproject commit cd7f0c4b583488a7fe9b50de8e533a9853b6a5c7 +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0005-fix-ios-builds.patch b/patches/zano/0005-fix-ios-builds.patch new file mode 100644 index 0000000..f68244f --- /dev/null +++ b/patches/zano/0005-fix-ios-builds.patch @@ -0,0 +1,43 @@ +From 20975fed75b7255f6cb6df74a17f1923f7159c09 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Tue, 5 Nov 2024 16:52:23 +0100 +Subject: [PATCH 5/5] fix ios builds + +--- + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c480300f..7087d796 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,6 +136,8 @@ else() + set(ARCH default CACHE STRING "CPU to build for: -march value or default") + if("${ARCH}" STREQUAL "default") + set(ARCH_FLAG "") ++ elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") ++ set(ARCH_FLAG "") + else() + set(ARCH_FLAG "-march=${ARCH}") + endif() +@@ -207,7 +209,7 @@ else() + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${RELEASE_FLAGS}") + if(STATIC) + if(APPLE) +- message(SEND_ERROR "Static build is not supported on MacOS X") ++ message("Static build is not supported on MacOS X") + else() + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") + endif() +@@ -260,8 +262,6 @@ else() + find_package(Boost 1.70 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale log) + endif() + +- +- + message(STATUS "Boost: ${Boost_VERSION} from ${Boost_LIBRARY_DIRS}") + + +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0006-use-boost-filesystem-instead-of-stdfs.patch b/patches/zano/0006-use-boost-filesystem-instead-of-stdfs.patch new file mode 100644 index 0000000..64b7f4c --- /dev/null +++ b/patches/zano/0006-use-boost-filesystem-instead-of-stdfs.patch @@ -0,0 +1,80 @@ +From 033d71f4a8623dee3508c493431402bbbe5a8b2d Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Wed, 4 Dec 2024 17:21:44 -0600 +Subject: [PATCH] use boost::filesystem instead of stdfs + +--- + CMakeLists.txt | 23 ++++------------------- + contrib/epee/include/file_io_utils.h | 6 +++--- + 2 files changed, 7 insertions(+), 22 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7087d796..6ded9711 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -232,24 +232,9 @@ if(STATIC) + endif() + + message("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +-if(CMAKE_SYSTEM_NAME STREQUAL "iOS") +- set(CMAKE_OSX_DEPLOYMENT_TARGET 12.00) +- if(NOT DEFINED SKIP_BOOST_FATLIB_LIB OR NOT SKIP_BOOST_FATLIB_LIB) +- message("Ios: libboost.a included as library") +- set(Boost_LIBRARIES "libboost.a") +- else() +- message("Ios: libboost.a not included as library") +- endif() +- #workaround for new XCode 12 policy for builds(now it includes a slice for the "arm64" when builds for simulator) +- set(__iphoneos_archs "arm64") +- #set(__iphonesimulator_archs "arm64,x86_64") +- set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "${__iphoneos_archs}") +- set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "${__iphoneos_archs}") +- #set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "${__iphonesimulator_archs}") +- #set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "${__iphonesimulator_archs}") +-elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") ++if(CMAKE_SYSTEM_NAME STREQUAL "Android") + if(CAKEWALLET) +- find_package(Boost 1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale) ++ find_package(Boost 1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options) + else() + set(Boost_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}/${CMAKE_ANDROID_ARCH_ABI}/") + set(Boost_LIBRARIES "${Boost_LIBRARY_DIRS}libboost_system.a;${Boost_LIBRARY_DIRS}libboost_filesystem.a;${Boost_LIBRARY_DIRS}libboost_thread.a;${Boost_LIBRARY_DIRS}libboost_timer.a;${Boost_LIBRARY_DIRS}libboost_date_time.a;${Boost_LIBRARY_DIRS}libboost_chrono.a;${Boost_LIBRARY_DIRS}libboost_regex.a;${Boost_LIBRARY_DIRS}libboost_serialization.a;${Boost_LIBRARY_DIRS}libboost_atomic.a;${Boost_LIBRARY_DIRS}libboost_program_options.a") +@@ -257,7 +242,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC") + elseif(APPLE) +- find_package(Boost 1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale) ++ find_package(Boost 1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options) + else() + find_package(Boost 1.70 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale log) + endif() +@@ -302,7 +287,7 @@ else() + find_package(Git QUIET) + if(Git_FOUND OR GIT_FOUND) + message(STATUS "Found Git: ${GIT_EXECUTABLE}") +- add_custom_target(version ALL "${CMAKE_COMMAND}" "-D" "VERSION=${VERSION}" "-D" "GIT=${GIT_EXECUTABLE}" "-D" "TO=${CMAKE_BINARY_DIR}/version/version.h" "-P" "src/version.cmake" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") ++ add_custom_target(version ALL "${CMAKE_COMMAND}" "-D" "VERSION=${VERSION}" "-D" "GIT=${GIT_EXECUTABLE}" "-D" "TO=${CMAKE_BINARY_DIR}/version/version.h" "-P" "src/version.cmake" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + else() + message(STATUS "WARNING: Git was not found!") + set(VERSION "${VERSION}-unknown") +diff --git a/contrib/epee/include/file_io_utils.h b/contrib/epee/include/file_io_utils.h +index bb21ae99..ced01092 100644 +--- a/contrib/epee/include/file_io_utils.h ++++ b/contrib/epee/include/file_io_utils.h +@@ -574,10 +574,10 @@ namespace file_io_utils + try + { + +- stdfs::directory_iterator end_itr; // default construction yields past-the-end +- for (stdfs::directory_iterator itr( epee::string_encoding::utf8_to_wstring(path) ); itr != end_itr; ++itr ) ++ boost::filesystem::directory_iterator end_itr; // default construction yields past-the-end ++ for ( boost::filesystem::directory_iterator itr( epee::string_encoding::utf8_to_wstring(path) ); itr != end_itr; ++itr ) + { +- if ( only_files && stdfs::is_directory(itr->status()) ) ++ if ( only_files && boost::filesystem::is_directory(itr->status()) ) + { + continue; + } +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0007-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch b/patches/zano/0007-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch new file mode 100644 index 0000000..0ac7e50 --- /dev/null +++ b/patches/zano/0007-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch @@ -0,0 +1,22 @@ +From e6201106cd09416f96c8d83270c94565583cd356 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Thu, 5 Dec 2024 09:36:34 -0600 +Subject: [PATCH] downgrade cmake version so LIB_DEPENDS shows up + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6ded9711..47d24a81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.16) ++cmake_minimum_required(VERSION 3.5) + + PROJECT(Zano) + +-- +2.39.5 (Apple Git-154) + diff --git a/patches/zano/0008-increase-max-password.patch b/patches/zano/0008-increase-max-password.patch new file mode 100644 index 0000000..0ce87c7 --- /dev/null +++ b/patches/zano/0008-increase-max-password.patch @@ -0,0 +1,25 @@ +From 6812b5de7e0a52e9341e54dbe2fc0b790dc6de5a Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Thu, 12 Dec 2024 09:00:57 -0500 +Subject: [PATCH] increase max password + +--- + src/currency_core/currency_format_utils.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp +index 96d55b4..0c3d947 100644 +--- a/src/currency_core/currency_format_utils.cpp ++++ b/src/currency_core/currency_format_utils.cpp +@@ -3632,7 +3632,7 @@ namespace currency + return true; + } + //------------------------------------------------------------------ +- #define PASSWORD_REGEXP R"([A-Za-z0-9~!?@#$%^&*_+|{}\[\]()<>:;"'\-=/.,]{0,40})" ++ #define PASSWORD_REGEXP R"([A-Za-z0-9~!?@#$%^&*_+|{}\[\]()<>:;"'\-=/.,]{0,2048})" + bool validate_password(const std::string& password) + { + // OLD: static const std::string allowed_password_symbols = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!?@#$%^&*_+|{}[]()<>:;\"'-=\\/.,"; +-- +2.39.5 (Apple Git-154) + |
