Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2015-07-20 11:20:49 -04:00
commit 7c77bb8179
9 changed files with 178 additions and 1 deletions

View file

@ -0,0 +1,16 @@
[[!comment format=mdwn
username="mennucc1@6758d6a3817a0a6b29e8adbdb068c5ba35f6992b"
nickname="mennucc1"
subject="hack"
date="2015-07-18T09:16:03Z"
content="""
hi Joey, thanks for your interest;
I created a script to address this problem
<http://mennucc1.debian.net/git-annex/git-annex_de-re-link_hash-E>
it can relink keys that are not hardlinked anymore (-L option) ; it can use an unsed key to recreate a missin key (-R option) ; it can also drop redundant keys (-D option)
a.
"""]]

View file

@ -0,0 +1,3 @@
I have a special remote configured to/from which I can copy files correctly.
I would like to be prevent some annexed files to be copied to this remote, automatically (in other words, without excluding them manually on the command line)
How can this be done?

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="sfowijowa"
subject="comment 2"
date="2015-07-17T18:20:06Z"
content="""
Hi, I am using the \"--passphrase-file\" option outside git-annex to sign the files that have to be backed up:
\"gpg --batch --passphrase-file /home/user/.gnupg/pass.txt --no-tty --yes --detach-sign /tmp/root.tar.gz\" Unfortunately, I couldn't find a way to pass this option to gpg with git-annex. In duplicity, for example, you can pass gpg options with \"dupclitiy --gpg-options '--passphrase-file /home/user/.gnupg/pass.txt'\" Best regards
"""]]

View file

@ -0,0 +1,56 @@
Not sure if this is a bug or user error. I'm trying to use git-annex on Windows 2008 R2, but it isn't working for me. Works fine on Linux. I have a local git repo and then added some binary files to annex. Then I used git annex sync --content to push ennex'd files up to git server. Then I can clone that repo and sync again to pull all the files down. On windows I just get error messages when I try to clone the repo and use annex to init or sync.
git version: 1.8.0.msysgit.0
git-annex version:
git-annex version: 5.20150710-g8fd7052
build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV DNS Feeds Quvi TDFA TorrentP
arser
key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E MD5E SHA256 SHA1 SHA51
2 SHA224 SHA384 SKEIN256 SKEIN512 MD5 WORM URL
remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook extern
al
local repository version: unknown
supported repository version: 5
upgrade supported from repository versions: 2 3 4
If I try to init the cloned repo:
$ git-annex init
init Unknown option: --literal-pathspecs
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
Unknown option: --literal-pathspecs
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
Unknown option: --literal-pathspecs
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
Unknown option: --literal-pathspecs
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
git-annex.exe: git [Param "config",Param "user.name",Param "user"] failed
If I try to sync:
$ git annex sync --content
Unknown option: --literal-pathspecs
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
git-annex: First run: git-annex init
What am I missing? I love the idea of annex and really need it for an urgent project I'm working on, but unfortunately I need to use it with Windows...in addition to Linux.

View file

@ -16,7 +16,7 @@ You can then download the public key, and check that the package is signed
with it.
$ wget https://downloads.kitenet.net/git-annex/gpg-pubkey.asc
$ gpg --import gpg-pubey.asc
$ gpg --import gpg-pubkey.asc
$ gpg --verify git-annex-standalone-*.tar.gz.sig
(The git-annex assistant can automatically upgrade git-annex, and when it

View file

@ -0,0 +1,7 @@
[[!comment format=mdwn
username="sfowijowa"
subject="bup.bloom must be unlocked"
date="2015-07-17T17:45:24Z"
content="""
Hi, Thanks for the help :) I didn't exlude any files. Therefore \"$BUP_REPO/objects/pack/bup.bloom\" gets added by git-annex. This file has to be unlocked beforehand for bup to be running correctly. Best regards
"""]]

View file

@ -0,0 +1,75 @@
There are multiple issues that have been reported that are related to using git-annex on networked file systems. We're generally talking about NFS, which we'll cover here, but this may also be the case on SMB filesystems.
Locking issues
==============
Here is the prior art here:
* [[devblog/day_27__locking_fun/]]
* [[devblog/day_286-287__rotten_locks/]]
* [[forum/Can__39__t_init_git_annex/]]
* [[bugs/git-annex_merge_stalls/]]
All of those issues but the first are related to locking on NFS filesystems, which is [notoriously bad](https://en.wikipedia.org/wiki/File_locking#Problems). However, the problems with it are not insurmountable and git-annex can actually be used, even if unreliably, on NFS filesystems.
The problem I mainly hit with NFS filesystems is with unreliable locking. If you have similar platforms (both running Linux for example, NFS locking doesn't work in BSD systems), locking *should* work, but sometimes fails without reason. This problem and the solution is well described in [this stackoverflow answer](http://serverfault.com/a/455080), taken from [this excellent blog](http://sophiedogg.com/lockd-and-statd-nfs-errors/). Basically, you need to restart a bunch of NFS daemon that get stuck on the server side and then locking works again. This generally fixed it for me:
<pre>
service nfs-kernel-server stop
service rpcbind stop
service nfs-common stop
service rpcbind start
service nfs-common start
service nfs-kernel-server start
</pre>
This needs to be run as root on the server side. Having a simple test script to see if locking works is also useful, i use the following:
<pre>
#! /usr/bin/perl -w
use Fcntl qw(LOCK_SH LOCK_EX LOCK_UN);
$child = fork();
open(TESTLCK, ">testlock");
if ($child == 0) { # in child
print "locking exclusively\n";
flock(TESTLCK, LOCK_EX) || die "failed to lock exclusively: $!";
print "holding exclusively lock for 3 seconds\n";
sleep 3;
flock(TESTLCK, LOCK_UN) || die "failed to unlock exclusively: $!";
print "done locking exclusively\n";
} else { # in parent
print "locking shared\n";
flock(TESTLCK, LOCK_SH) || die "failed to lock shared: $!";
print "holding shared lock for 3 seconds\n";
sleep 3;
flock(TESTLCK, LOCK_UN) || die "failed to unlock shared: $!";
print "done locking shared, waiting for child to finish\n";
wait;
}
</pre>
Also note that the [NFS FAQ](http://nfs.sourceforge.net/) (currently offline, thanks to Sourceforge, see [this archive](https://archive.is/QMMO)) also has interesting snippets about NFS locking. In short: it's a mess, but it can be worked around! -- [[anarcat]]
Socket issues
=============
Another thing that may fail is the "ssh caching code". Examples:
* [[forum/git_annex_sync_dies___40__sometimes__41__/]]
* [[forum/NTFS_usb_on_linux_unable_to_connect_to_ssh_remote/]]
* [[todo/git-annex_ignores_GIT__95__SSH/]]
* [[bugs/git-annex-shell_doesn__39__t_work_as_expected/]]
As you can see, this affects way more than NFS, which often just works there. But it can be that the SSH client can't create a socket for the SSH multiplexing that git-annex uses. Normally, git-annex should detect that and fallback properly, but sometimes this fails, especially with older versions of git-annex. A workaround is to disable the feature:
git config annex.sshcaching false
The tradeoff is that syncs are faster, but it works. -- [[anarcat]]
Stray files issue
=================
This is a completely different issue, but could be related to file locking: [[bugs/huge_multiple_copies_of___39__.nfs__42____39___and___39__.panfs__42____39___being_created/]]. Basically, tons of files are left behind by git-annex when it is ran on an NFS server. It is yet unclear how this problem happens and how to resolve it. But it has been reproduced and could affect you, so until it is resolved, it is still an open issue here... -- [[anarcat]]

View file

@ -0,0 +1 @@
Is it possible to add a '--dir' option to addurl (or some other mechanic) to make git annex create the symlinks in the specified directory?

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="mawillcockson"
subject="comment 2"
date="2015-07-18T19:13:03Z"
content="""
Perhaps server-side [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)?
Maybe a git hook script that uses [inotify](https://en.wikipedia.org/wiki/Inotify) for inode size notifications.
I would have no idea how to implement this, though.
"""]]