]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/git-annex_support.mdwn
b6d814d91a3bbb6d0c1d4957a22b89f673cd7f77
[ikiwiki.git] / doc / todo / git-annex_support.mdwn
1 A dear [[wishlist]] which would resolve [[this question|forum/ikiwiki_and_big_files]]: ikiwiki should support git-annex repositories.
2
3 I am not sure how this would work, but from my POV, it should do a `git annex get` when new commits are pushed to its bare repo. This would assume, of course, that there's another repo somewhere that ikiwiki has access to, which works for HTTP-style remotes, but could be more problematic for SSH remotes that require a key.
4
5 Another solution would be to make ikiwiki a remote itself and allow users to push big files to it. The only problem I see with this is those files would end up in the bare repository and not necessarily show up in the web rendering. Ideally, a big file pushed would be hardlinked between the two repos, but it seems [git-annex doesn't support that yet](http://git-annex.branchable.com/todo/wishlist:_use_hardlinks_for_local_clones). --[[anarcat]]
6
7 > One technical problem with this is that ikiwiki doesn't allow symlinks
8 > for [[security]], but git-annex relies on symlinks (unless you're in
9 > direct mode, but I'm not sure that's really desirable here).
10 > I'd like to make symlinks possible without compromising security,
11 > but it'll be necessary to be quite careful. --[[smcv]]
12
13 First implementation
14 ====================
15
16 So as the [[discussion]] shows, it seems it's perfectly possible to actually do this! There's this [gallery site](http://stockholm.kalleswork.net) which uses the [[plugins/contrib/album]] plugin and git-annex to manage its files.
17
18 The crucial steps are:
19
20  1. setup a git annex remote in `$srcdir`
21
22     cd $srcdir
23     git annex init
24
25  2. make the bare repository (the remote of `$srcdir`) ignored by git-annex:
26
27     cd $srcdir
28     git config remote.origin.annex-ignore true
29     git config remote.origin.annex-sync false
30
31     (!) This needs to be done on *ANY* clone of the repository, which is annoying, but it's important because we don't want to see git-annex stuff in the bare repo. (why?)
32
33  3. enable direct mode on `$srcdir` because ikiwiki ignores symlinks for [[security]] reasons:
34
35     cd $srcdir
36     git annex direct
37
38 This assumes you know what `srcdir`, `repository` and so on mean, if you forgot (like me), see this reference: [[rcs/git/]].
39
40 What remains to be clarified:
41
42  * how do files get pushed to the `$srcdir`? Only through the web interface?
43  * why do we ignore the bare repository?
44
45 See the [[discussion]] for a followup on that. --[[anarcat]]