Skip to content

Commit 790d1f3

Browse files
committed
Merge branch 'v0.4.4-dev'
2 parents 8cc6719 + 77d5d34 commit 790d1f3

File tree

202 files changed

+8192
-7499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+8192
-7499
lines changed

.sourcecraft/ci.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
on:
2+
push:
3+
- workflows: build-package-workflow
4+
5+
# tasks:
6+
# - name: compile-san-n-test
7+
# - name: make-app-image
8+
9+
workflows:
10+
build-package-workflow:
11+
settings:
12+
max_cube_duration: 120m
13+
tasks:
14+
#- [compile-san-n-test, make-app-image]
15+
- make-app-image
16+
17+
tasks:
18+
- name: compile-san-n-test
19+
cubes:
20+
- name: configure
21+
script:
22+
- sudo apt update
23+
- sudo apt install software-properties-common
24+
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test
25+
- sudo apt update
26+
- sudo apt install -y gcc-13 g++-13
27+
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60
28+
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60
29+
- sudo update-alternatives --config gcc
30+
- sudo update-alternatives --config g++
31+
- g++ --version
32+
- gcc --version
33+
- sudo apt install -y cmake python3-venv pkgconf mold
34+
- sudo apt install -y libgl1-mesa-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev libxcb-glx0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-dri3-dev uuid-dev libxcb-cursor-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-res0-dev libxcb-util-dev libxcb-util0-dev libglu1-mesa-dev
35+
- sudo apt install -y libxft-dev
36+
- python3 -m venv myenv
37+
- source myenv/bin/activate
38+
- pip install conan
39+
- conan profile detect
40+
- cp .sourcecraft/conan-profile-linux-native /root/.conan2/profiles/linux-native
41+
- mkdir build.ci && cd build.ci
42+
- conan install --build=missing --profile=linux-native --output-folder . -s build_type=Debug -o '&:shared=True' ..
43+
- source ./conanbuild.sh
44+
- cmake .. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fuse-ld=mold -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer" -DSYNCSPIRIT_BUILD_TESTS=on
45+
- name: compile
46+
script:
47+
- cd build.ci
48+
- make -j`nproc`
49+
- name: test
50+
script:
51+
- cd build.ci
52+
- ctest --rerun-failed --output-on-failure .
53+
- name: make-app-image
54+
cubes:
55+
- name: prepare
56+
image: ubuntu:focal
57+
script:
58+
- export PATH=$HOME/my-gcc/bin:$HOME/.local/bin:$PATH
59+
- apt update
60+
- apt install -y software-properties-common
61+
- apt update
62+
- apt-get install -y g++9 gcc-9 wget libxft-dev build-essential python3-pip make cmake git fuse libfuse2 libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmuu-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxtst-dev libxv-dev libxxf86vm-dev libxcb-glx0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-dri3-dev uuid-dev libxcb-cursor-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-res0-dev libxcb-util0-dev libxcb-util-dev libglu1-mesa-dev pkgconf file
63+
- pip3 install --user conan
64+
- pip3 install conan
65+
- conan profile detect
66+
- cp .sourcecraft/conan-profile-linux-appimage /root/.conan2/profiles/default
67+
- wget https://ftp.gnu.org/gnu/gcc/gcc-14.3.0/gcc-14.3.0.tar.xz
68+
- tar -xf gcc-14.3.0.tar.xz
69+
- cd gcc-14.3.0
70+
- ./contrib/download_prerequisites
71+
- ./configure --prefix=/$HOME/my-gcc --enable-languages=c,c++ --disable-multilib --enable-bootstrap
72+
- make -j`nproc`
73+
- make install
74+
- name: setup
75+
script:
76+
- export PATH=$HOME/my-gcc/bin:$HOME/.local/bin:$PATH
77+
- mkdir build.chroot
78+
- conan install -u --build=missing --output-folder . -s build_type=Release -o '&:shared=True' ..
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[settings]
2+
arch=x86_64
3+
build_type=Release
4+
os=Linux
5+
compiler=gcc
6+
compiler.cppstd=20
7+
compiler.libcxx=libstdc++11
8+
compiler.version=10
9+
os=Linux
10+
[buildenv]
11+
CC=/home/c/my-gcc/bin/x86_64-pc-linux-gnu-gcc
12+
CXX=/home/c/my-gcc/bin/x86_64-pc-linux-gnu-g++
13+
14+
[options]
15+
*/*:shared=True
16+
fltk/*:with_xft=True
17+
fltk/*:with_gl=False
18+
boost/*:magic_autolink=False
19+
boost/*:visibility=hidden
20+
boost/*:header_only=False
21+
boost/*:without_serialization=True
22+
boost/*:without_cobalt=True
23+
boost/*:without_graph=True
24+
boost/*:without_fiber=True
25+
boost/*:without_log=True
26+
boost/*:without_math=True
27+
boost/*:without_process=True
28+
boost/*:without_stacktrace=True
29+
boost/*:without_test=True
30+
boost/*:without_wave=True
31+
protobuf/*:with_zlib=False
32+
pugixml/*:no_exceptions=True
33+
rotor/*:enable_asio=True
34+
rotor/*:enable_thread=True
35+
rotor/*:enable_fltk=True
36+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[settings]
2+
arch=x86_64
3+
build_type=Release
4+
compiler=gcc
5+
compiler.cppstd=20
6+
compiler.libcxx=libstdc++11
7+
compiler.version=11
8+
os=Linux
9+
10+
[options]
11+
*/*:shared=True
12+
#fltk/*:with_xft=True
13+
fltk/*:with_xft=False
14+
fltk/*:with_gl=False
15+
boost/*:magic_autolink=False
16+
boost/*:visibility=hidden
17+
boost/*:header_only=False
18+
boost/*:without_serialization=True
19+
boost/*:without_graph=True
20+
boost/*:without_fiber=True
21+
boost/*:without_log=True
22+
boost/*:without_math=True
23+
boost/*:without_process=True
24+
boost/*:without_stacktrace=True
25+
boost/*:without_test=True
26+
boost/*:without_wave=True
27+
boost/*:without_cobalt=True
28+
boost/*:without_contract=True
29+
boost/*:without_coroutine=True
30+
boost/*:without_json=True
31+
pugixml/*:no_exceptions=True
32+
rotor/*:enable_asio=True
33+
rotor/*:enable_thread=True
34+
rotor/*:enable_fltk=True
35+

CMakeLists.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required (VERSION 3.19)
2-
project (syncspirit VERSION 0.4.3)
2+
project (syncspirit VERSION 0.4.4)
33

44
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -99,18 +99,19 @@ add_library(syncspirit_core
9999
src/db/prefix.cpp
100100
src/db/transaction.cpp
101101
src/db/utils.cpp
102-
src/fs/chunk_iterator.cpp
103102
src/fs/file.cpp
104103
src/fs/file_actor.cpp
105104
src/fs/file_cache.cpp
106105
src/fs/fs_supervisor.cpp
107-
src/fs/new_chunk_iterator.cpp
108-
src/fs/scan_actor.cpp
109-
src/fs/scan_scheduler.cpp
110-
src/fs/scan_task.cpp
106+
src/fs/fs_slave.cpp
111107
src/fs/utils.cpp
108+
src/fs/task/noop.cpp
109+
src/fs/task/remove_file.cpp
110+
src/fs/task/rename_file.cpp
111+
src/fs/task/segment_iterator.cpp
112+
src/fs/task/scan_dir.cpp
112113
src/hasher/hasher_actor.cpp
113-
src/hasher/hasher_proxy_actor.cpp
114+
src/hasher/hasher_plugin.cpp
114115
src/hasher/hasher_supervisor.cpp
115116
src/model/diff/apply_controller.cpp
116117
src/model/diff/block_diff.cpp
@@ -142,7 +143,6 @@ add_library(syncspirit_core
142143
src/model/diff/load/pending_folders.cpp
143144
src/model/diff/load/remove_corrupted_files.cpp
144145
src/model/diff/local/blocks_availability.cpp
145-
src/model/diff/local/custom.cpp
146146
src/model/diff/local/file_availability.cpp
147147
src/model/diff/local/io_failure.cpp
148148
src/model/diff/local/scan_finish.cpp
@@ -151,16 +151,11 @@ add_library(syncspirit_core
151151
src/model/diff/local/synchronization_finish.cpp
152152
src/model/diff/local/synchronization_start.cpp
153153
src/model/diff/modify/add_blocks.cpp
154-
src/model/diff/modify/add_remote_folder_infos.cpp
155154
src/model/diff/modify/add_ignored_device.cpp
156155
src/model/diff/modify/add_pending_device.cpp
157156
src/model/diff/modify/add_pending_folders.cpp
158-
src/model/diff/modify/append_block.cpp
159157
src/model/diff/modify/block_ack.cpp
160-
src/model/diff/modify/block_rej.cpp
161158
src/model/diff/modify/block_transaction.cpp
162-
src/model/diff/modify/clone_block.cpp
163-
src/model/diff/modify/finish_file.cpp
164159
src/model/diff/modify/generic_remove.cpp
165160
src/model/diff/modify/mark_reachable.cpp
166161
src/model/diff/modify/remove_blocks.cpp
@@ -181,6 +176,7 @@ add_library(syncspirit_core
181176
src/model/diff/peer/cluster_update.cpp
182177
src/model/diff/peer/rx_tx.cpp
183178
src/model/diff/peer/update_folder.cpp
179+
src/model/diff/peer/update_remote_views.cpp
184180
src/model/misc/augmentation.cpp
185181
src/model/misc/block_iterator.cpp
186182
src/model/misc/error_code.cpp
@@ -206,7 +202,7 @@ add_library(syncspirit_core
206202
src/model/ignored_folder.cpp
207203
src/model/pending_device.cpp
208204
src/model/pending_folder.cpp
209-
src/model/remote_folder_info.cpp
205+
src/model/remote_view.cpp
210206
src/model/some_device.cpp
211207
src/model/version.cpp
212208
src/net/acceptor_actor.cpp
@@ -218,15 +214,21 @@ add_library(syncspirit_core
218214
src/net/http_actor.cpp
219215
src/net/initiator_actor.cpp
220216
src/net/local_discovery_actor.cpp
221-
src/net/messages.cpp
217+
src/net/local_keeper.cpp
222218
src/net/net_supervisor.cpp
223219
src/net/peer_actor.cpp
224220
src/net/peer_supervisor.cpp
225221
src/net/relay_actor.cpp
226222
src/net/resolver_actor.cpp
227223
src/net/names.cpp
224+
src/net/scheduler.cpp
228225
src/net/ssdp_actor.cpp
229226
src/net/upnp_actor.cpp
227+
src/net/local_keeper/child_info.cpp
228+
src/net/local_keeper/hash_base.cpp
229+
src/net/local_keeper/folder_slave.cpp
230+
src/net/local_keeper/stack_context.cpp
231+
src/net/local_keeper/stack.cpp
230232
src/presentation/entity.cpp
231233
src/presentation/cluster_file_presence.cpp
232234
src/presentation/file_entity.cpp

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ after the core completion.
9696

9797
# changes
9898

99+
## 0.4.4 (08-Jan-2026)
100+
- [fltk] allow to regenereate certificate/key pair and soft restart
101+
- [core] reduce memory consumption to ~30%
102+
- [core] do not consume CPU when idle
103+
- [core] govern file system operations (scan, read, write, delete etc.) from
104+
control thread
105+
- [core, bugfix] use system/default ssl root CAs to connect to syncthing infrastructure
106+
(might require to delete configuration from previous installation).
107+
- [fltk, bugfix] fogetting to insert deleted folder into pending list
108+
99109
## 0.4.3 (04-Oct-2025)
100110
- [core] fix compatibility with syncthing v2.0 (i.e. tolerate directory with
101111
non-zero size and without blocks)

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def requirements(self):
1717
self.requires("openssl/3.5.2")
1818
self.requires("protopuf/3.0.0")
1919
self.requires("pugixml/1.15")
20-
self.requires("rotor/0.34")
20+
self.requires("rotor/0.40")
2121
self.requires("spdlog/1.15.3")
2222
self.requires("tomlplusplus/3.4.0")
2323
self.requires("zlib/1.3.1")

docs/building.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@
1717
- [pugixml](https://github.com/zeux/pugixml)
1818
- [tomlplusplus](https://github.com/marzer/tomlplusplus)
1919
- [c-ares](https://c-ares.org/)
20-
- [fltk](https://www.fltk.org/) (for fltk-ui)
20+
- [fltk][] (for fltk-ui)
2121

22-
The [conan](https://conan.io/) package manager (v2.0+) is used with
23-
[cmake](https://cmake.org/) build system.
22+
The [conan][] package manager (v2.0+) is used with [cmake][] build system.
2423

25-
`syncspririt` can be build with [conan](https://conan.io/) or just with bare
26-
[cmake](https://cmake.org/) build system. [conan](https://conan.io/) is
27-
responsible for installing and building dependencies, with bare [cmake](https://cmake.org/)
28-
it should be done manually (e.g. use system-provided libraries).
24+
`syncspirit` can be build with [conan][] or just with bare [cmake][] build
25+
system. [conan][] is responsible for installing and building dependencies, with
26+
bare [cmake][] it should be done manually (e.g. use system-provided libraries).
2927

30-
Please note, that [fltk](https://www.fltk.org/) library should be build as
31-
shared library; otherwise applications will not work correctly.
28+
Please note, that [fltk][] library should be build as shared library; otherwise
29+
applications will not work correctly.
3230

3331
## generic build
3432

@@ -70,7 +68,7 @@ rotor/*:enable_fltk=True
7068

7169
If static build is planned, than `*/*:shared=True` should be `False`.
7270

73-
If the defult conan profile is missing, than create it via:
71+
If the default conan profile is missing, than create it via:
7472
```
7573
conan profile detect
7674
```
@@ -174,7 +172,7 @@ make -j`nproc`
174172

175173
### mxe
176174

177-
Download [mxe](https://mxe.cc); make sure all requirements are met.
175+
Download [mxe][]; make sure all requirements are met.
178176

179177
Your `settings.mk` should contain something like:
180178

@@ -190,7 +188,7 @@ make zip
190188
```
191189

192190

193-
Add $mxe_dir/uer/bin to your `PATH`, and make sure something like that works:
191+
Add $mxe_dir/usr/bin to your `PATH`, and make sure something like that works:
194192

195193
```
196194
export PATH=`pwd`/usr/bin:$PATH
@@ -256,7 +254,7 @@ make -j`nproc`
256254

257255
### mxe & windows xp
258256

259-
Download [mxe](https://mxe.cc); make sure all requirements are met.
257+
Download [mxe][]; make sure all requirements are met.
260258

261259
Your `settings.mk` should contain something like:
262260

@@ -276,7 +274,7 @@ Copy the resulting `zip.exe` to windows xp host and launch, i.e. make sure
276274
everything is ok with the toolchain.
277275

278276

279-
Add $mxe_dir/uer/bin to your `PATH`, and make sure something like that works:
277+
Add $mxe\_dir/usr/bin to your `PATH`, and make sure something like that works:
280278

281279
```
282280
export PATH=`pwd`/usr/bin:$PATH
@@ -492,3 +490,8 @@ conan install --build=missing --output-folder . -s build_type=Debug \
492490
cmake .. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \
493491
-DCMAKE_BUILD_TYPE=Debug -DSYNCSPIRIT_BUILD_TESTS=on \
494492
-DCMAKE_CXX_FLAGS="-fuse-ld=mold"
493+
494+
[cmake]: https://cmake.org/
495+
[conan]: https://conan.io/
496+
[fltk]: https://www.fltk.org/
497+
[mxe]: https://mxe.cc

src/config/bep.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ struct bep_config_t {
1111
std::uint32_t rx_buff_size;
1212
std::uint32_t tx_buff_limit;
1313
std::uint32_t connect_timeout;
14-
std::uint32_t request_timeout;
15-
std::uint32_t tx_timeout;
16-
std::uint32_t rx_timeout;
14+
std::uint32_t ping_timeout;
1715
std::uint32_t blocks_max_requested;
1816
std::uint32_t blocks_simultaneous_write;
1917
std::uint32_t advances_per_iteration;

src/config/fs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
2-
// SPDX-FileCopyrightText: 2019-2024 Ivan Baidakou
2+
// SPDX-FileCopyrightText: 2019-2026 Ivan Baidakou
33

44
#pragma once
55
#include <cstdint>
@@ -8,7 +8,6 @@ namespace syncspirit::config {
88

99
struct fs_config_t {
1010
std::uint32_t temporally_timeout;
11-
std::uint32_t mru_size;
1211
std::int64_t bytes_scan_iteration_limit;
1312
std::int64_t files_scan_iteration_limit;
1413
};

src/config/main.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace bfs = std::filesystem;
2222
struct main_t {
2323
bfs::path config_path;
2424
bfs::path default_location;
25-
bfs::path root_ca_file;
25+
std::string ssl_verify_store;
2626
bfs::path cert_file;
2727
bfs::path key_file;
2828

@@ -40,6 +40,7 @@ struct main_t {
4040
std::uint32_t timeout;
4141
std::string device_name;
4242
std::uint32_t hasher_threads;
43+
std::uint32_t poll_timeout; // in microseconds
4344
};
4445

4546
} // namespace syncspirit::config

0 commit comments

Comments
 (0)