tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ceph: Refactor into a generic expression
William A. Kennington III
11 years ago
6ac4bbd0
65373ed2
+84
-103
6 changed files
expand all
collapse all
unified
split
pkgs
tools
filesystems
ceph
0.94.nix
0001-Cleanup-boost-optionals.patch
default.nix
dev.nix
generic.nix
top-level
all-packages.nix
+11
pkgs/tools/filesystems/ceph/0.94.nix
···
1
1
+
{ callPackage, fetchgit, ... } @ args:
2
2
+
3
3
+
callPackage ./generic.nix (args // rec {
4
4
+
version = "0.94.1";
5
5
+
6
6
+
src = fetchgit {
7
7
+
url = "git://github.com/ceph/ceph.git";
8
8
+
rev = "refs/tags/v${version}";
9
9
+
sha256 = "0rrl10vda4xv22al2c5ccd8v8drs26186dvkrxndvqz8p9999cjx";
10
10
+
};
11
11
+
})
-42
pkgs/tools/filesystems/ceph/0001-Cleanup-boost-optionals.patch
···
1
1
-
From 2507ab33236f0da12899fbcdd36535f7c7b68a06 Mon Sep 17 00:00:00 2001
2
2
-
From: "William A. Kennington III" <william@wkennington.com>
3
3
-
Date: Sat, 20 Sep 2014 22:52:31 -0700
4
4
-
Subject: [PATCH] Cleanup boost optionals
5
5
-
6
6
-
---
7
7
-
src/osd/ECBackend.cc | 2 +-
8
8
-
src/osd/ReplicatedPG.cc | 5 ++++-
9
9
-
2 files changed, 5 insertions(+), 2 deletions(-)
10
10
-
11
11
-
diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc
12
12
-
index a87b5b4..c386900 100644
13
13
-
--- a/src/osd/ECBackend.cc
14
14
-
+++ b/src/osd/ECBackend.cc
15
15
-
@@ -81,7 +81,7 @@ ostream &operator<<(ostream &lhs, const ECBackend::read_result_t &rhs)
16
16
-
lhs << "read_result_t(r=" << rhs.r
17
17
-
<< ", errors=" << rhs.errors;
18
18
-
if (rhs.attrs) {
19
19
-
- lhs << ", attrs=" << rhs.attrs;
20
20
-
+ lhs << ", attrs=" << rhs.attrs.get();
21
21
-
} else {
22
22
-
lhs << ", noattrs";
23
23
-
}
24
24
-
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
25
25
-
index 5e5510d..79e8616 100644
26
26
-
--- a/src/osd/ReplicatedPG.cc
27
27
-
+++ b/src/osd/ReplicatedPG.cc
28
28
-
@@ -5259,7 +5259,10 @@ void ReplicatedPG::do_osd_op_effects(OpContext *ctx)
29
29
-
for (list<OpContext::NotifyAck>::iterator p = ctx->notify_acks.begin();
30
30
-
p != ctx->notify_acks.end();
31
31
-
++p) {
32
32
-
- dout(10) << "notify_ack " << make_pair(p->watch_cookie, p->notify_id) << dendl;
33
33
-
+ if (p->watch_cookie)
34
34
-
+ dout(10) << "notify_ack " << make_pair(p->watch_cookie.get(), p->notify_id) << dendl;
35
35
-
+ else
36
36
-
+ dout(10) << "notify_ack " << make_pair("NULL", p->notify_id) << dendl;
37
37
-
for (map<pair<uint64_t, entity_name_t>, WatchRef>::iterator i =
38
38
-
ctx->obc->watchers.begin();
39
39
-
i != ctx->obc->watchers.end();
40
40
-
--
41
41
-
2.1.0
42
42
-
+1
-61
pkgs/tools/filesystems/ceph/default.nix
···
1
1
-
{ stdenv, fetchgit, autoconf, automake, makeWrapper, pkgconfig, libtool, which
2
2
-
, boost, btrfsProgs, cryptopp, curl, expat, fcgi, fuse, gperftools, keyutils
3
3
-
, leveldb, libaio, libatomic_ops, libedit, libuuid, linuxHeaders, openssl
4
4
-
, python, snappy, udev, xfsprogs, xz
5
5
-
, zfs ? null
6
6
-
}:
7
7
-
8
8
-
with stdenv.lib;
9
9
-
let
10
10
-
wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $out)\""
11
11
-
+ " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\""
12
12
-
+ " --prefix PATH : \"$out/bin\""
13
13
-
+ " --prefix LD_LIBRARY_PATH : \"$out/lib\"";
14
14
-
in
15
15
-
stdenv.mkDerivation rec {
16
16
-
name="ceph-${version}";
17
17
-
version="0.94.1";
18
18
-
19
19
-
src = fetchgit {
20
20
-
url = "git://github.com/ceph/ceph.git";
21
21
-
rev = "refs/tags/v${version}";
22
22
-
sha256 = "0rrl10vda4xv22al2c5ccd8v8drs26186dvkrxndvqz8p9999cjx";
23
23
-
};
24
24
-
25
25
-
patches = [
26
26
-
./0001-Makefile-env-Don-t-force-sbin.patch
27
27
-
];
28
28
-
29
29
-
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ];
30
30
-
buildInputs = [
31
31
-
boost btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils
32
32
-
libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python
33
33
-
snappy udev xfsprogs.lib xz zfs
34
34
-
];
35
35
-
36
36
-
preConfigure = ''
37
37
-
./autogen.sh
38
38
-
'';
39
39
-
40
40
-
configureFlags = [
41
41
-
"--exec_prefix=$(out)"
42
42
-
] ++ optional (zfs != null) "--with-zfs=${zfs}";
43
43
-
44
44
-
postInstall = ''
45
45
-
wrapProgram $out/bin/ceph ${wrapArgs}
46
46
-
wrapProgram $out/bin/ceph-brag ${wrapArgs}
47
47
-
wrapProgram $out/bin/ceph-rest-api ${wrapArgs}
48
48
-
wrapProgram $out/sbin/ceph-create-keys ${wrapArgs}
49
49
-
wrapProgram $out/sbin/ceph-disk ${wrapArgs}
50
50
-
'';
51
51
-
52
52
-
enableParallelBuilding = true;
53
53
-
54
54
-
meta = {
55
55
-
homepage = http://ceph.com/;
56
56
-
description = "Distributed storage system";
57
57
-
license = licenses.lgpl21;
58
58
-
maintainers = with maintainers; [ ak wkennington ];
59
59
-
platforms = with platforms; linux;
60
60
-
};
61
61
-
}
1
1
+
0.94.nix
+1
pkgs/tools/filesystems/ceph/dev.nix
···
1
1
+
0.94.nix
+66
pkgs/tools/filesystems/ceph/generic.nix
···
1
1
+
{ stdenv, autoconf, automake, makeWrapper, pkgconfig, libtool, which
2
2
+
, boost, btrfsProgs, cryptopp, curl, expat, fcgi, fuse, gperftools, keyutils
3
3
+
, leveldb, libaio, libatomic_ops, libedit, libuuid, linuxHeaders, openssl
4
4
+
, python, snappy, udev, xfsprogs, xz
5
5
+
, zfs ? null
6
6
+
7
7
+
# Version specific arguments
8
8
+
, version, src
9
9
+
, ...
10
10
+
}:
11
11
+
12
12
+
with stdenv.lib;
13
13
+
let
14
14
+
wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $out)\""
15
15
+
+ " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\""
16
16
+
+ " --prefix PATH : \"$out/bin\""
17
17
+
+ " --prefix LD_LIBRARY_PATH : \"$out/lib\"";
18
18
+
in
19
19
+
stdenv.mkDerivation rec {
20
20
+
name="ceph-${version}";
21
21
+
22
22
+
inherit src;
23
23
+
24
24
+
patches = [
25
25
+
./0001-Makefile-env-Don-t-force-sbin.patch
26
26
+
];
27
27
+
28
28
+
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ];
29
29
+
buildInputs = [
30
30
+
boost btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils
31
31
+
libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python
32
32
+
snappy udev xfsprogs.lib xz zfs
33
33
+
];
34
34
+
35
35
+
preConfigure = ''
36
36
+
./autogen.sh
37
37
+
'';
38
38
+
39
39
+
configureFlags = [
40
40
+
"--exec_prefix=\${out}"
41
41
+
"--sysconfdir=/etc"
42
42
+
"--localstatedir=/var"
43
43
+
] ++ optional (zfs != null) "--with-zfs=${zfs}";
44
44
+
45
45
+
installFlags = [ "sysconfdir=\${out}/etc" ];
46
46
+
47
47
+
postInstall = ''
48
48
+
wrapProgram $out/bin/ceph ${wrapArgs}
49
49
+
wrapProgram $out/bin/ceph-brag ${wrapArgs}
50
50
+
wrapProgram $out/bin/ceph-rest-api ${wrapArgs}
51
51
+
wrapProgram $out/sbin/ceph-create-keys ${wrapArgs}
52
52
+
wrapProgram $out/sbin/ceph-disk ${wrapArgs}
53
53
+
'';
54
54
+
55
55
+
enableParallelBuilding = true;
56
56
+
57
57
+
meta = {
58
58
+
homepage = http://ceph.com/;
59
59
+
description = "Distributed storage system";
60
60
+
license = licenses.lgpl21;
61
61
+
maintainers = with maintainers; [ ak wkennington ];
62
62
+
platforms = with platforms; linux;
63
63
+
};
64
64
+
65
65
+
passthru.version = version;
66
66
+
}
+5
pkgs/top-level/all-packages.nix
···
934
934
935
935
cdrkit = callPackage ../tools/cd-dvd/cdrkit { };
936
936
937
937
+
# Only ever add ceph LTS releases
938
938
+
# The default should always be symlinked to the latest LTS
939
939
+
# Dev should always point to the latest versioned release
940
940
+
ceph-0_94 = callPackage ../tools/filesystems/ceph/0.94.nix { };
937
941
ceph = callPackage ../tools/filesystems/ceph { };
942
942
+
ceph-dev = callPackage ../tools/filesystems/ceph/dev.nix { };
938
943
939
944
cfdg = builderDefsPackage ../tools/graphics/cfdg {
940
945
inherit libpng bison flex ffmpeg;