Commit Graph
100 Commits
Author SHA1 Message Date
Jakob Borg d3f50637d2 lib/model, lib/protocol: Fix file comparisons (fixes #8594) (#8603) 2022-10-16 17:04:28 +02:00
Jakob Borg ed588ce335 lib/scanner: More sensible debug output (#8596)
Previous debug input didn't really give enough info to show what was
happening, while it also printed full block lists which are enormously
verbose. Now it consistently prints 1. what it sees on disk, 2. what it
got from CurrentFile (without blocks), 3. the action taken on that file.
2022-10-13 19:32:58 +02:00
Jakob Borg 87bf09ea40 lib/protocol: Show inode change time in FileInfo debug string (#8591) 2022-10-08 19:28:10 +02:00
Jakob Borg b6bb67b142 build: Update dependencies (#8581) 2022-10-04 11:23:41 +02:00
Jakob Borg 1306d86a62 build: Also update Dockerfile.buildx for new package dependency 2022-10-04 08:31:54 +02:00
Jakob Borg 57443804ba Merge branch 'release'
* release:
  docker: Fix handling of PCAP variable (fixes #8567) (#8568)
  lib/fs: Skip xattrs test on EOPNOTSUPP (fixes #8564) (#8565)
2022-10-04 07:57:07 +02:00
Jakob Borg 7e848a150b docker: Fix handling of PCAP variable (fixes #8567) (#8568)
This correctly handles the absense of the PCAP environment variable,
which was broken in the previous change.
2022-10-02 08:58:22 +02:00
Jakob Borg a206366d10 docker: Fix handling of PCAP variable (fixes #8567) (#8568)
This correctly handles the absense of the PCAP environment variable,
which was broken in the previous change.
2022-10-02 08:50:27 +02:00
Jakob Borg 1e652de5af cmd/stcrashreceiver: Update to more modern panicparse (#8566) 2022-10-01 21:03:14 +01:00
Jakob Borg 361f7ae564 docker: Add env var to control capabilities (#8552)
As it's not simple to run a container under Docker/Kubernetes as
non-root but with additional capabilities, add an internal hack.
2022-09-26 13:39:41 +02:00
Jakob Borg 39d3424e34 build: Improve update-deps command, update deps (#8540) 2022-09-14 10:29:44 +02:00
Jakob BorgandTomasz Wilczyński 6cac308bcd all: Support syncing extended attributes (fixes #2698) (#8513)
This adds support for syncing extended attributes on supported
filesystem on Linux, macOS, FreeBSD and NetBSD. Windows is currently
excluded because the APIs seem onerous and annoying and frankly the uses
cases seem few and far between. On Unixes this also covers ACLs as those
are stored as extended attributes.

Similar to ownership syncing this will optional & opt-in, which two
settings controlling the main behavior: one to "sync" xattrs (read &
write) and another one to "scan" xattrs (only read them so other devices
can "sync" them, but not apply any locally).

Co-authored-by: Tomasz Wilczyński <twilczynski@naver.com>
2022-09-14 09:50:55 +02:00
Jakob Borg b10d106a55 all: Modernize error wrapping (#8491)
This replaces old style errors.Wrap with modern fmt.Errorf and removes
the (direct) dependency on github.com/pkg/errors. A couple of cases are
adjusted by hand as previously errors.Wrap(nil, ...) would return nil,
which is not what fmt.Errorf does.
2022-08-16 10:01:49 +02:00
Jakob Borg eb81f7400c lib/fs: Cache user lookups (#8496) 2022-08-12 07:48:00 +02:00
Jakob Borg 06273875ae all: Make scanning ownership opt-in (#8497) 2022-08-12 07:47:20 +02:00
Jakob Borg d6a90f0022 Merge branch 'release'
* release:
  lib/ur: Properly initialize map in failure data (fixes #8479)
2022-08-10 08:30:46 +02:00
Jakob Borg f5aa604efc Merge branch 'release'
* release:
  lib/ur: Properly initialize map in failure data (fixes #8479)
2022-08-09 18:52:51 +02:00
Jakob Borg 209e68c1ba build: Update quic-go for Go 1.19 (#8483)
Also adds idle time and keepalive parameters because how this is
configured has changed in the new package version. The values are those
that seems like might already be default, if keep-alives were enabled,
which is not obvious from the doc comments.

Also, Go 1.19 gofmt reformatting of comments.
2022-08-03 15:43:26 +02:00
Jakob Borg cc54488e55 lib/ur: Properly initialize map in failure data (fixes #8479) (#8480) 2022-08-03 10:41:26 +02:00
Jakob Borg c7b4fd5784 lib/ur: Properly initialize map in failure data (fixes #8479) 2022-08-02 10:10:29 +02:00
Jakob Borg 5977868165 lib/config: Use net.JoinHostPort instead of string manipulation (#8470) 2022-07-28 22:06:55 +02:00
Jakob Borg 585fb3f49b lib/api: Fix inverted logic in string comparison 2022-07-28 21:51:14 +02:00
Jakob Borg a3c724f2c3 all: Add build constants for runtime.GOOS comparisons (#8442)
all: Add package runtimeos for runtime.GOOS comparisons

I grew tired of hand written string comparisons. This adds generated
constants for the GOOS values, and predefined Is$OS constants that can
be iffed on. In a couple of places I rewrote trivial switch:es to if:s,
and added Illumos where we checked for Solaris (because they are
effectively the same, and if we're going to target one of them that
would be Illumos...).
2022-07-28 19:36:39 +02:00
Jakob Borg dde275c6cc all: Unused errors 2022-07-28 19:08:51 +02:00
Jakob Borg 212258d213 lib/fs: Consolidate append in test 2022-07-28 19:05:24 +02:00
Jakob Borg 966db0d076 lib/api: Further (final?) unused parameters removal 2022-07-28 19:02:12 +02:00
Jakob Borg 6686810943 cmd/syncthing: Incorrect error handling 2022-07-28 18:51:22 +02:00
Jakob Borg 6baa93e13f lib/api: String comparisons 2022-07-28 18:49:44 +02:00
Jakob Borg 0c8b22c696 lib/api: Remove unused parameters 2022-07-28 18:48:15 +02:00
Jakob Borg 79f8bd0f33 all: Minor deprecation updates 2022-07-28 17:54:12 +02:00
Jakob Borg 5958f42294 lib/model: Clarify normal shallow copy 2022-07-28 17:41:07 +02:00
Jakob Borg 8b4bd43306 lib/api: Missing error handling in config handler (#8463) 2022-07-28 17:35:43 +02:00
Jakob Borg 388e4db9cd all: Combine sequential appends (#8461) 2022-07-28 17:28:24 +02:00
Jakob Borg f3835122bb cmd/ursrv: Silence linter with correct regexps (#8460) 2022-07-28 17:26:07 +02:00
Jakob Borg 7bdb5faa9c all: Remove or convert deprecated API usages (#8459) 2022-07-28 17:14:49 +02:00
Jakob Borg a2c5d901f2 cmd/syncthing, lib/config: Remove restartOnWakeup option & functionality (fixes #8448) (#8449) 2022-07-26 16:53:10 +02:00
Jakob Borg adce6fa473 all: Support syncing ownership (fixes #1329) (#8434)
This adds support for syncing ownership on Unixes and on Windows. The
scanner always picks up ownership information, but it is not applied
unless the new folder option "Sync Ownership" is set.

Ownership data is stored in a new FileInfo field called "platform data". This
is intended to hold further platform-specific data in the future
(specifically, extended attributes), which is why the whole design is a
bit overkill for just ownership.
2022-07-26 08:24:58 +02:00
Jakob Borg 9b390f1264 build: Update goleveldb (#8440) 2022-07-21 18:39:14 +02:00
Jakob Borg abea3d7552 cmd/syncthing: Apply file permissions and modtimes when decrypting (#8412)
Directories are not represented in the encrypted storagage so they get
to keep default permissions...
2022-07-04 10:57:45 +02:00
Jakob Borg 0e79b532cf build: Update to patched github.com/gobwas/glob (fixes #8386) (#8387)
The glob package has seen very little activity the last few years so I'm
not holding my breath on getting this merged.
2022-06-15 21:49:15 +02:00
Jakob Borg 520ca4bcb0 script, gui: Exclude bots from the in-GUI authors list 2022-05-06 08:00:22 +02:00
Jakob Borg f8c51d801a lib/discover: Filter locally announced addresses (fixes #7289) (#8302) 2022-05-04 18:43:00 +02:00
Jakob Borg 16c0c2f7a7 Merge branch 'release'
* release:
  lib/connections: Correct race on loop variable (fixes #8320) (#8321)
2022-05-04 18:25:58 +02:00
Jakob Borg 2145b3701d lib/connections: Correct race on loop variable (fixes #8320) (#8321) 2022-05-04 18:17:03 +02:00
Jakob Borg ce0ded7c78 lib/connections: Correct race on loop variable (fixes #8320) (#8321) 2022-05-04 18:16:36 +02:00
Jakob Borg 334a78f185 cmd/strelaysrv, cmd/strelaypoolsrv: Sanitize query strings (fixes #8314) (#8315)
Use the proper encoding function in the relay server when constructing
the URL. In the pool server, parse and re-encode the query values to
sanitize whatever the client sent.
2022-05-02 10:38:49 +02:00
Jakob Borg 623ec03dad lib/model: Correct type of event data (fixes #8294) (#8295)
These things are fragile, every event should use an ${eventType}Data struct or something instead.
2022-04-21 15:45:31 +02:00
Jakob Borg c0de42e3df gui: Use neutral color for zero out of zero listeners (#8281) 2022-04-20 14:43:11 +02:00
Jakob Borg 61dffabf97 cmd/syncthing, lib/logger: Add date to default log format (fixes #8272) (#8273)
This changes the default log format to include the date.
2022-04-15 07:46:14 +04:00
Jakob Borg 9b09bcc5f1 lib/connections: Always run a simple connection test (#7866) 2022-04-10 20:54:42 +02:00
Jakob Borg a3a4da6e3e gui: Use versioned link to documentation in bottom bar (#8204) 2022-03-08 07:56:42 +01:00
Jakob Borg f890fe6fd3 lib/config: Improve clarity of free space errors (fixes #8180) (#8191) 2022-02-24 17:07:51 +01:00
Jakob Borg 013c757a84 github: Provide Git history when checking out for actions 2022-02-21 14:57:21 +01:00
Jakob Borg 479712cdc5 cmd/stdiscosrv: Don't start replication listener without peers (fixes #8143) (#8144)
The intention was that if no peers are given, we shouldn't start the
listener. We did that anyway, because:

- splitting an empty string on comma returns a slice with one empty
  string in it
- parsing the empty string as a device ID returns the empty device ID

so we end up with a valid replication peer which is the empty device ID.
2022-01-27 09:36:54 +01:00
Jakob Borg b6d1e16b4e lib/protocol: Switch to a newer lz4 package (#8122) 2022-01-17 18:52:43 +01:00
Jakob Borg 1242ac74ab github: Make docs commits as release bot 2022-01-12 21:56:21 +01:00
Jakob Borg 4fb7e04686 github: Use specific token to override branch protection 2022-01-10 14:45:47 +01:00
Jakob Borg dc0dbed96e github: Add docs update workflow (#8105) 2022-01-10 14:28:39 +01:00
Jakob Borg bc3d306dd7 cmd/syncthing: Error capitalization 2022-01-07 11:50:19 +01:00
Jakob Borg 7c3b267645 meta: Add test for deprecated package ioutil (#8053) 2021-11-22 10:11:00 +01:00
Jakob Borg 1754c93370 lib/config, lib/ignore: Write Windows line endings (fixes #7115) (#8052) 2021-11-22 09:38:24 +01:00
Jakob Borg 4b750b6dc3 all: Remove usage of deprecated io/ioutil (#7971)
As of Go 1.16 io/ioutil is deprecated. This replaces usage with the
corresponding functions in package os and package io.
2021-11-22 08:59:47 +01:00
Jakob Borg e2288fe441 lib/relay: Send SNI when the address is a host name (fixes #8014) (#8015) 2021-11-22 08:31:03 +01:00
Jakob Borg 12fb7f2a0a lib/model: Correct "reverting folder" log entry 2021-11-17 12:52:10 +01:00
Jakob Borg f1bf4d899a lib/model: Correct handling of fakefs cache
We looked under one cache key, then stored under another...
2021-11-17 12:52:10 +01:00
Jakob Borg 36c044562c gui, man, authors: Update docs, translations, and contributors 2021-10-20 07:45:29 +02:00
Jakob Borg f760ef15b0 gui, man, authors: Update docs, translations, and contributors 2021-10-13 07:45:24 +02:00
Jakob Borg 4e513b8393 gui, man, authors: Update docs, translations, and contributors 2021-10-06 07:45:42 +02:00
Jakob Borg 92eaf52c21 lib/protocol: Test to lock down encryption key derivation
So that we don't inadvertently change how these things work.
2021-10-04 14:36:28 +02:00
Jakob Borg b0460079c1 gui, man, authors: Update docs, translations, and contributors 2021-09-29 07:45:32 +02:00
Jakob Borg c5ec6cd7ef build: Fix deepsource test & exclude patterns (#7969) 2021-09-26 12:08:59 +02:00
Jakob Borg 73c5184518 build: Update all dependencies (#7968)
Also add a script step for how to do this, as frankly I forget each time
what the canonical way is.

`go run build.go update-deps`
2021-09-26 12:08:23 +02:00
Jakob Borg fa05a1ba8c gui, man, authors: Update docs, translations, and contributors 2021-09-22 07:45:31 +02:00
Jakob Borg 30e5243f5e build: Update go-ole for Windows/arm 2021-09-17 17:10:32 +02:00
Jakob Borg 3c66d93aba gui, man, authors: Update docs, translations, and contributors 2021-09-15 07:45:29 +02:00
Jakob Borg 4868d347db gui, man, authors: Update docs, translations, and contributors 2021-09-08 07:45:36 +02:00
Jakob Borg 96f5a11fd5 gui, man, authors: Update docs, translations, and contributors 2021-09-01 07:45:32 +02:00
Jakob Borg 2816780b52 lib/api: Set "Secure" on session cookies served over HTTPS (ref #7399) (#7907)
So that it does not unnecessarily leak over clear text connections.
2021-08-27 17:56:54 +02:00
Jakob Borg c76bd7dcc4 gui, man, authors: Update docs, translations, and contributors 2021-08-25 07:45:41 +02:00
Jakob Borg ca908270ec gui, man, authors: Update docs, translations, and contributors 2021-08-18 07:45:38 +02:00
Jakob Borg d47745a86b all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
Jakob Borg 8c94ce8d14 build: Simplify gem command in Debian Docker image 2021-08-17 09:38:42 +02:00
Jakob Borg a615f868a5 gui, man, authors: Update docs, translations, and contributors 2021-08-11 07:45:33 +02:00
Jakob Borg 6d0816e85a gui, man, authors: Update docs, translations, and contributors 2021-08-04 07:45:31 +02:00
Jakob Borg b197b698a4 gui, man, authors: Update docs, translations, and contributors 2021-07-28 07:45:33 +02:00
Jakob Borg eb6cad7f93 gui, man, authors: Update docs, translations, and contributors 2021-07-21 07:45:25 +02:00
Jakob Borg eab268f5f8 gui, man, authors: Update docs, translations, and contributors 2021-07-14 07:45:27 +02:00
Jakob Borg a56f70ab94 gui, man, authors: Update docs, translations, and contributors 2021-07-07 07:45:25 +02:00
Jakob Borg 82741ad207 gui, man, authors: Update docs, translations, and contributors 2021-06-30 07:45:30 +02:00
Jakob Borg 993a3ebe73 lib/api: Always include usage reporting data in support bundle (#7786) 2021-06-24 22:00:14 +04:00
Jakob Borg 8040502599 gui, man, authors: Update docs, translations, and contributors 2021-06-23 07:45:27 +02:00
Jakob Borg adb7763f87 gui, man, authors: Update docs, translations, and contributors 2021-06-16 07:45:27 +02:00
Jakob Borg 18a608a6ff gui, man, authors: Update docs, translations, and contributors 2021-06-09 07:45:34 +02:00
Jakob Borg ce65aea0ab lib/db: Use a more concurrent GC (fixes #7722) (#7750)
This changes the GC mechanism so that the first pass (which reads all
FileInfos to populate bloom filters with block & version hashes) can
happen concurrently with normal database operations.

The big gcMut still exists, and we grab it temporarily to block all
other modifications while we set up the bloom filters. We then release
the lock and let other things happen, with those other things also
updating the bloom filters as required. Once the first phase is done we
again grab the gcMut, knowing that we are the sole modifier of the
database, and do the cleanup.

I also removed the final compaction step.
2021-06-07 10:52:06 +02:00
Jakob Borg 1e212a8dc6 cmd/syncthing: Wording on error return in "cli debug file" 2021-06-05 11:45:29 +02:00
Jakob Borg 0e9d2a13af cmd/syncthing: Improve "cli debug file" handling
Proper URL encoding, and return a sensible error when it's not found.
2021-06-05 11:19:02 +02:00
Jakob Borg accaf23aa3 gui, man, authors: Update docs, translations, and contributors 2021-06-02 07:45:38 +02:00
Jakob Borg fbaf696821 readme: Remove drama (#7711) 2021-05-26 14:59:49 +02:00
Jakob Borg abe3483a8f gui, man, authors: Update docs, translations, and contributors 2021-05-26 07:45:29 +02:00
Jakob Borg ab2729ab79 gui, man, authors: Update docs, translations, and contributors 2021-05-19 07:45:35 +02:00