]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
documentation: replace deps.{deb,rpm}.txt with scripts 2994/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 25 Nov 2014 16:25:26 +0000 (17:25 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 1 Dec 2014 15:15:21 +0000 (16:15 +0100)
install-deps.sh installs the dependencies based on the content of
debian/control (if apt-get is found) or ceph.spec.in (if yum is
found). The manually maintained list of dependencies for deb based
operating systems (deps.deb.txt) and rpm based operating
systems (deps.rpm.txt) are deprecated.

http://tracker.ceph.com/issues/10175 Fixes: #10175

Signed-off-by: Loic Dachary <ldachary@redhat.com>
Makefile.am
README.md
deps.deb.txt [deleted file]
deps.rpm.txt [deleted file]
doc/install/build-ceph.rst
install-deps.sh [new file with mode: 0755]

index 30ceaf43cfd1479e882c762af212363b2c795eb4..621fd59b5c392fa55476e4273a5685bc13110250 100644 (file)
@@ -1,6 +1,6 @@
 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
 
@@ -54,11 +54,7 @@ clean-local:
 # 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
index 76a190cf8efcacfdabfcbda8168fab829df79ac3..3661d0964fd4f787d33731b3ba5cb6e4e2362f1d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -29,9 +29,9 @@ Build Prerequisites
 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
@@ -40,9 +40,9 @@ ceph.com/debian-leveldb.
 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
 =============
diff --git a/deps.deb.txt b/deps.deb.txt
deleted file mode 100644 (file)
index e671569..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-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
diff --git a/deps.rpm.txt b/deps.rpm.txt
deleted file mode 100644 (file)
index dcfb515..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-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
index 285fd95045993814555a234b6b39ed014b0ffa2d..d5bcae283d1c9714ef85cb6f9b43dcf704e39066 100644 (file)
@@ -14,93 +14,12 @@ Build Prerequisites
    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
 ==========
diff --git a/install-deps.sh b/install-deps.sh
new file mode 100755 (executable)
index 0000000..4785d00
--- /dev/null
@@ -0,0 +1,49 @@
+#!/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