ceph: 9.0.1 -> 9.0.2

This commit is contained in:
William A. Kennington III 2015-07-15 17:46:31 -07:00
parent c284b83678
commit c1c757cea4
3 changed files with 44 additions and 5 deletions

View File

@ -1,11 +1,13 @@
{ callPackage, fetchgit, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "9.0.1";
version = "9.0.2";
src = fetchgit {
url = "https://github.com/ceph/ceph.git";
rev = "refs/tags/v${version}";
sha256 = "1sq6gim7dik04lih5krwm4qpnf2blby3xj2vz9n4cknjnj0dbg7x";
sha256 = "0kydjyvb1566mh33p6dlljfx1r4cfdj8ic4i19h5r9vavkc46nf0";
};
patches = [ ./fix-pythonpath.patch ];
})

View File

@ -0,0 +1,31 @@
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
index e176596..384e230 100644
--- a/src/Makefile-env.am
+++ b/src/Makefile-env.am
@@ -40,7 +40,7 @@ check_SCRIPTS =
export VERBOSE = true
# python unit tests need to know where the scripts are located
-export PYTHONPATH=$(top_srcdir)/src/pybind
+export PYTHONPATH+=:$(top_srcdir)/src/pybind
# when doing a debug build, make sure to make the targets
if WITH_DEBUG
diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am
index 3e5ad03..66d6683 100644
--- a/src/ceph-detect-init/Makefile.am
+++ b/src/ceph-detect-init/Makefile.am
@@ -64,9 +64,10 @@ install-data-local::
if test "$(DESTDIR)" ; then \
if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
options=--install-layout=deb ; \
- else \
- options=--prefix=/usr ; \
fi ; \
root="--root=$(DESTDIR)" ; \
fi ; \
- python setup.py install $$root $$options
+ if test "$(prefix)"; then \
+ prefix="--prefix=$(prefix)" ; \
+ fi ; \
+ python setup.py install $$prefix $$root $$options

View File

@ -113,7 +113,9 @@ stdenv.mkDerivation {
];
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ]
++ optionals (versionAtLeast version "10.0.0") [ pythonPackages.setuptools ];
++ optionals (versionAtLeast version "9.0.2") [
pythonPackages.setuptools pythonPackages.argparse
];
buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [
boost python libxml2 optYasm optLibatomic_ops optLibs3 malloc pythonPackages.flask zlib
] ++ optional (versionAtLeast version "9.0.0") [
@ -147,7 +149,7 @@ stdenv.mkDerivation {
preConfigure = ''
# Ceph expects the arch command to be usable during configure
# for detecting the assembly type
mkdir mybin
mkdir -p mybin
echo "#${stdenv.shell} -e" >> mybin/arch
echo "uname -m" >> mybin/arch
chmod +x mybin/arch
@ -157,6 +159,10 @@ stdenv.mkDerivation {
# Fix the python site-packages install directory
sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure
# Fix the PYTHONPATH for installing ceph-detect-init to $out
mkdir -p "$(toPythonPath $out)"
export PYTHONPATH="$(toPythonPath $out):$PYTHONPATH"
'';
configureFlags = [
@ -200,7 +206,7 @@ stdenv.mkDerivation {
] ++ optional (versionAtLeast version "9.0.1") [
(mkWith false "tcmalloc-minimal" null)
(mkWith false "valgrind" null)
] ++ optional (versionAtLeast version "10.0.0") [
] ++ optional (versionAtLeast version "9.0.2") [
(mkWith true "man-pages" null)
(mkWith true "systemd-libexec-dir" "\${TMPDIR}")
];