diff --git a/Distribution/Server/Features/Security/Backup.hs b/Distribution/Server/Features/Security/Backup.hs index 64a89f24b..5be85edbb 100644 --- a/Distribution/Server/Features/Security/Backup.hs +++ b/Distribution/Server/Features/Security/Backup.hs @@ -7,13 +7,15 @@ module Distribution.Server.Features.Security.Backup ( -- stdlib import Control.Monad.State import Data.Maybe (fromMaybe) -import Data.Version -import Text.CSV +import Data.Time +import Data.Version (Version(..), showVersion) +import Text.CSV hiding (csv) -- hackage +import Distribution.Server.Features.Security.FileInfo +import Distribution.Server.Features.Security.State import Distribution.Server.Framework.BackupDump import Distribution.Server.Framework.BackupRestore -import Distribution.Server.Features.Security.State -- hackage-security import Hackage.Security.Util.Some @@ -29,26 +31,57 @@ import qualified Hackage.Security.Server as Sec securityBackup :: SecurityState -> [BackupEntry] securityBackup = (:[]) . csvToBackup ["partialstate.csv"] . exportSecurityState +-- | Export the security state to CSV +-- +-- Version 0.2 introduced more information into this format: +-- +-- > "0.2" +-- > "version" , "timestamp" , +-- > "version" , "snapshot" , +-- > "update" , "time" ,