Update ramcloud setup script
* Add patched branch on github
* check for ramcloud dir before checkout
* pass argument given to script to ramcloud make (try -j 4)
* build ramcloud with no-debug config
Change-Id: I682bd02acf686a49a2f588318326a33287afd3fd
diff --git a/ramcloud.patch b/ramcloud.patch
deleted file mode 100644
index d3a17e3..0000000
--- a/ramcloud.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/MasterService.cc b/src/MasterService.cc
-index ba7fdf1..fa041e0 100644
---- a/src/MasterService.cc
-+++ b/src/MasterService.cc
-@@ -606,7 +606,7 @@ MasterService::multiWrite(const WireFormat::MultiOp::Request* reqHdr,
- reqOffset, currentReq->valueLength);
- reqOffset += currentReq->valueLength;
-
-- if (stringKey == NULL || value == NULL) {
-+ if (stringKey == NULL) {
- respHdr->common.status = STATUS_REQUEST_FORMAT_ERROR;
- break;
- }
diff --git a/setup-ramcloud.sh b/setup-ramcloud.sh
index 758bb0c..0495d3a 100755
--- a/setup-ramcloud.sh
+++ b/setup-ramcloud.sh
@@ -5,28 +5,32 @@
ONOS_HOME=~/ONOS
RAMCLOUD_HOME=~/ramcloud
+if [ -d ${RAMCLOUD_HOME} ]; then
+ echo "${RAMCLOUD_HOME} already exist, please rename or remove them."
+ exit 1
+fi
+
# clone ramcloud
-git clone https://github.com/y-higuchi/ramcloud.git ${RAMCLOUD_HOME}
+git clone git@github.com:y-higuchi/ramcloud.git ${RAMCLOUD_HOME}
cd ${RAMCLOUD_HOME}
-git checkout blueprint-java
-git checkout 64462be50b9b0add25cf16beea75eb40bf89f62c
+git checkout custom
# install some app
sudo apt-get -y install build-essential git-core libcppunit-dev libcppunit-doc doxygen libboost-all-dev libpcre3-dev protobuf-compiler libprotobuf-dev libcrypto++-dev libevent-dev scons libssl-dev
# compile ramcloud
git submodule update --init --recursive
-patch ${RAMCLOUD_HOME}/src/MasterService.cc < ${ONOS_HOME}/ramcloud.patch
patch ${RAMCLOUD_HOME}/logcabin/Core/Time.h < ${ONOS_HOME}/logcabin.patch
make logcabin
-make
+make DEBUG=no $*
-ln -s ${RAMCLOUD_HOME}/obj obj.blueprint-java
+ln -s ${RAMCLOUD_HOME}/obj.custom obj.blueprint-java
# crate ramcloud lib
-cp ${ONOS_HOME}/src/main/java/edu/stanford/ramcloud/JRamCloud.java ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
-cp ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
+cp -p ${ONOS_HOME}/src/main/java/edu/stanford/ramcloud/JRamCloud.java ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
+cp -p ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
cd ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
javac JRamCloud.java
./build_so.sh
jar cvf ${RAMCLOUD_HOME}/bindings/java/RamCloud.jar ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/*.class
+