Merge branch 'android'
This commit is contained in:
commit
93b5021be2
18 changed files with 108 additions and 46 deletions
|
@ -6,7 +6,7 @@
|
||||||
- UUIDs of remotes are cached in git config, using keys named
|
- UUIDs of remotes are cached in git config, using keys named
|
||||||
- remote.<name>.annex-uuid
|
- remote.<name>.annex-uuid
|
||||||
-
|
-
|
||||||
- Copyright 2010-2011 Joey Hess <joey@kitenet.net>
|
- Copyright 2010-2013 Joey Hess <joey@kitenet.net>
|
||||||
-
|
-
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
@ -24,20 +24,17 @@ module Annex.UUID (
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
import qualified Git
|
import qualified Git
|
||||||
import qualified Git.Config
|
import qualified Git.Config
|
||||||
import qualified Build.SysConfig as SysConfig
|
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
|
import qualified Data.UUID as U
|
||||||
|
import System.Random
|
||||||
|
|
||||||
configkey :: ConfigKey
|
configkey :: ConfigKey
|
||||||
configkey = annexConfig "uuid"
|
configkey = annexConfig "uuid"
|
||||||
|
|
||||||
{- Generates a UUID. There is a library for this, but it's not packaged,
|
{- Generates a random UUID, that does not include the MAC address. -}
|
||||||
- so use the command line tool. -}
|
|
||||||
genUUID :: IO UUID
|
genUUID :: IO UUID
|
||||||
genUUID = gen . lines <$> readProcess command params
|
genUUID = UUID . show <$> (randomIO :: IO U.UUID)
|
||||||
where
|
|
||||||
gen [] = error $ "no output from " ++ command
|
|
||||||
gen (l:_) = toUUID l
|
|
||||||
(command:params) = words SysConfig.uuid
|
|
||||||
|
|
||||||
{- Get current repository's UUID. -}
|
{- Get current repository's UUID. -}
|
||||||
getUUID :: Annex UUID
|
getUUID :: Annex UUID
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Assistant.Pairing where
|
module Assistant.Pairing where
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
|
@ -70,7 +72,12 @@ data PairingInProgress = PairingInProgress
|
||||||
}
|
}
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
data SomeAddr = IPv4Addr HostAddress | IPv6Addr HostAddress6
|
data SomeAddr = IPv4Addr HostAddress
|
||||||
|
{- My Android build of the Network library does not currently have IPV6
|
||||||
|
- support. -}
|
||||||
|
#ifndef WITH_ANDROID
|
||||||
|
| IPv6Addr HostAddress6
|
||||||
|
#endif
|
||||||
deriving (Ord, Eq, Read, Show)
|
deriving (Ord, Eq, Read, Show)
|
||||||
|
|
||||||
{- This contains the whole secret, just lightly obfuscated to make it not
|
{- This contains the whole secret, just lightly obfuscated to make it not
|
||||||
|
|
|
@ -19,7 +19,6 @@ tests =
|
||||||
, testCp "cp_a" "-a"
|
, testCp "cp_a" "-a"
|
||||||
, testCp "cp_p" "-p"
|
, testCp "cp_p" "-p"
|
||||||
, testCp "cp_reflink_auto" "--reflink=auto"
|
, testCp "cp_reflink_auto" "--reflink=auto"
|
||||||
, TestCase "uuid generator" $ selectCmd "uuid" [("uuid -m", ""), ("uuid", ""), ("uuidgen", "")]
|
|
||||||
, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
|
, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
|
||||||
, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
|
, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
|
||||||
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
|
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
|
||||||
|
|
|
@ -39,7 +39,6 @@ thirdpartyProgs = catMaybes
|
||||||
, Just "rsync"
|
, Just "rsync"
|
||||||
, Just "ssh"
|
, Just "ssh"
|
||||||
, Just "sh"
|
, Just "sh"
|
||||||
, headMaybe $ words SysConfig.uuid -- may include parameters
|
|
||||||
, ifset SysConfig.curl "curl"
|
, ifset SysConfig.curl "curl"
|
||||||
, ifset SysConfig.wget "wget"
|
, ifset SysConfig.wget "wget"
|
||||||
, ifset SysConfig.bup "bup"
|
, ifset SysConfig.bup "bup"
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Command.Add where
|
module Command.Add where
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
|
@ -18,7 +20,9 @@ import Logs.Location
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
import Annex.Content.Direct
|
import Annex.Content.Direct
|
||||||
import Annex.Perms
|
import Annex.Perms
|
||||||
|
#ifndef WITH_ANDROID
|
||||||
import Utility.Touch
|
import Utility.Touch
|
||||||
|
#endif
|
||||||
import Utility.FileMode
|
import Utility.FileMode
|
||||||
import Config
|
import Config
|
||||||
import qualified Git.HashObject
|
import qualified Git.HashObject
|
||||||
|
@ -141,12 +145,14 @@ link file key hascontent = handle (undo file key) $ do
|
||||||
l <- calcGitLink file key
|
l <- calcGitLink file key
|
||||||
liftIO $ createSymbolicLink l file
|
liftIO $ createSymbolicLink l file
|
||||||
|
|
||||||
|
#ifndef WITH_ANDROID
|
||||||
when hascontent $ do
|
when hascontent $ do
|
||||||
-- touch the symlink to have the same mtime as the
|
-- touch the symlink to have the same mtime as the
|
||||||
-- file it points to
|
-- file it points to
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
mtime <- modificationTime <$> getFileStatus file
|
mtime <- modificationTime <$> getFileStatus file
|
||||||
touch file (TimeSpec mtime) False
|
touch file (TimeSpec mtime) False
|
||||||
|
#endif
|
||||||
|
|
||||||
return l
|
return l
|
||||||
|
|
||||||
|
|
16
Limit.hs
16
Limit.hs
|
@ -5,13 +5,19 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Limit where
|
module Limit where
|
||||||
|
|
||||||
import Text.Regex.PCRE.Light.Char8
|
|
||||||
import System.Path.WildMatch
|
|
||||||
import Data.Time.Clock.POSIX
|
import Data.Time.Clock.POSIX
|
||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
#ifdef WITH_GLOB
|
||||||
|
import System.FilePath.Glob (simplify, compile, match)
|
||||||
|
#else
|
||||||
|
import Text.Regex.PCRE.Light.Char8
|
||||||
|
import System.Path.WildMatch
|
||||||
|
#endif
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
|
@ -82,10 +88,16 @@ limitExclude glob = Right $ const $ return . not . matchglob glob
|
||||||
|
|
||||||
matchglob :: String -> Annex.FileInfo -> Bool
|
matchglob :: String -> Annex.FileInfo -> Bool
|
||||||
matchglob glob (Annex.FileInfo { Annex.matchFile = f }) =
|
matchglob glob (Annex.FileInfo { Annex.matchFile = f }) =
|
||||||
|
#ifdef WITH_GLOB
|
||||||
|
match pattern f
|
||||||
|
where
|
||||||
|
pattern = simplify $ compile glob
|
||||||
|
#else
|
||||||
isJust $ match cregex f []
|
isJust $ match cregex f []
|
||||||
where
|
where
|
||||||
cregex = compile regex []
|
cregex = compile regex []
|
||||||
regex = '^':wildToRegex glob
|
regex = '^':wildToRegex glob
|
||||||
|
#endif
|
||||||
|
|
||||||
{- Adds a limit to skip files not believed to be present
|
{- Adds a limit to skip files not believed to be present
|
||||||
- in a specfied repository. -}
|
- in a specfied repository. -}
|
||||||
|
|
27
Makefile
27
Makefile
|
@ -6,7 +6,7 @@ BASEFLAGS=-Wall -outputdir $(GIT_ANNEX_TMP_BUILD_DIR) -IUtility
|
||||||
# you can turn off some of these features.
|
# you can turn off some of these features.
|
||||||
#
|
#
|
||||||
# If you're using an old version of yesod, enable -DWITH_OLD_YESOD
|
# If you're using an old version of yesod, enable -DWITH_OLD_YESOD
|
||||||
FEATURES?=$(GIT_ANNEX_LOCAL_FEATURES) -DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBDAV -DWITH_WEBAPP -DWITH_PAIRING -DWITH_XMPP -DWITH_DNS
|
FEATURES?=$(GIT_ANNEX_LOCAL_FEATURES) -DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBDAV -DWITH_WEBAPP -DWITH_PAIRING -DWITH_XMPP -DWITH_DNS -DWITH_GLOB
|
||||||
|
|
||||||
bins=git-annex
|
bins=git-annex
|
||||||
mans=git-annex.1 git-annex-shell.1
|
mans=git-annex.1 git-annex-shell.1
|
||||||
|
@ -14,6 +14,12 @@ sources=Build/SysConfig.hs Utility/Touch.hs Utility/Mounts.hs
|
||||||
all=$(bins) $(mans) docs
|
all=$(bins) $(mans) docs
|
||||||
|
|
||||||
OS:=$(shell uname | sed 's/[-_].*//')
|
OS:=$(shell uname | sed 's/[-_].*//')
|
||||||
|
ifeq ($(ANDROID),1)
|
||||||
|
OPTFLAGS?=-DWITH_INOTIFY -DWITH_ANDROID
|
||||||
|
clibs=Utility/libdiskfree.o Utility/libmounts.o
|
||||||
|
CFLAGS:=-Wall -DWITH_ANDROID
|
||||||
|
THREADFLAGS=-threaded
|
||||||
|
else
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
OPTFLAGS?=-DWITH_INOTIFY -DWITH_DBUS
|
OPTFLAGS?=-DWITH_INOTIFY -DWITH_DBUS
|
||||||
clibs=Utility/libdiskfree.o Utility/libmounts.o
|
clibs=Utility/libdiskfree.o Utility/libmounts.o
|
||||||
|
@ -41,6 +47,7 @@ clibs=Utility/libdiskfree.o Utility/libmounts.o Utility/libkqueue.o
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ALLFLAGS = $(BASEFLAGS) $(FEATURES) $(OPTFLAGS) $(THREADFLAGS)
|
ALLFLAGS = $(BASEFLAGS) $(FEATURES) $(OPTFLAGS) $(THREADFLAGS)
|
||||||
|
|
||||||
|
@ -51,7 +58,8 @@ ifdef PROFILE
|
||||||
GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(ALLFLAGS)
|
GHCFLAGS=-prof -auto-all -rtsopts -caf-all -fforce-recomp $(ALLFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GHCMAKE=ghc $(GHCFLAGS) --make
|
GHC?=ghc
|
||||||
|
GHCMAKE=$(GHC) $(GHCFLAGS) --make
|
||||||
|
|
||||||
# Am I typing :make in vim? Do a fast build.
|
# Am I typing :make in vim? Do a fast build.
|
||||||
ifdef VIM
|
ifdef VIM
|
||||||
|
@ -113,7 +121,7 @@ test: $(sources) $(clibs)
|
||||||
|
|
||||||
testcoverage:
|
testcoverage:
|
||||||
rm -f test.tix test
|
rm -f test.tix test
|
||||||
ghc $(GHCFLAGS) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR)/testcoverage --make -fhpc test
|
$(GHC) $(GHCFLAGS) -outputdir $(GIT_ANNEX_TMP_BUILD_DIR)/testcoverage --make -fhpc test
|
||||||
./test
|
./test
|
||||||
@echo ""
|
@echo ""
|
||||||
@hpc report test --exclude=Main --exclude=QC
|
@hpc report test --exclude=Main --exclude=QC
|
||||||
|
@ -216,6 +224,19 @@ osxapp:
|
||||||
rm -f tmp/git-annex.dmg.bz2
|
rm -f tmp/git-annex.dmg.bz2
|
||||||
bzip2 --fast tmp/git-annex.dmg
|
bzip2 --fast tmp/git-annex.dmg
|
||||||
|
|
||||||
|
# Cross compile for Android binary.
|
||||||
|
# Uses https://github.com/neurocyte/ghc-android
|
||||||
|
#
|
||||||
|
# configure is run, probing the local system.
|
||||||
|
# So the Android should have all the same stuff that configure probes for,
|
||||||
|
# including the same version of git.
|
||||||
|
android:
|
||||||
|
$(MAKE) Build/SysConfig.hs
|
||||||
|
GHC=$$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin/arm-unknown-linux-androideabi-ghc \
|
||||||
|
CC=$$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc \
|
||||||
|
FEATURES="-DWITH_ANDROID -DWITH_ASSISTANT -DWITH_GLOB -DWITH_DNS" \
|
||||||
|
ANDROID=1 $(MAKE) fast
|
||||||
|
|
||||||
# used by ./ghci
|
# used by ./ghci
|
||||||
getflags:
|
getflags:
|
||||||
@echo $(ALLFLAGS) $(clibs)
|
@echo $(ALLFLAGS) $(clibs)
|
||||||
|
|
|
@ -6,13 +6,17 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Utility.ThreadScheduler where
|
module Utility.ThreadScheduler where
|
||||||
|
|
||||||
import Common
|
import Common
|
||||||
|
|
||||||
import Control.Concurrent
|
import Control.Concurrent
|
||||||
import System.Posix.Terminal
|
|
||||||
import System.Posix.Signals
|
import System.Posix.Signals
|
||||||
|
#ifndef WITH_ANDROID
|
||||||
|
import System.Posix.Terminal
|
||||||
|
#endif
|
||||||
|
|
||||||
newtype Seconds = Seconds { fromSeconds :: Int }
|
newtype Seconds = Seconds { fromSeconds :: Int }
|
||||||
deriving (Eq, Ord, Show)
|
deriving (Eq, Ord, Show)
|
||||||
|
@ -49,8 +53,10 @@ waitForTermination :: IO ()
|
||||||
waitForTermination = do
|
waitForTermination = do
|
||||||
lock <- newEmptyMVar
|
lock <- newEmptyMVar
|
||||||
check softwareTermination lock
|
check softwareTermination lock
|
||||||
|
#ifndef WITH_ANDROID
|
||||||
whenM (queryTerminal stdInput) $
|
whenM (queryTerminal stdInput) $
|
||||||
check keyboardSignal lock
|
check keyboardSignal lock
|
||||||
|
#endif
|
||||||
takeMVar lock
|
takeMVar lock
|
||||||
where
|
where
|
||||||
check sig lock = void $
|
check sig lock = void $
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
# define STATCALL statfs /* statfs64 not yet tested on a real FreeBSD machine */
|
# define STATCALL statfs /* statfs64 not yet tested on a real FreeBSD machine */
|
||||||
# define STATSTRUCT statfs
|
# define STATSTRUCT statfs
|
||||||
#else
|
#else
|
||||||
|
#if defined WITH_ANDROID
|
||||||
|
# warning free space checking code not available for Android
|
||||||
|
# define UNKNOWN
|
||||||
|
#else
|
||||||
#if defined (__linux__) || defined (__FreeBSD_kernel__)
|
#if defined (__linux__) || defined (__FreeBSD_kernel__)
|
||||||
/* Linux or Debian kFreeBSD */
|
/* Linux or Debian kFreeBSD */
|
||||||
/* This is a POSIX standard, so might also work elsewhere too. */
|
/* This is a POSIX standard, so might also work elsewhere too. */
|
||||||
|
@ -34,6 +38,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
# include <sys/mount.h>
|
# include <sys/mount.h>
|
||||||
# define GETMNTINFO
|
# define GETMNTINFO
|
||||||
#else
|
#else
|
||||||
|
#if defined WITH_ANDROID
|
||||||
|
# warning mounts listing code not available for Android
|
||||||
|
# define UNKNOWN
|
||||||
|
#else
|
||||||
#if defined (__linux__) || defined (__FreeBSD_kernel__)
|
#if defined (__linux__) || defined (__FreeBSD_kernel__)
|
||||||
/* Linux or Debian kFreeBSD */
|
/* Linux or Debian kFreeBSD */
|
||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
|
@ -14,6 +18,7 @@
|
||||||
# define UNKNOWN
|
# define UNKNOWN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
9
debian/changelog
vendored
9
debian/changelog
vendored
|
@ -1,3 +1,12 @@
|
||||||
|
git-annex (3.20130208) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* Now uses the Haskell uuid library, rather than needing a uuid program.
|
||||||
|
* Now uses the Haskell Glob library, rather than pcre-light, avoiding
|
||||||
|
the need to install libpcre. Currently done only for Cabal or when
|
||||||
|
the Makefile is made to use -DWITH_GLOB
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Sun, 10 Feb 2013 14:52:01 -0400
|
||||||
|
|
||||||
git-annex (3.20130207) unstable; urgency=low
|
git-annex (3.20130207) unstable; urgency=low
|
||||||
|
|
||||||
* webapp: Now allows restarting any threads that crash.
|
* webapp: Now allows restarting any threads that crash.
|
||||||
|
|
1
debian/control
vendored
1
debian/control
vendored
|
@ -17,6 +17,7 @@ Build-Depends:
|
||||||
libghc-quickcheck2-dev,
|
libghc-quickcheck2-dev,
|
||||||
libghc-monad-control-dev (>= 0.3),
|
libghc-monad-control-dev (>= 0.3),
|
||||||
libghc-lifted-base-dev,
|
libghc-lifted-base-dev,
|
||||||
|
libghc-uuid-dev,
|
||||||
libghc-json-dev,
|
libghc-json-dev,
|
||||||
libghc-ifelse-dev,
|
libghc-ifelse-dev,
|
||||||
libghc-bloomfilter-dev,
|
libghc-bloomfilter-dev,
|
||||||
|
|
|
@ -32,3 +32,14 @@ transfers when not on wifi. This may need to be configurable.
|
||||||
|
|
||||||
Due to use of the FAT filesystem, which doesn't do symlinks, [[desymlink]]
|
Due to use of the FAT filesystem, which doesn't do symlinks, [[desymlink]]
|
||||||
is probably needed for at least older Android devices that have SD cards.
|
is probably needed for at least older Android devices that have SD cards.
|
||||||
|
|
||||||
|
## Porting notes
|
||||||
|
|
||||||
|
To build git, you can use the C cross compiler installed by ghc-android.
|
||||||
|
I did so like this:
|
||||||
|
|
||||||
|
PATH=~/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH NO_OPENSSL=1 NO_GETTEXT=1 NO_GECOS_IN_PWENT=1 NO_GETPASS=1 NO_NSEC=1 NO_MKDTEMP=1 NO_PTHREADS=1 NO_PERL=1 NO_CURL=1 NO_EXPAT=1 NO_TCLTK=1 NO_ICONV=1 make
|
||||||
|
|
||||||
|
This required coping various directories from
|
||||||
|
~/.ghc/android-14/arm-linux-androideabi-4.7/ into
|
||||||
|
~/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/
|
||||||
|
|
|
@ -9,7 +9,7 @@ Should be as simple as: `yum install git-annex`
|
||||||
Older version? Here's an installation recipe for Fedora 14 through 15.
|
Older version? Here's an installation recipe for Fedora 14 through 15.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
sudo yum install ghc cabal-install pcre-devel
|
sudo yum install ghc cabal-install
|
||||||
git clone git://git-annex.branchable.com/ git-annex
|
git clone git://git-annex.branchable.com/ git-annex
|
||||||
cd git-annex
|
cd git-annex
|
||||||
git checkout ghc7.0
|
git checkout ghc7.0
|
||||||
|
|
|
@ -24,7 +24,7 @@ the app for OSX Lion.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
brew update
|
brew update
|
||||||
brew install haskell-platform git ossp-uuid md5sha1sum coreutils pcre libgsasl gnutls libidn libgsasl pkg-config libxml2
|
brew install haskell-platform git ossp-uuid md5sha1sum coreutils libgsasl gnutls libidn libgsasl pkg-config libxml2
|
||||||
brew link libxml2
|
brew link libxml2
|
||||||
cabal update
|
cabal update
|
||||||
PATH=$HOME/bin:$PATH
|
PATH=$HOME/bin:$PATH
|
||||||
|
@ -38,10 +38,7 @@ The version provided by Macports is too old to work with current versions of git
|
||||||
Then execute
|
Then execute
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
sudo port install git-core ossp-uuid md5sha1sum coreutils pcre gnutls libxml2 libgsasl pkgconfig
|
sudo port install git-core ossp-uuid md5sha1sum coreutils gnutls libxml2 libgsasl pkgconfig
|
||||||
|
|
||||||
sudo ln -s /opt/local/include/pcre.h /usr/include/pcre.h # This is hack that allows pcre-light to find pcre
|
|
||||||
|
|
||||||
sudo cabal update
|
sudo cabal update
|
||||||
PATH=$HOME/bin:$PATH
|
PATH=$HOME/bin:$PATH
|
||||||
cabal install c2hs git-annex --bindir=$HOME/bin
|
cabal install c2hs git-annex --bindir=$HOME/bin
|
||||||
|
|
|
@ -29,23 +29,11 @@ don't want things to be system wide)
|
||||||
|
|
||||||
$ export PATH=/usr/hs/bin:$PATH
|
$ export PATH=/usr/hs/bin:$PATH
|
||||||
|
|
||||||
On SL5 pcre is at version 6.6 which is far too old for one of the
|
|
||||||
dependancies that git-annex requires. Therefore the user must install
|
|
||||||
an updated version of _pcre_ either from source or another method, I
|
|
||||||
chose to install it from source and by hand into /usr/local
|
|
||||||
|
|
||||||
$ wget http://sourceforge.net/projects/pcre/files/pcre/8.30/pcre-8.30.tar.gz/download
|
|
||||||
$ tar zxvf pcre-8.30.tar.gz
|
|
||||||
$ cd pcre-8.30
|
|
||||||
$ ./configure
|
|
||||||
$ make && make install
|
|
||||||
|
|
||||||
Once the packages are installed and are in your execution path, using
|
Once the packages are installed and are in your execution path, using
|
||||||
cabal to configure and build git-annex just makes life easier, it
|
cabal to configure and build git-annex just makes life easier, it
|
||||||
should install all the needed dependancies.
|
should install all the needed dependancies.
|
||||||
|
|
||||||
$ cabal update
|
$ cabal update
|
||||||
$ cabal install pcre-light --extra-include-dirs=/usr/local/include
|
|
||||||
$ git clone git://git.kitenet.net/git-annex
|
$ git clone git://git.kitenet.net/git-annex
|
||||||
$ cd git-annex
|
$ cd git-annex
|
||||||
$ make git-annex.1
|
$ make git-annex.1
|
||||||
|
|
|
@ -5,7 +5,6 @@ quite a lot.
|
||||||
* [The Haskell Platform](http://haskell.org/platform/) (GHC 7.4 or newer)
|
* [The Haskell Platform](http://haskell.org/platform/) (GHC 7.4 or newer)
|
||||||
* [mtl](http://hackage.haskell.org.package/mtl) (2.1.1 or newer)
|
* [mtl](http://hackage.haskell.org.package/mtl) (2.1.1 or newer)
|
||||||
* [MissingH](http://github.com/jgoerzen/missingh/wiki)
|
* [MissingH](http://github.com/jgoerzen/missingh/wiki)
|
||||||
* [pcre-light](http://hackage.haskell.org/package/pcre-light)
|
|
||||||
* [utf8-string](http://hackage.haskell.org/package/utf8-string)
|
* [utf8-string](http://hackage.haskell.org/package/utf8-string)
|
||||||
* [SHA](http://hackage.haskell.org/package/SHA)
|
* [SHA](http://hackage.haskell.org/package/SHA)
|
||||||
* [dataenc](http://hackage.haskell.org/package/dataenc)
|
* [dataenc](http://hackage.haskell.org/package/dataenc)
|
||||||
|
@ -20,6 +19,8 @@ quite a lot.
|
||||||
* [hS3](http://hackage.haskell.org/package/hS3) (optional)
|
* [hS3](http://hackage.haskell.org/package/hS3) (optional)
|
||||||
* [DAV](http://hackage.haskell.org/package/DAV) (optional)
|
* [DAV](http://hackage.haskell.org/package/DAV) (optional)
|
||||||
* [SafeSemaphore](http://hackage.haskell.org/package/SafeSemaphore)
|
* [SafeSemaphore](http://hackage.haskell.org/package/SafeSemaphore)
|
||||||
|
* [UUID](http://hackage.haskell.org/package/uuid)
|
||||||
|
* [Glob](http://hackage.haskell.org/package/Glob)
|
||||||
* Optional haskell stuff, used by the [[assistant]] and its webapp (edit Makefile to disable)
|
* Optional haskell stuff, used by the [[assistant]] and its webapp (edit Makefile to disable)
|
||||||
* [stm](http://hackage.haskell.org/package/stm)
|
* [stm](http://hackage.haskell.org/package/stm)
|
||||||
(version 2.3 or newer)
|
(version 2.3 or newer)
|
||||||
|
@ -48,8 +49,6 @@ quite a lot.
|
||||||
* [async](http://hackage.haskell.org/package/async)
|
* [async](http://hackage.haskell.org/package/async)
|
||||||
* Shell commands
|
* Shell commands
|
||||||
* [git](http://git-scm.com/)
|
* [git](http://git-scm.com/)
|
||||||
* [uuid](http://www.ossp.org/pkg/lib/uuid/)
|
|
||||||
(or `uuidgen` from util-linux)
|
|
||||||
* [xargs](http://savannah.gnu.org/projects/findutils/)
|
* [xargs](http://savannah.gnu.org/projects/findutils/)
|
||||||
* [rsync](http://rsync.samba.org/)
|
* [rsync](http://rsync.samba.org/)
|
||||||
* [curl](http://http://curl.haxx.se/) (optional, but recommended)
|
* [curl](http://http://curl.haxx.se/) (optional, but recommended)
|
||||||
|
|
|
@ -57,16 +57,16 @@ Executable git-annex
|
||||||
Build-Depends: MissingH, hslogger, directory, filepath,
|
Build-Depends: MissingH, hslogger, directory, filepath,
|
||||||
unix, containers, utf8-string, network (>= 2.0), mtl (>= 2.1.1),
|
unix, containers, utf8-string, network (>= 2.0), mtl (>= 2.1.1),
|
||||||
bytestring, old-locale, time,
|
bytestring, old-locale, time,
|
||||||
pcre-light, extensible-exceptions, dataenc, SHA, process, json,
|
extensible-exceptions, dataenc, SHA, process, json,
|
||||||
base (>= 4.5 && < 4.8), monad-control, transformers-base, lifted-base,
|
base (>= 4.5 && < 4.8), monad-control, transformers-base, lifted-base,
|
||||||
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
||||||
SafeSemaphore
|
SafeSemaphore, uuid, Glob
|
||||||
-- Need to list these because they're generated from .hsc files.
|
-- Need to list these because they're generated from .hsc files.
|
||||||
Other-Modules: Utility.Touch Utility.Mounts
|
Other-Modules: Utility.Touch Utility.Mounts
|
||||||
Include-Dirs: Utility
|
Include-Dirs: Utility
|
||||||
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
|
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
|
||||||
Extensions: CPP
|
Extensions: CPP
|
||||||
GHC-Options: -threaded
|
GHC-Options: -threaded -DWITH_GLOB
|
||||||
|
|
||||||
if flag(S3)
|
if flag(S3)
|
||||||
Build-Depends: hS3
|
Build-Depends: hS3
|
||||||
|
@ -123,15 +123,15 @@ Test-Suite test
|
||||||
Main-Is: test.hs
|
Main-Is: test.hs
|
||||||
Build-Depends: testpack, HUnit, MissingH, hslogger, directory, filepath,
|
Build-Depends: testpack, HUnit, MissingH, hslogger, directory, filepath,
|
||||||
unix, containers, utf8-string, network, mtl (>= 2.1.1), bytestring,
|
unix, containers, utf8-string, network, mtl (>= 2.1.1), bytestring,
|
||||||
old-locale, time, pcre-light, extensible-exceptions, dataenc, SHA,
|
old-locale, time, extensible-exceptions, dataenc, SHA,
|
||||||
process, json, HTTP, base (>= 4.5 && < 4.7), monad-control,
|
process, json, base (>= 4.5 && < 4.7), monad-control,
|
||||||
transformers-base, lifted-base, IfElse, text, QuickCheck >= 2.1,
|
transformers-base, lifted-base, IfElse, text, QuickCheck >= 2.1,
|
||||||
bloomfilter, edit-distance, process, SafeSemaphore
|
bloomfilter, edit-distance, process, SafeSemaphore, Glob
|
||||||
Other-Modules: Utility.Touch
|
Other-Modules: Utility.Touch
|
||||||
Include-Dirs: Utility
|
Include-Dirs: Utility
|
||||||
C-Sources: Utility/libdiskfree.c
|
C-Sources: Utility/libdiskfree.c
|
||||||
Extensions: CPP
|
Extensions: CPP
|
||||||
GHC-Options: -threaded
|
GHC-Options: -threaded -DWITH_GLOB
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue