summaryrefslogtreecommitdiff
path: root/src/Utility
AgeCommit message (Collapse)Author
2016-12-24GHC's fileSystemEncoding is used for all String IO, to avoid ↵Joey Hess
encoding-related crashes in eg, Propellor.Property.File.
2016-06-20handle SomeAsyncException same as AsyncExceptionJoey Hess
This new type was added to base a while ago; I don't know what uses it, but it's intended to be an async exception, so make sure we don't catch it.
2016-06-19Generalized fileProperty can now operate on files as either a series of ↵Joey Hess
lines, or a ByteString.
2016-06-19Write privdata files in binary rather than textAndrew Schurman
https://propellor.branchable.com/todo/bytes_in_privData__63__/
2016-05-22split out module to work around badly named symbol in directory-1.2.6.2Joey Hess
Sadly my bug report about this is not going to get fixed it seems, so I have to drag around a whole added module file just to deal with it. https://github.com/haskell/directory/issues/52
2016-05-22merge Utility from git-annexJoey Hess
2016-04-28Fix build with directory-1.2.6.2.Joey Hess
It's now exporting a conflicting isSymbolicLink https://github.com/haskell/directory/issues/52 Only a few places in propellor use isSymbolicLink, but to prevent future problems, made as much of it as possible import Utility.Directory, which re-exports System.Directory without the conflicting symbol. (Utility.Tmp and System.Console.Concurrent.Internal cannot import Utility.Directory due to cycles, and don't use isSymbolicLink anyway.)
2016-03-06build with older ghcJoey Hess
2016-03-06Force ssh, scp, and git commands to be run in the foreground.Joey Hess
Before, they could run in the background if another process was running, and so their output wouldn't immediately be visible. With this change, the concurrent-output layer is not used for these interactive commands.
2016-03-06refactorJoey Hess
2015-12-15Merged Utility changes from git-annex.Joey Hess
2015-12-15merge from git-annexJoey Hess
withTmpDir security fix in git-annex merged Fix potential denial of service attack when creating temp dirs. withTmpDir now makes directory mode 700. AFAICS, propellor didn't leak any info with the old permissions, and no uses of withTmpDir in propellor are broken by the new permissions.
2015-11-24merge fix from gix-annexJoey Hess
2015-11-17Removed the (unused) dependency on quickcheck.Joey Hess
2015-11-01merge from concurrent-outputJoey Hess
2015-11-01merge from concurrent-outputJoey Hess
2015-11-01merge changes from concurrent-outputJoey Hess
2015-10-29generalize what can be outputJoey Hess
This adds a dependency on Text, but I don't mind propellor depending on it and am somewhat surprised it doesn't already. Using Text also lets this use encodeUtf8 instead of the nasty hack it was using to go from String -> ByteString.
2015-10-28exampleJoey Hess
2015-10-28propellor spinJoey Hess
2015-10-28have to flush concurrent output before printing result when chainingJoey Hess
2015-10-28export lockOutputJoey Hess
2015-10-28remove externalsJoey Hess
2015-10-28better lock taking using STM, and wait for concurrent processes writer ↵Joey Hess
threads on shutdown
2015-10-28remove debug codeJoey Hess
2015-10-28fix memory leak, and optimise when command output is very largeJoey Hess
2015-10-28fix buffer orderJoey Hess
Build it up reversed, and reverse when processing.
2015-10-28work around waitForProcess race conditionJoey Hess
https://github.com/haskell/process/issues/46
2015-10-28fix tricky raceJoey Hess
Race between 2 calls to takeOutputLock'. The first call empties the TMVar, and does some work to check it. Meanwhile, the second call could sneak in, see it was empty, and call waitlock. Since waitlock used tryTakeTMVar, that would not block it, and it would think it had the lock, filling the TMVar. In the meantime, the first call could decide it had to lock and go on to possibly cause trouble.
2015-10-28fix bad MVar use, use STMJoey Hess
I had 2 MVars both involved in the same lock, and it seemed intractable to avoid deadlocks with them. STM makes it easy. At this point, the concurrent process stuff seems to work pretty well, but I'm not 100% sure it's not got some bugs.
2015-10-28need withConcurrentOutput to flush any buffered concurrent outputJoey Hess
2015-10-28propellor spinJoey Hess
2015-10-28propellor spinJoey Hess
2015-10-28use outputConcurrent interfaceJoey Hess
This interface will fix the current deadlock when a process is running and the thread that ran it wants to output to the console. The locking and buffering is not implemented yet.
2015-10-28propellor spinJoey Hess
2015-10-28propellor spinJoey Hess
2015-10-28improve commentJoey Hess
2015-10-28don't truncate over-large output; swap to temp filesJoey Hess
2015-10-28split out generic ConcurrentOutput module to UtilityJoey Hess
2015-10-27use execProcessConcurrent everywhereJoey Hess
Found a reasonable clean way to make Utility.Process use execProcessConcurrent, while still allowing copying updates to it from git-annex.
2015-10-27merge from git-annexJoey Hess
2015-09-15avoid a change to readProcess that I regretted in the morningJoey Hess
Seems better to keep handle encoding issues out of that module.
2015-09-14Allow storing arbitrary ByteStrings in PrivData, extracted using ↵Joey Hess
privDataByteString.
2015-09-13merge from git-annexJoey Hess
2015-09-13Follow some hlint suggestions.Mario Lang
2015-06-01remove Params constructorJoey Hess
Before it gets into released API...
2015-05-30export createProcess with debug logging from Propellor.Property.CmdJoey Hess
2015-05-27merge changes from git-annexJoey Hess
2015-05-27Export CommandParam, boolSystem, safeSystem and shellEscape from ↵Joey Hess
Propellor.Property.Cmd, so they are available for use in constricting your own Properties when using propellor as a library. Several imports of Utility.SafeCommand now redundant.
2015-05-27merge changes from git-annexJoey Hess