diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/ceph-glibc-2-32-sigdescr_np.patch | 63 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/default.nix | 14 |
2 files changed, 71 insertions, 6 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/ceph-glibc-2-32-sigdescr_np.patch b/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/ceph-glibc-2-32-sigdescr_np.patch new file mode 100644 index 000000000000..f78c7af9e35a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/ceph-glibc-2-32-sigdescr_np.patch @@ -0,0 +1,63 @@ +From b9b6faf66ae67648626470cb4fc3f0850ac4d842 Mon Sep 17 00:00:00 2001 +From: David Disseldorp <ddiss@suse.de> +Date: Tue, 1 Sep 2020 13:49:21 +0200 +Subject: [PATCH] cmake: detect and use sigdescr_np() if available + +sys_siglist is deprecated with glibc 2.32. A new thread-safe and +async-signal safe sigdescr_np() function is provided, so use it if +available. + +Fixes: https://tracker.ceph.com/issues/47187 +Signed-off-by: David Disseldorp <ddiss@suse.de> +--- + cmake/modules/CephChecks.cmake | 1 + + src/global/signal_handler.h | 8 +++++--- + src/include/config-h.in.cmake | 3 +++ + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/cmake/modules/CephChecks.cmake b/cmake/modules/CephChecks.cmake +index 23687283a7c6..ca86dcbc73de 100644 +--- a/cmake/modules/CephChecks.cmake ++++ b/cmake/modules/CephChecks.cmake +@@ -24,6 +24,7 @@ check_function_exists(strerror_r HAVE_Strerror_R) + check_function_exists(name_to_handle_at HAVE_NAME_TO_HANDLE_AT) + check_function_exists(pipe2 HAVE_PIPE2) + check_function_exists(accept4 HAVE_ACCEPT4) ++check_function_exists(sigdescr_np HAVE_SIGDESCR_NP) + + include(CMakePushCheckState) + cmake_push_check_state(RESET) +diff --git a/src/global/signal_handler.h b/src/global/signal_handler.h +index 476724201aa9..c101b2e28733 100644 +--- a/src/global/signal_handler.h ++++ b/src/global/signal_handler.h +@@ -20,10 +20,12 @@ + + typedef void (*signal_handler_t)(int); + +-#ifndef HAVE_REENTRANT_STRSIGNAL +-# define sig_str(signum) sys_siglist[signum] +-#else ++#ifdef HAVE_SIGDESCR_NP ++# define sig_str(signum) sigdescr_np(signum) ++#elif HAVE_REENTRANT_STRSIGNAL + # define sig_str(signum) strsignal(signum) ++#else ++# define sig_str(signum) sys_siglist[signum] + #endif + + void install_sighandler(int signum, signal_handler_t handler, int flags); +diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake +index 1ea3703f620c..59bd4273511a 100644 +--- a/src/include/config-h.in.cmake ++++ b/src/include/config-h.in.cmake +@@ -220,6 +220,9 @@ + /* Define to 1 if you have sched.h. */ + #cmakedefine HAVE_SCHED 1 + ++/* Define to 1 if you have sigdescr_np. */ ++#cmakedefine HAVE_SIGDESCR_NP 1 ++ + /* Support SSE (Streaming SIMD Extensions) instructions */ + #cmakedefine HAVE_SSE + diff --git a/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/default.nix index 9b9fe9a5aaf0..b75a902681e5 100644 --- a/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/default.nix +++ b/infra/libkookie/nixpkgs/pkgs/tools/filesystems/ceph/default.nix @@ -1,4 +1,5 @@ { stdenv, runCommand, fetchurl +, fetchpatch , ensureNewerSourcesHook , cmake, pkgconfig , which, git @@ -27,7 +28,7 @@ , nss ? null, nspr ? null # Linux Only Dependencies -, linuxHeaders, utillinux, libuuid, udev, keyutils, rdma-core, rabbitmq-c +, linuxHeaders, util-linux, libuuid, udev, keyutils, rdma-core, rabbitmq-c , libaio ? null, libxfs ? null, zfs ? null , ... }: @@ -121,10 +122,10 @@ let ]); sitePackages = ceph-python-env.python.sitePackages; - version = "15.2.5"; + version = "15.2.6"; src = fetchurl { url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz"; - sha256 = "05p7ssbfypf5x8bry361rrnyaihf89xzbqzhygdyrg7w1rxpna8d"; + sha256 = "093pphgqrkrbv3484ayl0vac6a6s53zxa01yad0cbvnx0kyj55hh"; }; in rec { ceph = stdenv.mkDerivation { @@ -133,6 +134,7 @@ in rec { patches = [ ./0000-fix-SPDK-build-env.patch + ./ceph-glibc-2-32-sigdescr_np.patch ]; nativeBuildInputs = [ @@ -147,7 +149,7 @@ in rec { malloc zlib openldap lttng-ust babeltrace gperf gtest cunit snappy rocksdb lz4 oathToolkit leveldb libnl libcap_ng rdkafka ] ++ optionals stdenv.isLinux [ - linuxHeaders utillinux libuuid udev keyutils optLibaio optLibxfs optZfs + linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs # ceph 14 rdma-core rabbitmq-c ] ++ optionals hasRadosgw [ @@ -207,12 +209,12 @@ in rec { ceph-client = runCommand "ceph-client-${version}" { meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices"; } '' - mkdir -p $out/{bin,etc,${sitePackages}} + mkdir -p $out/{bin,etc,${sitePackages},share/bash-completion/completions} cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin cp -r ${ceph}/bin/rbd-replay* $out/bin cp -r ${ceph}/${sitePackages} $out/${sitePackages} - cp -r ${ceph}/etc/bash_completion.d $out/etc + cp -r ${ceph}/etc/bash_completion.d $out/share/bash-completion/completions # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths substituteInPlace $out/bin/ceph --replace ${ceph} $out substituteInPlace $out/bin/.ceph-wrapped --replace ${ceph} $out |