Commit graph

12699 commits

Author SHA1 Message Date
git-annex.branchable.com-2746523870@d0bf050902d9409ff6e93b060e84e482d7e91e7f
dd43d49d1e 2025-09-11 12:23:36 +00:00
Joey Hess
38786a4e5e
noCreateProcessWhile to fix close-on-exec races
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2025-09-10 14:29:15 -04:00
Joey Hess
4fd71c125e
Improve performance when used with a local git remote that has a large working tree
git write-tree was being run once per file git-annex acts on when eg,
getting files, which is slow when the remote repository has a large
tree.

onLocal calls quiesce after each action, and quiesce closes the keys db
since [[!commit ba7ecbc6a9c]]. Which has a relevant comment about
performance. I have not addressed that, the keys db still gets closed and
reopened after each file.

Turns out that, since git write-tree was run by each call to
reconcileStaged, the .git/annex/keysdb.cache value was never the
same as the git index's inode. Because git write-tree updates the index's
mtime even when no changes have been made.

And so, when the database got closed and reopened, reconcileStaged would
see a changed index, and run git write-tree again. Over and over.

I considered writing the index's new inodecache after write-tree to the
keysdb.cache, but that would be vulnerable to a race, if the index was
changed just after write-tree.

The fix was to stop using keysb.cache at all. When the database is closed
and later reopened by the same process, avoid re-doing reconcileStaged.

Now that .git/annex/keysdb.cache is no longer used. It could be removed,
but the time overhead of removing it would be more than the space overhead
of keeping it. Defferred removal to the v11 upgrade.

Sponsored-by: unqueued
2025-09-10 12:08:11 -04:00
Joey Hess
16c54d458a
Merge branch 'master' of ssh://git-annex.branchable.com 2025-09-10 10:22:10 -04:00
Joey Hess
34d5cc055e
bug report 2025-09-10 10:16:52 -04:00
yarikoptic
9b28a6b314 initial report on problem with # in the path 2025-09-09 14:36:29 +00:00
babudarabu@232a9694ce5401143f6210561371f887dd15cd61
ab9bbeabd5 Added a comment 2025-09-08 17:13:02 +00:00
Joey Hess
52303a4cc3
comments 2025-09-06 13:38:17 -04:00
Joey Hess
d838836aca
update 2025-09-05 16:18:07 -04:00
Joey Hess
2b1e9eced2
open feed file with close-on-exec bit set
parseFeedFromFile does not set the bit, so open and read the file
ourselves.

Versioned dependency on utf8-string should not cause any issues,
that version is available in all all versions of debian that package it.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
2025-09-05 16:02:17 -04:00
Joey Hess
56cd59a9f4
clarify 2025-09-05 15:49:33 -04:00
Joey Hess
314ce317bf
update 2025-09-05 15:48:43 -04:00
Joey Hess
171b427eb8
update 2025-09-05 14:07:40 -04:00
Joey Hess
9a2013a2e7
update 2025-09-05 14:06:15 -04:00
Joey Hess
d8f40288f1
update 2025-09-05 11:21:38 -04:00
Joey Hess
1230ac83e9
copyFile 2025-09-05 11:17:14 -04:00
Joey Hess
cb6f28282a
on libraries 2025-09-04 18:09:57 -04:00
Joey Hess
2b2e76e73f
format 2025-09-04 16:56:19 -04:00
Joey Hess
10fcd61966
fix format 2025-09-04 16:40:59 -04:00
Joey Hess
7b711ffd3b
Revert "try to fix format issue on website"
This reverts commit 764b47d7d4.
2025-09-04 16:40:50 -04:00
Joey Hess
764b47d7d4
try to fix format issue on website 2025-09-04 16:38:55 -04:00
Joey Hess
807ae0ad26
Merge branch 'master' of ssh://git-annex.branchable.com 2025-09-04 16:31:25 -04:00
Joey Hess
eff0c509f7
more 2025-09-04 16:31:09 -04:00
yarikoptic
d67f578049 added project 2025-09-04 20:13:07 +00:00
Joey Hess
033e4b086f
audit all openFd and dupping for close-on-exec
Made all uses of openFd and dup set the close-on-exec flag, with a few
exceptions when starting a git-annex daemon.

Made openFdWithMode be used everywhere, rather than openFd.
Adding a new parameter to it ensures I checked everything.
And will help to make sure this gets considered in the future when
opening fds.

In lockPidFile, the only thing that keeps the pid file locked, once
daemonize re-runs the command in a new session, is that the fd is
inherited.

In Utility.LogFile.redir, the new fd it dups to does not have the
close-on-exec flag set, because this is used to set up the stdout and
stderr fds, which need to be inherited by child processes.

Same in Assistant.startDaemon where the browser gets started with the
original stdout and stderr.

This does nothing about uses of openFile and similar!

Sponsored-By: mycroft
2025-09-04 16:01:41 -04:00
Joey Hess
e1dcf98b78
analysis 2025-09-04 14:46:44 -04:00
Joey Hess
b2b055a634
analysis 2025-09-04 14:23:13 -04:00
Joey Hess
d44fd44c92
comment 2025-09-04 13:32:12 -04:00
Joey Hess
67f00027d1
avoid relatedTemplate ever returning ""
add: Fix crash adding filenames that are exactly 21 bytes long and begin
with a utf-8 character.

Also longer filenames that start with "....." would cause the same crash.

I also audited for other calls to truncateFilePath that could truncate it
to "". Most use pathmax so are not a problem. Backend.Utilities.genKeyName
could possibly truncate it like that, but appends the md5 so would not be a
problem either.

Sponsored-by: Kevin Mueller
2025-09-04 13:02:46 -04:00
yarikoptic
4b037dda81 Added a comment 2025-09-04 02:06:22 +00:00
yarikoptic
5347627025 Added a comment: odd odd filesystem 2025-09-02 15:06:43 +00:00
guardcat
da4237182e 2025-09-02 10:42:04 +00:00
guardcat
25834e7c79 2025-09-02 10:21:27 +00:00
guardcat
8e032545d8 2025-09-02 10:02:44 +00:00
guardcat
4654097a97 2025-09-02 09:32:38 +00:00
guardcat
bb0690a254 2025-09-02 09:30:30 +00:00
guardcat
9a32b46103 2025-09-02 08:32:27 +00:00
Joey Hess
1d51a0b0ad
comments 2025-08-29 11:42:33 -04:00
yarikoptic
5771a4c83a initial report from ducky 2025-08-29 14:35:04 +00:00
Joey Hess
a82d531433
fix test suite breakage
640bc43c38 broke a test. Change that test
to not use encryption=shared. Which required some refactoring.

Sponsored-by: Joshua Antonishen
2025-08-27 12:26:50 -04:00
yarikoptic
00d64bce36 issue resolved 2025-08-26 12:58:20 +00:00
yarikoptic
e241d08fc2 report on failing test 2025-08-26 11:41:58 +00:00
yarikoptic
b58301e876 Added a comment 2025-08-25 21:30:56 +00:00
yarikoptic
6c14dcfcad Added a comment 2025-08-25 16:56:00 +00:00
yarikoptic
a9e146d30b Added a comment 2025-08-25 16:55:33 +00:00
yarikoptic
02df4deead initial report on copy to be stuck 2025-08-25 16:48:56 +00:00
Lukey
b71f0f2e33 Added a comment 2025-08-23 06:51:16 +00:00
Joey Hess
98d4f07057
tahoe: Support tahoe-lafs command versions newer than 1.16
tahoe start was deprecated and removed in 2020.

This feels like a very janky way to run a daemon, but it does work.

Sponsored-by: k0ld
2025-08-22 12:35:53 -04:00
Joey Hess
bc18b11cb8
prevent changing onlyencryptcreds of existing remote
That would break accessing data already stored in the remote, the same
as changing encryption type would do.

Sponsored-by: Jack Hill
2025-08-21 13:50:39 -04:00
Joey Hess
6b63fb7ea2
Don't allow the type of encryption of an existing special remote to be changed.
eg, git-annex enableremote foo encryption=none will not remove encryption,
and other encryption= settings don't change the type of encryption used.
Either of which would render data stored in a special remote inaccessible.

Probably fixes reversion introduced in
71f78fe45d.
That commit got rid of the hasEncryptionConfig check, which I think would
have detected this before. I've not gone back to verify that.

Sponsored-by: mycroft
2025-08-21 13:41:00 -04:00