packages feed

Unixutils 1.54.1 → 1.54.2

raw patch · 8 files changed

+42/−41 lines, 8 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- System.Unix.Mount: instance Applicative m => Applicative (WithProcAndSys m)
- System.Unix.Mount: instance Functor m => Functor (WithProcAndSys m)
- System.Unix.Mount: instance Monad m => Monad (WithProcAndSys m)
- System.Unix.Mount: instance MonadIO m => MonadIO (WithProcAndSys m)
- System.Unix.Mount: instance MonadTrans WithProcAndSys
- System.Unix.SpecialDevice: instance Eq SpecialDevice
- System.Unix.SpecialDevice: instance Ord SpecialDevice
- System.Unix.SpecialDevice: instance Show SpecialDevice
+ System.Unix.Mount: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (System.Unix.Mount.WithProcAndSys m)
+ System.Unix.Mount: instance Control.Monad.Trans.Class.MonadTrans System.Unix.Mount.WithProcAndSys
+ System.Unix.Mount: instance GHC.Base.Applicative m => GHC.Base.Applicative (System.Unix.Mount.WithProcAndSys m)
+ System.Unix.Mount: instance GHC.Base.Functor m => GHC.Base.Functor (System.Unix.Mount.WithProcAndSys m)
+ System.Unix.Mount: instance GHC.Base.Monad m => GHC.Base.Monad (System.Unix.Mount.WithProcAndSys m)
+ System.Unix.SpecialDevice: instance GHC.Classes.Eq System.Unix.SpecialDevice.SpecialDevice
+ System.Unix.SpecialDevice: instance GHC.Classes.Ord System.Unix.SpecialDevice.SpecialDevice
+ System.Unix.SpecialDevice: instance GHC.Show.Show System.Unix.SpecialDevice.SpecialDevice

Files

System/Unix/Chroot.hs view
@@ -88,7 +88,7 @@           (do liftIO $ createDirectoryIfMissing True mountPoint               liftIO $ run "/bin/mount" ["--bind", escapePathForMount toMount, escapePathForMount mountPoint]               action) `finally` (liftIO $ run "/bin/umount" [escapePathForMount mountPoint])-      escapePathForMount = id	-- FIXME - Path arguments should be escaped+      escapePathForMount = id   -- FIXME - Path arguments should be escaped        run cmd args =           do (code, out, err) <- readProcessWithExitCode cmd args ""
System/Unix/Crypt.hs view
@@ -4,7 +4,7 @@ -- Module      :  System.Unix.Crypt -- Copyright   :  (c) 2010 -- License     :  BSD3--- +-- -- Maintainer  :  jeremy@seereason.com -- Stability   :  provisional -- Portability :  non-portable (requires POSIX)@@ -13,7 +13,7 @@ -- ----------------------------------------------------------------------------- -module System.Unix.Crypt +module System.Unix.Crypt     ( crypt     )     where@@ -23,7 +23,7 @@ foreign import ccall unsafe "unistd.h crypt"   c_crypt :: CString -> CString -> IO CString --- | calls crypt(3) +-- | calls crypt(3) crypt :: String -- ^ key       -> String -- ^ salt       -> IO String -- ^ encrypted password
System/Unix/Directory.hs view
@@ -28,7 +28,7 @@     do       status <- getSymbolicLinkStatus path       case isDirectory status of-        True -> +        True ->             do               subs <- getDirectoryContents path >>=                       return . map (path </>) . filter (not . flip elem [".", ".."]) >>=@@ -134,7 +134,7 @@  -- |temporarily change the working directory to |dir| while running |action| withWorkingDirectory :: FilePath -> IO a -> IO a-withWorkingDirectory dir action = +withWorkingDirectory dir action =     bracket getCurrentDirectory setCurrentDirectory (\ _ -> setCurrentDirectory dir >> action)  -- |create a temporary directory, run the action, remove the temporary directory@@ -153,7 +153,7 @@   c_mkdtemp :: CString -> IO CString  mkdtemp :: FilePath -> IO FilePath-mkdtemp template = +mkdtemp template =       withCString (if "XXXXXX" `isSuffixOf` template then template else (template ++ "XXXXXX")) $ \ ptr -> do         cname <- throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr)         name <- peekCString cname
System/Unix/FilePath.hsc view
@@ -3,7 +3,7 @@ -- | The function splitFileName is taken from missingh, at the moment -- missingh will not build under sid. -module System.Unix.FilePath +module System.Unix.FilePath     (dirName,      baseName,      realpath,
System/Unix/Files.hs view
@@ -10,7 +10,7 @@ forceSymbolicLink :: FilePath -> FilePath -> IO () forceSymbolicLink target linkName =     createSymbolicLink target linkName `catch`-      (\e -> if isAlreadyExistsError e +      (\e -> if isAlreadyExistsError e              then do removeLink linkName                      createSymbolicLink target linkName              else ioError e)
System/Unix/Mount.hs view
@@ -1,9 +1,9 @@ {-# LANGUAGE GeneralizedNewtypeDeriving, ScopedTypeVariables #-} -- |functions for mounting, umounting, parsing \/proc\/mounts, etc module System.Unix.Mount-    ( umountBelow	-- FilePath -> IO [(FilePath, (String, String, ExitCode))]-    , umount		-- [String] -> IO (String, String, ExitCode)-    , isMountPoint	-- FilePath -> IO Bool+    ( umountBelow       -- FilePath -> IO [(FilePath, (String, String, ExitCode))]+    , umount            -- [String] -> IO (String, String, ExitCode)+    , isMountPoint      -- FilePath -> IO Bool      , withMount     , WithProcAndSys(runWithProcAndSys)
System/Unix/SpecialDevice.hs view
@@ -2,30 +2,30 @@ -- | Construct an ADT representing block and character devices -- (but mostly block devices) by interpreting the contents of -- the Linux sysfs filesystem.-module System.Unix.SpecialDevice +module System.Unix.SpecialDevice     (SpecialDevice,-     sysMountPoint,	-- IO String-     ofNode,		-- FilePath -> IO (Maybe SpecialDevice)-     ofNodeStatus,	-- FileStatus -> Maybe SpecialDevice-     ofPath,		-- FilePath -> IO (Maybe SpecialDevice)-     rootPart,		-- IO (Maybe SpecialDevice)-     ofDevNo,		-- (DeviceID -> SpecialDevice) -> Int -> SpecialDevice-     ofSysName,		-- String -> IO (Maybe SpecialDevice)-     ofSysPath,		-- (DeviceID -> SpecialDevice) -> FilePath -> IO (Maybe SpecialDevice)-     toDevno,		-- SpecialDevice -> Int-     --major,		-- SpecialDevice -> Int-     --minor,		-- SpecialDevice -> Int-     ofMajorMinor,	-- (DeviceID -> SpecialDevice) -> Int -> Int -> SpecialDevice-     node,		-- SpecialDevice -> IO (Maybe FilePath)-     nodes,		-- SpecialDevice -> IO [FilePath]-     sysName,		-- SpecialDevice -> IO (Maybe String)-     splitPart,		-- String -> (String, Int)-     sysDir,		-- SpecialDevice -> IO (Maybe FilePath)-     diskOfPart,	-- SpecialDevice -> IO (Maybe SpecialDevice)-     getAllDisks,	-- IO [SpecialDevice]-     getAllPartitions,	-- IO [SpecialDevice]-     getAllCdroms,	-- IO [SpecialDevice]-     getAllRemovable,	-- IO [SpecialDevice]+     sysMountPoint,     -- IO String+     ofNode,            -- FilePath -> IO (Maybe SpecialDevice)+     ofNodeStatus,      -- FileStatus -> Maybe SpecialDevice+     ofPath,            -- FilePath -> IO (Maybe SpecialDevice)+     rootPart,          -- IO (Maybe SpecialDevice)+     ofDevNo,           -- (DeviceID -> SpecialDevice) -> Int -> SpecialDevice+     ofSysName,         -- String -> IO (Maybe SpecialDevice)+     ofSysPath,         -- (DeviceID -> SpecialDevice) -> FilePath -> IO (Maybe SpecialDevice)+     toDevno,           -- SpecialDevice -> Int+     --major,           -- SpecialDevice -> Int+     --minor,           -- SpecialDevice -> Int+     ofMajorMinor,      -- (DeviceID -> SpecialDevice) -> Int -> Int -> SpecialDevice+     node,              -- SpecialDevice -> IO (Maybe FilePath)+     nodes,             -- SpecialDevice -> IO [FilePath]+     sysName,           -- SpecialDevice -> IO (Maybe String)+     splitPart,         -- String -> (String, Int)+     sysDir,            -- SpecialDevice -> IO (Maybe FilePath)+     diskOfPart,        -- SpecialDevice -> IO (Maybe SpecialDevice)+     getAllDisks,       -- IO [SpecialDevice]+     getAllPartitions,  -- IO [SpecialDevice]+     getAllCdroms,      -- IO [SpecialDevice]+     getAllRemovable,   -- IO [SpecialDevice] --     toDevName, --     getBlkidAlist, --     getBlkidInfo,@@ -78,7 +78,7 @@         (Just . BlockDevice . specialDeviceID $ status) else         if isCharacterDevice status then             (Just . CharacterDevice . specialDeviceID $ status) else-            Nothing    +            Nothing  ofSysName :: String -> IO (Maybe SpecialDevice) ofSysName name =@@ -144,7 +144,7 @@ sysName dev = sysDir dev >>= return . maybe Nothing (Just . basename)  sysDir :: SpecialDevice -> IO (Maybe FilePath)-sysDir dev@(BlockDevice _) = +sysDir dev@(BlockDevice _) =     do       (pairs' :: [(FilePath, FileStatus)]) <- directory_find False (sysMountPoint ++ "/block")       let (paths :: [FilePath]) = map fst . filter isDev $ pairs'@@ -194,10 +194,10 @@       x -> True  getAllCdroms :: IO [SpecialDevice]-getAllCdroms = cdromGroup >>= getDisksInGroup +getAllCdroms = cdromGroup >>= getDisksInGroup  getAllRemovable :: IO [SpecialDevice]-getAllRemovable = floppyGroup >>= getDisksInGroup +getAllRemovable = floppyGroup >>= getDisksInGroup  -- ofNode "/dev/sda1" >>= maybe (return Nothing) sysDir >>= putStrLn . show -- -> Just "/sys/block/sda/sda1/dev"
Unixutils.cabal view
@@ -1,5 +1,5 @@ Name:           Unixutils-Version:        1.54.1+Version:        1.54.2 License:        BSD3 License-File:	COPYING Author:         Jeremy Shaw, David Fox@@ -11,9 +11,10 @@  A collection of useful and mildly useful functions that you might  expect to find in System.* which a heavy bias towards Unix-type operating systems. Build-type:	Simple-Cabal-Version: >= 1.2+Cabal-Version: >= 1.10  Library+    Default-Language: Haskell2010     Build-Depends:       base >= 4 && <5,       bytestring,