git-annex 6.20160419 → 6.20160511
raw patch · 104 files changed
+1069/−284 lines, 104 filessetup-changed
Files
- Annex/AdjustedBranch.hs +3/−2
- Annex/Fixup.hs +0/−1
- Annex/Init.hs +5/−5
- Annex/Locations.hs +19/−16
- Annex/ReplaceFile.hs +11/−0
- Assistant/Install/AutoStart.hs +1/−1
- Assistant/WebApp/Configurators/Edit.hs +4/−1
- Assistant/WebApp/Configurators/Local.hs +2/−0
- Build/Configure.hs +1/−1
- Build/DesktopFile.hs +1/−1
- Build/EvilLinker.hs +1/−1
- Build/EvilSplicer.hs +1/−1
- Build/LinuxMkLibs.hs +0/−1
- Build/NullSoftInstaller.hs +1/−1
- Build/OSXMkLibs.hs +0/−1
- Build/Standalone.hs +1/−1
- Build/TestConfig.hs +1/−1
- Build/Version.hs +1/−1
- CHANGELOG +39/−2
- Command/Fix.hs +2/−0
- Command/Fsck.hs +17/−10
- Command/Map.hs +26/−24
- Command/Smudge.hs +7/−2
- Command/Version.hs +4/−0
- Common.hs +0/−1
- Creds.hs +1/−1
- Crypto.hs +51/−37
- Git.hs +5/−0
- Git/Env.hs +11/−3
- Git/Tree.hs +7/−7
- Remote/External.hs +9/−1
- Remote/External/Types.hs +2/−0
- Remote/GCrypt.hs +2/−4
- Remote/Git.hs +7/−4
- Remote/Helper/Encryptable.hs +40/−25
- Remote/Helper/Special.hs +8/−6
- Remote/S3.hs +5/−1
- Setup.hs +2/−1
- Types/Crypto.hs +10/−2
- Types/GitConfig.hs +2/−0
- Utility/Directory.hs +6/−3
- Utility/FreeDesktop.hs +1/−1
- Utility/LinuxMkLibs.hs +0/−1
- Utility/LockFile/PidLock.hs +0/−1
- Utility/Path.hs +1/−1
- Utility/Tmp.hs +1/−1
- debian/changelog +39/−2
- doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn +2/−0
- doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn +104/−0
- doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn +81/−0
- doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn +35/−0
- doc/bugs/git-annex_smudge_fails_on_git_add.mdwn +2/−0
- doc/bugs/stack_build_Setup.hs_dependencies.mdwn +7/−0
- doc/design/external_special_remote_protocol.mdwn +9/−1
- doc/design/roadmap.mdwn +2/−1
- doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment +0/−14
- doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment +0/−24
- doc/devblog/day_387__release_day.mdwn +10/−0
- doc/devblog/day_388-389__various_and_windows.mdwn +13/−0
- doc/devblog/day_390__sharedpubkey.mdwn +5/−0
- doc/encryption.mdwn +23/−6
- doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn +1/−0
- doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn +16/−0
- doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn +1/−0
- doc/forum/Ignoring_folders__63__.mdwn +1/−0
- doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn +10/−0
- doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn +7/−0
- doc/forum/S3_remote_not_available.mdwn +31/−0
- doc/forum/Wrong_symlink_target_on_usb_drive.mdwn +55/−0
- doc/forum/race_condition_with_drop_-J__63__.mdwn +7/−0
- doc/forum/time_profiling_the_assistant.mdwn +19/−0
- doc/forum/unable_to_clone_annex_repo_in_windows.mdwn +29/−0
- doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment +12/−0
- doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment +14/−0
- doc/git-annex-map.mdwn +10/−0
- doc/git-annex-view.mdwn +5/−0
- doc/git-annex.mdwn +9/−2
- doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment +22/−0
- doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment +10/−0
- doc/install/Windows.mdwn +13/−9
- doc/install/fromsource.mdwn +1/−1
- doc/news/version_6.20160229.mdwn +0/−24
- doc/news/version_6.20160318.mdwn +0/−18
- doc/news/version_6.20160511.mdwn +34/−0
- doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment +12/−0
- doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment +10/−0
- doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment +19/−0
- doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment +18/−0
- doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn +2/−0
- doc/todo/use_inode_cache_in_unlocked_files.mdwn +10/−0
- doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn +3/−0
- doc/todo/wishlist__58__alias_system.mdwn +2/−0
- git-annex.cabal +1/−1
- man/git-annex-map.1 +9/−0
- man/git-annex-view.1 +5/−0
- man/git-annex.1 +8/−2
- stack.yaml +2/−0
- standalone/android/cabal.config +5/−2
- standalone/android/icons/drawable-hdpi/ic_launcher.png binary
- standalone/android/icons/drawable-ldpi/ic_launcher.png binary
- standalone/android/icons/drawable-mdpi/ic_launcher.png binary
- standalone/android/icons/drawable-xhdpi/ic_launcher.png binary
- standalone/android/icons/drawable/ic_launcher.png binary
- standalone/android/tmp/network-2.4.1.2/cabal.config +5/−2
Annex/AdjustedBranch.hs view
@@ -481,12 +481,13 @@ where reverseadj = reverseAdjustment adj propchanges changes ti@(TreeItem f _ _) =- case M.lookup f m of+ case M.lookup (norm f) m of Nothing -> return (Just ti) -- not changed Just change -> adjustTreeItem reverseadj change where- m = M.fromList $ map (\i@(TreeItem f' _ _) -> (f', i)) $+ m = M.fromList $ map (\i@(TreeItem f' _ _) -> (norm f', i)) $ map diffTreeToTreeItem changes+ norm = normalise . getTopFilePath diffTreeToTreeItem :: Git.DiffTree.DiffTreeItem -> TreeItem diffTreeToTreeItem dti = TreeItem
Annex/Fixup.hs view
@@ -20,7 +20,6 @@ import System.IO import System.FilePath-import System.Directory import Data.List import Control.Monad import Control.Monad.IfElse
Annex/Init.hs view
@@ -145,10 +145,10 @@ liftIO $ probeCrippledFileSystem' tmp probeCrippledFileSystem' :: FilePath -> IO Bool-probeCrippledFileSystem' tmp = do #ifdef mingw32_HOST_OS- return True+probeCrippledFileSystem' _ = return True #else+probeCrippledFileSystem' tmp = do let f = tmp </> "gaprobe" writeFile f "" uncrippled <- probe f@@ -177,9 +177,9 @@ setCrippledFileSystem True {- Normally git disables core.symlinks itself when the- - filesystem does not support them, but in Cygwin, git- - does support symlinks, while git-annex, not linking- - with Cygwin, does not. -}+ - filesystem does not support them. But, even if symlinks are+ - supported, we don't use them by default in a crippled+ - filesystem. -} whenM (coreSymlinks <$> Annex.getGitConfig) $ do warning "Disabling core.symlinks." setConfig (ConfigKey "core.symlinks")
Annex/Locations.hs view
@@ -137,25 +137,28 @@ - the actual location of the file's content. -} gitAnnexLocation :: Key -> Git.Repo -> GitConfig -> IO FilePath-gitAnnexLocation key r config = gitAnnexLocation' key r config (annexCrippledFileSystem config) doesFileExist (Git.localGitDir r)-gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> (FilePath -> IO Bool) -> FilePath -> IO FilePath-gitAnnexLocation' key r config crippled checker gitdir+gitAnnexLocation key r config = gitAnnexLocation' key r config (annexCrippledFileSystem config) (coreSymlinks config) doesFileExist (Git.localGitDir r)+gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> Bool -> (FilePath -> IO Bool) -> FilePath -> IO FilePath+gitAnnexLocation' key r config crippled symlinkssupported checker gitdir {- Bare repositories default to hashDirLower for new- - content, as it's more portable.- -- - Repositories on filesystems that are crippled also use- - hashDirLower, since they do not use symlinks and it's- - more portable.- -}- | Git.repoIsLocalBare r || crippled =- check $ map inrepo $ annexLocations config key- | hasDifference ObjectHashLower (annexDifferences config) =- return $ inrepo $ annexLocation config key hashDirLower- {- Non-bare repositories only use hashDirMixed, so+ - content, as it's more portable. But check all locations. -}+ | Git.repoIsLocalBare r = checkall+ | hasDifference ObjectHashLower (annexDifferences config) = + only hashDirLower+ {- Repositories on crippled filesystems use hashDirLower+ - for new content, unless symlinks are supported too.+ - Then hashDirMixed is used. But, the content could be+ - in either location so check both. -}+ | symlinkssupported = check $ map inrepo $ reverse $ annexLocations config key+ | crippled = checkall+ {- Regular repositories only use hashDirMixed, so - don't need to do any work to check if the file is - present. -}- | otherwise = return $ inrepo $ annexLocation config key hashDirMixed+ | otherwise = only hashDirMixed where+ only = return . inrepo . annexLocation config key+ checkall = check $ map inrepo $ annexLocations config key+ inrepo d = gitdir </> d check locs@(l:_) = fromMaybe l <$> firstM checker locs check [] = error "internal"@@ -166,7 +169,7 @@ currdir <- getCurrentDirectory let absfile = fromMaybe whoops $ absNormPathUnix currdir file let gitdir = getgitdir currdir- loc <- gitAnnexLocation' key r config False (\_ -> return True) gitdir+ loc <- gitAnnexLocation' key r config False False (\_ -> return True) gitdir toInternalGitPath <$> relPathDirToFile (parentDir absfile) loc where getgitdir currdir
Annex/ReplaceFile.hs view
@@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-}+ module Annex.ReplaceFile where import Annex.Common@@ -27,8 +29,17 @@ replaceFile file action = do misctmpdir <- fromRepo gitAnnexTmpMiscDir void $ createAnnexDirectory misctmpdir+#ifndef mingw32_HOST_OS+ -- Use part of the filename as the template for the temp+ -- directory. This does not need to be unique, but it+ -- makes it more clear what this temp directory is for. filemax <- liftIO $ fileNameLengthLimit misctmpdir let basetmp = take (filemax `div` 2) (takeFileName file)+#else+ -- Windows has limits on the whole path length, so keep+ -- it short.+ let basetmp = "t"+#endif withTmpDirIn misctmpdir basetmp $ \tmpdir -> do let tmpfile = tmpdir </> basetmp action tmpfile
Assistant/Install/AutoStart.hs view
@@ -14,7 +14,7 @@ #ifdef darwin_HOST_OS import Utility.OSX import Utility.Path-import System.Directory+import Utility.Directory #endif installAutoStart :: FilePath -> FilePath -> IO ()
Assistant/WebApp/Configurators/Edit.hs view
@@ -259,7 +259,10 @@ [whamlet|not encrypted|] (Just (SharedCipher _)) -> [whamlet|encrypted: encryption key stored in git repository|]- (Just (EncryptedCipher _ _ (KeyIds { keyIds = ks }))) -> do+ (Just (EncryptedCipher _ _ ks)) -> desckeys ks+ (Just (SharedPubKeyCipher _ ks)) -> desckeys ks+ where+ desckeys (KeyIds { keyIds = ks }) = do cmd <- liftAnnex $ gpgCmd <$> Annex.getGitConfig knownkeys <- liftIO (secretKeys cmd) [whamlet|
Assistant/WebApp/Configurators/Local.hs view
@@ -24,7 +24,9 @@ import Config.Files import Utility.FreeDesktop import Utility.DiskFree+#ifndef mingw32_HOST_OS import Utility.Mounts+#endif import Utility.DataUnits import Remote (prettyUUID) import Annex.UUID
Build/Configure.hs view
@@ -4,7 +4,6 @@ module Build.Configure where -import System.Directory import Control.Applicative import System.Environment (getArgs) import Control.Monad.IfElse@@ -20,6 +19,7 @@ import Utility.Exception import qualified Git.Version import Utility.DottedVersion+import Utility.Directory tests :: [TestCase] tests =
Build/DesktopFile.hs view
@@ -15,12 +15,12 @@ import Utility.FreeDesktop import Utility.Path import Utility.Monad+import Utility.Directory import Config.Files import Utility.OSX import Assistant.Install.AutoStart import Assistant.Install.Menu -import System.Directory import System.Environment #ifndef mingw32_HOST_OS import System.Posix.User
Build/EvilLinker.hs view
@@ -15,7 +15,6 @@ import Text.Parsec.String import Control.Applicative ((<$>)) import Control.Monad-import System.Directory import Data.Maybe import Data.List @@ -23,6 +22,7 @@ import Utility.Process hiding (env) import qualified Utility.Process import Utility.Env+import Utility.Directory data CmdParams = CmdParams { cmd :: String
Build/EvilSplicer.hs view
@@ -39,7 +39,6 @@ import Data.Char import System.Environment import System.FilePath-import System.Directory import System.IO import Control.Monad import Prelude hiding (log)@@ -49,6 +48,7 @@ import Utility.Exception hiding (try) import Utility.Path import Utility.FileSystemEncoding+import Utility.Directory data Coord = Coord { coordLine :: Int
Build/LinuxMkLibs.hs view
@@ -12,7 +12,6 @@ import System.Environment import Data.Maybe import System.FilePath-import System.Directory import Control.Monad import Data.List import System.Posix.Files
Build/NullSoftInstaller.hs view
@@ -21,7 +21,6 @@ {-# LANGUAGE OverloadedStrings, FlexibleContexts #-} import Development.NSIS -import System.Directory import System.FilePath import Control.Monad import Control.Applicative @@ -36,6 +35,7 @@ import Utility.SafeCommand import Utility.Process import Utility.Exception +import Utility.Directory import Build.BundledPrograms main = do
Build/OSXMkLibs.hs view
@@ -10,7 +10,6 @@ import System.Environment (getArgs) import Data.Maybe import System.FilePath-import System.Directory import Control.Monad import Control.Monad.IfElse import Data.List
Build/Standalone.hs view
@@ -12,12 +12,12 @@ import Control.Monad.IfElse import System.Environment import System.FilePath-import System.Directory import Control.Monad import Build.BundledPrograms import Utility.SafeCommand import Utility.Path+import Utility.Directory progDir :: FilePath -> FilePath #ifdef darwin_HOST_OS
Build/TestConfig.hs view
@@ -7,10 +7,10 @@ import Utility.Path import Utility.Monad import Utility.SafeCommand+import Utility.Directory import System.IO import System.FilePath-import System.Directory type ConfigKey = String data ConfigValue =
Build/Version.hs view
@@ -6,7 +6,6 @@ import Data.List import System.Environment-import System.Directory import Data.Char import System.Process import Control.Applicative@@ -14,6 +13,7 @@ import Utility.Monad import Utility.Exception+import Utility.Directory type Version = String
CHANGELOG view
@@ -1,9 +1,46 @@+git-annex (6.20160511) unstable; urgency=medium++ * Fix bug that sometimes prevented git-annex smudge --clean from consuming+ all its input, which resulted in git add bypassing git-annex.+ * Fix build with directory-1.2.6.2.+ * Improve behavior when a just added http remote is not available+ during uuid probe. Do not mark it as annex-ignore, so it will be tried+ again later.+ * Android: Icon refresh.+ Thanks, freewheelinfranks.+ * Added DIRHASH-LOWER to external special remote protocol.+ * git-annex.cabal: Add Setup-Depends.+ * stack.yaml: Enable explicit-setup-deps.+ * Windows: Fix several bugs in propigation of changes from the adjusted+ branch back to the master branch.+ * Windows: Fix an over-long temp directory name.+ * map: Hide dead repositories that are not connected to the graph.+ * map: Changed colors; red is used for untrusted repositories and grey+ for dead.+ * version: Display OS version and architecture too.+ * Propigate GIT_DIR and GIT_WORK_TREE environment to external special+ remotes.+ * Added annex.gnupg-decrypt-options and+ remote.<name>.annex-gnupg-decrypt-options, which are passed to gpg+ when it's decrypting data.+ * fsck: When a key is not previously known in the location log,+ record something so that reinject --known will work.+ * In the unusual configuration where annex.crippledfilesystem=true but+ core.symlinks=true, store object contents in mixed case hash+ directories so that symlinks will point to them.+ * Added new encryption=sharedpubkey mode for special remotes.+ This is useful for makking a special remote that anyone with a clone+ of the repo and your public keys can upload files to, but only you can+ decrypt the files stored in it.++ -- Joey Hess <id@joeyh.name> Wed, 11 May 2016 12:41:42 -0400+ git-annex (6.20160419) unstable; urgency=medium * Fix bug that prevented resuming of uploads to encrypted special remotes that used chunking.- * That bug could also expose the names of keys to such remotes when- attempting to resume an upload, so it is a minor security issue.+ * That bug could also expose the names of keys to such remotes, so it is a+ minor security issue. * Fix duplicate progress meter display when downloading from a git remote over http with -J. * reinject: When src file's content cannot be verified, leave it alone,
Command/Fix.hs view
@@ -18,7 +18,9 @@ import Annex.Perms import qualified Annex.Queue import qualified Database.Keys+#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__) import Utility.Touch+#endif cmd :: Command cmd = notDirect $ noCommit $ withGlobalOptions annexedMatchingOptions $
Command/Fsck.hs view
@@ -248,17 +248,24 @@ uuids <- loggedLocations key case (present, u `elem` uuids) of (True, False) -> do- fix InfoPresent- -- There is no data loss, so do not fail.- return True+ fix InfoPresent+ -- There is no data loss, so do not fail.+ return True (False, True) -> do- fix InfoMissing- warning $- "** Based on the location log, " ++ desc- ++ "\n** was expected to be present, " ++- "but its content is missing."- return False- _ -> return True+ fix InfoMissing+ warning $+ "** Based on the location log, " ++ desc+ ++ "\n** was expected to be present, " +++ "but its content is missing."+ return False+ (False, False) -> do+ -- When the location log for the key is not present,+ -- create it, so that the key will be known.+ when (null uuids) $+ whenM (not <$> isKnownKey key) $+ updatestatus InfoMissing+ return True+ (True, True) -> return True where fix s = do showNote "fixing location log"
Command/Map.hs view
@@ -19,6 +19,7 @@ import Annex.UUID import Logs.UUID import Logs.Trust+import Types.TrustLevel import qualified Remote.Helper.Ssh as Ssh import qualified Utility.Dot as Dot @@ -39,11 +40,11 @@ rs <- combineSame <$> (spider =<< gitRepo) umap <- uuidMap- trusted <- trustGet Trusted+ trustmap <- trustMapLoad file <- (</>) <$> fromRepo gitAnnexDir <*> pure "map.dot" - liftIO $ writeFile file (drawMap rs umap trusted)+ liftIO $ writeFile file (drawMap rs trustmap umap) next $ next $ ifM (Annex.getState Annex.fast) ( do@@ -55,24 +56,26 @@ liftIO $ boolSystem "dot" [Param "-Tx11", File file] ) -{- Generates a graph for dot(1). Each repository, and any other uuids, are- - displayed as a node, and each of its remotes is represented as an edge- - pointing at the node for the remote.+{- Generates a graph for dot(1). Each repository, and any other uuids+ - (except for dead ones), are displayed as a node, and each of its+ - remotes is represented as an edge pointing at the node for the remote. - - The order nodes are added to the graph matters, since dot will draw - the first ones near to the top and left. So it looks better to put - the repositories first, followed by uuids that were not matched - to a repository. -}-drawMap :: [Git.Repo] -> M.Map UUID String -> [UUID] -> String-drawMap rs umap ts = Dot.graph $ repos ++ trusted ++ others+drawMap :: [Git.Repo] -> TrustMap -> M.Map UUID String -> String+drawMap rs trustmap umap = Dot.graph $ repos ++ others where- repos = map (node umap rs) rs- ruuids = ts ++ map getUncachedUUID rs- others = map (unreachable . uuidnode) $+ repos = map (node umap rs trustmap) rs+ ruuids = map getUncachedUUID rs+ others = map uuidnode $ + filter (\u -> M.lookup u trustmap /= Just DeadTrusted) $ filter (`notElem` ruuids) (M.keys umap)- trusted = map (trustworthy . uuidnode) ts- uuidnode u = Dot.graphNode (fromUUID u) $ M.findWithDefault "" u umap+ uuidnode u = trustDecorate trustmap u $+ Dot.graphNode (fromUUID u) $ M.findWithDefault "" u umap+ ts = M.keys (M.filter (== Trusted) trustmap) hostname :: Git.Repo -> String hostname r@@ -100,15 +103,13 @@ UUID u -> u {- A node representing a repo. -}-node :: M.Map UUID String -> [Git.Repo] -> Git.Repo -> String-node umap fullinfo r = unlines $ n:edges+node :: M.Map UUID String -> [Git.Repo] -> TrustMap -> Git.Repo -> String+node umap fullinfo trustmap r = unlines $ n:edges where n = Dot.subGraph (hostname r) (basehostname r) "lightblue" $- decorate $ Dot.graphNode (nodeId r) (repoName umap r)+ trustDecorate trustmap (getUncachedUUID r) $+ Dot.graphNode (nodeId r) (repoName umap r) edges = map (edge umap fullinfo r) (Git.remotes r)- decorate- | Git.config r == M.empty = unreachable- | otherwise = reachable {- An edge between two repos. The second repo is a remote of the first. -} edge :: M.Map UUID String -> [Git.Repo] -> Git.Repo -> Git.Repo -> String @@ -129,12 +130,13 @@ | n `elem` [repoName umap fullto, hostname fullto] = Nothing | otherwise = Just n -unreachable :: String -> String-unreachable = Dot.fillColor "red"-reachable :: String -> String-reachable = Dot.fillColor "white"-trustworthy :: String -> String-trustworthy = Dot.fillColor "green"+trustDecorate :: TrustMap -> UUID -> String -> String+trustDecorate trustmap u s = case M.lookup u trustmap of+ Just Trusted -> Dot.fillColor "green" s+ Just UnTrusted -> Dot.fillColor "red" s+ Just SemiTrusted -> Dot.fillColor "white" s+ Just DeadTrusted -> Dot.fillColor "grey" s+ Nothing -> Dot.fillColor "white" s {- Recursively searches out remotes starting with the specified repo. -} spider :: Git.Repo -> Annex [Git.Repo]
Command/Smudge.hs view
@@ -73,8 +73,13 @@ if isJust (parseLinkOrPointer b) then liftIO $ B.hPut stdout b else ifM (shouldAnnex file)- ( liftIO . emitPointer- =<< go =<< ingest =<< lockDown cfg file+ ( do+ -- Even though we ingest the actual file,+ -- and not stdin, we need to consume all+ -- stdin, or git will get annoyed.+ B.length b `seq` return ()+ liftIO . emitPointer+ =<< go =<< ingest =<< lockDown cfg file , liftIO $ B.hPut stdout b ) stop
Command/Version.hs view
@@ -16,6 +16,8 @@ import qualified Remote import qualified Backend +import System.Info+ cmd :: Command cmd = dontCheck repoExists $ noCommit $ noRepo (seekNoRepo <$$> optParser) $ @@ -53,6 +55,8 @@ unwords supportedVersions vinfo "upgrade supported from repository versions" $ unwords upgradableVersions+ vinfo "operating system" $+ unwords [os, arch] showPackageVersion :: IO () showPackageVersion = do
Common.hs view
@@ -14,7 +14,6 @@ import Data.Default as X import System.FilePath as X-import System.Directory as X import System.IO as X hiding (FilePath) #ifndef mingw32_HOST_OS import System.Posix.IO as X hiding (createPipe)
Creds.hs view
@@ -94,7 +94,7 @@ Nothing -> return Nothing fromenccreds enccreds cipher storablecipher = do cmd <- gpgCmd <$> Annex.getGitConfig- mcreds <- liftIO $ catchMaybeIO $ decrypt cmd cipher+ mcreds <- liftIO $ catchMaybeIO $ decrypt cmd (getGpgDecParams c) cipher (feedBytes $ L.pack $ fromB64 enccreds) (readBytes $ return . L.unpack) case mcreds of
Crypto.hs view
@@ -18,8 +18,8 @@ StorableCipher(..), genEncryptedCipher, genSharedCipher,- updateEncryptedCipher,- describeCipher,+ genSharedPubKeyCipher,+ updateCipherKeyIds, decryptCipher, encryptKey, isEncKey,@@ -29,6 +29,7 @@ encrypt, decrypt, getGpgEncParams,+ getGpgDecParams, prop_HmacSha1WithCipher_sane ) where@@ -73,7 +74,7 @@ cipherMac (MacOnlyCipher c) = c {- Creates a new Cipher, encrypted to the specified key id. -}-genEncryptedCipher :: Gpg.GpgCmd -> String -> EncryptedCipherVariant -> Bool -> IO StorableCipher+genEncryptedCipher :: Gpg.GpgCmd -> Gpg.KeyId -> EncryptedCipherVariant -> Bool -> IO StorableCipher genEncryptedCipher cmd keyid variant highQuality = do ks <- Gpg.findPubKeys cmd keyid random <- Gpg.genRandom cmd highQuality size@@ -88,35 +89,40 @@ genSharedCipher cmd highQuality = SharedCipher <$> Gpg.genRandom cmd highQuality cipherSize -{- Updates an existing Cipher, re-encrypting it to add or remove keyids,- - depending on whether the first component is True or False. -}-updateEncryptedCipher :: Gpg.GpgCmd -> [(Bool, String)] -> StorableCipher -> IO StorableCipher-updateEncryptedCipher _ _ SharedCipher{} = error "Cannot update shared cipher"-updateEncryptedCipher _ [] encipher = return encipher-updateEncryptedCipher cmd newkeys encipher@(EncryptedCipher _ variant (KeyIds ks)) = do- dropKeys <- listKeyIds [ k | (False, k) <- newkeys ]- forM_ dropKeys $ \k -> unless (k `elem` ks) $+{- Creates a new, shared Cipher, and looks up the gpg public key that will+ - be used for encrypting content. -}+genSharedPubKeyCipher :: Gpg.GpgCmd -> Gpg.KeyId -> Bool -> IO StorableCipher+genSharedPubKeyCipher cmd keyid highQuality = do+ ks <- Gpg.findPubKeys cmd keyid+ random <- Gpg.genRandom cmd highQuality cipherSize+ return $ SharedPubKeyCipher random ks++{- Updates an existing Cipher, making changes to its keyids.+ -+ - When the Cipher is encrypted, re-encrypts it. -}+updateCipherKeyIds :: Gpg.GpgCmd -> [(Bool, Gpg.KeyId)] -> StorableCipher -> IO StorableCipher+updateCipherKeyIds _ _ SharedCipher{} = error "Cannot update shared cipher"+updateCipherKeyIds _ [] c = return c+updateCipherKeyIds cmd changes encipher@(EncryptedCipher _ variant ks) = do+ ks' <- updateCipherKeyIds' cmd changes ks+ cipher <- decryptCipher cmd encipher+ encryptCipher cmd cipher variant ks'+updateCipherKeyIds cmd changes (SharedPubKeyCipher cipher ks) =+ SharedPubKeyCipher cipher <$> updateCipherKeyIds' cmd changes ks++updateCipherKeyIds' :: Gpg.GpgCmd -> [(Bool, Gpg.KeyId)] -> KeyIds -> IO KeyIds+updateCipherKeyIds' cmd changes (KeyIds ks) = do+ dropkeys <- listKeyIds [ k | (False, k) <- changes ]+ forM_ dropkeys $ \k -> unless (k `elem` ks) $ error $ "Key " ++ k ++ " was not present; cannot remove."- addKeys <- listKeyIds [ k | (True, k) <- newkeys ]- let ks' = (addKeys ++ ks) \\ dropKeys+ addkeys <- listKeyIds [ k | (True, k) <- changes ]+ let ks' = (addkeys ++ ks) \\ dropkeys when (null ks') $ error "Cannot remove the last key."- cipher <- decryptCipher cmd encipher- encryptCipher cmd cipher variant $ KeyIds ks'+ return $ KeyIds ks' where listKeyIds = concat <$$> mapM (keyIds <$$> Gpg.findPubKeys cmd) -describeCipher :: StorableCipher -> String-describeCipher (SharedCipher _) = "shared cipher"-describeCipher (EncryptedCipher _ variant (KeyIds ks)) =- scheme ++ " with gpg " ++ keys ks ++ " " ++ unwords ks- where- scheme = case variant of- Hybrid -> "hybrid cipher"- PubKey -> "pubkey crypto"- keys [_] = "key"- keys _ = "keys"- {- Encrypts a Cipher to the specified KeyIds. -} encryptCipher :: Gpg.GpgCmd -> Cipher -> EncryptedCipherVariant -> KeyIds -> IO StorableCipher encryptCipher cmd c variant (KeyIds ks) = do@@ -133,6 +139,7 @@ {- Decrypting an EncryptedCipher is expensive; the Cipher should be cached. -} decryptCipher :: Gpg.GpgCmd -> StorableCipher -> IO Cipher decryptCipher _ (SharedCipher t) = return $ Cipher t+decryptCipher _ (SharedPubKeyCipher t _) = return $ MacOnlyCipher t decryptCipher cmd (EncryptedCipher t variant _) = mkCipher <$> Gpg.pipeStrict cmd [ Param "--decrypt" ] t where@@ -184,10 +191,12 @@ {- Runs a Feeder action, that generates content that is decrypted with the - Cipher (or using a private key if the Cipher is empty), and read by the - Reader action. -}-decrypt :: (MonadIO m, MonadMask m) => Gpg.GpgCmd -> Cipher -> Feeder -> Reader m a -> m a-decrypt cmd cipher = case cipher of- Cipher{} -> Gpg.feedRead cmd [Param "--decrypt"] $ cipherPassphrase cipher- MacOnlyCipher{} -> Gpg.pipeLazy cmd [Param "--decrypt"]+decrypt :: (MonadIO m, MonadMask m) => Gpg.GpgCmd -> [CommandParam] -> Cipher -> Feeder -> Reader m a -> m a+decrypt cmd params cipher = case cipher of+ Cipher{} -> Gpg.feedRead cmd params' $ cipherPassphrase cipher+ MacOnlyCipher{} -> Gpg.pipeLazy cmd params'+ where+ params' = Param "--decrypt" : params macWithCipher :: Mac -> Cipher -> String -> String macWithCipher mac c = macWithCipher' mac (cipherMac c)@@ -200,26 +209,31 @@ where known_good = "46b4ec586117154dacd49d664e5d63fdc88efb51" -{- Return some options suitable for GnuPG encryption, symmetric or not. -}-class LensGpgEncParams a where getGpgEncParams :: a -> [CommandParam]+class LensGpgEncParams a where+ {- Parameters for encrypting. -}+ getGpgEncParams :: a -> [CommandParam]+ {- Parameters for decrypting. -}+ getGpgDecParams :: a -> [CommandParam] {- Extract the GnuPG options from a pair of a Remote Config and a Remote - Git Config. -} instance LensGpgEncParams (RemoteConfig, RemoteGitConfig) where getGpgEncParams (c,gc) = map Param (remoteAnnexGnupgOptions gc) ++ getGpgEncParams c- where+ getGpgDecParams (c,gc) = map Param (remoteAnnexGnupgDecryptOptions gc) ++ getGpgDecParams c {- Extract the GnuPG options from a Remote Config, ignoring any - git config settings. (Which is ok if the remote is just being set up - - and so doesn't have any.)- -- - If the remote is configured to use public-key encryption,- - look up the recipient keys and add them to the option list.-}+ - and so doesn't have any.) -} instance LensGpgEncParams RemoteConfig where+ {- If the remote is configured to use public-key encryption,+ - look up the recipient keys and add them to the option list. -} getGpgEncParams c = case M.lookup "encryption" c of Just "pubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $ M.lookup "cipherkeys" c+ Just "sharedpubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $ M.lookup "pubkeys" c _ -> []+ getGpgDecParams _ = [] {- Extract the GnuPG options from a Remote. -} instance LensGpgEncParams (RemoteA a) where getGpgEncParams r = getGpgEncParams (config r, gitconfig r)+ getGpgDecParams r = getGpgDecParams (config r, gitconfig r)
Git.hs view
@@ -26,6 +26,7 @@ repoDescribe, repoLocation, repoPath,+ repoWorkTree, localGitDir, attributes, attributesLocal,@@ -72,6 +73,10 @@ repoPath Repo { location = Local { gitdir = d } } = d repoPath Repo { location = LocalUnknown dir } = dir repoPath Repo { location = Unknown } = error "unknown repoPath"++repoWorkTree :: Repo -> Maybe FilePath+repoWorkTree Repo { location = Local { worktree = Just d } } = Just d+repoWorkTree _ = Nothing {- Path to a local repository's .git directory. -} localGitDir :: Repo -> FilePath
Git/Env.hs view
@@ -9,12 +9,10 @@ module Git.Env where +import Common import Git import Git.Types import Utility.Env-#ifdef __ANDROID__-import Common-#endif {- Adjusts the gitEnv of a Repo. Copies the system environment if the repo - does not have any gitEnv yet. -}@@ -40,6 +38,16 @@ addGitEnv :: Repo -> String -> String -> IO Repo addGitEnv g var val = adjustGitEnv g (addEntry var val)++{- Environment variables to use when running a command.+ - Includes GIT_DIR pointing at the repo, and GIT_WORK_TREE when the repo+ - is not bare. Also includes anything added to the Repo's gitEnv,+ - and a copy of the rest of the system environment. -}+propGitEnv :: Repo -> IO [(String, String)]+propGitEnv g = do+ g' <- addGitEnv g "GIT_DIR" (localGitDir g)+ g'' <- maybe (pure g') (addGitEnv g' "GIT_WORK_TREE") (repoWorkTree g)+ return $ fromMaybe [] (gitEnv g'') {- Use with any action that makes a commit to set metadata. -} commitWithMetaData :: CommitMetaData -> CommitMetaData -> (Repo -> IO a) -> Repo -> IO a
Git/Tree.hs view
@@ -117,9 +117,9 @@ treeItemsToTree :: [TreeItem] -> Tree treeItemsToTree = go M.empty where- go m [] = Tree $ filter (notElem '/' . gitPath) (M.elems m)+ go m [] = Tree $ filter inTopTree (M.elems m) go m (i:is)- | '/' `notElem` p =+ | inTopTree p = go (M.insert p (treeItemToTreeContent i) m) is | otherwise = case M.lookup idir m of Just (NewSubTree d l) ->@@ -132,7 +132,7 @@ c = treeItemToTreeContent i addsubtree d m t- | elem '/' d = + | not (inTopTree d) = let m' = M.insert d t m in case M.lookup parent m' of Just (NewSubTree d' l) ->@@ -202,8 +202,8 @@ addunderhere' <- liftIO $ mapM (recordSubTree h) addunderhere return (addunderhere'++l') - removeset = S.fromList removefiles- removed (TreeBlob f _ _) = S.member f removeset+ removeset = S.fromList $ map (normalise . gitPath) removefiles+ removed (TreeBlob f _ _) = S.member (normalise (gitPath f)) removeset removed _ = False {- Assumes the list is ordered, with tree objects coming right before their@@ -256,7 +256,7 @@ inTree t f = gitPath t == takeDirectory (gitPath f) beneathSubTree :: (GitPath t, GitPath f) => t -> f -> Bool-beneathSubTree t f = prefix `isPrefixOf` gitPath f+beneathSubTree t f = prefix `isPrefixOf` normalise (gitPath f) where tp = gitPath t- prefix = if null tp then tp else tp ++ "/"+ prefix = if null tp then tp else addTrailingPathSeparator (normalise tp)
Remote/External.hs view
@@ -16,6 +16,7 @@ import qualified Git import Config import Git.Config (isTrue, boolConfig)+import Git.Env import Remote.Helper.Special import Remote.Helper.ReadOnly import Remote.Helper.Messages@@ -227,6 +228,8 @@ maybe noop (\a -> liftIO $ a bytesprocessed) mp handleRemoteRequest (DIRHASH k) = send $ VALUE $ hashDirMixed def k+ handleRemoteRequest (DIRHASH_LOWER k) = + send $ VALUE $ hashDirLower def k handleRemoteRequest (SETCONFIG setting value) = liftIO $ atomically $ do let v = externalConfig external@@ -367,7 +370,9 @@ startExternal :: ExternalType -> Annex ExternalState startExternal externaltype = do errrelayer <- mkStderrRelayer+ g <- Annex.gitRepo liftIO $ do+ p <- propgit g cmdp (Just hin, Just hout, Just herr, pid) <- createProcess p `catchIO` runerr fileEncoding hin@@ -385,11 +390,14 @@ } where cmd = externalRemoteProgram externaltype- p = (proc cmd [])+ cmdp = (proc cmd []) { std_in = CreatePipe , std_out = CreatePipe , std_err = CreatePipe }+ propgit g p = do+ environ <- propGitEnv g+ return $ p { env = Just environ } runerr _ = error ("Cannot run " ++ cmd ++ " -- Make sure it's in your PATH and is executable.")
Remote/External/Types.hs view
@@ -176,6 +176,7 @@ = VERSION ProtocolVersion | PROGRESS BytesProcessed | DIRHASH Key+ | DIRHASH_LOWER Key | SETCONFIG Setting String | GETCONFIG Setting | SETCREDS Setting String String@@ -198,6 +199,7 @@ parseCommand "VERSION" = Proto.parse1 VERSION parseCommand "PROGRESS" = Proto.parse1 PROGRESS parseCommand "DIRHASH" = Proto.parse1 DIRHASH+ parseCommand "DIRHASH-LOWER" = Proto.parse1 DIRHASH_LOWER parseCommand "SETCONFIG" = Proto.parse2 SETCONFIG parseCommand "GETCONFIG" = Proto.parse1 GETCONFIG parseCommand "SETCREDS" = Proto.parse3 SETCREDS
Remote/GCrypt.hs view
@@ -297,9 +297,9 @@ setGcryptEncryption :: RemoteConfig -> String -> Annex () setGcryptEncryption c remotename = do let participants = remoteconfig Git.GCrypt.remoteParticipantConfigKey- case extractCipher c of+ case cipherKeyIds =<< extractCipher c of Nothing -> noCrypto- Just (EncryptedCipher _ _ (KeyIds { keyIds = ks})) -> do+ Just (KeyIds { keyIds = ks}) -> do setConfig participants (unwords ks) let signingkey = ConfigKey $ Git.GCrypt.remoteSigningKey remotename cmd <- gpgCmd <$> Annex.getGitConfig@@ -307,8 +307,6 @@ case filter (`elem` ks) skeys of [] -> noop (k:_) -> setConfig signingkey k- Just (SharedCipher _) ->- unsetConfig participants setConfig (remoteconfig Git.GCrypt.remotePublishParticipantConfigKey) (Git.Config.boolConfig True) where
Remote/Git.hs view
@@ -233,14 +233,17 @@ hClose h let url = Git.repoLocation r ++ "/config" ifM (Url.downloadQuiet url tmpfile uo)- ( pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]- , return $ Left $ error $ "unable to load config from " ++ url+ ( Just <$> pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]+ , return Nothing ) case v of- Left _ -> do+ Nothing -> do+ warning $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r+ return r+ Just (Left _) -> do set_ignore "not usable by git-annex" False return r- Right r' -> do+ Just (Right r') -> do -- Cache when http remote is not bare for -- optimisation. unless (Git.Config.isBare r') $
Remote/Helper/Encryptable.hs view
@@ -14,7 +14,6 @@ remoteCipher', embedCreds, cipherKey,- storeCipher, extractCipher, describeEncryption, ) where@@ -58,20 +57,18 @@ encryption = M.lookup "encryption" c -- Generate a new cipher, depending on the chosen encryption scheme genCipher cmd = case encryption of- _ | M.member "cipher" c || M.member "cipherkeys" c -> cannotchange+ _ | M.member "cipher" c || M.member "cipherkeys" c || M.member "pubkeys" c -> cannotchange Just "none" -> return (c, NoEncryption)- Just "shared" -> use "encryption setup" . genSharedCipher cmd- =<< highRandomQuality+ Just "shared" -> encsetup $ genSharedCipher cmd -- hybrid encryption is the default when a keyid is -- specified but no encryption _ | maybe (M.member "keyid" c) (== "hybrid") encryption ->- use "encryption setup" . genEncryptedCipher cmd key Hybrid- =<< highRandomQuality- Just "pubkey" -> use "encryption setup" . genEncryptedCipher cmd key PubKey- =<< highRandomQuality+ encsetup $ genEncryptedCipher cmd key Hybrid+ Just "pubkey" -> encsetup $ genEncryptedCipher cmd key PubKey+ Just "sharedpubkey" -> encsetup $ genSharedPubKeyCipher cmd key _ -> error $ "Specify " ++ intercalate " or " (map ("encryption=" ++)- ["none","shared","hybrid","pubkey"])+ ["none","shared","hybrid","pubkey", "sharedpubkey"]) ++ "." key = fromMaybe (error "Specifiy keyid=...") $ M.lookup "keyid" c newkeys = maybe [] (\k -> [(True,k)]) (M.lookup "keyid+" c) ++@@ -82,13 +79,16 @@ SharedCipher _ | maybe True (== "shared") encryption -> return (c', EncryptionIsSetup) EncryptedCipher _ variant _ | maybe True (== if variant == Hybrid then "hybrid" else "pubkey") encryption ->- use "encryption update" $ updateEncryptedCipher cmd newkeys v+ use "encryption update" $ updateCipherKeyIds cmd newkeys v+ SharedPubKeyCipher _ _ ->+ use "encryption update" $ updateCipherKeyIds cmd newkeys v _ -> cannotchange+ encsetup a = use "encryption setup" . a =<< highRandomQuality use m a = do showNote m cipher <- liftIO a- showNote $ describeCipher cipher- return (storeCipher c' cipher, EncryptionIsSetup)+ mapM_ showNote (describeCipher cipher)+ return (storeCipher cipher c', EncryptionIsSetup) highRandomQuality = (&&) (maybe True ( /= "false") $ M.lookup "highRandomQuality" c) <$> fmap not (Annex.getState Annex.fast)@@ -123,8 +123,8 @@ - embedcreds=yes allows this, and embedcreds=no prevents it. - - If not set, the default is to only store creds when it's surely safe:- - When gpg encryption is used, in which case the creds will be encrypted- - using it. Not when a shared cipher is used.+ - When gpg encryption is used and the creds are encrypted using it.+ - Not when a shared cipher is used. -} embedCreds :: RemoteConfig -> Bool embedCreds c@@ -141,22 +141,26 @@ mac = fromMaybe defaultMac $ M.lookup "mac" c >>= readMac {- Stores an StorableCipher in a remote's configuration. -}-storeCipher :: RemoteConfig -> StorableCipher -> RemoteConfig-storeCipher c (SharedCipher t) = M.insert "cipher" (toB64bs t) c-storeCipher c (EncryptedCipher t _ ks) =- M.insert "cipher" (toB64bs t) $ M.insert "cipherkeys" (showkeys ks) c+storeCipher :: StorableCipher -> RemoteConfig -> RemoteConfig+storeCipher cip = case cip of+ (SharedCipher t) -> addcipher t+ (EncryptedCipher t _ ks) -> addcipher t . storekeys ks "cipherkeys"+ (SharedPubKeyCipher t ks) -> addcipher t . storekeys ks "pubkeys" where- showkeys (KeyIds l) = intercalate "," l+ addcipher t = M.insert "cipher" (toB64bs t)+ storekeys (KeyIds l) n = M.insert n (intercalate "," l) {- Extracts an StorableCipher from a remote's configuration. -} extractCipher :: RemoteConfig -> Maybe StorableCipher extractCipher c = case (M.lookup "cipher" c,- M.lookup "cipherkeys" c,+ M.lookup "cipherkeys" c <|> M.lookup "pubkeys" c, M.lookup "encryption" c) of (Just t, Just ks, encryption) | maybe True (== "hybrid") encryption -> Just $ EncryptedCipher (fromB64bs t) Hybrid (readkeys ks) (Just t, Just ks, Just "pubkey") -> Just $ EncryptedCipher (fromB64bs t) PubKey (readkeys ks)+ (Just t, Just ks, Just "sharedpubkey") ->+ Just $ SharedPubKeyCipher (fromB64bs t) (readkeys ks) (Just t, Nothing, encryption) | maybe True (== "shared") encryption -> Just $ SharedCipher (fromB64bs t) _ -> Nothing@@ -166,14 +170,25 @@ describeEncryption :: RemoteConfig -> String describeEncryption c = case extractCipher c of Nothing -> "not encrypted"- (Just (SharedCipher _)) -> "encrypted (encryption key stored in git repository)"- (Just (EncryptedCipher _ v (KeyIds { keyIds = ks }))) -> unwords $ catMaybes- [ Just "encrypted (to gpg keys:"- , Just (unwords ks ++ ")")+ Just cip -> "encrypted " ++ unwords (map paren (describeCipher cip))+ where+ paren s = "(" ++ s ++ ")"++describeCipher :: StorableCipher -> [String]+describeCipher c = case c of+ (SharedCipher _) -> ["encryption key stored in git repository"]+ (EncryptedCipher _ v ks) -> catMaybes+ [ Just $ showkeys ks , case v of PubKey -> Nothing- Hybrid -> Just "(hybrid mode)"+ Hybrid -> Just "hybrid mode" ]+ (SharedPubKeyCipher _ ks) ->+ [ showkeys ks+ , "shared cipher"+ ]+ where+ showkeys (KeyIds { keyIds = ks }) = "to gpg keys: " ++ unwords ks {- Not using Utility.Base64 because these "Strings" are really - bags of bytes and that would convert to unicode and not round-trip
Remote/Helper/Special.hs view
@@ -178,7 +178,8 @@ } cip = cipherKey c isencrypted = isJust (extractCipher c)- gpgopts = getGpgEncParams encr+ gpgencopts = getGpgEncParams encr+ gpgdecopts = getGpgDecParams encr safely a = catchNonAsync a (\e -> warning (show e) >> return False) @@ -200,7 +201,7 @@ storechunk (Just (cipher, enck)) storer k content p = do cmd <- gpgCmd <$> Annex.getGitConfig withBytes content $ \b ->- encrypt cmd gpgopts cipher (feedBytes b) $+ encrypt cmd gpgencopts cipher (feedBytes b) $ readBytes $ \encb -> storer (enck k) (ByteContent encb) p @@ -210,7 +211,7 @@ where go (Just retriever) = displayprogress p k $ \p' -> retrieveChunks retriever (uuid baser) chunkconfig- enck k dest p' (sink dest enc)+ enck k dest p' (sink dest enc gpgdecopts) go Nothing = return False enck = maybe id snd enc @@ -245,23 +246,24 @@ sink :: FilePath -> Maybe (Cipher, EncKey)+ -> [CommandParam] -> Maybe Handle -> Maybe MeterUpdate -> ContentSource -> Annex Bool-sink dest enc mh mp content = do+sink dest enc gpgdecopts mh mp content = do case (enc, mh, content) of (Nothing, Nothing, FileContent f) | f == dest -> noop | otherwise -> liftIO $ moveFile f dest (Just (cipher, _), _, ByteContent b) -> do cmd <- gpgCmd <$> Annex.getGitConfig- decrypt cmd cipher (feedBytes b) $+ decrypt cmd gpgdecopts cipher (feedBytes b) $ readBytes write (Just (cipher, _), _, FileContent f) -> do cmd <- gpgCmd <$> Annex.getGitConfig withBytes content $ \b ->- decrypt cmd cipher (feedBytes b) $+ decrypt cmd gpgdecopts cipher (feedBytes b) $ readBytes write liftIO $ nukeFile f (Nothing, _, FileContent f) -> do
Remote/S3.hs view
@@ -604,7 +604,7 @@ [ Just ("bucket", fromMaybe "unknown" (getBucketName c)) , Just ("endpoint", w82s (S.unpack (S3.s3Endpoint s3c))) , Just ("port", show (S3.s3Port s3c))- , Just ("storage class", show (getStorageClass c))+ , Just ("storage class", showstorageclass (getStorageClass c)) , if configIA c then Just ("internet archive item", iaItemUrl $ fromMaybe "unknown" $ getBucketName c) else Nothing@@ -613,6 +613,10 @@ ] where s3c = s3Configuration c+#if MIN_VERSION_aws(0,13,0)+ showstorageclass (S3.OtherStorageClass t) = T.unpack t+#endif+ showstorageclass sc = show sc getWebUrls :: S3Info -> Key -> Annex [URLString] getWebUrls info k = case (public info, getpublicurl info) of
Setup.hs view
@@ -15,6 +15,7 @@ import System.Directory import Data.List import Control.Exception+import qualified System.Info import qualified Build.DesktopFile as DesktopFile import qualified Build.Configure as Configure@@ -28,7 +29,7 @@ } myPostCopy :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO ()-myPostCopy _ flags pkg lbi = do+myPostCopy _ flags pkg lbi = when (System.Info.os /= "mingw32") $ do installGitAnnexShell dest verbosity pkg lbi installManpages dest verbosity pkg lbi installDesktopFile dest verbosity pkg lbi
Types/Crypto.hs view
@@ -10,6 +10,7 @@ StorableCipher(..), EncryptedCipherVariant(..), KeyIds(..),+ cipherKeyIds, Mac(..), readMac, showMac,@@ -23,11 +24,18 @@ -- XXX ideally, this would be a locked memory region data Cipher = Cipher String | MacOnlyCipher String -data StorableCipher = EncryptedCipher String EncryptedCipherVariant KeyIds- | SharedCipher String+data StorableCipher+ = EncryptedCipher String EncryptedCipherVariant KeyIds+ | SharedCipher String+ | SharedPubKeyCipher String KeyIds deriving (Ord, Eq) data EncryptedCipherVariant = Hybrid | PubKey deriving (Ord, Eq)++cipherKeyIds :: StorableCipher -> Maybe KeyIds+cipherKeyIds (EncryptedCipher _ _ ks) = Just ks+cipherKeyIds (SharedPubKeyCipher _ ks) = Just ks+cipherKeyIds (SharedCipher _) = Nothing defaultMac :: Mac defaultMac = HmacSha1
Types/GitConfig.hs view
@@ -162,6 +162,7 @@ , remoteAnnexRsyncDownloadOptions :: [String] , remoteAnnexRsyncTransport :: [String] , remoteAnnexGnupgOptions :: [String]+ , remoteAnnexGnupgDecryptOptions :: [String] , remoteAnnexRsyncUrl :: Maybe String , remoteAnnexBupRepo :: Maybe String , remoteAnnexTahoe :: Maybe FilePath@@ -196,6 +197,7 @@ , remoteAnnexRsyncUploadOptions = getoptions "rsync-upload-options" , remoteAnnexRsyncTransport = getoptions "rsync-transport" , remoteAnnexGnupgOptions = getoptions "gnupg-options"+ , remoteAnnexGnupgDecryptOptions = getoptions "gnupg-decrypt-options" , remoteAnnexRsyncUrl = notempty $ getmaybe "rsyncurl" , remoteAnnexBupRepo = getmaybe "buprepo" , remoteAnnexTahoe = getmaybe "tahoe"
Utility/Directory.hs view
@@ -6,12 +6,15 @@ -} {-# LANGUAGE CPP #-}-{-# OPTIONS_GHC -fno-warn-tabs #-}+{-# OPTIONS_GHC -fno-warn-tabs -w #-} -module Utility.Directory where+module Utility.Directory (+ module Utility.Directory,+ module System.Directory+) where import System.IO.Error-import System.Directory+import System.Directory hiding (isSymbolicLink) import Control.Monad import System.FilePath import Control.Applicative
Utility/FreeDesktop.hs view
@@ -33,9 +33,9 @@ import Utility.UserInfo import Utility.Process import Utility.PartialPrelude+import Utility.Directory import System.Environment-import System.Directory import System.FilePath import Data.List import Data.String.Utils
Utility/LinuxMkLibs.hs view
@@ -14,7 +14,6 @@ import Utility.Path import Data.Maybe-import System.Directory import System.FilePath import Data.List.Utils import System.Posix.Files
Utility/LockFile/PidLock.hs view
@@ -34,7 +34,6 @@ import Network.BSD import System.FilePath import Data.Hash.MD5-import System.Directory import Control.Applicative import Prelude
Utility/Path.hs view
@@ -12,7 +12,6 @@ import Data.String.Utils import System.FilePath-import System.Directory import Data.List import Data.Maybe import Data.Char@@ -29,6 +28,7 @@ import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo+import Utility.Directory {- Simplifies a path, removing any "." component, collapsing "dir/..", - and removing the trailing path separator.
Utility/Tmp.hs view
@@ -11,9 +11,9 @@ module Utility.Tmp where import System.IO-import System.Directory import Control.Monad.IfElse import System.FilePath+import System.Directory import Control.Monad.IO.Class #ifndef mingw32_HOST_OS import System.Posix.Temp (mkdtemp)
debian/changelog view
@@ -1,9 +1,46 @@+git-annex (6.20160511) unstable; urgency=medium++ * Fix bug that sometimes prevented git-annex smudge --clean from consuming+ all its input, which resulted in git add bypassing git-annex.+ * Fix build with directory-1.2.6.2.+ * Improve behavior when a just added http remote is not available+ during uuid probe. Do not mark it as annex-ignore, so it will be tried+ again later.+ * Android: Icon refresh.+ Thanks, freewheelinfranks.+ * Added DIRHASH-LOWER to external special remote protocol.+ * git-annex.cabal: Add Setup-Depends.+ * stack.yaml: Enable explicit-setup-deps.+ * Windows: Fix several bugs in propigation of changes from the adjusted+ branch back to the master branch.+ * Windows: Fix an over-long temp directory name.+ * map: Hide dead repositories that are not connected to the graph.+ * map: Changed colors; red is used for untrusted repositories and grey+ for dead.+ * version: Display OS version and architecture too.+ * Propigate GIT_DIR and GIT_WORK_TREE environment to external special+ remotes.+ * Added annex.gnupg-decrypt-options and+ remote.<name>.annex-gnupg-decrypt-options, which are passed to gpg+ when it's decrypting data.+ * fsck: When a key is not previously known in the location log,+ record something so that reinject --known will work.+ * In the unusual configuration where annex.crippledfilesystem=true but+ core.symlinks=true, store object contents in mixed case hash+ directories so that symlinks will point to them.+ * Added new encryption=sharedpubkey mode for special remotes.+ This is useful for makking a special remote that anyone with a clone+ of the repo and your public keys can upload files to, but only you can+ decrypt the files stored in it.++ -- Joey Hess <id@joeyh.name> Wed, 11 May 2016 12:41:42 -0400+ git-annex (6.20160419) unstable; urgency=medium * Fix bug that prevented resuming of uploads to encrypted special remotes that used chunking.- * That bug could also expose the names of keys to such remotes when- attempting to resume an upload, so it is a minor security issue.+ * That bug could also expose the names of keys to such remotes, so it is a+ minor security issue. * Fix duplicate progress meter display when downloading from a git remote over http with -J. * reinject: When src file's content cannot be verified, leave it alone,
doc/bugs/Android_chroot_stuck_in_Cabal_hell.mdwn view
@@ -18,3 +18,5 @@ Makefile:225: recipe for target 'android' failed make: *** [android] Error 1 """]]++> [[fixed|done]] --[[Joey]]
+ doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn view
@@ -0,0 +1,104 @@+### Please describe the problem.+Git-annex with v6 repo causes weird file creation behavior.++### What steps will reproduce the problem?+On central repo:+ git init --bare central6+ cd central6+ git annex init origin+ git annex upgrade+On Client A+ git clone {central6 repo path/URI}+ cd central6+ git annex init clientA6+ git annex upgrade+On Client B+ git clone {central6 repo path/URI}+ cd central6+ git annex init clientB6+ git annex upgrade+Start assistant on both clients.+Start webapp on both clients.+Add files to both clients.+Wait for assistant to sync new files.+Force sync with webapp on both clients ++At this point examine files coming from the central repo on the non-originating client. I see:+Client A originated file:+-rw-rw-r--. 1 user group 92528731 May 10 20:16 image.png+Client B created file:+-rw-rw-r--. 1 user group 103 May 10 20:21 image.png++Here's the content of Client B's file:+/annex/objects/SHA256E-s92528731--098928032fddbd0327c1d608249a133e276a00b8aa8bffca371bd32bded49777.png++### What version of git-annex are you using? On what operating system?+Linux (Fedora 23/CentOS 7)+[[!format sh """+git-annex version: 6.20160428-g1f253e8+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV Inotify DBus DesktopNotify XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external+local repository version: 6+supported repository versions: 5 6+upgrade supported from repository versions: 0 1 2 4 5+"""]]++### Please provide any additional information below.++[[!format sh """+# Client B+[2016-05-10 20:09:51.879642] main: starting assistant version 6.20160428-g1f253e8+[2016-05-10 20:09:52.127709] Cronner: You should enable consistency checking to protect your data. +[2016-05-10 20:09:57.340186] TransferScanner: Syncing with origin +(scanning...) [2016-05-10 20:09:58.182781] Watcher: Performing startup scan+(started...) ++merge: refs/remotes/origin/master - not something we can merge++merge: refs/remotes/origin/synced/master - not something we can merge+gpg: Signature made Thu 28 Apr 2016 10:44:48 AM EDT using DSA key ID 89C809CB+gpg: /tmp/git-annex-gpg.tmpOTZtDq/trustdb.gpg: trustdb created+gpg: Good signature from "git-annex distribution signing key (for Joey Hess) <id@joeyh.name>"+gpg: WARNING: This key is not certified with a trusted signature!+gpg: There is no indication that the signature belongs to the owner.+Primary key fingerprint: 4005 5C6A FD2D 526B 2961 E78F 5EE1 DBA7 89C8 09CB+git-annex: Daemon is already running.+[2016-05-10 20:21:19.633914] main: Syncing with origin +From /smb/r7000/USB_Storage/tmp/git-annex/central6+ 7f1d48c..3e6f240 git-annex -> origin/git-annex+ * [new branch] master -> origin/master+ * [new branch] synced/git-annex -> origin/synced/git-annex+ * [new branch] synced/master -> origin/synced/master+(merging origin/git-annex into git-annex...)+(recording state in git...)++Already up-to-date.+[2016-05-10 20:21:23.337732] Pusher: Syncing with origin +To /smb/r7000/USB_Storage/tmp/git-annex/central6+ 3e6f240..358afc3 git-annex -> synced/git-annex+[2016-05-10 20:21:25.056294] Committer: Adding image.png+add image.png ok+[2016-05-10 20:21:25.543293] Committer: Committing changes to git+(recording state in git...)++SHA256E-s103--d7d52e9de4a9c7c030743825c3a1ca072062e4ccadefcf1eb34be3004360b9b2.png+ 103 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1)+(checksum...) [2016-05-10 20:21:27.240904] Transferrer: Uploaded image.png+[2016-05-10 20:21:27.787233] Pusher: Syncing with origin +[2016-05-10 20:21:28.12119] Committer: Adding image.png+(recording state in git...)+add image.png ok+[2016-05-10 20:21:28.696135] Committer: Committing changes to git+(recording state in git...)+To /smb/r7000/USB_Storage/tmp/git-annex/central6+ 358afc3..e3ef364 git-annex -> synced/git-annex+ 15d9319..976e99f master -> synced/master+[2016-05-10 20:21:32.584488] Pusher: Syncing with origin +Everything up-to-date++# End of transcript or log.+"""]]++### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)+It seems to work really well on v5, but the file "corruption" is difficult to recover from.
+ doc/bugs/annex.gnupg-options_not_used_by_assistant.mdwn view
@@ -0,0 +1,81 @@+### Please describe the problem.++I am using annex with a gcrypt encrypted repository but I am not able to sync content to the remote share via Webapp. If I sync via command line everything is working as expected but via Webapp I receive several error messages complaining about tty not available.++As I workaround I changed two things:++1. /usr/local/bin/git-remote-gcrypt: As $GPG_AGENT_INFO was not set I needed to include "--no-tty" on line 377+2. Add a line in ~/.gnupg/gpg.conf with option "no-tty"++As this breaks gpg2 for use on command line I wanted to provide the --no-tty via option **annex.gnupg-options** as mentioned in the manual. Not sure what I am doing wrong but the Webapp does not pick up these options.++```+[annex]+ gnupg-options = --no-tty+```+++### What steps will reproduce the problem?++Create repository via++```sh+git annex initremote hidrive type=gcrypt gitrepo=rsync.hidrive.strato.com:/users/xxxxxx/hidrive.git chunk=5MiB keyid=XXXXXXXX+```+Launch Webapp++```sh+git annex webapp+```++Copy files to local annex directory++### What version of git-annex are you using? On what operating system?++OSX 10.11.4++gpg (GnuPG) 2.0.30+libgcrypt 1.7.0+Copyright (C) 2015 Free Software Foundation, Inc.+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>+This is free software: you are free to change and redistribute it.+There is NO WARRANTY, to the extent permitted by law.++Home: ~/.gnupg+Supported algorithms:+Pubkey: RSA, RSA, RSA, ELG, DSA+Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,+ CAMELLIA128, CAMELLIA192, CAMELLIA256+Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224+Compression: Uncompressed, ZIP, ZLIB, BZIP2+++git-annex version: 6.20160418+build flags: Assistant Webapp Pairing Testsuite WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL+remote types: git gcrypt bup directory rsync web bittorrent webdav tahoe glacier ddar hook external+local repository version: 6+supported repository versions: 5 6+upgrade supported from repository versions: 0 1 2 4 5+++### Please provide any additional information below.++[[!format sh """++[2016-05-05 15:04:31.059236] Pusher: Syncing with hidrive +(recording state in git...)+gcrypt: Development version -- Repository format MAY CHANGE+gpg: cannot open `/dev/tty': Device not configured++ user error (gpg2 ["--quiet","--trust-model","always","--decrypt"] exited 2)+gpg: cannot open `/dev/tty': Device not configured++ user error (gpg2 ["--quiet","--trust-model","always","--decrypt"] exited 2)++"""]]++### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)+++> added annex.gnupg-decrypt-options; [[done]] --[[Joey]]
+ doc/bugs/dropkey_--batch_--json_--force_is_always_succesfull.mdwn view
@@ -0,0 +1,35 @@+### Please describe the problem.++just want to check if that is "by design"... --force was demanded seem operation is dangerous, but I expected that it would still report success false if key was not actually dropped, at least if a key is a completely wrong key++so is that "by design" and I shouldn't care to check success field...?++### What version of git-annex are you using? On what operating system?+6.20160425+gitgffe2ea2-1~ndall+1++### Please provide any additional information below.++[[!format sh """++$> echo MD5E-s11--74d80f7d99b835e5189948c8d4297efd | git annex dropkey --batch --json --force+{"command":"dropkey","key":"MD5E-s11--74d80f7d99b835e5189948c8d4297efd","success":true}++$> ls -l+total 0+0 lrwxrwxrwx 1 yoh yoh 110 Apr 29 09:21 124 -> .git/annex/objects/MV/Jw/MD5E-s11--74d80f7d99b835e5189948c8d4297efd/MD5E-s11--74d80f7d99b835e5189948c8d4297efd++$> echo MD5E-s11--74d80f7d99b835e5189948c8d4297efd | git annex dropkey --batch --json --force+{"command":"dropkey","key":"MD5E-s11--74d80f7d99b835e5189948c8d4297efd","success":true}++$> echo MD5E-s11--74d80f7dsd99b835e5189948c8d4297efd | git annex dropkey --batch --json --force +{"command":"dropkey","key":"MD5E-s11--74d80f7dsd99b835e5189948c8d4297efd","success":true}++$> echo MD5E-s11--74d80f7dsd99b835e5189948c8d4297efdsdfsdf | git annex dropkey --batch --json --force +{"command":"dropkey","key":"MD5E-s11--74d80f7dsd99b835e5189948c8d4297efdsdfsdf","success":true}+++"""]]++[[!meta author=yoh]]++> [[notabug|done]] --[[Joey]]
doc/bugs/git-annex_smudge_fails_on_git_add.mdwn view
@@ -55,3 +55,5 @@ ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) No, I'm a first-time user. Thanks for this neat piece of software.++> [[fixed|done]] --[[Joey]]
doc/bugs/stack_build_Setup.hs_dependencies.mdwn view
@@ -69,3 +69,10 @@ > above error. > > --[[Joey]]++> > I've filed a bug on stack about this,+> > <https://github.com/commercialhaskell/stack/issues/2093> --[[Joey]] ++> > > Gone ahead and added it to stack.yaml, despite it causing some build+> > > failures, as it's certianly needed on many systems. [[done]]+> > > --[[Joey]]
doc/design/external_special_remote_protocol.mdwn view
@@ -230,7 +230,15 @@ * `DIRHASH Key` Gets a two level hash associated with a Key. Something like "aB/Cd". This is always the same for any given Key, so can be used for eg,- creating hash directory structures to store Keys in. + creating hash directory structures to store Keys in. This is the same+ directory hash that git-annex uses inside `.git/annex/objects/` + (git-annex replies with VALUE followed by the value.)+* `DIRHASH-LOWER Key` + Gets a two level hash associated with a Key, using only lower-case.+ Something like "abc/def".+ This is always the same for any given Key, so can be used for eg,+ creating hash directory structures to store Keys in. This is the same+ directory hash that is used by eg, the directory special remote. (git-annex replies with VALUE followed by the value.) * `SETCONFIG Setting Value` Sets one of the special remote's configuration settings.
doc/design/roadmap.mdwn view
@@ -1,6 +1,5 @@ ## ahead -* [[adjusted_branches]] * [[design/caching_database]] for metadata views * [[assistant/deltas]] * [[assistant/gpgkeys]] management for the assistant@@ -10,6 +9,8 @@ ## the rearview +* Spring 2016 [[adjusted_branches]]+* Winter 2015 v6 repo format * Mar-Oct 2015 busy busy busy, too busy to update! * Feb 2015 user-driven features and polishing, [[design/caching_database]] part 1 * Jan 2015 Android 5, relative paths, workload [[tuning]]
− doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment
@@ -1,14 +0,0 @@-[[!comment format=mdwn- username="https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U"- nickname="Richard"- subject="comment 1"- date="2015-01-22T01:05:56Z"- content="""-My gut feeling for incompatible changes in v6 is to somehow make v5 and below error out on all merges with a v6 repo.--Conversely, v6 git-annex running in v6 repos would transition all data while merging in v5 repos.--As a migration path for existing repos, you could move `git-annex` and `master` to `git-annex_v5` and `master_v5`. Once you are certain all known repos within that repo group are transitioned, either kill the v5 branches automagically or print info on cli/web UI on what needs to be run to get rid of them.--Having several plain git 1+ GiB repos (i.e. without any annex objects), I would love to transition after v6 and the migration paths have been hung a month or three to dry.-"""]]
− doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment
@@ -1,24 +0,0 @@-[[!comment format=mdwn- username="https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY"- nickname="Yaroslav"- subject="comment 2"- date="2015-01-26T19:46:12Z"- content="""-\"... merging repo A(v5) into repo B(v6)? This seems like it would be all to easy for a user to do.\"--it would be easy if two separate repos are inited separately of different versions and then merged. But how frequent could such situation arise? I don't think that it is not that common actually in non git-annex assistant initialized repositories, especially if \"v6\" (or some other custom) layout would be non-default.--This also somewhat reflects upon \"When it's receiving an object into a mixed v5 and v6 repo, it can't know which location that repo expects the object file to be located in.\" -- how plausible/frequent would be to see a mixed v5/6 repo?--\".annex-version flag file\" -- I think it is a good idea. (may be even better an .annex/version directory/file to reserve for possibly future other branch-specific, thus not for git-annex branch additions). Indeed it would take time for repos to acquire it, but imho it is ok, if added automagically by new git-annex versions. Also it is a tiny price to pay for users who do not really care about \"living on the edge\". But it also might better be coupled with having git-annex:version (i.e. version file under git-annex branch) describing layout of the git-annex branch since those two are somewhat independent, right?--Also a wild idea to mitigate inconvenience for users happen they migrate repositories from old to new formats: to provide 'git annex compat-layout [version]' command which, for files with content, would generate symlinks to files in new format to locations in old, with some command to clean them up later on (e.g. 'git annex compat-layout --cleanup'). Although inefficient per-se it could be a big convenience since would eliminate need to \"migrate/rewrite\" entire history, while still making it possible to get access to previous versions. With a handling in hooks could be automated to even hide that from users entirely. or is there a big culprit I don't see?---\"version numbers vs configuration\"--having flexibility of configurations, possibly with versions simply providing enumerations to some of them, might be a great feature to have in the long run. Not sure though if it would not blow up complexity :-/--Overall -- if complete transition to improved/unified v6 is too big of undertaker, allowing for custom non-default configurations while sticking to v5 as the default one and forbidding merges between different versions, could be sufficient to scale up for atypical large uses. If everyone to migrate to v6 -- more optimal layout should be well thought through to be worthwhile undertaking.--"""]]
+ doc/devblog/day_387__release_day.mdwn view
@@ -0,0 +1,10 @@+git-annex 6.20160419 has a rare security fix.+A [bug](http://git-annex.branchable.com/bugs/External_special_remote_broken__63__/) made encrypted special+remotes that are configured to use chunks accidentially expose the checksums+of content that is uploaded to the remote. Such information is supposed to+be hidden from the remote's view by the encryption. The same bug also made+resuming interrupted uploads to such remotes start over from the beginning.++After releasing that, I've been occupied today with fixing the Android+autobuilder, which somehow got its build environment broken (unsure how),+and fixing some other dependency issues.
+ doc/devblog/day_388-389__various_and_windows.mdwn view
@@ -0,0 +1,13 @@+Lots of little fixes and improvements here and there over the past couple+days.++The main thing was fixing several bugs with adjusted branches and Windows.+They seem to work now, and commits made on the adjusted branch are+propigated back to master correctly.++It would be good to finish up the last todos for v6 mode this month.+The sticking point is I need a way to update the file stat in the git index+when git-annex gets/drops/etc an unlocked file. I have not decided yet if+it makes the most sense to add a dependency on libgit2 for that, or extend+`git update-index`, or even write a pure haskell library to manipulate+index files. Each has its pluses and its minuses.
@@ -0,0 +1,5 @@+It's not every day I add a new special remote encryption mode to+git-annex! The new encryption=sharedpubkey mode+lets anyone with a clone of the git repository (and access to the remote)+store files in the remote, but then only the private key owner can access+those files. Which opens up some interesting new use cases...
doc/encryption.mdwn view
@@ -23,8 +23,9 @@ * `git annex initremote newremote type=... encryption=hybrid keyid=KEYID ...` * `git annex initremote newremote type=... encryption=shared` * `git annex initremote newremote type=... encryption=pubkey keyid=KEYID ...`+* `git annex initremote newremote type=... encryption=sharedpubkey keyid=KEYID ...` -## hybrid encryption keys+## hybrid encryption keys (encryption=hybrid) The [[hybrid_key_design|design/encryption]] allows additional encryption keys to be added on to a special remote later. Due to this@@ -53,7 +54,7 @@ See also [[encryption_design|design/encryption]] for other security risks associated with encryption. -## shared encryption key+## shared encryption key (encryption=shared) Alternatively, you can configure git-annex to use a shared cipher to encrypt data stored in a remote. This shared cipher is stored,@@ -66,7 +67,7 @@ that this is **insecure** unless you trust every clone of the git repository with access to the encrypted data stored in the special remote. -## regular public key encryption+## regular public key encryption (encryption=pubkey) This alternative simply encrypts the files in the special remotes to one or more public keys. It might be considered more secure due to its simplicity@@ -88,9 +89,25 @@ that the key has been compromised, it is **insecure** to leave files encrypted using that old key, and the user should re-encrypt everything.) -(Because filenames are MAC'ed, a cipher still needs to be-generated (and encrypted to the given key IDs). It is only used for MHAC-encryption of filenames.)+(A cipher still needs to be generated (and is encrypted to the given key IDs).+It is only used for HMAC encryption of filenames.)++## regular public key encryption with shared filename encryption (encryption=sharedpubkey)++This is a variation on encryption=pubkey which lets anyone who+has access to the gpg public keys store files in the special remote.+But, only owners of the corresponding private keys can retrieve the files+from the special remote.++ git annex initremote newremote type=... encryption=sharedpubkey keyid=KEYID ...++This might be useful if you want to let others drop off files for you in a+special remote, so that only you can access them.++The filenames used on the special remote are encrypted using HMAC,+which prevents the special remote from seeing the filenames. But, anyone+who can clone the git repository can access the HMAC cipher; it's stored+**unencrypted** in the git repository. ## MAC algorithm
+ doc/forum/Deleting_remotes_doesn__39__t_work__8230__.mdwn view
@@ -0,0 +1,1 @@+I'm trying to get rid of two remotes through the assistant, but when I'm trying to delete it, it doesn't start deletion process, as far as I can tell, since the symbol where it say syncing enabled/disabled is not changed to "delete" or whatever it is.
+ doc/forum/Fails_to_get_file_from_s3._How_to_recover__63__.mdwn view
@@ -0,0 +1,16 @@+I have an annex that has an s3 special remote. The s3 remote has been configured with shared encryption and it uses partsize (not chunking). Currently when I try to get a file from the s3 remote, it fails:++ $ git annex get mybigfile.tbz.gpg+ get mybigfile.tbz.gpg (from s3...)+ 76% 10.6MB/s 57sgpg: WARNING: encrypted message has been manipulated!++ Unable to access these remotes: s3++ Try making some of these repositories available:+ 15ac19e4-223a-4c81-b7f7-797b9b026b86 -- [s3]++ (Note that these git remotes have annex-ignore set: origin)+ failed+ git-annex: get: 1 failed++The file is about 3GB. This happens consistently at 76%. No other copy of the file exists. Is there some way I can get the file from s3, either without git annex or just have git annex ignore the error, so that I can inspect the file locally and see if there is anything wrong with it?
+ doc/forum/How_to_find_out_if_assistant_is_still_repairing__63__.mdwn view
@@ -0,0 +1,1 @@+I have a corrupted repository, that git annex assistant wanted to repair. Before clicing on the button to start the repairing process, I had to deactivate my internet connection for another reason. The daemon.log is showing some connection errors to my remotes. But since pressing the button to repair my repo, the webapp is not showing the dashboard and there's no indicator that's trustworthy enough, that stuff is happening. There are some git and git annex processes running, but is there really now better way to know, if the repairing process is making progress, or if I need to restart the assistant because I needed to reset my internet connection.
+ doc/forum/Ignoring_folders__63__.mdwn view
@@ -0,0 +1,1 @@+What is the correct way to ignore subfolders or files? Just use .gitignore? Or is there a git-annex specific way? For example, partial download files.
+ doc/forum/Integrating_git-annex_with_Windows_Git_Extensions__63__.mdwn view
@@ -0,0 +1,10 @@+I installed the Windows git-annex, and had to run the following command from Git Bash (in Admin mode) in order to get git to see git-annex:++$ ln -s /C/Program\ Files\ \(x86\)/Git/usr/bin/git-annex.exe git-annex.exe++Was this +1) a known install issue that I missed somewhere?+2) a failure in my particular installation?+3) or was I supposed to put C:\Program Files (x86)\Git\usr\bin in my Windows path?++Wasn't sure if we needed a docs update...
+ doc/forum/Making_a_git-annexy_symlink___34__known__34____63__.mdwn view
@@ -0,0 +1,7 @@+Currently, if you git-add a symlink copied from another git-annex, git-annex will 'fix' it so it points to where the files would be in its new annex object store, but doesn't create the corresponding file for the key on the git-annex branch, so git-annex doesn't actually "know" about the file.++This means running *git annex reinject --known* won't reinject the content for the symlink (e.g. "Not known content; skipping").++I tried running git-annex-fsck hoping it would create the file (with the information that 0 copies exist) but it doesn't do that..?++Any advice on how to go about resolving this? Preferably a "lightweight" way as this repository has a lot of such transplanted symlinks.. :)
+ doc/forum/S3_remote_not_available.mdwn view
@@ -0,0 +1,31 @@+One of my remotes is S3 (named s3). I used to be able to run++ $ git annex sync s3 --content++But now I'm getting the following error:++ commit + On branch master+ nothing to commit, working directory clean+ ok+ git-annex: there is no available git remote named "s3"++My `.git/config` file contains following lines which I would assume mean that the remote is there:++ [remote "s3"]+ annex-s3 = true+ annex-uuid = bd9af194-b736-4114-a689-9a8bf212fb18+ fetch = + annex-sync = false++As far as I can tell only change I did was to install newer version of git-annex, currently I have:++ git-annex version: 6.20160418+ build flags: Assistant Webapp Pairing Testsuite WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi+ key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL+ remote types: git gcrypt bup directory rsync web bittorrent webdav tahoe glacier ddar hook external+ local repository version: 6+ supported repository versions: 5 6+ upgrade supported from repository versions: 0 1 2 4 5++How do I recover access to that remote?
+ doc/forum/Wrong_symlink_target_on_usb_drive.mdwn view
@@ -0,0 +1,55 @@+As I'm not sure whether this is my fault or a bug of git-annex, I'll post it in forum first.++I have a normal v6 git-annex setup, with a desktop, laptop and usb stick.++All repositories are in sync, also the usb drive.+There are some unlocked files, which are fine.+But there are also some locked files, which appear to be broken.+Checking the target, there is a big difference between the paths. On the computers, it's `.git/annex/objects/0W/vj/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed`.++Also the usb drive links to this location, but the file does not exist.+Searching with the firs part of the hash, I got some interesting result: the file was stored in `.git/annex/objects/1cc/840/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed`.+The difference is that the two first directories have three instead of two letters and only one layer.+The hash remains the same, and the file is valid.++```+$ cd desktop+$ git annex sync --content+(success)+$ readlink -f locked-file+.git/annex/objects/0W/vj/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed+$ cd usb-drive+$ readlink -f locked-file+(no output → broken)+$ find .git/annex/objects/ -name *SHA256E-s10230770*+.git/annex/objects/1cc/840/SHA256E-s10230770--dcbf7418ff3c9698e9d98418fd07a52afec172aeef80aee2a84dcfdaeef859ed+(file is at different place)+```++I did some troubleshooting and unspecific fixing.++```+$ git annex whereis locked-file+whereis locked-file (3 copies) + d0a64b4b-054e-4c42-a64f-58a08591abab -- laptop+ e3013e6b-a06a-46a5-a67a-ce9ec0520d21 -- desktop+ ebd16ddb-548c-4078-b35e-087132523924 -- usb-drive [here]+ok+$ git annex fsck+(everything fine, also unlocked-file was checked)+$ git annex fix+(no error, but no solution)+$ git annex unlock locked-file+(file is there and editable, great!)+$ git annex lock locked-file+(symlink is there and points… right, to the wrong location)+$ git annex drop locked-file && git annex get locked-file+(no change visible in work directory)+```++Specially on this drive disk space is important, so it would be for me a bad solution to keep them unlocked.++As I mentioned earlier, this could be also my fault, as I have done some not-often used methods++- I rebased the history and checked manually (without `git annex sync`) the `master` and `synced/master` branch to the same commit on all repositories, no errors reported+- I used a v5 repository on laptop before syncing with the drive, then upgraded. I don't think it is the problem here as it works on desktop after the sync as wanted
+ doc/forum/race_condition_with_drop_-J__63__.mdwn view
@@ -0,0 +1,7 @@+When I run a command like: "git-annex drop . -J 20"++I get: "git-annex: content is locked"++Running with -J 5 works.++EDIT: Even as low as -J 2 runs into problems. The issue is simply more likely to trigger with more threads.
+ doc/forum/time_profiling_the_assistant.mdwn view
@@ -0,0 +1,19 @@+From the repo (commit ecc548) I built git-annex with stack issuing this command:++ stack install --executable-profiling --library-profiling --ghc-options="-rtsopts -auto-all"++then I run the output executable with +RTS -p like++ git-annex version +RTS -p++and obtain the corresponding git-annex.prof with the time profile.++What I am unable to do is to get a time profile of the assistant: if I kill it the git-annex.prof file is empty, same happens if I stop the assistant with++ git-annex assistant --stop++So... is there another way to time-profile a git-annex command? Am I missing something in this procedure?++Any advice is welcome :)++-- zarel
+ doc/forum/unable_to_clone_annex_repo_in_windows.mdwn view
@@ -0,0 +1,29 @@+Dear all,+ I successfuly cloned my annex repo (hosted on gitlab.com) on my windows box (win 7, 64bits), and my data is on an exFat partition. +git annex version is +----------------+git-annex version: 6.20160126-g2336107+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload) WebDAV ConcurrentOutput TorrentParser Feeds Quvi+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external+-------------+However, when I try to initialize annex on the newly cloned repo fails with the following error:++$ git annex init "repo_win"+init repo_win+ Detected a filesystem without fifo support.++ Disabling ssh connection caching.++ Detected a crippled filesystem.++ Enabling direct mode.++git-annex: .git\annex\objects\c89\57a\SHA256E-s1339658--e7cfebb4ac9c81a6a060506c537b55aed9f13bd02d861d2b341fb8a79ad6e046.png\: openTempFile: does not exist (No such file or directory)+failed+git-annex: init: 1 failed++any hints about this?+Thanks in advance.+Best regards,+ Juan
+ doc/git-annex-drop/comment_1_ecb863aea64eadbaeb7759c5cb0bf5a5._comment view
@@ -0,0 +1,12 @@+[[!comment format=mdwn+ username="zpeters@669a56d871ec94de11e1bf63f4a21e80ea90b2fa"+ nickname="zpeters"+ subject="Choose which remote to lock when dropping"+ date="2016-05-03T23:37:09Z"+ content="""+I might have a unique situation but i have a git annex repo that has multiple remotes for the same actual location. I have a server at home and when i'm \"out in the world\" i use it's external IP and when i'm at home i use it's internal IP. It appears that when i do an git annex drop on my laptop to compares and locks whichever remote is alphabetically first. ++What i'm wondering is is there a way to tell git annex which remote i want to compare against? For example when i'm remote i want to do something like \"git annex drop . --compare remoteServer\"++Thank you!+"""]]
+ doc/git-annex-drop/comment_2_c9017041b01d803b346b1b14b8d1e066._comment view
@@ -0,0 +1,14 @@+[[!comment format=mdwn+ username="joey"+ subject="""comment 2"""+ date="2016-05-04T17:23:41Z"+ content="""+@zpeters, the order that remotes are accessed are ordered by cost.++You can configure the costs of remotes by setting remote.$name.annex-cost+to eg 100 to make it be checked first or 300 to make it be checked later.++There's also a remote.$name.annex-cost-command that runs a command to get+the cost. You could perhaps use that to detect which network you're on and+alter the costs appropriately.+"""]]
doc/git-annex-map.mdwn view
@@ -23,6 +23,16 @@ Note that this subcommand can be used to graph any git repository; it is not limited to git-annex repositories. +# LEGEND++Ovals are repositories. White is regular, green is trusted, red is+untrusted, and grey is dead.++Arrows between repositories are connections via git remotes.++Light blue boxes are hosts that were mapped, and contain the repositories+on that host.+ # OPTIONS * `--fast`
doc/git-annex-view.mdwn view
@@ -31,6 +31,11 @@ directory in the view, while `foo/=*` will preserve the subdirectories of the foo directory in the view. +To enter a view containing only files that lack a given metadata+field or tag, specify field!=value or !tag. Globs can also be used here,+so `field!="*"` will enter a view containing only files that do not have+the field set to any value.+ # SEE ALSO [[git-annex]](1)
doc/git-annex.mdwn view
@@ -1189,15 +1189,22 @@ * `remote.<name>.annex-gnupg-options` - Options to pass to GnuPG for symmetric encryption. For instance, to+ Options to pass to GnuPG when it's encrypting data. For instance, to use the AES cipher with a 256 bits key and disable compression, set it to `--cipher-algo AES256 --compress-algo none`. (These options take precedence over the default GnuPG configuration, which is otherwise used.) +* `remote.<name>.annex-gnupg-decrypt-options`++ Options to pass to GnuPG when it's decrypting data. (These options take+ precedence over the default GnuPG configuration, which is otherwise+ used.)+ * `annex.ssh-options`, `annex.rsync-options`, `annex.rsync-upload-options`, `annex.rsync-download-options`,- `annex.bup-split-options`, `annex.gnupg-options`+ `annex.bup-split-options`, `annex.gnupg-options`,+ `annex.gnupg-decrypt-options` Default options to use if a remote does not have more specific options as described above.
+ doc/install/OSX/comment_13_f4b39e2009274539d60b29711a4a2c8d._comment view
@@ -0,0 +1,22 @@+[[!comment format=mdwn+ username="lhunath@3b4ff15f4600f3276d1776a490b734fca0f5c245"+ nickname="lhunath"+ subject="The application cannot be opened because its executable is missing."+ date="2016-05-05T04:33:06Z"+ content="""+Just downloaded the DMG, copied the .app into /Applications and ran it; does nothing, from terminal:++$ open -W /Applications/git-annex.app+The application cannot be opened because its executable is missing.++$ /Applications/git-annex.app/Contents/MacOS/git-annex-webapp+$+unable to start webapp in repository /Users/lhunath/annex: Not in a git repository.+Launching web browser on file:///var/folders/np/v9byg9092bbf31jw5cydzszm0000gn/T/webapp1622650073984943658.html++$ /Applications/git-annex.app/Contents/MacOS/git-annex version+git-annex version: 6.20160427-gd0036b9+build flags: Assistant Webapp Pairing Testsuite S3(multipartupload)(storageclasses) WebDAV FsEvents XMPP ConcurrentOutput TorrentParser MagicMime Feeds Quvi+key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 SHA1E SHA1 MD5E MD5 WORM URL+remote types: git gcrypt S3 bup directory rsync web bittorrent webdav tahoe glacier ddar hook external+"""]]
+ doc/install/OSX/comment_14_5581b7d1c09e6a78419d626bb25261b6._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="joey"+ subject="""comment 14"""+ date="2016-05-10T17:22:03Z"+ content="""+I don't know what needs to be put where in the app to make `open`+run git-annex-webapp. There is already a Info.plist file that I thought was+supposed to handle that. If someone wants to help make `open` work please+be my guest.+"""]]
doc/install/Windows.mdwn view
@@ -1,6 +1,6 @@ git-annex now does Windows! -* First, [install git for Windows](http://git-scm.com/downloads) +* First, [install Git for Windows](http://git-scm.com/downloads) Important: **Get the 32 bit version not the 64 bit version.** (Note that msysgit is no longer supported.) * Then, [install git-annex](https://downloads.kitenet.net/git-annex/windows/current/)@@ -25,15 +25,19 @@ ## building it yourself To build git-annex from source on Windows, you need to install-the Haskell Platform and Cygwin. Use Cygwin to install these packages:-gcc rsync git wget ssh gnupg+[Git for Windows](http://git-scm.com/downloads), and+[Stack](http://haskellstack.org/). -Once the prerequisites are installed, run:+You also need to install rsync and wget for windows.+They need to be linked with the same MINGW32 libraries that come with Git+for Windows. One way is to download them from+<https://downloads.kitenet.net/git-annex/windows/assets/>.+Put them somewhere in PATH. - cabal update- git clone git://git-annex.branchable.com/ gitannex- cd gitannex- build+Then open Git Bash, [[clone git-annex|download]], and in+git-annex's source tree, run "stack build" to download and build+all dependencies and git-annex. "stack install" will install git-annex. (To build the git-annex installer, you also need to install the NullSoft-installer system.)+installer system. The script `standalone/windows/build.sh` is+used to make the builds linked to above.)
doc/install/fromsource.mdwn view
@@ -42,7 +42,7 @@ First, [install stack](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md) It will be part of the Haskell Platform soon. On Debian unstable/testing: - sudo apt-get install haskell-stack zlib1g-dev+ sudo apt-get install haskell-stack zlib1g-dev libtinfo-dev Use stack to install all dependencies and git-annex:
− doc/news/version_6.20160229.mdwn
@@ -1,24 +0,0 @@-git-annex 6.20160229 released with [[!toggle text="these changes"]]-[[!toggleable text="""- * Update perlmagick build dependency. Closes: #[789225](http://bugs.debian.org/789225)- * Fix memory leak in last release, which affected commands like- git-annex status when a large non-annexed file is present in the work- tree.- * fsck: When the only copy of a file is in a dead repository, mention- the repository.- * info: Mention when run in a dead repository.- * Linux and OSX standalone builds put the bundled gpg last in PATH,- so any system gpg will be preferred over it.- * Avoid crashing when built with MagicMime support, but when the magic- database cannot be loaded.- * Include magic database in the linux and OSX standalone builds.- * Fix memory leak when hashing files, which triggered during fsck- when an external hash program was not used.- (This leak was introduced in version 6.20160114.)- * Support --metadata field<number, --metadata field>number etc- to match ranges of numeric values.- * Similarly, support preferred content expressions like- metadata=field<number and metadata=field>number- * The pre-commit-annex hook script that automatically extracts- metadata has been updated to also use exiftool.- Thanks, Klaus Ethgen."""]]
− doc/news/version_6.20160318.mdwn
@@ -1,18 +0,0 @@-git-annex 6.20160318 released with [[!toggle text="these changes"]]-[[!toggleable text="""- * metadata: Added -r to remove all current values of a field.- * Fix data loss that can occur when annex.pidlock is set in a repository.- * Fix bug preventing moving files to/from a repository with annex.pidlock set.- * Fix shared lock file FD leak.- * Fix metadata hook behavior when multiple files are added at once.- Thanks, Klaus Ethgen.- * Added dependencies on haskell mountpoints and disk-free-space- libraries, removing FFI code from git-annex.- * dropkey: Add --batch and --json.- * Fix OSX dmg to include libraries needed by bundled gpg,- lost in last release.- * Always try to thaw content, even when annex.crippledfilesystem is set.- * Correct git-annex info to include unlocked files in v6 repository.- * Sped up git-annex add in direct mode and v6 by using- git hash-object --stdin-paths.- * Sped up git-annex merge by using git hash-object --stdin-paths."""]]
+ doc/news/version_6.20160511.mdwn view
@@ -0,0 +1,34 @@+git-annex 6.20160511 released with [[!toggle text="these changes"]]+[[!toggleable text="""+ * Fix bug that sometimes prevented git-annex smudge --clean from consuming+ all its input, which resulted in git add bypassing git-annex.+ * Fix build with directory-1.2.6.2.+ * Improve behavior when a just added http remote is not available+ during uuid probe. Do not mark it as annex-ignore, so it will be tried+ again later.+ * Android: Icon refresh.+ Thanks, freewheelinfranks.+ * Added DIRHASH-LOWER to external special remote protocol.+ * git-annex.cabal: Add Setup-Depends.+ * stack.yaml: Enable explicit-setup-deps.+ * Windows: Fix several bugs in propigation of changes from the adjusted+ branch back to the master branch.+ * Windows: Fix an over-long temp directory name.+ * map: Hide dead repositories that are not connected to the graph.+ * map: Changed colors; red is used for untrusted repositories and grey+ for dead.+ * version: Display OS version and architecture too.+ * Propigate GIT\_DIR and GIT\_WORK\_TREE environment to external special+ remotes.+ * Added annex.gnupg-decrypt-options and+ remote.<name>.annex-gnupg-decrypt-options, which are passed to gpg+ when it's decrypting data.+ * fsck: When a key is not previously known in the location log,+ record something so that reinject --known will work.+ * In the unusual configuration where annex.crippledfilesystem=true but+ core.symlinks=true, store object contents in mixed case hash+ directories so that symlinks will point to them.+ * Added new encryption=sharedpubkey mode for special remotes.+ This is useful for makking a special remote that anyone with a clone+ of the repo and your public keys can upload files to, but only you can+ decrypt the files stored in it."""]]
+ doc/special_remotes/comment_33_317c4d5edc9de8159c3b03a3e161e257._comment view
@@ -0,0 +1,12 @@+[[!comment format=mdwn+ username="grawity@2ea26be48562f66fcb9b66307da72b1e2e37453f"+ nickname="grawity"+ subject="comment 33"+ date="2016-05-02T18:41:53Z"+ content="""+I'm trying to write a remote (for smb:// support via GNOME's Gvfs), and I can't seem to find a way to change an existing special remote's parameters?++Even when marked as \"dead\" (the closest to deleting a remote that I could find), it still blocks subsequent `annex initremote` calls with the same name.++Also, ideally I'd want to reuse the same name _and_ keep the same UUID (e.g. when the backend is moved/renamed). Though of course there are situations where a new UUID would be wanted as well... (I guess that could depend on whether the remote is currently \"dead\" or not?)+"""]]
+ doc/special_remotes/comment_34_31256dd4b74d344aa49902adec4bcf02._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="grawity@2ea26be48562f66fcb9b66307da72b1e2e37453f"+ nickname="grawity"+ subject="comment 34"+ date="2016-05-02T18:43:33Z"+ content="""+Hmm, I just found that `annex enableremote` accepts parameters to be modified; that should work for now.++Though I still wonder about situations where one wants to add a new empty remote with new UUID, but reuse the old name...+"""]]
+ doc/special_remotes/comment_35_5801755d10149f0d3971fef0b6e1b62f._comment view
@@ -0,0 +1,19 @@+[[!comment format=mdwn+ username="joey"+ subject="""comment 35"""+ date="2016-05-03T17:12:42Z"+ content="""+@grawity yes, enableremote is the way to change configuration of an+existing special remote.++The special remote names are a bit funky; to keep the user from needing to+enter in a long uuid when enabling a particular special remote, a name+has to be recorded for the remote, and that becomes shared across clones+of that repository, in a way that the names of git remotes are not+normally. (Normally, my "origin" might be your "upstream" etc.) ++While it could ignore dead remotes when initializing a new remote with an+existing name, then if the old remote got brought back from the dead, there+would be a naming conflict. So, I think it's best to not go down that path,+to avoid the undead horrors lurking there. ;-)+"""]]
+ doc/todo/drop_--batch/comment_1_eff1bec0af5e7a7364d2fdaea6a8826f._comment view
@@ -0,0 +1,18 @@+[[!comment format=mdwn+ username="joey"+ subject="""comment 1"""+ date="2016-05-03T19:06:53Z"+ content="""+Might be better to make `dropkey` do the same numcopies checking as+`drop` does. Currently, `dropkey` needs `--force` to do anything (and it's+always needed that), so it could do numcopies checking when not forced,+without breaking backwards compatability.++The benefit of keeping this in `dropkey` is that dropping by key+tends to work better with batch adds/imports of files that are occurring at+the same time.++Only downside I see is that dropping by key is unable to honor+.gitattributes numcopies settings, since the associated filename is not+known.+"""]]
doc/todo/feature_request__58___pubkey-only_encryption_mode.mdwn view
@@ -12,3 +12,5 @@ would appreciate the increased security of not having the secret key on the backup server. It would only be needed if I wanted to verify or restore backups.++> Added "encryption=sharedpubkey" [[done]] --[[Joey]]
doc/todo/use_inode_cache_in_unlocked_files.mdwn view
@@ -21,3 +21,13 @@ modified file doesn't get added and committed. But, using the inode cache for unlocked files would result in any such modified versions being thrown away when the file is added, which is much more data lossy..++> This bug was regarding v5 unlock/lock. In v6 mode, locking a+> file doesn't need to rechecksum it; the key is pulled out of the+> associated files database, and the inode cache is used to detect if the+> unlocked file has been modified and so avoid data loss.+> +> So, this is [[done]] but only for v6 mode. I don't think I want to+> backport it to v5 mode though; it fell out naturally as a consequence of+> v6 mode, but to support it in v5 mode would be a lot more work.+> --[[Joey]]
doc/todo/wishlist__58___add_repository_name_to_commit_messages.mdwn view
@@ -1,3 +1,6 @@ The commit messages made by git-annex are quite spartan, especially in direct mode where one cannot enter its own commit messages. This means that all that the messages say is "branch created", "git-annex automatic sync", "update", "merging" or little more. It would be nice if git-annex could add at least the name of the repository/remote to the commit message. This would make the log a lot more clear, especially when dealing with problems or bugs.++> The repository name is included now. Also, `git annex sync` can be passed+> --message. [[done]] --[[Joey]]
doc/todo/wishlist__58__alias_system.mdwn view
@@ -1,1 +1,3 @@ To implement things like my custom `git annex-push` without the dash, i.e. `git annex push`, an alias system for git-annex would be nice.++> [[closing|done]] --[[Joey]]
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 6.20160419+Version: 6.20160511 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess <id@joeyh.name>
man/git-annex-map.1 view
@@ -21,6 +21,15 @@ Note that this subcommand can be used to graph any git repository; it is not limited to git-annex repositories. .PP+.SH LEGEND+Ovals are repositories. White is regular, green is trusted, red is+untrusted, and grey is dead.+.PP+Arrows between repositories are connections via git remotes.+.PP+Light blue boxes are hosts that were mapped, and contain the repositories+on that host.+.PP .SH OPTIONS .IP "\fB\-\-fast\fP" .IP
man/git-annex-view.1 view
@@ -29,6 +29,11 @@ directory in the view, while \fBfoo/=*\fP will preserve the subdirectories of the foo directory in the view. .PP+To enter a view containing only files that lack a given metadata+field or tag, specify field!=value or !tag. Globs can also be used here,+so \fBfield!="*"\fP will enter a view containing only files that do not have+the field set to any value.+.PP .SH SEE ALSO git-annex(1) .PP
man/git-annex.1 view
@@ -1024,15 +1024,21 @@ (There is no corresponding option for bup join.) .IP .IP "\fBremote.<name>.annex\-gnupg\-options\fP"-Options to pass to GnuPG for symmetric encryption. For instance, to+Options to pass to GnuPG when it's encrypting data. For instance, to use the AES cipher with a 256 bits key and disable compression, set it to \fB\-\-cipher\-algo AES256 \-\-compress\-algo none\fP. (These options take precedence over the default GnuPG configuration, which is otherwise used.) .IP+.IP "\fBremote.<name>.annex\-gnupg\-decrypt\-options\fP"+Options to pass to GnuPG when it's decrypting data. (These options take+precedence over the default GnuPG configuration, which is otherwise+used.)+.IP .IP "\fBannex.ssh\-options\fP, \fBannex.rsync\-options\fP," \fBannex.rsync\-upload\-options\fP, \fBannex.rsync\-download\-options\fP,-\fBannex.bup\-split\-options\fP, \fBannex.gnupg\-options\fP+\fBannex.bup\-split\-options\fP, \fBannex.gnupg\-options\fP,+\fBannex.gnupg\-decrypt\-options\fP .IP Default options to use if a remote does not have more specific options as described above.
stack.yaml view
@@ -24,3 +24,5 @@ - mountpoints-1.0.1 - disk-free-space-0.1.0.1 - process-1.3.0.0+explicit-setup-deps:+ git-annex: true
standalone/android/cabal.config view
@@ -1,10 +1,12 @@-constraints: Crypto ==4.2.5.1,+constraints: unix installed,+ 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,@@ -84,6 +86,7 @@ http-conduit ==2.1.5, http-date ==0.0.2, http-types ==0.8.5,+ blaze-builder ==0.3.3.2, hxt ==9.3.1.4, hxt-charproperties ==9.1.1.1, hxt-regex-xmlschema ==9.0.4,@@ -194,6 +197,6 @@ yesod-routes ==1.2.0.7, yesod-static ==1.2.4, zlib ==0.5.4.1,- bytestring ==0.10.4.0,+ bytestring installed, scientific ==0.3.3.1, clock ==0.4.6.0
standalone/android/icons/drawable-hdpi/ic_launcher.png view
binary file changed (2612 → 3054 bytes)
standalone/android/icons/drawable-ldpi/ic_launcher.png view
binary file changed (1279 → 1487 bytes)
standalone/android/icons/drawable-mdpi/ic_launcher.png view
binary file changed (1768 → 1979 bytes)
standalone/android/icons/drawable-xhdpi/ic_launcher.png view
binary file changed (3396 → 4127 bytes)
standalone/android/icons/drawable/ic_launcher.png view
binary file changed (1768 → 1979 bytes)
standalone/android/tmp/network-2.4.1.2/cabal.config view
@@ -1,10 +1,12 @@-constraints: Crypto ==4.2.5.1,+constraints: unix installed,+ 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,@@ -84,6 +86,7 @@ http-conduit ==2.1.5, http-date ==0.0.2, http-types ==0.8.5,+ blaze-builder ==0.3.3.2, hxt ==9.3.1.4, hxt-charproperties ==9.1.1.1, hxt-regex-xmlschema ==9.0.4,@@ -194,6 +197,6 @@ yesod-routes ==1.2.0.7, yesod-static ==1.2.4, zlib ==0.5.4.1,- bytestring ==0.10.4.0,+ bytestring installed, scientific ==0.3.3.1, clock ==0.4.6.0