diff options
author | Joey Hess <joey@kitenet.net> | 2014-10-14 00:16:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-10-14 00:19:07 -0400 |
commit | 68ddda02769785cca60b3b114ddc091b9670889a (patch) | |
tree | 16605501a3b2182807974ba204783d789fab0b62 /standalone/android/haskell-patches | |
parent | cbf82dba2135acf4d36888421293a25dee636e1e (diff) |
refresh android and no-th haskell patches to latest package versions from cabal
Added a cabal.config file; the result of running cabal freeze.
It's not used yet (needs a newer cabal than is in debian stable),
but the plan is that once the autbuilders are swiched to jessie,
this can be used to make cabal install the same versions of packages
that this patch got building, and so avoid breaking every time eg, yesod is
upgraded.
This commit was sponsored by Daniel Atlas.
Diffstat (limited to 'standalone/android/haskell-patches')
3 files changed, 30 insertions, 38 deletions
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 |