removed the old Android app

Running git-annex linux builds in termux seems to work well enough that the
only reason to keep the Android app would be to support Android 4-5, which
the old Android app supported, and which I don't know if the termux method
works on (although I see no reason why it would not).
According to [1], Android 4-5 remains on around 29% of devices, down from
51% one year ago.

[1] https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/

This is a rather large commit, but mostly very straightfoward removal of
android ifdefs and patches and associated cruft.

Also, removed support for building with very old ghc < 8.0.1, and with
yesod < 1.4.3, and without concurrent-output, which were only being used
by the cross build.

Some documentation specific to the Android app (screenshots etc) needs
to be updated still.

This commit was sponsored by Brett Eisenberg on Patreon.
This commit is contained in:
Joey Hess 2018-10-13 01:36:06 -04:00
parent aaa841e60a
commit 38d691a10f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
124 changed files with 81 additions and 12472 deletions

1
.gitignore vendored
View file

@ -7,7 +7,6 @@ test
Build/SysConfig
Build/Version
Build/InstallDesktopFile
Build/EvilSplicer
Build/Standalone
Build/OSXMkLibs
Build/LinuxMkLibs

View file

@ -5,8 +5,6 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Annex.Environment where
import Annex.Common
@ -37,14 +35,8 @@ checkEnvironmentIO = whenM (isNothing <$> myUserGecos) $ do
ensureEnv "GIT_AUTHOR_NAME" username
ensureEnv "GIT_COMMITTER_NAME" username
where
#ifndef __ANDROID__
-- existing environment is not overwritten
ensureEnv var val = setEnv var val False
#else
-- Environment setting is broken on Android, so this is dealt with
-- in runshell instead.
ensureEnv _ _ = noop
#endif
{- Runs an action that commits to the repository, and if it fails,
- sets user.email and user.name to a dummy value and tries the action again. -}

View file

@ -14,6 +14,7 @@ import Git
import Git.Types
import Git.Index
import Git.Env
import Utility.Env
import qualified Annex
import qualified Annex.Queue
@ -27,8 +28,8 @@ withIndexFile f a = do
a
where
-- This is an optimisation. Since withIndexFile is run repeatedly,
-- and addGitEnv uses the slow copyGitEnv when gitEnv is Nothing,
-- we cache the copied environment the first time, and reuse it in
-- and addGitEnv uses the slow getEnvironment when gitEnv is Nothing,
-- we cache the environment the first time, and reuse it in
-- subsequent calls.
--
-- (This could be done at another level; eg when creating the
@ -40,7 +41,7 @@ withIndexFile f a = do
Nothing -> do
e <- Annex.withState $ \s -> case Annex.cachedgitenv s of
Nothing -> do
e <- copyGitEnv
e <- getEnvironment
return (s { Annex.cachedgitenv = Just e }, e)
Just e -> return (s, e)
m (g { gitEnv = Just e })

View file

@ -40,7 +40,7 @@ postUpdateAnnexHook = Git.Hook "post-update-annex" "" []
mkHookScript :: String -> String
mkHookScript s = unlines
[ shebang_local
[ shebang
, "# automatically configured by git-annex"
, s
]

View file

@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP, ScopedTypeVariables, DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
module Annex.NumCopies (
module Types.NumCopies,
@ -165,9 +165,7 @@ verifyEnoughCopiesToDrop nolocmsg key removallock need skip preverified tocheck
cont v `catchNonAsync` (throw . DropException)
a `M.catches`
[ M.Handler (\ (e :: AsyncException) -> throwM e)
#if MIN_VERSION_base(4,7,0)
, M.Handler (\ (e :: SomeAsyncException) -> throwM e)
#endif
, M.Handler (\ (DropException e') -> throwM e')
, M.Handler (\ (_e :: SomeException) -> fallback)
]

View file

@ -80,7 +80,7 @@ ensureInstalled = ifM (isJust <$> getEnv "GIT_ANNEX_PACKAGE_INSTALL")
let rungitannexshell var = runshell $ "git-annex-shell -c \"" ++ var ++ "\""
installWrapper (sshdir </> "git-annex-shell") $ unlines
[ shebang_local
[ shebang
, "set -e"
, "if [ \"x$SSH_ORIGINAL_COMMAND\" != \"x\" ]; then"
, rungitannexshell "$SSH_ORIGINAL_COMMAND"
@ -89,7 +89,7 @@ ensureInstalled = ifM (isJust <$> getEnv "GIT_ANNEX_PACKAGE_INSTALL")
, "fi"
]
installWrapper (sshdir </> "git-annex-wrapper") $ unlines
[ shebang_local
[ shebang
, "set -e"
, runshell "\"$@\""
]
@ -124,7 +124,7 @@ installFileManagerHooks program = unlessM osAndroid $ do
where
genNautilusScript scriptdir action =
installscript (scriptdir </> scriptname action) $ unlines
[ shebang_local
[ shebang
, autoaddedcomment
, "exec " ++ program ++ " " ++ action ++ " --notify-start --notify-finish -- \"$@\""
]

View file

@ -5,8 +5,6 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Assistant.Pairing where
import Annex.Common
@ -84,11 +82,7 @@ data PairingInProgress = PairingInProgress
data AddrClass = IPv4AddrClass | IPv6AddrClass
data SomeAddr = IPv4Addr HostAddress
{- My Android build of the Network library does not currently have IPV6
- support. -}
#ifndef __ANDROID__
| IPv6Addr HostAddress6
#endif
deriving (Ord, Eq, Read, Show)
{- This contains the whole secret, just lightly obfuscated to make it not

View file

@ -189,7 +189,7 @@ addAuthorizedKeysCommand gitannexshellonly dir pubkey = intercalate "&&"
echoval v = "echo " ++ shellEscape v
wrapper = "~/.ssh/git-annex-shell"
script =
[ shebang_portable
[ shebang
, "set -e"
, "if [ \"x$SSH_ORIGINAL_COMMAND\" != \"x\" ]; then"
, runshell "$SSH_ORIGINAL_COMMAND"

View file

@ -7,7 +7,6 @@
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns, OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Assistant.Threads.WebApp where
@ -69,11 +68,6 @@ webAppThread assistantdata urlrenderer noannex cannotrun postfirstrun listenhost
then pure listenhost
else getAnnex $ annexListen <$> Annex.getGitConfig
tlssettings <- getAnnex getTlsSettings
#ifdef __ANDROID__
when (isJust listenhost') $
-- See Utility.WebApp
giveup "Sorry, --listen is not currently supported on Android"
#endif
webapp <- WebApp
<$> pure assistantdata
<*> genAuthToken 128

View file

@ -165,13 +165,8 @@ postFirstRepositoryR :: Handler Html
postFirstRepositoryR = page "Getting started" (Just Configuration) $ do
unlessM (liftIO $ inPath "git") $
giveup "You need to install git in order to use git-annex!"
#ifdef __ANDROID__
androidspecial <- liftIO $ doesDirectoryExist "/sdcard/DCIM"
let path = "/sdcard/annex"
#else
androidspecial <- liftIO osAndroid
path <- liftIO . defaultRepositoryPath =<< liftH inFirstRun
#endif
((res, form), enctype) <- liftH $ runFormPostNoToken $ newRepositoryForm path
case res of
FormSuccess (RepositoryPath p) -> liftH $
@ -180,12 +175,8 @@ postFirstRepositoryR = page "Getting started" (Just Configuration) $ do
getAndroidCameraRepositoryR :: Handler ()
getAndroidCameraRepositoryR = do
#ifdef __ANDROID__
let dcim = "/sdcard/DCIM"
#else
home <- liftIO myHomeDir
let dcim = home </> "storage" </> "dcim"
#endif
startFullAssistant dcim SourceGroup $ Just addignore
where
addignore = do
@ -392,10 +383,6 @@ driveList = mapM (genRemovableDrive . mnt_dir) =<< filter sane <$> getMounts
| dir == "/tmp" = False
| dir == "/run/shm" = False
| dir == "/run/lock" = False
#ifdef __ANDROID__
| dir == "/mnt/sdcard" = False
| dir == "/sdcard" = False
#endif
| otherwise = True
#endif

View file

@ -116,7 +116,6 @@ sshInputAForm hostnamefield d = normalize <$> gen
bad_username textField
bad_username = "bad user name" :: Text
#ifndef __ANDROID__
bad_hostname = "cannot resolve host name" :: Text
check_hostname = checkM (liftIO . checkdns) hostnamefield
@ -131,10 +130,6 @@ sshInputAForm hostnamefield d = normalize <$> gen
| otherwise -> Right $ T.pack fullname
Just [] -> Right t
Nothing -> Left bad_hostname
#else
-- getAddrInfo currently broken on Android
check_hostname = hostnamefield -- unchecked
#endif
-- The directory is implicitly in home, so remove any leading ~/
normalize i = i { inputDirectory = normalizedir <$> inputDirectory i }

View file

@ -5,7 +5,7 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes, TemplateHaskell, OverloadedStrings #-}
module Assistant.WebApp.Configurators.Upgrade where
@ -15,22 +15,11 @@ import Assistant.Upgrade
import Assistant.Restart
import Config
{- On Android, just point the user at the apk file to download.
- Installation will be handled by selecting the downloaded file.
-
- Otherwise, start the upgrade process, which will run fully
- noninteractively.
- -}
{- Start the upgrade process. -}
getConfigStartUpgradeR :: GitAnnexDistribution -> Handler Html
getConfigStartUpgradeR d = do
#ifdef ANDROID_SPLICES
let url = distributionUrl d
page "Upgrade" (Just Configuration) $
$(widgetFile "configurators/upgrade/android")
#else
liftAssistant $ startDistributionDownload d
redirect DashboardR
#endif
{- Finish upgrade by starting the new assistant in the same repository this
- one is running in, and redirecting to it. -}

View file

@ -5,7 +5,7 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes, CPP #-}
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes #-}
module Assistant.WebApp.Page where
@ -71,12 +71,5 @@ customPage' with_longpolling navbaritem content = do
where
navdetails i = (navBarName i, navBarRoute i, Just i == navbaritem)
hasFileBrowser :: Bool
#ifdef ANDROID_SPLICES
hasFileBrowser = False
#else
hasFileBrowser = True
#endif
controlMenu :: Widget
controlMenu = $(widgetFile "controlmenu")

View file

@ -1,738 +0,0 @@
{- Expands template haskell splices
-
- You should probably just use http://hackage.haskell.org/package/zeroth
- instead. I wish I had known about it before writing this.
-
- First, the code must be built with a ghc that supports TH,
- and the splices dumped to a log. For example:
- cabal build --ghc-options=-ddump-splices 2>&1 | tee log
-
- Along with the log, a headers file may also be provided, containing
- additional imports needed by the template haskell code.
-
- This program will parse the log, and expand all splices therein,
- writing files to the specified destdir (which can be "." to modify
- the source tree directly). They can then be built a second
- time, with a ghc that does not support TH.
-
- Note that template haskell code may refer to symbols that are not
- exported by the library that defines the TH code. In this case,
- the library has to be modifed to export those symbols.
-
- There can also be other problems with the generated code; it may
- need modifications to compile.
-
-
- Copyright 2013 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Main where
import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
import Data.Either
import Data.List hiding (find)
import Data.Char
import System.Environment
import System.FilePath
import System.IO
import Control.Monad
import Prelude hiding (log)
import Utility.Monad
import Utility.Misc
import Utility.Exception hiding (try)
import Utility.Path
import Utility.FileSystemEncoding
import Utility.Directory
import Utility.Split
data Coord = Coord
{ coordLine :: Int
, coordColumn :: Int
}
deriving (Read, Show)
offsetCoord :: Coord -> Coord -> Coord
offsetCoord a b = Coord
(coordLine a - coordLine b)
(coordColumn a - coordColumn b)
data SpliceType = SpliceExpression | SpliceDeclaration
deriving (Read, Show, Eq)
data Splice = Splice
{ splicedFile :: FilePath
, spliceStart :: Coord
, spliceEnd :: Coord
, splicedExpression :: String
, splicedCode :: String
, spliceType :: SpliceType
}
deriving (Read, Show)
isExpressionSplice :: Splice -> Bool
isExpressionSplice s = spliceType s == SpliceExpression
number :: Parser Int
number = read <$> many1 digit
{- A pair of Coords is written in one of three ways:
- "95:21-73", "1:1", or "(92,25)-(94,2)"
-}
coordsParser :: Parser (Coord, Coord)
coordsParser = (try singleline <|> try weird <|> multiline) <?> "Coords"
where
singleline = do
line <- number
void $ char ':'
startcol <- number
void $ char '-'
endcol <- number
return $ (Coord line startcol, Coord line endcol)
weird = do
line <- number
void $ char ':'
col <- number
return $ (Coord line col, Coord line col)
multiline = do
start <- fromparens
void $ char '-'
end <- fromparens
return $ (start, end)
fromparens = between (char '(') (char ')') $ do
line <- number
void $ char ','
col <- number
return $ Coord line col
indent :: Parser String
indent = many1 $ char ' '
restOfLine :: Parser String
restOfLine = newline `after` many (noneOf "\n")
indentedLine :: Parser String
indentedLine = indent >> restOfLine
spliceParser :: Parser Splice
spliceParser = do
file <- many1 (noneOf ":\n")
void $ char ':'
(start, end) <- coordsParser
void $ string ": Splicing "
splicetype <- tosplicetype
<$> (string "expression" <|> string "declarations")
void newline
getthline <- expressionextractor
expression <- unlines <$> many1 getthline
void indent
void $ string "======>"
void newline
getcodeline <- expressionextractor
realcoords <- try (Right <$> getrealcoords file) <|> (Left <$> getcodeline)
codelines <- many getcodeline
return $ case realcoords of
Left firstcodeline ->
Splice file start end expression
(unlines $ firstcodeline:codelines)
splicetype
Right (realstart, realend) ->
Splice file realstart realend expression
(unlines codelines)
splicetype
where
tosplicetype "declarations" = SpliceDeclaration
tosplicetype "expression" = SpliceExpression
tosplicetype s = error $ "unknown splice type: " ++ s
{- All lines of the indented expression start with the same
- indent, which is stripped. Any other indentation is preserved. -}
expressionextractor = do
i <- lookAhead indent
return $ try $ do
void $ string i
restOfLine
{- When splicing declarations, GHC will output a splice
- at 1:1, and then inside the splice code block,
- the first line will give the actual coordinates of the
- line that was spliced. -}
getrealcoords file = do
void indent
void $ string file
void $ char ':'
char '\n' `after` coordsParser
{- Extracts the splices, ignoring the rest of the compiler output. -}
splicesExtractor :: Parser [Splice]
splicesExtractor = rights <$> many extract
where
extract = try (Right <$> spliceParser) <|> (Left <$> compilerJunkLine)
compilerJunkLine = restOfLine
{- Modifies the source file, expanding the splices, which all must
- have the same splicedFile. Writes the new file to the destdir.
-
- Each splice's Coords refer to the original position in the file,
- and not to its position after any previous splices may have inserted
- or removed lines.
-
- To deal with this complication, the file is broken into logical lines
- (which can contain any String, including a multiline or empty string).
- Each splice is assumed to be on its own block of lines; two
- splices on the same line is not currently supported.
- This means that a splice can modify the logical lines within its block
- as it likes, without interfering with the Coords of other splices.
-
- As well as expanding splices, this can add a block of imports to the
- file. These are put right before the first line in the file that
- starts with "import "
-}
applySplices :: FilePath -> Maybe String -> [Splice] -> IO ()
applySplices _ _ [] = noop
applySplices destdir imports splices@(first:_) = do
let f = splicedFile first
let dest = (destdir </> f)
lls <- map (++ "\n") . lines <$> readFileStrict f
createDirectoryIfMissing True (parentDir dest)
let newcontent = concat $ addimports $ expand lls splices
oldcontent <- catchMaybeIO $ readFileStrict dest
when (oldcontent /= Just newcontent) $ do
putStrLn $ "splicing " ++ f
withFile dest WriteMode $ \h -> do
hPutStr h newcontent
hClose h
where
expand lls [] = lls
expand lls (s:rest)
| isExpressionSplice s = expand (expandExpressionSplice s lls) rest
| otherwise = expand (expandDeclarationSplice s lls) rest
addimports lls = case imports of
Nothing -> lls
Just v ->
let (start, end) = break ("import " `isPrefixOf`) lls
in if null end
then start
else concat
[ start
, [v]
, end
]
{- Declaration splices are expanded to replace their whole line. -}
expandDeclarationSplice :: Splice -> [String] -> [String]
expandDeclarationSplice s lls = concat [before, [splice], end]
where
cs = spliceStart s
ce = spliceEnd s
(before, rest) = splitAt (coordLine cs - 1) lls
(_oldlines, end) = splitAt (1 + coordLine (offsetCoord ce cs)) rest
splice = mangleCode $ splicedCode s
{- Expression splices are expanded within their line. -}
expandExpressionSplice :: Splice -> [String] -> [String]
expandExpressionSplice sp lls = concat [before, spliced:padding, end]
where
cs = spliceStart sp
ce = spliceEnd sp
(before, rest) = splitAt (coordLine cs - 1) lls
(oldlines, end) = splitAt (1 + coordLine (offsetCoord ce cs)) rest
(splicestart, padding, spliceend) = case map expandtabs oldlines of
ss:r
| null r -> (ss, [], ss)
| otherwise -> (ss, take (length r) (repeat []), last r)
_ -> ([], [], [])
spliced = concat
[ joinsplice $ deqqstart $ take (coordColumn cs - 1) splicestart
, addindent (findindent splicestart) (mangleCode $ splicedCode sp)
, deqqend $ drop (coordColumn ce) spliceend
]
{- coordinates assume tabs are expanded to 8 spaces -}
expandtabs = replace "\t" (take 8 $ repeat ' ')
{- splicing leaves $() quasiquote behind; remove it -}
deqqstart s = case reverse s of
('(':'$':restq) -> reverse restq
_ -> s
deqqend (')':s) = s
deqqend s = s
{- Prepare the code that comes just before the splice so
- the splice will combine with it appropriately. -}
joinsplice s
-- all indentation? Skip it, we'll use the splice's indentation
| all isSpace s = ""
-- function definition needs no preparation
-- ie: foo = $(splice)
| "=" `isSuffixOf` s' = s
-- nor does lambda definition or case expression
| "->" `isSuffixOf` s' = s
-- nor does a let .. in declaration
| "in" `isSuffixOf` s' = s
-- already have a $ to set off the splice
-- ie: foo $ $(splice)
| "$" `isSuffixOf` s' = s
-- need to add a $ to set off the splice
-- ie: bar $(splice)
| otherwise = s ++ " $ "
where
s' = filter (not . isSpace) s
findindent = length . takeWhile isSpace
addindent n = unlines . map (i ++) . lines
where
i = take n $ repeat ' '
{- Tweaks code output by GHC in splices to actually build. Yipes. -}
mangleCode :: String -> String
mangleCode = flip_colon
. persist_dequalify_hack
. let_do
. remove_unnecessary_type_signatures
. lambdaparenhackyesod
. lambdaparenhackpersistent
. lambdaparens
. declaration_parens
. case_layout
. case_layout_multiline
. yesod_url_render_hack
. text_builder_hack
. nested_instances
. boxed_fileembed
. collapse_multiline_strings
. remove_package_version
. emptylambda
where
{- Lambdas are often output without parens around them.
- This breaks when the lambda is immediately applied to a
- parameter.
-
- For example:
-
- renderRoute (StaticR sub_a1nUH)
- = \ (a_a1nUI, b_a1nUJ)
- -> (((pack "static") : a_a1nUI),
- b_a1nUJ)
- (renderRoute sub_a1nUH)
-
- There are sometimes many lines of lambda code that need to be
- parenthesised. Approach: find the "->" and scan down the
- column to the first non-whitespace. This is assumed
- to be the expression after the lambda.
-
- Runs recursively on the body of the lambda, to handle nested
- lambdas.
-}
lambdaparens = parsecAndReplace $ do
-- skip lambdas inside tuples or parens
prefix <- noneOf "(, \n"
preindent <- many1 $ oneOf " \n"
void $ string "\\ "
lambdaparams <- restofline
continuedlambdaparams <- many $ try $ do
indent1 <- many1 $ char ' '
p <- satisfy isLetter
aram <- many $ satisfy isAlphaNum <|> oneOf "_"
void newline
return $ indent1 ++ p:aram ++ "\n"
indent1 <- many1 $ char ' '
void $ string "-> "
firstline <- restofline
lambdalines <- many $ try $ do
void $ string indent1
void $ char ' '
l <- restofline
return $ indent1 ++ " " ++ l
return $ concat
[ prefix:preindent
, "(\\ " ++ lambdaparams ++ "\n"
, concat continuedlambdaparams
, indent1 ++ "-> "
, lambdaparens $ intercalate "\n" (firstline:lambdalines)
, ")\n"
]
{- Hack to add missing parens in a specific case in yesod
- static route code.
-
- StaticR
- yesod_dispatch_env_a4iDV
- (\ p_a4iE2 r_a4iE3
- -> r_a4iE3
- {Network.Wai.pathInfo = p_a4iE2}
- xrest_a4iDT req_a4iDW)) }
-
- Need to add another paren around the lambda, and close it
- before its parameters. lambdaparens misses this one because
- there is already one paren present.
-
- Note that the { } may be on the same line, or wrapped to next.
-
- FIXME: This is a hack. lambdaparens could just always add a
- layer of parens even when a lambda seems to be in parent.
-}
lambdaparenhackyesod = parsecAndReplace $ do
indent1 <- many1 $ char ' '
staticr <- string "StaticR"
void newline
void $ string indent1
yesod_dispatch_env <- restofline
void $ string indent1
lambdaprefix <- string "(\\ "
l1 <- restofline
void $ string indent1
lambdaarrow <- string " ->"
l2 <- restofline
l3 <- if '{' `elem` l2 && '}' `elem` l2
then return ""
else do
void $ string indent1
restofline
return $ unlines
[ indent1 ++ staticr
, indent1 ++ yesod_dispatch_env
, indent1 ++ "(" ++ lambdaprefix ++ l1
, indent1 ++ lambdaarrow ++ l2 ++ l3 ++ ")"
]
{- Hack to reorder misplaced paren in persistent code.
-
- = ((Right Fscked)
- (\ persistValue_a36iM
- -> case fromPersistValue persistValue_a36iM of {
- Right r_a36iN -> Right r_a36iN
- Left err_a36iO
- -> (Left
- $ ((("field " `Data.Monoid.mappend` (packPTH "key"))
- `Data.Monoid.mappend` ": ")
- `Data.Monoid.mappend` err_a36iO)) }
- x_a36iL))
-
- Fixed by adding another level of params around the lambda
- (lambdaparams should be generalized to cover this case).
-}
lambdaparenhackpersistent = parsecAndReplace $ do
indent1 <- many1 $ char ' '
start <- do
s1 <- string "(\\ "
s2 <- string "persistValue_"
s3 <- restofline
return $ s1 ++ s2 ++ s3
void $ string indent1
indent2 <- many1 $ char ' '
void $ string "-> "
l1 <- restofline
lambdalines <- many $ try $ do
void $ string $ indent1 ++ indent2 ++ " "
l <- restofline
return $ indent1 ++ indent2 ++ " " ++ l
return $ concat
[ indent1 ++ "(" ++ start ++ "\n"
, indent1 ++ indent2 ++ "-> " ++ l1 ++ "\n"
, intercalate "\n" lambdalines
, ")\n"
]
restofline = manyTill (noneOf "\n") newline
{- For some reason, GHC sometimes doesn't like the multiline
- strings it creates. It seems to get hung up on \{ at the
- start of a new line sometimes, wanting it to not be escaped.
-
- To work around what is likely a GHC bug, just collapse
- multiline strings. -}
collapse_multiline_strings = parsecAndReplace $ do
void $ string "\\\n"
void $ many1 $ oneOf " \t"
void $ string "\\"
return "\\n"
{- GHC outputs splices using explicit braces rather than layout.
- For a case expression, it does something weird:
-
- case foo of {
- xxx -> blah
- yyy -> blah };
-
- This is not legal Haskell; the statements in the case must be
- separated by ';'
-
- To fix, we could just put a semicolon at the start of every line
- containing " -> " ... Except that lambdas also contain that.
- But we can get around that: GHC outputs lambdas like this:
-
- \ foo
- -> bar
-
- Or like this:
-
- \ foo -> bar
-
- So, we can put the semicolon at the start of every line
- containing " -> " unless there's a "\ " first, or it's
- all whitespace up until it.
-}
case_layout = skipfree $ parsecAndReplace $ do
void newline
indent1 <- many1 $ char ' '
prefix <- manyTill (noneOf "\n") (try (string "-> "))
if length prefix > 20
then unexpected "too long a prefix"
else if "\\ " `isInfixOf` prefix
then unexpected "lambda expression"
else if null prefix
then unexpected "second line of lambda"
else return $ "\n" ++ indent1 ++ "; " ++ prefix ++ " -> "
{- Sometimes cases themselves span multiple lines:
-
- Nothing
- -> foo
-
- -- This is not yet handled!
- ComplexConstructor var var
- var var
- -> foo
-}
case_layout_multiline = skipfree $ parsecAndReplace $ do
void newline
indent1 <- many1 $ char ' '
firstline <- restofline
void $ string indent1
indent2 <- many1 $ char ' '
void $ string "-> "
if "\\ " `isInfixOf` firstline
then unexpected "lambda expression"
else return $ "\n" ++ indent1 ++ "; " ++ firstline ++ "\n"
++ indent1 ++ indent2 ++ "-> "
{- Type definitions for free monads triggers the case_* hacks, avoid. -}
skipfree f s
| "MonadFree" `isInfixOf` s = s
| otherwise = f s
{- (foo, \ -> bar) is not valid haskell, GHC.
- Change to (foo, bar)
-
- (Does this ever happen outside a tuple? Only saw
- it inside them..
-}
emptylambda = replace ", \\ -> " ", "
{- GHC may output this:
-
- instance RenderRoute WebApp where
- data instance Route WebApp
- ^^^^^^^^
- The marked word should not be there.
-
- FIXME: This is a yesod and persistent-specific hack,
- it should look for the outer instance.
-}
nested_instances = replace " data instance Route" " data Route"
. replace " data instance Unique" " data Unique"
. replace " data instance EntityField" " data EntityField"
. replace " type instance PersistEntityBackend" " type PersistEntityBackend"
{- GHC does not properly parenthesise generated data type
- declarations. -}
declaration_parens = replace "StaticR Route Static" "StaticR (Route Static)"
{- A type signature is sometimes given for an entire lambda,
- which is not properly parenthesized or laid out. This is a
- hack to remove one specific case where this happens and the
- signature is easily inferred, so is just removed.
-}
remove_unnecessary_type_signatures = parsecAndReplace $ do
void $ string " ::"
void newline
void $ many1 $ char ' '
void $ string "Text.Css.Block Text.Css.Resolved"
void newline
return ""
{- GHC may add full package and version qualifications for
- symbols from unimported modules. We don't want these.
-
- Examples:
- "blaze-html-0.4.3.1:Text.Blaze.Internal.preEscapedText"
- "ghc-prim:GHC.Types.:"
-}
remove_package_version = parsecAndReplace $
mangleSymbol <$> qualifiedSymbol
mangleSymbol "GHC.Types." = ""
mangleSymbol "GHC.Tuple." = ""
mangleSymbol s = s
qualifiedSymbol :: Parser String
qualifiedSymbol = do
s <- hstoken
void $ char ':'
if length s < 5
then unexpected "too short to be a namespace"
else do
t <- hstoken
case t of
(c:r) | isUpper c && "." `isInfixOf` r -> return t
_ -> unexpected "not a module qualified symbol"
hstoken :: Parser String
hstoken = do
t <- satisfy isLetter
oken <- many $ satisfy isAlphaNum <|> oneOf "-.'"
return $ t:oken
{- This works when it's "GHC.Types.:", but we strip
- that above, so have to fix up after it here.
- The ; is added by case_layout. -}
flip_colon = replace "; : _ " "; _ : "
{- TH for persistent has some qualified symbols in places
- that are not allowed. -}
persist_dequalify_hack = replace "Database.Persist.TH.++" "`Data.Text.append`"
. replace "Database.Persist.Sql.Class.sqlType" "sqlType"
. replace "Database.Persist.Class.PersistField.toPersistValue" "toPersistValue"
. replace "Database.Persist.Class.PersistField.fromPersistValue" "fromPersistValue"
{- Sometimes generates invalid bracketed code with a let
- expression:
-
- foo = do { let x = foo;
- use foo }
-
- Fix by converting the "let x = " to "x <- return $"
-}
let_do = parsecAndReplace $ do
void $ string "= do { let "
x <- many $ noneOf "=\r\n"
_ <- many1 $ oneOf " \t\r\n"
void $ string "= "
return $ "= do { " ++ x ++ " <- return $ "
{- Embedded files use unsafe packing, which is problematic
- for several reasons, including that GHC sometimes omits trailing
- newlines in the file content, which leads to the wrong byte
- count. Also, GHC sometimes outputs unicode characters, which
- are not legal in unboxed strings.
-
- Avoid problems by converting:
- GHC.IO.unsafePerformIO
- (Data.ByteString.Unsafe.unsafePackAddressLen
- lllll
- "blabblah"#)),
- to:
- Data.ByteString.Char8.pack "blabblah"),
-
- Note that the string is often multiline. This only works if
- collapse_multiline_strings has run first.
-}
boxed_fileembed :: String -> String
boxed_fileembed = parsecAndReplace $ do
i <- indent
void $ string "GHC.IO.unsafePerformIO"
void newline
void indent
void $ string "(Data.ByteString.Unsafe.unsafePackAddressLen"
void newline
void indent
void number
void newline
void indent
void $ char '"'
s <- restOfLine
let s' = take (length s - 5) s
if "\"#))," `isSuffixOf` s
then return (i ++ "Data.ByteString.Char8.pack \"" ++ s' ++ "\"),\n")
else fail "not an unboxed string"
{- This works around a problem in the expanded template haskell for Yesod
- type-safe url rendering.
-
- It generates code like this:
-
- (toHtml
- (\ u_a2ehE -> urender_a2ehD u_a2ehE []
- (CloseAlert aid)))));
-
- Where urender_a2ehD is the function returned by getUrlRenderParams.
- But, that function that only takes 2 params, not 3.
- And toHtml doesn't take a parameter at all!
-
- So, this modifes the code, to look like this:
-
- (toHtml
- (flip urender_a2ehD []
- (CloseAlert aid)))));
-
- FIXME: Investigate and fix this properly.
-}
yesod_url_render_hack :: String -> String
yesod_url_render_hack = parsecAndReplace $ do
void $ string "(toHtml"
void whitespace
void $ string "(\\"
void whitespace
wtf <- hstoken
void whitespace
void $ string "->"
void whitespace
renderer <- hstoken
void whitespace
void $ string wtf
void whitespace
return $ "(toHtml (flip " ++ renderer ++ " "
where
whitespace :: Parser String
whitespace = many $ oneOf " \t\r\n"
hstoken :: Parser String
hstoken = many1 $ satisfy isAlphaNum <|> oneOf "_"
{- Use exported symbol. -}
text_builder_hack :: String -> String
text_builder_hack = replace "Data.Text.Lazy.Builder.Internal.fromText" "Data.Text.Lazy.Builder.fromText"
{- Given a Parser that finds strings it wants to modify,
- and returns the modified string, does a mass
- find and replace throughout the input string.
- Rather slow, but crazy powerful. -}
parsecAndReplace :: Parser String -> String -> String
parsecAndReplace p s = case parse find "" s of
Left _e -> s
Right l -> concatMap (either return id) l
where
find :: Parser [Either Char String]
find = many $ try (Right <$> p) <|> (Left <$> anyChar)
main :: IO ()
main = do
useFileSystemEncoding
go =<< getArgs
where
go (destdir:log:header:[]) = run destdir log (Just header)
go (destdir:log:[]) = run destdir log Nothing
go _ = error "usage: EvilSplicer destdir logfile [headerfile]"
run destdir log mheader = do
r <- parseFromFile splicesExtractor log
case r of
Left e -> error $ show e
Right splices -> do
let groups = groupBy (\a b -> splicedFile a == splicedFile b) splices
imports <- maybe (return Nothing) (catchMaybeIO . readFile) mheader
mapM_ (applySplices destdir imports) groups

View file

@ -62,11 +62,6 @@ buildFlags = filter (not . null)
#ifdef WITH_DESKTOP_NOTIFY
, "DesktopNotify"
#endif
#ifdef WITH_CONCURRENTOUTPUT
, "ConcurrentOutput"
#else
#warning Building without ConcurrentOutput
#endif
#ifdef WITH_TORRENTPARSER
, "TorrentParser"
#endif

View file

@ -1,3 +1,12 @@
git-annex (6.20181012) UNRELEASED; urgency=medium
* Removed the old Android app.
* Removed support for building with very old ghc < 8.0.1,
and with yesod < 1.4.3, and without concurrent-output,
which were onyl being used for the Android cross build.
-- Joey Hess <id@joeyh.name> Sat, 13 Oct 2018 00:52:02 -0400
git-annex (6.20181011) upstream; urgency=medium
* sync: Warn when a remote's export is not updated to the current

View file

@ -33,7 +33,7 @@ Files: Utility/*
Copyright: 2012-2018 Joey Hess <id@joeyh.name>
License: BSD-2-clause
Files: doc/logo* */favicon.ico standalone/osx/git-annex.app/Contents/Resources/git-annex.icns standalone/android/icons/*
Files: doc/logo* */favicon.ico standalone/osx/git-annex.app/Contents/Resources/git-annex.icns
Copyright: 2007 Henrik Nyh <http://henrik.nyh.se/>
2010 Joey Hess <id@joeyh.name>
2013 John Lawrence

View file

@ -24,10 +24,7 @@ import Control.Concurrent.STM
import Control.Exception (throwIO)
import Data.Either
import qualified Data.Map.Strict as M
#ifdef WITH_CONCURRENTOUTPUT
import qualified System.Console.Regions as Regions
#endif
{- Runs a command, starting with the check stage, and then
- the seek stage. Finishes by running the continutation, and
@ -169,7 +166,6 @@ callCommandActionQuiet = start
{- Do concurrent output when that has been requested. -}
allowConcurrentOutput :: Annex a -> Annex a
#ifdef WITH_CONCURRENTOUTPUT
allowConcurrentOutput a = do
fromcmdline <- Annex.getState Annex.concurrency
fromgitcfg <- annexJobs <$> Annex.getGitConfig
@ -197,9 +193,6 @@ allowConcurrentOutput a = do
setconcurrentoutputenabled False
setconcurrentoutputenabled b = Annex.changeState $ \s ->
s { Annex.output = (Annex.output s) { concurrentOutputEnabled = b } }
#else
allowConcurrentOutput = id
#endif
{- Ensures that only one thread processes a key at a time.
- Other threads will block until it's done. -}

View file

@ -18,7 +18,7 @@ import Annex.Content
import Annex.Perms
import qualified Annex.Queue
import qualified Database.Keys
#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__)
#if ! defined(mingw32_HOST_OS)
import Utility.Touch
#endif
@ -91,7 +91,7 @@ makeHardLink file key = do
fixSymlink :: FilePath -> FilePath -> CommandPerform
fixSymlink file link = do
liftIO $ do
#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__)
#if ! defined(mingw32_HOST_OS)
-- preserve mtime of symlink
mtime <- catchMaybeIO $ TimeSpec . modificationTime
<$> getSymbolicLinkStatus file
@ -99,7 +99,7 @@ fixSymlink file link = do
createDirectoryIfMissing True (parentDir file)
removeFile file
createSymbolicLink link file
#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__)
#if ! defined(mingw32_HOST_OS)
maybe noop (\t -> touch file t False) mtime
#endif
next $ cleanupSymlink file

View file

@ -13,9 +13,7 @@ import "mtl" Control.Monad.State.Strict
import qualified Data.Map.Strict as M
import qualified Data.Vector as V
import Data.Ord
#if MIN_VERSION_base(4,9,0)
import qualified Data.Semigroup as Sem
#endif
import Prelude
import Command
@ -60,26 +58,18 @@ data KeyData = KeyData
, backendsKeys :: M.Map KeyVariety Integer
}
appendKeyData :: KeyData -> KeyData -> KeyData
appendKeyData a b = KeyData
{ countKeys = countKeys a + countKeys b
, sizeKeys = sizeKeys a + sizeKeys b
, unknownSizeKeys = unknownSizeKeys a + unknownSizeKeys b
, backendsKeys = backendsKeys a <> backendsKeys b
}
#if MIN_VERSION_base(4,9,0)
instance Sem.Semigroup KeyData where
(<>) = appendKeyData
#endif
a <> b = KeyData
{ countKeys = countKeys a + countKeys b
, sizeKeys = sizeKeys a + sizeKeys b
, unknownSizeKeys = unknownSizeKeys a + unknownSizeKeys b
, backendsKeys = backendsKeys a <> backendsKeys b
}
instance Monoid KeyData where
mempty = KeyData 0 0 0 M.empty
#if MIN_VERSION_base(4,11,0)
#elif MIN_VERSION_base(4,9,0)
#if ! MIN_VERSION_base(4,11,0)
mappend = (Sem.<>)
#else
mappend = appendKeyData
#endif
data NumCopiesStats = NumCopiesStats

View file

@ -19,9 +19,6 @@ import Assistant.Install
import Annex.Environment
import Utility.WebApp
import Utility.Daemon (checkDaemon)
#ifdef __ANDROID__
import Utility.Env
#endif
import Utility.UserInfo
import Annex.Init
import qualified Git
@ -188,18 +185,7 @@ firstRun o = do
Annex.eval state $
startDaemon True True Nothing Nothing (listenAddress o) $ Just $
sendurlback v
sendurlback v _origout _origerr url _htmlshim = do
recordUrl url
putMVar v url
recordUrl :: String -> IO ()
#ifdef __ANDROID__
{- The Android app has a menu item that opens the url recorded
- in this file. -}
recordUrl url = writeFile "/sdcard/git-annex.home/.git-annex-url" url
#else
recordUrl _ = noop
#endif
sendurlback v _origout _origerr url _htmlshim = putMVar v url
openBrowser :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
openBrowser mcmd htmlshim realurl outh errh = do
@ -207,7 +193,6 @@ openBrowser mcmd htmlshim realurl outh errh = do
openBrowser' mcmd htmlshim' realurl outh errh
openBrowser' :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO ()
#ifndef __ANDROID__
openBrowser' mcmd htmlshim realurl outh errh =
ifM osAndroid
{- Android does not support file:// urls well, but neither
@ -216,20 +201,6 @@ openBrowser' mcmd htmlshim realurl outh errh =
( runbrowser realurl
, runbrowser (fileUrl htmlshim)
)
#else
openBrowser' mcmd htmlshim realurl outh errh = do
recordUrl realurl
{- Android's `am` command does not work reliably across the
- wide range of Android devices. Intead, FIFO should be set to
- the filename of a fifo that we can write the URL to. -}
v <- getEnv "FIFO"
case v of
Nothing -> runbrowser realurl
Just f -> void $ forkIO $ do
fd <- openFd f WriteOnly Nothing defaultFileFlags
void $ fdWrite fd realurl
closeFd fd
#endif
where
runbrowser url = do
let p = case mcmd of

View file

@ -5,8 +5,6 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Git.Env where
import Common
@ -18,28 +16,11 @@ import Utility.Env
- does not have any gitEnv yet. -}
adjustGitEnv :: Repo -> ([(String, String)] -> [(String, String)]) -> IO Repo
adjustGitEnv g adj = do
e <- maybe copyGitEnv return (gitEnv g)
e <- maybe getEnvironment return (gitEnv g)
let e' = adj e
return $ g { gitEnv = Just e' }
where
{- Copies the current environment, so it can be adjusted when running a git
- command. -}
copyGitEnv :: IO [(String, String)]
copyGitEnv = do
#ifdef __ANDROID__
{- This should not be necessary on Android, but there is some
- weird getEnvironment breakage. See
- https://github.com/neurocyte/ghc-android/issues/7
- Use getEnv to get some key environment variables that
- git expects to have. -}
let keyenv = words "USER PATH GIT_EXEC_PATH HOSTNAME HOME"
let getEnvPair k = maybe Nothing (\v -> Just (k, v)) <$> getEnv k
catMaybes <$> forM keyenv getEnvPair
#else
getEnvironment
#endif
addGitEnv :: Repo -> String -> String -> IO Repo
addGitEnv g var val = adjustGitEnv g (addEntry var val)

View file

@ -26,9 +26,7 @@ import qualified Git.Version
import qualified Data.Set as S
import Control.Concurrent.Async
#if MIN_VERSION_base(4,9,0)
import qualified Data.Semigroup as Sem
#endif
import Prelude
data FsckResults
@ -58,18 +56,13 @@ appendFsckOutput AllDuplicateEntriesWarning AllDuplicateEntriesWarning = AllDupl
appendFsckOutput AllDuplicateEntriesWarning NoFsckOutput = AllDuplicateEntriesWarning
appendFsckOutput NoFsckOutput AllDuplicateEntriesWarning = AllDuplicateEntriesWarning
#if MIN_VERSION_base(4,9,0)
instance Sem.Semigroup FsckOutput where
(<>) = appendFsckOutput
#endif
instance Monoid FsckOutput where
mempty = NoFsckOutput
#if MIN_VERSION_base(4,11,0)
#elif MIN_VERSION_base(4,9,0)
#if ! MIN_VERSION_base(4,11,0)
mappend = (Sem.<>)
#else
mappend = appendFsckOutput
#endif
{- Runs fsck to find some of the broken objects in the repository.

View file

@ -109,7 +109,7 @@ clean:
if [ "$(BUILDER)" != ./Setup ] && [ "$(BUILDER)" != cabal ]; then $(BUILDER) clean; fi
rm -rf tmp dist git-annex $(mans) configure *.tix .hpc \
doc/.ikiwiki html dist tags Build/SysConfig Build/Version \
Setup Build/InstallDesktopFile Build/EvilSplicer \
Setup Build/InstallDesktopFile \
Build/Standalone Build/OSXMkLibs Build/LinuxMkLibs \
Build/DistributionUpdate Build/BuildVersion Build/MakeMans \
git-annex-shell git-union-merge .tasty-rerun-log
@ -118,8 +118,6 @@ clean:
Build/InstallDesktopFile: Build/InstallDesktopFile.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
Build/EvilSplicer: Build/EvilSplicer.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
Build/Standalone: Build/Standalone.hs tmp/configure-stamp
$(GHC) --make $@ -Wall -fno-warn-tabs
Build/OSXMkLibs: Build/OSXMkLibs.hs
@ -234,47 +232,6 @@ osxapp:
hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \
-volname git-annex -o tmp/git-annex.dmg
ANDROID_FLAGS?=
# Cross compile for Android.
# Uses https://github.com/neurocyte/ghc-android
android: Build/EvilSplicer
echo "Running native build, to get TH splices.."
if [ ! -e dist/setup/setup ]; then $(BUILDER) configure -O0 $(ANDROID_FLAGS) -fAndroidSplice; fi
mkdir -p tmp
if ! $(BUILDER) build --ghc-options=-ddump-splices 2> tmp/dump-splices; then tail tmp/dump-splices >&2; exit 1; fi
echo "Setting up Android build tree.."
./Build/EvilSplicer tmp/splices tmp/dump-splices standalone/no-th/evilsplicer-headers.hs
rsync -az --exclude tmp --exclude dist . tmp/androidtree
# Copy the files with expanded splices to the source tree, but
# only if the existing source file is not newer. (So, if a file
# used to have TH splices but they were removed, it will be newer,
# and not overwritten.)
cp -uR tmp/splices/* tmp/androidtree || true
# Some additional dependencies needed by the expanded splices.
sed -i 's/^ Build-Depends: */ Build-Depends: yesod-core, yesod-routes, shakespeare, blaze-markup, file-embed, wai-app-static, wai, unordered-containers, /' tmp/androidtree/git-annex.cabal
# Avoid warnings due to sometimes unused imports added for the splices.
sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports /i' tmp/androidtree/git-annex.cabal
sed -i 's/Extensions: /Extensions: MagicHash /i' tmp/androidtree/git-annex.cabal
# Cabal cannot cross compile with custom build type, so workaround.
sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal
# Build just once, but link repeatedly, for different versions of Android.
mkdir -p tmp/androidtree/dist/build/git-annex/4.0 tmp/androidtree/dist/build/git-annex/4.3 tmp/androidtree/dist/build/git-annex/5.0
if [ ! -e tmp/androidtree/dist/setup-config ]; then \
cd tmp/androidtree && CROSS_COMPILE=Android $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \
fi
PATH=$(shell standalone/android/toolchainpath 4) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.0/git-annex
PATH=$(shell standalone/android/toolchainpath 4) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc \
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.3/git-annex
PATH=$(shell standalone/android/toolchainpath 5) cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc --ghc-options=-optl-fPIE --ghc-options=-optl-pie --ghc-options=-optc-fPIE --ghc-options=-optc-pie \
&& mv dist/build/git-annex/git-annex dist/build/git-annex/5.0/git-annex
androidapp:
$(MAKE) android
$(MAKE) -C standalone/android
# Bypass cabal, and only run the main ghc --make command for a
# faster development build.
fast: dist/cabalbuild

View file

@ -14,7 +14,6 @@ import Types
import Types.Messages
import qualified Annex
#ifdef WITH_CONCURRENTOUTPUT
import Common
import qualified System.Console.Concurrent as Console
import qualified System.Console.Regions as Regions
@ -23,7 +22,6 @@ import qualified Data.Text as T
#ifndef mingw32_HOST_OS
import GHC.IO.Encoding
#endif
#endif
{- Outputs a message in a concurrency safe way.
-
@ -33,15 +31,10 @@ import GHC.IO.Encoding
- instead.
-}
concurrentMessage :: MessageState -> Bool -> String -> Annex () -> Annex ()
#ifdef WITH_CONCURRENTOUTPUT
concurrentMessage s iserror msg fallback
| concurrentOutputEnabled s =
go =<< consoleRegion <$> Annex.getState Annex.output
#else
concurrentMessage _s _iserror _msg fallback
#endif
| otherwise = fallback
#ifdef WITH_CONCURRENTOUTPUT
where
go Nothing
| iserror = liftIO $ Console.errorConcurrent msg
@ -58,7 +51,6 @@ concurrentMessage _s _iserror _msg fallback
rl <- takeTMVar Regions.regionList
putTMVar Regions.regionList
(if r `elem` rl then rl else r:rl)
#endif
{- Runs an action in its own dedicated region of the console.
-
@ -70,7 +62,6 @@ concurrentMessage _s _iserror _msg fallback
- complete.
-}
inOwnConsoleRegion :: MessageState -> Annex a -> Annex a
#ifdef WITH_CONCURRENTOUTPUT
inOwnConsoleRegion s a
| concurrentOutputEnabled s = do
r <- mkregion
@ -85,11 +76,7 @@ inOwnConsoleRegion s a
Right ret -> do
rmregion r
return ret
#else
inOwnConsoleRegion _s a
#endif
| otherwise = a
#ifdef WITH_CONCURRENTOUTPUT
where
-- The region is allocated here, but not displayed until
-- a message is added to it. This avoids unnecessary screen
@ -108,10 +95,8 @@ inOwnConsoleRegion _s a
unless (T.null t) $
Console.bufferOutputSTM h t
Regions.closeConsoleRegion r
#endif
{- The progress region is displayed inline with the current console region. -}
#ifdef WITH_CONCURRENTOUTPUT
withProgressRegion :: (Regions.ConsoleRegion -> Annex a) -> Annex a
withProgressRegion a = do
parent <- consoleRegion <$> Annex.getState Annex.output
@ -119,14 +104,12 @@ withProgressRegion a = do
instance Regions.LiftRegion Annex where
liftRegion = liftIO . atomically
#endif
{- The concurrent-output library uses Text, which bypasses the normal use
- of the fileSystemEncoding to roundtrip invalid characters, when in a
- non-unicode locale. Work around that problem by avoiding using
- concurrent output when not in a unicode locale. -}
concurrentOutputSupported :: IO Bool
#ifdef WITH_CONCURRENTOUTPUT
#ifndef mingw32_HOST_OS
concurrentOutputSupported = do
enc <- getLocaleEncoding
@ -134,9 +117,6 @@ concurrentOutputSupported = do
#else
concurrentOutputSupported = return True -- Windows is always unicode
#endif
#else
concurrentOutputSupported = return False
#endif
{- Hide any currently displayed console regions while running the action,
- so that the action can use the console itself.
@ -144,7 +124,6 @@ concurrentOutputSupported = return False
- the regions will not be hidden, but the action still runs, garbling the
- display. -}
hideRegionsWhile :: Annex a -> Annex a
#ifdef WITH_CONCURRENTOUTPUT
#if MIN_VERSION_concurrent_output(1,9,0)
hideRegionsWhile a = bracketIO setup cleanup go
where
@ -156,6 +135,3 @@ hideRegionsWhile a = bracketIO setup cleanup go
#else
hideRegionsWhile = id
#endif
#else
hideRegionsWhile = id
#endif

View file

@ -5,8 +5,6 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Messages.Progress where
import Common
@ -16,12 +14,10 @@ import Types
import Types.Messages
import Types.Key
import qualified Messages.JSON as JSON
#ifdef WITH_CONCURRENTOUTPUT
import Messages.Concurrent
import qualified System.Console.Regions as Regions
import qualified System.Console.Concurrent as Console
#endif
{- Shows a progress meter while performing a transfer of a key.
- The action is passed the meter and a callback to use to update the meter.
@ -45,7 +41,6 @@ metered othermeter key getsrcfile a = withMessageState $ \st ->
liftIO $ clearMeterHandle meter stdout
return r
go msize (MessageState { outputType = NormalOutput, concurrentOutputEnabled = True }) =
#if WITH_CONCURRENTOUTPUT
withProgressRegion $ \r -> do
meter <- liftIO $ mkMeter msize $ \_ msize' old new ->
let s = bandwidthMeter msize' old new
@ -53,9 +48,6 @@ metered othermeter key getsrcfile a = withMessageState $ \st ->
m <- liftIO $ rateLimitMeterUpdate 0.2 meter $
updateMeter meter
a meter (combinemeter m)
#else
nometer
#endif
go msize (MessageState { outputType = JSONOutput jsonoptions })
| jsonProgress jsonoptions = do
buf <- withMessageState $ return . jsonBuffer
@ -133,7 +125,6 @@ mkStderrRelayer = do
mkStderrEmitter :: Annex (String -> IO ())
mkStderrEmitter = withMessageState go
where
#ifdef WITH_CONCURRENTOUTPUT
go s | concurrentOutputEnabled s = return Console.errorConcurrent
#endif
go _ = return (hPutStrLn stderr)
go s
| concurrentOutputEnabled s = return Console.errorConcurrent
| otherwise = return (hPutStrLn stderr)

View file

@ -10,9 +10,7 @@
module Types.DesktopNotify where
import Data.Monoid
#if MIN_VERSION_base(4,9,0)
import qualified Data.Semigroup as Sem
#endif
import Prelude
data DesktopNotify = DesktopNotify
@ -21,22 +19,14 @@ data DesktopNotify = DesktopNotify
}
deriving (Show)
appendDesktopNotify :: DesktopNotify -> DesktopNotify -> DesktopNotify
appendDesktopNotify (DesktopNotify s1 f1) (DesktopNotify s2 f2) =
DesktopNotify (s1 || s2) (f1 || f2)
#if MIN_VERSION_base(4,9,0)
instance Sem.Semigroup DesktopNotify where
(<>) = appendDesktopNotify
#endif
(DesktopNotify s1 f1) <> (DesktopNotify s2 f2) =
DesktopNotify (s1 || s2) (f1 || f2)
instance Monoid DesktopNotify where
mempty = DesktopNotify False False
#if MIN_VERSION_base(4,11,0)
#elif MIN_VERSION_base(4,9,0)
#if ! MIN_VERSION_base(4,11,0)
mappend = (Sem.<>)
#else
mappend = appendDesktopNotify
#endif
mkNotifyStart :: DesktopNotify

View file

@ -26,9 +26,7 @@ import qualified Git.Config
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
#if MIN_VERSION_base(4,9,0)
import qualified Data.Semigroup as Sem
#endif
import Prelude
-- Describes differences from the v5 repository format.
@ -80,18 +78,13 @@ appendDifferences a@(Differences {}) b@(Differences {}) = a
}
appendDifferences _ _ = UnknownDifferences
#if MIN_VERSION_base(4,9,0)
instance Sem.Semigroup Differences where
(<>) = appendDifferences
#endif
instance Monoid Differences where
mempty = Differences False False False
#if MIN_VERSION_base(4,11,0)
#elif MIN_VERSION_base(4,9,0)
#if ! MIN_VERSION_base(4,11,0)
mappend = (Sem.<>)
#else
mappend = appendDifferences
#endif
readDifferences :: String -> Differences

View file

@ -5,16 +5,12 @@
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Types.Messages where
import qualified Utility.Aeson as Aeson
import Control.Concurrent
#ifdef WITH_CONCURRENTOUTPUT
import System.Console.Regions (ConsoleRegion)
#endif
data OutputType = NormalOutput | QuietOutput | JSONOutput JSONOptions
deriving (Show)
@ -40,10 +36,8 @@ data MessageState = MessageState
, concurrentOutputEnabled :: Bool
, sideActionBlock :: SideActionBlock
, implicitMessages :: Bool
#ifdef WITH_CONCURRENTOUTPUT
, consoleRegion :: Maybe ConsoleRegion
, consoleRegionErrFlag :: Bool
#endif
, jsonBuffer :: Maybe Aeson.Object
, promptLock :: MVar () -- left full when not prompting
}
@ -56,10 +50,8 @@ newMessageState = do
, concurrentOutputEnabled = False
, sideActionBlock = NoBlock
, implicitMessages = True
#ifdef WITH_CONCURRENTOUTPUT
, consoleRegion = Nothing
, consoleRegionErrFlag = False
#endif
, jsonBuffer = Nothing
, promptLock = promptlock
}

View file

@ -11,9 +11,7 @@ module Types.Test where
import Test.Tasty.Options
import Data.Monoid
#if MIN_VERSION_base(4,9,0)
import qualified Data.Semigroup as Sem
#endif
import Prelude
import Types.Command
@ -25,25 +23,17 @@ data TestOptions = TestOptions
, internalData :: CmdParams
}
appendTestOptions :: TestOptions -> TestOptions -> TestOptions
appendTestOptions a b = TestOptions
(tastyOptionSet a <> tastyOptionSet b)
(keepFailuresOption a || keepFailuresOption b)
(fakeSsh a || fakeSsh b)
(internalData a <> internalData b)
#if MIN_VERSION_base(4,9,0)
instance Sem.Semigroup TestOptions where
(<>) = appendTestOptions
#endif
a <> b = TestOptions
(tastyOptionSet a <> tastyOptionSet b)
(keepFailuresOption a || keepFailuresOption b)
(fakeSsh a || fakeSsh b)
(internalData a <> internalData b)
instance Monoid TestOptions where
mempty = TestOptions mempty False False mempty
#if MIN_VERSION_base(4,11,0)
#elif MIN_VERSION_base(4,9,0)
#if ! MIN_VERSION_base(4,11,0)
mappend = (Sem.<>)
#else
mappend = appendTestOptions
#endif
type TestRunner = TestOptions -> IO ()

View file

@ -11,7 +11,7 @@ module Utility.Batch where
import Common
#if defined(linux_HOST_OS) || defined(__ANDROID__)
#if defined(linux_HOST_OS)
import Control.Concurrent.Async
import System.Posix.Process
#endif
@ -29,7 +29,7 @@ import qualified Control.Exception as E
- systems, the action is simply ran.
-}
batch :: IO a -> IO a
#if defined(linux_HOST_OS) || defined(__ANDROID__)
#if defined(linux_HOST_OS)
batch a = wait =<< batchthread
where
batchthread = asyncBound $ do
@ -51,11 +51,7 @@ getBatchCommandMaker = do
#ifndef mingw32_HOST_OS
nicers <- filterM (inPath . fst)
[ ("nice", [])
#ifndef __ANDROID__
-- Android's ionice does not allow specifying a command,
-- so don't use it.
, ("ionice", ["-c3"])
#endif
, ("nocache", [])
]
return $ \(command, params) ->

View file

@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.CopyFile (
copyFileExternal,
createLinkOrCopy,
@ -32,7 +30,6 @@ copyFileExternal meta src dest = do
removeFile dest
boolSystem "cp" $ params ++ [File src, File dest]
where
#ifndef __ANDROID__
params = map snd $ filter fst
[ (BuildInfo.cp_reflink_auto, Param "--reflink=auto")
, (allmeta && BuildInfo.cp_a, Param "-a")
@ -41,9 +38,6 @@ copyFileExternal meta src dest = do
, (not allmeta && BuildInfo.cp_preserve_timestamps
, Param "--preserve=timestamps")
]
#else
params = if allmeta then [] else []
#endif
allmeta = meta == CopyAllMetaData
{- Create a hard link if the filesystem allows it, and fall back to copying

View file

@ -13,8 +13,6 @@ module Utility.DiskFree (
getDiskSize
) where
#ifndef __ANDROID__
import System.DiskSpace
import Utility.Applicative
import Utility.Exception
@ -24,15 +22,3 @@ getDiskFree = catchMaybeIO . getAvailSpace
getDiskSize :: FilePath -> IO (Maybe Integer)
getDiskSize = fmap diskTotal <$$> catchMaybeIO . getDiskUsage
#else
#warning Building without disk free space checking support
getDiskFree :: FilePath -> IO (Maybe Integer)
getDiskFree _ = return Nothing
getDiskSize :: FilePath -> IO (Maybe Integer)
getDiskSize _ = return Nothing
#endif

View file

@ -5,7 +5,7 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
module Utility.Exception (
@ -29,11 +29,7 @@ module Utility.Exception (
import Control.Monad.Catch as X hiding (Handler)
import qualified Control.Monad.Catch as M
import Control.Exception (IOException, AsyncException)
#ifdef MIN_VERSION_GLASGOW_HASKELL
#if MIN_VERSION_GLASGOW_HASKELL(7,10,0,0)
import Control.Exception (SomeAsyncException)
#endif
#endif
import Control.Monad
import Control.Monad.IO.Class (liftIO, MonadIO)
import System.IO.Error (isDoesNotExistError, ioeGetErrorType)
@ -46,15 +42,7 @@ import Utility.Data
- where there's a problem that the user is excpected to see in some
- circumstances. -}
giveup :: [Char] -> a
#ifdef MIN_VERSION_base
#if MIN_VERSION_base(4,9,0)
giveup = errorWithoutStackTrace
#else
giveup = error
#endif
#else
giveup = error
#endif
{- Catches IO errors and returns a Bool -}
catchBoolIO :: MonadCatch m => m Bool -> m Bool
@ -95,11 +83,7 @@ bracketIO setup cleanup = bracket (liftIO setup) (liftIO . cleanup)
catchNonAsync :: MonadCatch m => m a -> (SomeException -> m a) -> m a
catchNonAsync a onerr = a `catches`
[ M.Handler (\ (e :: AsyncException) -> throwM e)
#ifdef MIN_VERSION_GLASGOW_HASKELL
#if MIN_VERSION_GLASGOW_HASKELL(7,10,0,0)
, M.Handler (\ (e :: SomeAsyncException) -> throwM e)
#endif
#endif
, M.Handler (\ (e :: SomeException) -> onerr e)
]

View file

@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.Lsof where
import Common
@ -54,13 +52,6 @@ query opts =
type LsofParser = String -> [(FilePath, LsofOpenMode, ProcessInfo)]
parse :: LsofParser
#ifdef __ANDROID__
parse = parseDefault
#else
parse = parseFormatted
#endif
{- Parsing null-delimited output like:
-
- pPID\0cCMDLINE\0
@ -71,8 +62,8 @@ parse = parseFormatted
- Where each new process block is started by a pid, and a process can
- have multiple files open.
-}
parseFormatted :: LsofParser
parseFormatted s = bundle $ go [] $ lines s
parse :: LsofParser
parse s = bundle $ go [] $ lines s
where
bundle = concatMap (\(fs, p) -> map (\(f, m) -> (f, m, p)) fs)
@ -110,14 +101,3 @@ parseFormatted s = bundle $ go [] $ lines s
splitnull = splitc '\0'
parsefail = error $ "failed to parse lsof output: " ++ show s
{- Parses lsof's default output format. -}
parseDefault :: LsofParser
parseDefault = mapMaybe parseline . drop 1 . lines
where
parseline l = case words l of
(command : spid : _user : _fd : _type : _device : _size : _node : rest) ->
case readish spid of
Nothing -> Nothing
Just pid -> Just (unwords rest, OpenUnknown, ProcessInfo pid command)
_ -> Nothing

View file

@ -5,7 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
module Utility.Mounts (getMounts, Mntent(..)) where
@ -16,11 +15,7 @@ import System.MountPoints (Mntent(..))
import Utility.Exception
getMounts :: IO [Mntent]
#ifndef __ANDROID__
getMounts = System.MountPoints.getMounts
-- That will crash when the linux build is running on Android,
-- so fall back to this.
`catchNonAsync` const System.MountPoints.getProcMounts
#else
getMounts = System.MountPoints.getProcMounts
#endif

View file

@ -20,21 +20,11 @@ import Utility.PartialPrelude
import System.FilePath
#endif
shellPath_portable :: FilePath
shellPath_portable = "/bin/sh"
shellPath :: FilePath
shellPath = "/bin/sh"
shellPath_local :: FilePath
#ifndef __ANDROID__
shellPath_local = shellPath_portable
#else
shellPath_local = "/system/bin/sh"
#endif
shebang_portable :: String
shebang_portable = "#!" ++ shellPath_portable
shebang_local :: String
shebang_local = "#!" ++ shellPath_local
shebang :: String
shebang = "#!" ++ shellPath
-- | On Windows, shebang is not handled by the kernel, so to support
-- shell scripts etc, have to look at the program being run and

View file

@ -18,10 +18,8 @@ import System.Posix.IO
#endif
#ifndef mingw32_HOST_OS
import System.Posix.Signals
#ifndef __ANDROID__
import System.Posix.Terminal
#endif
#endif
newtype Seconds = Seconds { fromSeconds :: Int }
deriving (Eq, Ord, Show)
@ -63,10 +61,8 @@ waitForTermination = do
let check sig = void $
installHandler sig (CatchOnce $ putMVar lock ()) Nothing
check softwareTermination
#ifndef __ANDROID__
whenM (queryTerminal stdInput) $
check keyboardSignal
#endif
takeMVar lock
#endif

View file

@ -13,7 +13,7 @@ module Utility.Touch (
touch
) where
#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__)
#if ! defined(mingw32_HOST_OS)
#if MIN_VERSION_unix(2,7,0)

View file

@ -47,8 +47,8 @@ myUserName = myVal env userName
#endif
myUserGecos :: IO (Maybe String)
-- userGecos crashes on Android and is not available on Windows.
#if defined(__ANDROID__) || defined(mingw32_HOST_OS)
-- userGecos is not available on Windows.
#if defined(mingw32_HOST_OS)
myUserGecos = return Nothing
#else
myUserGecos = eitherToMaybe <$> myVal [] userGecos

View file

@ -30,9 +30,6 @@ import Blaze.ByteString.Builder.Char.Utf8 (fromText)
import Blaze.ByteString.Builder (Builder)
import Control.Arrow ((***))
import Control.Concurrent
#ifdef __ANDROID__
import Data.Endian
#endif
localhost :: HostName
localhost = "localhost"
@ -42,11 +39,6 @@ browserProc :: String -> CreateProcess
#ifdef darwin_HOST_OS
browserProc url = proc "open" [url]
#else
#ifdef __ANDROID__
-- Warning: The `am` command does not work very reliably on Android.
browserProc url = proc "am"
["start", "-a", "android.intent.action.VIEW", "-d", url]
#else
#ifdef mingw32_HOST_OS
-- Warning: On Windows, no quoting or escaping of the url seems possible,
-- so spaces in it will cause problems. One approach is to make the url
@ -57,7 +49,6 @@ browserProc url = proc "cmd" ["/c start " ++ url]
browserProc url = proc "xdg-open" [url]
#endif
#endif
#endif
{- Binds to a socket on localhost, or possibly a different specified
- hostname or address, and runs a webapp on it.
@ -69,19 +60,11 @@ runWebApp :: Maybe TLSSettings -> Maybe HostName -> Wai.Application -> (SockAddr
runWebApp tlssettings h app observer = withSocketsDo $ do
sock <- getSocket h
void $ forkIO $ go webAppSettings sock app
sockaddr <- fixSockAddr <$> getSocketName sock
sockaddr <- getSocketName sock
observer sockaddr
where
go = (maybe runSettingsSocket (\ts -> runTLSSocket ts) tlssettings)
fixSockAddr :: SockAddr -> SockAddr
#ifdef __ANDROID__
{- On Android, the port is currently incorrectly returned in network
- byte order, which is wrong on little endian systems. -}
fixSockAddr (SockAddrInet (PortNum port) addr) = SockAddrInet (PortNum $ swapEndian port) addr
#endif
fixSockAddr addr = addr
-- disable buggy sloworis attack prevention code
webAppSettings :: Settings
webAppSettings = setTimeout halfhour defaultSettings

View file

@ -1,7 +1,6 @@
{- Yesod stuff, that's typically found in the scaffolded site.
-
- Also a bit of a compatability layer to make it easier to support yesod
- 1.1-1.4 in the same code base.
- Also a bit of a compatability layer for older versions of yesod.
-
- Copyright 2012-2014 Joey Hess <id@joeyh.name>
-
@ -13,28 +12,18 @@
module Utility.Yesod
( module Y
, liftH
#ifndef __NO_TH__
, widgetFile
, hamletTemplate
#endif
#if ! MIN_VERSION_yesod_core(1,2,20)
, withUrlRenderer
#endif
) where
import Yesod as Y
import Yesod.Form.Bootstrap3 as Y hiding (bfs)
#ifndef __NO_TH__
import Yesod.Default.Util
import Language.Haskell.TH.Syntax (Q, Exp)
import Data.Default (def)
import Text.Hamlet hiding (Html)
#endif
#if ! MIN_VERSION_yesod(1,4,0)
import Data.Text (Text)
#endif
#ifndef __NO_TH__
widgetFile :: String -> Q Exp
widgetFile = widgetFileNoReload $ def
{ wfsHamletSettings = defaultHamletSettings
@ -44,7 +33,6 @@ widgetFile = widgetFileNoReload $ def
hamletTemplate :: FilePath -> FilePath
hamletTemplate f = globFile "hamlet" f
#endif
{- Lift Handler to Widget -}
#if MIN_VERSION_yesod_core(1,6,0)
@ -53,8 +41,3 @@ liftH :: HandlerFor site a -> WidgetFor site a
liftH :: Monad m => HandlerT site m a -> WidgetT site m a
#endif
liftH = handlerToWidget
#if ! MIN_VERSION_yesod_core(1,2,20)
withUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output
withUrlRenderer = giveUrlRenderer
#endif

View file

@ -218,7 +218,6 @@ Extra-Source-Files:
templates/configurators/ssh/add.hamlet
templates/configurators/ssh/setupmodal.hamlet
templates/configurators/ssh/confirm.hamlet
templates/configurators/upgrade/android.hamlet
templates/configurators/enableia.hamlet
templates/configurators/fsck.hamlet
templates/configurators/addrepository/archive.hamlet
@ -270,23 +269,12 @@ Flag Pairing
Flag Production
Description: Enable production build (slower build; faster binary)
Flag Android
Description: Cross building for Android
Default: False
Flag AndroidSplice
Description: Building to get TH splices for Android
Default: False
Flag TorrentParser
Description: Use haskell torrent library to parse torrent files
Flag MagicMime
Description: Use libmagic to determine file MIME types
Flag ConcurrentOutput
Description: Use concurrent-output library
Flag Benchmark
Description: Enable benchmarking
Default: False
@ -299,18 +287,18 @@ source-repository head
location: git://git-annex.branchable.com/
custom-setup
Setup-Depends: base (>= 4.6), hslogger, split, unix-compat, process,
Setup-Depends: base (>= 4.9), hslogger, split, unix-compat, process,
filepath, exceptions, bytestring, directory, IfElse, data-default,
utf8-string, transformers, Cabal
Executable git-annex
Main-Is: git-annex.hs
Build-Depends:
base (>= 4.6 && < 5.0),
base (>= 4.9 && < 5.0),
network (>= 2.6.3.0),
network-uri (>= 2.6),
optparse-applicative (>= 0.11.0),
containers (>= 0.5.0.0),
containers (>= 0.5.7.1),
exceptions (>= 0.6),
stm (>= 2.3),
mtl (>= 2),
@ -324,6 +312,7 @@ Executable git-annex
SafeSemaphore,
async,
directory (>= 1.2),
disk-free-space,
filepath,
IfElse,
hslogger,
@ -365,6 +354,7 @@ Executable git-annex
memory,
split,
attoparsec,
concurrent-output (>= 1.6),
QuickCheck (>= 2.1),
tasty (>= 0.7),
tasty-hunit,
@ -501,7 +491,7 @@ Executable git-annex
Utility.Mounts
Utility.OSX
if os(linux) || flag(Android)
if os(linux)
Build-Depends: hinotify
CPP-Options: -DWITH_INOTIFY
Other-Modules: Utility.DirWatcher.INotify
@ -529,30 +519,21 @@ Executable git-annex
CPP-Options: -DWITH_DBUS -DWITH_DESKTOP_NOTIFY -DWITH_DBUS_NOTIFICATIONS
Other-Modules: Utility.DBus
if flag(Android)
Build-Depends: data-endian
CPP-Options: -D__ANDROID__ -DANDROID_SPLICES -D__NO_TH__
else
Build-Depends: disk-free-space
if flag(AndroidSplice)
CPP-Options: -DANDROID_SPLICES
if flag(Webapp)
Build-Depends:
yesod (>= 1.2.6),
yesod-static (>= 1.2.4),
yesod-form (>= 1.3.15),
yesod-core (>= 1.2.19),
path-pieces (>= 0.1.4),
warp (>= 3.0.0.5),
warp-tls (>= 1.4),
yesod (>= 1.4.3),
yesod-static (>= 1.5.1),
yesod-form (>= 1.4.8),
yesod-core (>= 1.4.25),
path-pieces (>= 0.2.1),
warp (>= 3.2.8),
warp-tls (>= 3.2.2),
wai,
wai-extra,
blaze-builder,
clientsession,
template-haskell,
shakespeare (>= 2.0.0)
shakespeare (>= 2.0.11)
CPP-Options: -DWITH_WEBAPP
Other-Modules:
Command.WebApp
@ -605,10 +586,6 @@ Executable git-annex
Build-Depends: magic
CPP-Options: -DWITH_MAGICMIME
if flag(ConcurrentOutput)
Build-Depends: concurrent-output (>= 1.6)
CPP-Options: -DWITH_CONCURRENTOUTPUT
if flag(Benchmark)
Build-Depends: criterion, deepseq
CPP-Options: -DWITH_BENCHMARK

View file

@ -1,6 +1,5 @@
flags:
git-annex:
concurrentoutput: true
production: true
assistant: true
pairing: true
@ -10,8 +9,6 @@ flags:
webapp: true
magicmime: false
dbus: false
android: false
androidsplice: false
packages:
- '.'
extra-deps:

View file

@ -1,2 +0,0 @@
build-utils
start

View file

@ -1,84 +0,0 @@
# Cross-compiles utilities needed for git-annex on Android,
# and builds the Android app.
build:
./buildapk 4
./buildapk 5
# Targets below are used by buildapk, which sets
# GIT_ANNEX_ANDROID_SOURCETREE
source: $(GIT_ANNEX_ANDROID_SOURCETREE)
$(GIT_ANNEX_ANDROID_SOURCETREE):
mkdir -p $(GIT_ANNEX_ANDROID_SOURCETREE)
git clone git://git.debian.org/git/d-i/busybox $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox
git clone git://git.kernel.org/pub/scm/git/git.git $(GIT_ANNEX_ANDROID_SOURCETREE)/git
git clone git://git.samba.org/rsync.git $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync
git clone git://git.gnupg.org/gnupg.git $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg
git clone git://git.openssl.org/openssl $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl
git clone git://github.com/CyanogenMod/android_external_openssh.git $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh
git clone git://github.com/jackpal/Android-Terminal-Emulator.git $(GIT_ANNEX_ANDROID_SOURCETREE)/term
$(GIT_ANNEX_ANDROID_SOURCETREE)/openssl/build-stamp:
# This is a version which the openssh below can build with.
# Newer versions changed something to do with BIGNUM.
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && git reset --hard 616f71e486d693991b594439c884ec624b32c2d4
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && CC=$$(which cc) ./Configure android
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && $(MAKE)
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/build-stamp: openssh.patch openssh.config.h
# This is a known-good version that the patch works with.
# TODO: Upgrade
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && git reset --hard 0a8617ed5af2f0248d0e9648e26b224e16ada742
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && ./configure --host=arm-linux-androideabi --with-ssl-dir=../openssl --without-openssl-header-check
cat openssh.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && patch -p1)
cp openssh.config.h $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/config.h
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && sed -i -e 's/getrrsetbyname.o //' openbsd-compat/Makefile
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && sed -i -e 's/auth-passwd.o //' Makefile
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && $(MAKE) ssh ssh-keygen
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/build-stamp: busybox_config
cp busybox_config $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/.config
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && git reset --hard a758e3e1e04e7705f5d37b2f27be654cd0e7282c
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && yes '' | $(MAKE) oldconfig
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && $(MAKE)
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/git/build-stamp: git.patch
# This is a known-good version that the patch works with.
cat git.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/git && git reset --hard d9c691a759d62cef53a6cc11864a2ef4b0829244 && git am)
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/git && $(MAKE) install 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 HAVE_CLOCK_GETTIME= HAVE_GETDELIM= prefix= DESTDIR=installed-tree
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/rsync/build-stamp: rsync.patch
# This is a known-good version that the patch works with.
cat rsync.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && git reset --hard eec26089b1c7bdbb260674480ffe6ece257bca63 && git am)
cp /usr/share/misc/config.sub /usr/share/misc/config.guess $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync/
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && ./configure --host=arm-linux-androideabi --disable-locale --disable-iconv-open --disable-iconv --disable-acl-support --disable-xattr-support
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && $(MAKE)
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg/build-stamp:
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && git checkout gnupg-1.4.15
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && ./autogen.sh
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && ./configure --host=arm-linux-androideabi --disable-gnupg-iconv --disable-card-support --disable-agent-support --disable-photo-viewers --disable-keyserver-helpers --disable-nls
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg; $(MAKE) || true # expected failure in doc build
touch $@
$(GIT_ANNEX_ANDROID_SOURCETREE)/term/build-stamp: term.patch icons
# This is a known-good version that the patch works with.
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && git reset --hard 3d34b3c42295c215b62e70f3ee696dd664ba08ce
cat term.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && patch -p1)
(cd icons && tar c .) | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term/res && tar x)
# This renaming has a purpose. It makes the path to the app's
# /data directory shorter, which makes ssh connection caching
# sockets placed there have more space for their filenames.
# Also, it avoids overlap with the Android Terminal Emulator
# app, if it's also installed.
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && find -name .git -prune -o -type f -print0 | xargs -0 perl -pi -e 's/jackpal/ga/g'
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && perl -pi -e 's/Terminal Emulator/Git Annex/g' res/*/strings.xml
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && echo y | tools/update.sh || true
touch $@

View file

@ -1 +0,0 @@
android-14/arm-linux-androideabi-4.8

View file

@ -1,112 +0,0 @@
#!/bin/sh
#
# Cross-compiles utilities needed for git-annex on Android,
# and builds the Android app.
set -e
androidversion=$1
if [ -z "$androidversion" ]; then
echo "need android version (4 or 5) as parameter" >&2
exit 1
fi
VER="$(perl -e '$_=<>;print m/\((.*?)\)/'<../../CHANGELOG)"
PATH=$(./toolchainpath "$androidversion")
export PATH
# Paths to the Android SDK and NDK.
export ANDROID_SDK_ROOT="$HOME/.android/adt-bundle-linux-x86/sdk"
export ANDROID_NDK_ROOT="$HOME/.android/android-ndk"
GIT_ANNEX_ANDROID_SOURCETREE="$HOME/.android/git-annex-sourcetree"
export GIT_ANNEX_ANDROID_SOURCETREE
if [ ! -e "$GIT_ANNEX_ANDROID_SOURCETREE" ]; then
make source
fi
src="$GIT_ANNEX_ANDROID_SOURCETREE-$androidversion"
if [ ! -e "$src" ] ; then
cp -a "$GIT_ANNEX_ANDROID_SOURCETREE" "$src"
fi
GIT_ANNEX_ANDROID_SOURCETREE="$src"
export GIT_ANNEX_ANDROID_SOURCETREE
gittree="$GIT_ANNEX_ANDROID_SOURCETREE/git/installed-tree"
make "$GIT_ANNEX_ANDROID_SOURCETREE/openssl/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/busybox/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/rsync/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/gnupg/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/git/build-stamp"
make "$GIT_ANNEX_ANDROID_SOURCETREE/term/build-stamp"
perl -i -pe 's/(android:versionName=)"[^"]+"/$1"'"$VER"'"/' \
"$GIT_ANNEX_ANDROID_SOURCETREE/term/AndroidManifest.xml"
# Debug build because it does not need signing keys.
(cd "$GIT_ANNEX_ANDROID_SOURCETREE/term" && tools/build-debug)
# Install executables as pseudo-libraries so they will be
# unpacked from the .apk.
mkdir -p "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/busybox/busybox" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.busybox.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/ssh" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.ssh.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/ssh-keygen" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.ssh-keygen.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/rsync/rsync" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.rsync.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/gnupg/g10/gpg" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.gpg.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git-shell" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-shell.so"
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git-upload-pack" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-upload-pack.so"
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note "$GIT_ANNEX_ANDROID_SOURCETREE"/term/libs/armeabi/*
cp runshell "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.runshell.so"
cc start.c -o "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.start.so"
# remove git stuff we don't need to save space
rm -rf $gittree/bin/git-cvsserver \
$gittree/libexec/git-core/git-daemon \
$gittree/libexec/git-core/git-show-index \
$gittree/libexec/git-core/mergetools \
$gittree/libexec/git-core/git-credential-* \
$gittree/libexec/git-core/git-cvsserver \
$gittree/libexec/git-core/git-cvsimport \
$gittree/libexec/git-core/git-fast-import \
$gittree/libexec/git-core/git-http-backend \
$gittree/libexec/git-core/git-imap-send \
$gittree/libexec/git-core/git-instaweb \
$gittree/libexec/git-core/git-p4 \
$gittree/libexec/git-core/git-remote-test* \
$gittree/libexec/git-core/git-submodule \
$gittree/libexec/git-core/git-svn \
$gittree/libexec/git-core/git-web--browse
# Most of git is in one multicall binary, but a few important
# commands are still shell scripts. Those are put into
# a tarball, along with a list of all the links that should be
# set up.
(cd $gittree && mkdir -p links)
(cd $gittree && find -samefile bin/git -not -wholename ./bin/git > links/git)
(cd $gittree && find -samefile bin/git-shell -not -wholename ./bin/git-shell > links/git-shell)
(cd $gittree && find -samefile bin/git-upload-pack -not -wholename ./bin/git-upload-pack > links/git-upload-pack)
(cd $gittree && find -type f -not -samefile bin/git -not -samefile bin/git-shell -not -samefile bin/git-upload-pack | tar czf ../git.tar.gz -T -)
(cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git.tar.gz" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git.tar.gz.so")
git rev-parse HEAD > "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.version.so"
cp ../trustedkeys.gpg "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.trustedkeys.so"
genapk () {
mkdir -p ../../tmp/$1; \
cp ../../tmp/androidtree/dist/build/git-annex/$1/git-annex "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-annex.so"
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-annex.so"
(cd "$GIT_ANNEX_ANDROID_SOURCETREE/term" && ant debug)
cp "$GIT_ANNEX_ANDROID_SOURCETREE/term/bin/Term-debug.apk" ../../tmp/$1/git-annex.apk
}
if [ "$androidversion" = 4 ]; then
for v in 4.0 4.3; do
genapk $v
done
else
genapk 5.0
fi

View file

@ -1,27 +0,0 @@
#!/bin/sh
set -e
if [ "$(whoami)" != root ]; then
echo "Must run this as root!" >&2
exit 1
fi
debootstrap --arch=i386 jessie debian-stable-android
cp $0-inchroot debian-stable-android/tmp
cp $0-inchroot-asuser debian-stable-android/tmp
cp $(dirname $0)/abiversion debian-stable-android/tmp
# Don't use these vars in the chroot.
unset TMP
unset TEMP
unset TMPDIR
unset TEMPDIR
chroot debian-stable-android "tmp/$(basename $0)-inchroot"
echo
echo
echo "debian-stable-android is set up, with a user builder"
echo "your next step is probably to check out git-annex in this chroot"
echo "and run standalone/android/install-haskell-packages"
echo
echo

View file

@ -1,27 +0,0 @@
#!/bin/sh
# Runs inside the chroot set up by buildchroot
set -e
set -x
if [ "$(whoami)" != root ]; then
echo "Must run this as root!" >&2
exit 1
fi
# java needs this mounted to work
mount -t proc proc /proc || true
echo "deb-src http://ftp.us.debian.org/debian jessie main" >> /etc/apt/sources.list
apt-get update
apt-get -y install build-essential ghc git libncurses5-dev cabal-install
apt-get -y install happy alex
apt-get -y install llvm-3.4
apt-get -y install ca-certificates curl file m4 autoconf zlib1g-dev
apt-get -y install libgnutls28-dev libxml2-dev libgsasl7-dev pkg-config c2hs
apt-get -y install ant default-jdk rsync wget gnupg lsof
apt-get -y install gettext unzip python
apt-get -y install locales automake
echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
locale-gen
apt-get clean
useradd builder --create-home || true
su builder -c $0-asuser

View file

@ -1,40 +0,0 @@
#!/bin/sh
# Runs inside the chroot set up by buildchroot, as the user it creates
set -e
set -x
# Put in /tmp by buildchroot, but when bootstrapping with propellor,
# this is run inside a checked out git-annex tree.
if [ -e /tmp/abiversion ]; then
ABIVERSION=$(cat /tmp/abiversion)
else
ABIVERSION=$(cat standalone/android/abiversion)
fi
cd
rm -rf .ghc .cabal .android
mkdir -p .android
cd .android
git clone https://github.com/joeyh/ghc-android
cd ghc-android
git checkout jessie-ghc-snapshot
./build
# This saves 2 gb, and the same sources are in build-*/ghc
rm -rf stage0
# Set up android SDK where the git-annex android Makefile
# expects to find it.
cd ..
ln -s ghc-android/android-ndk-* android-ndk
wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130917.zip
unzip adt*.zip
rm adt*.zip
mv adt-bundle-linux-x86-* adt-bundle-linux-x86
rm -rf adt-bundle-linux-x86/eclipse
# The git-annex android Makefile needs this cc symlink.
ln -s arm-linux-androideabi-gcc $HOME/.ghc/$ABIVERSION/bin/cc
git config --global user.email androidbuilder@example.com
git config --global user.name androidbuilder

View file

@ -1,997 +0,0 @@
# Run "make android2_defconfig", then "make".
#
# Tested with the standalone toolchain from ndk r6:
# android-ndk-r6/build/tools/make-standalone-toolchain.sh --platform=android-8
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
#
# General Configuration
#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
# CONFIG_INCLUDE_SUSv2 is not set
# CONFIG_USE_PORTABLE_CODE is not set
CONFIG_PLATFORM_LINUX=y
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
# CONFIG_SHOW_USAGE is not set
# CONFIG_FEATURE_VERBOSE_USAGE is not set
# CONFIG_FEATURE_COMPRESS_USAGE is not set
CONFIG_FEATURE_INSTALLER=y
# CONFIG_INSTALL_NO_USR is not set
# CONFIG_LOCALE_SUPPORT is not set
# CONFIG_UNICODE_SUPPORT is not set
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=0
CONFIG_LAST_SUPPORTED_WCHAR=0
# CONFIG_UNICODE_COMBINING_WCHARS is not set
# CONFIG_UNICODE_WIDE_WCHARS is not set
# CONFIG_UNICODE_BIDI_SUPPORT is not set
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_LONG_OPTS is not set
# CONFIG_FEATURE_DEVPTS is not set
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_UTMP is not set
# CONFIG_FEATURE_WTMP is not set
# CONFIG_FEATURE_PIDFILE is not set
# CONFIG_FEATURE_SUID is not set
# CONFIG_FEATURE_SUID_CONFIG is not set
# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_PREFER_APPLETS is not set
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_HAVE_RPC is not set
#
# Build Options
#
# CONFIG_STATIC is not set
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
# CONFIG_LFS is not set
CONFIG_CROSS_COMPILER_PREFIX="arm-linux-androideabi-"
CONFIG_EXTRA_CFLAGS=""
#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_WERROR is not set
CONFIG_NO_DEBUG_LIB=y
# CONFIG_DMALLOC is not set
# CONFIG_EFENCE is not set
#
# Installation Options ("make install" behavior)
#
CONFIG_INSTALL_APPLET_SYMLINKS=y
# CONFIG_INSTALL_APPLET_HARDLINKS is not set
# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
# CONFIG_INSTALL_APPLET_DONT is not set
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
CONFIG_PREFIX="./_install"
#
# Busybox Library Tuning
#
# CONFIG_FEATURE_SYSTEMD is not set
# CONFIG_FEATURE_RTMINMAX is not set
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
# CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_USE_TERMIOS=y
# CONFIG_FEATURE_EDITING is not set
CONFIG_FEATURE_EDITING_MAX_LEN=0
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=0
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
# CONFIG_FEATURE_TAB_COMPLETION is not set
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
# CONFIG_FEATURE_NON_POSIX_CP is not set
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
CONFIG_FEATURE_COPYBUF_KB=4
# CONFIG_FEATURE_SKIP_ROOTFS is not set
# CONFIG_MONOTONIC_SYSCALL is not set
# CONFIG_IOCTL_HEX2STR_ERROR is not set
# CONFIG_FEATURE_HWIB is not set
#
# Applets
#
#
# Archival Utilities
#
CONFIG_FEATURE_SEAMLESS_XZ=y
CONFIG_FEATURE_SEAMLESS_LZMA=y
CONFIG_FEATURE_SEAMLESS_BZ2=y
CONFIG_FEATURE_SEAMLESS_GZ=y
CONFIG_FEATURE_SEAMLESS_Z=y
CONFIG_AR=y
CONFIG_FEATURE_AR_LONG_FILENAMES=y
CONFIG_FEATURE_AR_CREATE=y
CONFIG_BUNZIP2=y
CONFIG_BZIP2=y
CONFIG_CPIO=y
CONFIG_FEATURE_CPIO_O=y
CONFIG_FEATURE_CPIO_P=y
CONFIG_DPKG=y
CONFIG_DPKG_DEB=y
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_GZIP=y
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
CONFIG_LZOP=y
CONFIG_LZOP_COMPR_HIGH=y
CONFIG_RPM2CPIO=y
CONFIG_RPM=y
CONFIG_TAR=y
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
CONFIG_FEATURE_TAR_UNAME_GNAME=y
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNCOMPRESS=y
CONFIG_UNLZMA=y
CONFIG_FEATURE_LZMA_FAST=y
CONFIG_LZMA=y
CONFIG_UNXZ=y
CONFIG_XZ=y
CONFIG_UNZIP=y
#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
# CONFIG_DATE is not set
# CONFIG_FEATURE_DATE_ISOFMT is not set
# CONFIG_FEATURE_DATE_NANO is not set
# CONFIG_FEATURE_DATE_COMPAT is not set
# CONFIG_ID is not set
# CONFIG_GROUPS is not set
CONFIG_TEST=y
CONFIG_FEATURE_TEST_64=y
CONFIG_TOUCH=y
CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y
CONFIG_BASE64=y
CONFIG_CAL=y
CONFIG_CATV=y
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
CONFIG_CHROOT=y
CONFIG_CKSUM=y
CONFIG_COMM=y
CONFIG_CP=y
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
CONFIG_CUT=y
CONFIG_DD=y
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DD_IBS_OBS=y
# CONFIG_DF is not set
# CONFIG_FEATURE_DF_FANCY is not set
CONFIG_DIRNAME=y
CONFIG_DOS2UNIX=y
CONFIG_UNIX2DOS=y
CONFIG_DU=y
CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
# CONFIG_ENV is not set
# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
CONFIG_EXPAND=y
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
# CONFIG_EXPR is not set
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
CONFIG_FOLD=y
# CONFIG_FSYNC is not set
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
# CONFIG_HOSTID is not set
CONFIG_INSTALL=y
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
CONFIG_LN=y
# CONFIG_LOGNAME is not set
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
# CONFIG_FEATURE_LS_COLOR is not set
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
CONFIG_MV=y
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
CONFIG_NICE=y
CONFIG_NOHUP=y
CONFIG_OD=y
CONFIG_PRINTENV=y
CONFIG_PRINTF=y
CONFIG_PWD=y
CONFIG_READLINK=y
CONFIG_FEATURE_READLINK_FOLLOW=y
CONFIG_REALPATH=y
CONFIG_RM=y
CONFIG_RMDIR=y
# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
CONFIG_SEQ=y
CONFIG_SHA1SUM=y
CONFIG_SHA256SUM=y
CONFIG_SHA512SUM=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
CONFIG_SPLIT=y
CONFIG_FEATURE_SPLIT_FANCY=y
# CONFIG_STAT is not set
# CONFIG_FEATURE_STAT_FORMAT is not set
CONFIG_STTY=y
CONFIG_SUM=y
CONFIG_SYNC=y
CONFIG_TAC=y
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
CONFIG_TRUE=y
# CONFIG_TTY is not set
CONFIG_UNAME=y
CONFIG_UNEXPAND=y
# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
CONFIG_UNIQ=y
# CONFIG_USLEEP is not set
CONFIG_UUDECODE=y
CONFIG_UUENCODE=y
CONFIG_WC=y
CONFIG_FEATURE_WC_LARGE=y
# CONFIG_WHO is not set
CONFIG_WHOAMI=y
CONFIG_YES=y
#
# Common options for cp and mv
#
CONFIG_FEATURE_PRESERVE_HARDLINKS=y
#
# Common options for ls, more and telnet
#
CONFIG_FEATURE_AUTOWIDTH=y
#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
#
# Common options for md5sum, sha1sum, sha256sum, sha512sum
#
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
#
# Console Utilities
#
CONFIG_CHVT=y
CONFIG_FGCONSOLE=y
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
# CONFIG_KBD_MODE is not set
# CONFIG_LOADFONT is not set
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
CONFIG_RESIZE=y
CONFIG_FEATURE_RESIZE_PRINT=y
CONFIG_SETCONSOLE=y
# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
# CONFIG_SETFONT is not set
# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
CONFIG_DEFAULT_SETFONT_DIR=""
CONFIG_SETKEYCODES=y
CONFIG_SETLOGCONS=y
CONFIG_SHOWKEY=y
# CONFIG_FEATURE_LOADFONT_PSF2 is not set
# CONFIG_FEATURE_LOADFONT_RAW is not set
#
# Debian Utilities
#
CONFIG_MKTEMP=y
CONFIG_PIPE_PROGRESS=y
CONFIG_RUN_PARTS=y
# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
CONFIG_FEATURE_RUN_PARTS_FANCY=y
CONFIG_START_STOP_DAEMON=y
CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
CONFIG_WHICH=y
#
# Editors
#
CONFIG_PATCH=y
CONFIG_VI=y
CONFIG_FEATURE_VI_MAX_LEN=0
# CONFIG_FEATURE_VI_8BIT is not set
# CONFIG_FEATURE_VI_COLON is not set
# CONFIG_FEATURE_VI_YANKMARK is not set
CONFIG_FEATURE_VI_SEARCH=y
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
CONFIG_FEATURE_VI_USE_SIGNALS=y
# CONFIG_FEATURE_VI_DOT_CMD is not set
# CONFIG_FEATURE_VI_READONLY is not set
# CONFIG_FEATURE_VI_SETOPTS is not set
# CONFIG_FEATURE_VI_SET is not set
CONFIG_FEATURE_VI_WIN_RESIZE=y
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
# CONFIG_AWK is not set
# CONFIG_FEATURE_AWK_LIBM is not set
CONFIG_CMP=y
CONFIG_DIFF=y
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
CONFIG_FEATURE_DIFF_DIR=y
# CONFIG_ED is not set
CONFIG_SED=y
# CONFIG_FEATURE_ALLOW_EXEC is not set
#
# Finding Utilities
#
CONFIG_FIND=y
CONFIG_FEATURE_FIND_PRINT0=y
CONFIG_FEATURE_FIND_MTIME=y
# CONFIG_FEATURE_FIND_MMIN is not set
CONFIG_FEATURE_FIND_PERM=y
CONFIG_FEATURE_FIND_TYPE=y
# CONFIG_FEATURE_FIND_XDEV is not set
# CONFIG_FEATURE_FIND_MAXDEPTH is not set
# CONFIG_FEATURE_FIND_NEWER is not set
# CONFIG_FEATURE_FIND_INUM is not set
# CONFIG_FEATURE_FIND_EXEC is not set
# CONFIG_FEATURE_FIND_USER is not set
# CONFIG_FEATURE_FIND_GROUP is not set
# CONFIG_FEATURE_FIND_NOT is not set
# CONFIG_FEATURE_FIND_DEPTH is not set
# CONFIG_FEATURE_FIND_PAREN is not set
# CONFIG_FEATURE_FIND_SIZE is not set
# CONFIG_FEATURE_FIND_PRUNE is not set
# CONFIG_FEATURE_FIND_DELETE is not set
# CONFIG_FEATURE_FIND_PATH is not set
# CONFIG_FEATURE_FIND_REGEX is not set
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_FIND_LINKS is not set
CONFIG_GREP=y
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_CONTEXT is not set
CONFIG_XARGS=y
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
#
# Init Utilities
#
# CONFIG_BOOTCHARTD is not set
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
# CONFIG_HALT is not set
# CONFIG_FEATURE_CALL_TELINIT is not set
# CONFIG_TELINIT_PATH=""
# CONFIG_INIT is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
# CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
# CONFIG_FEATURE_EXTRA_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
# CONFIG_INIT_TERMINAL_TYPE="linux"
# CONFIG_MESG is not set
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
#
# Login/Password Management Utilities
#
# CONFIG_ADD_SHELL is not set
# CONFIG_REMOVE_SHELL is not set
# CONFIG_FEATURE_SHADOWPASSWDS is not set
# CONFIG_USE_BB_PWD_GRP is not set
# CONFIG_USE_BB_SHADOW is not set
# CONFIG_USE_BB_CRYPT is not set
# CONFIG_USE_BB_CRYPT_SHA is not set
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_FIRST_SYSTEM_ID=0
CONFIG_LAST_SYSTEM_ID=0
# CONFIG_ADDGROUP is not set
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
# CONFIG_DELUSER is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
# CONFIG_GETTY is not set
# CONFIG_LOGIN is not set
# CONFIG_PAM is not set
# CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_FEATURE_NOLOGIN is not set
# CONFIG_FEATURE_SECURETTY is not set
# CONFIG_PASSWD is not set
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
# CONFIG_CRYPTPW is not set
# CONFIG_CHPASSWD is not set
# CONFIG_SU is not set
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
#
# Linux Ext2 FS Progs
#
CONFIG_CHATTR=y
# CONFIG_FSCK is not set
CONFIG_LSATTR=y
CONFIG_TUNE2FS=y
#
# Linux Module Utilities
#
# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
# CONFIG_INSMOD is not set
# CONFIG_RMMOD is not set
# CONFIG_LSMOD is not set
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
# CONFIG_MODPROBE is not set
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
# CONFIG_DEPMOD is not set
#
# Options common to multiple modutils
#
# CONFIG_FEATURE_2_4_MODULES is not set
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
# CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
# CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
#
# Linux System Utilities
#
CONFIG_BLOCKDEV=y
CONFIG_REV=y
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
CONFIG_BLKID=y
# CONFIG_FEATURE_BLKID_TYPE is not set
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
CONFIG_FBSET=y
CONFIG_FEATURE_FBSET_FANCY=y
CONFIG_FEATURE_FBSET_READMODE=y
CONFIG_FDFLUSH=y
CONFIG_FDFORMAT=y
CONFIG_FDISK=y
CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_AIX_LABEL is not set
# CONFIG_FEATURE_SGI_LABEL is not set
# CONFIG_FEATURE_SUN_LABEL is not set
# CONFIG_FEATURE_OSF_LABEL is not set
# CONFIG_FEATURE_GPT_LABEL is not set
CONFIG_FEATURE_FDISK_ADVANCED=y
CONFIG_FINDFS=y
CONFIG_FLOCK=y
CONFIG_FREERAMDISK=y
# CONFIG_FSCK_MINIX is not set
# CONFIG_MKFS_EXT2 is not set
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_MKFS_REISER is not set
# CONFIG_MKFS_VFAT is not set
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y
CONFIG_FEATURE_HEXDUMP_REVERSE=y
CONFIG_HD=y
# CONFIG_HWCLOCK is not set
# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_LSPCI=y
CONFIG_LSUSB=y
# CONFIG_MDEV is not set
# CONFIG_FEATURE_MDEV_CONF is not set
# CONFIG_FEATURE_MDEV_RENAME is not set
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
# CONFIG_FEATURE_MDEV_EXEC is not set
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
CONFIG_MORE=y
# CONFIG_MOUNT is not set
# CONFIG_FEATURE_MOUNT_FAKE is not set
# CONFIG_FEATURE_MOUNT_VERBOSE is not set
# CONFIG_FEATURE_MOUNT_HELPERS is not set
# CONFIG_FEATURE_MOUNT_LABEL is not set
# CONFIG_FEATURE_MOUNT_NFS is not set
# CONFIG_FEATURE_MOUNT_CIFS is not set
# CONFIG_FEATURE_MOUNT_FLAGS is not set
# CONFIG_FEATURE_MOUNT_FSTAB is not set
# CONFIG_PIVOT_ROOT is not set
# CONFIG_RDATE is not set
CONFIG_RDEV=y
CONFIG_READPROFILE=y
CONFIG_RTCWAKE=y
CONFIG_SCRIPT=y
CONFIG_SCRIPTREPLAY=y
# CONFIG_SETARCH is not set
# CONFIG_SWAPONOFF is not set
# CONFIG_FEATURE_SWAPON_PRI is not set
# CONFIG_SWITCH_ROOT is not set
# CONFIG_UMOUNT is not set
# CONFIG_FEATURE_UMOUNT_ALL is not set
# CONFIG_FEATURE_MOUNT_LOOP is not set
# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
# CONFIG_FEATURE_MTAB_SUPPORT is not set
CONFIG_VOLUMEID=y
#
# Filesystem/Volume identification
#
CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_FEATURE_VOLUMEID_REISERFS=y
CONFIG_FEATURE_VOLUMEID_FAT=y
CONFIG_FEATURE_VOLUMEID_HFS=y
CONFIG_FEATURE_VOLUMEID_JFS=y
CONFIG_FEATURE_VOLUMEID_XFS=y
CONFIG_FEATURE_VOLUMEID_NTFS=y
CONFIG_FEATURE_VOLUMEID_ISO9660=y
CONFIG_FEATURE_VOLUMEID_UDF=y
CONFIG_FEATURE_VOLUMEID_LUKS=y
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_ROMFS=y
CONFIG_FEATURE_VOLUMEID_SYSV=y
CONFIG_FEATURE_VOLUMEID_OCFS2=y
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
#
# Miscellaneous Utilities
#
# CONFIG_CONSPY is not set
# CONFIG_NANDWRITE is not set
CONFIG_NANDDUMP=y
CONFIG_SETSERIAL=y
# CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set
# CONFIG_UBIMKVOL is not set
# CONFIG_UBIRMVOL is not set
# CONFIG_UBIRSVOL is not set
# CONFIG_UBIUPDATEVOL is not set
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
CONFIG_BEEP=y
CONFIG_FEATURE_BEEP_FREQ=4000
CONFIG_FEATURE_BEEP_LENGTH_MS=30
CONFIG_CHAT=y
CONFIG_FEATURE_CHAT_NOFAIL=y
# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y
CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
CONFIG_FEATURE_CHAT_CLR_ABORT=y
CONFIG_CHRT=y
# CONFIG_CROND is not set
# CONFIG_FEATURE_CROND_D is not set
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
# CONFIG_CRONTAB is not set
CONFIG_DC=y
CONFIG_FEATURE_DC_LIBM=y
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
# CONFIG_DEVFSD_FG_NP is not set
# CONFIG_DEVFSD_VERBOSE is not set
# CONFIG_FEATURE_DEVFS is not set
CONFIG_DEVMEM=y
# CONFIG_EJECT is not set
# CONFIG_FEATURE_EJECT_SCSI is not set
CONFIG_FBSPLASH=y
CONFIG_FLASHCP=y
CONFIG_FLASH_LOCK=y
CONFIG_FLASH_UNLOCK=y
# CONFIG_FLASH_ERASEALL is not set
# CONFIG_IONICE is not set
CONFIG_INOTIFYD=y
# CONFIG_LAST is not set
# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY is not set
# CONFIG_LESS is not set
CONFIG_FEATURE_LESS_MAXLINES=0
# CONFIG_FEATURE_LESS_BRACKETS is not set
# CONFIG_FEATURE_LESS_FLAGS is not set
# CONFIG_FEATURE_LESS_MARKS is not set
# CONFIG_FEATURE_LESS_REGEXP is not set
# CONFIG_FEATURE_LESS_WINCH is not set
# CONFIG_FEATURE_LESS_DASHCMD is not set
# CONFIG_FEATURE_LESS_LINENUMS is not set
CONFIG_HDPARM=y
CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
CONFIG_MAKEDEVS=y
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
CONFIG_FEATURE_MAKEDEVS_TABLE=y
CONFIG_MAN=y
# CONFIG_MICROCOM is not set
# CONFIG_MOUNTPOINT is not set
# CONFIG_MT is not set
CONFIG_RAIDAUTORUN=y
# CONFIG_READAHEAD is not set
# CONFIG_RFKILL is not set
# CONFIG_RUNLEVEL is not set
CONFIG_RX=y
CONFIG_SETSID=y
CONFIG_STRINGS=y
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
CONFIG_TIME=y
CONFIG_TIMEOUT=y
CONFIG_TTYSIZE=y
CONFIG_VOLNAME=y
# CONFIG_WALL is not set
# CONFIG_WATCHDOG is not set
#
# Networking Utilities
#
# CONFIG_NAMEIF is not set
# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
CONFIG_NBDCLIENT=y
CONFIG_NC=y
CONFIG_NC_SERVER=y
CONFIG_NC_EXTRA=y
# CONFIG_NC_110_COMPAT is not set
# CONFIG_PING is not set
# CONFIG_PING6 is not set
# CONFIG_FEATURE_FANCY_PING is not set
CONFIG_WHOIS=y
# CONFIG_FEATURE_IPV6 is not set
# CONFIG_FEATURE_UNIX_LOCAL is not set
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
CONFIG_ARP=y
# CONFIG_ARPING is not set
# CONFIG_BRCTL is not set
# CONFIG_FEATURE_BRCTL_FANCY is not set
# CONFIG_FEATURE_BRCTL_SHOW is not set
CONFIG_DNSD=y
# CONFIG_ETHER_WAKE is not set
CONFIG_FAKEIDENTD=y
CONFIG_FTPD=y
CONFIG_FEATURE_FTP_WRITE=y
CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
CONFIG_FTPGET=y
CONFIG_FTPPUT=y
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
# CONFIG_HOSTNAME is not set
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
CONFIG_FEATURE_IFCONFIG_HW=y
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
CONFIG_IFUPDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
CONFIG_FEATURE_IFUPDOWN_IP=y
CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
# CONFIG_INETD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_TUNNEL=y
CONFIG_FEATURE_IP_RULE=y
CONFIG_FEATURE_IP_SHORT_FORMS=y
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
CONFIG_IPADDR=y
CONFIG_IPLINK=y
CONFIG_IPROUTE=y
CONFIG_IPTUNNEL=y
CONFIG_IPRULE=y
CONFIG_IPCALC=y
CONFIG_FEATURE_IPCALC_FANCY=y
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
CONFIG_NETSTAT=y
CONFIG_FEATURE_NETSTAT_WIDE=y
CONFIG_FEATURE_NETSTAT_PRG=y
# CONFIG_NSLOOKUP is not set
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_PSCAN=y
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
CONFIG_TCPSVD=y
# CONFIG_TELNET is not set
# CONFIG_FEATURE_TELNET_TTYPE is not set
# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
# CONFIG_TFTP is not set
# CONFIG_TFTPD is not set
# CONFIG_FEATURE_TFTP_GET is not set
# CONFIG_FEATURE_TFTP_PUT is not set
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTP_DEBUG is not set
# CONFIG_TRACEROUTE is not set
# CONFIG_TRACEROUTE6 is not set
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
CONFIG_TUNCTL=y
CONFIG_FEATURE_TUNCTL_UG=y
# CONFIG_UDHCPD is not set
# CONFIG_DHCPRELAY is not set
# CONFIG_DUMPLEASES is not set
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
CONFIG_DHCPD_LEASES_FILE=""
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=9
CONFIG_FEATURE_UDHCP_RFC3397=y
CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
# CONFIG_UDPSVD is not set
# CONFIG_VCONFIG is not set
CONFIG_WGET=y
CONFIG_FEATURE_WGET_STATUSBAR=y
CONFIG_FEATURE_WGET_AUTHENTICATION=y
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
CONFIG_FEATURE_WGET_TIMEOUT=y
# CONFIG_ZCIP is not set
#
# Print Utilities
#
CONFIG_LPD=y
CONFIG_LPR=y
CONFIG_LPQ=y
#
# Mail Utilities
#
CONFIG_MAKEMIME=y
CONFIG_FEATURE_MIME_CHARSET="us-ascii"
CONFIG_POPMAILDIR=y
CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
CONFIG_REFORMIME=y
CONFIG_FEATURE_REFORMIME_COMPAT=y
CONFIG_SENDMAIL=y
#
# Process Utilities
#
CONFIG_IOSTAT=y
CONFIG_MPSTAT=y
CONFIG_NMETER=y
CONFIG_PMAP=y
# CONFIG_POWERTOP is not set
CONFIG_PSTREE=y
CONFIG_PWDX=y
CONFIG_SMEMCAP=y
# CONFIG_FREE is not set
CONFIG_FUSER=y
# CONFIG_KILL is not set
# CONFIG_KILLALL is not set
# CONFIG_KILLALL5 is not set
# CONFIG_PGREP is not set
CONFIG_PIDOF=y
CONFIG_FEATURE_PIDOF_SINGLE=y
CONFIG_FEATURE_PIDOF_OMIT=y
# CONFIG_PKILL is not set
# CONFIG_PS is not set
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_TIME is not set
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
CONFIG_RENICE=y
CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_FEATURE_SHOW_THREADS=y
# CONFIG_UPTIME is not set
CONFIG_WATCH=y
#
# Runit Utilities
#
CONFIG_RUNSV=y
CONFIG_RUNSVDIR=y
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
CONFIG_SV=y
CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
CONFIG_SVLOGD=y
CONFIG_CHPST=y
CONFIG_SETUIDGID=y
CONFIG_ENVUIDGID=y
CONFIG_ENVDIR=y
CONFIG_SOFTLIMIT=y
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
# CONFIG_SETSEBOOL is not set
# CONFIG_SESTATUS is not set
#
# Shells
#
CONFIG_ASH=y
# CONFIG_ASH_BASH_COMPAT is not set
# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
# CONFIG_ASH_ALIAS is not set
CONFIG_ASH_GETOPTS=y
# CONFIG_ASH_BUILTIN_ECHO is not set
# CONFIG_ASH_BUILTIN_PRINTF is not set
# CONFIG_ASH_BUILTIN_TEST is not set
# CONFIG_ASH_CMDCMD is not set
# CONFIG_ASH_MAIL is not set
# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
# CONFIG_ASH_RANDOM_SUPPORT is not set
# CONFIG_ASH_EXPAND_PRMT is not set
CONFIG_CTTYHACK=y
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_SAVEHISTORY is not set
# CONFIG_HUSH_JOB is not set
# CONFIG_HUSH_TICK is not set
# CONFIG_HUSH_IF is not set
# CONFIG_HUSH_LOOPS is not set
# CONFIG_HUSH_CASE is not set
# CONFIG_HUSH_FUNCTIONS is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_MODE_X is not set
# CONFIG_MSH is not set
CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# CONFIG_FEATURE_BASH_IS_ASH is not set
# CONFIG_FEATURE_BASH_IS_HUSH is not set
CONFIG_FEATURE_BASH_IS_NONE=y
# CONFIG_SH_MATH_SUPPORT is not set
# CONFIG_SH_MATH_SUPPORT_64 is not set
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
CONFIG_FEATURE_SH_STANDALONE=y
# CONFIG_FEATURE_SH_NOFORK is not set
# CONFIG_FEATURE_SH_HISTFILESIZE is not set
#
# System Logging Utilities
#
# CONFIG_SYSLOGD is not set
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
# CONFIG_FEATURE_REMOTE_LOG is not set
# CONFIG_FEATURE_SYSLOGD_DUP is not set
# CONFIG_FEATURE_SYSLOGD_CFG is not set
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
# CONFIG_FEATURE_IPC_SYSLOG is not set
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_LOGREAD is not set
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
CONFIG_KLOGD=y
CONFIG_FEATURE_KLOGD_KLOGCTL=y
# CONFIG_LOGGER is not set

View file

@ -1,209 +0,0 @@
constraints: unix installed,
blaze-html ==0.8.1.3,
blaze-markup ==0.7.0.3,
basement ==0.0.7,
memory ==0.14.9,
connection ==0.2.8,
aws ==0.13.0,
lifted-base ==0.2.3.6,
Crypto ==4.2.5.1,
binary ==0.7.6.1,
DAV ==1.0.3,
HTTP ==4000.2.17,
HUnit ==1.2.5.2,
IfElse ==0.85,
MissingH ==1.2.1.0,
directory ==1.2.2.0,
MonadRandom ==0.1.13,
QuickCheck ==2.7.6,
SafeSemaphore ==0.10.1,
aeson ==0.7.0.6,
ansi-wl-pprint ==0.6.7.1,
appar ==0.1.4,
asn1-encoding ==0.9.5,
asn1-parse ==0.9.4,
asn1-types ==0.3.2,
async ==2.0.1.5,
attoparsec ==0.11.3.4,
attoparsec-conduit ==1.1.0,
authenticate ==1.3.2.10,
base-unicode-symbols ==0.2.2.4,
base16-bytestring ==0.1.1.6,
base64-bytestring ==1.0.0.1,
bifunctors ==4.1.1.1,
bloomfilter ==2.0.0.0,
byteable ==0.1.1,
byteorder ==1.0.4,
case-insensitive ==1.2.0.1,
cereal ==0.4.0.1,
cipher-aes ==0.2.8,
cipher-des ==0.0.6,
cipher-rc4 ==0.1.4,
clientsession ==0.9.0.3,
comonad ==4.2,
conduit ==1.1.6,
conduit-extra ==1.1.3,
contravariant ==0.6.1.1,
cookie ==0.4.1.2,
cprng-aes ==0.5.2,
crypto-api ==0.13.2,
crypto-cipher-types ==0.0.9,
crypto-numbers ==0.2.3,
crypto-pubkey ==0.2.4,
crypto-pubkey-types ==0.4.2.3,
crypto-random ==0.0.7,
cryptohash ==0.11.6,
cryptohash-conduit ==0.1.1,
css-text ==0.1.2.1,
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,
sandi ==0.3.0.1,
dbus ==0.10.8,
distributive ==0.4.4,
dlist ==0.7.0.1,
dns ==1.3.0,
edit-distance ==0.2.1.2,
either ==4.3,
email-validate ==1.0.0,
entropy ==0.2.1,
errors ==1.4.7,
exceptions ==0.6.1,
failure ==0.2.0.3,
fast-logger ==2.1.5,
fdo-notify ==0.3.1,
feed ==0.3.9.2,
file-embed ==0.0.6,
fingertree ==0.1.0.0,
free ==4.9,
gnuidn ==0.2,
gnutls ==0.1.4,
gsasl ==0.3.5,
hS3 ==0.5.7,
hashable ==1.2.1.0,
hinotify ==0.3.5,
hjsmin ==0.1.4.7,
hslogger ==1.2.10,
http-client ==0.4.31.1,
http-client-tls ==0.2.4.1,
http-conduit ==2.1.9,
http-date ==0.0.6.1,
http-types ==0.9.1,
blaze-builder ==0.3.3.2,
hxt ==9.3.1.4,
hxt-charproperties ==9.1.1.1,
hxt-regex-xmlschema ==9.0.4,
hxt-unicode ==9.0.2.2,
idna ==0.2,
iproute ==1.3.1,
json ==0.5,
keys ==3.10.1,
language-javascript ==0.5.13,
lens ==4.4.0.2,
libxml-sax ==0.7.5,
mime-mail ==0.4.1.2,
mime-types ==0.1.0.4,
mmorph ==1.0.3,
monad-control ==0.3.2.2,
monad-logger ==0.3.6.1,
monad-loops ==0.4.2.1,
monads-tf ==0.1.0.2,
mtl ==2.1.2,
nats ==0.1.2,
network ==2.6.3.1
network-conduit ==1.1.0,
network-info ==0.2.0.5,
network-multicast ==0.0.10,
network-uri ==2.6.0.1,
optparse-applicative ==0.11.0.2,
parallel ==3.2.0.4,
path-pieces ==0.1.4,
pem ==0.2.2,
persistent ==1.3.3,
persistent-template ==1.3.2.2,
pointed ==4.0,
prelude-extras ==0.4,
profunctors ==4.0.4,
publicsuffixlist ==0.1,
punycode ==2.0,
random ==1.0.1.1,
ranges ==0.2.4,
reducers ==3.10.2.1,
reflection ==1.2.0.1,
regex-base ==0.93.2,
regex-compat ==0.95.1,
regex-posix ==0.95.2,
regex-tdfa ==1.2.0,
resource-pool ==0.2.1.1,
resourcet ==1.1.2.3,
safe ==0.3.8,
securemem ==0.1.3,
semigroupoids ==4.2,
semigroups ==0.15.3,
shakespeare ==2.0.5,
silently ==1.2.4.1,
simple-sendfile ==0.2.14,
skein ==1.0.9,
socks ==0.5.5,
split ==0.2.2,
stm ==2.4.2,
stm-chans ==3.0.0.2,
streaming-commons ==0.1.4.1,
stringprep ==0.1.5,
stringsearch ==0.3.6.5,
syb ==0.4.0,
system-fileio ==0.3.14,
system-filepath ==0.4.12,
tagged ==0.7.2,
tagsoup ==0.13.1,
tagstream-conduit ==0.5.5.1,
text ==1.1.1.0,
text-icu ==0.6.3.7,
tf-random ==0.5,
tls ==1.3.8,
transformers ==0.3.0.0,
transformers-base ==0.4.1,
transformers-compat ==0.3.3.3,
unbounded-delays ==0.1.0.8,
unix-compat ==0.4.1.3,
unix-time ==0.2.2,
unordered-containers ==0.2.5.0,
utf8-string ==0.3.7,
uuid ==1.3.3,
vault ==0.3.0.3,
vector ==0.10.0.1,
void ==0.6.1,
wai ==3.0.1.1,
wai-app-static ==3.0.0.1,
wai-extra ==3.0.1.2,
wai-logger ==2.1.1,
warp ==3.0.8,
warp-tls ==3.0.4.2,
word8 ==0.1.1,
x509 ==1.6.5,
x509-store ==1.6.3,
x509-system ==1.6.6,
x509-validation ==1.6.8,
xml ==1.3.13,
xml-conduit ==1.2.1,
xml-hamlet ==0.4.0.9,
xml-types ==0.3.4,
xss-sanitize ==0.3.5.2,
yaml ==0.8.9.3,
yesod ==1.2.6.1,
yesod-auth ==1.3.4.6,
yesod-core ==1.2.20.1,
yesod-default ==1.2.0,
yesod-form ==1.3.16,
yesod-persistent ==1.2.3.1,
yesod-routes ==1.2.0.7,
yesod-static ==1.2.4,
zlib ==0.5.4.1,
bytestring installed,
process ==1.2.3.0,
scientific ==0.3.3.1,
clock ==0.4.6.0,
cryptonite ==0.15

View file

@ -1,6 +0,0 @@
#!/bin/sh
# Removes all currently installed cross-compiled haskell packages
# except those part of ghc.
# Useful if the build failed.
rm -f $(grep -l $HOME/.ghc/$(cat abiversion)/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/lib/*-ghc-*/package.conf.d/*.conf)
$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin/ghc-pkg recache

View file

@ -1,55 +0,0 @@
From 014dadb02fd984828a6232534c47dba8e2f7818a Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 13 Feb 2013 15:29:52 -0400
Subject: [PATCH] android patch for dropbear
* Disable HOME override
* Use urandom to avoid blocking on every ssh connection.
* Enable use of netbsd_getpass.c
---
cli-auth.c | 1 +
cli-main.c | 2 --
options.h | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cli-auth.c b/cli-auth.c
index 4c17a21..91dfdf8 100644
--- a/cli-auth.c
+++ b/cli-auth.c
@@ -31,6 +31,7 @@
#include "ssh.h"
#include "packet.h"
#include "runopts.h"
+#include "netbsd_getpass.c"
void cli_authinitialise() {
diff --git a/cli-main.c b/cli-main.c
index 106006b..68cf023 100644
--- a/cli-main.c
+++ b/cli-main.c
@@ -47,8 +47,6 @@ int main(int argc, char ** argv) {
_dropbear_exit = cli_dropbear_exit;
_dropbear_log = cli_dropbear_log;
- putenv("HOME=/data/local");
-
disallow_core();
cli_getopts(argc, argv);
diff --git a/options.h b/options.h
index 7625151..48e404d 100644
--- a/options.h
+++ b/options.h
@@ -159,7 +159,7 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */
* however significantly reduce the security of your ssh connections
* if the PRNG state becomes guessable - make sure you know what you are
* doing if you change this. */
-#define DROPBEAR_RANDOM_DEV "/dev/random"
+#define DROPBEAR_RANDOM_DEV "/dev/urandom"
/* prngd must be manually set up to produce output */
/*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/
--
1.7.10.4

View file

@ -1,47 +0,0 @@
From e0fffe80a8815e64dbc1d690c79bf006651c7642 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 13 Aug 2014 13:50:56 -0400
Subject: [PATCH] avoid using of chmod on android when changing config
This breaks on Android's /sdcard, which has a variety of FUSE
implentations, all total shite.
---
config.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/config.c b/config.c
index 9ba40bc..a350638 100644
--- a/config.c
+++ b/config.c
@@ -2124,12 +2124,14 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
close(in_fd);
in_fd = -1;
+ /* not on android
if (chmod(get_lock_file_path(lock), st.st_mode & 07777) < 0) {
error("chmod on %s failed: %s",
get_lock_file_path(lock), strerror(errno));
ret = CONFIG_NO_WRITE;
goto out_free;
}
+ */
if (store.seen == 0)
store.seen = 1;
@@ -2329,11 +2331,13 @@ int git_config_rename_section_in_file(const char *config_filename,
fstat(fileno(config_file), &st);
+ /* not on android
if (chmod(get_lock_file_path(lock), st.st_mode & 07777) < 0) {
ret = error("chmod on %s failed: %s",
get_lock_file_path(lock), strerror(errno));
goto out;
}
+ */
while (fgets(buf, sizeof(buf), config_file)) {
int i;
--
2.1.4

View file

@ -1,41 +0,0 @@
From cc0c373b69f93057cbdcb634a461e10ec019d87a Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Wed, 20 Jun 2018 00:29:11 +0100
Subject: [PATCH] fix build on android
---
Basement/Terminal.hs | 2 --
basement.cabal | 1 -
2 files changed, 3 deletions(-)
diff --git a/Basement/Terminal.hs b/Basement/Terminal.hs
index 8136e52..cca9606 100644
--- a/Basement/Terminal.hs
+++ b/Basement/Terminal.hs
@@ -1,11 +1,9 @@
{-# LANGUAGE CPP #-}
module Basement.Terminal
( initialize
- , getDimensions
) where
import Basement.Compat.Base
-import Basement.Terminal.Size (getDimensions)
#ifdef mingw32_HOST_OS
import System.IO (hSetEncoding, utf8, hPutStrLn, stderr, stdin, stdout)
import System.Win32.Console (setConsoleCP, setConsoleOutputCP, getConsoleCP, getConsoleOutputCP)
diff --git a/basement.cabal b/basement.cabal
index af50291..0824c94 100644
--- a/basement.cabal
+++ b/basement.cabal
@@ -135,7 +135,6 @@ library
Basement.String.Encoding.ASCII7
Basement.String.Encoding.ISO_8859_1
- Basement.Terminal.Size
build-depends: base >= 4.7 && < 5
--
2.1.4

View file

@ -1,37 +0,0 @@
From 3779c75175e895f94b21341ebd6361e9d6af54fd Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Thu, 9 May 2013 12:36:23 -0400
Subject: [PATCH] support Android cert store
Android puts it in a different place and has only hashed files.
See https://github.com/vincenthz/hs-certificate/issues/19
---
System/Certificate/X509/Unix.hs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/System/Certificate/X509/Unix.hs b/System/Certificate/X509/Unix.hs
index 8463465..74e9503 100644
--- a/System/Certificate/X509/Unix.hs
+++ b/System/Certificate/X509/Unix.hs
@@ -35,7 +35,8 @@ import qualified Control.Exception as E
import Data.Char
defaultSystemPath :: FilePath
-defaultSystemPath = "/etc/ssl/certs/"
+defaultSystemPath = "/system/etc/security/cacerts/"
+--defaultSystemPath = "/etc/ssl/certs/"
envPathOverride :: String
envPathOverride = "SYSTEM_CERTIFICATE_PATH"
@@ -47,7 +48,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten
&& 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)
--
1.8.2.rc3

View file

@ -1,76 +0,0 @@
From 5be3bdfc5ec83eaa5defd42e99f73a685123bea0 Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Fri, 22 May 2015 18:35:43 +0000
Subject: [PATCH] hack for android
---
System/Clock.hsc | 32 ++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)
diff --git a/System/Clock.hsc b/System/Clock.hsc
index b6a4968..92bcf8b 100644
--- a/System/Clock.hsc
+++ b/System/Clock.hsc
@@ -35,8 +35,6 @@ import GHC.Generics (Generic)
# endif
#endif
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
-
-- | Clock types. A clock may be system-wide (that is, visible to all processes)
-- or per-process (measuring time that is meaningful only within a process).
-- All implementations shall support CLOCK_REALTIME.
@@ -119,7 +117,7 @@ getTime ThreadCPUTime = allocaAndPeek hs_clock_win32_gettime_threadtime
#elif defined(__MACH__)
getTime clk = allocaAndPeek $ hs_clock_darwin_gettime $ clockToConst clk
#else
-getTime clk = allocaAndPeek $ clock_gettime $ clockToConst clk
+getTime clk = error "getTime clk not implemented"
#endif
#if defined(_WIN32)
@@ -130,7 +128,7 @@ getRes ThreadCPUTime = allocaAndPeek hs_clock_win32_getres_threadtime
#elif defined(__MACH__)
getRes clk = allocaAndPeek $ hs_clock_darwin_getres $ clockToConst clk
#else
-getRes clk = allocaAndPeek $ clock_getres $ clockToConst clk
+getRes clk = error "getRes clk not implemented"
#endif
-- | TimeSpec structure
@@ -139,32 +137,6 @@ data TimeSpec = TimeSpec
, nsec :: {-# UNPACK #-} !Int64 -- ^ nanoseconds
} deriving (Eq, Generic, Read, Show, Typeable)
-#if defined(_WIN32)
-instance Storable TimeSpec where
- sizeOf _ = sizeOf (undefined :: Int64) * 2
- alignment _ = alignment (undefined :: Int64)
- poke ptr ts = do
- pokeByteOff ptr 0 (sec ts)
- pokeByteOff ptr (sizeOf (undefined :: Int64)) (nsec ts)
- peek ptr = do
- TimeSpec
- <$> peekByteOff ptr 0
- <*> peekByteOff ptr (sizeOf (undefined :: Int64))
-#else
-instance Storable TimeSpec where
- sizeOf _ = #{size struct timespec}
- alignment _ = #{alignment struct timespec}
- poke ptr ts = do
- let xs :: #{type time_t} = fromIntegral $ sec ts
- xn :: #{type long} = fromIntegral $ nsec ts
- #{poke struct timespec, tv_sec} ptr (xs)
- #{poke struct timespec, tv_nsec} ptr (xn)
- peek ptr = do
- xs :: #{type time_t} <- #{peek struct timespec, tv_sec} ptr
- xn :: #{type long} <- #{peek struct timespec, tv_nsec} ptr
- return $ TimeSpec (fromIntegral xs) (fromIntegral xn)
-#endif
-
normalize :: TimeSpec -> TimeSpec
normalize (TimeSpec xs xn) =
let (q, r) = xn `divMod` (10^9)
--
2.1.4

View file

@ -1,25 +0,0 @@
From 589c6a87ec62e35942c9a86ea8d91b443c80da99 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Fri, 18 Oct 2013 23:07:02 +0000
Subject: [PATCH] cross build
---
comonad.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/comonad.cabal b/comonad.cabal
index 5d34b13..756ed92 100644
--- a/comonad.cabal
+++ b/comonad.cabal
@@ -13,7 +13,7 @@ copyright: Copyright (C) 2008-2013 Edward A. Kmett,
Copyright (C) 2004-2008 Dave Menendez
synopsis: Comonads
description: Comonads
-build-type: Custom
+build-type: Simple
extra-source-files:
.ghci
.gitignore
--
1.7.10.4

View file

@ -1,227 +0,0 @@
From 0cfdb30120976290068f4bcbebbf236b960afbb6 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 26 Dec 2013 20:01:30 -0400
Subject: [PATCH] hack to build
---
Crypto/Number/Basic.hs | 14 --------------
Crypto/Number/ModArithmetic.hs | 29 -----------------------------
Crypto/Number/Prime.hs | 18 ------------------
crypto-numbers.cabal | 2 +-
4 files changed, 1 insertion(+), 62 deletions(-)
diff --git a/Crypto/Number/Basic.hs b/Crypto/Number/Basic.hs
index 65c14b3..eaee853 100644
--- a/Crypto/Number/Basic.hs
+++ b/Crypto/Number/Basic.hs
@@ -20,11 +20,7 @@ module Crypto.Number.Basic
, areEven
) where
-#if MIN_VERSION_integer_gmp(0,5,1)
-import GHC.Integer.GMP.Internals
-#else
import Data.Bits
-#endif
-- | sqrti returns two integer (l,b) so that l <= sqrt i <= b
-- the implementation is quite naive, use an approximation for the first number
@@ -63,25 +59,16 @@ sqrti i
-- gcde 'a' 'b' find (x,y,gcd(a,b)) where ax + by = d
--
gcde :: Integer -> Integer -> (Integer, Integer, Integer)
-#if MIN_VERSION_integer_gmp(0,5,1)
-gcde a b = (s, t, g)
- where (# g, s #) = gcdExtInteger a b
- t = (g - s * a) `div` b
-#else
gcde a b = if d < 0 then (-x,-y,-d) else (x,y,d) where
(d, x, y) = f (a,1,0) (b,0,1)
f t (0, _, _) = t
f (a', sa, ta) t@(b', sb, tb) =
let (q, r) = a' `divMod` b' in
f t (r, sa - (q * sb), ta - (q * tb))
-#endif
-- | get the extended GCD of two integer using the extended binary algorithm (HAC 14.61)
-- get (x,y,d) where d = gcd(a,b) and x,y satisfying ax + by = d
gcde_binary :: Integer -> Integer -> (Integer, Integer, Integer)
-#if MIN_VERSION_integer_gmp(0,5,1)
-gcde_binary = gcde
-#else
gcde_binary a' b'
| b' == 0 = (1,0,a')
| a' >= b' = compute a' b'
@@ -105,7 +92,6 @@ gcde_binary a' b'
in if u2 >= v2
then loop g x y (u2 - v2) v2 (a2 - c2) (b2 - d2) c2 d2
else loop g x y u2 (v2 - u2) a2 b2 (c2 - a2) (d2 - b2)
-#endif
-- | check if a list of integer are all even
areEven :: [Integer] -> Bool
diff --git a/Crypto/Number/ModArithmetic.hs b/Crypto/Number/ModArithmetic.hs
index 942c12f..f8cfc32 100644
--- a/Crypto/Number/ModArithmetic.hs
+++ b/Crypto/Number/ModArithmetic.hs
@@ -29,12 +29,8 @@ module Crypto.Number.ModArithmetic
import Control.Exception (throw, Exception)
import Data.Typeable
-#if MIN_VERSION_integer_gmp(0,5,1)
-import GHC.Integer.GMP.Internals
-#else
import Crypto.Number.Basic (gcde_binary)
import Data.Bits
-#endif
-- | Raised when two numbers are supposed to be coprimes but are not.
data CoprimesAssertionError = CoprimesAssertionError
@@ -55,13 +51,7 @@ expSafe :: Integer -- ^ base
-> Integer -- ^ exponant
-> Integer -- ^ modulo
-> Integer -- ^ result
-#if MIN_VERSION_integer_gmp(0,5,1)
-expSafe b e m
- | odd m = powModSecInteger b e m
- | otherwise = powModInteger b e m
-#else
expSafe = exponentiation
-#endif
-- | Compute the modular exponentiation of base^exponant using
-- the fastest algorithm without any consideration for
@@ -74,11 +64,7 @@ expFast :: Integer -- ^ base
-> Integer -- ^ modulo
-> Integer -- ^ result
expFast =
-#if MIN_VERSION_integer_gmp(0,5,1)
- powModInteger
-#else
exponentiation
-#endif
-- note on exponentiation: 0^0 is treated as 1 for mimicking the standard library;
-- the mathematic debate is still open on whether or not this is true, but pratically
@@ -87,22 +73,15 @@ expFast =
-- | exponentiation_rtl_binary computes modular exponentiation as b^e mod m
-- using the right-to-left binary exponentiation algorithm (HAC 14.79)
exponentiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
-#if MIN_VERSION_integer_gmp(0,5,1)
-exponentiation_rtl_binary = expSafe
-#else
exponentiation_rtl_binary 0 0 m = 1 `mod` m
exponentiation_rtl_binary b e m = loop e b 1
where sq x = (x * x) `mod` m
loop !0 _ !a = a `mod` m
loop !i !s !a = loop (i `shiftR` 1) (sq s) (if odd i then a * s else a)
-#endif
-- | exponentiation computes modular exponentiation as b^e mod m
-- using repetitive squaring.
exponentiation :: Integer -> Integer -> Integer -> Integer
-#if MIN_VERSION_integer_gmp(0,5,1)
-exponentiation = expSafe
-#else
exponentiation b e m
| b == 1 = b
| e == 0 = 1
@@ -110,7 +89,6 @@ exponentiation b e m
| even e = let p = (exponentiation b (e `div` 2) m) `mod` m
in (p^(2::Integer)) `mod` m
| otherwise = (b * exponentiation b (e-1) m) `mod` m
-#endif
--{-# DEPRECATED exponantiation_rtl_binary "typo in API name it's called exponentiation_rtl_binary #-}
exponantiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
@@ -122,17 +100,10 @@ exponantiation = exponentiation
-- | inverse computes the modular inverse as in g^(-1) mod m
inverse :: Integer -> Integer -> Maybe Integer
-#if MIN_VERSION_integer_gmp(0,5,1)
-inverse g m
- | r == 0 = Nothing
- | otherwise = Just r
- where r = recipModInteger g m
-#else
inverse g m
| d > 1 = Nothing
| otherwise = Just (x `mod` m)
where (x,_,d) = gcde_binary g m
-#endif
-- | Compute the modular inverse of 2 coprime numbers.
-- This is equivalent to inverse except that the result
diff --git a/Crypto/Number/Prime.hs b/Crypto/Number/Prime.hs
index 0cea9da..458c94d 100644
--- a/Crypto/Number/Prime.hs
+++ b/Crypto/Number/Prime.hs
@@ -3,9 +3,7 @@
#ifndef MIN_VERSION_integer_gmp
#define MIN_VERSION_integer_gmp(a,b,c) 0
#endif
-#if MIN_VERSION_integer_gmp(0,5,1)
{-# LANGUAGE MagicHash #-}
-#endif
-- |
-- Module : Crypto.Number.Prime
-- License : BSD-style
@@ -30,12 +28,7 @@ import Crypto.Number.Generate
import Crypto.Number.Basic (sqrti, gcde_binary)
import Crypto.Number.ModArithmetic (exponantiation)
-#if MIN_VERSION_integer_gmp(0,5,1)
-import GHC.Integer.GMP.Internals
-import GHC.Base
-#else
import Data.Bits
-#endif
-- | returns if the number is probably prime.
-- first a list of small primes are implicitely tested for divisibility,
@@ -78,21 +71,11 @@ findPrimeFromWith rng prop !n
-- | find a prime from a starting point with no specific property.
findPrimeFrom :: CPRG g => g -> Integer -> (Integer, g)
findPrimeFrom rng n =
-#if MIN_VERSION_integer_gmp(0,5,1)
- (nextPrimeInteger n, rng)
-#else
findPrimeFromWith rng (\g _ -> (True, g)) n
-#endif
-- | Miller Rabin algorithm return if the number is probably prime or composite.
-- the tries parameter is the number of recursion, that determines the accuracy of the test.
primalityTestMillerRabin :: CPRG g => g -> Int -> Integer -> (Bool, g)
-#if MIN_VERSION_integer_gmp(0,5,1)
-primalityTestMillerRabin rng (I# tries) !n =
- case testPrimeInteger n tries of
- 0# -> (False, rng)
- _ -> (True, rng)
-#else
primalityTestMillerRabin rng tries !n
| n <= 3 = error "Miller-Rabin requires tested value to be > 3"
| even n = (False, rng)
@@ -129,7 +112,6 @@ primalityTestMillerRabin rng tries !n
| x2 == 1 = False
| x2 /= nm1 = loop' ws ((x2*x2) `mod` n) (r+1)
| otherwise = loop ws
-#endif
{-
n < z -> witness to test
diff --git a/crypto-numbers.cabal b/crypto-numbers.cabal
index 9610e34..6669d78 100644
--- a/crypto-numbers.cabal
+++ b/crypto-numbers.cabal
@@ -15,7 +15,7 @@ Extra-Source-Files: Tests/*.hs
Flag integer-gmp
Description: Are we using integer-gmp?
- Default: True
+ Default: False
Library
Build-Depends: base >= 4 && < 5
--
1.7.10.4

View file

@ -1,25 +0,0 @@
From 86eca0993e1716b4db14570836efbe838626892f Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Sun, 25 May 2014 09:11:15 +0200
Subject: [PATCH] cross build
---
distributive.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/distributive.cabal b/distributive.cabal
index 9be5133..3e72c65 100644
--- a/distributive.cabal
+++ b/distributive.cabal
@@ -12,7 +12,7 @@ bug-reports: http://github.com/ekmett/distributive/issues
copyright: Copyright (C) 2011-2014 Edward A. Kmett
synopsis: Distributive functors -- Dual to Traversable
description: Distributive functors -- Dual to Traversable
-build-type: Custom
+build-type: Simple
extra-source-files:
.ghci
.travis.yml
--
2.0.0.rc2

View file

@ -1,63 +0,0 @@
From 087f1ae5e17f0e6d7c9f6b4092a5bb5bb6f5bf60 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 16 Oct 2014 02:59:11 +0000
Subject: [PATCH] port
---
Network/DNS/Resolver.hs | 13 ++++++++-----
dns.cabal | 1 +
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
index 5721e03..c4400d1 100644
--- a/Network/DNS/Resolver.hs
+++ b/Network/DNS/Resolver.hs
@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
) where
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(..), defaultHints, getAddrInfo
import Prelude hiding (lookup)
import System.Random (getStdRandom, randomR)
import System.Timeout (timeout)
+import System.Process
#if mingw32_HOST_OS == 1
import Network.Socket (send)
@@ -130,10 +131,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
where
addr = case resolvInfo conf of
RCHostName numhost -> makeAddrInfo numhost
- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
- toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
- in extract l
- extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
+ RCFilePath file -> do
+ -- Android has no /etc/resolv.conf; use getprop command.
+ ls <- catch (lines <$> readProcess "getprop" ["net.dns1"] []) (const (return []) :: IOException -> IO [String])
+ makeAddrInfo $ case ls of
+ [] -> "8.8.8.8" -- google public dns as a fallback only
+ (l:_) -> l
makeAddrInfo :: HostName -> IO AddrInfo
makeAddrInfo addr = do
diff --git a/dns.cabal b/dns.cabal
index ceaf5f4..cd15e61 100644
--- a/dns.cabal
+++ b/dns.cabal
@@ -37,6 +37,7 @@ Library
, network >= 2.3
, random
, resourcet
+ , process
else
Build-Depends: base >= 4 && < 5
, attoparsec
--
2.1.1

View file

@ -1,25 +0,0 @@
From df0f41f92d003f7d59ef927737ffec3a9bd61827 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Tue, 7 May 2013 18:41:01 -0400
Subject: [PATCH] avoid cabal hell
---
gsasl.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gsasl.cabal b/gsasl.cabal
index d991873..c5c2b19 100644
--- a/gsasl.cabal
+++ b/gsasl.cabal
@@ -31,7 +31,7 @@ library
build-depends:
base >= 4.0 && < 5.0
, transformers >= 0.2
- , bytestring >= 0.9
+ , bytestring >= 0.10.3.0
pkgconfig-depends: libgsasl >= 1.1
--
1.7.10.4

View file

@ -1,47 +0,0 @@
From 7beec2e707d59f9573aa2dc7c57bd2a62f16b480 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 15 May 2013 19:06:03 -0400
Subject: [PATCH] build without IPv6 stuff
---
Data/IP.hs | 2 +-
Data/IP/Addr.hs | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Data/IP.hs b/Data/IP.hs
index cffef93..ea486c9 100644
--- a/Data/IP.hs
+++ b/Data/IP.hs
@@ -6,7 +6,7 @@ module Data.IP (
-- ** IP data
IP (..)
, IPv4, toIPv4, fromIPv4, fromHostAddress, toHostAddress
- , IPv6, toIPv6, fromIPv6, fromHostAddress6, toHostAddress6
+ , IPv6, toIPv6, fromIPv6 -- , fromHostAddress6, toHostAddress6
-- ** IP range data
, IPRange (..)
, AddrRange (addr, mask, mlen)
diff --git a/Data/IP/Addr.hs b/Data/IP/Addr.hs
index faaf0c7..5b556fb 100644
--- a/Data/IP/Addr.hs
+++ b/Data/IP/Addr.hs
@@ -312,6 +312,7 @@ toHostAddress (IP4 addr4)
| byteOrder == LittleEndian = fixByteOrder addr4
| otherwise = addr4
+{-
-- | The 'fromHostAddress6' function converts 'HostAddress6' to 'IPv6'.
fromHostAddress6 :: HostAddress6 -> IPv6
fromHostAddress6 = IP6
@@ -320,6 +321,8 @@ fromHostAddress6 = IP6
toHostAddress6 :: IPv6 -> HostAddress6
toHostAddress6 (IP6 addr6) = addr6
+-}
+
fixByteOrder :: Word32 -> Word32
fixByteOrder s = d1 .|. d2 .|. d3 .|. d4
where
--
1.7.10.4

View file

@ -1,25 +0,0 @@
From cb5252db1a0d515da69d9167a8b2facd839940b2 Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Mon, 11 Nov 2013 02:29:06 +0000
Subject: [PATCH] fix build with new ghc
---
src/Language/JavaScript/Parser/Lexer.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Language/JavaScript/Parser/Lexer.hs b/src/Language/JavaScript/Parser/Lexer.hs
index 79fa9c5..fa96e29 100644
--- a/src/Language/JavaScript/Parser/Lexer.hs
+++ b/src/Language/JavaScript/Parser/Lexer.hs
@@ -712,7 +712,7 @@ alex_scan_tkn user orig_input len input s last_acc =
(offset) = (base +# ord_c)
(check) = alexIndexInt16OffAddr alex_check offset
- (new_s) = if (offset >=# 0#) && (check ==# ord_c)
+ (new_s) = if (tagToEnum# (offset >=# 0#)) && (tagToEnum# (check ==# ord_c))
then alexIndexInt16OffAddr alex_table offset
else alexIndexInt16OffAddr alex_deflt s
in
--
1.7.10.4

View file

@ -1,341 +0,0 @@
From 834a0d3bfe56b969a65eff834604442cde8798f7 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Wed, 20 Jun 2018 05:06:41 +0100
Subject: [PATCH] android port fixes
Build note: Ensure a hsc2hs in PATH is modified to pass -x to the real
one, to enable cross-compiling.
---
Network/BSD.hsc | 84 -------------------------------------------
Network/Socket.hsc | 16 ++++-----
Network/Socket/ByteString.hsc | 2 +-
Network/Socket/Internal.hsc | 2 +-
Network/Socket/Types.hsc | 14 +++-----
cbits/HsNet.c | 18 ++++++++++
configure | 1 +
include/HsNetworkConfig.h | 4 +--
8 files changed, 36 insertions(+), 105 deletions(-)
diff --git a/Network/BSD.hsc b/Network/BSD.hsc
index 67f2fcd..4c86af5 100644
--- a/Network/BSD.hsc
+++ b/Network/BSD.hsc
@@ -28,12 +28,8 @@ module Network.BSD
, hostAddress
#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS)
- , getHostEntries
-
-- ** Low level functionality
- , setHostEntry
, getHostEntry
- , endHostEntry
#endif
-- * Service names
@@ -61,14 +57,6 @@ module Network.BSD
, getProtocolNumber
, defaultProtocol
-#if !defined(mingw32_HOST_OS)
- , getProtocolEntries
- -- ** Low level functionality
- , setProtocolEntry
- , getProtocolEntry
- , endProtocolEntry
-#endif
-
-- * Port numbers
, PortNumber
@@ -80,11 +68,6 @@ module Network.BSD
#if !defined(mingw32_HOST_OS)
, getNetworkByName
, getNetworkByAddr
- , getNetworkEntries
- -- ** Low level functionality
- , setNetworkEntry
- , getNetworkEntry
- , endNetworkEntry
#endif
#if defined(HAVE_IF_NAMETOINDEX)
@@ -298,30 +281,6 @@ getProtocolNumber proto = do
(ProtocolEntry _ _ num) <- getProtocolByName proto
return num
-#if !defined(mingw32_HOST_OS)
-getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
-getProtocolEntry = withLock $ do
- ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
- $ c_getprotoent
- peek ent
-
-foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)
-
-setProtocolEntry :: Bool -> IO () -- Keep DB Open ?
-setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg)
-
-foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO ()
-
-endProtocolEntry :: IO ()
-endProtocolEntry = withLock $ c_endprotoent
-
-foreign import ccall unsafe "endprotoent" c_endprotoent :: IO ()
-
-getProtocolEntries :: Bool -> IO [ProtocolEntry]
-getProtocolEntries stayOpen = withLock $ do
- setProtocolEntry stayOpen
- getEntries (getProtocolEntry) (endProtocolEntry)
-#endif
-- ---------------------------------------------------------------------------
-- Host lookups
@@ -405,21 +364,6 @@ getHostEntry = withLock $ do
>>= peek
foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry)
-
-setHostEntry :: Bool -> IO ()
-setHostEntry flg = withLock $ c_sethostent (fromBool flg)
-
-foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO ()
-
-endHostEntry :: IO ()
-endHostEntry = withLock $ c_endhostent
-
-foreign import ccall unsafe "endhostent" c_endhostent :: IO ()
-
-getHostEntries :: Bool -> IO [HostEntry]
-getHostEntries stayOpen = do
- setHostEntry stayOpen
- getEntries (getHostEntry) (endHostEntry)
#endif
-- ---------------------------------------------------------------------------
@@ -482,34 +426,6 @@ getNetworkByAddr addr family = withLock $ do
foreign import ccall unsafe "getnetbyaddr"
c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry)
-
-getNetworkEntry :: IO NetworkEntry
-getNetworkEntry = withLock $ do
- throwNoSuchThingIfNull "getNetworkEntry" "no more network entries"
- $ c_getnetent
- >>= peek
-
-foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry)
-
--- | Open the network name database. The parameter specifies
--- whether a connection is maintained open between various
--- networkEntry calls
-setNetworkEntry :: Bool -> IO ()
-setNetworkEntry flg = withLock $ c_setnetent (fromBool flg)
-
-foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO ()
-
--- | Close the connection to the network name database.
-endNetworkEntry :: IO ()
-endNetworkEntry = withLock $ c_endnetent
-
-foreign import ccall unsafe "endnetent" c_endnetent :: IO ()
-
--- | Get the list of network entries.
-getNetworkEntries :: Bool -> IO [NetworkEntry]
-getNetworkEntries stayOpen = do
- setNetworkEntry stayOpen
- getEntries (getNetworkEntry) (endNetworkEntry)
#endif
-- ---------------------------------------------------------------------------
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
index 8b2e6fe..b02b80d 100644
--- a/Network/Socket.hsc
+++ b/Network/Socket.hsc
@@ -59,7 +59,7 @@ module Network.Socket
, HostName
, ServiceName
-#if defined(IPV6_SOCKET_SUPPORT)
+#if defined(IPV6_SOCKET_SUPPORT) || 1
, AddrInfo(..)
, AddrInfoFlag(..)
@@ -143,7 +143,7 @@ module Network.Socket
-- * Special constants
, aNY_PORT
, iNADDR_ANY
-#if defined(IPV6_SOCKET_SUPPORT)
+#if defined(IPV6_SOCKET_SUPPORTNO)
, iN6ADDR_ANY
#endif
, sOMAXCONN
@@ -521,7 +521,7 @@ accept sock@(MkSocket s family stype protocol status) = do
return new_sock
#else
with (fromIntegral sz) $ \ ptr_len -> do
-# ifdef HAVE_ACCEPT4
+#if 0
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
(threadWaitRead (fromIntegral s))
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
@@ -903,7 +903,7 @@ packSocketOption so =
Just MaxSegment -> Just ((#const IPPROTO_TCP), (#const TCP_MAXSEG))
#endif
#ifdef TCP_NODELAY
- Just NoDelay -> Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
+ Just NoDelay -> Nothing -- Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
#endif
#ifdef TCP_USER_TIMEOUT
Just UserTimeout -> Just ((#const IPPROTO_TCP), (#const TCP_USER_TIMEOUT))
@@ -1036,9 +1036,9 @@ iNADDR_ANY :: HostAddress
iNADDR_ANY = htonl (#const INADDR_ANY)
-- | Converts the from host byte order to network byte order.
-foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
-- | Converts the from network byte order to host byte order.
-foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
#if defined(IPV6_SOCKET_SUPPORT)
-- | The IPv6 wild card address.
@@ -1206,7 +1206,7 @@ unpackBits ((k,v):xs) r
-----------------------------------------------------------------------------
-- Address and service lookups
-#if defined(IPV6_SOCKET_SUPPORT)
+#if defined(IPV6_SOCKET_SUPPORT) || 1
-- | Flags that control the querying behaviour of 'getAddrInfo'.
-- For more information, see <https://tools.ietf.org/html/rfc3493#page-25>
@@ -1568,7 +1568,7 @@ foreign import CALLCONV unsafe "bind"
c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
foreign import CALLCONV SAFE_ON_WIN "connect"
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
-#ifdef HAVE_ACCEPT4
+#if 0
foreign import CALLCONV unsafe "accept4"
c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
#else
diff --git a/Network/Socket/ByteString.hsc b/Network/Socket/ByteString.hsc
index 93e29c9..a736932 100644
--- a/Network/Socket/ByteString.hsc
+++ b/Network/Socket/ByteString.hsc
@@ -177,7 +177,7 @@ sendMany sock@(MkSocket fd _ _ _ _) cs = do
liftM fromIntegral . withIOVec cs $ \(iovsPtr, iovsLen) ->
throwSocketErrorWaitWrite sock "writev" $
c_writev (fromIntegral fd) iovsPtr
- (fromIntegral (min iovsLen (#const IOV_MAX)))
+ (fromIntegral (min iovsLen (0x0026)))
#else
sendMany sock = sendAll sock . B.concat
#endif
diff --git a/Network/Socket/Internal.hsc b/Network/Socket/Internal.hsc
index c8bf4f6..2463bd7 100644
--- a/Network/Socket/Internal.hsc
+++ b/Network/Socket/Internal.hsc
@@ -24,7 +24,7 @@ module Network.Socket.Internal
(
-- * Socket addresses
HostAddress
-#if defined(IPV6_SOCKET_SUPPORT)
+#if defined(IPV6_SOCKET_SUPPORTNO)
, HostAddress6
, FlowInfo
, ScopeID
diff --git a/Network/Socket/Types.hsc b/Network/Socket/Types.hsc
index b42c98d..e5bb9fe 100644
--- a/Network/Socket/Types.hsc
+++ b/Network/Socket/Types.hsc
@@ -758,10 +758,10 @@ intToPortNumber v = PortNum (htons (fromIntegral v))
portNumberToInt :: PortNumber -> Int
portNumberToInt (PortNum po) = fromIntegral (ntohs po)
-foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16
-foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16
-foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
-foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
+foreign import CALLCONV unsafe "my_ntohs" ntohs :: Word16 -> Word16
+foreign import CALLCONV unsafe "my_htons" htons :: Word16 -> Word16
+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
instance Enum PortNumber where
toEnum = intToPortNumber
@@ -1071,13 +1071,9 @@ poke32 p i0 a = do
-- | Private newtype proxy for the Storable instance. To avoid orphan instances.
newtype In6Addr = In6Addr HostAddress6
-#if __GLASGOW_HASKELL__ < 800
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
-#endif
-
instance Storable In6Addr where
sizeOf _ = #const sizeof(struct in6_addr)
- alignment _ = #alignment struct in6_addr
+ alignment _ = 64
peek p = do
a <- peek32 p 0
diff --git a/cbits/HsNet.c b/cbits/HsNet.c
index 86b55dc..6225c32 100644
--- a/cbits/HsNet.c
+++ b/cbits/HsNet.c
@@ -6,3 +6,21 @@
#define INLINE
#include "HsNet.h"
+
+#include <sys/endian.h>
+uint16_t my_htons(uint16_t v)
+{
+ htons(v);
+}
+uint32_t my_htonl(uint32_t v)
+{
+ htonl(v);
+}
+uint16_t my_ntohs(uint16_t v)
+{
+ ntohs(v);
+}
+uint32_t my_ntohl(uint32_t v)
+{
+ ntohl(v);
+}
diff --git a/configure b/configure
index 9e82879..24ef3ce 100755
--- a/configure
+++ b/configure
@@ -1,4 +1,5 @@
#! /bin/sh
+set -- --host=arm-linux-androideabi
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Haskell network package 2.3.0.14.
#
diff --git a/include/HsNetworkConfig.h b/include/HsNetworkConfig.h
index 383f6e2..62b8852 100644
--- a/include/HsNetworkConfig.h
+++ b/include/HsNetworkConfig.h
@@ -2,7 +2,7 @@
/* include/HsNetworkConfig.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `accept4' function. */
-#define HAVE_ACCEPT4 1
+/* #undef HAVE_ACCEPT4 */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
@@ -73,7 +73,7 @@
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/can.h> header file. */
-#define HAVE_LINUX_CAN_H 1
+/* #undef HAVE_LINUX_CAN_H */
/* Define to 1 if you have a Linux sendfile(2) implementation. */
#define HAVE_LINUX_SENDFILE 1
--
2.1.4

View file

@ -1,25 +0,0 @@
From ff2d1519fb294a123636ac6bd80e50741922c856 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Sun, 25 May 2014 09:41:13 +0200
Subject: [PATCH] disable i386 opt stuff to allow cross-compilation
---
primitive.cabal | 2 --
1 file changed, 2 deletions(-)
diff --git a/primitive.cabal b/primitive.cabal
index 9651dfd..b655e8d 100644
--- a/primitive.cabal
+++ b/primitive.cabal
@@ -47,8 +47,6 @@ Library
cc-options: -O3 -fomit-frame-pointer -Wall
if !os(solaris)
cc-options: -ftree-vectorize
- if arch(i386) || arch(x86_64)
- cc-options: -msse2
source-repository head
type: git
--
2.0.0.rc2

View file

@ -1,135 +0,0 @@
From e1a2f80f6bec25921ab645a0aaf1c6422a8917ab Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Mon, 11 Nov 2013 01:06:58 +0000
Subject: [PATCH] fix
---
Network/Socks5/Command.hs | 8 +-------
Network/Socks5/Conf.hs | 1 -
Network/Socks5/Lowlevel.hs | 1 -
Network/Socks5/Types.hs | 18 +-----------------
Network/Socks5/Wire.hs | 2 --
5 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/Network/Socks5/Command.hs b/Network/Socks5/Command.hs
index db95fbd..fdba5ec 100644
--- a/Network/Socks5/Command.hs
+++ b/Network/Socks5/Command.hs
@@ -13,7 +13,6 @@ module Network.Socks5.Command
, Connect(..)
, Command(..)
, connectIPV4
- , connectIPV6
, connectDomainName
-- * lowlevel interface
, rpc
@@ -29,7 +28,7 @@ import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Serialize
-import Network.Socket (Socket, PortNumber, HostAddress, HostAddress6)
+import Network.Socket (Socket, PortNumber, HostAddress)
import Network.Socket.ByteString
import Network.Socks5.Types
@@ -65,11 +64,6 @@ connectIPV4 socket hostaddr port = onReply <$> rpc_ socket (Connect $ SocksAddre
where onReply (SocksAddrIPV4 h, p) = (h, p)
onReply _ = error "ipv4 requested, got something different"
-connectIPV6 :: Socket -> HostAddress6 -> PortNumber -> IO (HostAddress6, PortNumber)
-connectIPV6 socket hostaddr6 port = onReply <$> rpc_ socket (Connect $ SocksAddress (SocksAddrIPV6 hostaddr6) port)
- where onReply (SocksAddrIPV6 h, p) = (h, p)
- onReply _ = error "ipv6 requested, got something different"
-
-- TODO: FQDN should only be ascii, maybe putting a "fqdn" data type
-- in front to make sure and make the BC.pack safe.
connectDomainName :: Socket -> String -> PortNumber -> IO (SocksHostAddress, PortNumber)
diff --git a/Network/Socks5/Conf.hs b/Network/Socks5/Conf.hs
index c29ff7b..007d382 100644
--- a/Network/Socks5/Conf.hs
+++ b/Network/Socks5/Conf.hs
@@ -47,5 +47,4 @@ defaultSocksConfFromSockAddr sockaddr = SocksConf server SocksVer5
where server = SocksAddress haddr port
(haddr,port) = case sockaddr of
SockAddrInet p h -> (SocksAddrIPV4 h, p)
- SockAddrInet6 p _ h _ -> (SocksAddrIPV6 h, p)
_ -> error "unsupported unix sockaddr type"
diff --git a/Network/Socks5/Lowlevel.hs b/Network/Socks5/Lowlevel.hs
index c10d9b9..2c3d59c 100644
--- a/Network/Socks5/Lowlevel.hs
+++ b/Network/Socks5/Lowlevel.hs
@@ -17,7 +17,6 @@ resolveToSockAddr :: SocksAddress -> IO SockAddr
resolveToSockAddr (SocksAddress sockHostAddr port) =
case sockHostAddr of
SocksAddrIPV4 ha -> return $ SockAddrInet port ha
- SocksAddrIPV6 ha6 -> return $ SockAddrInet6 port 0 ha6 0
SocksAddrDomainName bs -> do he <- getHostByName (BC.unpack bs)
return $ SockAddrInet port (hostAddress he)
diff --git a/Network/Socks5/Types.hs b/Network/Socks5/Types.hs
index 7fbec25..17c7c83 100644
--- a/Network/Socks5/Types.hs
+++ b/Network/Socks5/Types.hs
@@ -19,7 +19,7 @@ module Network.Socks5.Types
import Data.ByteString (ByteString)
import Data.Word
import Data.Data
-import Network.Socket (HostAddress, HostAddress6, PortNumber)
+import Network.Socket (HostAddress, PortNumber)
import Control.Exception
import qualified Data.ByteString.Char8 as BC
import Numeric (showHex)
@@ -53,12 +53,10 @@ data SocksMethod =
data SocksHostAddress =
SocksAddrIPV4 !HostAddress
| SocksAddrDomainName !ByteString
- | SocksAddrIPV6 !HostAddress6
deriving (Eq,Ord)
instance Show SocksHostAddress where
show (SocksAddrIPV4 ha) = "SocksAddrIPV4(" ++ showHostAddress ha ++ ")"
- show (SocksAddrIPV6 ha6) = "SocksAddrIPV6(" ++ showHostAddress6 ha6 ++ ")"
show (SocksAddrDomainName dn) = "SocksAddrDomainName(" ++ BC.unpack dn ++ ")"
-- | Converts a HostAddress to a String in dot-decimal notation
@@ -69,20 +67,6 @@ showHostAddress num = concat [show q1, ".", show q2, ".", show q3, ".", show q4]
(num''',q3) = num'' `quotRem` 256
(_,q4) = num''' `quotRem` 256
--- | Converts a IPv6 HostAddress6 to standard hex notation
-showHostAddress6 :: HostAddress6 -> String
-showHostAddress6 (a,b,c,d) =
- (concat . intersperse ":" . map (flip showHex ""))
- [p1,p2,p3,p4,p5,p6,p7,p8]
- where (a',p2) = a `quotRem` 65536
- (_,p1) = a' `quotRem` 65536
- (b',p4) = b `quotRem` 65536
- (_,p3) = b' `quotRem` 65536
- (c',p6) = c `quotRem` 65536
- (_,p5) = c' `quotRem` 65536
- (d',p8) = d `quotRem` 65536
- (_,p7) = d' `quotRem` 65536
-
-- | Describe a Socket address on the SOCKS protocol
data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
deriving (Show,Eq,Ord)
diff --git a/Network/Socks5/Wire.hs b/Network/Socks5/Wire.hs
index 10bd262..a30f32e 100644
--- a/Network/Socks5/Wire.hs
+++ b/Network/Socks5/Wire.hs
@@ -46,12 +46,10 @@ data SocksResponse = SocksResponse
getAddr 1 = SocksAddrIPV4 <$> getWord32host
getAddr 3 = SocksAddrDomainName <$> (getWord8 >>= getByteString . fromIntegral)
-getAddr 4 = SocksAddrIPV6 <$> (liftM4 (,,,) getWord32host getWord32host getWord32host getWord32host)
getAddr n = error ("cannot get unknown socket address type: " ++ show n)
putAddr (SocksAddrIPV4 h) = putWord8 1 >> putWord32host h
putAddr (SocksAddrDomainName b) = putWord8 3 >> putWord8 (fromIntegral $ B.length b) >> putByteString b
-putAddr (SocksAddrIPV6 (a,b,c,d)) = putWord8 4 >> mapM_ putWord32host [a,b,c,d]
getSocksRequest 5 = do
cmd <- toEnum . fromIntegral <$> getWord8
--
1.7.10.4

View file

@ -1,25 +0,0 @@
From c1b166ad1dbed80f7eed7b9c1b2dc5c668eeb8fc Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Fri, 18 Oct 2013 23:28:56 +0000
Subject: [PATCH] cross build
---
stm-chans.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stm-chans.cabal b/stm-chans.cabal
index 89d4780..2119a74 100644
--- a/stm-chans.cabal
+++ b/stm-chans.cabal
@@ -6,7 +6,7 @@
-- and source-repository:.
Cabal-Version: >= 1.6
-- We need a custom build in order to define __HADDOCK__
-Build-Type: Custom
+Build-Type: Simple
Name: stm-chans
Version: 3.0.0
--
1.7.10.4

View file

@ -1,25 +0,0 @@
From 0e728d5b049224394908d793c73902a8c981e636 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Mon, 26 May 2014 01:04:40 +0000
Subject: [PATCH] fix cross build
---
system-filepath.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-filepath.cabal b/system-filepath.cabal
index d6aa726..f4e5e0f 100644
--- a/system-filepath.cabal
+++ b/system-filepath.cabal
@@ -6,7 +6,7 @@ license-file: license.txt
author: John Millikin <jmillikin@gmail.com>
maintainer: John Millikin <jmillikin@gmail.com>
copyright: John Millikin 2010-2012
-build-type: Custom
+build-type: Simple
cabal-version: >= 1.8
category: System
stability: experimental
--
1.7.10.4

View file

@ -1,25 +0,0 @@
From 0ad071f80ee72e7b8ca5b0b70dfae5bbf8677969 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 12 Mar 2014 12:18:17 -0400
Subject: [PATCH] cross build
---
unbounded-delays.cabal | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/unbounded-delays.cabal b/unbounded-delays.cabal
index 76d0a50..0f27569 100644
--- a/unbounded-delays.cabal
+++ b/unbounded-delays.cabal
@@ -1,7 +1,7 @@
name: unbounded-delays
version: 0.1.0.6
cabal-version: >= 1.6
-build-type: Custom
+build-type: Simple
author: Bas van Dijk <v.dijk.bas@gmail.com>
Roel van Dijk <vandijk.roel@gmail.com>
maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
--
1.7.10.4

View file

@ -1,56 +0,0 @@
From db9eb179885874af342bb2c3adef7185496ba1f1 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Wed, 15 Oct 2014 16:37:32 +0000
Subject: [PATCH] hack for bionic
---
Data/UnixTime/Types.hsc | 12 ------------
cbits/conv.c | 2 +-
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
index d30f39b..ec7ca4c 100644
--- a/Data/UnixTime/Types.hsc
+++ b/Data/UnixTime/Types.hsc
@@ -9,8 +9,6 @@ import Foreign.Storable
#include <sys/time.h>
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
-
-- |
-- Data structure for Unix time.
data UnixTime = UnixTime {
@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
, utMicroSeconds :: {-# UNPACK #-} !Int32
} deriving (Eq,Ord,Show)
-instance Storable UnixTime where
- sizeOf _ = (#size struct timeval)
- alignment _ = (#alignment struct timeval)
- peek ptr = UnixTime
- <$> (#peek struct timeval, tv_sec) ptr
- <*> (#peek struct timeval, tv_usec) ptr
- poke ptr ut = do
- (#poke struct timeval, tv_sec) ptr (utSeconds ut)
- (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut)
-
-- |
-- Format of the strptime()/strftime() style.
type Format = ByteString
diff --git a/cbits/conv.c b/cbits/conv.c
index ec31fef..b7bc0f9 100644
--- a/cbits/conv.c
+++ b/cbits/conv.c
@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
#else
strptime(src, fmt, &dst);
#endif
- return timegm(&dst);
+ return NULL; /* timegm(&dst); (not in Bionic) */
}
size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
--
2.1.1

View file

@ -1,79 +0,0 @@
From 87283f9b6f992a7f0e36c7b1bafc288bf2bf106a Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Mon, 11 Nov 2013 02:46:27 +0000
Subject: [PATCH] build without v1 uuid which needs network-ino
---
Data/UUID/Util.hs | 11 -----------
Data/UUID/V1.hs | 2 --
uuid.cabal | 2 --
3 files changed, 15 deletions(-)
diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
index 581391a..399e508 100644
--- a/Data/UUID/Util.hs
+++ b/Data/UUID/Util.hs
@@ -3,7 +3,6 @@ module Data.UUID.Util (
UnpackedUUID(..)
, unpack, pack
, version
- , extractMac
, extractTime
, setTime
) where
@@ -13,7 +12,6 @@ import Data.Word
import Data.Word.Util
import Data.Bits
import Data.UUID.Internal
-import Network.Info
import Data.Int (Int64)
version :: UUID -> Int
@@ -43,12 +41,3 @@ extractTime uuid =
timeAndVersionToTime :: Word16 -> Word16
timeAndVersionToTime tv = tv .&. 0x0FFF
-extractMac :: UUID -> Maybe MAC
-extractMac uuid =
- if version uuid == 1
- then Just $
- MAC (node_0 unpacked) (node_1 unpacked) (node_2 unpacked) (node_3 unpacked) (node_4 unpacked) (node_5 unpacked)
- else Nothing
- where
- unpacked = unpack uuid
-
diff --git a/Data/UUID/V1.hs b/Data/UUID/V1.hs
index 067e729..ca4c235 100644
--- a/Data/UUID/V1.hs
+++ b/Data/UUID/V1.hs
@@ -37,8 +37,6 @@ import System.IO.Unsafe
import qualified System.Random as R
-import Network.Info
-
import Data.UUID.Builder
import Data.UUID.Internal
diff --git a/uuid.cabal b/uuid.cabal
index 0a53059..57b1b86 100644
--- a/uuid.cabal
+++ b/uuid.cabal
@@ -32,14 +32,12 @@ Library
cryptohash >= 0.7 && < 0.12,
deepseq == 1.3.*,
hashable (>= 1.1.1.0 && < 1.2.0) || (>= 1.2.1 && < 1.3),
- network-info == 0.2.*,
random >= 1.0.1 && < 1.1,
time >= 1.1 && < 1.5
Exposed-Modules:
Data.UUID
Data.UUID.Util
- Data.UUID.V1
Data.UUID.V3
Data.UUID.V4
Data.UUID.V5
--
1.7.10.4

View file

@ -1,39 +0,0 @@
From 2f1d2eddde94d339d91d7b018dc90542b7625fd3 Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Wed, 20 Jun 2018 14:41:04 +0100
Subject: [PATCH] remove ipv6 stuff
---
Network/Wai/Handler/Warp/Run.hs | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/Network/Wai/Handler/Warp/Run.hs b/Network/Wai/Handler/Warp/Run.hs
index 116b24e..5c7cbcb 100644
--- a/Network/Wai/Handler/Warp/Run.hs
+++ b/Network/Wai/Handler/Warp/Run.hs
@@ -14,7 +14,7 @@ import Control.Monad (when, unless, void)
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import Data.Char (chr)
-import Data.IP (toHostAddress, toHostAddress6)
+import Data.IP (toHostAddress)
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import Data.Streaming.Network (bindPortTCP)
import Network (sClose, Socket)
@@ -305,13 +305,6 @@ serveConnection conn ii origAddr transport settings app = do
[a] -> Just (SockAddrInet (readInt clientPort)
(toHostAddress a))
_ -> Nothing
- ["PROXY","TCP6",clientAddr,_,clientPort,_] ->
- case [x | (x, t) <- reads (decodeAscii clientAddr), null t] of
- [a] -> Just (SockAddrInet6 (readInt clientPort)
- 0
- (toHostAddress6 a)
- 0)
- _ -> Nothing
("PROXY":"UNKNOWN":_) ->
Just origAddr
_ ->
--
2.1.4

View file

@ -1,28 +0,0 @@
From 717945172c2f3ff95cce9db2d075122bccfc9a1a Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Wed, 20 Jun 2018 02:01:30 +0100
Subject: [PATCH] support Android cert store
Android has only hashsed cert files.
See https://github.com/vincenthz/hs-certificate/issues/19
---
Data/X509/CertificateStore.hs | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 Data/X509/.CertificateStore.hs.swp
diff --git a/Data/X509/CertificateStore.hs b/Data/X509/CertificateStore.hs
index 07449a2..74b8bde 100644
--- a/Data/X509/CertificateStore.hs
+++ b/Data/X509/CertificateStore.hs
@@ -106,7 +106,7 @@ listDirectoryCerts path =
&& isDigit (s !! 9)
&& (s !! 8) == '.'
&& all isHexDigit (take 8 s)
- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
+ isCert x = (not $ isPrefixOf "." x)
getDirContents = E.catch (map (path </>) . filter isCert <$> getDirectoryContents path) emptyPaths
where emptyPaths :: E.IOException -> IO [FilePath]
--
2.1.4

View file

@ -1,24 +0,0 @@
From 41eb8ab50125eb6ccf260c5510407483f1d78dd4 Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Wed, 20 Jun 2018 14:52:52 +0100
Subject: [PATCH] deps
---
xss-sanitize.cabal | 1 +
1 file changed, 1 insertion(+)
diff --git a/xss-sanitize.cabal b/xss-sanitize.cabal
index 727dc95..2de4270 100644
--- a/xss-sanitize.cabal
+++ b/xss-sanitize.cabal
@@ -19,6 +19,7 @@ library
, tagsoup >= 0.12.2 && < 1
, utf8-string >= 0.3 && < 1
, network >= 2 && < 3
+ , network-uri
, css-text >= 0.1.1 && < 0.2
, text >= 0.11 && < 2
, attoparsec >= 0.10.0.3 && < 1
--
2.1.4

View file

@ -1,35 +0,0 @@
From 63d07ae4a1e3b77cbe023364599f7c2c3e853d5f Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Thu, 28 Feb 2013 23:40:57 -0400
Subject: [PATCH] hack to build on Android
---
Codec/Compression/Zlib/Stream.hsc | 4 ++--
zlib.cabal | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Codec/Compression/Zlib/Stream.hsc b/Codec/Compression/Zlib/Stream.hsc
index fe851e6..c6168f4 100644
--- a/Codec/Compression/Zlib/Stream.hsc
+++ b/Codec/Compression/Zlib/Stream.hsc
@@ -921,7 +921,7 @@ foreign import ccall unsafe "zlib.h inflateInit2_"
c_inflateInit2 :: StreamState -> CInt -> IO CInt
c_inflateInit2 z n =
- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
+ withCAString "1.2.5" $ \versionStr ->
c_inflateInit2_ z n versionStr (#{const sizeof(z_stream)} :: CInt)
foreign import ccall unsafe "zlib.h inflate"
@@ -940,7 +940,7 @@ foreign import ccall unsafe "zlib.h deflateInit2_"
c_deflateInit2 :: StreamState
-> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt
c_deflateInit2 z a b c d e =
- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
+ withCAString "1.2.5" $ \versionStr ->
c_deflateInit2_ z a b c d e versionStr (#{const sizeof(z_stream)} :: CInt)
foreign import ccall unsafe "zlib.h deflateSetDictionary"
--
1.7.10.4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1 +0,0 @@
../drawable-mdpi/ic_launcher.png

View file

@ -1 +0,0 @@
../drawable-mdpi/ic_stat_service_notification_icon.png

View file

@ -1,133 +0,0 @@
#!/bin/bash
# Bootstraps from an empty cabal to all the necessary haskell packages
# being installed, with the necessary patches to work on Android.
#
# You should install ghc-android first.
#
# The cabal.config is used to pin the haskell packages to the last
# versions that have been gotten working. To update, delete the
# cabal.config, run this script with an empty cabal and fix up the broken
# patches, and then use cabal freeze to generate a new cabal.config.
set -e
if [ ! -d haskell-patches ]; then
cd standalone/android
fi
setupcabal () {
# Some packages fail to install in a non unicode locale.
LANG=en_US.UTF-8
export LANG
}
patched () {
pkg=$1
ver=$2
if [ -z "$ver" ]; then
ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
fi
if [ -z "$ver" ]; then
cabal unpack --pristine $pkg
else
cabal unpack --pristine $pkg-$ver
fi
cd $pkg*
git init
git config user.name dummy
git config user.email dummy@example.com
git add .
git commit -m "pre-patched state of $pkg"
ln -sf ../../cabal.config
for patch in ../../haskell-patches/${pkg}_* ../../../no-th/haskell-patches/${pkg}_*; do
if [ -e "$patch" ]; then
echo trying $patch
if ! patch -p1 < $patch; then
echo "failed to apply $patch"
echo "please resolve this, replace the patch with a new version, and exit the subshell to continue"
$SHELL
fi
fi
done
if [ -e config.sub ]; then
cp /usr/share/misc/config.sub .
fi
if [ -e config.guess ]; then
cp /usr/share/misc/config.guess .
fi
cabal install # --force-reinstalls --reinstall
rm -f cabal.config
rm -rf $pkg*
cd ..
}
installgitannexdeps () {
pushd ../..
ln -sf standalone/android/cabal.config
cabal install --only-dependencies --flags="-magicmime -concurrentoutput" "$@" # --force-reinstalls --reinstall
rm -f cabal.config
popd
}
install_pkgs () {
rm -rf tmp
mkdir tmp
cd tmp
cat <<EOF
EOF
patched network
patched unix-time
patched lifted-base
patched zlib
patched distributive
patched comonad
patched iproute
patched primitive
patched socks
patched vector
patched stm-chans
patched persistent
patched profunctors
patched skein
patched lens
patched certificate
patched x509-store
patched persistent-template
patched system-filepath
patched optparse-applicative
patched warp
patched wai-app-static
patched yesod-routes
patched shakespeare
patched yesod-core
patched yesod-persistent
patched xss-sanitize
patched yesod-form
patched crypto-numbers
patched clock
patched yesod-auth
patched yesod
patched process-conduit
patched DAV
patched yesod-static
patched dns
patched unbounded-delays
patched uuid
patched basement
cd ..
installgitannexdeps -fAndroid -f-Pairing
}
cabal update
setupcabal
# Install packages for host ghc.
installgitannexdeps
# Install packages for cross ghc, with patches as necessary.
PATH=$HOME/.ghc/$(cat abiversion)/bin:$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin:$PATH
cabal update
install_pkgs

View file

@ -1,249 +0,0 @@
#define DISABLE_SHADOW 1
#define DISABLE_UTMP 1
#define DISABLE_UTMPX 1
#define DISABLE_WTMP 1
#define DISABLE_WTMPX 1
#define ENABLE_PKCS11 /**/
#define GETPGRP_VOID 1
#define GLOB_HAS_ALTDIRFUNC 1
#define HAS_SHADOW_EXPIRE 1
#define HAVE_ADDR_IN_UTMP 1
#define HAVE_ADDR_IN_UTMPX 1
#define HAVE_ADDR_V6_IN_UTMP 1
#define HAVE_ADDR_V6_IN_UTMPX 1
#define HAVE_ASPRINTF 1
#define HAVE_ATTRIBUTE__NONNULL__ 1
#define HAVE_BASENAME 1
#define HAVE_BCOPY 1
#define HAVE_BN_IS_PRIME_EX 1
#define HAVE_CLOCK 1
#define HAVE_CLOCK_T 1
#define HAVE_CONST_GAI_STRERROR_PROTO 1
#define HAVE_CONTROL_IN_MSGHDR 1
#define HAVE_DAEMON 1
#define HAVE_DECL_GLOB_NOMATCH 1
#define HAVE_DECL_H_ERRNO 1
#define HAVE_DECL_MAXSYMLINKS 1
#define HAVE_DECL_OFFSETOF 1
#define HAVE_DECL_O_NONBLOCK 1
#define HAVE_DECL_SHUT_RD 1
#define HAVE_DECL_WRITEV 1
#define HAVE_DECL__GETLONG 0
#define HAVE_DECL__GETSHORT 0
#define HAVE_DEV_PTMX 1
#define HAVE_DIRENT_H 1
#define HAVE_DIRFD 1
#define HAVE_DIRNAME 1
#define HAVE_DSA_GENERATE_PARAMETERS_EX 1
#define HAVE_ENDIAN_H 1
#define HAVE_ENDUTENT 1
#define HAVE_ENDUTXENT 1
#define HAVE_EVP_SHA256 1
#define HAVE_EXIT_IN_UTMP 1
#define HAVE_FCHMOD 1
#define HAVE_FCHOWN 1
#define HAVE_FCNTL_H 1
#define HAVE_FEATURES_H 1
#define HAVE_FREEADDRINFO 1
#define HAVE_FSBLKCNT_T 1
#define HAVE_FSFILCNT_T 1
#define HAVE_GAI_STRERROR 1
#define HAVE_GETADDRINFO 1
#define HAVE_GETCWD 1
#define HAVE_GETNAMEINFO 1
#define HAVE_GETOPT 1
#define HAVE_GETOPT_H 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETRLIMIT 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETTTYENT 1
#define HAVE_GETUTENT 1
#define HAVE_GETUTID 1
#define HAVE_GETUTLINE 1
#define HAVE_GETUTXENT 1
#define HAVE_GETUTXID 1
#define HAVE_GETUTXLINE 1
#define HAVE_GLOB 1
#define HAVE_GLOB_H 1
#define HAVE_HEADER_AD 1
#define HAVE_HMAC_CTX_INIT 1
#define HAVE_HOST_IN_UTMP 1
#define HAVE_HOST_IN_UTMPX 1
#define HAVE_ID_IN_UTMP 1
#define HAVE_ID_IN_UTMPX 1
#define HAVE_INET_ATON 1
#define HAVE_INET_NTOA 1
#define HAVE_INET_NTOP 1
#define HAVE_INT64_T 1
#define HAVE_INTTYPES_H 1
#define HAVE_INTXX_T 1
#define HAVE_IN_ADDR_T 1
#define HAVE_ISBLANK 1
#define HAVE_LASTLOG_H 1
#define HAVE_LIBGEN_H 1
#define HAVE_LIBNSL 1
#define HAVE_LIBZ 1
#define HAVE_LIMITS_H 1
#define HAVE_LINUX_AUDIT_H 1
#define HAVE_LINUX_FILTER_H 1
#define HAVE_LINUX_IF_TUN_H 1
#define HAVE_LOGOUT 1
#define HAVE_LOGWTMP 1
#define HAVE_LONG_DOUBLE 1
#define HAVE_LONG_LONG 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMORY_H 1
#define HAVE_MKDTEMP 1
#define HAVE_MMAP 1
#define HAVE_MODE_T 1
#define HAVE_NANOSLEEP 1
#define HAVE_NETDB_H 1
#define HAVE_OPENSSL 1
#define HAVE_PATHS_H 1
#define HAVE_PID_IN_UTMP 1
#define HAVE_PID_T 1
#define HAVE_POLL 1
#define HAVE_POLL_H 1
#define HAVE_PRCTL 1
#define HAVE_PROC_PID 1
#define HAVE_PUTUTLINE 1
#define HAVE_PUTUTXLINE 1
#define HAVE_REALPATH 1
#define HAVE_RECVMSG 1
#define HAVE_RLIMIT_NPROC /**/
#define HAVE_RSA_GENERATE_KEY_EX 1
#define HAVE_RSA_GET_DEFAULT_METHOD 1
#define HAVE_SA_FAMILY_T 1
#define HAVE_SENDMSG 1
#define HAVE_SETEGID 1
#define HAVE_SETENV 1
#define HAVE_SETEUID 1
#define HAVE_SETGROUPS 1
#define HAVE_SETREGID 1
#define HAVE_SETRESGID 1
#define HAVE_SETRESUID 1
#define HAVE_SETREUID 1
#define HAVE_SETRLIMIT 1
#define HAVE_SETSID 1
#define HAVE_SETUTENT 1
#define HAVE_SETUTXENT 1
#define HAVE_SETVBUF 1
#define HAVE_SHA256_UPDATE 1
#define HAVE_SIGACTION 1
#define HAVE_SIGVEC 1
#define HAVE_SIG_ATOMIC_T 1
#define HAVE_SIZE_T 1
#define HAVE_SNPRINTF 1
#define HAVE_SOCKETPAIR 1
#define HAVE_SO_PEERCRED 1
#define HAVE_SSIZE_T 1
#define HAVE_SS_FAMILY_IN_SS 1
#define HAVE_STATFS 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRICT_MKSTEMP 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRNLEN 1
#define HAVE_STRPTIME 1
#define HAVE_STRSEP 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOUL 1
#define HAVE_STRUCT_ADDRINFO 1
#define HAVE_STRUCT_IN6_ADDR 1
#define HAVE_STRUCT_SOCKADDR_IN6 1
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
#define HAVE_STRUCT_TIMESPEC 1
#define HAVE_STRUCT_TIMEVAL 1
#define HAVE_SYSCONF 1
#define HAVE_SYS_CDEFS_H 1
#define HAVE_SYS_DIR_H 1
#define HAVE_SYS_ERRLIST 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_MOUNT_H 1
#define HAVE_SYS_NERR 1
#define HAVE_SYS_POLL_H 1
#define HAVE_SYS_PRCTL_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_SYSMACROS_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_TCGETPGRP 1
#define HAVE_TCSENDBREAK 1
#define HAVE_TIME 1
#define HAVE_TIME_H 1
#define HAVE_TRUNCATE 1
#define HAVE_TV_IN_UTMP 1
#define HAVE_TV_IN_UTMPX 1
#define HAVE_TYPE_IN_UTMP 1
#define HAVE_TYPE_IN_UTMPX 1
#define HAVE_UINTXX_T 1
#define HAVE_UNISTD_H 1
#define HAVE_UNSETENV 1
#define HAVE_UNSIGNED_LONG_LONG 1
#define HAVE_UPDWTMP 1
#define HAVE_UPDWTMPX 1
#define HAVE_UTIMES 1
#define HAVE_UTIME_H 1
#define HAVE_UTMPNAME 1
#define HAVE_UTMPXNAME 1
#define HAVE_UTMP_H 1
#define HAVE_U_CHAR 1
#define HAVE_U_INT 1
#define HAVE_U_INT64_T 1
#define HAVE_U_INTXX_T 1
#define HAVE_VASPRINTF 1
#define HAVE_VA_COPY 1
#define HAVE_VSNPRINTF 1
#define HAVE_WAITPID 1
#define HAVE__GETLONG 1
#define HAVE__GETSHORT 1
#define HAVE__RES_EXTERN 1
#define HAVE___FUNCTION__ 1
#define HAVE___PROGNAME 1
#define HAVE___VA_COPY 1
#define HAVE___func__ 1
#define IPV4_IN_IPV6 1
#define LINK_OPNOTSUPP_ERRNO EPERM
#define LINUX_OOM_ADJUST 1
#define LOCKED_PASSWD_PREFIX "!"
#define LOGIN_PROGRAM_FALLBACK "/bin/login"
#define MISSING_FD_MASK 1
#define MISSING_HOWMANY 1
#define OPENSSL_HAS_ECC 1
#define OPENSSL_PRNG_ONLY 1
#define PACKAGE_BUGREPORT "openssh-unix-dev@mindrot.org"
#define PACKAGE_NAME "OpenSSH"
#define PACKAGE_STRING "OpenSSH Portable"
#define PACKAGE_TARNAME "openssh"
#define PACKAGE_URL ""
#define PACKAGE_VERSION "Portable"
#define PAM_TTY_KLUDGE 1
#define SANDBOX_RLIMIT 1
#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM
#define SIZEOF_CHAR 1
#define SIZEOF_INT 4
#define SIZEOF_LONG_INT 8
#define SIZEOF_LONG_LONG_INT 8
#define SIZEOF_SHORT_INT 2
#define SNPRINTF_CONST const
#define SPT_TYPE SPT_REUSEARGV
#define SSH_PRIVSEP_USER "shell"
#define SSH_TUN_COMPAT_AF 1
#define SSH_TUN_LINUX 1
#define SSH_TUN_PREPEND_AF 1
#define STDC_HEADERS 1
#define USER_PATH "/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin"
#define XAUTH_PATH "/usr/bin/xauth"
#define _PATH_BTMP "/var/log/btmp"
#define _PATH_PASSWD_PROG "/usr/bin/passwd"
#define _PATH_SSH_PIDDIR "/var/run"
#define ANDROID

View file

@ -1,217 +0,0 @@
diff --git a/auth.c b/auth.c
index 6623e0f..dd10253 100644
--- a/auth.c
+++ b/auth.c
@@ -337,7 +337,7 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
char *file, ret[MAXPATHLEN];
int i;
- file = percent_expand(filename, "h", pw->pw_dir,
+ file = percent_expand(filename, "h", _PATH_ROOT_HOME_PREFIX,
"u", pw->pw_name, (char *)NULL);
/*
@@ -347,7 +347,7 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
if (*file == '/')
return (file);
- i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file);
+ i = snprintf(ret, sizeof(ret), "%s/%s", _PATH_ROOT_HOME_PREFIX, file);
if (i < 0 || (size_t)i >= sizeof(ret))
fatal("expand_authorized_keys: path too long");
xfree(file);
@@ -436,7 +436,7 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
strerror(errno));
return -1;
}
- if (realpath(pw->pw_dir, homedir) != NULL)
+ if (realpath(_PATH_ROOT_HOME_PREFIX, homedir) != NULL)
comparehome = 1;
/* check the open file to avoid races */
diff --git a/authfile.c b/authfile.c
index 7dd4496..00462e9 100644
--- a/authfile.c
+++ b/authfile.c
@@ -613,6 +613,7 @@ int
key_perm_ok(int fd, const char *filename)
{
struct stat st;
+ return 1; /* check doesn't make sense on android */
if (fstat(fd, &st) < 0)
return 0;
diff --git a/misc.c b/misc.c
index 0bf2db6..4327d03 100644
--- a/misc.c
+++ b/misc.c
@@ -25,6 +25,7 @@
*/
#include "includes.h"
+#include "pathnames.h"
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -538,12 +539,13 @@ tilde_expand_filename(const char *filename, uid_t uid)
} else if ((pw = getpwuid(uid)) == NULL) /* ~/path */
fatal("tilde_expand_filename: No such uid %ld", (long)uid);
- if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret))
+ char *pw_dir=_PATH_ROOT_HOME_PREFIX;
+ if (strlcpy(ret, pw_dir, sizeof(ret)) >= sizeof(ret))
fatal("tilde_expand_filename: Path too long");
/* Make sure directory has a trailing '/' */
- len = strlen(pw->pw_dir);
- if ((len == 0 || pw->pw_dir[len - 1] != '/') &&
+ len = strlen(pw_dir);
+ if ((len == 0 || pw_dir[len - 1] != '/') &&
strlcat(ret, "/", sizeof(ret)) >= sizeof(ret))
fatal("tilde_expand_filename: Path too long");
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
index d2bea21..5b5d599 100644
--- a/openbsd-compat/getrrsetbyname.c
+++ b/openbsd-compat/getrrsetbyname.c
@@ -56,8 +56,7 @@
#include <arpa/inet.h>
#include "getrrsetbyname.h"
-#include "nameser.h"
-#include "nameser_compat.h"
+#include "arpa/nameser.h"
#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO
extern int h_errno;
diff --git a/pathnames.h b/pathnames.h
index b7b9d91..3c10b11 100644
--- a/pathnames.h
+++ b/pathnames.h
@@ -67,7 +67,7 @@
#endif
#ifndef _PATH_ROOT_HOME_PREFIX
-#define _PATH_ROOT_HOME_PREFIX "/data"
+#define _PATH_ROOT_HOME_PREFIX getenv("HOME")
#endif
/*
diff --git a/readconf.c b/readconf.c
index 097bb05..dcbc008 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1085,7 +1085,7 @@ read_config_file(const char *filename, const char *host, Options *options,
if ((f = fopen(filename, "r")) == NULL)
return 0;
- if (checkperm) {
+ if (checkperm && 0) {
struct stat sb;
if (fstat(fileno(f), &sb) == -1)
diff --git a/ssh-add.c b/ssh-add.c
index 738644d..f6fce4a 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -471,7 +471,7 @@ main(int argc, char **argv)
}
for (i = 0; default_files[i]; i++) {
- snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
+ snprintf(buf, sizeof(buf), "%s/%s", _PATH_ROOT_HOME_PREFIX,
default_files[i]);
if (stat(buf, &st) < 0)
continue;
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 4baf7df..ef8bb25 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -224,7 +224,7 @@ ask_filename(struct passwd *pw, const char *prompt)
}
}
snprintf(identity_file, sizeof(identity_file), "%s/%s",
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX, name);
+ _PATH_ROOT_HOME_PREFIX, name);
fprintf(stderr, "%s (%s): ", prompt, identity_file);
if (fgets(buf, sizeof(buf), stdin) == NULL)
exit(1);
@@ -2268,7 +2268,7 @@ main(int argc, char **argv)
/* Create ~/.ssh directory if it doesn't already exist. */
snprintf(dotsshdir, sizeof dotsshdir, "%s/%s",
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX,
+ _PATH_ROOT_HOME_PREFIX,
_PATH_SSH_USER_DIR);
if (strstr(identity_file, dotsshdir) != NULL) {
if (stat(dotsshdir, &st) < 0) {
diff --git a/ssh.c b/ssh.c
index 898e966..ef6c858 100644
--- a/ssh.c
+++ b/ssh.c
@@ -703,7 +703,7 @@ main(int ac, char **av)
fatal("Can't open user config file %.100s: "
"%.100s", config, strerror(errno));
} else {
- r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
+ r = snprintf(buf, sizeof buf, "%s/%s", _PATH_ROOT_HOME_PREFIX,
_PATH_SSH_USER_CONFFILE);
if (r > 0 && (size_t)r < sizeof(buf))
(void)read_config_file(buf, host, &options, 1);
@@ -748,7 +748,7 @@ main(int ac, char **av)
if (options.local_command != NULL) {
debug3("expanding LocalCommand: %s", options.local_command);
cp = options.local_command;
- options.local_command = percent_expand(cp, "d", pw->pw_dir,
+ options.local_command = percent_expand(cp, "d", _PATH_ROOT_HOME_PREFIX,
"h", host, "l", thishost, "n", host_arg, "r", options.user,
"p", portstr, "u", pw->pw_name, "L", shorthost,
(char *)NULL);
@@ -888,7 +888,7 @@ main(int ac, char **av)
*/
if (config == NULL) {
r = snprintf(buf, sizeof buf, "%s/%s",
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX,
+ _PATH_ROOT_HOME_PREFIX,
_PATH_SSH_USER_DIR);
if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) {
#ifdef WITH_SELINUX
@@ -1532,7 +1532,7 @@ load_public_identity_files(void)
if ((pw = getpwuid(original_real_uid)) == NULL)
fatal("load_public_identity_files: getpwuid failed");
pwname = xstrdup(pw->pw_name);
- pwdir = xstrdup(pw->pw_dir);
+ pwdir = xstrdup(_PATH_ROOT_HOME_PREFIX);
if (gethostname(thishost, sizeof(thishost)) == -1)
fatal("load_public_identity_files: gethostname: %s",
strerror(errno));
diff --git a/uidswap.c b/uidswap.c
index bc6194e..5cbf5d1 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -28,7 +28,6 @@
#include "xmalloc.h"
#ifdef ANDROID
-#include <private/android_filesystem_config.h>
#include <linux/capability.h>
#include <linux/prctl.h>
#endif
@@ -230,7 +229,7 @@ permanently_set_uid(struct passwd *pw)
debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
(u_int)pw->pw_gid);
-#ifdef ANDROID
+#if 0
if (pw->pw_uid == AID_SHELL) {
prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
@@ -317,7 +316,7 @@ permanently_set_uid(struct passwd *pw)
(u_int)pw->pw_uid);
}
-#ifdef ANDROID
+#if 0
if (pw->pw_uid == AID_SHELL) {
/* set CAP_SYS_BOOT capability, so "adb reboot" will succeed */
header.version = _LINUX_CAPABILITY_VERSION;

View file

@ -1,40 +0,0 @@
From f91df535053958600d57f9df78d9ce84c8718655 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Wed, 13 Feb 2013 15:51:40 -0400
Subject: [PATCH] android portability
---
authenticate.c | 3 ++-
batch.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/authenticate.c b/authenticate.c
index 7650377..626dec6 100644
--- a/authenticate.c
+++ b/authenticate.c
@@ -296,7 +296,8 @@ void auth_client(int fd, const char *user, const char *challenge)
*
* OpenBSD has a readpassphrase() that might be more suitable.
*/
- pass = getpass("Password: ");
+ /*pass = getpass("Password: "); */
+ exit(1);
}
if (!pass)
diff --git a/batch.c b/batch.c
index a3e9dca..ee31532 100644
--- a/batch.c
+++ b/batch.c
@@ -221,7 +221,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
stringjoin(filename, sizeof filename,
batch_name, ".sh", NULL);
fd = do_open(filename, O_WRONLY | O_CREAT | O_TRUNC,
- S_IRUSR | S_IWUSR | S_IEXEC);
+ S_IRUSR | S_IWUSR);
if (fd < 0) {
rsyserr(FERROR, errno, "Batch file %s open error",
filename);
--
1.7.10.4

View file

@ -1,133 +0,0 @@
#!/system/bin/sh
# This is runs a shell in an environment configured for git-annex.
# Nearly the only command that can be used in here is busybox!
# lib.start.so will run us in the root of our app directory
base=$(./busybox pwd)
cmd=$base/busybox
set -e
prep () {
# Cannot rely on Android providing a sane HOME
HOME="/sdcard/git-annex.home"
export HOME
}
buildtree () {
$cmd echo "Installation starting to $base"
$cmd cat "lib/lib.version.so"
if $cmd test -e "$base/bin"; then
$cmd mv "$base/bin" "$base/bin.old"
fi
$cmd mkdir -p "$base/bin"
for prog in busybox git-annex git-shell git-upload-pack git gpg rsync ssh ssh-keygen; do
$cmd echo "installing $prog"
if $cmd test -e "$base/bin/$prog"; then
$cmd rm -f "$base/bin/$prog"
fi
$cmd ln -s "$base/lib/lib.$prog.so" "$base/bin/$prog"
done
$cmd --install -s $base/bin
$cmd rm -rf "$base/bin.old"
$cmd tar zxf $base/lib/lib.git.tar.gz.so
for prog in git git-shell git-upload-pack; do
for link in $($cmd cat "$base/links/$prog"); do
$cmd echo "linking $link to $prog"
if $cmd test -e "$base/$link"; then
$cmd rm -f "$base/$link"
fi
$cmd ln -s "$base/bin/$prog" "$base/$link"
done
$cmd rm -f "$base/links/$prog"
done
$cmd mkdir -p "$base/templates"
$cmd mkdir -p "$base/tmp"
$cmd echo "#!/system/bin/sh" > "$base/runshell"
$cmd echo "exec $base/lib/lib.start.so" >> "$base/runshell"
$cmd chmod 755 runshell
$cmd cat "$base/lib/lib.trustedkeys.so" > "$base/bin/trustedkeys.gpg"
$cmd cat "$base/lib/lib.version.so" > "$base/installed-version"
$cmd echo "Installation complete"
}
install () {
if ! $cmd mkdir -p "$HOME"; then
$cmd echo "mkdir of $HOME failed!"
fi
if $cmd test ! -e "$base/bin/git-annex"; then
if ! buildtree > $HOME/git-annex-install.log 2>&1; then
$cmd echo "Installation failed! Please report a bug and attach $HOME/git-annex-install.log"
$cmd sh
fi
elif $cmd test ! -e "$base/installed-version" || ! $cmd cmp "$base/installed-version" "$base/lib/lib.version.so" >/dev/null; then
if ! buildtree > $HOME/git-annex-install.log 2>&1; then
$cmd echo "Upgrade failed! Please report a bug and attach $HOME/git-annex-install.log"
fi
fi
}
run () {
PATH="$base/bin:$PATH"
export PATH
ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH"
export ORIG_GIT_EXEC_PATH
GIT_EXEC_PATH=$base/libexec/git-core
export GIT_EXEC_PATH
ORIG_GIT_TEMPLATE_DIR="$GIT_TEMPLATE_DIR"
export ORIG_GIT_TEMPLATE_DIR
GIT_TEMPLATE_DIR="$base/templates"
export GIT_TEMPLATE_DIR
# Indicate which variables were exported above.
GIT_ANNEX_STANDLONE_ENV="GIT_EXEC_PATH GIT_TEMPLATE_DIR"
export GIT_ANNEX_STANDLONE_ENV
# This is a temporary directory on a non-crippled filesystem.
# Needs to be as short a path as possible, for ssh sockets.
GIT_ANNEX_TMP_DIR=$base/tmp
export GIT_ANNEX_TMP_DIR
# /tmp probably doesn't exist, so also use it as TMPDIR
TMPDIR=$GIT_ANNEX_TMP_DIR
export TMPDIR
if $cmd test ! -e "$HOME/.gitconfig"; then
git config --global user.email "git-annex@android"
git config --global user.name "android"
fi
if $cmd test "$1"; then
cmd="$1"
shift 1
exec "$cmd" "$@"
else
# As good a start point as any.
cd "$HOME"
/system/bin/sh
fi
}
if $cmd test -n "$MKFIFO"; then
# because java is insane
$cmd mkfifo "$MKFIFO"
else
if ! prep; then
$cmd echo "prep failed. Please report a bug."
read line
fi
if ! install; then
$cmd echo "install failed. Please report a bug."
read line
fi
run
fi

View file

@ -1,64 +0,0 @@
/* Installed as lib.start.so, this bootstraps a working busybox and uses
* it to run lib.runshell.so. */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
void chopdir (char *s) {
char *p=strrchr(s, '/');
if (p == NULL) {
fprintf(stderr, "cannot find directory in %s", s);
exit(1);
}
p[0] = '\0';
}
main () {
char buf[1024];
char *p;
struct stat st_buf;
/* Get something like /data/data/ga.androidterm/lib/lib.start.so */
int n=readlink("/proc/self/exe", buf, 1023);
if (n < 1) {
fprintf(stderr, "failed to find own name");
exit(1);
}
buf[n] = '\0';
/* Change directory to something like /data/data/ga.androidterm */
chopdir(buf);
chopdir(buf);
if (chdir(buf) != 0) {
perror("chdir");
exit(1);
}
if (stat("lib/lib.busybox.so", &st_buf) != 0) {
/* TODO my lib dir should be in LD_LIBRARY_PATH; check that */
fprintf(stderr, "Falling back to hardcoded app location; cannot find expected files in %s\n", buf);
if (chdir("/data/data/ga.androidterm") != 0) {
perror("chdir");
exit(1);
}
}
/* If this is the first run, set up busybox symlink,
* which allows busybox to run. */
if (stat("busybox", &st_buf) != 0) {
if (symlink("lib/lib.busybox.so", "busybox") != 0) {
/* Just in case! */
if (link("lib/lib.busybox.so", "busybox") != 0) {
perror("link busybox");
exit(1);
}
}
}
execl("./busybox", "./busybox", "sh", "lib/lib.runshell.so", NULL);
perror("error running busybox sh");
}

View file

@ -1,598 +0,0 @@
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b0e866a..1ab8515 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -7,6 +7,7 @@
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="jackpal.androidterm.permission.RUN_SCRIPT"
android:label="@string/perm_run_script"
diff --git a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
index f6952f0..1a8df8f 100644
--- a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
+++ b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
@@ -166,7 +166,7 @@ public class TermActivity extends Activity
/* ... create a process ... */
String execPath = LaunchActivity.getDataDir(this) + "/bin/execpty";
ProcessBuilder execBuild =
- new ProcessBuilder(execPath, "/system/bin/sh", "-");
+ new ProcessBuilder(execPath, "/data/data/ga.androidterm/lib/lib.start.so", "");
execBuild.redirectErrorStream(true);
Process exec = null;
try {
diff --git a/res/menu/main.xml b/res/menu/main.xml
index 064f833..fe5f3a3 100644
--- a/res/menu/main.xml
+++ b/res/menu/main.xml
@@ -16,6 +16,8 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/menu_send_email"
+ android:title="@string/send_email" />
<item android:id="@+id/menu_new_window"
android:title="@string/new_window"
android:icon="@drawable/ic_menu_add" />
@@ -34,8 +36,6 @@
android:icon="@drawable/ic_menu_preferences" />
<item android:id="@+id/menu_reset"
android:title="@string/reset" />
- <item android:id="@+id/menu_send_email"
- android:title="@string/send_email" />
<item android:id="@+id/menu_toggle_wakelock"
android:title="@string/enable_wakelock" />
<item android:id="@+id/menu_toggle_wifilock"
diff --git a/res/values-cz/strings.xml b/res/values-cz/strings.xml
index f3d19bc..882e19b 100644
--- a/res/values-cz/strings.xml
+++ b/res/values-cz/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Predešlé okno</string>
<string name="next_window">Další okno</string>
<string name="reset">Reset terminálu</string>
- <string name="send_email">Napiš email</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Speciální znaky</string>
<string name="toggle_soft_keyboard">Přepnout soft. klávesnici</string>
@@ -124,4 +124,4 @@
<string name="control_key_dialog_fn_disabled_text">Není nastaveno žádné tlačitko pro funkční klávesu.</string>
<string name="confirm_window_close_message">Zavřít okno?</string>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index f6134a5..06d2e1f 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Vorh. Fenster</string>
<string name="next_window">Nächst. Fenster</string>
<string name="reset">Zurücksetzen</string>
- <string name="send_email">Email schreiben</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Spezialtasten</string>
<string name="toggle_soft_keyboard">Tastatur an/aus</string>
@@ -124,4 +124,4 @@
<string name="perm_run_script">Beliebige Scripte im Terminal Emulator ausführen</string>
<string name="permdesc_run_script">Erlaubt Anwendungen, neue Fenster im Android Terminal Emulator zu öffnen und in diesen Befehle auszuführen. Dies schließt alle Berechtigungen von Android Terminal Emulator ein, inklusive Internetzugang und Schreib-/Leserechte auf der SD-Karte.</string>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 94553b2..92d9e2a 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Ventana anterior</string>
<string name="next_window">Ventana posterior</string>
<string name="reset">Reiniciar consola</string>
- <string name="send_email">Enviar email</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Teclas especiales</string>
<string name="toggle_soft_keyboard">Ver/ocultar teclado</string>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index b9f0586..92a16a0 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Aurreko leihoa</string>
<string name="next_window">Hurrengo leihoa</string>
<string name="reset">Berrezarri terminala</string>
- <string name="send_email">Bidali eposta ...(r)i</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Tekla bereziak</string>
<string name="toggle_soft_keyboard">Txandakatu soft teklatua</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index beab2be..529f720 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -24,7 +24,7 @@
<string name="prev_window">Fenêtre Préc.</string>
<string name="next_window">Fenêtre Suiv.</string>
<string name="reset">Terminal par défaut</string>
- <string name="send_email">Envoyer un e-mail</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Touches spéciales</string>
<string name="toggle_soft_keyboard">Afficher/Masquer Clavier</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 5dbecb5..ce917c5 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Előző ablak</string>
<string name="next_window">Következő ablak</string>
<string name="reset">Alaphelyzet</string>
- <string name="send_email">Küldés emailben</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Speciális billentyűk</string>
<string name="toggle_soft_keyboard">Billentyűzet ki/be</string>
@@ -148,4 +148,4 @@
<string name="alt_sends_esc">Az Alt billentyű ESC-et küld</string>
<string name="alt_sends_esc_summary_on">Az Alt billentyű ESC-et küld.</string>
<string name="alt_sends_esc_summary_off">Az Alt billentyű nem ESC-et küld.</string>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index e6a7294..9d97869 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Fin. successiva</string>
<string name="next_window">Fin. precedente</string>
<string name="reset">Reset terminale</string>
- <string name="send_email">Invia email</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Tasti speciali</string>
<string name="toggle_soft_keyboard">Mostra/nascondi tastiera</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 502fa23..dbfe9fa 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">前のウインドウ</string>
<string name="next_window">次のウインドウ</string>
<string name="reset">端末をリセット</string>
- <string name="send_email">メール送信</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">特殊キー</string>
<string name="toggle_soft_keyboard">ソフトキーボード</string>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index 06629d0..1d545b6 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">წინა ფანჯარა</string>
<string name="next_window">შემდეგი ფანჯარა</string>
<string name="reset">ტერმინალის რესტარტი</string>
- <string name="send_email">ელ-ფოსტის გაგზავნა</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">სპეციალური ღილაკები</string>
<string name="toggle_soft_keyboard">პროგრამული კლავიატურის ჩართ./გამორთ.</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index d81ee07..c370c6f 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -18,7 +18,7 @@
<string name="application_terminal">Terminal Emulator</string>
<string name="preferences">Innstillinger</string>
<string name="reset">Tilbakestill terminal</string>
- <string name="send_email">Send epost til</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Spesielle tegn</string>
<string name="toggle_soft_keyboard">Veksle virtuelt tastatur</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 19fa3d0..e24fbf5 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Vorig venster</string>
<string name="next_window">Volgend venster</string>
<string name="reset">Herstellen</string>
- <string name="send_email">E-mail sturen naar</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Speciale knoppen</string>
<string name="toggle_soft_keyboard">Toetsenbord aan/uit</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 25b3b43..2e0e651 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Poprzednie okno</string>
<string name="next_window">Następne okno</string>
<string name="reset">Wyczyść terminal</string>
- <string name="send_email">Wyślij e-mail</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Przyciski specjalne</string>
<string name="toggle_soft_keyboard">Pokaż klawiaturę</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index aa4ba54..aa3d735 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -18,7 +18,7 @@
<string name="application_terminal">Terminal Emulator</string>
<string name="preferences">Preferências</string>
<string name="reset">Reset terminal</string>
- <string name="send_email">Email para</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Teclas especiais</string>
<string name="toggle_soft_keyboard">Abrir teclado</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 2d992f9..e53a9ac 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Anterior</string>
<string name="next_window">Seguinte</string>
<string name="reset">Repor terminal</string>
- <string name="send_email">Enviar mensagem para</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Teclas especiais</string>
<string name="toggle_soft_keyboard">Mostrar/ocultar teclado</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 3c7ea06..7a072d0 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -21,7 +21,7 @@
<string name="prev_window">"Fereastra anterioră"</string>
<string name="next_window">"Fereastra următoare"</string>
<string name="reset">"Resetaţi "</string>
- <string name="send_email">"E-mail"</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">"Taste speciale"</string>
<string name="toggle_soft_keyboard">"Comutați tastatura"</string>
@@ -123,4 +123,4 @@
<string name="alt_sends_esc">"Tasta Alt trimite ESC"</string>
<string name="alt_sends_esc_summary_on">"Tasta Alt trimite ESC."</string>
<string name="alt_sends_esc_summary_off">"Tasta Alt nu trimite ESC."</string>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 0e96360..762324e 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -8,7 +8,7 @@
<string name="prev_window">Предыдущее окно</string>
<string name="next_window">Следующее окно</string>
<string name="reset">Сбросить терминал</string>
- <string name="send_email">Отправить Email</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Специальные клавиши</string>
<string name="toggle_soft_keyboard">Экранная клавиатура</string>
<string name="reset_toast_notification">Терминальное состояние этого окна было сброшено.</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index ef35366..cc31d80 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Dalšie okno</string>
<string name="next_window">Predch. okno</string>
<string name="reset">Obnoviť term.</string>
- <string name="send_email">Poslať e-mailom</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Špec. klávesy</string>
<string name="toggle_soft_keyboard">Skryť/zobraziť klávesnicu</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 1aa9055..8de6c09 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -3,7 +3,7 @@
<string name="application_terminal">Terminalemulator</string>
<string name="preferences">Inställningar</string>
<string name="reset">Återställ terminal</string>
- <string name="send_email">E-posta till</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Special tangenter</string>
<string name="toggle_soft_keyboard">Växla till virtuellt tangentbord</string>
<string name="enable_wakelock">Aktivera VäckningsLås</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index b45fa12..fb70f78 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -18,7 +18,7 @@
<string name="application_terminal">Terminal Emülatörü</string>
<string name="preferences">Tercihler</string>
<string name="reset">Terminali yeniden başlat</string>
- <string name="send_email">Email olarak yolla</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Özel tuşlar</string>
<string name="toggle_soft_keyboard">Ekran klavyesine geç</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 2f267a9..d3622c4 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -8,7 +8,7 @@
<string name="prev_window">Попереднє вікно</string>
<string name="next_window">Наступне вікно</string>
<string name="reset">Скинути термінал</string>
- <string name="send_email">Відіслати Email</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">Спеціальні клавіші</string>
<string name="toggle_soft_keyboard">Екранна клавіатура</string>
<string name="reset_toast_notification">"Термінальний стан цього вікна було скинуто."</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 6f47b4f..81316ec 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -18,7 +18,7 @@
<string name="application_terminal">终端模拟器</string>
<string name="preferences">首选项</string>
<string name="reset">重置终端</string>
- <string name="send_email">发送电子邮件到...</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">特殊键</string>
<string name="toggle_soft_keyboard">打开/关闭软键盘</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index afda0f1..37d1b50 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -18,7 +18,7 @@
<string name="application_terminal">模擬終端</string>
<string name="preferences">設定</string>
<string name="reset">結束</string>
- <string name="send_email">以電郵傳送</string>
+ <string name="send_email">WebApp</string>
<string name="special_keys">特別按鍵</string>
<string name="toggle_soft_keyboard">顯示/隱藏鍵盤</string>
diff --git a/res/values/defaults.xml b/res/values/defaults.xml
index 67287b2..9b7cfcd 100644
--- a/res/values/defaults.xml
+++ b/res/values/defaults.xml
@@ -13,10 +13,10 @@
<string name="pref_fnkey_default">4</string>
<string name="pref_ime_default">0</string>
<bool name="pref_alt_sends_esc_default">false</bool>
- <string name="pref_shell_default">/system/bin/sh -</string>
- <string name="pref_initialcommand_default"></string>
+ <string name="pref_shell_default">/data/data/ga.androidterm/lib/lib.start.so</string>
+ <string name="pref_initialcommand_default">git annex webapp</string>
<string name="pref_termtype_default">screen</string>
- <bool name="pref_close_window_on_process_exit_default">true</bool>
+ <bool name="pref_close_window_on_process_exit_default">false</bool>
<bool name="pref_verify_path_default">true</bool>
<bool name="pref_do_path_extensions_default">true</bool>
<bool name="pref_allow_prepend_path_default">true</bool>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f1464e9..b06ec9a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -23,7 +23,7 @@
<string name="prev_window">Prev window</string>
<string name="next_window">Next window</string>
<string name="reset">Reset term</string>
- <string name="send_email">Email to</string>
+ <string name="send_email">Open WebApp</string>
<string name="special_keys">Special keys</string>
<string name="toggle_soft_keyboard">Toggle soft keyboard</string>
diff --git a/src/jackpal/androidterm/ShellTermSession.java b/src/jackpal/androidterm/ShellTermSession.java
index 501e7ab..0b43513 100644
--- a/src/jackpal/androidterm/ShellTermSession.java
+++ b/src/jackpal/androidterm/ShellTermSession.java
@@ -80,12 +80,12 @@ public class ShellTermSession extends TermSession {
}
};
- public ShellTermSession(TermSettings settings, String initialCommand) {
+ public ShellTermSession(TermSettings settings, String initialCommand, String webAppFifo) {
super();
updatePrefs(settings);
- initializeSession();
+ initializeSession(webAppFifo);
mInitialCommand = initialCommand;
mWatcherThread = new Thread() {
@@ -106,7 +106,7 @@ public class ShellTermSession extends TermSession {
setDefaultUTF8Mode(settings.defaultToUTF8Mode());
}
- private void initializeSession() {
+ private void initializeSession(String webAppFifo) {
TermSettings settings = mSettings;
int[] processId = new int[1];
@@ -128,9 +128,10 @@ public class ShellTermSession extends TermSession {
if (settings.verifyPath()) {
path = checkPath(path);
}
- String[] env = new String[2];
+ String[] env = new String[3];
env[0] = "TERM=" + settings.getTermType();
env[1] = "PATH=" + path;
+ env[2] = "FIFO=" + webAppFifo;
createSubprocess(processId, settings.getShell(), env);
mProcId = processId[0];
diff --git a/src/jackpal/androidterm/Term.java b/src/jackpal/androidterm/Term.java
index 8a3a4ac..824025d 100644
--- a/src/jackpal/androidterm/Term.java
+++ b/src/jackpal/androidterm/Term.java
@@ -20,6 +20,13 @@ import java.io.UnsupportedEncodingException;
import java.text.Collator;
import java.util.Arrays;
import java.util.Locale;
+import java.lang.Process;
+import java.lang.ProcessBuilder;
+import java.util.Map;
+
+import java.io.FileReader;
+import java.io.BufferedReader;
+import java.io.File;
import android.app.Activity;
import android.app.AlertDialog;
@@ -59,6 +66,11 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
import android.widget.Toast;
+import android.content.Intent;
+import android.net.Uri;
+import android.app.Activity;
+import android.content.Context;
+
import jackpal.androidterm.emulatorview.ColorScheme;
import jackpal.androidterm.emulatorview.EmulatorView;
import jackpal.androidterm.emulatorview.TermSession;
@@ -107,6 +119,9 @@ public class Term extends Activity implements UpdateCallback {
public static final String EXTRA_WINDOW_ID = "jackpal.androidterm.window_id";
private int onResumeSelectWindow = -1;
+ public static String appDir;
+ public static String webAppFifo;
+
private PowerManager.WakeLock mWakeLock;
private WifiManager.WifiLock mWifiLock;
// Available on API 12 and later
@@ -257,6 +272,48 @@ public class Term extends Activity implements UpdateCallback {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+
+ try {
+ appDir = getApplicationContext().getPackageManager().getPackageInfo(getPackageName(), 0).applicationInfo.dataDir;
+ } catch (Exception e) {
+ appDir = "/data/data/ga.androidterm";
+ }
+ webAppFifo = appDir + "/fifo";
+
+ /* webapp url opening thread */
+ new Thread() {
+ @Override
+ public void run() {
+ try {
+ /* First, set up the fifo that urls to open will be
+ * read from. This is complicated by java not being
+ * able to mkfifo. */
+ File f = new File (webAppFifo);
+ if (! f.exists()) {
+ ProcessBuilder pb = new ProcessBuilder(appDir + "/lib/lib.start.so");
+ Map<String, String> env = pb.environment();
+ env.put("MKFIFO", webAppFifo);
+ Process p = pb.start();
+ p.waitFor();
+ }
+
+ /* Reading from the fifo blocks until a url is written
+ * to it. */
+ while (true) {
+ BufferedReader buf = new BufferedReader(new FileReader(webAppFifo));
+ String s = buf.readLine();
+ try {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
+ startActivity(intent);
+ } catch (Exception e) {
+ }
+
+ }
+ } catch (Exception e) {
+ }
+ }
+ }.start();
+
Log.e(TermDebug.LOG_TAG, "onCreate");
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mSettings = new TermSettings(getResources(), mPrefs);
@@ -427,7 +484,7 @@ public class Term extends Activity implements UpdateCallback {
}
protected static TermSession createTermSession(Context context, TermSettings settings, String initialCommand) {
- ShellTermSession session = new ShellTermSession(settings, initialCommand);
+ ShellTermSession session = new ShellTermSession(settings, initialCommand, webAppFifo);
// XXX We should really be able to fetch this from within TermSession
session.setProcessExitMessage(context.getString(R.string.process_exit_message));
@@ -911,31 +968,15 @@ public class Term extends Activity implements UpdateCallback {
}
private void doEmailTranscript() {
+ // Hack: repurposed to open the git-annex webapp
TermSession session = getCurrentTermSession();
if (session != null) {
- // Don't really want to supply an address, but
- // currently it's required, otherwise nobody
- // wants to handle the intent.
- String addr = "user@example.com";
- Intent intent =
- new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"
- + addr));
-
- String subject = getString(R.string.email_transcript_subject);
- String title = session.getTitle();
- if (title != null) {
- subject = subject + " - " + title;
- }
- intent.putExtra(Intent.EXTRA_SUBJECT, subject);
- intent.putExtra(Intent.EXTRA_TEXT,
- session.getTranscriptText().trim());
try {
- startActivity(Intent.createChooser(intent,
- getString(R.string.email_transcript_chooser_title)));
- } catch (ActivityNotFoundException e) {
- Toast.makeText(this,
- R.string.email_transcript_no_email_activity_found,
- Toast.LENGTH_LONG).show();
+ BufferedReader buf = new BufferedReader(new FileReader("/sdcard/git-annex.home/.git-annex-url"));
+ String s = buf.readLine();
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
+ startActivity(intent);
+ } catch (Exception e) {
}
}
}
diff --git a/tools/build-debug b/tools/build-debug
index 1f15cd2..e611956 100755
--- a/tools/build-debug
+++ b/tools/build-debug
@@ -34,4 +34,4 @@ fi
rm -rf `find . -name bin -o -name obj -prune`
cd jni
-$ANDROID_NDK_ROOT/ndk-build && cd .. && ant debug
+$ANDROID_NDK_ROOT/ndk-build && cd ..
diff --git a/tools/update.sh b/tools/update.sh
index 57219c3..79b45ef 100755
--- a/tools/update.sh
+++ b/tools/update.sh
@@ -18,7 +18,7 @@ command -v "$ANDROID" >/dev/null 2>&1 || { echo >&2 "The $ANDROID tool is not fo
# Make sure target-11 is installed
-$ANDROID update sdk -u -t android-11
+$ANDROID update sdk -u -t android-19
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ATE_ROOT="$( cd $DIR/.. && pwd )"
@@ -31,5 +31,5 @@ for PROJECT_FILE in $PROJECT_FILES
do
PROJECT_DIR="$( dirname "$PROJECT_FILE" )"
echo "Updating $PROJECT_FILE"
- $ANDROID update project -p "$PROJECT_DIR" --target android-11
+ $ANDROID update project -p "$PROJECT_DIR" --target android-19
done

View file

@ -1,54 +0,0 @@
#!/bin/sh
# Outputs a new PATH setting that is prefixed by the path to the
# Android cross-compiler toolchain to use for a given Android version.
#
# For Android 5, force PIE build flags
#
# Since the ghc-android wrappers actually hardcode the path to the
# toolchain, and we want to wrap the toolchain programs, the binaries
# are moved to .orig and replaced by wrappers.
androidversion="$1"
# Allow running from the top or inside this directory.
if [ -e abiversion ]; then
top=.
else
top=standalone/android
fi
wrap () {
sed -e "s!PROG!$1!" -e "s!OPTS!$3!" < $top/wrapper.pl > "$2"
chmod +x "$2"
}
# location to toolchain as installed by ghc-android
androidtoolchain="$HOME/.ghc/$(cat $top/abiversion)/bin"
for f in $(find "$androidtoolchain" -maxdepth 1 -type f -printf '%f\n' | grep -v \.orig); do
bin="$androidtoolchain/$f"
orig="$androidtoolchain/$f.orig"
if [ ! -e "$orig" ]; then
cp -a "$bin" "$orig"
fi
if [ "$androidversion" = 5 ]; then
case "$f" in
*-ld*)
wrap "$orig" "$bin" "-pie"
;;
*-gcc)
wrap "$orig" "$bin" "-pie -fPIE"
;;
*'-g++')
wrap "$orig" "$bin" "-pie -fPIE"
;;
*)
cp -a "$orig" "$bin"
;;
esac
else
cp -a "$orig" "$bin"
fi
done
echo "$androidtoolchain:$PATH"

View file

@ -1,11 +0,0 @@
#!/usr/bin/perl
my $prog=q{PROG}; # replaced
my @opts=qw{OPTS}; # replaced
if (grep { $_ eq "-r" || $_ eq "--relocatable" } @ARGV) {
exec($prog,@ARGV) || die "failed to run $prog";
}
else {
my @args=grep { ! m/-no-pie/ } @ARGV;
exec($prog,@opts,@args) || die "failed to run $prog";
}

View file

@ -1,50 +0,0 @@
{- This file was modified by the EvilSplicer, adding these headers,
- and expanding Template Haskell.
-
- ** DO NOT COMMIT **
-}
import qualified Data.Monoid
import qualified Control.Applicative
import qualified Data.Set
import qualified Data.Set as Data.Set.Base
import qualified Data.Map
import qualified Data.Map as Data.Map.Base
import qualified Data.HashMap.Strict
import qualified Data.HashMap.Strict as Data.HashMap.Base
import qualified Data.Foldable
import qualified Data.Text
import qualified Data.Text.Lazy.Builder
import qualified Data.Text.Lazy.Builder as Data.Text.Internal.Builder
import qualified Text.Shakespeare
import qualified Text.Hamlet
import qualified Text.Julius
import qualified Text.Css
import qualified "blaze-markup" Text.Blaze.Internal
import qualified Yesod.Core.Widget
import qualified Yesod.Routes.TH.Types
import qualified Yesod.Core.Dispatch
import qualified Yesod.Routes.Dispatch
import qualified WaiAppStatic.Storage.Embedded
import qualified WaiAppStatic.Storage.Embedded.Runtime
import qualified Data.FileEmbed
import qualified Data.ByteString.Internal
import qualified Data.Text.Encoding
import qualified Network.Wai
import qualified Network.Wai as Network.Wai.Internal
import qualified Yesod.Core.Types
import qualified GHC.IO
import qualified Data.ByteString.Unsafe
import qualified Data.ByteString.Char8
import qualified Database.Persist.Class as Database.Persist.Class.PersistField
import qualified Database.Persist as Database.Persist.Class.PersistField
import qualified Database.Persist.Sql as Database.Persist.Sql.Class
import qualified Database.Persist.Sql as Database.Persist.Types.Base
import qualified Control.Monad.Logger
import qualified Control.Monad.IO.Class
import qualified Control.Monad.Trans.Control
import Database.Persist.Sql (fromPersistValue)
{- End EvilSplicer headers. -}

View file

@ -1,420 +0,0 @@
From e54cfacbb9fb24f75d3d93cd8ee6da67b161574f Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 16 Oct 2014 02:51:28 +0000
Subject: [PATCH] remove TH
---
DAV.cabal | 28 +----
Network/Protocol/HTTP/DAV.hs | 92 +++++++++++++---
Network/Protocol/HTTP/DAV/TH.hs | 232 +++++++++++++++++++++++++++++++++++++++-
3 files changed, 306 insertions(+), 46 deletions(-)
diff --git a/DAV.cabal b/DAV.cabal
index 95fffd8..5669c51 100644
--- a/DAV.cabal
+++ b/DAV.cabal
@@ -47,33 +47,7 @@ library
, utf8-string
, xml-conduit >= 1.0 && < 1.3
, xml-hamlet >= 0.4 && < 0.5
-executable hdav
- main-is: hdav.hs
- ghc-options: -Wall
- build-depends: base >= 4.5 && < 5
- , bytestring
- , bytestring
- , case-insensitive >= 0.4
- , containers
- , data-default
- , either >= 4.3
- , errors
- , exceptions
- , http-client >= 0.2
- , http-client-tls >= 0.2
- , http-types >= 0.7
- , lens >= 3.0
- , mtl >= 2.1
- , optparse-applicative >= 0.10.0
- , transformers >= 0.3
- , transformers-base
- , utf8-string
- , xml-conduit >= 1.0 && < 1.3
- , xml-hamlet >= 0.4 && < 0.5
- if flag(network-uri)
- build-depends: network-uri >= 2.6, network >= 2.6
- else
- build-depends: network >= 2.3 && <2.6
+ , text
source-repository head
type: git
diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs
index 4c6d68f..55979b6 100644
--- a/Network/Protocol/HTTP/DAV.hs
+++ b/Network/Protocol/HTTP/DAV.hs
@@ -82,6 +82,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho
import qualified Text.XML as XML
import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName)
import Text.Hamlet.XML (xml)
+import qualified Data.Text
import Data.CaseInsensitive (mk)
@@ -330,31 +331,88 @@ withLockIfPossibleForDelete nocreate f = do
propname :: XML.Document
propname = XML.Document (XML.Prologue [] Nothing []) root []
where
- root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
-<D:allprop>
-|]
+ root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) $ concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "D:allprop") Nothing Nothing)
+ Map.empty
+ (concat []))]]
+
locky :: XML.Document
locky = XML.Document (XML.Prologue [] Nothing []) root []
where
- root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
-<D:lockscope>
- <D:exclusive>
-<D:locktype>
- <D:write>
-<D:owner>Haskell DAV user
-|]
+ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "D:lockscope") Nothing Nothing)
+ Map.empty
+ (concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "D:exclusive") Nothing Nothing)
+ Map.empty
+ (concat []))]]))],
+ [XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "D:locktype") Nothing Nothing)
+ Map.empty
+ (concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name (Data.Text.pack "D:write") Nothing Nothing)
+ Map.empty
+ (concat []))]]))],
+ [XML.NodeElement
+ (XML.Element
+ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing)
+ Map.empty
+ (concat
+ [[XML.NodeContent
+ (Data.Text.pack "Haskell DAV user")]]))]]
+
calendarquery :: XML.Document
calendarquery = XML.Document (XML.Prologue [] Nothing []) root []
where
- root = XML.Element "C:calendar-query" (Map.fromList [("xmlns:D", "DAV:"),("xmlns:C", "urn:ietf:params:xml:ns:caldav")]) [xml|
-<D:prop>
- <D:getetag>
- <C:calendar-data>
-<C:filter>
- <C:comp-filter name="VCALENDAR">
-|]
+ root = XML.Element "C:calendar-query" (Map.fromList [("xmlns:D", "DAV:"),("xmlns:C", "urn:ietf:params:xml:ns:caldav")]) $ concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name (Data.Text.pack "D:prop") Nothing Nothing)
+ Map.empty
+ (concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "D:getetag") Nothing Nothing)
+ Map.empty
+ (concat []))],
+ [XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "C:calendar-data") Nothing Nothing)
+ Map.empty
+ (concat []))]]))],
+ [XML.NodeElement
+ (XML.Element
+ (XML.Name (Data.Text.pack "C:filter") Nothing Nothing)
+ Map.empty
+ (concat
+ [[XML.NodeElement
+ (XML.Element
+ (XML.Name
+ (Data.Text.pack "C:comp-filter") Nothing Nothing)
+ (Map.insert
+ (XML.Name (Data.Text.pack "name") Nothing Nothing)
+ (Data.Text.concat
+ [Data.Text.pack "VCALENDAR"])
+ Map.empty)
+ (concat []))]]))]]
+
-- | Normally, DAVT actions act on the url that is provided to eg, evalDAVT.
-- Sometimes, it's useful to adjust the url that is acted on, while
diff --git a/Network/Protocol/HTTP/DAV/TH.hs b/Network/Protocol/HTTP/DAV/TH.hs
index 0ecd476..1653bf6 100644
--- a/Network/Protocol/HTTP/DAV/TH.hs
+++ b/Network/Protocol/HTTP/DAV/TH.hs
@@ -20,9 +20,11 @@
module Network.Protocol.HTTP.DAV.TH where
-import Control.Lens (makeLenses)
+import Control.Lens
import qualified Data.ByteString as B
import Network.HTTP.Client (Manager, Request)
+import qualified Data.Functor
+import qualified Control.Lens.Type
data Depth = Depth0 | Depth1 | DepthInfinity
instance Read Depth where
@@ -47,4 +49,230 @@ data DAVContext = DAVContext {
, _lockToken :: Maybe B.ByteString
, _userAgent :: B.ByteString
}
-makeLenses ''DAVContext
+allowedMethods :: Control.Lens.Type.Lens' DAVContext [B.ByteString]
+allowedMethods
+ _f_a3iH
+ (DAVContext __allowedMethods'_a3iI
+ __baseRequest_a3iK
+ __basicusername_a3iL
+ __basicpassword_a3iM
+ __complianceClasses_a3iN
+ __depth_a3iO
+ __httpManager_a3iP
+ __lockToken_a3iQ
+ __userAgent_a3iR)
+ = ((\ __allowedMethods_a3iJ
+ -> DAVContext
+ __allowedMethods_a3iJ
+ __baseRequest_a3iK
+ __basicusername_a3iL
+ __basicpassword_a3iM
+ __complianceClasses_a3iN
+ __depth_a3iO
+ __httpManager_a3iP
+ __lockToken_a3iQ
+ __userAgent_a3iR)
+ Data.Functor.<$> (_f_a3iH __allowedMethods'_a3iI))
+{-# INLINE allowedMethods #-}
+baseRequest :: Control.Lens.Type.Lens' DAVContext Request
+baseRequest
+ _f_a3iS
+ (DAVContext __allowedMethods_a3iT
+ __baseRequest'_a3iU
+ __basicusername_a3iW
+ __basicpassword_a3iX
+ __complianceClasses_a3iY
+ __depth_a3iZ
+ __httpManager_a3j0
+ __lockToken_a3j1
+ __userAgent_a3j2)
+ = ((\ __baseRequest_a3iV
+ -> DAVContext
+ __allowedMethods_a3iT
+ __baseRequest_a3iV
+ __basicusername_a3iW
+ __basicpassword_a3iX
+ __complianceClasses_a3iY
+ __depth_a3iZ
+ __httpManager_a3j0
+ __lockToken_a3j1
+ __userAgent_a3j2)
+ Data.Functor.<$> (_f_a3iS __baseRequest'_a3iU))
+{-# INLINE baseRequest #-}
+basicpassword :: Control.Lens.Type.Lens' DAVContext B.ByteString
+basicpassword
+ _f_a3j3
+ (DAVContext __allowedMethods_a3j4
+ __baseRequest_a3j5
+ __basicusername_a3j6
+ __basicpassword'_a3j7
+ __complianceClasses_a3j9
+ __depth_a3ja
+ __httpManager_a3jb
+ __lockToken_a3jc
+ __userAgent_a3jd)
+ = ((\ __basicpassword_a3j8
+ -> DAVContext
+ __allowedMethods_a3j4
+ __baseRequest_a3j5
+ __basicusername_a3j6
+ __basicpassword_a3j8
+ __complianceClasses_a3j9
+ __depth_a3ja
+ __httpManager_a3jb
+ __lockToken_a3jc
+ __userAgent_a3jd)
+ Data.Functor.<$> (_f_a3j3 __basicpassword'_a3j7))
+{-# INLINE basicpassword #-}
+basicusername :: Control.Lens.Type.Lens' DAVContext B.ByteString
+basicusername
+ _f_a3je
+ (DAVContext __allowedMethods_a3jf
+ __baseRequest_a3jg
+ __basicusername'_a3jh
+ __basicpassword_a3jj
+ __complianceClasses_a3jk
+ __depth_a3jl
+ __httpManager_a3jm
+ __lockToken_a3jn
+ __userAgent_a3jo)
+ = ((\ __basicusername_a3ji
+ -> DAVContext
+ __allowedMethods_a3jf
+ __baseRequest_a3jg
+ __basicusername_a3ji
+ __basicpassword_a3jj
+ __complianceClasses_a3jk
+ __depth_a3jl
+ __httpManager_a3jm
+ __lockToken_a3jn
+ __userAgent_a3jo)
+ Data.Functor.<$> (_f_a3je __basicusername'_a3jh))
+{-# INLINE basicusername #-}
+complianceClasses ::
+ Control.Lens.Type.Lens' DAVContext [B.ByteString]
+complianceClasses
+ _f_a3jp
+ (DAVContext __allowedMethods_a3jq
+ __baseRequest_a3jr
+ __basicusername_a3js
+ __basicpassword_a3jt
+ __complianceClasses'_a3ju
+ __depth_a3jw
+ __httpManager_a3jx
+ __lockToken_a3jy
+ __userAgent_a3jz)
+ = ((\ __complianceClasses_a3jv
+ -> DAVContext
+ __allowedMethods_a3jq
+ __baseRequest_a3jr
+ __basicusername_a3js
+ __basicpassword_a3jt
+ __complianceClasses_a3jv
+ __depth_a3jw
+ __httpManager_a3jx
+ __lockToken_a3jy
+ __userAgent_a3jz)
+ Data.Functor.<$> (_f_a3jp __complianceClasses'_a3ju))
+{-# INLINE complianceClasses #-}
+depth :: Control.Lens.Type.Lens' DAVContext (Maybe Depth)
+depth
+ _f_a3jA
+ (DAVContext __allowedMethods_a3jB
+ __baseRequest_a3jC
+ __basicusername_a3jD
+ __basicpassword_a3jE
+ __complianceClasses_a3jF
+ __depth'_a3jG
+ __httpManager_a3jI
+ __lockToken_a3jJ
+ __userAgent_a3jK)
+ = ((\ __depth_a3jH
+ -> DAVContext
+ __allowedMethods_a3jB
+ __baseRequest_a3jC
+ __basicusername_a3jD
+ __basicpassword_a3jE
+ __complianceClasses_a3jF
+ __depth_a3jH
+ __httpManager_a3jI
+ __lockToken_a3jJ
+ __userAgent_a3jK)
+ Data.Functor.<$> (_f_a3jA __depth'_a3jG))
+{-# INLINE depth #-}
+httpManager :: Control.Lens.Type.Lens' DAVContext (Maybe Manager)
+httpManager
+ _f_a3jL
+ (DAVContext __allowedMethods_a3jM
+ __baseRequest_a3jN
+ __basicusername_a3jO
+ __basicpassword_a3jP
+ __complianceClasses_a3jQ
+ __depth_a3jR
+ __httpManager'_a3jS
+ __lockToken_a3jU
+ __userAgent_a3jV)
+ = ((\ __httpManager_a3jT
+ -> DAVContext
+ __allowedMethods_a3jM
+ __baseRequest_a3jN
+ __basicusername_a3jO
+ __basicpassword_a3jP
+ __complianceClasses_a3jQ
+ __depth_a3jR
+ __httpManager_a3jT
+ __lockToken_a3jU
+ __userAgent_a3jV)
+ Data.Functor.<$> (_f_a3jL __httpManager'_a3jS))
+{-# INLINE httpManager #-}
+lockToken ::
+ Control.Lens.Type.Lens' DAVContext (Maybe B.ByteString)
+lockToken
+ _f_a3jW
+ (DAVContext __allowedMethods_a3jX
+ __baseRequest_a3jY
+ __basicusername_a3jZ
+ __basicpassword_a3k0
+ __complianceClasses_a3k1
+ __depth_a3k2
+ __httpManager_a3k3
+ __lockToken'_a3k4
+ __userAgent_a3k6)
+ = ((\ __lockToken_a3k5
+ -> DAVContext
+ __allowedMethods_a3jX
+ __baseRequest_a3jY
+ __basicusername_a3jZ
+ __basicpassword_a3k0
+ __complianceClasses_a3k1
+ __depth_a3k2
+ __httpManager_a3k3
+ __lockToken_a3k5
+ __userAgent_a3k6)
+ Data.Functor.<$> (_f_a3jW __lockToken'_a3k4))
+{-# INLINE lockToken #-}
+userAgent :: Control.Lens.Type.Lens' DAVContext B.ByteString
+userAgent
+ _f_a3k7
+ (DAVContext __allowedMethods_a3k8
+ __baseRequest_a3k9
+ __basicusername_a3ka
+ __basicpassword_a3kb
+ __complianceClasses_a3kc
+ __depth_a3kd
+ __httpManager_a3ke
+ __lockToken_a3kf
+ __userAgent'_a3kg)
+ = ((\ __userAgent_a3kh
+ -> DAVContext
+ __allowedMethods_a3k8
+ __baseRequest_a3k9
+ __basicusername_a3ka
+ __basicpassword_a3kb
+ __complianceClasses_a3kc
+ __depth_a3kd
+ __httpManager_a3ke
+ __lockToken_a3kf
+ __userAgent_a3kh)
+ Data.Functor.<$> (_f_a3k7 __userAgent'_a3kg))
+{-# INLINE userAgent #-}
--
2.1.1

View file

@ -1,40 +0,0 @@
From f147ec9aeaa03ca6e30232c84c413ef29b95fb62 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Tue, 20 May 2014 19:53:55 +0000
Subject: [PATCH] avoid TH
---
aeson.cabal | 3 ---
1 file changed, 3 deletions(-)
diff --git a/aeson.cabal b/aeson.cabal
index 493d625..02dc6f4 100644
--- a/aeson.cabal
+++ b/aeson.cabal
@@ -88,7 +88,6 @@ library
Data.Aeson.Generic
Data.Aeson.Parser
Data.Aeson.Types
- Data.Aeson.TH
other-modules:
Data.Aeson.Functions
@@ -121,7 +120,6 @@ library
old-locale,
scientific >= 0.3.1 && < 0.4,
syb,
- template-haskell >= 2.4,
time,
unordered-containers >= 0.2.3.0,
vector >= 0.7.1
@@ -164,7 +162,6 @@ test-suite tests
base,
containers,
bytestring,
- template-haskell,
test-framework,
test-framework-quickcheck2,
test-framework-hunit,
--
2.0.0.rc2

Some files were not shown because too many files have changed in this diff Show more