Commit graph

21 commits

Author SHA1 Message Date
ed 999789c742 improve accuracy of failsafe-check
also fix fsutil relabel after 8417098c
2025-03-16 18:49:42 +00:00
ed 29a17ae2b7 fix detection of unsafe IdP volumes; closes #147
was overly aggressive until now, thinking the following was unsafe:

-v 'x::'                                  # no-anonymous-access
-v 'x/${u}:${u}:r:A,${u}'           # world-readable,user-admin
-v 'x/${u}/priv:${u}/priv:A,${u}'             # only-user-admin

now it realizes that this is safe because both IdP volumes
will be created/owned by the same user

however, if the first volume is 'x::r' then this is NOT safe,
and is now still correctly detected as being dangerous

also add a separate warning if `${g}` and `${u}` is mixed
in a volpath, since that is PROBABLY (not provably) unsafe
2025-03-14 21:08:21 +00:00
ed 3051b13108 try to avoid printing mojibake in logs
unprintable and side-effect-inducing paths and names are hex-escaped,
preserving greppability and making log-parsing slightly more okay
2024-12-18 01:45:54 +01:00
ed 2927bbb2d6 strip dev-only asserts at build stage 2024-09-14 22:17:35 +00:00
ed 98ffaadf52 docker: use less RAM at runtime
compile to bytecode so cpython doesn't have to keep it in memory

ram usage reduced by:
* min: 5.4 MiB (32.6 to 27.2)
* ac/im: 5.2 MiB (39.0 to 33.8)
* dj/iv: 10.6 MiB (67.3 to 56.7)

startup time reduced from:
* min: 1.3s to 0.6s
* ac/im: 1.6s to 0.9s
* dj/iv: 2.0s to 1.1s

image size increased by 4 MiB (min), 6 MiB (ac/im/iv), 9 MiB (dj)

ram usage measured on idle with:
while true; do ps aux | grep -E 'R[S]S|no[-]crt'; read -n1; echo; done

startup time measured with:
time podman run --rm -it localhost/copyparty-min-amd64 --exit=idx
2024-08-02 22:11:23 +00:00
ed d5c9c8ebbd make it 5% faster 2024-07-31 17:51:53 +00:00
ed f6e693f0f5 reevaluate support for sparse files periodically
if a given filesystem were to disappear (e.g. removable storage)
followed by another filesystem appearing at the same location,
this would not get noticed by up2k in a timely manner

fix this by discarding the mtab cache after `--mtab-age` seconds and
rebuild it from scratch, unless the previous values are definitely
correct (as indicated by identical output from `/bin/mount`)

probably reduces windows performance by an acceptable amount
2024-04-24 21:18:26 +00:00
ed edad3246e0 make pylance happier 2022-10-29 20:40:25 +00:00
ed 4bcd30da6b cleaner daemon instancing 2022-10-23 12:05:44 +02:00
ed 4aaa111925 v1.3.9 2022-08-04 00:39:37 +02:00
ed a669f79480 windows upload perf (fat32, smb) 2022-08-02 20:39:51 +02:00
ed 75cdf17df4 cache sparsefile-support on windows too 2022-08-02 06:58:25 +02:00
ed 4a76663fb2 ensure free disk space 2022-07-17 22:33:08 +02:00
ed c6c31702c2 cheaper file deletion 2022-07-11 01:50:18 +02:00
ed 59b6e61816 build fstab from relabels when mtab is unreadable 2022-07-06 02:28:34 +02:00
ed a9591db734 cleanup 2022-06-27 22:56:29 +02:00
ed 5d3034c231 detect sparse support from st_blocks 2022-06-23 18:23:42 +02:00
ed fe67c52ead configurable list of sparse-supporting filesystems +
close nonsparse files after each write to force flush
2022-06-19 22:38:52 +02:00
ed 190e11f7ea update deps + misc 2022-06-16 21:43:40 +02:00
ed 903b9e627a ux snappiness + keepalive on http-1.0 2022-06-16 20:33:09 +02:00
ed 728dc62d0b optimize nonsparse uploads (fat32, exfat, hpfs) 2022-06-16 17:51:42 +02:00