1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into aql-query-cache

This commit is contained in:
Jan Steemann 2015-06-25 02:28:21 +02:00
commit a769b658c8
11 changed files with 74 additions and 25 deletions

View File

@ -9,30 +9,47 @@
################################################################################
@top_srcdir@/bin/etcd-arango$(PROGRAM_SUFFIX):
if GO_AVAILABLE
@echo
@echo "--------------------------------------------------------------------------------"
@echo "BUILDING etcd"
@echo "--------------------------------------------------------------------------------"
@echo
else
@echo
@echo "********************************************************************************"
@echo "SKIPPING etcd - you won't be able to use clusters!"
@echo "Install go from golang.org and re-run configure to change"
@echo "********************************************************************************"
@echo
endif
if ENABLE_INTERNAL_GO
cd @top_srcdir@/3rdParty/etcd \
&& GOROOT="`pwd`/../go-$(TRI_BITS)/" PATH="`pwd`/../go-$(TRI_BITS)/bin:$$PATH" ./build
else
if GO_AVAILABLE
cd @top_srcdir@/3rdParty/etcd && ./build
endif
endif
if GO_AVAILABLE
cp @top_srcdir@/3rdParty/etcd/bin/etcd @top_srcdir@/bin/etcd-arango$(PROGRAM_SUFFIX)
endif
if ENABLE_DARWIN
else
if GO_AVAILABLE
strip @top_srcdir@/bin/etcd-arango$(PROGRAM_SUFFIX)
endif
endif
if GO_AVAILABLE
@echo
@echo "--------------------------------------------------------------------------------"
@echo "BUILD etcd FINISHED"
@echo "--------------------------------------------------------------------------------"
@echo
endif
################################################################################
### @brief additional files to remove

View File

@ -187,6 +187,12 @@ endif # ENABLE_ARM6
CLEANUP_3RD += clean-v8
non-thin-v8:
for lib in `find @top_srcdir@/3rdParty/$(V8DIR)/out -name '*.a'`; \
do ar -t $${lib} | xargs ar rvs $${lib}.new && mv -v $${lib}.new $${lib}; \
done
clean-v8:
rm -f @srcdir@/.v8-build-@TRI_BITS@
cd @top_srcdir@/3rdParty/$(V8DIR) && ( $(MAKE) clean || true )

View File

@ -40,6 +40,9 @@ v2.7.0 (XXXX-XX-XX)
* added Foxx manifest configuration type `password`.
* fixed handling of default values in Foxx manifest configurations
* fixed handling of optional parameters in Foxx manifest configurations
v2.6.0-beta4 (2015-06-16)
-------------------------

View File

@ -43,4 +43,4 @@ Left=0
Right=-1
Top=80
Bottom=90
State=0
State=1

View File

@ -63,7 +63,7 @@ Function openLinkNewWindow
Exch
Push $0
Exch
ReadRegStr $0 HKCR "http\shell\open\command" ""
# Get browser path
DetailPrint $0
@ -79,12 +79,12 @@ Function openLinkNewWindow
StrCmp $1 "" found
IntOp $3 $3 + 1
Goto loop
found:
StrCpy $1 $0 $3
StrCmp $2 " " +2
StrCpy $1 '$1"'
Pop $0
Exec '$1 $0'
Pop $0
@ -92,12 +92,12 @@ Function openLinkNewWindow
Pop $2
Pop $3
FunctionEnd
!macro _OpenURL URL
Push "${URL}"
Call openLinkNewWindow
!macroend
!define OpenURL '!insertmacro "_OpenURL"'
;--------------------------------
@ -131,7 +131,7 @@ Function Tri_ChangePrivileges
!insertmacro UAC_RunElevated
${Switch} $0
${Case} 0
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "Administrator privileges required, plesae try again" /SD IDNO IDYES uac_tryagain IDNO 0
@ -151,7 +151,7 @@ Function Tri_ChangePrivileges
SetShellVarContext all
FunctionEnd
; same aagin for uninstall - NSIS requires the function name to have 'un.' - prefix
; same aagin for uninstall - NSIS requires the function name have to have 'un.' - prefix
Function un.Tri_ChangePrivileges
uac_tryagain:
!insertmacro UAC_RunElevated
@ -173,7 +173,7 @@ ${Default}
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0"
Quit
${EndSwitch}
SetShellVarContext all
FunctionEnd
@ -257,7 +257,7 @@ Var AR_RegFlags
!macroend
!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
; This macro is used to call section''s Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
@ -869,6 +869,12 @@ Section "-Core installation"
!insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
StrCmp "0" "$INSTALL_DESKTOP" noDesktopIcon
CreateShortCut "$DESKTOP\Arango Shell.lnk" "$INSTDIR\bin\arangosh.exe" '' '$INSTDIR\resources\Icons\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$DESKTOP\Arango Management Interface.lnk" "http://127.0.0.1:8529" '' '$INSTDIR\resources\Icons\arangodb.ico' '0' SW_SHOWMAXIMIZED
noDesktopIcon:
; Write special uninstall registry entries
Push "StartMenu"
Push "$STARTMENU_FOLDER"
@ -888,7 +894,7 @@ Section "-Core installation"
!insertmacro MUI_STARTMENU_WRITE_END
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
StrCmp $TRI_INSTALL_TYPE 'Service' 0 nothing
SimpleSC::StopService '${TRI_SVC_NAME}' 0 30
@ -954,7 +960,7 @@ FunctionEnd
;--------------------------------
Function default_installation_directory
; Read variables which defines if arango should be installed as Service
${If} ${UAC_IsInnerInstance}
Call disableBackButton
${EndIf}
@ -962,7 +968,7 @@ Function default_installation_directory
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "NSIS.InstallOptions.ini" "Field 2" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R3 "NSIS.InstallOptions.ini" "Field 3" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R4 "NSIS.InstallOptions.ini" "Field 4" "State"
${If} $R2 == '1'
StrCpy $TRI_INSTALL_TYPE 'Service'
${EndIf}
@ -982,7 +988,7 @@ Function default_installation_directory
Call read_options
${EndIf}
${Switch} $TRI_INSTALL_TYPE
${Case} 'Service'
Call Tri_ChangePrivileges
@ -1137,7 +1143,7 @@ Function un.onInit
StrCpy $R0 "user"
${EndIf}
${EndIf}
${If} $R0 == "admin"
Call un.Tri_ChangePrivileges
${EndIf}
@ -1148,7 +1154,7 @@ Function un.onInit
${Else}
SetShellVarContext current
${EndIf}
FunctionEnd
;--- Add/Remove callback functions: ---
@ -1173,7 +1179,7 @@ Section -FinishComponents
StrCpy $R2 $R0 13 $R1
StrCmp $R2 "AddRemove.exe" addremove_installed
; We're not running AddRemove.exe, so install it
; We''re not running AddRemove.exe, so install it
CopyFiles $R3 $INSTDIR\AddRemove.exe
addremove_installed:
@ -1196,7 +1202,7 @@ Section "Uninstall"
; this variable was defined by eld and included in NSIS.template.in
; we probably need this for the install/uninstall software list.
SetRegView ${BITS}
; A single user isn't in HKCC...
; A single user isn''t in HKCC...
StrCpy $TRI_INSTALL_TYPE 'SingleUser'
ReadRegStr $TRI_INSTALL_TYPE HKCC "Software\@CPACK_NSIS_PACKAGE_NAME@" "type"
;MessageBox MB_OK "Type: $TRI_INSTALL_TYPE"
@ -1222,6 +1228,11 @@ Section "Uninstall"
ReadRegStr $INSTALL_DESKTOP SHCTX "${TRI_UNINSTALL_REG_PATH}" "InstallToDesktop"
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
StrCmp "0" "$INSTALL_DESKTOP" noDesktopIconRemove
Delete "$DESKTOP\Arango Shell.lnk"
Delete "$DESKTOP\Arango Management Interface.lnk"
noDesktopIconRemove:
;MessageBox MB_OK "Deleting Directory: $SMPROGRAMS\$START_MENU\ $TRI_INSTALL_TYPE "
Delete "$SMPROGRAMS\$START_MENU\"

View File

@ -237,7 +237,7 @@ install_config(arango-dfdb)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/common ${PROJECT_SOURCE_DIR}/js/server ${PROJECT_SOURCE_DIR}/js/actions
DESTINATION share/arangodb/js
FILES_MATCHING PATTERN "*.js" PATTERN "*.tmpl"
FILES_MATCHING PATTERN "*.js" PATTERN "*.tmpl" PATTERN "*.html" PATTERN "*.css" PATTERN "droid*" PATTERN "*png"
REGEX "^.*/common/test-data$" EXCLUDE
REGEX "^.*/common/tests$" EXCLUDE
REGEX "^.*/server/tests$" EXCLUDE)

View File

@ -1102,6 +1102,7 @@ int modifyDocumentOnCoordinator (
// First determine the collection ID from the name:
shared_ptr<CollectionInfo> collinfo = ci->getCollection(dbname, collname);
if (collinfo->empty()) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json);
return TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND;
}
string collid = StringUtils::itoa(collinfo->id());
@ -1138,6 +1139,7 @@ int modifyDocumentOnCoordinator (
usesDefaultShardingAttributes);
if (error == TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json);
return error;
}

View File

@ -340,6 +340,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname,
if (error != TRI_ERROR_NO_ERROR) {
generateTransactionError(collname.c_str(), error);
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json);
return false;
}
// Essentially return the response we got from the DBserver, be it
@ -347,6 +348,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname,
_response = createResponse(responseCode);
triagens::arango::mergeResponseHeaders(_response, resultHeaders);
_response->body().appendText(resultBody.c_str(), resultBody.size());
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json);
return responseCode >= triagens::rest::HttpResponse::BAD;
}

View File

@ -100,6 +100,7 @@ AC_ARG_ENABLE(internal-go,
AS_HELP_STRING([--enable-internal-go], [use go binaries from 3rdParty directory (default: no)]),
[tr_INTERNAL_GO="${enableval:-yes}"],
[tr_INTERNAL_GO=no]
GOPROG=x$tr_INTERNAL_GO
)
AM_CONDITIONAL(ENABLE_INTERNAL_GO, test "x$tr_INTERNAL_GO" = xyes)
@ -112,7 +113,10 @@ if test "x$tr_INTERNAL_GO" = "xno"; then
else
BASIC_INFO="$BASIC_INFO|GO BINARY: $GO"
fi
GOPROG=$GO
fi
AC_MSG_WARN(["helo " $GOPROG])
AM_CONDITIONAL(GO_AVAILABLE, test "x$GOPROG" != x)
dnl ============================================================================
dnl --SECTION-- OPTIONS

View File

@ -331,7 +331,11 @@ ArangoApp.prototype.configure = function(config) {
}
if (!error) {
if (schema.isJoi) {
result = schema.optional().allow(null).validate(value);
schema = schema.optional().allow(null);
if (expected[name].default !== undefined) {
schema = schema.default(expected[name].default);
}
result = schema.validate(value);
if (result.error) {
error = result.error.message.replace(/^"value"/, '"' + name + '"');
}
@ -400,7 +404,7 @@ ArangoApp.prototype.needsConfiguration = function() {
var config = this.getConfiguration();
var deps = this.getDependencies();
return _.any(config, function (cfg) {
return cfg.current === undefined;
return cfg.current === undefined && cfg.required !== false;
}) || _.any(deps, function (dep) {
return dep.current === undefined;
});

View File

@ -242,7 +242,7 @@ TRI_json_t* JsonHelper::getObjectElement (TRI_json_t const* json,
}
////////////////////////////////////////////////////////////////////////////////
/// @brief returns a string element, or a default it is does not exist
/// @brief returns a string element, or a default if it is does not exist
////////////////////////////////////////////////////////////////////////////////
std::string JsonHelper::getStringValue (TRI_json_t const* json,
@ -254,7 +254,7 @@ std::string JsonHelper::getStringValue (TRI_json_t const* json,
}
////////////////////////////////////////////////////////////////////////////////
/// @brief returns a string sub-element, or a default it is does not exist
/// @brief returns a string sub-element, or a default if it is does not exist
////////////////////////////////////////////////////////////////////////////////
std::string JsonHelper::getStringValue (TRI_json_t const* json,
@ -269,7 +269,7 @@ std::string JsonHelper::getStringValue (TRI_json_t const* json,
}
////////////////////////////////////////////////////////////////////////////////
/// @brief returns a boolean sub-element, or a default it is does not exist
/// @brief returns a boolean sub-element, or a default if it is does not exist
////////////////////////////////////////////////////////////////////////////////
bool JsonHelper::getBooleanValue (TRI_json_t const* json,