summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/Notification.hs10
-rw-r--r--Utility/ThreadScheduler.hs2
-rw-r--r--doc/install.mdwn1
-rw-r--r--doc/install/Docker.mdwn27
4 files changed, 34 insertions, 6 deletions
diff --git a/Annex/Notification.hs b/Annex/Notification.hs
index 9a2b3956f..06a099888 100644
--- a/Annex/Notification.hs
+++ b/Annex/Notification.hs
@@ -10,9 +10,9 @@
module Annex.Notification where
import Common.Annex
-import qualified Annex
import Logs.Transfer
#ifdef WITH_DBUS_NOTIFICATIONS
+import qualified Annex
import Types.DesktopNotify
import qualified DBus.Notify as Notify
import qualified DBus.Client
@@ -26,8 +26,8 @@ data NotifyWitness = NotifyWitness
- for it. -}
notifyTransfer :: Direction -> Maybe FilePath -> (NotifyWitness -> Annex Bool) -> Annex Bool
notifyTransfer _ Nothing a = a NotifyWitness
-notifyTransfer direction (Just f) a = do
#ifdef WITH_DBUS_NOTIFICATIONS
+notifyTransfer direction (Just f) a = do
wanted <- Annex.getState Annex.desktopnotify
let action = if direction == Upload then "uploading" else "downloading"
let basedesc = action ++ " " ++ f
@@ -49,13 +49,13 @@ notifyTransfer direction (Just f) a = do
return ok
else a NotifyWitness
#else
- a NotifyWitness
+notifyTransfer _ (Just _) a = do a NotifyWitness
#endif
notifyDrop :: Maybe FilePath -> Bool -> Annex ()
notifyDrop Nothing _ = noop
-notifyDrop (Just f) ok = do
#ifdef WITH_DBUS_NOTIFICATIONS
+notifyDrop (Just f) ok = do
wanted <- Annex.getState Annex.desktopnotify
when (notifyFinish wanted) $ liftIO $ do
client <- DBus.Client.connectSession
@@ -64,7 +64,7 @@ notifyDrop (Just f) ok = do
else "failed to drop" ++ f
void $ Notify.notify client (mkNote msg)
#else
- noop
+notifyDrop (Just _) _ = noop
#endif
#ifdef WITH_DBUS_NOTIFICATIONS
diff --git a/Utility/ThreadScheduler.hs b/Utility/ThreadScheduler.hs
index be0d10109..dd88dc879 100644
--- a/Utility/ThreadScheduler.hs
+++ b/Utility/ThreadScheduler.hs
@@ -11,9 +11,9 @@
module Utility.ThreadScheduler where
import Control.Monad
-import Control.Monad.IfElse
import Control.Concurrent
#ifndef mingw32_HOST_OS
+import Control.Monad.IfElse
import System.Posix.IO
#endif
#ifndef mingw32_HOST_OS
diff --git a/doc/install.mdwn b/doc/install.mdwn
index ecbf11a15..d9715b7da 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -14,6 +14,7 @@ detailed instructions | quick install
&nbsp;&nbsp;[[Gentoo]] | `emerge git-annex`
&nbsp;&nbsp;[[ScientificLinux5]] |
&nbsp;&nbsp;[[openSUSE]] |
+&nbsp;&nbsp;[[Docker]] |
[[Windows]] | [download installer](http://downloads.kitenet.net/git-annex/windows/current/) **alpha**
"""]]
diff --git a/doc/install/Docker.mdwn b/doc/install/Docker.mdwn
new file mode 100644
index 000000000..3e0171dde
--- /dev/null
+++ b/doc/install/Docker.mdwn
@@ -0,0 +1,27 @@
+There is not yet a pre-built Docker image for git-annex. However, it's
+easy to add it to an image.
+
+For example:
+
+ docker run -i -t joeyh/debian-unstable apt-get install git-annex
+
+# autobuilders
+
+The git-annex Linux autobuilds are built using a Docker container.
+If you'd like to set up your own autobuilder in a Docker container,
+the image that is used is not currently published, but you can build
+a new image using [Propellor](http://joeyh.name/code/propellor). Just
+install Propellor and add this to its `config.hs`:
+
+[[!format haskell """
+host hostname@"your.machine.net" = Just $ props
+ & Docker.configured
+ & Docker.docked container hostname "amd64-git-annex-builder"
+
+container _ "amd64-git-annex-builder" = in Just $ Docker.containerFrom
+ (image $ System (Debian Unstable) "amd64")
+ [ Docker.inside $ props & GitAnnexBuilder.builder "amd64" "15 * * * *" False ]
+"""]]
+
+This will autobuild every hour at :15, and the autobuilt image will be
+left inside the container in /home/builder/gitbuilder/out/