public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/
Date: Fri,  8 Nov 2019 23:26:02 +0000 (UTC)	[thread overview]
Message-ID: <1573255523.8c9da308d9c8ee174b4627b75bbfc30bc91c6f65.chutzpah@gentoo> (raw)

commit:     8c9da308d9c8ee174b4627b75bbfc30bc91c6f65
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Nov  8 23:25:23 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Nov  8 23:25:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c9da308

sys-cluster/ceph: revbump to 14.2.4-r1, misc fixes

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../{ceph-14.2.4.ebuild => ceph-14.2.4-r1.ebuild}  |  4 ++
 .../ceph/files/ceph-14.2.4-python-executable.patch | 29 +++++++++
 .../files/ceph-14.2.4-undefined-behaviour.patch    | 76 ++++++++++++++++++++++
 3 files changed, 109 insertions(+)

diff --git a/sys-cluster/ceph/ceph-14.2.4.ebuild b/sys-cluster/ceph/ceph-14.2.4-r1.ebuild
similarity index 98%
rename from sys-cluster/ceph/ceph-14.2.4.ebuild
rename to sys-cluster/ceph/ceph-14.2.4-r1.ebuild
index 82af9e6a844..02af6882fd5 100644
--- a/sys-cluster/ceph/ceph-14.2.4.ebuild
+++ b/sys-cluster/ceph/ceph-14.2.4-r1.ebuild
@@ -154,6 +154,8 @@ PATCHES=(
 	"${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
 	"${FILESDIR}/ceph-14.2.3-boost-1.70.patch"
 	"${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
+	"${FILESDIR}/ceph-14.2.4-python-executable.patch"
+	"${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
 )
 
 # dpdk and ninja don't get along
@@ -294,6 +296,8 @@ python_install() {
 	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
 	DESTDIR="${ED}" emake VERBOSE=1 install
 	popd >/dev/null || die
+
+	python_optimize
 }
 
 src_install() {

diff --git a/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch b/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch
new file mode 100644
index 00000000000..40feaf11ad3
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-14.2.4-python-executable.patch
@@ -0,0 +1,29 @@
+diff --git a/src/ceph-crash.in b/src/ceph-crash.in
+index 5bfb50c474..d53c4eeb6a 100755
+--- a/src/ceph-crash.in
++++ b/src/ceph-crash.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!@PYTHON3_EXECUTABLE@
+ # -*- mode:python -*-
+ # vim: ts=4 sw=4 smarttab expandtab
+ 
+diff --git a/src/ceph.in b/src/ceph.in
+index f060023f57..3a84263ccc 100755
+--- a/src/ceph.in
++++ b/src/ceph.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON_EXECUTABLE@
++#!@PYTHON3_EXECUTABLE@
+ # -*- mode:python -*-
+ # vim: ts=4 sw=4 smarttab expandtab
+ #
+@@ -66,7 +66,7 @@ DEVMODEMSG = '*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH *
+ def respawn_in_path(lib_path, pybind_path, pythonlib_path, asan_lib_path):
+     execv_cmd = []
+     if 'CEPH_DBG' in os.environ:
+-        execv_cmd += ['@PYTHON_EXECUTABLE@', '-mpdb']
++        execv_cmd += ['@PYTHON3_EXECUTABLE@', '-mpdb']
+ 
+     if platform.system() == "Darwin":
+         lib_path_var = "DYLD_LIBRARY_PATH"

diff --git a/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch b/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch
new file mode 100644
index 00000000000..99249fb01a0
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph-14.2.4-undefined-behaviour.patch
@@ -0,0 +1,76 @@
+diff --git a/src/include/blobhash.h b/src/include/blobhash.h
+index 597884e4c9..97f2065ce3 100644
+--- a/src/include/blobhash.h
++++ b/src/include/blobhash.h
+@@ -14,33 +14,40 @@
+ #ifndef CEPH_BLOBHASH_H
+ #define CEPH_BLOBHASH_H
+ 
++#include <cstdint>
+ #include "hash.h"
+ 
+-/*
+-- this is to make some of the STL types work with 64 bit values, string hash keys, etc.
+-- added when i was using an old STL.. maybe try taking these out and see if things 
+-  compile now?
+-*/
+-
+ class blobhash {
+ public:
+-  uint32_t operator()(const char *p, unsigned len) {
+-    static rjhash<uint32_t> H;
+-    uint32_t acc = 0;
++  uint32_t operator()(const void* p, size_t len) {
++    static rjhash<std::uint32_t> H;
++    std::uint32_t acc = 0;
++    auto buf = static_cast<const unsigned char*>(p);
+     while (len >= sizeof(acc)) {
+-      acc ^= *(uint32_t*)p;
+-      p += sizeof(uint32_t);
+-      len -= sizeof(uint32_t);
++      acc ^= unaligned_load(buf);
++      buf += sizeof(std::uint32_t);
++      len -= sizeof(std::uint32_t);
+     }
+-    int sh = 0;
+-    while (len) {
+-      acc ^= (uint32_t)*p << sh;
+-      sh += 8;
+-      len--;
+-      p++;
++    // handle the last few bytes of p[-(len % 4):]
++    switch (len) {
++    case 3:
++      acc ^= buf[2] << 16;
++      [[fallthrough]];
++    case 2:
++      acc ^= buf[1] << 8;
++      [[fallthrough]];
++    case 1:
++      acc ^= buf[0];
++      [[fallthrough]];
+     }
+     return H(acc);
+   }
++private:
++  static inline std::uint32_t unaligned_load(const unsigned char* p) {
++    std::uint32_t result;
++    __builtin_memcpy(&result, p, sizeof(result));
++    return result;
++  }
+ };
+ 
+ 
+diff --git a/src/msg/msg_types.h b/src/msg/msg_types.h
+index b6952ca498..576b7d6b8a 100644
+--- a/src/msg/msg_types.h
++++ b/src/msg/msg_types.h
+@@ -566,7 +566,7 @@ namespace std {
+     size_t operator()( const entity_addr_t& x ) const
+     {
+       static blobhash H;
+-      return H((const char*)&x, sizeof(x));
++      return H(&x, sizeof(x));
+     }
+   };
+ } // namespace std


             reply	other threads:[~2019-11-08 23:26 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 23:26 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-17  8:00 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/ Patrick Lauer
2025-09-16 14:59 Patrick Lauer
2025-09-11 17:40 Patrick McLean
2025-05-11  6:57 Patrick Lauer
2025-05-08 11:13 Sam James
2024-10-14  0:50 Sam James
2024-10-01  9:32 Patrick Lauer
2024-07-30  9:05 Patrick Lauer
2024-07-30  9:05 Patrick Lauer
2023-11-08  2:51 Patrick McLean
2023-09-12  2:24 Patrick McLean
2023-06-04  5:06 Sam James
2023-06-03  1:54 Sam James
2023-04-11 23:28 Patrick McLean
2023-03-17 18:07 Patrick McLean
2022-10-28 15:57 Sam James
2022-10-04 23:42 Patrick McLean
2022-08-24 17:07 Patrick McLean
2022-08-22 20:29 Patrick McLean
2022-07-07 18:32 Patrick McLean
2022-06-28  0:27 Patrick McLean
2022-05-17 18:03 Patrick McLean
2022-05-13 10:59 Michał Górny
2022-05-05 22:51 Patrick McLean
2022-05-04 23:17 Patrick McLean
2022-04-29  0:31 Patrick McLean
2021-10-29 20:49 Patrick McLean
2021-10-25 17:02 Patrick McLean
2021-10-25 17:02 Patrick McLean
2021-07-01  0:47 Patrick McLean
2020-12-01  2:35 Patrick McLean
2020-11-25  5:38 Patrick McLean
2020-11-19  7:29 Patrick McLean
2020-09-25  0:53 Patrick McLean
2020-09-16 23:52 Patrick McLean
2020-08-05  0:16 Patrick McLean
2020-06-24  0:51 Patrick McLean
2020-04-03  1:41 Patrick McLean
2019-12-11 22:40 Patrick McLean
2019-09-17 22:56 Patrick McLean
2019-09-05  0:26 Patrick McLean
2019-07-19  3:20 Patrick McLean
2019-06-13  1:48 Patrick McLean
2019-04-29 22:57 Patrick McLean
2019-04-12  2:05 Patrick McLean
2019-03-29  2:23 Patrick McLean
2019-03-20 21:54 Patrick McLean
2019-03-20  1:12 Patrick McLean
2019-01-08  0:13 Patrick McLean
2018-11-29 23:57 Patrick McLean
2018-11-09  2:51 Patrick McLean
2018-03-10 19:16 Patrick McLean
2018-03-06 19:39 Patrick McLean
2018-02-06 17:43 Patrick Lauer
2017-12-05 20:10 Patrick McLean
2017-10-06 21:07 Patrick McLean
2017-09-27 21:19 Patrick McLean
2017-09-07 23:40 Patrick McLean
2017-08-02 22:11 Patrick McLean
2017-08-02 21:04 Patrick McLean
2017-07-31 19:04 Patrick McLean
2017-07-27 21:33 Patrick McLean
2017-07-27 21:27 Patrick McLean
2017-04-12 20:44 Patrick McLean
2017-02-10  1:18 Patrick McLean
2016-10-11 21:57 Patrick McLean
2016-07-11  1:23 Yixun Lan
2016-06-30 23:53 Patrick McLean
2016-06-07  6:45 Yixun Lan
2016-05-12 21:05 Patrick McLean
2016-05-12 18:56 Patrick McLean
2015-12-21  7:47 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1573255523.8c9da308d9c8ee174b4627b75bbfc30bc91c6f65.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox