Merge from develop

This commit is contained in:
Sebastian Messmer 2016-10-13 18:30:27 +02:00
commit 9d05b8571c
7 changed files with 21 additions and 14 deletions

View File

@ -31,7 +31,7 @@ install:
- echo Using $NUMCORES cores
# Install dependencies
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then ./travis.install_boost.sh; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew upgrade boost && brew cask install osxfuse && brew install cryptopp; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew cask install osxfuse && brew install cryptopp; fi
# By default, travis only fetches the newest 50 commits. We need more in case we're further from the last version tag, so the build doesn't fail because it can't generate the version number.
- git fetch --unshallow
# Setup target directory

View File

@ -7,7 +7,7 @@ New Features:
Improvements:
* Performance improvements
Version 0.9.6 (unreleased)
Version 0.9.6
---------------
Fixed bugs:
* Fix potential deadlock
@ -15,10 +15,13 @@ Fixed bugs:
Improvements:
* Allow building with -DCRYFS_UPDATE_CHECKS=off, which will create an executable with disabled update checks (the alternative to disable them in the environment also still works).
* Automatically disable update checks when running in noninteractive mode.
* More detailed error reporting if key derivation fails
Compatibility:
* Compatible with libcurl version >= 7.50.0, and <= 7.21.6 (tested down to 7.19.0)
* Compatible with Crypto++ 5.6.4
* Compatible with compilers running under hardening-wrapper
Version 0.9.5
---------------

View File

@ -28,7 +28,7 @@ namespace cpputils {
_config.N(), _config.r(), _config.p(),
static_cast<uint8_t*>(destination), size);
if (errorcode != 0) {
throw std::runtime_error("Error running scrypt key derivation.");
throw std::runtime_error("Error running scrypt key derivation. Error code: "+std::to_string(errorcode));
}
}

View File

@ -42,7 +42,9 @@ public:
EXPECT_EQ(expectedSize, (uint64_t)st.st_size);
});
EXPECT_NUMBYTES_READABLE(expectedSize, dynamic_cast<fspp::File*>(node));
fspp::File* fileNode = dynamic_cast<fspp::File*>(node);
ASSERT(fileNode != nullptr, "Is not a file node");
EXPECT_NUMBYTES_READABLE(expectedSize, fileNode);
}
void EXPECT_NUMBYTES_READABLE(uint64_t expectedSize, fspp::File *file) {

View File

@ -18,11 +18,6 @@ ExternalProject_Add(scrypt_original
PREFIX ${CMAKE_BINARY_DIR}/vendor/scrypt/
BUILD_COMMAND ${MAKE}
)
execute_process(
COMMAND /bin/sh ${CMAKE_CURRENT_LIST_DIR}/scrypt-1.2.0/scrypt/libcperciva/cpusupport/Build/cpusupport.sh
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/cpusupport_config.h
RESULT_VARIABLE result
)
add_library(${PROJECT_NAME} STATIC
${CMAKE_CURRENT_SOURCE_DIR}/scrypt-1.2.0/scrypt/lib/crypto/crypto_scrypt.c
${CMAKE_CURRENT_SOURCE_DIR}/scrypt-1.2.0/scrypt/lib/crypto/crypto_scrypt_smix.c
@ -44,7 +39,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
)
target_compile_options(${PROJECT_NAME} PRIVATE
-DCONFIG_H_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/src/scrypt_original-build/config.h\"
-DCPUSUPPORT_CONFIG_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/cpusupport_config.h\"
-DCPUSUPPORT_CONFIG_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/src/scrypt_original-build/cpusupport-config.h\"
)
add_dependencies(${PROJECT_NAME} scrypt_original)
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/scrypt-1.2.0)

View File

@ -1311,7 +1311,7 @@ uninstall-man: uninstall-man1
cpusupport-config.h:
( export CC="${CC}"; export CFLAGS="${CFLAGS}"; command -p sh $(srcdir)/libcperciva/cpusupport/Build/cpusupport.sh ) > cpusupport-config.h.tmp && command -p mv cpusupport-config.h.tmp cpusupport-config.h
( export CC="${CC}"; export CFLAGS="${CFLAGS}"; command -p sh $(srcdir)/libcperciva/cpusupport/Build/cpusupport.sh "$$PATH") > cpusupport-config.h.tmp && command -p mv cpusupport-config.h.tmp cpusupport-config.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -1,5 +1,9 @@
# Should be sourced by `command -p sh path/to/cpusupport.sh` from
# Should be sourced by `command -p sh path/to/cpusupport.sh "$PATH"` from
# within a Makefile.
if ! [ ${PATH} = "$1" ]; then
echo "WARNING: POSIX violation: $SHELL's command -p resets \$PATH" 1>&2
PATH=$1
fi
# Standard output should be written to cpusupport-config.h, which is both a
# C header file defining CPUSUPPORT_ARCH_FEATURE macros and sourceable sh
# code which sets CFLAGS_ARCH_FEATURE environment variables.
@ -9,6 +13,9 @@ feature() {
ARCH=$1
FEATURE=$2
shift 2;
if ! [ -f ${SRCDIR}/cpusupport-$ARCH-$FEATURE.c ]; then
return
fi
printf "Checking if compiler supports $ARCH $FEATURE feature..." 1>&2
for CFLAG in "$@"; do
if ${CC} ${CFLAGS} -D_POSIX_C_SOURCE=200809L ${CFLAG} \
@ -24,11 +31,11 @@ feature() {
;;
"")
echo " yes" 1>&2
echo "#define CPUSUPPORT_${ARCH}_${FEATURE}"
echo "#define CPUSUPPORT_${ARCH}_${FEATURE} 1"
;;
*)
echo " yes, via $CFLAG" 1>&2
echo "#define CPUSUPPORT_${ARCH}_${FEATURE}"
echo "#define CPUSUPPORT_${ARCH}_${FEATURE} 1"
echo "#ifdef cpusupport_dummy"
echo "export CFLAGS_${ARCH}_${FEATURE}=\"${CFLAG}\""
echo "#endif"