diff options
Diffstat (limited to 'standalone/android')
5 files changed, 190 insertions, 39 deletions
diff --git a/standalone/android/cabal.config b/standalone/android/cabal.config new file mode 100644 index 000000000..b0a8ffb7f --- /dev/null +++ b/standalone/android/cabal.config @@ -0,0 +1,159 @@ +constraints: Crypto ==4.2.5.1, + DAV ==1.0.2, + HTTP ==4000.2.18, + HUnit ==1.2.5.2, + IfElse ==0.85, + MissingH ==1.2.1.0, + MonadRandom ==0.3, + QuickCheck ==2.7.6, + SHA ==1.6.4.1, + SafeSemaphore ==0.10.1, + aeson ==0.6.2.1, + appar ==0.1.4, + array ==0.4.0.0, + asn1-encoding ==0.8.1.3, + asn1-parse ==0.8.1, + asn1-types ==0.2.3, + async ==2.0.1.6, + attoparsec ==0.11.1.0, + base ==4.5.0.0, + base64-bytestring ==1.0.0.1, + bifunctors ==4.1.1.1, + binary ==0.5.1.0, + blaze-builder ==0.3.1.0, + blaze-html ==0.7.0.3, + blaze-markup ==0.6.1.1, + bloomfilter ==2.0.0.0, + byteable ==0.1.1, + byteorder ==1.0.4, + bytestring ==0.9.2.1, + case-insensitive ==1.2.0.1, + cereal ==0.4.1.0, + cipher-aes ==0.2.8, + cipher-des ==0.0.6, + cipher-rc4 ==0.1.4, + comonad ==4.2.2, + conduit ==1.2.1, + conduit-extra ==1.1.4, + connection ==0.2.3, + containers ==0.4.2.1, + contravariant ==1.2, + cookie ==0.4.1.4, + cprng-aes ==0.5.2, + crypto-cipher-types ==0.0.9, + crypto-numbers ==0.2.3, + crypto-pubkey ==0.2.4, + crypto-pubkey-types ==0.4.2.2, + crypto-random ==0.0.8, + cryptohash ==0.11.6, + data-default ==0.5.3, + data-default-class ==0.0.1, + data-default-instances-base ==0.0.1, + data-default-instances-containers ==0.0.1, + data-default-instances-dlist ==0.0.1, + data-default-instances-old-locale ==0.0.1, + dataenc ==0.14.0.7, + deepseq ==1.3.0.0, + directory ==1.2.1.0, + distributive ==0.4.4, + dlist ==0.7.1, + dns ==1.4.4, + edit-distance ==0.2.1.2, + either ==4.3.1, + errors ==1.4.7, + exceptions ==0.6.1, + feed ==0.3.9.2, + filepath ==1.3.0.0, + free ==4.9, + ghc-prim ==0.2.0.0, + git-annex ==5.20141013, + gnuidn ==0.2.1, + gnutls ==0.1.5, + gsasl ==0.3.5, + hS3 ==0.5.9, + hashable ==1.2.2.0, + hinotify ==0.3.7, + hslogger ==1.2.4, + http-client ==0.4.0.1, + http-client-tls ==0.2.2, + http-conduit ==2.1.4.5, + http-types ==0.8.5, + hxt ==9.3.1.7, + hxt-charproperties ==9.2.0.0, + hxt-regex-xmlschema ==9.1.0, + hxt-unicode ==9.0.2.2, + integer-gmp ==0.4.0.0, + iproute ==1.3.1, + json ==0.7, + lens ==4.4.0.2, + libxml-sax ==0.7.5, + lifted-base ==0.2.3.0, + maccatcher ==2.1.5, + mime-types ==0.1.0.4, + mmorph ==1.0.4, + monad-control ==0.3.3.0, + monads-tf ==0.1.0.2, + mtl ==2.1.1, + nats ==0.2, + network ==2.5.0.0, + network-info ==0.2.0.5, + network-multicast ==0.0.11, + network-protocol-xmpp ==0.4.6, + network-uri ==2.5.0.0, + old-locale ==1.0.0.4, + old-time ==1.1.0.0, + parallel ==3.2.0.4, + parsec ==3.1.7, + pem ==0.2.2, + prelude-extras ==0.4, + pretty ==1.1.1.0, + primitive ==0.5.4.0, + process ==1.2.0.0, + profunctors ==4.2.0.1, + publicsuffixlist ==0.1, + random ==1.1, + reflection ==1.5.1, + regex-base ==0.93.2, + regex-compat ==0.95.1, + regex-posix ==0.95.2, + regex-tdfa ==1.2.0, + resourcet ==1.1.2.3, + rts ==1.0, + safe ==0.3.8, + scientific ==0.3.3.1, + securemem ==0.1.3, + semigroupoids ==4.2, + semigroups ==0.15.3, + shakespeare ==2.0.1.1, + socks ==0.5.4, + split ==0.2.2, + stm ==2.4.3, + streaming-commons ==0.1.5, + syb ==0.4.2, + system-fileio ==0.3.14, + system-filepath ==0.4.12, + tagged ==0.7.2, + template-haskell ==2.7.0.0, + text ==0.11.2.0, + tf-random ==0.5, + time ==1.4, + tls ==1.2.9, + transformers ==0.3.0.0, + transformers-base ==0.4.3, + transformers-compat ==0.3.3.4, + unix ==2.5.1.0, + unix-compat ==0.4.1.3, + unordered-containers ==0.2.5.1, + utf8-string ==0.3.7, + uuid ==1.2.4, + vector ==0.10.12.1, + void ==0.6.1, + x509 ==1.4.13, + x509-store ==1.4.4, + x509-system ==1.4.6, + x509-validation ==1.5.0, + xml ==1.3.13, + xml-conduit ==1.2.3, + xml-hamlet ==0.4.0.9, + xml-types ==0.3.4, + zlib ==0.5.4.1 diff --git a/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch b/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch index a00338fab..f58688edc 100644 --- a/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch +++ b/standalone/android/haskell-patches/dns_use-android-net.dns1-command-instead-of-resolv.conf.patch @@ -1,6 +1,6 @@ -From aaef1aadb21a198475a656132ef4488b85b8fd1b Mon Sep 17 00:00:00 2001 +From 99f349066fc960bfa60b4e369bb21431c87d9b59 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Thu, 3 Jul 2014 23:22:47 +0000 +Date: Tue, 14 Oct 2014 03:54:57 +0000 Subject: [PATCH] use android net.dns1 command instead of resolv.conf file Android has no /etc/resolv.conf. Some might have /system/etc/resolv.conf, @@ -14,7 +14,7 @@ since it only uses this library for occasional SRV lookups. 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs -index e4124b8..7aca431 100644 +index 9e8342b..4c6c380 100644 --- a/Network/DNS/Resolver.hs +++ b/Network/DNS/Resolver.hs @@ -19,7 +19,7 @@ module Network.DNS.Resolver ( @@ -23,10 +23,10 @@ index e4124b8..7aca431 100644 import Control.Applicative ((<$>), (<*>), pure) -import Control.Exception (bracket) +import Control.Exception (bracket, catch, IOException) - import qualified Data.ByteString.Char8 as BS import Data.Char (isSpace) import Data.List (isPrefixOf) -@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), SockAddr(..), PortNumber( + import Data.Maybe (fromMaybe) +@@ -33,6 +33,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), SockAddr(..), PortNumber( import Prelude hiding (lookup) import System.Random (getStdRandom, randomR) import System.Timeout (timeout) @@ -34,7 +34,7 @@ index e4124b8..7aca431 100644 #if mingw32_HOST_OS == 1 import Network.Socket (send) -@@ -132,7 +133,13 @@ makeResolvSeed conf = ResolvSeed <$> addr +@@ -133,7 +134,13 @@ makeResolvSeed conf = ResolvSeed <$> addr addr = case resolvInfo conf of RCHostName numhost -> makeAddrInfo numhost Nothing RCHostPort numhost mport -> makeAddrInfo numhost $ Just mport @@ -50,7 +50,7 @@ index e4124b8..7aca431 100644 in extract l extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11 diff --git a/dns.cabal b/dns.cabal -index 0a08a9e..724a3e0 100644 +index fd7d7a3..5ad8a84 100644 --- a/dns.cabal +++ b/dns.cabal @@ -38,6 +38,7 @@ Library diff --git a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch index 4955d45cd..276ed9733 100644 --- a/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch +++ b/standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch @@ -1,16 +1,16 @@ -From add5feeb9ee9b4ffa1b43e4ba04b63e5ac2bfaf7 Mon Sep 17 00:00:00 2001 +From 9569708b67df79185dde603f1305eb84d168eba6 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> -Date: Mon, 14 Jul 2014 20:45:24 +0000 +Date: Tue, 14 Oct 2014 01:07:34 +0000 Subject: [PATCH] hack for bionic --- Data/UnixTime/Types.hsc | 12 ------------ cbits/conv.c | 2 +- - unix-time.cabal | 1 - - 3 files changed, 1 insertion(+), 14 deletions(-) + unix-time.cabal | 2 -- + 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc -index 2ad0623..04fd766 100644 +index aa64970..ddca145 100644 --- a/Data/UnixTime/Types.hsc +++ b/Data/UnixTime/Types.hsc @@ -12,8 +12,6 @@ import Data.Binary @@ -21,8 +21,8 @@ index 2ad0623..04fd766 100644 - -- | -- Data structure for Unix time. - data UnixTime = UnixTime { -@@ -23,16 +21,6 @@ data UnixTime = UnixTime { + -- +@@ -33,16 +31,6 @@ data UnixTime = UnixTime { , utMicroSeconds :: {-# UNPACK #-} !Int32 } deriving (Eq,Ord,Show) @@ -40,10 +40,10 @@ index 2ad0623..04fd766 100644 instance Binary UnixTime where put (UnixTime (CTime sec) msec) = do diff --git a/cbits/conv.c b/cbits/conv.c -index ec31fef..b7bc0f9 100644 +index 669cfda..8fa5f9a 100644 --- a/cbits/conv.c +++ b/cbits/conv.c -@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) { +@@ -98,7 +98,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) { #else strptime(src, fmt, &dst); #endif @@ -53,14 +53,15 @@ index ec31fef..b7bc0f9 100644 size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) { diff --git a/unix-time.cabal b/unix-time.cabal -index 5de3f7c..7a0c244 100644 +index 1061602..588499a 100644 --- a/unix-time.cabal +++ b/unix-time.cabal -@@ -15,7 +15,6 @@ Extra-Tmp-Files: config.log config.status autom4te.cache cbits/config.h +@@ -15,8 +15,6 @@ Extra-Tmp-Files: config.log config.status autom4te.cache cbits/config.h Library Default-Language: Haskell2010 GHC-Options: -Wall -- CC-Options: -fPIC +- if impl(ghc >= 7.8) +- CC-Options: -fPIC Exposed-Modules: Data.UnixTime Other-Modules: Data.UnixTime.Conv Data.UnixTime.Diff diff --git a/standalone/android/haskell-patches/x509-system_support-Android-cert-store.patch b/standalone/android/haskell-patches/x509-system_support-Android-cert-store.patch index b3aa407df..14ed66089 100644 --- a/standalone/android/haskell-patches/x509-system_support-Android-cert-store.patch +++ b/standalone/android/haskell-patches/x509-system_support-Android-cert-store.patch @@ -1,36 +1,27 @@ -From 2c736615e38ee4f582af9d98d7169cf07b84d875 Mon Sep 17 00:00:00 2001 -From: Joey Hess <joey@kitenet.net> -Date: Mon, 10 Feb 2014 23:27:32 +0000 +From 61d0e47cd038f25157e48385fc080d0d374b214d Mon Sep 17 00:00:00 2001 +From: dummy <dummy@example.com> +Date: Tue, 14 Oct 2014 02:07:57 +0000 Subject: [PATCH] support Android cert store -Android puts it in a different place and has only hashed files. +Android has only hashsed cert files. See https://github.com/vincenthz/hs-certificate/issues/19 --- - System/X509/Unix.hs | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + System/X509/Unix.hs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/X509/Unix.hs b/System/X509/Unix.hs -index cbf9bbe..cab4f4a 100644 +index 9df3331..a30da26 100644 --- a/System/X509/Unix.hs +++ b/System/X509/Unix.hs -@@ -34,7 +34,7 @@ import qualified Control.Exception as E - import Data.Char - - defaultSystemPath :: FilePath --defaultSystemPath = "/etc/ssl/certs/" -+defaultSystemPath = "/system/etc/security/cacerts/" - - envPathOverride :: String - envPathOverride = "SYSTEM_CERTIFICATE_PATH" -@@ -46,7 +46,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten +@@ -56,7 +56,7 @@ listDirectoryCerts path = do && isDigit (s !! 9) && (s !! 8) == '.' && all isHexDigit (take 8 s) - isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x) + isCert x = (not $ isPrefixOf "." x) - getSystemCertificateStore :: IO CertificateStore - getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates) + getDirContents = E.catch (Just <$> getDirectoryContents path) emptyPaths + where emptyPaths :: E.IOException -> IO (Maybe [FilePath]) -- 1.7.10.4 diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index a7ebbc115..166ef3b15 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -83,7 +83,6 @@ install_pkgs () { rm -rf tmp mkdir tmp cd tmp - patched network patched unix-time patched lifted-base @@ -105,6 +104,7 @@ install_pkgs () { patched x509-system patched persistent-template patched system-filepath + patched optparse-applicative patched wai-app-static patched shakespeare patched shakespeare-css |