AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec
+EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh
# the "." here makes sure check-local builds gtest before it is used
SUBDIRS = . src man
# autoconf to be happy. These commands should be run manually to
# bootstrap.
install-deps:
- if test -x /usr/bin/apt-get; then \
- sudo apt-get -y --no-install-recommends install `cat deps.deb.txt`; \
- else \
- sudo yum -y install `cat deps.rpm.txt`; \
- fi
+ ./install-deps.sh
dist-hook:
# Generates the full list of contributors
debian-based
------------
-The list of debian package dependencies can be found in deps.deb.txt:
+The list of debian packages dependencies can be installed with:
- sudo apt-get install `cat deps.deb.txt`
+ ./install-deps.sh
Note: libsnappy-dev and libleveldb-dev are not available upstream for
natty, oneiric, and squeeze. Backports for Ceph can be found at
rpm-based
---------
-The list of RPM package dependencies can be found in deps.rpm.txt:
+The list of RPM packages dependencies can be installed with:
- sudo yum install `cat deps.rpm.txt`
+ ./install-deps.sh
Building Ceph
=============
+++ /dev/null
-autoconf
-automake
-autotools-dev
-debhelper
-default-jdk
-g++
-gcc
-git
-javahelper
-junit4
-libaio-dev
-libatomic-ops-dev
-libblkid-dev
-libboost-dev
-libboost-program-options-dev
-libboost-system-dev
-libboost-thread-dev
-libbz2-dev
-libcurl4-gnutls-dev
-libedit-dev
-libexpat1-dev
-libfcgi-dev
-libfuse-dev
-libgoogle-perftools-dev
-libkeyutils-dev
-libleveldb-dev
-libnss3-dev
-libsnappy-dev
-libtool
-libudev-dev
-libxml2-dev
-make
-pkg-config
-python
-python-argparse
-python-flask
-python-nose
-uuid-dev
-uuid-runtime
-xfslibs-dev
-yasm
+++ /dev/null
-autoconf
-automake
-boost-devel
-bzip2-devel
-cryptopp-devel
-expat-devel
-fcgi-devel
-fuse-devel
-gcc
-gcc-c++
-gperftools-devel
-keyutils-libs-devel
-leveldb-devel
-libaio-devel
-libatomic_ops-devel
-libblkid-devel
-libbz2-devel
-libcurl-devel
-libedit-devel
-libtool
-libuuid-devel
-make
-nss-devel
-python-argparse
-python-flask
-python-nose
-python-virtualenv
-snappy-devel
-systemd-devel
-xfsprogs-devel
-yasm
Linux/Unix distribution.
Before you can build Ceph source code, you need to install several libraries
-and tools. Ceph provides ``autoconf`` and ``automake`` scripts to get you
-started quickly. Ceph build scripts depend on the following:
-
-- ``autotools-dev``
-- ``autoconf``
-- ``automake``
-- ``cdbs``
-- ``gcc``
-- ``g++``
-- ``git``
-- ``libboost-dev``
-- ``libedit-dev``
-- ``libssl-dev``
-- ``libtool``
-- ``libfcgi``
-- ``libfcgi-dev``
-- ``libfuse-dev``
-- ``linux-kernel-headers``
-- ``libcrypto++-dev``
-- ``libcrypto++``
-- ``libexpat1-dev``
-- ``pkg-config``
-- ``libcurl4-gnutls-dev``
-
-On Ubuntu, execute ``sudo apt-get install`` for each dependency that isn't
-installed on your host. ::
-
- sudo apt-get install autoconf automake autotools-dev libbz2-dev debhelper default-jdk git javahelper junit4 libaio-dev libatomic-ops-dev libbabeltrace-ctf-dev libbabeltrace-dev libblkid-dev libboost-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libcurl4-gnutls-dev libedit-dev libexpat1-dev libfcgi-dev libfuse-dev libgoogle-perftools-dev libkeyutils-dev libleveldb-dev libnss3-dev libsnappy-dev liblttng-ust-dev libtool libudev-dev libxml2-dev pkg-config python python-argparse python-nose uuid-dev uuid-runtime xfslibs-dev yasm
-
-On Debian, execute ``aptitude install`` for each dependency that isn't
-installed on your host. ::
-
- aptitude install autoconf automake autotools-dev libbz2-dev debhelper default-jdk git javahelper junit4 libaio-dev libatomic-ops-dev libbabeltrace-ctf-dev libbabeltrace-dev libblkid-dev libboost-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libcurl4-gnutls-dev libedit-dev libexpat1-dev libfcgi-dev libfuse-dev libgoogle-perftools-dev libkeyutils-dev libleveldb-dev libnss3-dev libsnappy-dev liblttng-ust-dev libtool libudev-dev libxml2-dev pkg-config python python-argparse python-nose uuid-dev uuid-runtime xfslibs-dev yasm
-
-.. note:: Some distributions that support Google's memory profiler tool may use
- a different package name (e.g., ``libgoogle-perftools4``).
-
-Ubuntu
-------
-
-- ``uuid-dev``
-- ``libkeyutils-dev``
-- ``libgoogle-perftools-dev``
-- ``libatomic-ops-dev``
-- ``libaio-dev``
-- ``libgdata-common``
-- ``libgdata13``
-- ``libsnappy-dev``
-- ``libleveldb-dev``
-
-Execute ``sudo apt-get install`` for each dependency that isn't installed on
-your host. ::
-
- sudo apt-get install uuid-dev libkeyutils-dev libgoogle-perftools-dev libatomic-ops-dev libaio-dev libgdata-common libgdata13 libsnappy-dev libleveldb-dev
-
-
-Debian
-------
-
-Alternatively, you may also install::
-
- aptitude install fakeroot dpkg-dev
- aptitude install debhelper cdbs libexpat1-dev libatomic-ops-dev
+and tools::
-openSUSE 11.2 (and later)
--------------------------
-
-- ``boost-devel``
-- ``gcc-c++``
-- ``libedit-devel``
-- ``libopenssl-devel``
-- ``fuse-devel`` (optional)
-
-Execute ``zypper install`` for each dependency that isn't installed on your
-host. ::
-
- zypper install boost-devel gcc-c++ libedit-devel libopenssl-devel fuse-devel
-
-Fedora 20
----------
-
-As root, run:
-
-::
-
- yum install make automake autoconf boost-devel fuse-devel gcc-c++ libtool libuuid-devel libblkid-devel keyutils-libs-devel cryptopp-devel fcgi-devel libcurl-devel expat-devel gperftools-devel libedit-devel libatomic_ops-devel snappy-devel leveldb-devel libaio-devel xfsprogs-devel git libudev-devel
+ ./install-deps.sh
+.. note:: Some distributions that support Google's memory profiler tool may use
+ a different package name (e.g., ``libgoogle-perftools4``).
Build Ceph
==========
--- /dev/null
+#!/bin/bash
+#
+# Ceph distributed storage system
+#
+# Copyright (C) 2014 Red Hat <contact@redhat.com>
+#
+# Author: Loic Dachary <loic@dachary.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+DIR=/tmp/install-deps.$$
+trap "rm -fr $DIR" EXIT
+mkdir -p $DIR
+
+case $(lsb_release -si) in
+Ubuntu|Debian|Devuan)
+ sudo apt-get install -y dpkg-dev
+ touch $DIR/status
+ packages=$(dpkg-checkbuilddeps --admindir=$DIR debian/control 2>&1 | \
+ perl -p -e 's/.*Unmet build dependencies: *//;' \
+ -e 's/build-essential:native/build-essential/;' \
+ -e 's/\(.*?\)//g;' \
+ -e 's/ +/\n/g;' | sort)
+ case $(lsb_release -sc) in
+ squeeze)
+ packages=$(echo $packages | perl -pe 's/\w*babeltrace\w*//g')
+ ;;
+ esac
+ sudo apt-get install -y $packages
+ ;;
+CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
+ case $(lsb_release -si) in
+ SUSE*)
+ sudo zypper -y yum-utils
+ ;;
+ *)
+ sudo yum install -y yum-utils
+ ;;
+ esac
+ sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
+ sudo yum-builddep -y $DIR/ceph.spec
+ ;;
+*)
+ echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually."
+ ;;
+esac