add network-multicast to bulld depends

This commit is contained in:
Joey Hess 2012-09-07 14:54:00 -04:00
parent 980e93ae0e
commit a8e05c8da1
5 changed files with 31 additions and 7 deletions

View file

@ -2,7 +2,10 @@ CFLAGS=-Wall
GIT_ANNEX_TMP_BUILD_DIR?=tmp GIT_ANNEX_TMP_BUILD_DIR?=tmp
IGNORE=-ignore-package monads-fd -ignore-package monads-tf IGNORE=-ignore-package monads-fd -ignore-package monads-tf
BASEFLAGS=-threaded -Wall $(IGNORE) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR) -IUtility BASEFLAGS=-threaded -Wall $(IGNORE) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR) -IUtility
FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBAPP -DWITH_OLD_YESOD
# If you get build failures due to missing haskell libraries,
# you can turn off some of these features.
FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBAPP -DWITH_OLD_YESOD -DWITH_MULTICAST
bins=git-annex bins=git-annex
mans=git-annex.1 git-annex-shell.1 mans=git-annex.1 git-annex-shell.1

1
debian/control vendored
View file

@ -38,6 +38,7 @@ Build-Depends:
libghc-crypto-api-dev, libghc-crypto-api-dev,
libghc-hamlet-dev, libghc-hamlet-dev,
libghc-clientsession-dev, libghc-clientsession-dev,
libghc-network-multicast-dev,
ikiwiki, ikiwiki,
perlmagick, perlmagick,
git, git,

View file

@ -3,11 +3,23 @@ have some way of pairing devices.
It could work like this: It could work like this:
1. Prompt for the hostname (or do avahi local machine discovery). 1. Prompt for the hostname, or do avahi local machine discovery, or use
2. Enable the two hosts to ssh to one-another and run git-annex shell. ZeroMQ with IP multicast, or use haskell's `network-multicast`. That
(A tricky problem, if ssh keys need to be added to do that.) last option seems to work best!
3. Push over a clone of the repository. (Using git-annex-shell?) 2. Let user pick host to pair with. Somehow authenticate that this is
4. Start [[syncing]]. the host they expected to pair with, and not an imposter. Probably
have the users enter a shared secret and use it to HMAC the ssh public
keys.
3. Exchange a hostname or IP address with the pair. Ideally,
use `.local`, as it'll work as long as both are on the same subnet.
If mDNS is not available, regular DNS or IP addresses might have
to be used, but will result in a more fragile pairing. Or perhaps
the assistant could broadcast itself queries for current IP addresses,
if connecting to a paired host fails.
4. Enable the two hosts to ssh to one-another and run git-annex shell.
(Set up per-host ssh keys.)
5. Pull over a clone of the repository.
6. Start [[syncing]].
Also look into the method used by Also look into the method used by
<https://support.mozilla.org/en-US/kb/add-a-device-to-firefox-sync> <https://support.mozilla.org/en-US/kb/add-a-device-to-firefox-sync>

View file

@ -65,6 +65,7 @@ libraries. To build and use git-annex by hand, you will need:
* [crypto-api](http://hackage.haskell.org/package/crypto-api) * [crypto-api](http://hackage.haskell.org/package/crypto-api)
* [hamlet](http://hackage.haskell.org/package/hamlet) * [hamlet](http://hackage.haskell.org/package/hamlet)
* [clientsession](http://hackage.haskell.org/package/clientsession) * [clientsession](http://hackage.haskell.org/package/clientsession)
* [network-multicast](http://hackage.haskell.org/package/network-multicast)
* Shell commands * Shell commands
* [git](http://git-scm.com/) * [git](http://git-scm.com/)
* [uuid](http://www.ossp.org/pkg/lib/uuid/) * [uuid](http://www.ossp.org/pkg/lib/uuid/)

View file

@ -40,6 +40,9 @@ Flag Assistant
Flag Webapp Flag Webapp
Description: Enable git-annex webapp Description: Enable git-annex webapp
Flag Multicast
Description: Enable multicast pairing
Executable git-annex Executable git-annex
Main-Is: git-annex.hs Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath, Build-Depends: MissingH, hslogger, directory, filepath,
@ -75,13 +78,17 @@ Executable git-annex
Build-Depends: dbus Build-Depends: dbus
CPP-Options: -DWITH_DBUS CPP-Options: -DWITH_DBUS
if flag(Webapp) if flag(Webapp) && flag(Assistant)
Build-Depends: yesod, yesod-static, case-insensitive, Build-Depends: yesod, yesod-static, case-insensitive,
http-types, transformers, wai, wai-logger, warp, blaze-builder, http-types, transformers, wai, wai-logger, warp, blaze-builder,
blaze-html, crypto-api, hamlet, clientsession, blaze-html, crypto-api, hamlet, clientsession,
template-haskell, yesod-default (>= 1.1.0), data-default template-haskell, yesod-default (>= 1.1.0), data-default
CPP-Options: -DWITH_WEBAPP CPP-Options: -DWITH_WEBAPP
if flag(Multicast) && flag(Webapp)
Build-Depends: network-multicast
CPP-Options: -DWITH_MULTICAST
if os(darwin) if os(darwin)
CPP-Options: -DOSX CPP-Options: -DOSX