• Bug#1086567: Patch of 1086567

    From Ben Westover@21:1/5 to Shengqi Chen on Thu Jan 2 21:50:01 2025
    Hello,

    Thanks for the patch! I'm sorry I didn't get to this earlier; I was
    really busy with university when the bug was first posted, and by the
    time break started I had already forgotten about it. Just uploaded a new revision with your patch.

    Thanks,
    --
    Ben Westover

    On 1/2/25 11:51 AM, Shengqi Chen wrote:
    Control: tags -1 + patch

    Hi,

    The attached patch can fix FTBFS.

    I can also do NMU or submit MR on salsa, whichever way you like.

    --
    Thanks,
    Shengqi Chen

    From e99da5ce664e3bd290c264b229e7aa15074d5e58 Mon Sep 17 00:00:00 2001
    From: Shengqi Chen <harry@debian.org>
    Date: Fri, 3 Jan 2025 00:45:47 +0800
    Subject: [PATCH] d/patches: add patch to fix FTBFS with fmtlib 10 (closes: #1086567)

    Signed-off-by: Shengqi Chen <harry@debian.org>
    ---
    debian/patches/fix-fmtlib-10.patch | 54 ++++++++++++++++++++++++++++++ debian/patches/series | 1 +
    2 files changed, 55 insertions(+)
    create mode 100644 debian/patches/fix-fmtlib-10.patch

    diff --git a/debian/patches/fix-fmtlib-10.patch b/debian/patches/fix-fmtlib-10.patch
    new file mode 100644
    index 0000000..7d3b7b6
    --- /dev/null
    +++ b/debian/patches/fix-fmtlib-10.patch
    @@ -0,0 +1,54 @@
    +Description: Fix FTBFS with fmtlib 10
    +Author: Shengqi Chen <harry@debian.org>
    +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086567 +Forwarded: not-needed
    +Last-Update: 2025-01-03
    +---
    +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
    +--- a/src/base/tools/String.h
    ++++ b/src/base/tools/String.h
    +@@ -21,11 +21,11 @@
    +
    +
    + #include "3rdparty/rapidjson/fwd.h"
    +-
    ++#include "3rdparty/fmt/format.h"
    +
    + #include <utility>
    + #include <vector>
    +-
    ++#include <string_view>
    +
    + namespace xmrig {
    +
    +@@ -86,6 +86,7 @@
    + String &toUpper();
    +
    + static String join(const std::vector<String> &vec, char sep);
    ++ template <typename T> friend struct fmt::formatter;
    +
    + private:
    + void copy(const char *str);
    +@@ -100,5 +101,12 @@
    +
    + } /* namespace xmrig */
    +
    ++template <> struct fmt::formatter<xmrig::String>: formatter<std::string_view> {
    ++ auto format(xmrig::String c, format_context& ctx) const
    ++ -> format_context::iterator {
    ++ return fmt::formatter<std::string_view>::format(std::string_view(c.m_data, c.m_size), ctx);
    ++ }
    ++};
    ++
    +
    + #endif /* XMRIG_STRING_H */
    +--- a/cmake/flags.cmake
    ++++ b/cmake/flags.cmake
    +@@ -1,6 +1,6 @@
    + set(CMAKE_CXX_STANDARD_REQUIRED ON)
    + set(CMAKE_CXX_EXTENSIONS OFF)
    +-set(CMAKE_CXX_STANDARD 11)
    ++set(CMAKE_CXX_STANDARD 17)
    +
    + set(CMAKE_C_STANDARD 99)
    + set(CMAKE_C_STANDARD_REQUIRED ON)
    diff --git a/debian/patches/series b/debian/patches/series
    index 2f4313a..8b0eb80 100644
    --- a/debian/patches/series
    +++ b/debian/patches/series
    @@ -4,3 +4,4 @@ make-donation-optional.patch
    reproducibility.patch
    use-system-fmt.patch
    use-system-opencl.patch
    +fix-fmtlib-10.patch
    --
    2.39.5

    LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0Kd3NGNUJBQUJDQUFqRmlFRU9HbmFjcVJo ZFU2ZU5tdEZ3eEhGOVU2SnRwZ0ZBbWQyK3dVRkF3QUFBQUFBQ2drUXd4SEY5VTZKdHBoYQ0KMncv L2VUYSt1U0J3eXVBcWUyYm5TaDJMamNMMXZwbENmVnU3Q2dtRXd6RExuMjRjRDltMkN3Y29IdzVv eUs4TlVMNGFJZWhOMURSRA0KQmJSMUVXRzg0aUE0VmdoTW5yREU0aUNvZ0J0MjROQU9HSWJWWS96 TnJleVoyL005MEZmS0pjLzhsWS9KR3A4THExWEdrVmNIZ0Jvag0KVHNLb0tGdUNpMnhsZzRkQ0lH ZGl5cllRZ2prdjJPZ04xeVVwNytLNFhqY3pVdHg2enVyOElRdkJ0REllV0Q1ZW53bEtDeUFveHRl UA0KMWJrVFdxZlUyYzMrdnJQVmRxREVUSUxteWt0SHU3VXQyTnczSGxnNldBVndYRDFxc2VwV0Jk bXFWT00xZmJQQkpSYnEyaDM2UXIrNw0KWVhkSWViLytpZDhrb0hpTFBISG5jckR1dkFaZkxrT2gv QnArR05vOUJJRkQyNVFEcjhHSXU0MnpobmFQYXlkazgxM0h6ZWFqUzJWaw0KMU5GSktHeTFNQkhv ZkRqOWhsOXFNL0lnRFloc3ByVDArUHBOaXNvcTBnQzhSWDN0TCtkc01SdGZscSt3clpFMVRKM25N dkFkM3RiTQ0KUXQ1M3Q4TFpFNjMwVFRDVVVXL0FFTmJrTStsVjFsMDdKZS9XaWVGOHRCR3h5Ukp4 bWU5bXRLWlp3QUo2SjNvRU9RK2NNUngvN1kxeQ0KT0dvbCtsbnd3VFBxOG9lU2RyTDQzWDBGd20z dmlMd0p0LzduMTZCQTI5SHpiUVphMjhTVkpsNkppdVA4MUFVeW9sTmJ6ckJXRHRPTA0KdFVwOVdu c2I1djY5a0lKVXBvUEhtVHpMTkVBSnV3MmhzVklzMWk3Q0dJNjFOaUZZNWZvTUtCWXZIVnQrUjRB QzlaeUdiL3d5NFFhWA0KTUlBPQ0KPXZNWXANCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0K

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shengqi Chen@21:1/5 to All on Fri Jan 3 07:30:01 2025
    Control: close -1 6.22.2+dfsg-2

    Hi,

    2025年1月3日 04:46,Ben Westover <me@benthetechguy.net> 写道:

    Hello,

    Thanks for the patch! I'm sorry I didn't get to this earlier; I was
    really busy with university when the bug was first posted, and by the
    time break started I had already forgotten about it. Just uploaded a new revision with your patch.

    Good to see it uploaded. But you seems to use the wrong format in changelog.
    It should be “closes: #nnn”, not “fixes”. So I’m manually closing this bug.

    Thanks,
    Shengqi Chen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)