-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b7cca9
commit 7d93c1c
Showing
11 changed files
with
165 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,52 @@ | ||
# Multistage docker build, requires docker 17.05 | ||
|
||
ARG ALPINE_TAG=3.20 | ||
|
||
# Builder stage | ||
FROM alpine:edge as builder | ||
FROM alpine:${ALPINE_TAG} as builder | ||
|
||
ARG MONERO_TAG | ||
RUN test -n "${MONERO_TAG}" | ||
|
||
RUN set -ex && \ | ||
apk update && \ | ||
apk upgrade --no-cache && \ | ||
apk add --no-cache \ | ||
apk upgrade && \ | ||
apk add \ | ||
autoconf \ | ||
automake \ | ||
boost-dev \ | ||
clang-dev \ | ||
cmake \ | ||
cppzmq \ | ||
curl \ | ||
doxygen \ | ||
file \ | ||
g++ \ | ||
gettext \ | ||
git \ | ||
go \ | ||
gperf \ | ||
graphviz-dev \ | ||
hidapi-dev \ | ||
icu-data-full \ | ||
libtool \ | ||
libsodium-dev \ | ||
libudev-zero-dev \ | ||
libusb-dev \ | ||
linux-headers \ | ||
llvm-libunwind-dev \ | ||
make \ | ||
openssl-dev \ | ||
patch \ | ||
perl \ | ||
python3 \ | ||
qt5-qttools-dev \ | ||
rapidjson-dev \ | ||
readline-dev \ | ||
samurai \ | ||
unbound-dev \ | ||
zeromq-dev \ | ||
zlib-dev | ||
|
||
# Alpine doesn't package this anymore, and it's been archived on github. | ||
# This is dirty and won't last forever. It might be worth embedding soon. | ||
RUN apk add --no-cache \ | ||
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main \ | ||
libexecinfo-dev | ||
|
||
# Build the fixuid tool | ||
RUN set -ex && \ | ||
go install github.com/boxboat/[email protected] && \ | ||
|
@@ -48,38 +60,59 @@ RUN git clone \ | |
|
||
WORKDIR /usr/src/monero | ||
|
||
# This is patched on master, but didn't make it into this release. | ||
COPY epee.stdint.patch epee.stdint.patch | ||
RUN patch -p1 < epee.stdint.patch | ||
|
||
# Set flags that make it possible to compile against musl. | ||
ENV CFLAGS="-fPIC -DELPP_FEATURE_CRASH_LOG -DSTACK_TRACE=OFF" | ||
ENV CXXFLAGS="-fPIC -DELPP_FEATURE_CRASH_LOG -DSTACK_TRACE=OFF" | ||
ENV LDFLAGS="-Wl,-V" | ||
# patches needed to work with alpine | ||
COPY patches patches | ||
RUN set -ex && \ | ||
patch -p1 < patches/easylogging.patch && \ | ||
patch -p1 < patches/epee.patch && \ | ||
patch -p1 < patches/miniupnpc.patch && \ | ||
patch -p1 < patches/monero.patch | ||
|
||
# Build dependencies and monero, but like, be nice about it. | ||
RUN nice -n 19 \ | ||
# Build monero, but like, be nice about it. | ||
RUN set -ex && \ | ||
cmake \ | ||
-Wno-dev \ | ||
-B build \ | ||
-G Ninja \ | ||
-D ARCH="x86-64" \ | ||
-D BUILD_64=on \ | ||
-D BUILD_TAG="linux-x64" \ | ||
-D BUILD_TESTS=off \ | ||
-D MANUAL_SUBMODULES=1 \ | ||
-D STACK_TRACE=off \ | ||
-D CMAKE_BUILD_TYPE=Release \ | ||
-D CMAKE_C_COMPILER=clang \ | ||
-D CMAKE_CXX_COMPILER=clang++ \ | ||
-D CMAKE_INSTALL_PREFIX=/usr \ | ||
&& \ | ||
nice -n 19 \ | ||
ionice -c2 -n7 \ | ||
make -j${NPROC:-$(( $(nproc) - 1 ))} depends target=x86_64-linux-gnu | ||
cmake --build build | ||
|
||
|
||
# Runtime stage | ||
FROM alpine:edge as runtime | ||
FROM alpine:${ALPINE_TAG} as runtime | ||
|
||
RUN set -ex && \ | ||
apk update && \ | ||
apk upgrade --no-cache && \ | ||
apk add --no-cache \ | ||
ca-certificates | ||
|
||
# Alpine doesn't package this anymore, and it's been archived on github. | ||
# This is dirty and won't last forever. It might be worth embedding soon. | ||
RUN apk add --no-cache \ | ||
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main \ | ||
libexecinfo | ||
boost \ | ||
ca-certificates \ | ||
hidapi \ | ||
libsodium-dev \ | ||
libudev-zero \ | ||
libusb \ | ||
llvm-libunwind \ | ||
openssl \ | ||
rapidjson \ | ||
readline \ | ||
unbound \ | ||
zeromq \ | ||
zlib | ||
|
||
COPY --from=builder /root/go/bin/fixuid /usr/local/bin/fixuid | ||
COPY --from=builder /usr/src/monero/build/x86_64-linux-gnu/release/bin/* /usr/local/bin/ | ||
COPY --from=builder /usr/src/monero/build/bin/* /usr/local/bin/ | ||
|
||
# Create a dedicated user and configure fixuid | ||
ARG MONERO_USER="monero" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.18.3.2 | ||
v0.18.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h | ||
index b983a79..6d51f00 100644 | ||
--- a/external/easylogging++/easylogging++.h | ||
+++ b/external/easylogging++/easylogging++.h | ||
@@ -221,7 +221,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre | ||
# define ELPP_INTERNAL_INFO(lvl, msg) | ||
#endif // (defined(ELPP_DEBUG_INFO)) | ||
#if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG)) | ||
-# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_OPENBSD && !ELPP_OS_NETBSD && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN) | ||
+# if (__has_include(<execinfo.h>) && ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_OPENBSD && !ELPP_OS_NETBSD && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN) | ||
# define ELPP_STACKTRACE 1 | ||
# else | ||
# define ELPP_STACKTRACE 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/contrib/epee/include/net/http_base.h b/contrib/epee/include/net/http_base.h | ||
index 4af4da7..ee49c6e 100644 | ||
--- a/contrib/epee/include/net/http_base.h | ||
+++ b/contrib/epee/include/net/http_base.h | ||
@@ -34,6 +34,7 @@ | ||
#include <string> | ||
#include <utility> | ||
#include <list> | ||
+#include <stdint.h> | ||
|
||
#undef MONERO_DEFAULT_LOG_CATEGORY | ||
#define MONERO_DEFAULT_LOG_CATEGORY "net.http" | ||
diff --git a/contrib/epee/src/file_io_utils.cpp b/contrib/epee/src/file_io_utils.cpp | ||
index c0798a5..2fd3aa1 100644 | ||
--- a/contrib/epee/src/file_io_utils.cpp | ||
+++ b/contrib/epee/src/file_io_utils.cpp | ||
@@ -26,6 +26,7 @@ | ||
|
||
#include "file_io_utils.h" | ||
|
||
+#include <stdint.h> | ||
#include <fstream> | ||
#include <boost/filesystem/path.hpp> | ||
#include <boost/filesystem/operations.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl | ||
index 30e3d31..1c6d1e2 100644 | ||
--- a/src/p2p/net_node.inl | ||
+++ b/src/p2p/net_node.inl | ||
@@ -2989,7 +2989,7 @@ namespace nodetool | ||
UPNPUrls urls; | ||
IGDdatas igdData; | ||
char lanAddress[64]; | ||
- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); | ||
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, nullptr, 0); | ||
freeUPNPDevlist(deviceList); | ||
if (result > 0) { | ||
if (result == 1) { | ||
@@ -3057,7 +3057,7 @@ namespace nodetool | ||
UPNPUrls urls; | ||
IGDdatas igdData; | ||
char lanAddress[64]; | ||
- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); | ||
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, nullptr, 0); | ||
freeUPNPDevlist(deviceList); | ||
if (result > 0) { | ||
if (result == 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt | ||
index 5b7f69a..8f4a346 100644 | ||
--- a/external/CMakeLists.txt | ||
+++ b/external/CMakeLists.txt | ||
@@ -36,6 +36,9 @@ | ||
# others. | ||
|
||
find_package(Miniupnpc REQUIRED) | ||
+if(NOT MSVC) | ||
+ add_compile_options(-D_GNU_SOURCE) | ||
+endif() | ||
|
||
message(STATUS "Using in-tree miniupnpc") | ||
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/cmake/Version.cmake b/cmake/Version.cmake | ||
index e9ed9fb..e3377aa 100644 | ||
--- a/cmake/Version.cmake | ||
+++ b/cmake/Version.cmake | ||
@@ -32,7 +32,7 @@ function (write_version tag) | ||
endfunction () | ||
|
||
find_package(Git QUIET) | ||
-if ("$Format:$" STREQUAL "") | ||
+if ("$Format:$" STREQUAL "" OR NOT EXISTS .git) | ||
# We're in a tarball; use hard-coded variables. | ||
set(VERSION_IS_RELEASE "true") | ||
write_version("release") | ||
diff --git a/src/common/combinator.cpp b/src/common/combinator.cpp | ||
index 72b1397..2b42a66 100644 | ||
--- a/src/common/combinator.cpp | ||
+++ b/src/common/combinator.cpp | ||
@@ -29,6 +29,7 @@ | ||
// | ||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers | ||
|
||
+#include <stdint.h> | ||
#include "combinator.h" | ||
|
||
namespace tools { |