From: Boris Ranto Date: Wed, 8 Jul 2015 15:13:14 +0000 (+0200) Subject: Remove git build-time dependency X-Git-Tag: v9.0.3~67^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F5172%2Fhead;p=ceph.git Remove git build-time dependency The git command is currently only needed in the src/make_version script. However, we can simply avoid it by assuming that if the git command is not installed then the current dir is not a git repo. Signed-off-by: Boris Ranto --- diff --git a/ceph.spec.in b/ceph.spec.in index 47a42dd4bbe8..ca976c5ccf49 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -57,7 +57,6 @@ Requires: systemd BuildRequires: sharutils %endif BuildRequires: gcc-c++ -BuildRequires: git BuildRequires: boost-devel BuildRequires: cryptsetup BuildRequires: gdbm diff --git a/src/make_version b/src/make_version index db7a58bdaf66..4834579d4b29 100755 --- a/src/make_version +++ b/src/make_version @@ -5,7 +5,11 @@ CEPH_VER_HEADER= NO_VERSION=0 is_git() { - type git > /dev/null 2>&1 || { echo "Could not find git command. Please install. Aborting."; exit 1; } + type git > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "Could not find git command. Assuming this is not a git repository, not updating .git_version" + return 1 + fi git status > /dev/zero 2>&1; if [ $? -ne 0 ]; then echo "This is no git repository, not updating .git_version"