Commit Graph

4563 Commits

Author SHA1 Message Date
Jakob Borg 14df5211af lib/model: Correctly account handling of sparse blocks (fixes #4657)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4658
2018-01-11 10:36:35 +00:00
Jakob Borg 5611173366 gui, man: Update docs & translations 2018-01-10 07:45:17 +01:00
Wulf Weich 1afe8ab736 gui: removed faulty char in remoteNeededFiles
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4660
2018-01-09 19:45:55 +00:00
Vladimir Rusinov 1c8803402e build: Remove ulimit from build.sh
Previous "reasonable resource limits" cause test failures with Go 1.9.
They were added to protect the previous generation of the build server
and no longer needed.

Fixes issue #4653.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4656
2018-01-08 17:51:59 +00:00
Antony Male db03562d43 lib/scanner: Fix UTF-8 normalization on ZFS (fixes #4649)
It turns out that ZFS doesn't do any normalization when storing files,
but does do normalization "as part of any comparison process".

In practice, this seems to mean that if you LStat a normalized filename,
ZFS will return the FileInfo for the un-normalized version of that
filename.

This meant that our test to see whether a separate file with a
normalized version of the filename already exists was failing, as we
were detecting the same file.

The fix is to use os.SameFile, to see whether we're getting the same
FileInfo from the normalized and un-normalized versions of the same
filename.

One complication is that ZFS also seems to apply its magic to os.Rename,
meaning that we can't use it to rename an un-normalized file to its
normalized filename. Instead we have to move via a temporary object. If
the move to the temporary object fails, that's OK, we can skip it and
move on. If the move from the temporary object fails however, I'm not
sure of the best approach: the current one is to leave the temporary
file name as-is, and get Syncthing to syncronize it, so at least we
don't lose the file. I'm not sure if there are any implications of this
however.

As part of reworking normalizePath, I spotted that it appeared to be
returning the wrong thing: the doc and the surrounding code expecting it
to return the normalized filename, but it was returning the
un-normalized one. I fixed this, but it seems suspicious that, if the
previous behaviour was incorrect, noone ever ran afoul of it. Maybe all
filesystems will do some searching and give you a normalized filename if
you request an unnormalized one.

As part of this, I found that TestNormalization was broken: it was
passing, when in fact one of the files it should have verified was
present was missing. Maybe this was related to the above issue with
normalizePath's return value, I'm not sure. Fixed en route.

Kindly tested by @khinsen on the forum, and it appears to work.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4646
2018-01-05 18:11:09 +00:00
Simon Frei d87287c0d0 gui: Prevent error without completion and nicer wrapping (fixes #4636)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4637
2018-01-05 14:41:40 +00:00
Jakob Borg 992bb0a98c lib/config, lib/discover: Support new discovery cluster (ref #4618)
This adds one new feature, that discovery servers can have ?nolookup to
be used only for announces. The default set of discovery servers is
changed to:

- discovery.s.n used for lookups. This is dual stack load balanced over
  all discovery servers, and returns both IPv4 and IPV6 results when they
  exist.

- discovery-v4.s.n used for announces. This has IPv4 addresses only and
  the discovery servers will update the unspecified address with the IPv4
  source address, as usual.

- discovery-v6.s.n which is exactly the same for IPv6.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4647
2018-01-05 14:18:32 +00:00
Lars K.W. Gohlke e6551c8485 build: Add support for debug-only binary (i.e., dlv)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4633
LGTM: AudriusButkevicius
2018-01-03 08:07:15 +00:00
Audrius Butkevicius 53f4dfe83c lib/model: Fix panic when auto-accepting existing paused folder (fixes #4636)
This no longer pokes at model internals, and only touches the config.
As a result, model handles this in CommitConfiguration, which restarts
the folders if things change, which repopulate m.folderDevice, m.deviceFolder
and other interal mappings.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4639
2018-01-03 07:42:25 +00:00
Jakob Borg 9410634c2b gui, man: Update docs & translations 2018-01-03 07:45:21 +01:00
Audrius Butkevicius b0e2050cdb cmd/syncthing: UI for version restoration (fixes #2599) (#4602)
cmd/syncthing: Add UI for version restoration (fixes #2599)
2018-01-01 15:39:23 +01:00
Audrius Butkevicius c7f136c2b8 lib/upnp: Each service is it's own NAT device
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4625
2017-12-30 19:16:08 +00:00
Jakob Borg a9f0659f2f lib/fs: Handle deduplicated files on NTFS (fixes #1845)
These files always have the symlink bit set, because they are reparse
points. Nonetheless they are not symlinks, and Lstat reports a size for
them. We use this fact to disambiguate, and hope fervently that nothing
else matches this description so it comes back to bite us...

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4622
2017-12-29 21:23:06 +00:00
Lars K.W. Gohlke 9988044bbe lib/model: Cleanup conditions
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4621
2017-12-29 13:14:39 +00:00
Jakob Borg c24bf7ea55 vendor: Update everything
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4620
2017-12-29 11:38:00 +00:00
Jakob Borg 1296a22069 vendor: Update golang.org/x/sys/... (fixes #4615)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4619
2017-12-29 09:25:24 +00:00
Audrius Butkevicius 72172d853c vendor: Move back to upstream KCP (fixes #4407)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4614
2017-12-27 11:33:12 +00:00
Jakob Borg 5a05d9b867 gui, man: Update docs & translations 2017-12-27 07:45:19 +01:00
Simon Frei 841205dbfe lib/model: Check for invalid filenames after ignore patterns
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4607
LGTM: calmh, AudriusButkevicius
2017-12-25 17:54:34 +00:00
Audrius Butkevicius c58b383b6d gui: Add debug tab to settings (ref #2644)
Just because there are a ton of people struggling to set env vars.
Perhaps this should live in advanced settings, and perhaps we should have a button to view the log.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4604
LGTM: calmh, imsodin
2017-12-24 22:26:05 +00:00
Audrius Butkevicius 2547a29dd7 lib/connections: Don't close nil connections (fixes #4605) 2017-12-18 14:40:51 +00:00
Simon Frei 8fa2b7765a gui, lib/model: Display list of files needed by remote (fixes #4369)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4559
LGTM: AudriusButkevicius, calmh
2017-12-15 20:01:56 +00:00
Jakob Borg c7522063b3 lib/model: Don't leak fd when truncate fails (fixes #4593)
Also attempt to handle this nicer by ignoring the truncate failure when
it doesn't matter, and recover by deleting the temp file when it does.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4594
2017-12-14 10:42:40 +00:00
Jakob Borg d1d967f0cf lib/db: Keep folder meta data persistently in db (fixes #4400)
This keeps the data we need about sequence numbers and object counts
persistently in the database. The sizeTracker is expanded into a
metadataTracker than handled multiple folders, and the Counts struct is
made protobuf serializable. It gains a Sequence field to assist in
tracking that as well, and a collection of Counts become a CountsSet
(for serialization purposes).

The initial database scan is also a consistency check of the global
entries. This shouldn't strictly be necessary. Nonetheless I added a
created timestamp to the metadata and set a variable to compare against
that. When the time since the metadata creation is old enough, we drop
the metadata and rebuild from scratch like we used to, while also
consistency checking.

A new environment variable STCHECKDBEVERY can override this interval,
and for example be set to zero to force the check immediately.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4547
LGTM: imsodin
2017-12-14 09:51:17 +00:00
Jakob Borg 8c91ced784 cmd/syncthing: Clean up deadlock envvars
So STDEADLOCK seems to do the same thing as STDEADLOCKTIMEOUT, except in
the other package. Consolidate?

STDEADLOCKTHRESHOLD is actually called STLOCKTHRESHOLD, correct the help
text.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4598
2017-12-13 19:40:12 +00:00
Jakob Borg a4147d9019 cmd/syncthing: Fix /rest/system/browse for folder path completion (fixes #4590)
Two issues since the filesystem migration;

- filepath.Base() doesn't do what the code expected when the path ends
  in a slash, and we make sure the path ends in a slash.

- the return should be fully qualified, not just the last component.

With this change it works as before, and passes the new test for it.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4591
LGTM: imsodin
2017-12-13 09:34:47 +00:00
Jakob Borg 673bd5fcc0 gui, man: Update docs & translations 2017-12-13 07:45:17 +01:00
Jakob Borg 24c721cb5d vendor: Update github.com/minio/sha256-simd (fixes #4585)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4592
2017-12-12 10:31:27 +00:00
Jakob Borg 230fb083fc lib/model: Remove dead code (*sharedPullerState).sourceFile 2017-12-12 11:30:47 +01:00
Tommy Thorn 509ae5e2d9 goals: Typo
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4588
2017-12-12 08:12:30 +00:00
Jakob Borg 136b3f25f6 cmd/stsigtool: Silence spurious Go 1.10 test/vet complaint 2017-12-10 19:42:17 +01:00
Jakob Borg 57eb1710e9 vendor: Update github.com/zillode/notify 2017-12-10 19:42:17 +01:00
Pawel Palenica ece1defb2f lib/dialer: Register dialer for socks URL scheme (fixes #4515)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4579
2017-12-08 12:04:43 +00:00
Pier Paolo Ramon 8fd2937a58 readme: Formatting
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4578
2017-12-07 09:43:00 +00:00
Simon Frei cce634f340 lib/model: Improve scan scheduling and dir del during pull (fixes #4475 #4476)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4493
2017-12-07 08:42:03 +00:00
Jakob Borg 47429d01e8 lib/config, lib/model: Tweaks to the auto accept feature
Fix the folder restart behavior (ignore Label), improve the API for that
(imho).

Also removes the tab switch animation in the settings modal, because
annoying.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4577
2017-12-07 08:33:32 +00:00
Audrius Butkevicius 445c4edeca gui, lib/config, lib/model: Support auto-accepting folders (fixes #2299)
Also introduces a new Waiter interface for config changes and segments the
configuration GUI.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4551
2017-12-07 07:08:24 +00:00
Simon Frei c005b8dcb0 lib/fs: Prolong test timeout on darwin, hopefully fixing flakyness
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4576
2017-12-06 22:07:08 +00:00
Audrius Butkevicius b9ed6c4c2c vendor: Update pfilter and go-stun (fixes #4561)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4575
2017-12-06 21:28:36 +00:00
Jakob Borg 3153e36a3d gui, man: Update docs & translations 2017-12-06 07:45:18 +01:00
Audrius Butkevicius 60bceb0f09 vendor: Update pfilter (ref #4561)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4572
2017-12-06 06:19:49 +00:00
Jakob Borg 257c3f5e82 script: Retire unused changelog script 2017-12-04 23:00:40 +01:00
Jakob Borg 7d0723da68 authors: Retire unused NICKS file 2017-12-04 23:00:40 +01:00
Pawel Palenica 205426a9c6 gui: Add confirmation on removing devices and folders (fixes #4543)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4563
LGTM: calmh
2017-12-02 11:28:06 +00:00
Jakob Borg bd12e38b56 gui, man: Update docs & translations 2017-11-29 07:45:17 +01:00
Audrius Butkevicius 95a65bf0d0 lib/config: Support symlinked root (fixes #4542, fixes #4353)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4545
LGTM: imsodin, calmh
2017-11-26 07:51:22 +00:00
Jakob Borg 429b3a0429 lib/osutil, lib/scanner: Run symlink test on Windows when possible
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4548
2017-11-25 21:49:53 +00:00
Jakob Borg cc14563b62 Merge branch 'release'
* release:
  vendor: Update pfilter (fixes #4537)
  lib/connections: Actually fix LAN detection, for real (ref #4534)
2017-11-23 08:32:54 +01:00
Audrius Butkevicius 99b00b6a5e vendor: Update pfilter (fixes #4537)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4539
2017-11-23 08:29:56 +01:00
Thomas Hipp b2af8f135b lib/events: Fix unmarshaling of EventType
skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4540
2017-11-22 23:25:55 +00:00