]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove git build-time dependency 5172/head
authorBoris Ranto <branto@redhat.com>
Wed, 8 Jul 2015 15:13:14 +0000 (17:13 +0200)
committerBoris Ranto <branto@redhat.com>
Wed, 8 Jul 2015 15:16:29 +0000 (17:16 +0200)
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 <branto@redhat.com>
ceph.spec.in
src/make_version

index 47a42dd4bbe817192911a1d6f8a18022d0168a46..ca976c5ccf491595d66df5b5653f11471a67f6a2 100644 (file)
@@ -57,7 +57,6 @@ Requires: systemd
 BuildRequires: sharutils
 %endif
 BuildRequires: gcc-c++
-BuildRequires: git
 BuildRequires: boost-devel
 BuildRequires: cryptsetup
 BuildRequires: gdbm
index db7a58bdaf66b797ed92b77e8ca88bc1ef0b8fbf..4834579d4b29cb1169cf91401da87ee1a0735fbd 100755 (executable)
@@ -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"