Commit graph

46745 commits

Author SHA1 Message Date
Joey Hess
f775c9643f
Merge branch 'master' of ssh://git-annex.branchable.com 2025-03-17 14:33:11 -04:00
Joey Hess
85fe283c05
decided to leave message as-is
"getting input <file> from <remote>"  is talking about the original
input filename. I think that's ok.
2025-03-17 14:31:43 -04:00
Joey Hess
f835919e40
decided addcomputed will not support annex.smallfiles
If it did, recompute would need to somehow support recomputing
non-annexed files.

And, annex.smallfiles is typically used for configuration files or
source code kind of things, where the user doesn't want it to be an
annexed file. Computed artifacts are not likely that kind of thing.

Also, git-annex importfeed is an example of something that does support
annex.addunlocked, but does not support annex.smallfiles.
2025-03-17 14:27:56 -04:00
Joey Hess
23538ea17b
annex.addunlocked support for git-annex compute
And for git-annex recompute, add the file unlocked when the original is
unlocked.
2025-03-17 14:26:09 -04:00
Joey Hess
de6e9f5beb
support building with old version of bytestring 2025-03-14 16:44:27 -04:00
Joey Hess
3dd41909dd
fix comment typo 2025-03-14 11:36:40 -04:00
Atemu
73a066c963 2025-03-14 12:32:04 +00:00
Atemu
08b7f10d56 2025-03-14 12:14:03 +00:00
Atemu
cc99190baa 2025-03-14 12:11:19 +00:00
msz
4f13b33bc0 2025-03-12 19:50:01 +00:00
msz
28ca34e182 Added a comment 2025-03-12 19:44:23 +00:00
Joey Hess
e505ade963
add compute tip 2025-03-12 13:43:50 -04:00
Joey Hess
a673fc7cfd
recompute: stage new version of file in git
When writing doc/tips/computing_annexed_files.mdwn, I noticed
that a recompute --reproducible followed by a drop and a re-get did not
actually test if the file could be reproducible computed again.

Turns out that get and drop both operate on staged files. If there is an
unstaged modification in the work tree, that's ignored. Somewhat
surprisingly, other commands like info do operate on staged files. So
behavior is inconsistent, and fairly surprising really, when there are
unstaged modifications to files.

Probably this is rarely noticed because `git-annex add` is used to add a
new version of a file, and then it's staged. Or `git mv` is used to move
a file, rather than `mv` of a file over top of an existing file. So it's
uncommon to have an unstaged annexed file in a worktree.

It might be worth making things more consistent, but that's out of scope
for what I'm working on currently.

Also, I anticipate that supporting unlocked files with recompute will
require it to stage changes anyway.

So, make recompute stage the new version of the file.

I considered having recompute refuse to overwrite an existing staged
file. After all, whatever version was staged before will get lost when
the new version is staged over top of it. But, that's no different than
`git-annex addcomputed` being run with the name of an existing staged
file. Or `git-annex add` being run with a new file content when there is
an existing staged file. Or, for that matter, `git add` being ran with a
new content when there is an existing staged file.
2025-03-12 13:42:00 -04:00
Joey Hess
21b45da406
todo 2025-03-12 12:11:39 -04:00
Joey Hess
0712ae020c
fix recompute --reproducible run on a VURL key
This avoids "Cannot generate a key for backend VURL", and makes it use
the usual hashing backend.
2025-03-12 11:48:29 -04:00
Joey Hess
0f998f0698
improve 2025-03-11 12:54:34 -04:00
Joey Hess
ea9a79ae81
comment 2025-03-11 12:53:32 -04:00
Joey Hess
02c894958b
Merge branch 'master' of ssh://git-annex.branchable.com 2025-03-11 12:42:10 -04:00
Joey Hess
5f269513af
buffer responses to compute programs in a TQueue
This avoids a potential problem where the program sends several INPUT
before reading responses, so flushing the respose to the pipe could
block. It's unlikely, but seemed worth making sure it can't happen.
2025-03-11 12:40:21 -04:00
Joey Hess
0ee644b417
close off newline injection attacks against compute special remote protocol 2025-03-11 12:04:58 -04:00
Joey Hess
73a8ba5307
update 2025-03-11 11:53:14 -04:00
Joey Hess
5760a15c7c
avoid error on missing compute state in checkKey
This improves eg `git-annex move --to` a compute remote that does not
contain the key. Rather than erroring with "Missing compute state" when
it checks if the key is in the remote, it proceeds to trying to store to
it, which has a nice error message.
2025-03-11 11:49:47 -04:00
Joey Hess
0477a8d098
add INPUT-REQUIRED
Used by git-annex-compute-singularity to make addcomputed --fast work.

Also, simplified git-annex-compute-singularity; there is no need to hard
link the container into place. singularity does not care about the
extension of the container, so can just pass it the annex object file.
2025-03-11 11:46:31 -04:00
yarikoptic
89534f2890 Added a comment: just thinking out loud 2025-03-11 15:15:15 +00:00
Joey Hess
bb0bc078fc
Merge branch 'master' of ssh://git-annex.branchable.com 2025-03-11 11:13:21 -04:00
Joey Hess
b02aca8627
reorg and expand security section 2025-03-11 11:12:59 -04:00
yarikoptic
cb9c79c26c Added a comment 2025-03-11 15:09:20 +00:00
Joey Hess
a9df446d5d
expand 2025-03-10 17:35:34 -04:00
Joey Hess
106373c53b
response 2025-03-10 16:46:55 -04:00
Joey Hess
24b6f50b79
Merge branch 'master' of ssh://git-annex.branchable.com 2025-03-10 16:42:24 -04:00
Joey Hess
e0b7653495
added git-annex-compute-singularity
And implemented SANDBOX, which it needs.
2025-03-10 16:41:26 -04:00
Joey Hess
657ff9a32e
compute protocol debugging 2025-03-10 15:14:59 -04:00
Joey Hess
7bda5f470c
document output files must be regular files 2025-03-10 14:15:07 -04:00
Joey Hess
f59c0d1f07
make usage an error 2025-03-10 14:13:32 -04:00
Joey Hess
9d9e34c187
compute: disallow output files that are not regular files
Use case where this came up is a compute program using singularity,
where the process inside the container will be allowed to write to the temp
directory, so could make eg a /etc/shadow symlink, which could then be
used to exfiltrate that from the system to wherever the annex object
might be pushed to.

It seemed better to fix this once in git-annex rather than in any such
compute program.
2025-03-10 12:55:03 -04:00
yarikoptic
f36da19adb Added a comment 2025-03-09 01:02:55 +00:00
yarikoptic
1e6324c179 Added a comment: Any way to annotate what are input files? 2025-03-08 14:51:20 +00:00
Joey Hess
9d6c052c27
symlink, don't hardlink
hardlink can cause problems with unlocked files
2025-03-07 17:15:54 -04:00
Joey Hess
45d7f3ca4b
disconnect stdio for wasm binaries 2025-03-07 17:15:21 -04:00
Joey Hess
18be4910d8
use pwd and quote it
Seems more portable and safe
2025-03-07 16:06:37 -04:00
Joey Hess
5ef1c44e07
case 2025-03-07 16:03:35 -04:00
Joey Hess
10e36759bf
layout 2025-03-07 16:03:09 -04:00
Joey Hess
dcd7c207a8
layout 2025-03-07 16:02:43 -04:00
Joey Hess
2391c2802a
add git-annex-compute-wasmedge 2025-03-07 16:02:11 -04:00
Joey Hess
ed51924211
redirect command stdout to stderr
Otherwise it will be interpreted as compute program protocol
2025-03-07 16:01:27 -04:00
Joey Hess
2c6dce83de
make OUTPUT subdirs
Simplifies compute programs.
2025-03-07 14:57:12 -04:00
Joey Hess
b4becb7167
Merge branch 'master' of ssh://git-annex.branchable.com 2025-03-07 14:50:11 -04:00
Joey Hess
81ce4264df
compute: add response to OUTPUT
This allows rejecting output filenames that are outside the repository,
and also handles converting eg "-foo" to "./-foo" to prevent a command
that it's passed to interpreting the output filename as a dashed option.
2025-03-07 14:47:34 -04:00
Joey Hess
6a8e57f0e9
remove todo I just added
If a compute program does this, it has a security hole. Not git-annex.
2025-03-07 13:29:57 -04:00
Joey Hess
78045f8e4f
todo 2025-03-07 13:24:11 -04:00