From patchwork Tue Jun 25 10:07:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guillaume Le Vaillant X-Patchwork-Id: 14388 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3EDF517151; Tue, 25 Jun 2019 11:08:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id AF8141711B for ; Tue, 25 Jun 2019 11:08:25 +0100 (BST) Received: from localhost ([::1]:58272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfiNC-0001KN-9v for patchwork@mira.cbaines.net; Tue, 25 Jun 2019 06:08:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60464) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfiN1-00014b-72 for guix-patches@gnu.org; Tue, 25 Jun 2019 06:08:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfiMs-0006yB-Vw for guix-patches@gnu.org; Tue, 25 Jun 2019 06:08:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfiMs-0006xw-QZ for guix-patches@gnu.org; Tue, 25 Jun 2019 06:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfiMs-0005eq-I8 for guix-patches@gnu.org; Tue, 25 Jun 2019 06:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36258] [PATCH 1/2] gnu: monero: Update to 0.14.1.0. Resent-From: Guillaume LE VAILLANT Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Jun 2019 10:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: swedebugia X-Debbugs-Original-Cc: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156145724121694 (code B ref -1); Tue, 25 Jun 2019 10:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jun 2019 10:07:21 +0000 Received: from localhost ([127.0.0.1]:58674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfiMC-0005dp-7d for submit@debbugs.gnu.org; Tue, 25 Jun 2019 06:07:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:45961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfiMA-0005dg-Ko for submit@debbugs.gnu.org; Tue, 25 Jun 2019 06:07:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60350) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfiM6-0000Pv-Qp for guix-patches@gnu.org; Tue, 25 Jun 2019 06:07:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfiM4-0006G7-1C for guix-patches@gnu.org; Tue, 25 Jun 2019 06:07:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44757) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfiM3-0006CP-BB for guix-patches@gnu.org; Tue, 25 Jun 2019 06:07:11 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 09EB82400E6 for ; Tue, 25 Jun 2019 12:07:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1561457227; bh=TBhaAzaR9LMFQvTsNBXAnb09xkJCuvl9NyJX75cjlic=; h=From:To:Cc:Subject:Date:From; b=RQYAo1T6uE2mOrLRpvDSmNFHpy/owX16e1GB0alGFCJXWsTuh1YTPFt5MbRcCb8RP OkUDHRmIUa3Xy3gaRyo8xQEPKZ43lfGcMVlI3Ao7Q/2+YZOuWEca7kr7KCUTMw4gU8 5+3N7htzES68XUlq59H0ADr0izFCJLRcCRTbmkHOf4ZkfxZxm3SzjHQydgm9caNTwA pYqe/Afc+tPwYVI4io8ugOyprJ3klgVwSNFxCBtjZqxJMiCiwZFjST9p5yZuQVVU1u BHPJPzptrCLzFnWfFQze622GXsnqEdWMVDSbkTuVX7xyO8WveItvHCCrS5gBwT7icB f4TQ8LeeGlPLg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 45Y1zW45Thz9rxK; Tue, 25 Jun 2019 12:07:03 +0200 (CEST) References: <20190617084436.12311-1-glv@posteo.net> <49b66acb-c2f9-5fd0-97aa-16711ae933e1@riseup.net> <87imsx2rk3.fsf@yamatai> <87blyobgzl.fsf@yamatai> <9abcc53c-1a07-d3b3-2b9f-1571328c7414@riseup.net> <87y31rtijx.fsf@yamatai> User-agent: mu4e 1.2.0; emacs 26.2 From: Guillaume LE VAILLANT In-reply-to: <87y31rtijx.fsf@yamatai> Date: Tue, 25 Jun 2019 12:07:02 +0200 Message-ID: <87mui63rnd.fsf@yamatai> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 36258@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Guillaume LE VAILLANT a écrit : > swedebugia a écrit : > >> Tests completed succesfully. I saw this note: >> >> + ;; TODO: Find why portability_wallet test fails >> + ;; Maybe the Boost version used to create the test >> + ;; wallet and the current Boost version are not >> + ;; completely compatible? >> + "Serialization.portability_wallet" >> + "is_hdd.linux_os_root") >> >> Did you report this upstream? >> Could you include the failed test also (commented below the comment) >> >> Otherwise LGTM :) >> >> PS: I started working on Aeon (fork of monero) since they are very similar it >> should be "easy" to package now that you got monero working again. > > I'm not entirely sure why the "Serialization.portability_wallet" test > fails. It might not be related to compatibility between Boost versions, > because compiling with the same Boost version in two different ways > gives different results. > > When I compile using 'guix build monero', the test fails. > --- > /tmp/guix-build-monero-0.14.1.0.drv-0/monero-0.14.1.0-checkout/tests/unit_tests/serialization.cpp:633: Failure > Value of: r > Actual: false > Expected: true > --- > > When I compile by hand using 'guix environment --pure monero', the test > passes. I found out why the "Serialization.portability_wallet" failed; it was because of missing write permissions on some test files. Updated patch with the test enabled attached. From a41ff296f296e43834af07c20e60319b302b70f7 Mon Sep 17 00:00:00 2001 From: Guillaume LE VAILLANT Date: Sat, 15 Jun 2019 10:12:36 +0200 Subject: [PATCH 1/2] gnu: monero: Update to 0.14.1.0. * gnu/packages/finance.scm (monero): Update to 0.14.1.0. * gnu/packages/patches/monero-use-system-miniupnpc.patch: Update file. --- gnu/packages/finance.scm | 90 ++++++++++-------- .../patches/monero-use-system-miniupnpc.patch | 95 +++---------------- 2 files changed, 62 insertions(+), 123 deletions(-) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 5b95bcb704..7cdb41b372 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Adriano Peluso ;;; Copyright © 2018, 2019 Nicolas Goaziou ;;; Copyright © 2018 Arun Isaac +;;; Copyright © 2019 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages documentation) @@ -68,6 +70,7 @@ #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) + #:use-module (gnu packages version-control) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages gnuzilla)) @@ -428,49 +431,59 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch (define-public monero ;; This package bundles easylogging++ and lmdb. - ;; The bundled easylogging++ is modified, and the changes will not be upstreamed. + ;; The bundled easylogging++ is modified, and the changes will not be + ;; upstreamed. ;; The devs deem the lmdb driver too critical a consenus component, to use ;; the system's dynamically linked library. (package (name "monero") - (version "0.12.3.0") + (version "0.14.1.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/monero-project/monero") - (commit (string-append "v" version)))) + (url "https://github.com/monero-project/monero.git") + (commit (string-append "v" version)) + (recursive? #t))) (file-name (git-file-name name version)) (patches (search-patches "monero-use-system-miniupnpc.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled dependencies. + (for-each + delete-file-recursively + '("external/miniupnp" "external/rapidjson" + "external/unbound")) + #t)) (sha256 (base32 - "14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd")))) + "1asa197fad81jfv12qgaa7y7pdr1r1pda96m9pvivkh4v30cx0nh")))) (build-system cmake-build-system) (native-inputs `(("doxygen" ,doxygen) - ("googletest" ,googletest) + ("git" ,git) ("graphviz" ,graphviz) - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ("qttools" ,qttools))) (inputs - `(("bind" ,isc-bind) - ("boost" ,boost) - ("zeromq" ,zeromq) + `(("boost" ,boost) ("cppzmq" ,cppzmq) ("expat" ,expat) - ("libsodium" ,libsodium) + ("hidapi" ,hidapi) ("libunwind" ,libunwind) - ("lmdb" ,lmdb) - ("miniupnpc" ,monero-miniupnpc) + ("libsodium" ,libsodium) + ("miniupnpc" ,miniupnpc) ("openssl" ,openssl) ("rapidjson" ,rapidjson) - ("unbound" ,unbound))) + ("readline" ,readline) + ("unbound" ,unbound) + ("xz" ,xz) + ("zeromq" ,zeromq))) (arguments `(#:out-of-source? #t - #:build-type "release" - #:configure-flags '("-DBUILD_TESTS=ON" - ,@(if (string=? "aarch64-linux" (%current-system)) - '("-DARCH=armv8-a") - '()) + #:configure-flags '("-DARCH=default" + "-DBUILD_TESTS=ON" "-DBUILD_GUI_DEPS=ON") #:phases (modify-phases %standard-phases @@ -479,24 +492,24 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch (lambda _ (setenv "HOME" (getcwd)) #t)) - (add-after 'set-home 'fix-wallet-path-for-unit-tests - (lambda _ - (substitute* "tests/unit_tests/serialization.cpp" - (("\\.\\./\\.\\./\\.\\./\\.\\./") "../../")) - #t)) - (add-after 'fix-wallet-path-for-unit-tests 'change-log-path + (add-after 'set-home 'change-log-path (lambda _ (substitute* "contrib/epee/src/mlog.cpp" (("epee::string_tools::get_current_module_folder\\(\\)") - "\".bitmonero\"")) - (substitute* "contrib/epee/src/mlog.cpp" - (("return \\(") "return ((std::string(getenv(\"HOME\"))) / ")) + "\".bitmonero\"") + (("return \\(") + "return ((std::string(getenv(\"HOME\"))) / ")) #t)) + (add-after 'change-log-path 'fix-file-permissions-for-tests + (lambda _ + (for-each (lambda (f) + (chmod f #o644)) + (find-files "tests/data/" "wallet_9svHk1.*")) + #t)) + ;; Only try tests that don't need access to network or system (replace 'check (lambda _ - (invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'" - "test"))) - ;; The excluded unit tests need network access + (invoke "make" "ARGS=-R 'hash|core_tests'" "test"))) (add-after 'check 'unit-tests (lambda _ (let ((excluded-unit-tests @@ -506,22 +519,17 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch "DNSResolver.IPv4Success" "DNSResolver.DNSSECSuccess" "DNSResolver.DNSSECFailure" - "DNSResolver.GetTXTRecord") + "DNSResolver.GetTXTRecord" + "is_hdd.linux_os_root") ":"))) (invoke "tests/unit_tests/unit_tests" (string-append "--gtest_filter=-" - excluded-unit-tests))))) - (add-after 'install 'install-blockchain-import-export - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (install-file "bin/monero-blockchain-import" bin) - (install-file "bin/monero-blockchain-export" bin))))))) + excluded-unit-tests)))))))) (home-page "https://getmonero.org/") (synopsis "Command-line interface to the Monero currency") (description - "Monero is a secure, private, untraceable currency. This package provides the -Monero command line client and daemon.") + "Monero is a secure, private, untraceable currency. This package provides +the Monero command line client and daemon.") (license license:bsd-3))) (define-public monero-gui diff --git a/gnu/packages/patches/monero-use-system-miniupnpc.patch b/gnu/packages/patches/monero-use-system-miniupnpc.patch index 6bc825d121..c5d376d793 100644 --- a/gnu/packages/patches/monero-use-system-miniupnpc.patch +++ b/gnu/packages/patches/monero-use-system-miniupnpc.patch @@ -1,111 +1,42 @@ -This reverts commit 1e20d705e7c64d2b17c031f345057d1e8850fafa, so that it's possible to use our own -miniupnpc, instead of a git submodule. ---- - CMakeLists.txt | 8 ++++++++ - external/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++---------- - src/p2p/net_node.inl | 13 ++++++++++--- - 3 files changed, 49 insertions(+), 13 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3b93988e..ef948885 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -430,6 +430,14 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") - - add_subdirectory(external) - -+# Final setup for miniupnpc -+if(UPNP_STATIC OR IOS) -+ add_definitions("-DUPNP_STATIC") -+else() -+ add_definitions("-DUPNP_DYNAMIC") -+ include_directories(${UPNP_INCLUDE}) -+endif() -+ - # Final setup for libunbound - include_directories(${UNBOUND_INCLUDE}) - link_directories(${UNBOUND_LIBRARY_DIRS}) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index 1fc4d64c..b4f712ee 100644 +index 7553f87e..8e865c6c 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt -@@ -34,21 +34,42 @@ - # 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. -+if(NOT IOS) -+ find_package(Miniupnpc QUIET) -+endif() +@@ -37,19 +37,7 @@ --find_package(Miniupnpc REQUIRED) -+# If we have the correct shared version and we're not building static, use it -+if(STATIC OR IOS) -+ set(USE_SHARED_MINIUPNPC false) -+elseif(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER) -+ set(USE_SHARED_MINIUPNPC true) -+endif() + find_package(Miniupnpc REQUIRED) -message(STATUS "Using in-tree miniupnpc") -+if(USE_SHARED_MINIUPNPC) -+ message(STATUS "Using shared miniupnpc found at ${MINIUPNP_INCLUDE_DIR}") - -add_subdirectory(miniupnp/miniupnpc) -+ set(UPNP_STATIC false PARENT_SCOPE) -+ set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE) -+ set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE) -+else() -+ if(STATIC) -+ message(STATUS "Using miniupnpc from local source tree for static build") -+ else() -+ message(STATUS "Using miniupnpc from local source tree (/external/miniupnp/miniupnpc)") -+ endif() - -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") -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() -+ add_subdirectory(miniupnp/miniupnpc) -+ -+ set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") -+ 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_STATIC true PARENT_SCOPE) -+ set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) -+endif() ++set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE) find_package(Unbound) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl -index 9b21705e..76340a22 100644 +index 74924e4f..3554dd0d 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl -@@ -49,9 +49,16 @@ +@@ -49,9 +49,9 @@ #include "storages/levin_abstract_invoke2.h" #include "cryptonote_core/cryptonote_core.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 ++#include ++#include #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" --- -2.16.2 - -- 2.22.0