tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ceph: 9.0.1 -> 9.0.2
William A. Kennington III
10 years ago
c1c757ce
c284b836
+44
-5
3 changed files
expand all
collapse all
unified
split
pkgs
tools
filesystems
ceph
dev.nix
fix-pythonpath.patch
generic.nix
+4
-2
pkgs/tools/filesystems/ceph/dev.nix
···
1
{ callPackage, fetchgit, ... } @ args:
2
3
callPackage ./generic.nix (args // rec {
4
-
version = "9.0.1";
5
6
src = fetchgit {
7
url = "https://github.com/ceph/ceph.git";
8
rev = "refs/tags/v${version}";
9
-
sha256 = "1sq6gim7dik04lih5krwm4qpnf2blby3xj2vz9n4cknjnj0dbg7x";
10
};
0
0
11
})
···
1
{ callPackage, fetchgit, ... } @ args:
2
3
callPackage ./generic.nix (args // rec {
4
+
version = "9.0.2";
5
6
src = fetchgit {
7
url = "https://github.com/ceph/ceph.git";
8
rev = "refs/tags/v${version}";
9
+
sha256 = "0kydjyvb1566mh33p6dlljfx1r4cfdj8ic4i19h5r9vavkc46nf0";
10
};
11
+
12
+
patches = [ ./fix-pythonpath.patch ];
13
})
+31
pkgs/tools/filesystems/ceph/fix-pythonpath.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
2
+
index e176596..384e230 100644
3
+
--- a/src/Makefile-env.am
4
+
+++ b/src/Makefile-env.am
5
+
@@ -40,7 +40,7 @@ check_SCRIPTS =
6
+
export VERBOSE = true
7
+
8
+
# python unit tests need to know where the scripts are located
9
+
-export PYTHONPATH=$(top_srcdir)/src/pybind
10
+
+export PYTHONPATH+=:$(top_srcdir)/src/pybind
11
+
12
+
# when doing a debug build, make sure to make the targets
13
+
if WITH_DEBUG
14
+
diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
15
+
index 3e5ad03..66d6683 100644
16
+
--- a/src/ceph-detect-init/Makefile.am
17
+
+++ b/src/ceph-detect-init/Makefile.am
18
+
@@ -64,9 +64,10 @@ install-data-local::
19
+
if test "$(DESTDIR)" ; then \
20
+
if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
21
+
options=--install-layout=deb ; \
22
+
- else \
23
+
- options=--prefix=/usr ; \
24
+
fi ; \
25
+
root="--root=$(DESTDIR)" ; \
26
+
fi ; \
27
+
- python setup.py install $$root $$options
28
+
+ if test "$(prefix)"; then \
29
+
+ prefix="--prefix=$(prefix)" ; \
30
+
+ fi ; \
31
+
+ python setup.py install $$prefix $$root $$options
+9
-3
pkgs/tools/filesystems/ceph/generic.nix
···
113
];
114
115
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]
116
-
++ optionals (versionAtLeast version "10.0.0") [ pythonPackages.setuptools ];
0
0
117
buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [
118
boost python libxml2 optYasm optLibatomic_ops optLibs3 malloc pythonPackages.flask zlib
119
] ++ optional (versionAtLeast version "9.0.0") [
···
147
preConfigure = ''
148
# Ceph expects the arch command to be usable during configure
149
# for detecting the assembly type
150
-
mkdir mybin
151
echo "#${stdenv.shell} -e" >> mybin/arch
152
echo "uname -m" >> mybin/arch
153
chmod +x mybin/arch
···
157
158
# Fix the python site-packages install directory
159
sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure
0
0
0
0
160
'';
161
162
configureFlags = [
···
200
] ++ optional (versionAtLeast version "9.0.1") [
201
(mkWith false "tcmalloc-minimal" null)
202
(mkWith false "valgrind" null)
203
-
] ++ optional (versionAtLeast version "10.0.0") [
204
(mkWith true "man-pages" null)
205
(mkWith true "systemd-libexec-dir" "\${TMPDIR}")
206
];
···
113
];
114
115
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]
116
+
++ optionals (versionAtLeast version "9.0.2") [
117
+
pythonPackages.setuptools pythonPackages.argparse
118
+
];
119
buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [
120
boost python libxml2 optYasm optLibatomic_ops optLibs3 malloc pythonPackages.flask zlib
121
] ++ optional (versionAtLeast version "9.0.0") [
···
149
preConfigure = ''
150
# Ceph expects the arch command to be usable during configure
151
# for detecting the assembly type
152
+
mkdir -p mybin
153
echo "#${stdenv.shell} -e" >> mybin/arch
154
echo "uname -m" >> mybin/arch
155
chmod +x mybin/arch
···
159
160
# Fix the python site-packages install directory
161
sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure
162
+
163
+
# Fix the PYTHONPATH for installing ceph-detect-init to $out
164
+
mkdir -p "$(toPythonPath $out)"
165
+
export PYTHONPATH="$(toPythonPath $out):$PYTHONPATH"
166
'';
167
168
configureFlags = [
···
206
] ++ optional (versionAtLeast version "9.0.1") [
207
(mkWith false "tcmalloc-minimal" null)
208
(mkWith false "valgrind" null)
209
+
] ++ optional (versionAtLeast version "9.0.2") [
210
(mkWith true "man-pages" null)
211
(mkWith true "systemd-libexec-dir" "\${TMPDIR}")
212
];