From 7ea8edb72a16e1ee9ee67715d3afb85b48f68d22 Mon Sep 17 00:00:00 2001 From: Damian Mee Date: Mon, 19 Aug 2019 02:44:24 +0700 Subject: [PATCH] =?UTF-8?q?patch=20the=20failing=20test,=20and=20try=20aga?= =?UTF-8?q?in=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0.18/source-native/Dockerfile | 8 +++++--- 0.18/source-native/skip-fs-test-of-utf8.patch | 13 +++++++++++++ 0.18/source/Dockerfile | 9 +++++---- 0.18/source/skip-fs-test-of-utf8.patch | 13 +++++++++++++ 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 0.18/source-native/skip-fs-test-of-utf8.patch create mode 100644 0.18/source/skip-fs-test-of-utf8.patch diff --git a/0.18/source-native/Dockerfile b/0.18/source-native/Dockerfile index bfa64e7..9489130 100644 --- a/0.18/source-native/Dockerfile +++ b/0.18/source-native/Dockerfile @@ -1,9 +1,6 @@ # Build stage for Bitcoin Core FROM alpine:3.10 AS bitcoin-core -# Because sometimes this happens on emulated architectures: -# https://github.com/bitcoin/bitcoin/issues/14948 -ENV LC_ALL=C.UTF-8 # fetch already built berkeleydb COPY --from=lncm/berkeleydb:db-4.8.30.NC /opt /opt @@ -60,6 +57,11 @@ RUN tar -xzf *.tar.gz # Change to the extraced directory WORKDIR /bitcoin-${BITCOIN_VERSION} +# Disable test that fails on Alpine for unrelated reasons: missing locale. Not important. +# https://github.com/bitcoin/bitcoin/issues/14948 +COPY skip-fs-test-of-utf8.patch . +RUN patch -p0 < skip-fs-test-of-utf8.patch + # ??? RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac # ??? diff --git a/0.18/source-native/skip-fs-test-of-utf8.patch b/0.18/source-native/skip-fs-test-of-utf8.patch new file mode 100644 index 0000000..9d3790c --- /dev/null +++ b/0.18/source-native/skip-fs-test-of-utf8.patch @@ -0,0 +1,13 @@ +diff --git src/test/fs_tests.cpp src/test/fs_tests.cpp +index 93aee10bb..4a01e2ed8 100644 +--- src/test/fs_tests.cpp ++++ src/test/fs_tests.cpp +@@ -14,7 +14,7 @@ BOOST_AUTO_TEST_CASE(fsbridge_fstream) + fs::path tmpfolder = SetDataDir("fsbridge_fstream"); + // tmpfile1 should be the same as tmpfile2 + fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; +- fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃"; ++ fs::path tmpfile2 = tmpfolder / "fs_tests_₿_🏃"; + { + fsbridge::ofstream file(tmpfile1); + file << "bitcoin"; diff --git a/0.18/source/Dockerfile b/0.18/source/Dockerfile index 8204038..abce33b 100644 --- a/0.18/source/Dockerfile +++ b/0.18/source/Dockerfile @@ -1,10 +1,6 @@ # Build stage for Bitcoin Core FROM arm32v7/alpine:3.10 AS bitcoin-core -# Because sometimes this happens on emulated architectures: -# https://github.com/bitcoin/bitcoin/issues/14948 -ENV LC_ALL=C.UTF-8 - # fetch already built berkeleydb COPY --from=lncm/berkeleydb:db-4.8.30.NC-linux-arm /opt /opt @@ -60,6 +56,11 @@ RUN tar -xzf *.tar.gz # Change to the extraced directory WORKDIR /bitcoin-${BITCOIN_VERSION} +# Disable test that fails on Alpine for unrelated reasons: missing locale. Not important. +# https://github.com/bitcoin/bitcoin/issues/14948 +COPY skip-fs-test-of-utf8.patch . +RUN patch -p0 < skip-fs-test-of-utf8.patch + # ??? RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac # ??? diff --git a/0.18/source/skip-fs-test-of-utf8.patch b/0.18/source/skip-fs-test-of-utf8.patch new file mode 100644 index 0000000..9d3790c --- /dev/null +++ b/0.18/source/skip-fs-test-of-utf8.patch @@ -0,0 +1,13 @@ +diff --git src/test/fs_tests.cpp src/test/fs_tests.cpp +index 93aee10bb..4a01e2ed8 100644 +--- src/test/fs_tests.cpp ++++ src/test/fs_tests.cpp +@@ -14,7 +14,7 @@ BOOST_AUTO_TEST_CASE(fsbridge_fstream) + fs::path tmpfolder = SetDataDir("fsbridge_fstream"); + // tmpfile1 should be the same as tmpfile2 + fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; +- fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃"; ++ fs::path tmpfile2 = tmpfolder / "fs_tests_₿_🏃"; + { + fsbridge::ofstream file(tmpfile1); + file << "bitcoin";