Joey Hess [Wed, 16 Dec 2015 17:52:43 +0000 (13:52 -0400)]
reorder database shutdown to be concurrency safe
If a DbHandle is in use by another thread, it could be queueing changes
while shutdown is running. So, wait for the worker to finish before
flushing the queue, so that any last-minute writes are included. Before
this fix, they would be silently dropped.
Of course, if the other thread continues to try to use a DbHandle once it's
closed, it will block forever as the worker is no longer reading from the
jobs MVar. So, that would crash with
"thread blocked indefinitely in an MVar operation".
Joey Hess [Wed, 16 Dec 2015 17:24:45 +0000 (13:24 -0400)]
comment
Joey Hess [Wed, 16 Dec 2015 17:14:18 +0000 (13:14 -0400)]
pass --version to init when needed
Joey Hess [Wed, 16 Dec 2015 17:07:46 +0000 (13:07 -0400)]
Merge branch 'master' into smudge
Joey Hess [Wed, 16 Dec 2015 00:50:52 +0000 (20:50 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 16 Dec 2015 00:42:35 +0000 (20:42 -0400)]
bring back some deleted functions that git-repair uses
Joey Hess [Wed, 16 Dec 2015 00:20:37 +0000 (20:20 -0400)]
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.
Joey Hess [Tue, 15 Dec 2015 21:19:26 +0000 (17:19 -0400)]
starting to work on test suite for v6
Joey Hess [Tue, 15 Dec 2015 21:17:13 +0000 (17:17 -0400)]
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.
Joey Hess [Tue, 15 Dec 2015 20:18:39 +0000 (16:18 -0400)]
in v6 mode, unannex does not interact badly with pre-commit hook
So can be used in a tree with staged changes, no problems. Much nicer.
Joey Hess [Tue, 15 Dec 2015 20:10:48 +0000 (16:10 -0400)]
recent fsck changes caused ugly message when object was not present
Joey Hess [Tue, 15 Dec 2015 20:07:02 +0000 (16:07 -0400)]
update todo list
Joey Hess [Tue, 15 Dec 2015 19:56:37 +0000 (15:56 -0400)]
implemented upgrade of direct mode repo to v6
Joey Hess [Tue, 15 Dec 2015 19:34:28 +0000 (15:34 -0400)]
reorg
Joey Hess [Tue, 15 Dec 2015 18:27:20 +0000 (14:27 -0400)]
changes for v6 broke fsck in direct mode
Joey Hess [Tue, 15 Dec 2015 18:18:44 +0000 (14:18 -0400)]
clarify
Joey Hess [Tue, 15 Dec 2015 18:17:34 +0000 (14:17 -0400)]
doc update
Joey Hess [Tue, 15 Dec 2015 18:17:00 +0000 (14:17 -0400)]
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
Joey Hess [Tue, 15 Dec 2015 18:14:19 +0000 (14:14 -0400)]
fix incorrect doc change
Joey Hess [Tue, 15 Dec 2015 18:09:36 +0000 (14:09 -0400)]
avoid pre-commit check having to do with v5 unlocked files when in v6 mode
Joey Hess [Tue, 15 Dec 2015 18:08:07 +0000 (14:08 -0400)]
rename stuff for v5 unlocked files to indicate it's old
Joey Hess [Tue, 15 Dec 2015 18:07:54 +0000 (14:07 -0400)]
update doc for v6
Joey Hess [Tue, 15 Dec 2015 18:02:53 +0000 (14:02 -0400)]
add: no need to make pass for old unlocked files in v6
Joey Hess [Tue, 15 Dec 2015 17:06:52 +0000 (13:06 -0400)]
have clean filter check if the filename was already in use by an old key
The annex object for it may have been modified due to hard link, and
that should be cleaned up when the new version is added. If another
associated file has the old key's content, that's linked into the annex
object. Otherwise, update location log to reflect that content has been
lost.
Joey Hess [Tue, 15 Dec 2015 17:05:23 +0000 (13:05 -0400)]
add getAssociatedKey
I guess this is just as efficient as the getAssociatedFiles query, but I
have not tried to optimise the database yet.
Joey Hess [Tue, 15 Dec 2015 17:02:33 +0000 (13:02 -0400)]
update inode cache to cover file even when nothing needs to be done to linkAnnex
This covers the case where multiple files have the same content and are
added with git add. Previously only the one that was linked to the annex
got its inode cached; now both are.
Joey Hess [Tue, 15 Dec 2015 16:38:32 +0000 (12:38 -0400)]
todo
Joey Hess [Tue, 15 Dec 2015 16:01:21 +0000 (12:01 -0400)]
Merge branch 'master' into smudge
removed
Added a comment
Added a comment
Added a comment: It worked
Added a comment: I'm also having this issue
yminus [Sun, 13 Dec 2015 22:55:16 +0000 (22:55 +0000)]
Added a comment
scorchgeek [Sun, 13 Dec 2015 22:30:47 +0000 (22:30 +0000)]
Added a comment: Indeed
basak [Sun, 13 Dec 2015 21:35:59 +0000 (21:35 +0000)]
Added a comment
Added a comment: Repairing ignores disk space issues too
scorchgeek [Sat, 12 Dec 2015 22:44:00 +0000 (22:44 +0000)]
create page
Joey Hess [Sat, 12 Dec 2015 16:19:31 +0000 (12:19 -0400)]
Debian: Build depend on concurrent-output.
In unstable now.
Added a comment
Added a comment
Added a comment
Joey Hess [Fri, 11 Dec 2015 21:53:37 +0000 (17:53 -0400)]
avoid smudge filter returning invalid content
1. git add file
2. git commit
3. modify file
4. git commit
5. git reset HEAD^
Before this fix, that resulted in git saying the file was modified. And
indeed, it didn't have the content it should in the just checked out ref,
because step 3 modified the object file for the old key.
http://www.ryantm.com/ [Fri, 11 Dec 2015 21:04:54 +0000 (21:04 +0000)]
2 more data -> 2 more days
Joey Hess [Fri, 11 Dec 2015 20:24:21 +0000 (16:24 -0400)]
devblog
Joey Hess [Fri, 11 Dec 2015 20:22:40 +0000 (16:22 -0400)]
update
Joey Hess [Fri, 11 Dec 2015 20:12:42 +0000 (16:12 -0400)]
checked getKeysPresent; it's ok for v6 unlocked files
When a v6 unlocked files is removed from the work tree,
unused doesn't show it. When it gets removed from the index,
unused does show it. This is the same as a locked file.
Joey Hess [Fri, 11 Dec 2015 20:05:56 +0000 (16:05 -0400)]
fsck for v6 unlocked files
This only adds 1 stat to each file fscked for locked files, so
added overhead is minimal.
For unlocked files it has to access the database to see if a file
is modified.
Joey Hess [Fri, 11 Dec 2015 19:13:36 +0000 (15:13 -0400)]
finish v6 git-annex lock
This was a doozy!
Joey Hess [Fri, 11 Dec 2015 17:56:12 +0000 (13:56 -0400)]
only make 1 hardlink max between pointer file and annex object
If multiple files point to the same annex object, the user may want to
modify them independently, so don't use a hard link.
Also, check diskreserve when copying.
Joey Hess [Fri, 11 Dec 2015 17:50:31 +0000 (13:50 -0400)]
Merge branch 'master' into smudge
Joey Hess [Fri, 11 Dec 2015 17:50:27 +0000 (13:50 -0400)]
fsck: Failed to honor annex.diskreserve when checking a remote.
Joey Hess [Fri, 11 Dec 2015 16:15:29 +0000 (12:15 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 11 Dec 2015 16:13:20 +0000 (12:13 -0400)]
webdav: When testing the WebDAV server, send a file with content. The empty file it was sending tickled bugs in some php WebDAV server.
Joey Hess [Fri, 11 Dec 2015 15:27:33 +0000 (11:27 -0400)]
comment
Joey Hess [Fri, 11 Dec 2015 15:23:57 +0000 (11:23 -0400)]
comment
Joey Hess [Fri, 11 Dec 2015 15:20:35 +0000 (11:20 -0400)]
comment
Joey Hess [Fri, 11 Dec 2015 15:06:02 +0000 (11:06 -0400)]
add Blackblaze B2 extranal special remote to the list
Joey Hess [Fri, 11 Dec 2015 15:04:48 +0000 (11:04 -0400)]
comment
Joey Hess [Fri, 11 Dec 2015 15:03:22 +0000 (11:03 -0400)]
clean up
Joey Hess [Fri, 11 Dec 2015 14:42:18 +0000 (10:42 -0400)]
wip
yminus [Thu, 10 Dec 2015 22:25:26 +0000 (22:25 +0000)]
Added a comment
Joey Hess [Thu, 10 Dec 2015 20:12:05 +0000 (16:12 -0400)]
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.
Joey Hess [Thu, 10 Dec 2015 20:07:50 +0000 (16:07 -0400)]
add generalized linkAnnex'
Joey Hess [Thu, 10 Dec 2015 20:06:58 +0000 (16:06 -0400)]
always format pointer file with a trailing newline
Before the smudge filter added a trailing newline, but other things that
wrote formatPointer to a file did not.
also some new pointer staging code to use later
http://joeyh.name/ [Thu, 10 Dec 2015 18:58:46 +0000 (18:58 +0000)]
Added a comment
Joey Hess [Thu, 10 Dec 2015 18:54:03 +0000 (14:54 -0400)]
todo
Joey Hess [Thu, 10 Dec 2015 18:51:04 +0000 (14:51 -0400)]
check InodeCache in inAnnex et al
This avoids querying the database when the content file doen't exist
(or otherwise fails the provided check). However, it does add overhead of
querying the database, and will certianly impact performance.
Joey Hess [Thu, 10 Dec 2015 18:29:34 +0000 (14:29 -0400)]
check inode cache in prepSendAnnex
This does mean one query of the database every time an object is sent.
May impact performance.
Joey Hess [Thu, 10 Dec 2015 18:20:38 +0000 (14:20 -0400)]
move
Joey Hess [Thu, 10 Dec 2015 18:07:11 +0000 (14:07 -0400)]
Merge branch 'master' into smudge
Joey Hess [Thu, 10 Dec 2015 16:31:26 +0000 (12:31 -0400)]
comment
Added a comment: Complete removal
Joey Hess [Thu, 10 Dec 2015 15:42:49 +0000 (11:42 -0400)]
Add S3 features to git-annex version output.
Joey Hess [Thu, 10 Dec 2015 15:22:28 +0000 (11:22 -0400)]
comment
Joey Hess [Thu, 10 Dec 2015 15:20:01 +0000 (11:20 -0400)]
response
Joey Hess [Thu, 10 Dec 2015 15:15:06 +0000 (11:15 -0400)]
response
Added a comment: The downside
Joey Hess [Wed, 9 Dec 2015 23:43:15 +0000 (19:43 -0400)]
make clear when code is using deprecated direct mode files
Joey Hess [Wed, 9 Dec 2015 23:38:37 +0000 (19:38 -0400)]
reorder
Joey Hess [Wed, 9 Dec 2015 22:14:19 +0000 (18:14 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Dec 2015 22:13:31 +0000 (18:13 -0400)]
devblog
Joey Hess [Wed, 9 Dec 2015 21:58:59 +0000 (17:58 -0400)]
Merge branch 'master' into smudge
Joey Hess [Wed, 9 Dec 2015 21:47:05 +0000 (17:47 -0400)]
use InodeCache when dropping a key to see if a pointer file can be safely reset
The Keys database can hold multiple inode caches for a given key. One for
the annex object, and one for each pointer file, which may not be hard
linked to it.
Inode caches for a key are recorded when its content is added to the annex,
but only if it has known pointer files. This is to avoid the overhead of
maintaining the database when not needed.
When the smudge filter outputs a file's content, the inode cache is not
updated, because git's smudge interface doesn't let us write the file. So,
dropping will fall back to doing an expensive verification then. Ideally,
git's interface would be improved, and then the inode cache could be
updated then too.
Joey Hess [Wed, 9 Dec 2015 21:00:37 +0000 (17:00 -0400)]
add inode cache to the db
Renamed the db to keys, since it is various info about a Keys.
Dropping a key will update its pointer files, as long as their content can
be verified to be unmodified. This falls back to checksum verification, but
I want it to use an InodeCache of the key, for speed. But, I have not made
anything populate that cache yet.
openmedi [Wed, 9 Dec 2015 20:18:48 +0000 (20:18 +0000)]
Added a comment
Joey Hess [Wed, 9 Dec 2015 19:42:16 +0000 (15:42 -0400)]
move InodeSentinal from direct mode code to its own module
Will be used outside of direct mode for v6 unlocked files, and is already
used outside of direct mode when adding files to annex.
Joey Hess [Wed, 9 Dec 2015 19:25:14 +0000 (15:25 -0400)]
link/copy pointer files to object content when it's added
Joey Hess [Wed, 9 Dec 2015 19:24:32 +0000 (15:24 -0400)]
avoid clean filter trying to annex a pointer file
Joey Hess [Wed, 9 Dec 2015 19:18:25 +0000 (15:18 -0400)]
avoid pre-commit hook messing up new-style unlocked files in v6 repo
Joey Hess [Wed, 9 Dec 2015 18:55:47 +0000 (14:55 -0400)]
stash DbHandle in Annex state
Joey Hess [Wed, 9 Dec 2015 18:25:33 +0000 (14:25 -0400)]
refactor and improve pointer file handling code
Added a comment: anyone saw/worked on backend for watchdox service? (not free one but needed :-/)
Joey Hess [Tue, 8 Dec 2015 17:07:45 +0000 (13:07 -0400)]
todo
Joey Hess [Tue, 8 Dec 2015 15:28:19 +0000 (11:28 -0400)]
add news item for git-annex 5.
20151208
Joey Hess [Tue, 8 Dec 2015 15:14:28 +0000 (11:14 -0400)]
prep release
Joey Hess [Tue, 8 Dec 2015 15:13:55 +0000 (11:13 -0400)]
response
ben [Tue, 8 Dec 2015 10:39:30 +0000 (10:39 +0000)]
Added a comment: Problems initializing glacier remote