From 633587ec41d45a2644a1a18d7aafe54e9a9faf84 Mon Sep 17 00:00:00 2001 From: Kevin Crumb Date: Tue, 4 Oct 2022 17:38:25 +0000 Subject: [PATCH 1/2] monero: update to 0.18.1.2. --- srcpkgs/monero/files/monerod/log/run | 3 + srcpkgs/monero/patches/system-miniupnpc.patch | 68 ++++++++++--------- srcpkgs/monero/template | 26 +++---- 3 files changed, 52 insertions(+), 45 deletions(-) create mode 100644 srcpkgs/monero/files/monerod/log/run diff --git a/srcpkgs/monero/files/monerod/log/run b/srcpkgs/monero/files/monerod/log/run new file mode 100644 index 000000000000..afcb02949c66 --- /dev/null +++ b/srcpkgs/monero/files/monerod/log/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec logger -p daemon.notice -t monerod diff --git a/srcpkgs/monero/patches/system-miniupnpc.patch b/srcpkgs/monero/patches/system-miniupnpc.patch index 3d9c8bb08bbc..6da9a92d491e 100644 --- a/srcpkgs/monero/patches/system-miniupnpc.patch +++ b/srcpkgs/monero/patches/system-miniupnpc.patch @@ -1,6 +1,9 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b05c087cf..4f1a20101 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -527,5 +527,13 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") +@@ -676,6 +676,14 @@ ExternalProject_Add(generate_translations_header + include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") add_subdirectory(external) +# Final setup for miniupnpc @@ -12,38 +15,13 @@ +endif() + # Final setup for libunbound - include_directories(${UNBOUND_INCLUDE}) - link_directories(${UNBOUND_LIBRARY_DIRS}) -diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl -index 9b21705e..76340a22 100644 ---- a/src/p2p/net_node.inl -+++ b/src/p2p/net_node.inl -@@ -61,9 +61,16 @@ #include "storages/levin_abstract_invoke2.h" - #include "cryptonote_core/cryptonote_core.h" - #include "net/parse.h" - --#include --#include --#include -+// We have to look for miniupnpc headers in different places, dependent on if its compiled or external -+#ifdef UPNP_STATIC -+ #include -+ #include -+ #include -+#else -+ #include "miniupnpc.h" -+ #include "upnpcommands.h" -+ #include "upnperrors.h" -+#endif + include_directories(${UNBOUND_INCLUDE_DIR}) - #undef MONERO_DEFAULT_LOG_CATEGORY - #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" --- -2.17.0 - ---- a/external/CMakeLists.txt 2018-10-10 13:13:55.759414180 +0200 -+++ b/external/CMakeLists.txt 2018-10-10 13:19:33.363411827 +0200 -@@ -34,22 +34,46 @@ +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index 5b7f69a56..00ef3f43d 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -34,24 +34,47 @@ # We always compile if we are building statically to reduce static dependency issues... # ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with # others. @@ -54,8 +32,10 @@ index 9b21705e..76340a22 100644 -find_package(Miniupnpc REQUIRED) - -message(STATUS "Using in-tree miniupnpc") + set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) -add_subdirectory(miniupnp/miniupnpc) -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") +-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON) -if(MSVC) - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267") -elseif(NOT MSVC) @@ -100,3 +80,27 @@ index 9b21705e..76340a22 100644 find_package(Unbound) +diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl +index f33ce977d..87d23a1e1 100644 +--- a/src/p2p/net_node.inl ++++ b/src/p2p/net_node.inl +@@ -60,9 +60,16 @@ + #include "cryptonote_core/cryptonote_core.h" + #include "net/parse.h" + +-#include +-#include +-#include ++// We have to look for miniupnpc headers in different places, dependent on if its compiled or external ++#ifdef UPNP_STATIC ++ #include ++ #include ++ #include ++#else ++ #include "miniupnpc.h" ++ #include "upnpcommands.h" ++ #include "upnperrors.h" ++#endif + + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" diff --git a/srcpkgs/monero/template b/srcpkgs/monero/template index eebce3d0a551..e4e91537d2da 100644 --- a/srcpkgs/monero/template +++ b/srcpkgs/monero/template @@ -1,9 +1,9 @@ # Template file for 'monero' pkgname=monero -version=0.17.2.3 -revision=3 -_randomx_version="1.1.9" +version=0.18.1.2 +revision=1 # the revision monero uses as a submodule for the specific version +_randomx_gitrev="261d58c77fc5547c0aa7fdfeb58421ba7e0e6e1c" _rapidjson_gitrev="129d19ba7f496df5e33658527a7158c79b99c21c" _supercop_gitrev="633500ad8c8759995049ccd022107d1fa8a1bbc9" build_style=cmake @@ -16,18 +16,18 @@ makedepends="openssl-devel boost-devel libldns-devel libunwind-devel readline-devel unbound-devel miniupnpc-devel expat-devel cppzmq czmq-devel libsodium-devel" short_desc="Private, secure, untraceable, decentralised digital currency" -maintainer="Orphaned " +maintainer="Kevin Crumb " license="BSD-3-Clause" homepage="https://getmonero.org" distfiles="https://github.com/monero-project/monero/archive/v${version}.tar.gz - https://github.com/tevador/RandomX/archive/v${_randomx_version}.tar.gz - https://github.com/Tencent/rapidjson/archive/${_rapidjson_gitrev}.tar.gz - https://github.com/monero-project/supercop/archive/${_supercop_gitrev}.tar.gz" -checksum="e4462f8909bdc5e66d76f4023374ff759159c15fe7d407f0c21619769e87c35d - b878fd6ea6d4e1dcdfa085427ce4666c1085e8c5a9e049c04ca2036b4aead0f5 + https://github.com/tevador/RandomX/archive/${_randomx_gitrev}.tar.gz>RandomX-${_randomx_gitrev}.tar.gz + https://github.com/Tencent/rapidjson/archive/${_rapidjson_gitrev}.tar.gz>rapidjson-${_rapidjson_gitrev}.tar.gz + https://github.com/monero-project/supercop/archive/${_supercop_gitrev}.tar.gz>supercop-${_supercop_gitrev}.tar.gz" +checksum="f7fec9c7456e22b70cb86a34dd9192c948161155fdbdfb8505f8ea95c357a38e + 4aeadafe16810320fd492491e39d03fb6028a2db35916aba0fef96c716aba46f 44b007d419ac21b6affec58991e865ee572346ead19b73cf1c3e4e11c7a81273 b973b9d8269ec4d97c3c3443f0dad96d09f72b1b30e616e0947557adbdbb03f7" -skip_extraction="v${_randomx_version}.tar.gz ${_rapidjson_gitrev}.tar.gz ${_supercop_gitrev}.tar.gz" +skip_extraction="RandomX-${_randomx_gitrev}.tar.gz rapidjson-${_rapidjson_gitrev}.tar.gz supercop-${_supercop_gitrev}.tar.gz" system_accounts="monero" case "$XBPS_TARGET_MACHINE" in @@ -52,11 +52,11 @@ case "$XBPS_TARGET_MACHINE" in esac post_extract() { - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${_randomx_version}.tar.gz \ + bsdtar xzf ${wrksrc}/${_randomx_gitrev}.tar.gz \ --strip-components=1 -C ${wrksrc}/external/randomx - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_rapidjson_gitrev}.tar.gz \ + bsdtar xzf ${wrksrc}/${_rapidjson_gitrev}.tar.gz \ --strip-components=1 -C ${wrksrc}/external/rapidjson - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_supercop_gitrev}.tar.gz \ + bsdtar xzf ${wrksrc}/${_supercop_gitrev}.tar.gz \ --strip-components=1 -C ${wrksrc}/external/supercop } From a746e26210cde7479d851ad8b444051f55f2226b Mon Sep 17 00:00:00 2001 From: Kevin Crumb Date: Thu, 17 Nov 2022 21:16:07 +0000 Subject: [PATCH 2/2] monero-gui: update to 0.18.1.2. --- srcpkgs/monero-gui/template | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/srcpkgs/monero-gui/template b/srcpkgs/monero-gui/template index 61e5dd9da1b7..13f4c41d21a6 100644 --- a/srcpkgs/monero-gui/template +++ b/srcpkgs/monero-gui/template @@ -1,10 +1,10 @@ # Template file for 'monero-gui' pkgname=monero-gui -version=0.17.2.3 -revision=2 -_monero_version=0.17.2.3 -_randomx_version="1.1.9" +version=0.18.1.2 +revision=1 +_monero_version=0.18.1.2 # the revision monero uses as a submodule for the specific version +_randomx_gitrev="261d58c77fc5547c0aa7fdfeb58421ba7e0e6e1c" _rapidjson_gitrev="129d19ba7f496df5e33658527a7158c79b99c21c" _supercop_gitrev="633500ad8c8759995049ccd022107d1fa8a1bbc9" _quirc_gitrev="7e7ab596e4d0988faf1c12ae89c354b114181c40" @@ -12,7 +12,7 @@ build_style=cmake configure_args="-DVERSION_IS_RELEASE=true -DQt5_LRELEASE_EXECUTABLE=/usr/bin/lrelease" hostmakedepends="pkg-config qt5-tools qt5-qmake qt5-quickcontrols qt5-declarative-devel qt5-svg-devel" -makedepends="boost-devel libatomic-devel libunwind-devel miniupnpc-devel +makedepends="boost-devel libunwind-devel miniupnpc-devel qt5-declarative-devel readline-devel unbound-devel libsodium-devel hidapi-devel qt5-svg-devel libgcrypt-devel zeromq-devel" depends="qt5-graphicaleffects qt5-quickcontrols qt5-quickcontrols2 qt5-xmlpatterns" @@ -22,18 +22,17 @@ license="BSD-3-Clause" homepage="https://getmonero.org" distfiles="https://github.com/monero-project/monero-gui/archive/v${version}.tar.gz https://github.com/monero-project/monero/archive/v${_monero_version}.tar.gz>monero-${_monero_version}.tar.gz - https://github.com/tevador/RandomX/archive/v${_randomx_version}.tar.gz - https://github.com/Tencent/rapidjson/archive/${_rapidjson_gitrev}.tar.gz - https://github.com/monero-project/supercop/archive/${_supercop_gitrev}.tar.gz - https://github.com/dlbeer/quirc/archive/${_quirc_gitrev}.tar.gz" -checksum="aeab35380282b0403be926b78d5249df2f97f9cbe36bb374ac39daf4f02bb349 - e4462f8909bdc5e66d76f4023374ff759159c15fe7d407f0c21619769e87c35d - b878fd6ea6d4e1dcdfa085427ce4666c1085e8c5a9e049c04ca2036b4aead0f5 + https://github.com/tevador/RandomX/archive/${_randomx_gitrev}.tar.gz>RandomX-${_randomx_gitrev}.tar.gz + https://github.com/Tencent/rapidjson/archive/${_rapidjson_gitrev}.tar.gz>rapidjson-${_rapidjson_gitrev}.tar.gz + https://github.com/monero-project/supercop/archive/${_supercop_gitrev}.tar.gz>supercop-${_supercop_gitrev}.tar.gz + https://github.com/dlbeer/quirc/archive/${_quirc_gitrev}.tar.gz>quirc-${_quirc_gitrev}.tar.gz" +checksum="b5494830e917231aa7515992c69bcbb495f532fefde42530b265f9fd590e1702 + f7fec9c7456e22b70cb86a34dd9192c948161155fdbdfb8505f8ea95c357a38e + 4aeadafe16810320fd492491e39d03fb6028a2db35916aba0fef96c716aba46f 44b007d419ac21b6affec58991e865ee572346ead19b73cf1c3e4e11c7a81273 b973b9d8269ec4d97c3c3443f0dad96d09f72b1b30e616e0947557adbdbb03f7 c8366aecb6ba48ec50a7e579a4fa18eb55c3c4be7d3efb2a83726157977f4ca6" -skip_extraction="monero-${version}.tar.gz ${_rapidjson_gitrev}.tar.gz ${_supercop_gitrev}.tar.gz v${_randomx_version}.tar.gz - ${_quirc_gitrev}.tar.gz" +skip_extraction="monero-${version}.tar.gz rapidjson-${_rapidjson_gitrev}.tar.gz supercop-${_supercop_gitrev}.tar.gz RandomX-${_randomx_gitrev}.tar.gz quirc-${_quirc_gitrev}.tar.gz" if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" @@ -58,10 +57,10 @@ esac post_extract() { bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/monero-${_monero_version}.tar.gz --strip-components 1 -C monero - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_rapidjson_gitrev}.tar.gz --strip-components 1 -C monero/external/rapidjson - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_supercop_gitrev}.tar.gz --strip-components 1 -C monero/external/supercop - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${_randomx_version}.tar.gz --strip-components 1 -C monero/external/randomx - bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_quirc_gitrev}.tar.gz --strip-components 1 -C external/quirc + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/rapidjson-${_rapidjson_gitrev}.tar.gz --strip-components 1 -C monero/external/rapidjson + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/supercop-${_supercop_gitrev}.tar.gz --strip-components 1 -C monero/external/supercop + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/RandomX-${_randomx_gitrev}.tar.gz --strip-components 1 -C monero/external/randomx + bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/quirc-${_quirc_gitrev}.tar.gz --strip-components 1 -C external/quirc } post_patch() { @@ -76,7 +75,8 @@ pre_configure() { echo "var GUI_VERSION = \"${version}\"" > version.js echo "var GUI_MONERO_VERSION = \"${version}\"" >> version.js if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - vsed -i monero/CMakeLists.txt -e '/include(version.cmake)/i list(APPEND EXTRA_LIBRARIES libatomic.a)' + vsed -i monero/CMakeLists.txt -e \ + '/if(ANDROID)/i list(APPEND EXTRA_LIBRARIES libatomic.a)' fi }