Skip to content

Instantly share code, notes, and snippets.

@yuchangyuan
yuchangyuan / ceph-v10.nix
Created May 30, 2017 11:55
nix package of ceph v10
pkgs.callPackage ./generic.nix (rec {
version = "10.2.7";
src = pkgs.fetchgit {
url = "https://github.com/ceph/ceph.git";
rev = "refs/tags/v${version}";
sha256 = "0q49mkkphl2wlvbix09kbyj9sgv838zhi96dx3zs79kqmacn2mm6";
};
patches = [ ./fix-pythonpath.patch ];
@yuchangyuan
yuchangyuan / fix-pythonpath.patch
Created May 30, 2017 11:54
fix-pythonpath.patch for ceph v10
diff -uwr a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
--- a/src/ceph-detect-init/Makefile.am 2017-05-22 21:37:40.616023663 +0800
+++ b/src/ceph-detect-init/Makefile.am 2017-05-22 22:11:14.728173931 +0800
@@ -69,12 +69,13 @@
if test "$(DESTDIR)" ; then \
if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
options=--install-layout=deb ; \
- else \
- options=--prefix=/usr ; \
fi ; \
@yuchangyuan
yuchangyuan / generic.nix
Created May 30, 2017 11:52
modified version of generic.nix for ceph v10
{ stdenv, ensureNewerSourcesHook, autoconf, automake, makeWrapper, pkgconfig
, libtool, which, git
, boost, python2Packages, libxml2, zlib
# Optional Dependencies
, snappy ? null, leveldb ? null, yasm ? null, fcgi ? null, expat ? null
, curl ? null, fuse ? null, accelio ? null, libibverbs ? null, librdmacm ? null
, libedit ? null, libatomic_ops ? null, kinetic-cpp-client ? null
, rocksdb ? null, libs3 ? null
@yuchangyuan
yuchangyuan / gnus-from-completion.el
Created April 8, 2017 10:53
gnus from field auto completion
(defvar my-smtp-list
'(("aa@bb" "AA BB")
("cc@dd" "西西滴滴")
("ee@ff" "EeFf"))
"A list of smtp account.")
(defun my-complete-sender ()
"Complete email sender, from `my-smtp-list'."
(interactive)
(let* ((lst (mapcar
@yuchangyuan
yuchangyuan / ceph.org
Created February 6, 2015 12:44
ceph notes

Ceph setup

Setup

Write config

Create /etc/ceph/ceph.conf

[global]
auth cluster required = none
auth service required = none
auth client required = none