Skip to content

Commit

Permalink
bump to v0.18.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cornfeedhobo committed Oct 21, 2024
1 parent 8b7cca9 commit 7d93c1c
Show file tree
Hide file tree
Showing 11 changed files with 165 additions and 46 deletions.
93 changes: 63 additions & 30 deletions Dockerfile
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] && \
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
## TL;DR

```bash
UID="$(id -u)" GID="$(id -g)" docker-compose run wallet
UID="$(id -u)" GID="$(id -g)" docker compose run wallet
```

```bash
docker-compose down
docker compose down
```

## Running the Daemon
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.18.3.2
v0.18.3.3
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docker_tag="${1:-${monero_tag}}"
build_script=(
docker
build
--progress=plain
--build-arg="MONERO_TAG=${monero_tag}"
--tag="cornfeedhobo/monero:${docker_tag}"
.
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ services:
target: "/home/monero/.bitmonero"
command: >
monero-wallet-cli
--wallet-file="${WALLET:-wallet}"
--daemon-address="blockchain:18081"
--trusted-daemon
12 changes: 0 additions & 12 deletions epee.stdint.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patches/easylogging.patch
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
24 changes: 24 additions & 0 deletions patches/epee.patch
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>
22 changes: 22 additions & 0 deletions patches/miniupnpc.2.patch
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) {
14 changes: 14 additions & 0 deletions patches/miniupnpc.patch
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)
25 changes: 25 additions & 0 deletions patches/monero.patch
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 {

0 comments on commit 7d93c1c

Please sign in to comment.