summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/monero/files')
-rw-r--r--net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch30
-rw-r--r--net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch102
-rw-r--r--net-p2p/monero/files/monerod.conf8
-rw-r--r--net-p2p/monero/files/monerod.confd6
-rw-r--r--net-p2p/monero/files/monerod.initd22
-rw-r--r--net-p2p/monero/files/monerod.service17
6 files changed, 185 insertions, 0 deletions
diff --git a/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch b/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch
new file mode 100644
index 0000000..d281f60
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch
@@ -0,0 +1,30 @@
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 30e3d31b9..c49783e1c 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -2989,7 +2989,12 @@ namespace nodetool
+ UPNPUrls urls;
+ IGDdatas igdData;
+ char lanAddress[64];
++#if MINIUPNPC_API_VERSION > 17
++ char wanAddress[64];
++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof(wanAddress));
++#else
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#endif
+ freeUPNPDevlist(deviceList);
+ if (result > 0) {
+ if (result == 1) {
+@@ -3057,7 +3062,12 @@ namespace nodetool
+ UPNPUrls urls;
+ IGDdatas igdData;
+ char lanAddress[64];
++#if MINIUPNPC_API_VERSION > 17
++ char wanAddress[64];
++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof(wanAddress));
++#else
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#endif
+ freeUPNPDevlist(deviceList);
+ if (result > 0) {
+ if (result == 1) {
diff --git a/net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch
new file mode 100644
index 0000000..6cd7e7c
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch
@@ -0,0 +1,102 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -458,7 +458,7 @@
+ # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
+ # set(BSDI TRUE)
+
+-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
++include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external )
+
+ if(APPLE)
+ cmake_policy(SET CMP0042 NEW)
+@@ -1201,7 +1201,6 @@
+ set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
+ endif()
+
+-include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
+ add_subdirectory(contrib)
+ add_subdirectory(src)
+
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -37,21 +37,7 @@
+
+ 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)
+- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
+-endif()
+-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
+-endif()
+-
+-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
++set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE)
+
+ find_package(Unbound)
+
+@@ -69,4 +55,3 @@
+ add_subdirectory(db_drivers)
+ add_subdirectory(easylogging++)
+ add_subdirectory(qrcodegen)
+-add_subdirectory(randomx EXCLUDE_FROM_ALL)
+--- a/src/crypto/CMakeLists.txt
++++ b/src/crypto/CMakeLists.txt
+@@ -55,6 +55,7 @@
+ endif()
+
+ include_directories(${RANDOMX_INCLUDE})
++include_directories(SYSTEM /usr/include/monero)
+
+ set(crypto_headers)
+
+@@ -97,6 +98,3 @@
+ # cheat because cmake and ccache hate each other
+ set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
+ set_property(SOURCE CryptonightR_template.S PROPERTY XCODE_EXPLICIT_FILE_TYPE sourcecode.asm)
+-
+-# Must be done last, because it references libraries in this directory
+-add_subdirectory(wallet)
+--- a/src/crypto/wallet/crypto.h
++++ b/src/crypto/wallet/crypto.h
+@@ -30,7 +30,6 @@
+ #pragma once
+
+ #include <cstddef>
+-#include "crypto/wallet/ops.h"
+
+ namespace crypto {
+ namespace wallet {
+--- a/src/device/CMakeLists.txt
++++ b/src/device/CMakeLists.txt
+@@ -73,7 +73,7 @@
+ cncrypto
+ cryptonote_format_utils_basic
+ ringct_basic
+- wallet-crypto
++ monero-crypto
+ ${OPENSSL_CRYPTO_LIBRARIES}
+ ${Boost_SERIALIZATION_LIBRARY}
+ PRIVATE
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -60,9 +60,9 @@
+ #include "cryptonote_core/cryptonote_core.h"
+ #include "net/parse.h"
+
+-#include <miniupnp/miniupnpc/miniupnpc.h>
+-#include <miniupnp/miniupnpc/upnpcommands.h>
+-#include <miniupnp/miniupnpc/upnperrors.h>
++#include <miniupnpc/miniupnpc.h>
++#include <miniupnpc/upnpcommands.h>
++#include <miniupnpc/upnperrors.h>
+
+ #undef MONERO_DEFAULT_LOG_CATEGORY
+ #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
diff --git a/net-p2p/monero/files/monerod.conf b/net-p2p/monero/files/monerod.conf
new file mode 100644
index 0000000..d019576
--- /dev/null
+++ b/net-p2p/monero/files/monerod.conf
@@ -0,0 +1,8 @@
+# Configuration for monerod
+# Syntax: any command line option may be specified as 'clioptionname=value'.
+# Boolean options such as 'no-igd' are specified as 'no-igd=1'.
+# See 'monerod --help' for all available options.
+
+data-dir=/var/lib/monero
+log-file=/var/log/monero/monero.log
+log-level=0
diff --git a/net-p2p/monero/files/monerod.confd b/net-p2p/monero/files/monerod.confd
new file mode 100644
index 0000000..94515dc
--- /dev/null
+++ b/net-p2p/monero/files/monerod.confd
@@ -0,0 +1,6 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+monerod_args="--config-file /etc/monero/monerod.conf --non-interactive"
+monerod_user=monero
+monerod_group=monero
diff --git a/net-p2p/monero/files/monerod.initd b/net-p2p/monero/files/monerod.initd
new file mode 100644
index 0000000..48a46d5
--- /dev/null
+++ b/net-p2p/monero/files/monerod.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/var/run/monerod.pid
+command=/usr/bin/monerod
+command_args="${monerod_args}"
+start_stop_daemon_args="-u ${monerod_user} -b -m -p ${pidfile}"
+retry="SIGTERM/30/SIGKILL/5"
+
+name="Monero P2P Daemon"
+description="Connects to the Monero P2P network"
+
+depend() {
+ need localmount
+ need net
+}
+
+start_pre() {
+ checkpath --directory --owner ${monerod_user}:${monerod_group} --mode 0755 \
+ /var/lib/monero /var/log/monero
+}
diff --git a/net-p2p/monero/files/monerod.service b/net-p2p/monero/files/monerod.service
new file mode 100644
index 0000000..3275604
--- /dev/null
+++ b/net-p2p/monero/files/monerod.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Monero P2P Daemon
+After=network.target
+
+[Service]
+User=monero
+Group=monero
+StateDirectory=monero
+LogsDirectory=monero
+Type=simple
+ExecStart=/usr/bin/monerod --config-file /etc/monero/monerod.conf --non-interactive
+Restart=on-failure
+StandardOutput=null
+StandardError=null
+
+[Install]
+WantedBy=multi-user.target