summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-15 20:57:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-15 20:57:50 -0400
commit31b0ab6e1ee9695e2ea94383be3e0cf6dc54da9f (patch)
tree017f96c8a77130a0b06407f71cf8b93ff92a6484
parent315b08befd48f697c3c569f9db6bd93affdeb87f (diff)
parent7252799fdea2902a9a74ff9271422f178483cc60 (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/special_remotes/glacier/comment_1_fcd856b99dc6b3f9141b65fe639ef76b._comment10
-rw-r--r--standalone/android/haskell-patches/dns_0.3.6-0001-use-getprop-to-get-dns-server.patch73
-rwxr-xr-xstandalone/android/install-haskell-packages2
3 files changed, 84 insertions, 1 deletions
diff --git a/doc/special_remotes/glacier/comment_1_fcd856b99dc6b3f9141b65fe639ef76b._comment b/doc/special_remotes/glacier/comment_1_fcd856b99dc6b3f9141b65fe639ef76b._comment
new file mode 100644
index 000000000..1d6d89433
--- /dev/null
+++ b/doc/special_remotes/glacier/comment_1_fcd856b99dc6b3f9141b65fe639ef76b._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawmUJBh1lYmvfCCiGr3yrdx-QhuLCSRnU5c"
+ nickname="Justin"
+ subject="comment 1"
+ date="2013-05-16T00:54:21Z"
+ content="""
+The glacier-cli tool seems to have been abandoned, and there are a number of outstanding issues with it. boto has a `glacier` tool, but it doesn't seem to include caching, which seems to be something git annex needs.
+
+Looking through the PRs, it seems like we should build a tool specifically tailored to git annex's needs. It seems that there are at least three of us willing to hack on this if it's in Python. I'm not sure any of us knows haskell, though...
+"""]]
diff --git a/standalone/android/haskell-patches/dns_0.3.6-0001-use-getprop-to-get-dns-server.patch b/standalone/android/haskell-patches/dns_0.3.6-0001-use-getprop-to-get-dns-server.patch
new file mode 100644
index 000000000..069bdd20a
--- /dev/null
+++ b/standalone/android/haskell-patches/dns_0.3.6-0001-use-getprop-to-get-dns-server.patch
@@ -0,0 +1,73 @@
+From 8459f93270c7a6e8a2ebd415db2110a66bf1ec41 Mon Sep 17 00:00:00 2001
+From: Joey Hess <joey@kitenet.net>
+Date: Wed, 15 May 2013 20:31:14 -0400
+Subject: [PATCH] use getprop to get dns server
+
+---
+ Network/DNS/Resolver.hs | 13 +++++++++++--
+ dns.cabal | 4 ++++
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
+index 70ab9ed..9b27336 100644
+--- a/Network/DNS/Resolver.hs
++++ b/Network/DNS/Resolver.hs
+@@ -41,6 +41,8 @@ import Network.Socket.ByteString.Lazy
+ import Prelude hiding (lookup)
+ import System.Random
+ import System.Timeout
++import System.Process (readProcess)
++import System.Directory
+
+ #if mingw32_HOST_OS == 1
+ import Network.Socket (send)
+@@ -73,7 +75,7 @@ data ResolvConf = ResolvConf {
+ -}
+ defaultResolvConf :: ResolvConf
+ defaultResolvConf = ResolvConf {
+- resolvInfo = RCFilePath "/etc/resolv.conf"
++ resolvInfo = RCFilePath "/system/etc/resolv.conf"
+ , resolvTimeout = 3 * 1000 * 1000
+ , resolvBufsize = 512
+ }
+@@ -111,7 +113,14 @@ makeResolvSeed conf = ResolvSeed <$> addr
+ where
+ addr = case resolvInfo conf of
+ RCHostName numhost -> makeAddrInfo numhost
+- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
++ RCFilePath file -> do
++ exists <- doesFileExist file
++ if exists
++ then toAddr <$> readFile file >>= makeAddrInfo
++ else do
++ s <- readProcess "getprop" ["net.dns1"] ""
++ makeAddrInfo $ takeWhile (/= '\n') s
++
+ toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
+ in extract l
+ extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
+diff --git a/dns.cabal b/dns.cabal
+index 40671f6..2c19734 100644
+--- a/dns.cabal
++++ b/dns.cabal
+@@ -34,6 +34,8 @@ library
+ , network >= 2.3
+ , network-conduit
+ , random
++ , process
++ , directory
+ else
+ Build-Depends: base >= 4 && < 5
+ , attoparsec
+@@ -49,6 +51,8 @@ library
+ , network-bytestring
+ , network-conduit
+ , random
++ , process
++ , directory
+ Source-Repository head
+ Type: git
+ Location: git://github.com/kazu-yamamoto/dns.git
+--
+1.7.10.4
+
diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages
index 80c7d88c2..ef43d87c1 100755
--- a/standalone/android/install-haskell-packages
+++ b/standalone/android/install-haskell-packages
@@ -158,7 +158,7 @@ install_pkgs () {
onlycross unpatched data-endian-0.0.1
unpatched hinotify-0.3.5
patched iproute 1.2.11
- unpatched DNS
+ unpatched dns 0.3.6
cd ..
rm -rf tmp