Commit graph

2349 commits

Author SHA1 Message Date
Joey Hess
d6fe7fdd7d
rekey: No longer copies over urls from the old to the new key.
It makes sense for migrate to do that, but not for this low-level (and
little used) plumbing command to.
2016-01-07 18:06:20 -04:00
Joey Hess
0b59fb423e
migrate: Copy over metadata to new key. 2016-01-07 14:21:12 -04:00
Joey Hess
03cb2c8ece
unused: Bug fix when a new file was added to the annex, and then removed (but not git rmed). git still has the add staged in this case, so the content should not be unused and was wrongly treated as such.
So, we need to look at both the file on disk to see if it's a annex link,
and the file in the index too. lookupFile doesn't look in the index if the file
is not present on disk.
2016-01-06 16:49:41 -04:00
Joey Hess
d667a68b7e
test: Added --keep-failures option. 2016-01-06 13:44:12 -04:00
Joey Hess
b96cfdc094
whereis --json: Make url list be included in machine-parseable form. 2016-01-06 12:33:32 -04:00
Yaroslav Halchenko
bfb68c2245
BF: added forgotten commas for new build-depends 2016-01-05 12:01:35 -04:00
Joey Hess
121659576b
info --json: Improve json for "backend usage", using a nested object with fields for each backend instead of the previous weird nested lists. This may break existing parsers of this json output, if there were any. 2016-01-01 16:33:05 -04:00
Joey Hess
09a2fcb643
info: Fix "backend usage" numbers, which were counting present keys twice.
Let's just count the referenced keys for that, and not present keys at all.
2016-01-01 16:13:16 -04:00
Joey Hess
4eab4bdb01
started working on testing v6 unlocked files
Many failures.
2016-01-01 14:04:43 -04:00
Joey Hess
441573a92b
support building with BUILDER=stack to use stack instead of cabal 2015-12-28 14:18:47 -04:00
Joey Hess
ee8113959a
point to bug report 2015-12-28 13:40:00 -04:00
Joey Hess
cdad377ef1
Debian: Adjust build dependencies for webapp, DAV.
Now available on mips, mipsel, but temporarily removed armel since build is
failing there.

If armel would just get caught up, I could remove the per-arch specs
entirely.

Maybe time to turn maint of this over to richih?
2015-12-28 12:57:15 -04:00
Joey Hess
121f5d5b0c
annex.thin
Decided it's too scary to make v6 unlocked files have 1 copy by default,
but that should be available to those who need it. This is consistent with
git-annex not dropping unused content without --force, etc.

* Added annex.thin setting, which makes unlocked files in v6 repositories
  be hard linked to their content, instead of a copy. This saves disk
  space but means any modification of an unlocked file will lose the local
  (and possibly only) copy of the old version.
* Enable annex.thin by default on upgrade from direct mode to v6, since
  direct mode made the same tradeoff.
* fix: Adjusts unlocked files as configured by annex.thin.
2015-12-27 15:59:59 -04:00
Joey Hess
bb6719678e
update walkthrough and add tip about using v6 unlocked files
The walkthrough should make sense now both for v5 and v6 repo users.
2015-12-26 16:47:23 -04:00
Joey Hess
41b2caa5f6
reword 2015-12-26 13:06:53 -04:00
Joey Hess
87f0708f88
persistent-sqlite is now a hard build dependency, since v6 repository mode needs it. 2015-12-26 13:00:52 -04:00
Joey Hess
39048e4568
Merge branch 'master' into smudge 2015-12-22 18:10:40 -04:00
Joey Hess
a82b7d0044
update 2015-12-22 18:04:43 -04:00
Joey Hess
2dce8081a6
addurl: Added --with-files option. 2015-12-22 12:20:39 -04:00
Joey Hess
ca2c977704
wip v6 support for assistant
Files are not yet added to v6 repos in unlocked mode.
2015-12-21 18:41:15 -04:00
Joey Hess
d82b110da8
Merge branch 'master' into smudge 2015-12-21 17:12:46 -04:00
Joey Hess
a8b398c1fa
addurl: Added --batch option. 2015-12-21 12:57:13 -04:00
Joey Hess
35827e2705
status: On crippled filesystems, was displaying M for all annexed files that were present. Probably caused by a change to what git status displays in this situation. Fixed by treating files git thinks are modified the same as typechanged files. 2015-12-19 13:36:40 -04:00
Joey Hess
f1a73de560
prep release 2015-12-18 12:09:55 -04:00
Joey Hess
029111b89a
Merge branch 'master' into smudge 2015-12-16 13:07:46 -04:00
Joey Hess
96dd0f4ebe
improve temp dir security
http://bugs.debian.org/807341

* Fix insecure temporary permissions when git-annex repair is used in
  in a corrupted git repository.

  Other calls to withTmpDir didn't leak any potentially private data,
  but repair clones the git repository to a temp directory which is made
  using the user's umask. Thus, it might expose a git repo that is
  otherwise locked down.

* Fix potential denial of service attack when creating temp dirs.

  Since withTmpDir used easily predictable temporary directory names,
  an attacker could create foo.0, foo.1, etc and as long as it managed to
  keep ahead of it, could prevent it from ever returning.

  I'd rate this as a low utility DOS attack. Most attackers in a position
  to do this could just fill up the disk /tmp is on to prevent anything
  from writing temp files. And few parts of git-annex use withTmpDir
  anyway, so DOS potential is quite low.

Examined all callers of withTmpDir and satisfied myself that
switching to mkdtmp and so getting a mode 700 temp dir wouldn't break any
of them.

Note that withTmpDirIn continues to not force temp dir to 700.
But it's only used for temp directories inside .git/annex/wherever/
so that is not a problem.

Also re-audited all other uses of temp files and dirs in git-annex.
2015-12-15 20:21:48 -04:00
Joey Hess
7d0e79b9e1
Use git-annex init --version=6 to get v6 for now
Not ready to make it default because of the direct mode upgrade needing to
all happen at once.
2015-12-15 17:17:13 -04:00
Joey Hess
3ba6d84559
clarify 2015-12-15 14:18:44 -04:00
Joey Hess
8a660a7b14
add: In v6 mode, acts on modified files.
Same as was done in direct mode, except in v6 mode add always adds files
locked, so
2015-12-15 14:17:00 -04:00
Joey Hess
f5d4ee9b63
Merge branch 'master' into smudge 2015-12-15 12:01:21 -04:00
Joey Hess
04e00146ed
Debian: Build depend on concurrent-output.
In unstable now.
2015-12-12 12:19:31 -04:00
Joey Hess
c608a752a5
Merge branch 'master' into smudge 2015-12-11 13:50:31 -04:00
Joey Hess
abd66c7089
fsck: Failed to honor annex.diskreserve when checking a remote. 2015-12-11 13:50:27 -04:00
Joey Hess
0f126440ca
webdav: When testing the WebDAV server, send a file with content. The empty file it was sending tickled bugs in some php WebDAV server. 2015-12-11 12:13:20 -04:00
Joey Hess
e2c8dc6778
v6 git-annex unlock
Note that the implementation uses replaceFile, so that the actual
replacement of the work tree file is atomic. This seems a good property to
have!

It would be possible for unlock in v6 mode to be run on files that do not
have their content present. However, that would be a behavior change from
before, and I don't see any immediate need to support it, so I didn't
implement it.
2015-12-10 16:12:48 -04:00
Joey Hess
3d936fdb59
Merge branch 'master' into smudge 2015-12-10 14:07:11 -04:00
Joey Hess
a0528db092
Add S3 features to git-annex version output. 2015-12-10 11:42:49 -04:00
Joey Hess
3719d1b390
make clear when code is using deprecated direct mode files 2015-12-09 19:43:15 -04:00
Joey Hess
bf98d2bd77
Merge branch 'master' into smudge 2015-12-09 17:58:59 -04:00
Joey Hess
e74e612945
prep release 2015-12-08 11:14:28 -04:00
Joey Hess
63c466449f
wording 2015-12-07 12:30:10 -04:00
Joey Hess
62a2fba1cd
Merge branch 'master' into smudge 2015-12-07 12:29:34 -04:00
Joey Hess
2936153fc4
fix temp filename
Was not putting it inside the temp dir, but next to it!

This was just wrong, and it led to a longer filename that desired being
used, leading to some bug reports.
2015-12-06 16:54:01 -04:00
Joey Hess
2fe21d47c5
init: Configure .git/info/attributes to use git-annex as a smudge filter.
Note that this changes the default behavior of git add in a newly
initialized repository; it will add files to the annex.

Don't like that this could break workflows, but it's necessary in order for
any pointer files in the repo to be handled by git-annex.
2015-12-04 17:57:15 -04:00
Joey Hess
ccc49861ca
add v6; keep v5 working for now and manual upgrade
Since all places where a repo is used in direct mode need to have git-annex
upgraded before the repo can safely be converted to v6, the upgrade needs
to be manual for now.

I suppose that at some point I'll want to drop all the direct mode support
code. At that point, will stop supporting v5, and will need to auto-upgrade
any remaining v5 repos. If possible, I'd like to carry the direct mode
support for say, a year or so, to give people plenty of time to upgrade and
avoid disruption.
2015-12-04 16:14:48 -04:00
Joey Hess
37a5e2d419
dropunused: Make more robust when trying to drop an object that has already been dropped.
Before it crashed trying to lock the not-present content and prevented
dropping anything else. Instead, succeed.
2015-12-03 15:58:00 -04:00
Joey Hess
e9f43c07f9
webapp: Fix bugs that could result in a relative path such as "." being written to ~/.config/git-annex/autostart
and ignore any such  relative paths in the file

This was a reversion caused by the relative path changes in 5.20150113.
2015-12-02 15:57:30 -04:00
Joey Hess
f16e235983
addurl, importfeed: Changed to honor annex.largefiles settings, when the content of the url is downloaded. (Not when using --fast or --relaxed.)
importfeed just calls addurl functions, so inherits this from it.

Note that addurl still generates a temp file, and uses that key to download
the file. It just adds it to the work tree at the end when the file is small.
2015-12-02 15:12:33 -04:00
Joey Hess
dc8099872a
import: Changed to honor annex.largefiles settings. 2015-12-02 14:49:03 -04:00
Joey Hess
f7d63a0117
tahoe: Include tahoe capabilities in whereis display. 2015-11-30 15:35:53 -04:00