From 22d0f3049bea31445b8da14636acbd4aaa7bb09a Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Wed, 24 Feb 2016 21:04:42 +0100 Subject: [PATCH 1/4] added boost link test --- CMakeLists.txt | 29 +++++++++++++++++++++++------ cmake/test_boost.cpp | 14 ++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 cmake/test_boost.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a75c3a0d6..1539ffda83 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,7 +147,7 @@ find_package(PythonInterp 2) find_package(Go 1.2) if (NOT GO_FOUND) - message ("Go version >=1.2 not found. etcd will not be built.") + message("Go version >=1.2 not found. etcd will not be built.") endif () ################################################################################ @@ -292,7 +292,7 @@ add_definitions("-DARANGODB_BITS=${BITS}") ################################################################################ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TL) -message (${CMAKE_BUILD_TYPE_TL}) +message(${CMAKE_BUILD_TYPE_TL}) set(DEBUG FALSE) @@ -386,24 +386,41 @@ endif () ## BOOST ################################################################################ -option(AR_USE_SYSTEM_LIBS "use libraries provided by the system" OFF) +option(USE_BOOST_SYSTEM_LIBS "use libraries provided by the system" OFF) set(Boost_USE_MULTITHREADED ON) set(BOOST_MINIMUM_VERSION 1.58) -set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/1.58.0 CACHE path "BOOST include path") +if (NOT USE_BOOST_SYSTEM_LIBS) + set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/1.58.0 CACHE path "BOOST include path") +endif () set(Boost_INCLUDE_DIR ${BOOST_INCLUDE}) find_package(Boost COMPONENTS unit_test_framework) if (${Boost_UNIT_TEST_FRAMEWORK_FOUND}) - option(USE_BOOST_UNITTESTS "use boost unit-tests" ON) + try_compile( + HAVE_USABLE_BOOT_LIBRARIES + "${CMAKE_BINARY_DIR}/temp" + "${CMAKE_SOURCE_DIR}/cmake/test_boost.cpp" + LINK_LIBRARIES + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} + CMAKE_FLAGS + "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIR}" + ) + + if (NOT HAVE_USABLE_BOOT_LIBRARIES) + message("cannot use BOOST library ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") + option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF) + else () + option(USE_BOOST_UNITTESTS "use boost unit-tests" ON) + endif () else () option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF) endif () if (NOT USE_BOOST_UNITTESTS) - message ("BOOST unit tests are disabled") + message("BOOST unit tests are disabled") endif () find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED) diff --git a/cmake/test_boost.cpp b/cmake/test_boost.cpp new file mode 100644 index 0000000000..ce93b9ae3f --- /dev/null +++ b/cmake/test_boost.cpp @@ -0,0 +1,14 @@ +#include + +struct TestSetup { + TestSetup() { + BOOST_TEST_MESSAGE("test message"); + } +}; + +BOOST_FIXTURE_TEST_SUITE(Test, TestSetup) + +BOOST_AUTO_TEST_CASE (test_Test1) { +} + +BOOST_AUTO_TEST_SUITE_END() From abdb83dfb7b93ceea51fe2769a405281fbacb2b7 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Wed, 24 Feb 2016 21:26:47 +0100 Subject: [PATCH 2/4] generate README --- utils/generateREADME.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 utils/generateREADME.sh diff --git a/utils/generateREADME.sh b/utils/generateREADME.sh new file mode 100755 index 0000000000..5488dd2cb2 --- /dev/null +++ b/utils/generateREADME.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +IN=${1:-README.md} +OUT=${2:-README} + +fgrep -v "[Build Status]" $IN \ + | fgrep -v "ArangoDB-Logo" \ + | fgrep -v "[Build Status]" \ + | markdown \ + | html2text -style compact -nobs \ + | sed -e 's:>:>:g' \ + | awk 'BEGIN { s = 0; } { if (length($0) == 0) {if (s != 0) print $0;} else {s = 1; print $0; }}' \ + > $OUT From f66df14cf86b5984970b3dd175f7a274b1e43853 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Wed, 24 Feb 2016 21:31:16 +0100 Subject: [PATCH 3/4] only regenerated README in maintainer mode --- Documentation/CMakeLists.txt | 64 ++++++++++------- GNUmakefile | 106 ---------------------------- README | 129 ++++++++++++++++------------------- 3 files changed, 100 insertions(+), 199 deletions(-) diff --git a/Documentation/CMakeLists.txt b/Documentation/CMakeLists.txt index f61983bf83..00e81846eb 100644 --- a/Documentation/CMakeLists.txt +++ b/Documentation/CMakeLists.txt @@ -1,38 +1,56 @@ # -*- mode: CMAKE; -*- -set(MAN_NAMES - man1/arangob.1 - man1/arangodump.1 - man1/arangoimp.1 - man1/arangorestore.1 - man1/arangosh.1 - man8/rcarangod.8 - man8/arangod.8 - man8/arango-dfdb.8 - man8/foxx-manager.8 -) +if (USE_MAINTAINER_MODE) + set(MAN_NAMES + man1/arangob.1 + man1/arangodump.1 + man1/arangoimp.1 + man1/arangorestore.1 + man1/arangosh.1 + man8/rcarangod.8 + man8/arangod.8 + man8/arango-dfdb.8 + man8/foxx-manager.8 + ) -set(MAN_FILES) + set(MAN_FILES) -foreach (m IN LISTS MAN_NAMES) - set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m}) - set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m}) + foreach (m IN LISTS MAN_NAMES) + set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m}) + set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m}) + + add_custom_command( + OUTPUT + ${mdst} + COMMAND + ${CMAKE_SOURCE_DIR}/utils/manPages.sh ${msrc} ${mdst} ${ARANGODB_VERSION} + DEPENDS + ${msrc} + WORKING_DIRECTORY + ${CMAKE_BINARY_DIR} + COMMENT + "Building manpage ${mdst}" + VERBATIM + ) + + list(APPEND MAN_FILES ${mdst}) + endforeach () add_custom_command( OUTPUT - ${mdst} + ${CMAKE_SOURCE_DIR}/README COMMAND - ${CMAKE_SOURCE_DIR}/utils/manPages.sh ${msrc} ${mdst} ${ARANGODB_VERSION} + ${CMAKE_SOURCE_DIR}/utils/generateREADME.sh ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/README DEPENDS - ${msrc} + ${CMAKE_SOURCE_DIR}/README.md WORKING_DIRECTORY - ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} COMMENT - "Building manpage ${mdst}" + "Building README" VERBATIM ) - list(APPEND MAN_FILES ${mdst}) -endforeach () + list(APPEND MAN_FILES ${CMAKE_SOURCE_DIR}/README) -add_custom_target(man ALL DEPENDS ${MAN_FILES}) + add_custom_target(man ALL DEPENDS ${MAN_FILES}) +endif () diff --git a/GNUmakefile b/GNUmakefile index b95a60ca89..c64a4ef2df 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -18,84 +18,11 @@ warning: @echo " cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++" @echo "" --include Makefile - VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION))) VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION))) VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION))) - VERSION_PATCH := $(wordlist 1,1,$(subst -, ,$(VERSION_PATCH))) -## ----------------------------------------------------------------------------- -## --SECTION-- SPECIAL TARGETS -## ----------------------------------------------------------------------------- - -################################################################################ -### @brief setup -################################################################################ - -.PHONY: setup - -setup: - @echo ACLOCAL - @aclocal -I m4 - @echo AUTOMAKE - @automake --add-missing --force-missing --copy - @echo AUTOCONF - @autoconf -I m4 - @echo auto system configured, proceed with configure - -################################################################################ -### @brief add maintainer files -################################################################################ - -MAINTAINER = \ - README \ - arangod/Aql/tokens.cpp \ - arangod/Aql/grammar.cpp \ - arangod/Aql/grammar.h \ - lib/JsonParser/json-parser.cpp \ - lib/V8/v8-json.cpp \ - lib/Basics/voc-errors.h \ - lib/Basics/voc-errors.cpp \ - js/common/bootstrap/errors.js - -AUTOMAGIC = \ - Makefile.in \ - aclocal.m4 \ - configure \ - config/compile \ - config/config.guess \ - config/config.sub \ - config/depcomp \ - config/install-sh \ - config/missing - -.PHONY: add-maintainer add-automagic - -add-maintainer: - @echo adding generated files to GIT - git add -f $(MAINTAINER) - -remove-maintainer: - @echo removing generated files from GIT - git rm -f $(MAINTAINER) - -add-automagic: - @echo adding automagic files to GIT - git add -f $(AUTOMAGIC) - -remove-automagic: - @echo removing automagic files from GIT - git rm -f $(AUTOMAGIC) - -################################################################################ -### @brief make love -################################################################################ - -love: - @echo ArangoDB loves you - ## ----------------------------------------------------------------------------- ## --SECTION-- CMAKE & CPACK ## ----------------------------------------------------------------------------- @@ -392,36 +319,3 @@ packXX: cd Build$(BITS) && cpack -G ZIP -D "BUILD_TARGET=RelWithDebInfo" ./Installation/Windows/installer-generator.sh $(BITS) $(shell pwd) - -checkcmake: - if test -z "`cmake --help |grep -i visual`"; then \ - echo "Your cmake is not sufficient; it lacks support for visual studio." ; \ - exit 1; \ - fi - - -################################################################################ -### @brief generates a tar archive -################################################################################ - -.PHONY: pack-tar pack-tar-config - -pack-tar-config: - ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var - -pack-tar: - rm -rf /tmp/pack-arangodb - make install-strip DESTDIR=/tmp/pack-arangodb - tar -c -v -z -f arangodb-$(VERSION).tar.gz -C /tmp/pack-arangodb . - -## ----------------------------------------------------------------------------- -## --SECTION-- END-OF-FILE -## ----------------------------------------------------------------------------- - -## Local Variables: -## mode: outline-minor -## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*-" -## End: diff --git a/README b/README index 66476aaef9..47e3b03efc 100644 --- a/README +++ b/README @@ -1,5 +1,4 @@ -ArangoDB - +****** ArangoDB ****** ArangoDB is a multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID @@ -10,19 +9,15 @@ To get started, try one of our 10 minutes tutorials in your favorite programming language or try one of our ArangoDB_Cookbook_recipes. For the impatient: download and install ArangoDB. Start the server arangod and point your browser to http://127.0.0.1:8529/. - -Key Features in ArangoDB - - -* Multi-Model: Documents, graphs and key-value pairs — model your data as you - see fit for your application. -* Joins: Conveniently join what belongs together for flexible ad-hoc querying, - less data redundancy. -* Transactions: Easy application development keeping your data consistent and - safe. No hassle in your client. - +***** Key Features in ArangoDB ***** + * Multi-Model: Documents, graphs and key-value pairs — model your data as + you see fit for your application. + * Joins: Conveniently join what belongs together for flexible ad-hoc + querying, less data redundancy. + * Transactions: Easy application development keeping your data consistent + and safe. No hassle in your client. Here is an AQL query that makes use of all those features: - AQL Query Example AQL Query Example +[AQL Query Example] Joins and transactions are key features for flexible, secure data designs, widely used in relational databases but lacking in many NoSQL products. However, there is no need to forego them in ArangoDB. You decide how and when @@ -32,73 +27,67 @@ Furthermore, ArangoDB offers a JavaScript framework called Foxx that is executed in the database server with direct access to the data. Build your own data-centric microservices with a few lines of code: Microservice Example - Microservice Example Microservice Example +[Microservice Example] By extending the HTTP API with user code written in JavaScript, ArangoDB can be turned into a strict schema-enforcing persistence engine. Next step, bundle your Foxx application as a docker_container and get it running in the cloud. Other features of ArangoDB include: - -* Schema-free schemata let you combine the space efficiency of MySQL with the - performance power of NoSQL -* Use a data-centric microservices approach with ArangoDB Foxx and fuse your - application-logic and database together for maximal throughput -* JavaScript for all: no language zoo, you can use one language from your - browser to your back-end -* ArangoDB is multi-threaded - exploit the power of all your cores -* Flexible data modeling: model your data as combination of key-value pairs, - documents or graphs - perfect for social relations -* Free index choice: use the correct index for your problem, be it a skip list - or a fulltext search -* Configurable durability: let the application decide if it needs more - durability or more performance -* Powerful query language (AQL) to retrieve and modify data -* Transactions: run queries on multiple documents or collections with optional - transactional consistency and isolation -* Replication and Sharding: set up the database in a master-slave configuration - or spread bigger datasets across multiple servers -* It is open source (Apache License 2.0) - + * Schema-free schemata let you combine the space efficiency of MySQL with + the performance power of NoSQL + * Use a data-centric microservices approach with ArangoDB Foxx and fuse + your application-logic and database together for maximal throughput + * JavaScript for all: no language zoo, you can use one language from your + browser to your back-end + * ArangoDB is multi-threaded - exploit the power of all your cores + * Flexible data modeling: model your data as combination of key-value + pairs, documents or graphs - perfect for social relations + * Free index choice: use the correct index for your problem, be it a skip + list or a fulltext search + * Configurable durability: let the application decide if it needs more + durability or more performance + * Powerful query language (AQL) to retrieve and modify data + * Transactions: run queries on multiple documents or collections with + optional transactional consistency and isolation + * Replication and Sharding: set up the database in a master-slave + configuration or spread bigger datasets across multiple servers + * It is open source (Apache License 2.0) For more in-depth information read the design_goals_of_ArangoDB - -Latest Release - ArangoDB 2.6 - -The What’s_new_in_ArangoDB_2.6 can be found in the documentation. -New collection export HTTP REST API: ArangoDB now provides a dedicated -collection export API, which can take snapshots of entire collections more -efficiently than the general-purpose cursor API. The export API is useful to -transfer the contents of an entire collection to a client application. -Added batch document removal and lookup commands: The commands -collection.lookupByKeys(keys) and collection.removeByKeys(keys) have been added -for collection objects. These can be used to perform multi-document lookup and -removal operations efficiently from the ArangoShell. -Added AQL UPSERT command: This adds an UPSERT statement to AQL that is a -combination of both INSERT and UPDATE / REPLACE. The UPSERT will search for a -matching document using a user-provided example. If no document matches the -example, the insert part of the UPSERT statement will be executed. If there is -a match, the update / replace part will be carried out. -We have simplified the return value syntax for data-modification AQL queries, -added an alternative implementation for AQL COLLECT that uses a hash table for -grouping and does not require its input elements to be sorted. -Other optimizations and speedups in AQL relate to subqueries, return values and -queries containing big IN lists for index lookups. -Arangoimp can now optionally update or replace existing documents, provided the -import data contains documents with _key attributes. +***** Latest Release - ArangoDB 2.8 ***** +The What's_new_in_ArangoDB_2.8 can be found in the documentation. +AQL Graph Traversals / Pattern Matching: AQL offers a new feature to traverse +over a graph without writing JavaScript functions but with all the other +features you know from AQL. For this purpose, a special version of FOR +variable-name IN expression has been introduced. +The added Array Indexes are a major improvement to ArangoDB that you will love +and never want to miss again. Hash indexes and skiplist indexes can now be +defined for array values as well, so it’s freaking fast to access documents +by individual array values. +Additional, there is a cool new aggregation feature that was added after the +beta releases. AQL introduces the keyword AGGREGATE for use in AQL COLLECT +statements. Using AGGREGATE allows more efficient aggregation (incrementally +while building the groups) than previous versions of AQL, which built group +aggregates afterwards from the total of all group values +Optimizer improvements: The AQL query optimizer can now use indexes if multiple +filter conditions on attributes of the same collection are combined with +logical ORs, and if the usage of indexes would completely cover these +conditions. +ArangoDB 2.8 now has an automatic deadlock detection for transactions. A +deadlock is a situation in which two or more concurrent operations (user +transactions or AQL queries) try to access the same resources (collections, +documents) and need to wait for the others to finish, but none of them can make +any progress. Foxx Improvements -Added Configuration and Dependencies so that manifests can now define -configuration options, as well as dependencies on other Foxx apps. With the -Mocha Test framework you can now write_tests_for_your_Foxx_apps. The API -documentation has been updated to Swagger 2. - -More Information - +The module resolution used by require now behaves more like in node.js. The +org/arangodb/request module now returns response bodies for error responses by +default. The old behavior of not returning bodies for error responses can be +re-enabled by explicitly setting the option returnBodyOnError to false. +***** More Information ***** Please check the Installation_Manual for installation and compilation instructions. The User_Manual has an introductory chapter showing the basic operations of ArangoDB. - -Stay in Contact - +***** Stay in Contact ***** We really appreciate feature requests and bug reports. Please use our Github issue tracker for reporting them: https://github.com/arangodb/arangodb/issues From ea44c604b63923ce04c0b99b2876621ae8380502 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Wed, 24 Feb 2016 22:39:53 +0100 Subject: [PATCH 4/4] fixed boost --- CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1539ffda83..f2056da9e2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,12 +391,15 @@ option(USE_BOOST_SYSTEM_LIBS "use libraries provided by the system" OFF) set(Boost_USE_MULTITHREADED ON) set(BOOST_MINIMUM_VERSION 1.58) -if (NOT USE_BOOST_SYSTEM_LIBS) - set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/1.58.0 CACHE path "BOOST include path") +if (USE_BOOST_SYSTEM_LIBS) + find(Boost ${BOOST_MINIMUM_VERSION} REQUIRED) +else () + set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/${BOOST_MINIMUM_VERSION}.0 CACHE path "BOOST include path") + set(Boost_INCLUDE_DIR ${BOOST_INCLUDE}) + set(Boost_VERSION ${BOOST_MINIMUM_VERSION}) endif () -set(Boost_INCLUDE_DIR ${BOOST_INCLUDE}) -find_package(Boost COMPONENTS unit_test_framework) +find_package(Boost ${Boost_VERSION} EXACT COMPONENTS unit_test_framework) if (${Boost_UNIT_TEST_FRAMEWORK_FOUND}) try_compile( @@ -409,11 +412,11 @@ if (${Boost_UNIT_TEST_FRAMEWORK_FOUND}) "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIR}" ) - if (NOT HAVE_USABLE_BOOT_LIBRARIES) + if (HAVE_USABLE_BOOT_LIBRARIES) + option(USE_BOOST_UNITTESTS "use boost unit-tests" ON) + else () message("cannot use BOOST library ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF) - else () - option(USE_BOOST_UNITTESTS "use boost unit-tests" ON) endif () else () option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF)