]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: install libpmem libraries if WITH_PMEM is set
authorKefu Chai <kchai@redhat.com>
Tue, 6 Apr 2021 12:17:12 +0000 (20:17 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 8 Apr 2021 09:15:15 +0000 (17:15 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
install-deps.sh

index dbfc921d774394b9566c433881562f906ae18695..b7cd826639cb521d1d1db9e30e8318d49bec5410 100755 (executable)
@@ -225,6 +225,19 @@ function install_libzbd_on_ubuntu {
         libzbd-dev
 }
 
+function install_libpmem_on_ubuntu {
+    local codename=$1
+    local project=pmem
+    local sha1=7c18b4b1413ae965ea8bcbfc69eb9784f9212319
+    install_pkg_on_ubuntu \
+        $project \
+        $sha1 \
+        $codename \
+        check \
+        libpmem-dev \
+        libpmemobj-dev
+}
+
 function version_lt {
     test $1 != $(echo -e "$1\n$2" | sort -rV | head -n 1)
 }
@@ -300,6 +313,7 @@ else
     [ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
     [ $WITH_JAEGER ] && with_jaeger=true || with_jaeger=false
     [ $WITH_ZBD ] && with_zbd=true || with_zbd=false
+    [ $WITH_PMEM ] && with_pmem=true || with_pmem=false
     source /etc/os-release
     case "$ID" in
     debian|ubuntu|devuan|elementary)
@@ -316,6 +330,7 @@ else
             *Focal*)
                 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu focal
                 $with_zbd && install_libzbd_on_ubuntu focal
+                $with_pmem && install_libpmem_on_ubuntu focal
                 ;;
             *)
                 $SUDO apt-get install -y gcc