From f993e7c555b1b7a0db40c69672f8fc1ca09de393 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Tue, 8 Oct 2019 08:31:31 +0200 Subject: [PATCH 01/12] Fixed typo preventing successful path rename on Win and modified ASSERT for Window path styles Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/csync/csync_exclude.cpp | 4 ++++ test/testfolderwatcher.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index 1bb66b15d..fe4f71493 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -288,7 +288,11 @@ void ExcludedFiles::addManualExclude(const QByteArray &expr) void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath) { +#if defined(_WIN32) + Q_ASSERT(basePath.size() >= 2 && basePath.at(1) == ':'); +#elif Q_ASSERT(basePath.startsWith('/')); +#endif Q_ASSERT(basePath.endsWith('/')); auto key = basePath; diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp index fdd97701d..f515a1d60 100644 --- a/test/testfolderwatcher.cpp +++ b/test/testfolderwatcher.cpp @@ -146,7 +146,7 @@ private slots: mkdir(_rootPath + "/a0/b"); mkdir(_rootPath + "/a0/b/c"); touch(file); - mv(_rootPath + "/a0 ", _rootPath + "/a"); + mv(_rootPath + "/a0", _rootPath + "/a"); QVERIFY(waitForPathChanged(_rootPath + "/a/b/c/empty.txt")); } From 7750d2198dbe8e1eb1e64d7dd4aadc14546badc5 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Tue, 8 Oct 2019 08:44:08 +0200 Subject: [PATCH 02/12] Don't need a second if for non-Windows, using Qt macro for platform check Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/csync/csync_exclude.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index fe4f71493..5da86dff8 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -288,9 +288,9 @@ void ExcludedFiles::addManualExclude(const QByteArray &expr) void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath) { -#if defined(_WIN32) +#if defined(Q_OS_WIN) Q_ASSERT(basePath.size() >= 2 && basePath.at(1) == ':'); -#elif +#else Q_ASSERT(basePath.startsWith('/')); #endif Q_ASSERT(basePath.endsWith('/')); From abd50022d13fb377b3e583093178dde317021420 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Sat, 19 Oct 2019 05:04:41 +0200 Subject: [PATCH 03/12] Update submodules for Qt 5.12.5 (qtmacgoodies) Fetch the new submodule commits to get these fixes: - Merge upstream: Retrieve the associated NSView more reliably: https://github.com/camilasan/qtmacgoodies/pull/1 - Bugfix for Qt 5.12.5 - Redraw the ToolBar: https://github.com/camilasan/qtmacgoodies/pull/2 Signed-off-by: Michael Schuster --- binary | 2 +- src/3rdparty/libcrashreporter-qt | 2 +- src/3rdparty/qtmacgoodies | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/binary b/binary index 3425fab2c..09f12de31 160000 --- a/binary +++ b/binary @@ -1 +1 @@ -Subproject commit 3425fab2c66118ffae3e3b16751e636ca71ee450 +Subproject commit 09f12de3122ad1acf735d0e85b77bfba1cac2a29 diff --git a/src/3rdparty/libcrashreporter-qt b/src/3rdparty/libcrashreporter-qt index 7df66f72a..a4409c5c1 160000 --- a/src/3rdparty/libcrashreporter-qt +++ b/src/3rdparty/libcrashreporter-qt @@ -1 +1 @@ -Subproject commit 7df66f72aac595295dffcf4dc8a536822008c51d +Subproject commit a4409c5c1b39dc208518bd0f2868fc2894bdcb3f diff --git a/src/3rdparty/qtmacgoodies b/src/3rdparty/qtmacgoodies index ebc7ec6f6..b59d091b3 160000 --- a/src/3rdparty/qtmacgoodies +++ b/src/3rdparty/qtmacgoodies @@ -1 +1 @@ -Subproject commit ebc7ec6f681c0ae52c9443dbf63c4d1224bf3aec +Subproject commit b59d091b3e6b98e7219cf636f7d21fb267242c27 From 09b3be25fc0a188fcb88db5e51225d3325ea95b9 Mon Sep 17 00:00:00 2001 From: samu-workopen Date: Sat, 19 Oct 2019 14:21:04 +0200 Subject: [PATCH 04/12] Update building instructions Added links and a description how to clone the repo --- doc/building.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/building.rst b/doc/building.rst index 35c2e7f75..065055e5f 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -13,11 +13,19 @@ desktop client. These instructions are updated to work with version |version| of the Nextcloud Client. -Getting Source Code -------------------- +You have two possibilities to clone the repo. -The :ref:`generic-build-instructions` pull the latest code directly from -GitHub, and work on Linux, macOS, and Windows. +First option is As [remote URL](https://help.github.com/en/articles/which-remote-url-should-i-use) you can choose between cloning with HTTPS URL's, which is recommended or cloning with SSH URL's. + +[https://github.com/nextcloud/desktop.git](https://github.com/nextcloud/desktop.git) + +When you don't have SSH key added to your GitHub account, than use HTTPS. + +When you no part of the nextcloud organisation, clone with HTTPS: + +``` +$ git clone git@github.com:nextcloud/desktop.git +``` macOS ----- From 15e36c535f8041fc3e47d655b3041219fabb3b4f Mon Sep 17 00:00:00 2001 From: samu-workopen <18331541+samu-workopen@users.noreply.github.com> Date: Sat, 19 Oct 2019 16:11:49 +0200 Subject: [PATCH 05/12] Update Step 11 Step 11 is completely outdated, please replace it with: Enable git submodules: $ cd desktop $ git submodule init $ git submodule update Generate the build files: $ cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=~/nextcloud-desktop-client -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 --- doc/building.rst | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/building.rst b/doc/building.rst index 065055e5f..a0e9c7fad 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -75,10 +75,23 @@ To set up your build environment for development using HomeBrew_: 10. Install the Packages_ package creation tool. -11. In the build directory, run ``admin/osx/create_mac.sh ``. - If you have a developer signing certificate, you can specify - its Common Name as a third parameter (use quotes) to have the package - signed automatically. +11. Enable git submodules: +``` +$ cd desktop +$ git submodule init +$ git submodule update +``` + +12. Generate the build files: +``` +$ cd build +$ cmake .. -DCMAKE_INSTALL_PREFIX=~/nextcloud-desktop-client -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 +``` + +13. Compile and install: +``` +$ make install +``` .. note:: Contrary to earlier versions, Nextcloud 1.7 and later are packaged as a ``pkg`` installer. Do not call "make package" at any time when From cacb300ffd85821b79223350af081c1d49800e34 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Sun, 20 Oct 2019 03:08:24 +0000 Subject: [PATCH 06/12] [tx-robot] updated from transifex --- .tx/nextcloud.client-desktop/de_translation | 8 +++--- translations/client_ru.ts | 30 ++++++++++----------- translations/client_tr.ts | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.tx/nextcloud.client-desktop/de_translation b/.tx/nextcloud.client-desktop/de_translation index e3d9ad406..09564e030 100644 --- a/.tx/nextcloud.client-desktop/de_translation +++ b/.tx/nextcloud.client-desktop/de_translation @@ -198,7 +198,7 @@ X-GNOME-Autostart-Delay=3 # Translations -Icon[de]=@APPLICATION_ICON_NAME@ -Name[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation -Comment[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation -GenericName[de]=Synchronisationsordner +Icon[de_DE]=@APPLICATION_ICON_NAME@ +Name[de_DE]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation +Comment[de_DE]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation +GenericName[de_DE]=Synchronisationsordner diff --git a/translations/client_ru.ts b/translations/client_ru.ts index 192546882..b526934af 100644 --- a/translations/client_ru.ts +++ b/translations/client_ru.ts @@ -107,12 +107,12 @@ Browser Authentication - + Аутентификация с использованием браузера Please switch to your browser to proceed. - Чтобы продолжить, перейдите в ваш браузер. + Чтобы продолжить, перейдите в браузер. @@ -135,7 +135,7 @@ Browser Authentication - + Аутентификация с использованием браузера @@ -145,12 +145,12 @@ An error occurred while connecting. Please try again. - + Ошибка во время установления соединения, попробуйте ещё раз. Re-open Browser - + Повторно открыть браузер @@ -313,7 +313,7 @@ Edit Ignored Files - + Список исключений синхронизации… @@ -579,7 +579,7 @@ Files from the ignore list as well as symbolic links are not synced. This includes: - + Из синхронизации исключены символьные ссылки и следующие файлы: @@ -760,25 +760,25 @@ Error returned from the server: <em>%1</em> - + Сервер сообщил об ошибке: <em>%1</em> There was an error accessing the 'token' endpoint: <br><em>%1</em> - + При доступе к конечной точке токена произошла ошибка: <br><em>%1</em> Could not parse the JSON returned from the server: <br><em>%1</em> - + Не удалось разобрать ответ сервера в формате JSON: <br><em>%1</em> The reply from the server did not contain all expected fields - + В ответе сервера содержатся не все ожидаемые поля @@ -786,17 +786,17 @@ Connect to %1 - + Подключение к %1 Login in your browser (Login Flow v2) - + Выполнить вход в браузере (процедура входа версии 2) Unable to open the Browser, please copy the link to your Browser. - + Не удалось открыть браузер, скопируйте ссылку и перейдите по ней в своём браузере. @@ -804,7 +804,7 @@ Unable to open the Browser, please copy the link to your Browser. - + Не удалось открыть браузер, скопируйте ссылку и перейдите по ней в своём браузере. diff --git a/translations/client_tr.ts b/translations/client_tr.ts index e36423099..b6c58da2e 100644 --- a/translations/client_tr.ts +++ b/translations/client_tr.ts @@ -579,7 +579,7 @@ Files from the ignore list as well as symbolic links are not synced. This includes: - + Yok sayma listesindeki dosyalar ve sembolik bağlantılar eşitlenmez. Şunlar bulunur: From 805b85a4d77e4b475bca3ef54d1ee3d6a6cac46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20V=C3=A1radi?= Date: Sun, 20 Oct 2019 10:18:27 +0200 Subject: [PATCH 07/12] Add libdbus-1-dev to the build dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: István Váradi --- admin/linux/debian/debian.eoan/control | 1 + admin/linux/debian/debian.stable/control | 1 + admin/linux/debian/debian/control | 1 + 3 files changed, 3 insertions(+) diff --git a/admin/linux/debian/debian.eoan/control b/admin/linux/debian/debian.eoan/control index 8b2bbd536..1429f8bce 100644 --- a/admin/linux/debian/debian.eoan/control +++ b/admin/linux/debian/debian.eoan/control @@ -10,6 +10,7 @@ Build-Depends: cmake, libkf5kio-dev, libcmocka-dev, libcloudproviders-dev, + libdbus-1-dev, libhttp-dav-perl, libinotify-dev [kfreebsd-any], libqt5svg5-dev, diff --git a/admin/linux/debian/debian.stable/control b/admin/linux/debian/debian.stable/control index 1be12ad38..793df959f 100644 --- a/admin/linux/debian/debian.stable/control +++ b/admin/linux/debian/debian.stable/control @@ -11,6 +11,7 @@ Build-Depends: cmake, kio-dev, libcmocka-dev, libcloudproviders-dev, + libdbus-1-dev, libhttp-dav-perl, libinotify-dev [kfreebsd-any], libqt5webkit5-dev, diff --git a/admin/linux/debian/debian/control b/admin/linux/debian/debian/control index 87fb0dfb2..6021ab8b7 100644 --- a/admin/linux/debian/debian/control +++ b/admin/linux/debian/debian/control @@ -11,6 +11,7 @@ Build-Depends: cmake, libkf5kio-dev, libcmocka-dev, libcloudproviders-dev, + libdbus-1-dev, libhttp-dav-perl, libinotify-dev [kfreebsd-any], libqt5svg5-dev, From a12164ad5311da4fd15592819013110eeef5ee5f Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Sun, 20 Oct 2019 12:52:52 +0200 Subject: [PATCH 08/12] MSVC Fix for PR #1526: Fix clang's variadic macro warnings The recently merged #1526 caused the MSVC Builds on Windows to fail. This patch sets the new CMake flag only if the compiler it not MSVC. Signed-off-by: Michael Schuster --- src/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37cfd7325..9f854b006 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,12 +29,12 @@ if(NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") endif() -endif() -# Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU -# extension (C++11 §16.3/4 forbids them). Silence clang's warnings. -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") + # Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU + # extension (C++11 §16.3/4 forbids them). Silence clang's warnings. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") +endif() if(WIN32) # Enable DEP & ASLR From 05a56c2e8e82896f18effc9dc71b912cd8766b23 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Mon, 21 Oct 2019 03:06:00 +0000 Subject: [PATCH 09/12] [tx-robot] updated from transifex --- translations/client_fi.ts | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/translations/client_fi.ts b/translations/client_fi.ts index 0704a74b3..2d89c14c6 100644 --- a/translations/client_fi.ts +++ b/translations/client_fi.ts @@ -107,27 +107,27 @@ Browser Authentication - + Selaintunnistautuminen Please switch to your browser to proceed. - + Vaihda selaimeen jatkaaksesi. An error occurred while connecting. Please try again. - + Yhdistäessä tapahtui virhe. Yritä uudelleen. Re-open Browser - + Avaa selain uudelleen Copy link - + Kopioi linkki @@ -135,27 +135,27 @@ Browser Authentication - + Selaintunnistautuminen Please switch to your browser to proceed. - + Vaihda selaimeen jatkaaksesi. An error occurred while connecting. Please try again. - + Yhdistäessä tapahtui virhe. Yritä uudelleen. Re-open Browser - + Avaa selain uudelleen Copy link - + Kopioi linkki @@ -974,17 +974,17 @@ If this action was unintended you can restore the lost data now. Delete all files? - + Poistetaanko kaikki tiedostot? Delete all files - + Poista kaikki tiedostot Restore deleted files - + Palauta poistetut tiedostot @@ -1569,17 +1569,17 @@ Continuing the sync as normal will cause all your files to be overwritten by an Add - + Lisää Remove - + Poista Remove all - + Poista kaikki @@ -1591,7 +1591,7 @@ Items where deletion is allowed will be deleted if they prevent a directory from Could not open file - + Tiedoston avaaminen ei onnistunut @@ -2777,7 +2777,7 @@ Osoitteen käyttäminen ei ole suositeltavaa. Add another link - + Lisää toinen linkki @@ -2945,12 +2945,12 @@ Osoitteen käyttäminen ei ole suositeltavaa. Copy public link - + Kopioi julkinen linkki Copy internal link - + Kopioi sisäinen linkki @@ -3060,7 +3060,7 @@ Osoitteen käyttäminen ei ole suositeltavaa. Server version: %1 - + Palvelimen versio: %1 @@ -3075,7 +3075,7 @@ Osoitteen käyttäminen ei ole suositeltavaa. The connection is not secure - + Tämä yhteys ei ole turvallinen @@ -3140,12 +3140,12 @@ Osoitteen käyttäminen ei ole suositeltavaa. Fingerprint (SHA-256): <tt>%1</tt> - + Sormenjälki (SHA-256): <tt>%1</tt> Fingerprint (SHA-512): <tt>%1</tt> - + Sormenjälki (SHA-512): <tt>%1</tt> @@ -3806,7 +3806,7 @@ Osoitteen käyttäminen ei ole suositeltavaa. Copy link - + Kopioi linkki From 4c791abafc764b72fc165e41439c1649ef2902b7 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 21 Oct 2019 14:50:25 +0200 Subject: [PATCH 10/12] Bump Qt5.12 image Main improvement is that this image contains the libsecret. So when building qtkeychain that should be used. Signed-off-by: Roeland Jago Douma --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9410c1bb5..3652d4a01 100644 --- a/.drone.yml +++ b/.drone.yml @@ -237,7 +237,7 @@ name: qt-5.12 steps: - name: build and test - image: nextcloudci/client-5.12:client-5.12-2 + image: nextcloudci/client-5.12:client-5.12-3 commands: # Install QtKeyChain - /bin/bash -c " @@ -278,7 +278,7 @@ name: qt-5.12-clang steps: - name: build and test - image: nextcloudci/client-5.12:client-5.12-2 + image: nextcloudci/client-5.12:client-5.12-3 commands: # Install QtKeyChain - /bin/bash -c " @@ -319,7 +319,7 @@ name: AppImage steps: - name: build - image: nextcloudci/client-5.12:client-5.12-2 + image: nextcloudci/client-5.12:client-5.12-3 commands: - /bin/bash -c "./admin/linux/build-appimage.sh" trigger: From 704e34fa995540f16fcf08be0f9fe32c5fc10088 Mon Sep 17 00:00:00 2001 From: asapelkin Date: Tue, 22 Oct 2019 00:01:22 +0300 Subject: [PATCH 11/12] enabled address sanitizing for tests Signed-off-by: asapelkin --- .drone.yml | 32 +++++++++++++++--------------- CMakeLists.txt | 6 ++++++ cmake/modules/SanitizerFlags.cmake | 17 ++++++++++++++++ 3 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 cmake/modules/SanitizerFlags.cmake diff --git a/.drone.yml b/.drone.yml index 3652d4a01..3df15e5f6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,11 +22,11 @@ steps: source /opt/qt57/bin/qt57-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -59,11 +59,11 @@ steps: source /opt/qt58/bin/qt58-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -96,11 +96,11 @@ steps: source /opt/qt59/bin/qt59-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -137,11 +137,11 @@ steps: source /opt/qt510/bin/qt510-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -178,11 +178,11 @@ steps: source /opt/qt511/bin/qt511-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -219,11 +219,11 @@ steps: source /opt/qt511/bin/qt511-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -260,11 +260,11 @@ steps: source /opt/qt512/bin/qt512-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master @@ -301,11 +301,11 @@ steps: source /opt/qt512/bin/qt512-env.sh && mkdir build && cd build && - cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ && + cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ && make && useradd -m -s /bin/bash test && chown -R test:test . && - su -c 'ctest --output-on-failure' test" + su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test" trigger: branch: - master diff --git a/CMakeLists.txt b/CMakeLists.txt index f8e92e250..c022f6f16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,6 +219,12 @@ if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() +option(SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF) +if (SANITIZE_ADDRESS) + include(SanitizerFlags) + enable_sanitizer() +endif () + # Handle Translations, pick all client_* files from trans directory. file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts) set(TRANSLATIONS ${TRANS_FILES}) diff --git a/cmake/modules/SanitizerFlags.cmake b/cmake/modules/SanitizerFlags.cmake new file mode 100644 index 000000000..9d5c9ebda --- /dev/null +++ b/cmake/modules/SanitizerFlags.cmake @@ -0,0 +1,17 @@ + +# Enable address sanitizer (gcc/clang only) +macro(ENABLE_SANITIZER) + + if (NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + message(FATAL_ERROR "Sanitizer supported only for gcc/clang") + endif() + + set(SANITIZER_FLAGS "-fsanitize=address -fsanitize=leak -g") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_FLAGS}") + + set(LINKER_FLAGS "-fsanitize=address,undefined -fuse-ld=gold") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}") + +endmacro() + From 706769026d2994ce987947fe296f739e431fe30e Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Tue, 22 Oct 2019 03:06:06 +0000 Subject: [PATCH 12/12] [tx-robot] updated from transifex --- translations/client_sl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/client_sl.ts b/translations/client_sl.ts index b3a2c70af..6e23db0f2 100644 --- a/translations/client_sl.ts +++ b/translations/client_sl.ts @@ -2922,7 +2922,7 @@ Uporaba ni priporočljiva. Share options - + Možnosti souporabe