1
0
Fork 0
Commit Graph

148 Commits

Author SHA1 Message Date
Felix Weilbach 02dd363feb Add test utils library
The test utils library collects all dependencies that are needed for
tests and gets automatically linked with every test.

Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-02-02 13:35:04 +00:00
Christian Kamm ee1078b768
owncloudcmd: log sync errors
Previously it was hard to debug some errors since the messages would not
show up in the output.
2020-12-15 10:58:50 +01:00
Christian Kamm 238ac53666
Ensure local discovery on selective sync changes
As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.

Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.
2020-12-15 10:58:41 +01:00
Christian Kamm 4d58208676
File watcher: Reduce touch ignore duration
On Linux and Windows the file watcher can't distinguish between changes
that were caused by the process itself, like during a sync operation,
and external changes. To work around that the client keeps a list of
files it has touched and blocks notifications on these files for a bit.

The duration of this block was originally and arbitrarily set at 15
seconds. During manual tests I regularly thought there was a bug when
syncs didn't trigger, when the only problem was that my changes happened
too close to a previous sync operation.

This change reduces the duration to three seconds. I imagine that this
is still enough.

Also use std::chrono while at it.
2020-12-15 10:58:36 +01:00
Gerhard Gappmeier 7e55ce6640
owncloudcmd: fix compiliation with TOKEN_AUTH_ONLY 2020-12-15 10:58:18 +01:00
Olivier Goffart ab85c60205
owncloudcmd: Read the server version from the capabilities
Issue: #6846
2020-12-15 10:58:15 +01:00
Olivier Goffart 3e4486c078
owncloudcmd: fetch the dav user
This is required to get the new endpoint working when the server
uses ldap or that the dav user is not the same as the login.

Issue #6830
2020-12-15 10:58:15 +01:00
Olivier Goffart ca32eb1cf7
More cleanup of csync remains 2020-12-15 10:58:01 +01:00
Dominik Schmidt 07f331717f
Rename ocsync library to ${APPLICATION_EXECUTABLE}_csync 2020-12-15 10:57:56 +01:00
Dominik Schmidt aad928a6be
Install libocsync to lib/ without subfolder.
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.

The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.

It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
2020-12-15 10:57:56 +01:00
Kevin Ottens 1b553b93b9 Partial Revert "Adapted for cmd version and added migration step for config file"
This partially reverts commit 67ed54671b.

The migration code was left untouched.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Kevin Ottens cebd39aa85 Revert "Adjust to makeDbName returning an absolute path"
This reverts commit 2492e241ac.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-10 17:46:43 +00:00
Harald Eilertsen 5f4cec870b cmd: Replace foreach with range base for (#2219)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
2020-09-29 19:31:23 +02:00
Kevin Ottens d58ec4bf70
Enable the modernize-use-using check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-12 18:18:57 +02:00
Kevin Ottens 2492e241ac Adjust to makeDbName returning an absolute path
PR #1451 changed the behavior of makeDbName which now returns an
absolute path. This obviously then failed in nextcloudcmd which
prepended to it the path to the local folder to sync. We just stop doing
this to have the journal db end up at the right place in that case as
well.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-08 13:09:13 +02:00
Michael Schuster e6389959ce macOS: Build nextcloudcmd after gui and run macdeployqt with the -executable option
- src/CMakeLists.txt: Switch build order to build cmd before gui
- src/gui/CMakeLists.txt: Use the -executable option for a combined run of macdeployqt

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-07 14:39:42 +02:00
Dominique Fuchs a45c2e04e5 Copy nextcloudcmd post-build instead of macdeployqt when building macOS bundle
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-06-07 14:39:42 +02:00
Michael Schuster acb56be528 macOS: Use macdeployqt instead of the old admin/osx/macdeployqt.py
In order to build the new 2.7 releases (new QML dependencies) without manually
modifying the old Python script each time, rely on Qt's standard tool instead.

This should streamline the build systems for upcoming dependency changes.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-07 14:39:42 +02:00
Camila San 3bae570f29 Do not declare local variables without an initial value.
Signed-off-by: Camila San <hello@camila.codes>
2020-06-03 07:50:40 +00:00
Kevin Ottens 712869db9a Use auto to avoiding repeating type names
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 03:54:41 +02:00
Kevin Ottens dea6ebaa35 Use nullptr when appropriate
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 02:21:26 +02:00
Dominique Fuchs 67ed54671b Adapted for cmd version and added migration step for config file
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2019-09-26 17:47:01 +02:00
Tobia De Koninck d9f79215a7 Fix the hiddensync state in the UI + also sync hidden in cmd 2018-09-01 16:30:27 +02:00
Roeland Jago Douma 30b211381f
More fixes for the OSX daily builds
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-21 15:22:53 +02:00
Olivier Goffart 7e05e1e411
owncloudcmd: Do not overwrite the http timeout for json jobs
The AbstractNetworkJob already has a sensible timeout that depends
on an environment variable.
No need to overwrite that with some arbitrary value. (The connection
validator does that because it could cause problems if two connection
validator were to run at the same time. Not a problem here)
2018-05-31 21:56:55 +02:00
Olivier Goffart 204cb470b4
owncloudcmd: Do not read the proxy settings from the gui's config file
The proxy settings for the owncloudcmd client can be set via the
--httpproxy command line argument. owncloudcmd should not depends
on the gui's config
2018-05-31 21:56:55 +02:00
Roeland Jago Douma 48bce4c6b0
Merge remote-tracking branch 'oc/master' into oc_up 2018-01-25 11:17:04 +01:00
Olivier Goffart 3ae327ea8e Modernize out CMakeLists.txt
Mainly uses target_include_directories instead of include_directories
so libraries public include directory get automatically added when adding
the target in target_link_library
2018-01-13 13:58:17 +01:00
Olivier Goffart 3ddd4b6f16 Get rid of csync_log
We use Qt's debugging code everywhere
2018-01-13 13:58:17 +01:00
Olivier Goffart 257d8142b1 Build system: Get rid of QtVersionAbstraction.cmake
Use modern cmake with target_link_libraries and Qt5:: that
automatically add the include path and compile flags
2018-01-13 13:58:17 +01:00
Christian Kamm d0e7f61db6 owncloudcmd: Set proxy earlier #6281
In particular before the capability call.

Also warn if no proxy is set because the command line doesn't follow the
strict format requirements.
2018-01-05 10:23:29 +01:00
Christian Kamm 0f8790d993 owncloudcmd: Remove some dead code 2018-01-05 10:12:25 +01:00
Roeland Jago Douma fe4bb52a6d
Merge remote-tracking branch 'oc/master' into oc_up 2017-12-14 10:27:11 +01:00
Olivier Goffart 02283fc686
Merge pull request #6224 from owncloud/deprecated
Remove use of deprecated Qt API
2017-12-12 11:48:04 +01:00
Olivier Goffart 7bd48b1327 cmd: remove usage of deprecated qInstallMsgHandler 2017-12-08 16:15:48 +01:00
Olivier Goffart 4581d708ff Account: remove dependency with ConfigFile
Part of #6213
2017-12-07 17:39:16 +01:00
Christian Kamm 7ab127ad53 Excludes: Refactor for pending improvements
Make ExcludedFiles something that is instantiated outside of
the CSYNC context and then given to it as a hook.

ExcludedFiles still lives in csync_exclude and the internal
workings haven't been touched.
2017-12-07 14:38:21 +01:00
Markus Goetz cde6589af8 owncloudcmd: Don't need Qt Sql module 2017-11-28 10:18:01 +01:00
Roeland Jago Douma ccd050455a
Merge pull request #62 from bceverly/master
Added build support for FreeBSD
2017-11-27 20:39:19 +01:00
Terence Eden 0b00ab8a15
Typo
Fixes #63
2017-11-25 10:03:00 +00:00
bceverly 5279e2fb37 Added support for FreeBSD 2017-11-24 08:54:29 -05:00
Markus Goetz a3c1052cae owncloudcmd: Fix timestamps, Fix --logdebug
We did not set a log handler so there were no timestamps.
The --debug didn't have an effect, let's use --logdebug like in GUI version.
(Command line always outputs some log)

Found in owncloud/documentation#3436
2017-10-18 09:16:05 +02:00
Olivier Goffart b8f7c6daae CMakeLists.txt: Put -pie as a linker flag were it belongs
Fixes warning introduced by PR #6040
2017-10-06 14:35:56 +02:00
rockihack ecaa37efbe Linux Hardening
see: https://wiki.debian.org/Hardening#User_Space
2017-09-29 14:34:30 +02:00
Olivier Goffart d68b07dfc7 Fix encoding of version string 2017-09-27 12:06:49 +02:00
Dominik Schmidt a2ce739192 Set CMAKE_INSTALL_RPATH as RPATH for installed executables 2017-09-27 09:13:44 +02:00
Christian Kamm 844bfc5f25 Move the --version output text to Theme #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
2017-09-27 09:13:44 +02:00
Olivier Goffart ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Helmut K. C. Tessarek 709aa27031 remove qt4 code 2017-09-15 07:11:05 +02:00