Commit graph

2181 commits

Author SHA1 Message Date
Joey Hess
df5823cea0
update 2018-08-13 17:29:33 -04:00
Joey Hess
bc7d431a6a
status 2018-08-13 16:37:23 -04:00
Joey Hess
147a793f4b
one way to use this 2018-08-09 18:22:21 -04:00
Joey Hess
a96972015d
massive v6 add speed/memory improvement
v6 add: Take advantage of improved SIGPIPE handler in git 2.5 to speed up
the clean filter by not reading the file content from the pipe. This also
avoids git buffering the whole file content in memory.

When built with an older git, still consumes stdin. If built with a newer
git and used with an older one, it breaks, but that's acceptable --
checking the git version every time would make repeated smudge runs slow.

This commit was supported by the NSF-funded DataLad project.
2018-08-09 18:17:46 -04:00
Joey Hess
38ddd6072d
addurl: Include filename in --json-progress output when known. 2018-08-06 12:53:44 -04:00
Joey Hess
5c5259db7c
followup 2018-08-06 11:56:55 -04:00
Joey Hess
634aefebd4
comment 2018-08-06 11:54:03 -04:00
Joey Hess
df72b2584a
already implmeneted 2018-08-06 11:29:22 -04:00
yarikoptic
c3f366448a initial expression of the desire 2018-08-04 03:20:48 +00:00
Joey Hess
ae11394efa
added annex.commitmessage
Added annex.commitmessage config that can specify a commit message for the
git-annex branch instead of the usual "update".

This commit was supported by the NSF-funded DataLad project.
2018-08-02 14:06:06 -04:00
Joey Hess
50620efe85
thought 2018-08-02 13:47:50 -04:00
Joey Hess
18aa931a44
followup 2018-08-02 13:43:44 -04:00
Joey Hess
35dbf231d8
response 2018-08-02 13:31:22 -04:00
Joey Hess
2884637cab
S3: Support credential-less download from remotes configured with public=yes exporttree=yes.
This commit was supported by the NSF-funded DataLad project.
2018-07-31 16:32:43 -04:00
Joey Hess
903b10e2b2
add todo 2018-07-31 13:05:04 -04:00
yarikoptic
a206f933fe Added a comment 2018-07-31 14:27:17 +00:00
yarikoptic
c70e757f2b Added a comment: size 2018-07-31 14:19:16 +00:00
RonnyPfannschmidt
5b711ac4f1 Added a comment 2018-07-29 21:41:56 +00:00
RonnyPfannschmidt
ef64e71f76 2018-07-29 20:29:23 +00:00
CandyAngel
6bf0c3ee14 2018-07-18 17:06:19 +00:00
Joey Hess
cc2cb46857
unused --from: Allow specifiying a repository by uuid or description.
This commit was sponsored by Jake Vosloo on Patreon.
2018-07-11 16:01:35 -04:00
uli@8484a70fbfd489faef5f72c230d340b01e2676ca
32df7fca23 2018-07-11 14:07:24 +00:00
Joey Hess
66cb41b0b3
thought 2018-07-09 14:38:34 -04:00
Joey Hess
13c853bda1
dealing with race conditions in import tree design
I seem to be down to a race no worse than one in git, which seems good
enough.

This commit was sponsored by Trenton Cronholm on Patreon.
2018-07-09 14:05:34 -04:00
anarcat
a93a8f254e Added a comment 2018-07-06 16:48:29 +00:00
Joey Hess
87507722cb
comment 2018-07-06 12:38:41 -04:00
anarcat
801154149a Added a comment: some docs 2018-07-06 01:44:08 +00:00
anarcat
445cc79fc8 Added a comment: apologies 2018-07-05 15:56:27 +00:00
Joey Hess
49cc94f61f
add docs about p2p --pair being broken in old versions 2018-07-05 11:52:52 -04:00
Joey Hess
749d5115fe
response 2018-07-04 12:24:09 -04:00
anarcat
5b2bbaaa18 Added a comment: some further considerations 2018-07-04 02:17:50 +00:00
Joey Hess
8a201c5cc4
close 2018-07-03 12:29:57 -04:00
Joey Hess
a63bbd868b
make addurl of media url fail when youtube-dl is disabled
addurl: When security configuration prevents downloads with youtube-dl,
still check if the url is one that it supports, and fail downloading it,
instead of downloading the raw web page.
2018-06-28 13:01:18 -04:00
Joey Hess
b091dac130
note for later 2018-06-26 12:10:09 -04:00
Joey Hess
3160cadba3 git-annex version 6.20180626
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKKUAw1IH6rcvbA8l2xLbD/BfjzgFAlstCaQACgkQ2xLbD/Bf
 jzh5nxAAn7D9soTI0ex6AVDDo2CjOyTTDVrIcl2h5XizfuUD3ev5P0TR3BZmzpAb
 MI6uaZ8kxqZ/eGAsBTyH9PsV7QVYIdht9t89ytP4xWyTQiOgjyJeA6PnJl4zVK9z
 Y8Of3mlylaz+97+sndljp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wrkdXb
 +FXgb7N5Sa4+eVDNUf4rxldtLPX53nrtZ3IqrGiCWApCvbysNyP5kE0nix02l9z2
 xzY2vlpicx7TOMoO9mZesSFNgRzuFAbbya/zDJrz+xfgSRYXRYg58yTpmhpTFvSI
 h3Fw6+MYvehvRdAweLtoQt2p/UV2MAWrTpNzFoqgf2OCQOiH97ACDHn8Yki9rnQi
 NuMsqv9WOYQs4SaygDZMKemgAxftf3uaXiBW0RzHHwwWnDjHhqsEioOvOhNNyZbz
 U3OjKrH1JZlkNHlIBQD4BsWGLlIct66ZTU3k2OxPEp+mpEG/Xi4=
 =p+cW
 -----END PGP SIGNATURE-----

Merge tag '6.20180626' - previously embargoed security release
2018-06-25 21:56:43 -04:00
Joey Hess
28720c795f
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.

* Added annex.security.allowed-url-schemes setting, which defaults
  to only allowing http and https URLs. Note especially that file:/
  is no longer enabled by default.

* Removed annex.web-download-command, since its interface does not allow
  supporting annex.security.allowed-url-schemes across redirects.
  If you used this setting, you may want to instead use annex.web-options
  to pass options to curl.

With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)

Used curl --proto to limit the allowed url schemes.

Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.

youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.

Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.

This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.

The related problem of accessing private localhost and LAN urls is not
addressed by this commit.

This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-16 11:57:50 -04:00
andrew@2e5aa03dfdc624af77a5957dd345d28430342a9c
785cb276f0 posted issue 2018-06-15 22:23:58 +00:00
Joey Hess
e592635fe6
improve wording 2018-06-14 17:14:13 -04:00
Joey Hess
690bb303f9
more thoughts 2018-06-14 14:00:49 -04:00
Joey Hess
3f80aaea3d
some open questions 2018-06-14 13:42:25 -04:00
Joey Hess
466d3fbaab
more thoughts 2018-06-14 13:30:34 -04:00
Joey Hess
8b734da876
thoughts 2018-06-14 12:32:18 -04:00
Joey Hess
0f566ed242
removal of the rest of remoteGitConfig
In keyUrls, the GitConfig is used only by annexLocations
to support configured Differences. Since such configurations affect all
clones of a repository, the local repo's GitConfig must have the same
information as the remote's GitConfig would have. So, used getGitConfig
to get the local GitConfig, which is cached and so available cheaply.

That actually fixed a bug noone had ever noticed: keyUrls is
used for remotes accessed over http. The full git config of such a
remote is normally not available, so the remoteGitConfig that keyUrls
used would not have the necessary information in it.

In copyFromRemoteCheap', it uses gitAnnexLocation,
which does need the GitConfig of the remote repo itself in order to
check if it's crippled, supports symlinks, etc. So, made the
State include that GitConfig, cached. The use of gitAnnexLocation is
within a (not $ Git.repoIsUrl repo) guard, so it's local, and so
its git config will always be read and available.

(Note that gitAnnexLocation in turn calls annexLocations, so the
Differences config it uses in this case comes from the remote repo's
GitConfig and not from the local repo's GitConfig. As explained above
this is ok since they must have the same value.)

Not very happy with this mess of different GitConfigs not type-safe and
some read only sometimes etc. Very hairy. Think I got it this change
right. Test suite passes..

This commit was sponsored by Ethan Aubin.
2018-06-05 14:48:37 -04:00
Joey Hess
a5f598a6aa
remove use of remoteGitConfig
Unfortunately one more use remains..

This should be just as fast as the other method. The remote's Git.Repo
has already had its config read, so Annex.new's call to Git.Config.read
is a noop.

Thid commit was sponsored by andrea rota.
2018-06-05 13:15:04 -04:00
Joey Hess
fc5888300f
fix annex-checkuuid
Fixed annex-checkuuid implementation, so that remotes configured that way
can be used. This was 100% broken from the first commit of it, oops.

This commit was sponsored by Øyvind Andersen Holm.
2018-06-04 16:52:22 -04:00
RonnyPfannschmidt
c197077e89 Added a comment: the remote im working on 2018-06-04 07:51:57 +00:00
Joey Hess
0c803eee71
list all (non-archived) done bugs, not only most recent 10 2018-05-31 11:48:53 -04:00
Joey Hess
2c8da1432f
comment 2018-05-29 13:01:24 -04:00
unqueued
5300386c2b Added a comment 2018-05-28 14:55:34 +00:00
https://christian.amsuess.com/chrysn
6620c1704a Added a comment: append-only and gitolite 2018-05-28 11:47:14 +00:00
Joey Hess
940444994e
idea 2018-05-25 16:13:13 -04:00
Joey Hess
85f9360d9b
GIT_ANNEX_SHELL_APPENDONLY
Makes it allow writes, but not deletion of annexed content. Note that
securing pushes to the git repository is left up to the user.

This commit was sponsored by Jack Hill on Patreon.
2018-05-25 13:17:56 -04:00
Joey Hess
15129bac9b
2018 update 2018-05-23 15:44:29 -04:00
Joey Hess
41cf6f3d17
followup 2018-05-22 15:57:59 -04:00
yarikoptic
834d3dfff0 just rewording the desire of the master to have a discussion 2018-05-22 17:26:12 +00:00
sorsasampo@35b3d76c4c73ffc3f2c89e965c47a3f6a2721228
38caaee8fc 2018-05-20 03:45:06 +00:00
CandyAngel
4156c13221 Added a comment 2018-05-17 20:15:14 +00:00
anarcat
8f226fb7bd cross-ref with append-only 2018-05-17 18:15:14 +00:00
anarcat
990bb3085e another untrusted client idea 2018-05-17 18:14:17 +00:00
anarcat
e753c7de4f update: git repo now available. the previous paste expired, sorry about that. 2018-05-17 18:06:40 +00:00
anarcat
fce32e6cd4 /dev/random is not necessary in git-annex 2018-05-17 17:38:41 +00:00
Joey Hess
d135705b32
close 2018-05-15 12:03:43 -04:00
Joey Hess
60780a8605
close since anarcat thinks inprogress is good enough 2018-05-15 12:01:30 -04:00
Joey Hess
fbfb2b85ec
close 2018-05-15 12:00:50 -04:00
Joey Hess
c0ffd02ac5
close almost all old Android app bug reports
The old git-annex Android app is now deprecated in favor of running
git-annex in termux. I suspect all or nearly all of these no longer apply.

This commit was sponsored by Jochen Bartl on Patreon.
2018-05-08 15:00:46 -04:00
Joey Hess
d1961e4498
back out incorrect IO interleaving change
Fix regression in last release that crashes when using --all or running
git-annex in a bare repository. May have also affected git-annex unused and
git-annex info.

Reversed the order of the (++) in Annex.Branch.files so --all will stream
lazily still when there are not a bunch of uncommitted journal files.
Added a todo to maybe improve this later.

This commit was sponsored by Trenton Cronholm on Patreon.
2018-05-08 13:54:42 -04:00
Joey Hess
393fc79d58
comment 2018-04-30 16:12:33 -04:00
anarcat
488e127e97 this is basically what inprogress does, except it doesn't depend on xdg-open. at least basic functionality to do what i want is there, thanks! 2018-04-29 12:32:43 +00:00
yarikoptic
5c977d0cf6 initial whining about no support for ~/.netrc 2018-04-28 01:20:42 +00:00
Joey Hess
f5df6244f3
deal with getMounts crashing on android 2018-04-25 17:42:27 -04:00
Joey Hess
f22a8c3485
update 2018-04-25 16:58:12 -04:00
Joey Hess
9807e5bead
fix webapp opening in termux
Open real url not html shim since android and file:// urls is a nasty
kettle of fish.

This commit was sponsored by John Pellman on Patreon.
2018-04-25 14:38:42 -04:00
Joey Hess
b0df331b4a
adjust webapp paths when run in termux on Android
And display the special case Android UI
2018-04-25 14:17:52 -04:00
Joey Hess
118ed8f92b
runshell: hacks for termux; add tip
Added some tweaks to make git-annex work in termux on Android. The regular
arm standalone tarball now works in termux.

I guess the test for "$base/bin/git" is not really necessary, since it
tests for git-annex. Since that gets deleted on android, removed that test.

These are pretty hackish hacks, especially adding it to PATH. The goal is
to make it work well enough out of the box on Android.

This commit was sponsored by Eric Drechsel on Patreon.
2018-04-25 13:48:37 -04:00
Joey Hess
3753c07204
update 2018-04-25 11:19:59 -04:00
Joey Hess
5a01ebe036
update 2018-04-24 21:28:08 -04:00
Joey Hess
43b4e80bf5
update 2018-04-24 21:22:20 -04:00
Joey Hess
ec7262bb87
notes 2018-04-24 19:53:24 -04:00
Joey Hess
6b68813988
OMG 2018-04-24 19:04:07 -04:00
Joey Hess
c34152777b
Use http-conduit for url downloads by default, annex.web-options enables curl
* For url downloads, git-annex now defaults to using a http library,
  rather than wget or curl. But, if annex.web-options is set, it will
  use curl. To use the .netrc file, run:
    git config annex.web-options --netrc
* git-annex no longer uses wget (and wget is no longer shipped with
  git-annex builds).

Note that curl is always run in silent mode, since the new API for
download has a MeterUpdate and doesn't make way for curl progress
output. It might be worth writing a parser for curl's progress output
to update the meter when using it, but I didn't bother with this edge
case for now.

This commit was supported by the NSF-funded DataLad project.
2018-04-06 17:36:20 -04:00
Joey Hess
0f6775f1ff
refactor sinkResponseFile and add downloadC
Remote.S3 and Remote.Helper.Http both had similar code to sink a
http-conduit Response to a file; refactor out sinkResponseFile.

downloadC downloads an url to a file using http-conduit, and supports
resuming. Falls back to curl to handle urls that http-conduit does not
support. This is not used yet, but the goal is to replace download with
it.

git-annex.cabal: conduit-extra was not actually used for a long time,
remove the dep. conduit moves into the main dependency list, but since
http-conduit was already in there, and it depends on conduit, that's not
really adding a new build dep.

This commit was supported by the NSF-funded DataLad project.
2018-04-06 16:07:08 -04:00
Joey Hess
9b98d3f630
better HTTP connection reuse
Enable HTTP connection reuse across multiple files, when git-annex
uses http-conduit. Before, a new Manager was created each time
Utility.Url used it. Now, a single Manager gets created the first time,
so connections are reused.

Doesn't help when external programs are used for url download,
but does speed up addurl --fast, fsck --from web, etc.

Testing fsck --fast --from web with 3 files, over high-latency
satellite internet, it sped up from 19.37s to 14.96s.

This commit was supported by the NSF-funded DataLad project.
2018-04-04 15:39:40 -04:00
Joey Hess
0783352fae
todo 2018-04-04 14:32:32 -04:00
Joey Hess
ae75eb06bc
exporttree support for adb special remote
This commit was sponsored by Michael Magin.
2018-03-27 16:28:41 -04:00
Joey Hess
2927618d35
Added adb special remote which allows exporting files to Android devices.
git annex testremote passes.

exportree not implemented yet, although the documentation talks about it,
since it will be the main way this remote will be used.

The adb push/pull progress is displayed for now; it would be better
to consume it and use it to update the git-annex progress bar.

This commit was sponsored by andrea rota.
2018-03-27 14:54:41 -04:00
Joey Hess
abffea5fcb
update 2018-03-21 09:19:06 -04:00
Joey Hess
1cf705d416
idea 2018-03-21 03:19:47 -04:00
Joey Hess
0ae2662f71
ideas 2018-03-21 02:25:53 -04:00
vrs+annex@ea5fa24dbb279be61a8e50adb638bf8366300717
ae462950a9 Added a comment: related bugs 2018-03-17 19:06:46 +00:00
Joey Hess
050ada746f
Added backends for the BLAKE2 family of hashes.
There are a lot of different variants and sizes, I suppose we might as well
export all the common ones.

Bump dep to cryptonite to 0.16, earlier versions lacked BLAKE2 support.
Even android has 0.16 or newer.

On Debian, Blake2bp_512 is buggy, so I have omitted it for now.
http://bugs.debian.org/892855

This commit was sponsored by andrea rota.
2018-03-13 16:23:42 -04:00
Joey Hess
0ceb6da0fa
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-13 15:08:28 -04:00
Joey Hess
4015c5679a
force verification when resuming download
When resuming a download and not using a rolling checksummer like rsync,
the partial file we start with might contain garbage, in the case where a
file changed as it was being downloaded. So, disabling verification on
resumes risked a bad object being put into the annex.

Even downloads with rsync are currently affected. It didn't seem worth the
added complexity to special case those to prevent verification, especially
since git-annex is using rsync less often now.

This commit was sponsored by Brock Spratlen on Patreon.
2018-03-13 14:50:49 -04:00
Joey Hess
31e1adc005
deal with unlocked files
P2P protocol version 1 adds VALID|INVALID after DATA; INVALID means the
file was detected to change content while it was being sent and so we
may not have received the valid content of the file.

Added new MustVerify constructor for Verification, which forces
verification even when annex.verify=false etc. This is used when INVALID
and in protocol version 0.

As well as changing git-annex-shell p2psdio, this makes git-annex tor
remotes always force verification, since they don't yet use protocol
version 1. Previously, annex.verify=false could skip verification when
using tor remotes, and let bad data into the repository.

This commit was sponsored by Jack Hill on Patreon.
2018-03-13 14:27:14 -04:00
https://openid.stackexchange.com/user/3ee5cf54-f022-4a71-8666-3c2b5ee231dd
7ea75e1132 Added a comment: How expensive is verification anyway? 2018-03-13 17:58:19 +00:00
Joey Hess
9930b1f140
a plan 2018-03-13 12:17:24 -04:00
Joey Hess
abe8346dca
response 2018-03-12 17:49:06 -04:00
Joey Hess
ad13b56c86
Merge branch 'master' of ssh://git-annex.branchable.com 2018-03-12 17:33:37 -04:00
Joey Hess
59e7f3cbb2
done for the day 2018-03-12 17:32:57 -04:00
Joey Hess
24f35f6acc
remove todo about assistant and network change
When the assistant detects a network change, it
stops using old git-annex transferkeys processes.
So, no problem that old git-annex-shell p2pstdio
connections are cached; they won't be reused after
network change.
2018-03-12 17:24:40 -04:00
Joey Hess
b654597c2f
urk, this is hard 2018-03-12 17:24:18 -04:00