git-annex 5.20140709 → 5.20140717
raw patch · 90 files changed
+1765/−374 lines, 90 filesdep +path-pieces
Dependencies added: path-pieces
Files
- Annex/AutoMerge.hs +7/−3
- Annex/Branch.hs +14/−9
- Annex/Direct.hs +8/−24
- Annex/Journal.hs +13/−22
- Annex/LockFile.hs +87/−0
- Annex/LockPool.hs +0/−60
- Annex/ReplaceFile.hs +8/−3
- Annex/Ssh.hs +3/−3
- Assistant.hs +3/−7
- Assistant/Install.hs +3/−3
- Assistant/WebApp/Types.hs +2/−0
- Backend/Hash.hs +10/−0
- Backend/URL.hs +1/−0
- Backend/WORM.hs +1/−0
- Build/Configure.hs +1/−1
- Build/NullSoftInstaller.hs +23/−17
- CHANGELOG +31/−0
- CmdLine/GitAnnex.hs +2/−0
- Command/ImportFeed.hs +1/−1
- Command/Migrate.hs +18/−12
- Command/ResolveMerge.hs +40/−0
- Command/Uninit.hs +11/−0
- Command/Vicfg.hs +5/−3
- Git/GCrypt.hs +3/−0
- Remote/GCrypt.hs +10/−2
- Remote/Git.hs +12/−11
- Remote/Helper/Hooks.hs +3/−3
- Remote/S3.hs +43/−17
- Test.hs +73/−22
- Types/Backend.hs +1/−0
- Utility/Daemon.hs +13/−0
- Utility/Directory.hs +91/−40
- Utility/ExternalSHA.hs +2/−1
- Utility/ThreadScheduler.hs +1/−2
- debian/changelog +31/−0
- doc/backends.mdwn +5/−4
- doc/backends/comment_7_de7ac3e84273d92b6907c694db54fb36._comment +0/−9
- doc/bugs/Assistant_doesn__39__t_check_if_it_can_drop_files.mdwn +2/−0
- doc/bugs/Moved_files_are_not_picked_up_by_the_assistant_on_OS_X.mdwn +2/−0
- doc/bugs/Windows_daemon_silently_dies.mdwn +132/−0
- doc/bugs/__171__transferkey__187___fails_for_bare_remotes.mdwn +2/−0
- doc/bugs/adding_a_remote_server_fails.mdwn +27/−0
- doc/bugs/bad_merge_commit_deleting_all_files.mdwn +3/−0
- doc/bugs/direct_mode_fails__44___left_in_an_inconsistent_state.mdwn +2/−0
- doc/bugs/files_lost_during_upgrade.mdwn +3/−0
- doc/bugs/git-annex_sync_does_not_push.mdwn +52/−0
- doc/bugs/gpg_does_not_ask_for_password_inside_tmux.mdwn +4/−0
- doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn +90/−0
- doc/bugs/unwanted_repository_version_upgrades.mdwn +0/−25
- doc/bugs/using_gpg_encryption_with_multiple_keys_fails.mdwn +57/−0
- doc/coding_style/comment_2_a820b7c8ae7c2290eb000f61bdb5c514._comment +8/−0
- doc/devblog/day_193-194__ugly_bug.mdwn +37/−0
- doc/devblog/day_195-196__catching_up.mdwn +13/−0
- doc/devblog/day_197__autobuilder_rescuscitation.mdwn +14/−0
- doc/devblog/day_198__branching_out.mdwn +23/−0
- doc/devblog/day_199__ten_minute_cycle.mdwn +6/−0
- doc/direct_mode/comment_12_7d507b6f87085a19d8dd5014f580922b._comment +24/−0
- doc/direct_mode/comment_13_5169c5541970d3b3bc1e080e07539b22._comment +8/−0
- doc/direct_mode/comment_14_03a02e689d92faa596de98e02b2ffe28._comment +10/−0
- doc/forum/Android_version_does_not_sync.mdwn +23/−0
- doc/forum/Getting_the_status_of_a_remotely_changed_annex_file.mdwn +75/−0
- doc/forum/How_to_get_git-annex_to_forget_a_commit__63__.mdwn +54/−0
- doc/forum/Performance_implications_of_triply_nested_objects_directory.mdwn +23/−0
- doc/forum/Restricting_SSH_+_supply_key.mdwn +7/−0
- doc/forum/Standard_groups__47__preferred_contents.mdwn +14/−0
- doc/forum/Where_is_the_content__63__.mdwn +8/−0
- doc/forum/repo_corruption_in_usb_external_drive.mdwn +41/−0
- doc/forum/rsync_asking_for_an_unknown_password.mdwn +60/−0
- doc/forum/webapp_does_not_start.mdwn +72/−0
- doc/git-annex.mdwn +21/−8
- doc/install/OSX.mdwn +2/−1
- doc/install/cabal/comment_37_f33e1a4575dccc20b0d3d7c00e6db709._comment +69/−0
- doc/install/cabal/comment_38_5c1e96221154a4ae4ebd636232044ced._comment +16/−0
- doc/news/version_5.20140529.mdwn +0/−25
- doc/news/version_5.20140709.mdwn +0/−0
- doc/news/version_5.20140717.mdwn +28/−0
- doc/preferred_content/standard_groups.mdwn +10/−2
- doc/special_remotes/gcrypt.mdwn +5/−0
- doc/special_remotes/glacier.mdwn +1/−1
- doc/todo/Expose_auto-merge_for_manual__44___local_merges.mdwn +2/−0
- doc/todo/Recovering_from_a_bad_sync.mdwn +31/−0
- doc/todo/fast_migrate.mdwn +16/−0
- doc/todo/unwanted_repository_version_upgrades.mdwn +25/−0
- git-annex.1 +20/−8
- git-annex.cabal +2/−2
- standalone/android/haskell-patches/entropy_cross-build.patch +10/−10
- standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch +21/−8
- standalone/android/install-haskell-packages +0/−1
- standalone/linux/install-haskell-packages +5/−0
- templates/configurators/genkeymodal.hamlet +5/−4
Annex/AutoMerge.hs view
@@ -5,7 +5,11 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Annex.AutoMerge (autoMergeFrom) where+module Annex.AutoMerge+ ( autoMergeFrom+ , resolveMerge+ , commitResolvedMerge+ ) where import Common.Annex import qualified Annex.Queue@@ -174,7 +178,7 @@ return (Just file) {- git-merge moves conflicting files away to files- - named something like f~HEAD or f~branch, but the+ - named something like f~HEAD or f~branch or just f, but the - exact name chosen can vary. Once the conflict is resolved, - this cruft can be deleted. To avoid deleting legitimate - files that look like this, only delete files that are@@ -191,7 +195,7 @@ liftIO $ nukeFile f | otherwise = noop s = S.fromList resolvedfs- matchesresolved f = S.member (base f) s+ matchesresolved f = S.member f s || S.member (base f) s base f = reverse $ drop 1 $ dropWhile (/= '~') $ reverse f commitResolvedMerge :: Git.Branch.CommitMode -> Annex Bool
Annex/Branch.hs view
@@ -389,21 +389,26 @@ prepareModifyIndex jl g <- gitRepo let dir = gitAnnexJournalDir g- fs <- getJournalFiles jl (jlogf, jlogh) <- openjlog- liftIO $ do+ withJournalHandle $ \jh -> do h <- hashObjectStart g Git.UpdateIndex.streamUpdateIndex g- [genstream dir h fs jlogh]+ [genstream dir h jh jlogh] hashObjectStop h return $ cleanup dir jlogh jlogf where- genstream dir h fs jlogh streamer = forM_ fs $ \file -> do- let path = dir </> file- sha <- hashFile h path- hPutStrLn jlogh file- streamer $ Git.UpdateIndex.updateIndexLine- sha FileBlob (asTopFilePath $ fileJournal file)+ genstream dir h jh jlogh streamer = do+ v <- readDirectory jh+ case v of+ Nothing -> return ()+ Just file -> do+ unless (dirCruft file) $ do+ let path = dir </> file+ sha <- hashFile h path+ hPutStrLn jlogh file+ streamer $ Git.UpdateIndex.updateIndexLine+ sha FileBlob (asTopFilePath $ fileJournal file)+ genstream dir h jh jlogh streamer -- Clean up the staged files, as listed in the temp log file. -- The temp file is used to avoid needing to buffer all the -- filenames in memory.
Annex/Direct.hs view
@@ -5,8 +5,6 @@ - Licensed under the GNU GPL version 3 or higher. -} -{-# LANGUAGE CPP #-}- module Annex.Direct where import Common.Annex@@ -38,9 +36,7 @@ import Annex.VariantFile import Git.Index import Annex.Index-#ifdef mingw32_HOST_OS-import Utility.WinLock-#endif+import Annex.LockFile {- Uses git ls-files to find files that need to be committed, and stages - them into the index. Returns True if some changes were staged. -}@@ -164,7 +160,7 @@ - normally. -} mergeDirect :: Maybe Git.Ref -> Maybe Git.Ref -> Git.Branch -> Annex Bool -> Git.Branch.CommitMode -> Annex Bool-mergeDirect startbranch oldref branch resolvemerge commitmode = lockMerge $ do+mergeDirect startbranch oldref branch resolvemerge commitmode = exclusively $ do reali <- fromRepo indexFile tmpi <- fromRepo indexFileLock liftIO $ copyFile reali tmpi@@ -186,24 +182,8 @@ liftIO $ rename tmpi reali return r--lockMerge :: Annex a -> Annex a-lockMerge a = do- lockfile <- fromRepo gitAnnexMergeLock- createAnnexDirectory $ takeDirectory lockfile- mode <- annexFileMode- bracketIO (lock lockfile mode) unlock (const a) where-#ifndef mingw32_HOST_OS- lock lockfile mode = do- l <- noUmask mode $ createFile lockfile mode- waitToSetLock l (WriteLock, AbsoluteSeek, 0, 0)- return l- unlock = closeFd-#else- lock lockfile _mode = waitToLock $ lockExclusive lockfile- unlock = dropLock-#endif+ exclusively = withExclusiveLock gitAnnexMergeLock {- Stage a merge into the index, avoiding changing HEAD or the current - branch. -}@@ -374,7 +354,11 @@ void $ addAssociatedFile k f modifyContent loc $ do thawContent loc- replaceFile f $ liftIO . moveFile loc+ replaceFileOr f+ (liftIO . moveFile loc)+ $ \tmp -> do -- rollback+ liftIO (moveFile tmp loc)+ freezeContent loc fromdirect loc = do replaceFile f $ liftIO . void . copyFileExternal loc
Annex/Journal.hs view
@@ -17,10 +17,7 @@ import Annex.Exception import qualified Git import Annex.Perms--#ifdef mingw32_HOST_OS-import Utility.WinLock-#endif+import Annex.LockFile {- Records content for a file in the branch to the journal. -@@ -77,12 +74,21 @@ getJournalFilesStale = do g <- gitRepo fs <- liftIO $ catchDefaultIO [] $- getDirectoryContents' $ gitAnnexJournalDir g+ getDirectoryContents $ gitAnnexJournalDir g return $ filter (`notElem` [".", ".."]) fs +withJournalHandle :: (DirectoryHandle -> IO a) -> Annex a+withJournalHandle a = do+ d <- fromRepo gitAnnexJournalDir+ bracketIO (openDirectory d) closeDirectory (liftIO . a)+ {- Checks if there are changes in the journal. -} journalDirty :: Annex Bool-journalDirty = not . null <$> getJournalFilesStale+journalDirty = do+ d <- fromRepo gitAnnexJournalDir+ liftIO $ + (not <$> isDirectoryEmpty d)+ `catchIO` (const $ doesDirectoryExist d) {- Produces a filename to use in the journal for a file on the branch. -@@ -112,19 +118,4 @@ {- Runs an action that modifies the journal, using locking to avoid - contention with other git-annex processes. -} lockJournal :: (JournalLocked -> Annex a) -> Annex a-lockJournal a = do- lockfile <- fromRepo gitAnnexJournalLock- createAnnexDirectory $ takeDirectory lockfile- mode <- annexFileMode- bracketIO (lock lockfile mode) unlock (const $ a ProduceJournalLocked)- where-#ifndef mingw32_HOST_OS- lock lockfile mode = do- l <- noUmask mode $ createFile lockfile mode- waitToSetLock l (WriteLock, AbsoluteSeek, 0, 0)- return l- unlock = closeFd-#else- lock lockfile _mode = waitToLock $ lockExclusive lockfile- unlock = dropLock-#endif+lockJournal a = withExclusiveLock gitAnnexJournalLock $ a ProduceJournalLocked
+ Annex/LockFile.hs view
@@ -0,0 +1,87 @@+{- git-annex lock files.+ -+ - Copyright 2012, 2014 Joey Hess <joey@kitenet.net>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++{-# LANGUAGE CPP #-}++module Annex.LockFile (+ lockFileShared,+ unlockFile,+ getLockPool,+ withExclusiveLock,+) where++import Common.Annex+import Annex+import Types.LockPool+import qualified Git+import Annex.Exception+import Annex.Perms++import qualified Data.Map as M++#ifdef mingw32_HOST_OS+import Utility.WinLock+#endif++{- Create a specified lock file, and takes a shared lock, which is retained+ - in the pool. -}+lockFileShared :: FilePath -> Annex ()+lockFileShared file = go =<< fromLockPool file+ where+ go (Just _) = noop -- already locked+ go Nothing = do+#ifndef mingw32_HOST_OS+ mode <- annexFileMode+ lockhandle <- liftIO $ noUmask mode $+ openFd file ReadOnly (Just mode) defaultFileFlags+ liftIO $ waitToSetLock lockhandle (ReadLock, AbsoluteSeek, 0, 0)+#else+ lockhandle <- liftIO $ waitToLock $ lockShared file+#endif+ changeLockPool $ M.insert file lockhandle++unlockFile :: FilePath -> Annex ()+unlockFile file = maybe noop go =<< fromLockPool file+ where+ go lockhandle = do+#ifndef mingw32_HOST_OS+ liftIO $ closeFd lockhandle+#else+ liftIO $ dropLock lockhandle+#endif+ changeLockPool $ M.delete file++getLockPool :: Annex LockPool+getLockPool = getState lockpool++fromLockPool :: FilePath -> Annex (Maybe LockHandle)+fromLockPool file = M.lookup file <$> getLockPool++changeLockPool :: (LockPool -> LockPool) -> Annex ()+changeLockPool a = do+ m <- getLockPool+ changeState $ \s -> s { lockpool = a m }++{- Runs an action with an exclusive lock held. If the lock is already+ - held, blocks until it becomes free. -}+withExclusiveLock :: (Git.Repo -> FilePath) -> Annex a -> Annex a+withExclusiveLock getlockfile a = do+ lockfile <- fromRepo getlockfile+ createAnnexDirectory $ takeDirectory lockfile+ mode <- annexFileMode+ bracketIO (lock lockfile mode) unlock (const a)+ where+#ifndef mingw32_HOST_OS+ lock lockfile mode = do+ l <- noUmask mode $ createFile lockfile mode+ waitToSetLock l (WriteLock, AbsoluteSeek, 0, 0)+ return l+ unlock = closeFd+#else+ lock lockfile _mode = waitToLock $ lockExclusive lockfile+ unlock = dropLock+#endif
− Annex/LockPool.hs
@@ -1,60 +0,0 @@-{- git-annex lock pool- -- - Copyright 2012, 2014 Joey Hess <joey@kitenet.net>- -- - Licensed under the GNU GPL version 3 or higher.- -}--{-# LANGUAGE CPP #-}--module Annex.LockPool where--import Common.Annex-import Annex-import Types.LockPool--import qualified Data.Map as M--#ifndef mingw32_HOST_OS-import Annex.Perms-#else-import Utility.WinLock-#endif--{- Create a specified lock file, and takes a shared lock. -}-lockFile :: FilePath -> Annex ()-lockFile file = go =<< fromPool file- where- go (Just _) = noop -- already locked- go Nothing = do-#ifndef mingw32_HOST_OS- mode <- annexFileMode- lockhandle <- liftIO $ noUmask mode $- openFd file ReadOnly (Just mode) defaultFileFlags- liftIO $ waitToSetLock lockhandle (ReadLock, AbsoluteSeek, 0, 0)-#else- lockhandle <- liftIO $ waitToLock $ lockShared file-#endif- changePool $ M.insert file lockhandle--unlockFile :: FilePath -> Annex ()-unlockFile file = maybe noop go =<< fromPool file- where- go lockhandle = do-#ifndef mingw32_HOST_OS- liftIO $ closeFd lockhandle-#else- liftIO $ dropLock lockhandle-#endif- changePool $ M.delete file--getPool :: Annex LockPool-getPool = getState lockpool--fromPool :: FilePath -> Annex (Maybe LockHandle)-fromPool file = M.lookup file <$> getPool--changePool :: (LockPool -> LockPool) -> Annex ()-changePool a = do- m <- getPool- changeState $ \s -> s { lockpool = a m }
Annex/ReplaceFile.hs view
@@ -23,11 +23,16 @@ - Throws an IO exception when it was unable to replace the file. -} replaceFile :: FilePath -> (FilePath -> Annex ()) -> Annex ()-replaceFile file a = do+replaceFile file action = replaceFileOr file action (liftIO . nukeFile)++{- If unable to replace the file with the temp file, runs the+ - rollback action, which is responsible for cleaning up the temp file. -}+replaceFileOr :: FilePath -> (FilePath -> Annex ()) -> (FilePath -> Annex ()) -> Annex ()+replaceFileOr file action rollback = do tmpdir <- fromRepo gitAnnexTmpMiscDir void $ createAnnexDirectory tmpdir- bracketIO (setup tmpdir) nukeFile $ \tmpfile -> do- a tmpfile+ bracketAnnex (liftIO $ setup tmpdir) rollback $ \tmpfile -> do+ action tmpfile liftIO $ catchIO (rename tmpfile file) (fallback tmpfile) where setup tmpdir = do
Annex/Ssh.hs view
@@ -25,7 +25,7 @@ import System.Exit import Common.Annex-import Annex.LockPool+import Annex.LockFile import qualified Build.SysConfig as SysConfig import qualified Annex import qualified Git@@ -119,13 +119,13 @@ -- If the lock pool is empty, this is the first ssh of this -- run. There could be stale ssh connections hanging around -- from a previous git-annex run that was interrupted.- whenM (not . any isLock . M.keys <$> getPool)+ whenM (not . any isLock . M.keys <$> getLockPool) sshCleanup -- Cleanup at end of this run. Annex.addCleanup SshCachingCleanup sshCleanup liftIO $ createDirectoryIfMissing True $ parentDir socketfile- lockFile $ socket2lock socketfile+ lockFileShared $ socket2lock socketfile enumSocketFiles :: Annex [FilePath] enumSocketFiles = go =<< sshCacheDir
Assistant.hs view
@@ -76,6 +76,7 @@ Annex.changeState $ \s -> s { Annex.daemon = True } pidfile <- fromRepo gitAnnexPidFile logfile <- fromRepo gitAnnexLogFile+ liftIO $ debugM desc $ "logging to " ++ logfile #ifndef mingw32_HOST_OS createAnnexDirectory (parentDir logfile) logfd <- liftIO $ handleToFd =<< openLog logfile@@ -85,9 +86,7 @@ fdToHandle =<< dup stdOutput origerr <- liftIO $ catchMaybeIO $ fdToHandle =<< dup stdError- let undaemonize a = do- debugM desc $ "logging to " ++ logfile- Utility.Daemon.foreground logfd (Just pidfile) a+ let undaemonize = Utility.Daemon.foreground logfd (Just pidfile) start undaemonize $ case startbrowser of Nothing -> Nothing@@ -102,9 +101,6 @@ createAnnexDirectory (parentDir logfile) ifM (liftIO $ isNothing <$> getEnv flag) ( liftIO $ withFile devNull WriteMode $ \nullh -> do- Utility.Daemon.lockPidFile pidfile- when (not foreground) $- debugM desc $ "logging to " ++ logfile loghandle <- openLog logfile e <- getEnvironment cmd <- readProgramFile@@ -116,7 +112,7 @@ , std_err = UseHandle loghandle } exitWith =<< waitForProcess pid- , start id $ do+ , start (Utility.Daemon.foreground (Just pidfile)) $ case startbrowser of Nothing -> Nothing Just a -> Just $ a Nothing Nothing
Assistant/Install.hs view
@@ -92,9 +92,9 @@ #ifdef linux_HOST_OS installNautilus program = do scriptdir <- (\d -> d </> "nautilus" </> "scripts") <$> userDataDir- whenM (doesDirectoryExist scriptdir) $ do- genscript scriptdir "get"- genscript scriptdir "drop"+ createDirectoryIfMissing True scriptdir+ genscript scriptdir "get"+ genscript scriptdir "drop" where genscript scriptdir action = installscript (scriptdir </> scriptname action) $ unlines
Assistant/WebApp/Types.hs view
@@ -154,9 +154,11 @@ data RepoKey = RepoKey KeyId | NoRepoKey deriving (Read, Show, Eq, Ord) +#if ! MIN_VERSION_path_pieces(0,1,4) instance PathPiece Bool where toPathPiece = pack . show fromPathPiece = readish . unpack+#endif instance PathPiece RemovableDrive where toPathPiece = pack . show
Backend/Hash.hs view
@@ -44,6 +44,7 @@ , getKey = keyValue hash , fsckKey = Just $ checkKeyChecksum hash , canUpgradeKey = Just needsUpgrade+ , fastMigrate = Just trivialMigrate } genBackendE :: Hash -> Maybe Backend@@ -128,6 +129,15 @@ needsUpgrade :: Key -> Bool needsUpgrade key = "\\" `isPrefixOf` keyHash key || any (not . validExtension) (takeExtensions $ keyName key)++{- Fast migration from hashE to hash backend. (Optimisation) -}+trivialMigrate :: Key -> Backend -> Maybe Key+trivialMigrate oldkey newbackend+ | keyBackendName oldkey == name newbackend ++ "E" = Just $ oldkey+ { keyName = keyHash oldkey+ , keyBackendName = name newbackend+ }+ | otherwise = Nothing hashFile :: Hash -> FilePath -> Integer -> Annex String hashFile hash file filesize = liftIO $ go hash
Backend/URL.hs view
@@ -24,6 +24,7 @@ , getKey = const $ return Nothing , fsckKey = Nothing , canUpgradeKey = Nothing+ , fastMigrate = Nothing } {- Every unique url has a corresponding key. -}
Backend/WORM.hs view
@@ -22,6 +22,7 @@ , getKey = keyValue , fsckKey = Nothing , canUpgradeKey = Nothing+ , fastMigrate = Nothing } {- The key includes the file size, modification time, and the
Build/Configure.hs view
@@ -60,7 +60,7 @@ Config key . MaybeStringConfig <$> search (shacmds n) where key = "sha" ++ show n- search [] = return Nothing+ search [] = return Nothing search (c:cmds) = do sha <- externalSHA c n "/dev/null" if sha == Right knowngood
Build/NullSoftInstaller.hs view
@@ -37,16 +37,15 @@ mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex] let license = tmpdir </> licensefile mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"] - extrafiles <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do + extrabins <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do p <- searchPath f when (isNothing p) $ print ("unable to find in PATH", f) return p - let webappscript = tmpdir </> "git-annex-webapp.vbs" webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp" autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart" - writeFile nsifile $ makeInstaller gitannex license $ - catMaybes extrafiles ++ + writeFile nsifile $ makeInstaller gitannex license + (catMaybes extrabins) [ webappscript, autostartscript ] mustSucceed "makensis" [File nsifile] removeFile nsifile -- left behind if makensis fails @@ -82,7 +81,7 @@ uninstaller = "git-annex-uninstall.exe" gitInstallDir :: Exp FilePath -gitInstallDir = fromString "$PROGRAMFILES\\Git\\bin" +gitInstallDir = fromString "$PROGRAMFILES\\Git" startMenuItem :: Exp FilePath startMenuItem = "$SMPROGRAMS/git-annex.lnk" @@ -99,8 +98,8 @@ , fromString "You can install git from http:////git-scm.com//" ] -makeInstaller :: FilePath -> FilePath -> [FilePath] -> String -makeInstaller gitannex license extrafiles = nsis $ do +makeInstaller :: FilePath -> FilePath -> [FilePath] -> [FilePath] -> String +makeInstaller gitannex license extrabins launchers = nsis $ do name "git-annex" outFile $ str installer {- Installing into the same directory as git avoids needing to modify @@ -122,7 +121,7 @@ [ Target "wscript.exe" , Parameters "\"$INSTDIR/git-annex-webapp.vbs\"" , StartOptions "SW_SHOWNORMAL" - , IconFile "$INSTDIR/git-annex.exe" + , IconFile "$INSTDIR/cmd/git-annex.exe" , IconIndex 2 , KeyboardShortcut "ALT|CONTROL|a" , Description "git-annex webapp" @@ -131,27 +130,34 @@ [ Target "wscript.exe" , Parameters "\"$INSTDIR/git-annex-autostart.vbs\"" , StartOptions "SW_SHOWNORMAL" - , IconFile "$INSTDIR/git-annex.exe" + , IconFile "$INSTDIR/cmd/git-annex.exe" , IconIndex 2 , Description "git-annex autostart" ] - -- Groups of files to install - section "main" [] $ do - setOutPath "$INSTDIR" + section "bins" [] $ do + setOutPath "$INSTDIR\\bin" + mapM_ addfile extrabins + section "cmd" [] $ do + setOutPath "$INSTDIR\\cmd" addfile gitannex + section "meta" [] $ do + setOutPath "$INSTDIR" addfile license - mapM_ addfile extrafiles + mapM_ addfile launchers writeUninstaller $ str uninstaller uninstall $ do delete [RebootOK] $ startMenuItem delete [RebootOK] $ autoStartItem - mapM_ (\f -> delete [RebootOK] $ fromString $ "$INSTDIR/" ++ f) $ - [ gitannexprogram - , licensefile + removefilesFrom "$INSTDIR/bin" extrabins + removefilesFrom "$INSTDIR/cmd" [gitannex] + removefilesFrom "$INSTDIR" $ + launchers ++ + [ license , uninstaller - ] ++ cygwinPrograms ++ cygwinDlls ++ extrafiles + ] where addfile f = file [] (str f) + removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f) cygwinPrograms :: [FilePath] cygwinPrograms = map (\p -> p ++ ".exe") bundledPrograms
CHANGELOG view
@@ -1,3 +1,34 @@+git-annex (5.20140717) unstable; urgency=high++ * Fix minor FD leak in journal code. Closes: #754608+ * direct: Fix handling of case where a work tree subdirectory cannot+ be written to due to permissions.+ * migrate: Avoid re-checksumming when migrating from hashE to hash backend.+ * uninit: Avoid failing final removal in some direct mode repositories+ due to file modes.+ * S3: Deal with AWS ACL configurations that do not allow creating or+ checking the location of a bucket, but only reading and writing content to+ it.+ * resolvemerge: New plumbing command that runs the automatic merge conflict+ resolver.+ * Deal with change in git 2.0 that made indirect mode merge conflict+ resolution leave behind old files.+ * sync: Fix git sync with local git remotes even when they don't have an+ annex.uuid set. (The assistant already did so.)+ * Set gcrypt-publish-participants when setting up a gcrypt repository,+ to avoid unncessary passphrase prompts.+ This is a security/usability tradeoff. To avoid exposing the gpg key+ ids who can decrypt the repository, users can unset+ gcrypt-publish-participants.+ * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet+ exist, since it is not automatically created for Gnome 3 users.+ * Windows: Move .vbs files out of git\bin, to avoid that being in the+ PATH, which caused some weird breakage. (Thanks, divB)+ * Windows: Fix locking issue that prevented the webapp starting+ (since 5.20140707).++ -- Joey Hess <joeyh@debian.org> Thu, 17 Jul 2014 11:27:25 -0400+ git-annex (5.20140709) unstable; urgency=medium * Fix race in direct mode merge code that could cause all files in the
CmdLine/GitAnnex.hs view
@@ -54,6 +54,7 @@ import qualified Command.List import qualified Command.Log import qualified Command.Merge+import qualified Command.ResolveMerge import qualified Command.Info import qualified Command.Status import qualified Command.Migrate@@ -164,6 +165,7 @@ , Command.List.def , Command.Log.def , Command.Merge.def+ , Command.ResolveMerge.def , Command.Info.def , Command.Status.def , Command.Migrate.def
Command/ImportFeed.hs view
@@ -265,7 +265,7 @@ - Throws an error if the feed is broken, otherwise shows a warning. -} feedProblem :: URLString -> String -> Annex () feedProblem url message = ifM (checkFeedBroken url)- ( error $ message ++ " (having repeated problems with this feed!)"+ ( error $ message ++ " (having repeated problems with feed: " ++ url ++ ")" , warning $ "warning: " ++ message )
Command/Migrate.hs view
@@ -11,7 +11,7 @@ import Command import Backend import qualified Types.Key-import qualified Types.Backend+import Types.Backend (canUpgradeKey, fastMigrate) import Types.KeySource import Annex.Content import qualified Command.ReKey@@ -51,8 +51,7 @@ upgradableKey :: Backend -> Key -> Bool upgradableKey backend key = isNothing (Types.Key.keySize key) || backendupgradable where- backendupgradable = maybe False (\a -> a key)- (Types.Backend.canUpgradeKey backend)+ backendupgradable = maybe False (\a -> a key) (canUpgradeKey backend) {- Store the old backend's key in the new backend - The old backend's key is not dropped from it, because there may@@ -67,15 +66,22 @@ perform file oldkey oldbackend newbackend = go =<< genkey where go Nothing = stop- go (Just newkey) = stopUnless checkcontent $ finish newkey+ go (Just (newkey, knowngoodcontent))+ | knowngoodcontent = finish newkey+ | otherwise = stopUnless checkcontent $ finish newkey checkcontent = Command.Fsck.checkBackend oldbackend oldkey $ Just file finish newkey = stopUnless (Command.ReKey.linkKey oldkey newkey) $ next $ Command.ReKey.cleanup file oldkey newkey- genkey = do- content <- calcRepo $ gitAnnexLocation oldkey- let source = KeySource- { keyFilename = file- , contentLocation = content- , inodeCache = Nothing- }- liftM fst <$> genKey source (Just newbackend)+ genkey = case maybe Nothing (\fm -> fm oldkey newbackend) (fastMigrate oldbackend) of+ Just newkey -> return $ Just (newkey, True)+ Nothing -> do+ content <- calcRepo $ gitAnnexLocation oldkey+ let source = KeySource+ { keyFilename = file+ , contentLocation = content+ , inodeCache = Nothing+ }+ v <- genKey source (Just newbackend)+ return $ case v of+ Just (newkey, _) -> Just (newkey, False)+ _ -> Nothing
+ Command/ResolveMerge.hs view
@@ -0,0 +1,40 @@+{- git-annex command+ -+ - Copyright 2014 Joey Hess <joey@kitenet.net>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++module Command.ResolveMerge where++import Common.Annex+import Command+import qualified Git+import Git.Sha+import qualified Git.Branch+import Annex.AutoMerge++def :: [Command]+def = [command "resolvemerge" paramNothing seek SectionPlumbing+ "resolve merge conflicts"]++seek :: CommandSeek+seek ps = withNothing start ps++start :: CommandStart+start = do+ showStart "resolvemerge" ""+ us <- fromMaybe nobranch <$> inRepo Git.Branch.current+ d <- fromRepo Git.localGitDir+ let merge_head = d </> "MERGE_HEAD"+ them <- fromMaybe (error nomergehead) . extractSha+ <$> liftIO (readFile merge_head)+ ifM (resolveMerge (Just us) them)+ ( do+ void $ commitResolvedMerge Git.Branch.ManualCommit+ next $ next $ return True+ , error "Merge conflict could not be automatically resolved."+ )+ where+ nobranch = error "No branch is currently checked out."+ nomergehead = error "No SHA found in .git/merge_head"
Command/Uninit.hs view
@@ -16,7 +16,11 @@ import qualified Annex.Branch import Annex.Content import Annex.Init+import Utility.FileMode +import System.IO.HVFS+import System.IO.HVFS.Utils+ def :: [Command] def = [addCheck check $ command "uninit" paramPaths seek SectionUtility "de-initialize git-annex and clean out repository"]@@ -56,6 +60,7 @@ annexdir <- fromRepo gitAnnexDir annexobjectdir <- fromRepo gitAnnexObjectDir leftovers <- removeUnannexed =<< getKeysPresent InAnnex+ liftIO $ prepareRemoveAnnexDir annexdir if null leftovers then liftIO $ removeDirectoryRecursive annexdir else error $ unlines@@ -81,6 +86,12 @@ inRepo $ Git.Command.run [Param "branch", Param "-D", Param $ Git.fromRef Annex.Branch.name] liftIO exitSuccess++{- Turn on write bits in all remaining files in the annex directory, in+ - preparation for removal. -}+prepareRemoveAnnexDir :: FilePath -> IO ()+prepareRemoveAnnexDir annexdir =+ recurseDir SystemFS annexdir >>= mapM_ (void . tryIO . allowWrite) {- Keys that were moved out of the annex have a hard link still in the - annex, with > 1 link count, and those can be removed.
Command/Vicfg.hs view
@@ -139,9 +139,11 @@ grouplist = unwords $ map fromStandardGroup [minBound..] preferredcontent = settings cfg descs cfgPreferredContentMap- [ com "Repository preferred contents" ]+ [ com "Repository preferred contents"+ , com "(Set to \"standard\" to use a repository's group's preferred contents)"+ ] (\(s, u) -> line "wanted" u s)- (\u -> line "wanted" u "standard")+ (\u -> line "wanted" u "") requiredcontent = settings cfg descs cfgRequiredContentMap [ com "Repository required contents" ]@@ -153,7 +155,7 @@ , com "(Used by repositories with \"groupwanted\" in their preferred contents)" ] (\(s, g) -> gline g s)- (\g -> gline g "standard")+ (\g -> gline g "") where gline g value = [ unwords ["groupwanted", g, "=", value] ] allgroups = S.unions $ stdgroups : M.elems (cfgGroupMap cfg)
Git/GCrypt.hs view
@@ -99,6 +99,9 @@ remoteParticipantConfigKey :: RemoteName -> String remoteParticipantConfigKey = remoteConfigKey "gcrypt-participants" +remotePublishParticipantConfigKey :: RemoteName -> String+remotePublishParticipantConfigKey = remoteConfigKey "gcrypt-publish-participants"+ remoteSigningKey :: RemoteName -> String remoteSigningKey = remoteConfigKey "gcrypt-signingkey"
Remote/GCrypt.hs view
@@ -263,10 +263,14 @@ - participants, which gcrypt requires is the case, and may not be - depending on system configuration. -- - (For shared encryption, gcrypt's default behavior is used.) -}+ - (For shared encryption, gcrypt's default behavior is used.)+ -+ - Also, sets gcrypt-publish-participants to avoid unncessary gpg+ - passphrase prompts.+ -} setGcryptEncryption :: RemoteConfig -> String -> Annex () setGcryptEncryption c remotename = do- let participants = ConfigKey $ Git.GCrypt.remoteParticipantConfigKey remotename+ let participants = remoteconfig Git.GCrypt.remoteParticipantConfigKey case extractCipher c of Nothing -> noCrypto Just (EncryptedCipher _ _ (KeyIds { keyIds = ks})) -> do@@ -278,6 +282,10 @@ (k:_) -> setConfig signingkey k Just (SharedCipher _) -> unsetConfig participants+ setConfig (remoteconfig Git.GCrypt.remotePublishParticipantConfigKey)+ (Git.Config.boolConfig True)+ where+ remoteconfig n = ConfigKey $ n remotename store :: Remote -> Remote.Rsync.RsyncOpts -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool store r rsyncopts (cipher, enck) k p
Remote/Git.hs view
@@ -191,20 +191,11 @@ | Git.repoIsHttp r = store geturlconfig | Git.GCrypt.isEncrypted r = handlegcrypt =<< getConfigMaybe (remoteConfig r "uuid") | Git.repoIsUrl r = return r- | otherwise = store $ safely $ do- s <- Annex.new r- Annex.eval s $ do- Annex.BranchState.disableUpdate- ensureInitialized- Annex.getState Annex.repo+ | otherwise = store $ liftIO $ + readlocalannexconfig `catchNonAsync` (const $ return r) where haveconfig = not . M.null . Git.config - -- Reading config can fail due to IO error or- -- for other reasons; catch all possible exceptions.- safely a = either (const $ return r) return- =<< liftIO (try a :: IO (Either SomeException Git.Repo))- pipedconfig cmd params = do v <- Git.Config.fromPipe r cmd params case v of@@ -282,6 +273,16 @@ Nothing -> return r Just v -> store $ liftIO $ setUUID r $ genUUIDInNameSpace gCryptNameSpace v++ {- The local repo may not yet be initialized, so try to initialize+ - it if allowed. However, if that fails, still return the read+ - git config. -}+ readlocalannexconfig = do+ s <- Annex.new r+ Annex.eval s $ do+ Annex.BranchState.disableUpdate+ void $ tryAnnex $ ensureInitialized+ Annex.getState Annex.repo {- Checks if a given remote has the content for a key inAnnex. - If the remote cannot be accessed, or if it cannot determine
Remote/Helper/Hooks.hs view
@@ -15,7 +15,7 @@ import Types.Remote import Types.CleanupActions import qualified Annex-import Annex.LockPool+import Annex.LockFile #ifndef mingw32_HOST_OS import Annex.Perms #else@@ -48,7 +48,7 @@ runHooks r starthook stophook a = do dir <- fromRepo gitAnnexRemotesDir let lck = dir </> remoteid ++ ".lck"- whenM (notElem lck . M.keys <$> getPool) $ do+ whenM (notElem lck . M.keys <$> getLockPool) $ do liftIO $ createDirectoryIfMissing True dir firstrun lck a@@ -63,7 +63,7 @@ -- of it from running the stophook. If another -- instance is shutting down right now, this -- will block waiting for its exclusive lock to clear.- lockFile lck+ lockFileShared lck -- The starthook is run even if some other git-annex -- is already running, and ran it before.
Remote/S3.hs view
@@ -255,20 +255,28 @@ | isSpace c = [] | otherwise = "&" ++ show (ord c) ++ ";" +{- Generate the bucket if it does not already exist, including creating the+ - UUID file within the bucket.+ -+ - To check if the bucket exists, ask for its location. However, some ACLs+ - can allow read/write to buckets, but not querying location, so first+ - check if the UUID file already exists and we can skip doing anything.+ -} genBucket :: RemoteConfig -> UUID -> Annex () genBucket c u = do conn <- s3ConnectionRequired c u showAction "checking bucket"- loc <- liftIO $ getBucketLocation conn bucket - case loc of- Right _ -> writeUUIDFile c u- Left err@(NetworkError _) -> s3Error err- Left (AWSError _ _) -> do- showAction $ "creating bucket in " ++ datacenter- res <- liftIO $ createBucketIn conn bucket datacenter- case res of- Right _ -> writeUUIDFile c u- Left err -> s3Error err+ unlessM ((== Right True) <$> checkUUIDFile c u conn) $ do+ loc <- liftIO $ getBucketLocation conn bucket+ case loc of+ Right _ -> writeUUIDFile c u+ Left err@(NetworkError _) -> s3Error err+ Left (AWSError _ _) -> do+ showAction $ "creating bucket in " ++ datacenter+ res <- liftIO $ createBucketIn conn bucket datacenter+ case res of+ Right _ -> writeUUIDFile c u+ Left err -> s3Error err where bucket = fromJust $ getBucket c datacenter = fromJust $ M.lookup "datacenter" c@@ -284,19 +292,37 @@ writeUUIDFile :: RemoteConfig -> UUID -> Annex () writeUUIDFile c u = do conn <- s3ConnectionRequired c u- go conn =<< liftIO (tryNonAsync $ getObject conn $ mkobject L.empty)+ v <- checkUUIDFile c u conn+ case v of+ Left e -> error e+ Right True -> return ()+ Right False -> do+ let object = setStorageClass (getStorageClass c) (mkobject uuidb)+ either s3Error return =<< liftIO (sendObject conn object) where- go _conn (Right (Right o)) = unless (obj_data o == uuidb) $- error $ "This bucket is already in use by a different S3 special remote, with UUID: " ++ show (obj_data o)- go conn _ = do- let object = setStorageClass (getStorageClass c) (mkobject uuidb)- either s3Error return =<< liftIO (sendObject conn object)+ file = uuidFile c+ uuidb = L.fromChunks [T.encodeUtf8 $ T.pack $ fromUUID u]+ bucket = fromJust $ getBucket c - file = filePrefix c ++ "annex-uuid"+ mkobject = S3Object bucket file "" (getXheaders c)++{- Checks if the UUID file exists in the bucket and has the specified UUID already. -}+checkUUIDFile :: RemoteConfig -> UUID -> AWSConnection -> Annex (Either String Bool)+checkUUIDFile c u conn = check <$> liftIO (tryNonAsync $ getObject conn $ mkobject L.empty)+ where+ check (Right (Right o))+ | obj_data o == uuidb = Right True+ | otherwise = Left $ "This bucket is already in use by a different S3 special remote, with UUID: " ++ show (obj_data o)+ check _ = Right False+ uuidb = L.fromChunks [T.encodeUtf8 $ T.pack $ fromUUID u] bucket = fromJust $ getBucket c+ file = uuidFile c mkobject = S3Object bucket file "" (getXheaders c)++uuidFile :: RemoteConfig -> FilePath+uuidFile c = filePrefix c ++ "annex-uuid" s3ConnectionRequired :: RemoteConfig -> UUID -> Annex AWSConnection s3ConnectionRequired c u =
Test.hs view
@@ -22,9 +22,7 @@ #endif import Control.Exception.Extensible import qualified Data.Map as M-import System.IO.HVFS (SystemFS(..)) import qualified Text.JSON-import System.Path import Common @@ -78,6 +76,7 @@ import qualified Utility.Scheduled import qualified Utility.HumanTime import qualified Utility.ThreadScheduler+import qualified Command.Uninit #ifndef mingw32_HOST_OS import qualified CmdLine.GitAnnex as GitAnnex import qualified Remote.Helper.Encryptable@@ -218,10 +217,11 @@ , check "conflict resolution" test_conflict_resolution , check "conflict resolution movein regression" test_conflict_resolution_movein_regression , check "conflict resolution (mixed directory and file)" test_mixed_conflict_resolution- , check "conflict resolution symlinks" test_conflict_resolution_symlinks+ , check "conflict resolution symlink bit" test_conflict_resolution_symlink_bit , check "conflict resolution (uncommitted local file)" test_uncommitted_conflict_resolution , check "conflict resolution (removed file)" test_remove_conflict_resolution- , check "conflict resolution (nonannexed)" test_nonannexed_conflict_resolution+ , check "conflict resolution (nonannexed file)" test_nonannexed_file_conflict_resolution+ , check "conflict resolution (nonannexed symlink)" test_nonannexed_symlink_conflict_resolution , check "map" test_map , check "uninit" test_uninit , check "uninit (in git-annex branch)" test_uninit_inbranch@@ -857,6 +857,7 @@ let v = filter (variantprefix `isPrefixOf`) l length v == 2 @? (what ++ " not exactly 2 variant files in: " ++ show l)+ conflictor `notElem` l @? ("conflictor still present after conflict resolution") indir testenv d $ do git_annex testenv "get" v @? "get failed" git_annex_expectoutput testenv "find" v v@@ -946,14 +947,14 @@ length v == 1 @? (what ++ " too many variant files in: " ++ show v) -{- Check merge confalict resolution when a file is annexed in one repo,- - and checked directly into git in the other repo.- -- - This test requires indirect mode to set it up, but tests both direct and- - indirect mode.- -}-test_nonannexed_conflict_resolution :: TestEnv -> Assertion-test_nonannexed_conflict_resolution testenv = do+ {- Check merge confalict resolution when a file is annexed in one repo,+ - and checked directly into git in the other repo.+ -+ - This test requires indirect mode to set it up, but tests both direct and+ - indirect mode.+ -}+test_nonannexed_file_conflict_resolution :: TestEnv -> Assertion+test_nonannexed_file_conflict_resolution testenv = do check True False check False False check True True@@ -995,6 +996,57 @@ s == Just nonannexed_content @? (what ++ " wrong content for nonannexed file: " ++ show s) ++{- Check merge confalict resolution when a file is annexed in one repo,+ - and is a non-git-annex symlink in the other repo.+ -+ - Test can only run when coreSymlinks is supported, because git needs to+ - be able to check out the non-git-annex symlink.+ -}+test_nonannexed_symlink_conflict_resolution :: TestEnv -> Assertion+test_nonannexed_symlink_conflict_resolution testenv = do+ check True False+ check False False+ check True True+ check False True+ where+ check inr1 switchdirect = withtmpclonerepo testenv False $ \r1 ->+ withtmpclonerepo testenv False $ \r2 -> do+ whenM (checkRepo (Types.coreSymlinks <$> Annex.getGitConfig) r1+ <&&> isInDirect r1 <&&> isInDirect r2) $ do+ indir testenv r1 $ do+ disconnectOrigin+ writeFile conflictor "conflictor"+ git_annex testenv "add" [conflictor] @? "add conflicter failed"+ git_annex testenv "sync" [] @? "sync failed in r1"+ indir testenv r2 $ do+ disconnectOrigin+ createSymbolicLink symlinktarget "conflictor"+ boolSystem "git" [Params "add", File conflictor] @? "git add conflictor failed"+ git_annex testenv "sync" [] @? "sync failed in r2"+ pair testenv r1 r2+ let l = if inr1 then [r1, r2] else [r2, r1]+ forM_ l $ \r -> indir testenv r $ do+ when switchdirect $+ git_annex testenv "direct" [] @? "failed switching to direct mode"+ git_annex testenv "sync" [] @? "sync failed"+ checkmerge ("r1" ++ show switchdirect) r1+ checkmerge ("r2" ++ show switchdirect) r2+ conflictor = "conflictor"+ symlinktarget = "dummy-target"+ variantprefix = conflictor ++ ".variant"+ checkmerge what d = do+ l <- getDirectoryContents d+ let v = filter (variantprefix `isPrefixOf`) l+ not (null v)+ @? (what ++ " conflictor variant file missing in: " ++ show l )+ length v == 1+ @? (what ++ " too many variant files in: " ++ show v)+ conflictor `elem` l @? (what ++ " conflictor file missing in: " ++ show l)+ s <- catchMaybeIO (readSymbolicLink (d </> conflictor))+ s == Just symlinktarget+ @? (what ++ " wrong target for nonannexed symlink: " ++ show s)+ {- Check merge conflict resolution when there is a local file, - that is not staged or committed, that conflicts with what's being added - from the remmote.@@ -1045,8 +1097,8 @@ {- On Windows/FAT, repeated conflict resolution sometimes - lost track of whether a file was a symlink. -}-test_conflict_resolution_symlinks :: TestEnv -> Assertion-test_conflict_resolution_symlinks testenv = do+test_conflict_resolution_symlink_bit :: TestEnv -> Assertion+test_conflict_resolution_symlink_bit testenv = do withtmpclonerepo testenv False $ \r1 -> withtmpclonerepo testenv False $ \r2 -> do withtmpclonerepo testenv False $ \r3 -> do@@ -1360,11 +1412,14 @@ Annex.Init.initialize Nothing Config.isDirect -isInDirect :: FilePath -> IO Bool-isInDirect d = do+checkRepo :: Types.Annex a -> FilePath -> IO a+checkRepo getval d = do s <- Annex.new =<< Git.Construct.fromPath d- not <$> Annex.eval s Config.isDirect+ Annex.eval s getval +isInDirect :: FilePath -> IO Bool+isInDirect = checkRepo (not <$> Config.isDirect)+ intmpbareclonerepo :: TestEnv -> Assertion -> Assertion intmpbareclonerepo testenv a = withtmpclonerepo testenv True $ \r -> indir testenv r a @@ -1437,11 +1492,7 @@ cleanup' :: Bool -> FilePath -> IO () cleanup' final dir = whenM (doesDirectoryExist dir) $ do- -- Allow all files and directories to be written to, so- -- they can be deleted. Both git and git-annex use file- -- permissions to prevent deletion.- recurseDir SystemFS dir >>=- mapM_ (void . tryIO . Utility.FileMode.allowWrite)+ Command.Uninit.prepareRemoveAnnexDir dir -- This sometimes fails on Windows, due to some files -- being still opened by a subprocess. catchIO (removeDirectoryRecursive dir) $ \e ->
Types/Backend.hs view
@@ -17,6 +17,7 @@ , getKey :: KeySource -> a (Maybe Key) , fsckKey :: Maybe (Key -> FilePath -> a Bool) , canUpgradeKey :: Maybe (Key -> Bool)+ , fastMigrate :: Maybe (Key -> BackendA a -> Maybe Key) } instance Show (BackendA a) where
Utility/Daemon.hs view
@@ -21,6 +21,8 @@ #ifndef mingw32_HOST_OS import System.Posix import Control.Concurrent.Async+#else+import System.Exit #endif #ifndef mingw32_HOST_OS@@ -54,15 +56,26 @@ wait =<< asyncWithUnmask (\unmask -> unmask a) out out = exitImmediately ExitSuccess+#endif {- To run an action that is normally daemonized in the forground. -}+#ifndef mingw32_HOST_OS foreground :: Fd -> Maybe FilePath -> IO () -> IO () foreground logfd pidfile a = do+#else+foreground :: Maybe FilePath -> IO () -> IO ()+foreground pidfile a = do+#endif maybe noop lockPidFile pidfile+#ifndef mingw32_HOST_OS _ <- tryIO createSession redirLog logfd+#endif a+#ifndef mingw32_HOST_OS exitImmediately ExitSuccess+#else+ exitWith ExitSuccess #endif {- Locks the pid file, with an exclusive, non-blocking lock,
Utility/Directory.hs view
@@ -1,4 +1,4 @@-{- directory manipulation+{- directory traversal and manipulation - - Copyright 2011-2014 Joey Hess <joey@kitenet.net> -@@ -11,12 +11,14 @@ import System.IO.Error import System.Directory-import Control.Exception (throw)+import Control.Exception (throw, bracket) import Control.Monad import Control.Monad.IfElse import System.FilePath import Control.Applicative+import Control.Concurrent import System.IO.Unsafe (unsafeInterleaveIO)+import Data.Maybe #ifdef mingw32_HOST_OS import qualified System.Win32 as Win32@@ -31,44 +33,6 @@ import Utility.Monad import Utility.Applicative -{- Unlike getDirectoryContents, this can be used in arbitrarily- - large directories without using much memory; the list steams lazily.- -- - However, any errors that may be encountered while reading the directory- - contents are *ignored*, rather than throw them in the context of- - whatever code consumes the lazy list.- -- - See https://ghc.haskell.org/trac/ghc/ticket/9266- -}-getDirectoryContents' :: FilePath -> IO [FilePath]-getDirectoryContents' path = loop =<< opendir- where-#ifndef mingw32_HOST_OS- opendir = Posix.openDirStream path- loop dirp = do- v <- tryNonAsync $ Posix.readDirStream dirp- case v of- (Right ent) | not (null ent) -> do- rest <- unsafeInterleaveIO (loop dirp)- return (ent:rest)- _ -> do- void $ tryNonAsync $ Posix.closeDirStream dirp- return []-#else- opendir = Win32.findFirstFile (path </> "*")- loop (h, fdat) = do- -- there is always at least 1 file ("." and "..")- ent <- Win32.getFindDataFileName fdat- v <- tryNonAsync $ Win32.findNextFile h fdat- case v of- Right True -> do- rest <- unsafeInterleaveIO (loop (h, fdat))- return (ent:rest)- _ -> do- void $ tryNonAsync $ Win32.findClose h- return [ent]-#endif- dirCruft :: FilePath -> Bool dirCruft "." = True dirCruft ".." = True@@ -177,3 +141,90 @@ #else go = removeFile file #endif++#ifndef mingw32_HOST_OS+data DirectoryHandle = DirectoryHandle IsOpen Posix.DirStream+#else+data DirectoryHandle = DirectoryHandle IsOpen Win32.HANDLE Win32.FindData (MVar ())+#endif++type IsOpen = MVar () -- full when the handle is open++openDirectory :: FilePath -> IO DirectoryHandle+openDirectory path = do+#ifndef mingw32_HOST_OS+ dirp <- Posix.openDirStream path+ isopen <- newMVar ()+ return (DirectoryHandle isopen dirp)+#else+ (h, fdat) <- Win32.findFirstFile (path </> "*")+ -- Indicate that the fdat contains a filename that readDirectory+ -- has not yet returned, by making the MVar be full.+ -- (There's always at least a "." entry.)+ alreadyhave <- newMVar ()+ isopen <- newMVar ()+ return (DirectoryHandle isopen h fdat alreadyhave)+#endif++closeDirectory :: DirectoryHandle -> IO ()+#ifndef mingw32_HOST_OS+closeDirectory (DirectoryHandle isopen dirp) =+ whenOpen isopen $+ Posix.closeDirStream dirp+#else+closeDirectory (DirectoryHandle isopen h _ alreadyhave) =+ whenOpen isopen $ do+ _ <- tryTakeMVar alreadyhave+ Win32.findClose h+#endif+ where+ whenOpen :: IsOpen -> IO () -> IO ()+ whenOpen mv f = do+ v <- tryTakeMVar mv+ when (isJust v) f++{- |Reads the next entry from the handle. Once the end of the directory+is reached, returns Nothing and automatically closes the handle.+-}+readDirectory :: DirectoryHandle -> IO (Maybe FilePath)+#ifndef mingw32_HOST_OS+readDirectory hdl@(DirectoryHandle _ dirp) = do+ e <- Posix.readDirStream dirp+ if null e+ then do+ closeDirectory hdl+ return Nothing+ else return (Just e)+#else+readDirectory hdl@(DirectoryHandle _ h fdat mv) = do+ -- If the MVar is full, then the filename in fdat has+ -- not yet been returned. Otherwise, need to find the next+ -- file.+ r <- tryTakeMVar mv+ case r of+ Just () -> getfn+ Nothing -> do+ more <- Win32.findNextFile h fdat+ if more+ then getfn+ else do+ closeDirectory hdl+ return Nothing+ where+ getfn = do+ filename <- Win32.getFindDataFileName fdat+ return (Just filename)+#endif++-- True only when directory exists and contains nothing.+-- Throws exception if directory does not exist.+isDirectoryEmpty :: FilePath -> IO Bool+isDirectoryEmpty d = bracket (openDirectory d) closeDirectory check+ where+ check h = do+ v <- readDirectory h+ case v of+ Nothing -> return True+ Just f+ | not (dirCruft f) -> return False+ | otherwise -> check h
Utility/ExternalSHA.hs view
@@ -14,6 +14,7 @@ import Utility.Process import Utility.FileSystemEncoding import Utility.Misc+import Utility.Exception import Data.List import Data.Char@@ -22,7 +23,7 @@ externalSHA :: String -> Int -> FilePath -> IO (Either String String) externalSHA command shasize file = do- ls <- lines <$> readsha (toCommand [File file])+ ls <- lines <$> catchDefaultIO "" (readsha (toCommand [File file])) return $ sanitycheck =<< parse ls where {- sha commands output the filename, so need to set fileEncoding -}
Utility/ThreadScheduler.hs view
@@ -57,8 +57,7 @@ waitForTermination :: IO () waitForTermination = do #ifdef mingw32_HOST_OS- runEvery (Seconds 600) $- void getLine+ forever $ threadDelaySeconds (Seconds 6000) #else lock <- newEmptyMVar let check sig = void $
debian/changelog view
@@ -1,3 +1,34 @@+git-annex (5.20140717) unstable; urgency=high++ * Fix minor FD leak in journal code. Closes: #754608+ * direct: Fix handling of case where a work tree subdirectory cannot+ be written to due to permissions.+ * migrate: Avoid re-checksumming when migrating from hashE to hash backend.+ * uninit: Avoid failing final removal in some direct mode repositories+ due to file modes.+ * S3: Deal with AWS ACL configurations that do not allow creating or+ checking the location of a bucket, but only reading and writing content to+ it.+ * resolvemerge: New plumbing command that runs the automatic merge conflict+ resolver.+ * Deal with change in git 2.0 that made indirect mode merge conflict+ resolution leave behind old files.+ * sync: Fix git sync with local git remotes even when they don't have an+ annex.uuid set. (The assistant already did so.)+ * Set gcrypt-publish-participants when setting up a gcrypt repository,+ to avoid unncessary passphrase prompts.+ This is a security/usability tradeoff. To avoid exposing the gpg key+ ids who can decrypt the repository, users can unset+ gcrypt-publish-participants.+ * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet+ exist, since it is not automatically created for Gnome 3 users.+ * Windows: Move .vbs files out of git\bin, to avoid that being in the+ PATH, which caused some weird breakage. (Thanks, divB)+ * Windows: Fix locking issue that prevented the webapp starting+ (since 5.20140707).++ -- Joey Hess <joeyh@debian.org> Thu, 17 Jul 2014 11:27:25 -0400+ git-annex (5.20140709) unstable; urgency=medium * Fix race in direct mode merge code that could cause all files in the
doc/backends.mdwn view
@@ -5,8 +5,8 @@ Multiple pluggable key-value backends are supported, and a single repository can use different ones for different files. -* `SHA256E` -- The default backend for new files, combines a SHA256 hash of- the file's content with the file's extension. This allows+* `SHA256E` -- The default backend for new files, combines a 256 bit SHA-2+ hash of the file's content with the file's extension. This allows verifying that the file content is right, and can avoid duplicates of files with the same content. Its need to generate checksums can make it slower for large files. @@ -16,12 +16,13 @@ the same basename, size, and modification time has the same content. This is the least expensive backend, recommended for really large files or slow systems.-* `SHA512`, `SHA512E` -- Best currently available hash, for the very paranoid.+* `SHA512`, `SHA512E` -- Best SHA-2 hash, for the very paranoid. * `SHA1`, `SHA1E` -- Smaller hash than `SHA256` for those who want a checksum but are not concerned about security. * `SHA384`, `SHA384E`, `SHA224`, `SHA224E` -- Hashes for people who like unusual sizes.-* `SKEIN512`, `SKEIN256` -- [Skein hash](http://en.wikipedia.org/wiki/Skein_hash),+* `SKEIN512`, `SKEIN512E`, `SKEIN256`, `SKEIN256E`+ -- [Skein hash](http://en.wikipedia.org/wiki/Skein_hash), a well-regarded SHA3 hash competition finalist. The `annex.backends` git-config setting can be used to list the backends
− doc/backends/comment_7_de7ac3e84273d92b6907c694db54fb36._comment
@@ -1,9 +0,0 @@-[[!comment format=mdwn- username="https://www.google.com/accounts/o8/id?id=AItOawnfM7ZF0Q5U9k1LljyDXH37cuXU5Gx6gtM"- nickname="A"- subject="fast migrate"- date="2014-07-05T08:21:20Z"- content="""-dear Joey and everybody else,- some time ago I used \"git annex migrate\" to bring all my repositories up-to-date; after that I found (to my dismay) that some keys are SHA256, some others are SHA256E, so my data is not really deduplicated ; now, it would possible to migrate from SHAnnnE to SHAnnn (and vice versa) very fast... but currently AFAICS git-annex recomputes the whole checksum, and this (on my USB2.0 old disks) takes forever; may somebody please implement a fast migration?-"""]]
doc/bugs/Assistant_doesn__39__t_check_if_it_can_drop_files.mdwn view
@@ -60,3 +60,5 @@ git annex drop --auto works as expected.++> [[done]]; user misconfiguration. --[[Joey]]
doc/bugs/Moved_files_are_not_picked_up_by_the_assistant_on_OS_X.mdwn view
@@ -20,3 +20,5 @@ # End of transcript or log. """]]++[[!tag moreinfo]]
+ doc/bugs/Windows_daemon_silently_dies.mdwn view
@@ -0,0 +1,132 @@+### Please describe the problem.++Using the latest build, when the agent is started, it works ... and works ... and works ... until it silently dies at some point.++### What steps will reproduce the problem?++I hope this will reproduce:++* Create a remote with an invalid host which is not reachable+* Start git-annex-autostart.vbs+* Wait 5-30 minutes until no git.exe/git-annex.exe are visible any more in task manager (for my current test it took 10 minutes)+* Inspect the logs++### What version of git-annex are you using? On what operating system?++ $ git annex version+ git-annex version: 5.20140715-g622a376+ build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV DNS Feeds Quvi TDFA CryptoHash+ key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL+ remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier ddar hook external+ local repository version: 5+ supported repository version: 5+ upgrade supported from repository versions: 2 3 4++### Please provide any additional information below.++I hope/think that this is also related to what I wrote in:+https://git-annex.branchable.com/forum/Restricting_SSH_+_supply_key++Here the assistant apparently takes the wrong ssh.exe (from bin/ instead than cmd/ directory). This results in the fact that for some reason .ssh/config is not used.+In any case, the host alias can not be resolved.+At some point git annex assistant seems to die because of that, but I am not sure.+In any case, a non-reachable server should not be the cause that the assistant dies.+The last entries of daemon.log are always:++ git-annex: <stdin>: hGetLine: invalid argument (Bad file descriptor)+ failed+ git-annex: assistant: 1 failed ++So I think this is the cause.++[[!format sh """+[2014-07-14 21:21:19 Pacific Daylight Time] main: starting assistant version 5.20140715-g622a376+[2014-07-14 21:21:19 Pacific Daylight Time] Cronner: You should enable consistency checking to protect your data. +[2014-07-14 21:21:24 Pacific Daylight Time] TransferScanner: Syncing with 192.168.200.121 +(scanning...) [2014-07-14 21:21:25 Pacific Daylight Time] Watcher: Performing startup scan+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+sssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+sssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+(started...) [2014-07-14 21:21:43 Pacific Daylight Time] Committer: Committing changes to git+[2014-07-14 21:21:43 Pacific Daylight Time] Pusher: Syncing with 192.168.200.121 +ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+ssh: Could notssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+[2014-07-14 21:22:03 Pacific Daylight Time] Committer: Committing changes to git+fatal: Unable to create 'c:\data\annex\.git/index.lock': File exists.++If no other git process is currently running, this probably means a+git process crashed in this repository earlier. Make sure no other git+process is running and remove the file manually to continue.+fatal: Unable to create 'c:\data\annex\.git/index.lock': File exists.++If no other git process is currently running, this probably means a+git process crashed in this repository earlier. Make sure no other git+process is running and remove the file manually to continue.+Committer crashed: failed to read sha from git write-tree+[2014-07-14 21:22:03 Pacific Daylight Time] Committer: warning Committer crashed: failed to read sha from git write-tree+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known+fatal: Could not read from remote repository.++Please make sure you have the correct access rights+and the repository exists.+ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++ssh: Could not resolve hostname annex: hostname nor servname provided, or not known++Network.Socket.ByteString.send: does not exist (No such file or directory)+Network.Socket.ByteString.send: does not exist (No such file or directory)++(Recording state in git...)+(Recording state in git...)++git-annex: <stdin>: hGetLine: invalid argument (Bad file descriptor)+failed+git-annex: assistant: 1 failed +"""]]++[[!tag confirmed]]++> [[fixed|done]] --[[Joey]]
doc/bugs/__171__transferkey__187___fails_for_bare_remotes.mdwn view
@@ -17,3 +17,5 @@ git-annex 5.20140708 Linux 3.15.4++> [[done]] not a bug per comment.
+ doc/bugs/adding_a_remote_server_fails.mdwn view
@@ -0,0 +1,27 @@+### Please describe the problem.+I tried to add a remote server to my annex repo using the webapp.++### What steps will reproduce the problem?+Configuration -> Repositories -> Remote server -> Fill in stuff, use public key auth -> click "check this server" -> enjoy++### What version of git-annex are you using? On what operating system?+OpenSUSE Tumbleweed, git-annex 5.20140709-gc75193e++### Please provide any additional information below.+Error message: `user error (gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--with-colons","--list-secret-keys","--fixed-list-mode"] exited 2)`++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log+[2014-07-11 12:03:52 CEST] main: starting assistant version 5.20140709-gc75193e+[2014-07-11 12:03:53 CEST] UpgradeWatcher: Finished upgrading git-annex to version 5.20140709-gc75193e +(scanning...) [2014-07-11 12:03:53 CEST] Watcher: Performing startup scan+(started...) gpg: /home/zilti/.gnupg/gpg.conf:200: argument not expected+gpg: /home/zilti/.gnupg/gpg.conf:201: invalid option+gpg: /home/zilti/.gnupg/gpg.conf:200: argument not expected+gpg: /home/zilti/.gnupg/gpg.conf:201: invalid option++# End of transcript or log.+"""]]++[[!tag moreinfo]]
doc/bugs/bad_merge_commit_deleting_all_files.mdwn view
@@ -42,6 +42,9 @@ files as unused. This is most likely to happen in the repository that made the bad merge commit in the first place. +If you have any problems following these instructions, please contact+<urgent2014@joeyh.name> for support.+ [[!tag confirmed urgent]] ## analysis
doc/bugs/direct_mode_fails__44___left_in_an_inconsistent_state.mdwn view
@@ -56,3 +56,5 @@ git-annex: direct: 1 failed """]]++[[!tag moreinfo]]
doc/bugs/files_lost_during_upgrade.mdwn view
@@ -2186,3 +2186,6 @@ # End of transcript or log. """]]++> [[fixed|done]]; the merge race has been fixed. The upgrade loop has also+> been dealt with. --[[Joey]]
+ doc/bugs/git-annex_sync_does_not_push.mdwn view
@@ -0,0 +1,52 @@+### Please describe the problem.++From the description of `sync` in the man page I assume it should be able to push all the branches it needs:++> The sync process involves first committing all local changes, then fetching and merging the `synced/master` and the `git-annex` branch from the remote repositories, and finally pushing the changes back to those branches on the remote repositories. You can use standard git commands to do each of those steps by hand, or if you don't want to worry about the details, you can use sync.++However this does not seem to be the case if one starts from an empty repository.++### What steps will reproduce the problem?++The following script (from <https://gist.github.com/gioele/d4e0905a3570f097fb0b>) will reproduce this problem:++ #!/bin/sh -x+ + set -e ; set -u+ export LC_ALL=C+ + d=$(pwd)++ # cleanup+ chmod a+rwx -R REPO pc1 || true+ rm -Rf REPO pc1++ # create central git repo+ mkdir -p REPO/Docs.git+ cd REPO/Docs.git+ git init --bare+ cd $d++ # populate repo in PC1+ mkdir -p pc1/Docs+ cd pc1/Docs+ echo AAA > fileA+ echo BBB > fileB++ git init+ git remote add origin $d/REPO/Docs.git+ git fetch --all++ git annex init "pc1"+ git annex add .+ git annex sync++ find $d/REPO/Docs.git/refs++ # there should be some branches inside refs++### What version of git-annex are you using? On what operating system?++5.20140412ubuntu1 from Ubuntu 14.04.++> Documentation fixed, so provisionally [[done]] --[[Joey]]
doc/bugs/gpg_does_not_ask_for_password_inside_tmux.mdwn view
@@ -19,3 +19,7 @@ `tmux.conf` contains `set-option -g default-command $SHELL` (this means that a normal shell is spawned, not a login shell) Ubuntu 12.04.4++[[!tag moreinfo]]++> [[done]]; apparently a local misconfiguration of some sort. --[[Joey]]
+ doc/bugs/sync_does_not_commit_with_alwasycommit___61___false.mdwn view
@@ -0,0 +1,90 @@+### Please describe the problem.++The documentation of `git annex sync` states++> The sync process involves first committing all local changes, then fetching and merging […]+> You can use standard git commands to do each of those steps by hand, or if you+> don't want to worry about the details, you can use sync.++The documentation of `alwasycommit` states++> By default, git-annex automatically commits data to the git-annex branch after each+> command is run. To disable these commits, set to false. Then data will only be+> committed when running `git annex merge` (or by automatic merges) or `git annex sync`.++In fact, however, `git annex sync` will not commit or will not commit some pieces of information when `alwasycommit` is false. This leads to various problems, the first of which is that cloned repositories do not have information about the other remotes.++It is hard to work around this problem because `git commit` cannot be used in direct mode.++This problem does not show up when using local, non over-the-network, remotes.++### What steps will reproduce the problem?++The following script (available at <https://gist.github.com/gioele/5ffeff8988a535164e5b>) will reproduce this problem. If you do not have SSH running on localhost, you can change the `h` variable to point to another host.++ #!/bin/sh -x++ set -e ; set -u+ export LC_ALL=C++ h=${h:-localhost}+ dr="/tmp/annex"++ chmod a+rwx -R pc1 pc2 || true+ rm -Rf pc1 pc2++ # create central git repo+ ssh $h "chmod a+rwx -R ${dr}/Docs.git" || true+ ssh $h "rm -Rf ${dr}/Docs.git"+ ssh $h "mkdir -p ${dr}/Docs.git"+ ssh $h "cd ${dr}/Docs.git ; git init --bare"++ d=$(pwd)++ # populate repo in PC1+ mkdir -p pc1/Docs+ cd pc1/Docs+ echo AAA > fileA+ echo BBB > fileB++ git init+ git config annex.alwayscommit false # change to true to solve this problem++ git remote add origin $h:$dr/Docs.git+ git fetch --all++ # simulate a host without git-annex+ git config remote.origin.annex-ignore true++ git annex init "pc1"+ git annex info++ git annex direct+ git annex sync origin++ git annex add .+ git annex sync++ # re-create repo on PC2+ cd $d+ mkdir -p pc2+ cd pc2+ git clone $h:$dr/Docs.git+ cd Docs++ git config remote.origin.annex-ignore true++ git annex init "pc2"+ git annex direct+ git annex info++ # git annex info shows only pc2, shouldn't pc1 be there as well?++### What version of git-annex are you using? On what operating system?++git-annex version: 5.20140708-g8c9c55c on Ubuntu 12.04.4++> I have improved the documentation to not imply that sync/merge are a+> special case. They honor the autocommit settings more or less+> intentionally, and to get a commit to be made, just pass -c+> autocommit=true when running them. [[done]] --[[Joey]]
− doc/bugs/unwanted_repository_version_upgrades.mdwn
@@ -1,25 +0,0 @@-Is it possible to freeze or peg repositories at a particular version, or to prevent automatic repository version upgrades? Is it possible to "downgrade" a repository?--### Please describe the problem.--We have a number of repositories on a shared file server. These repositories are accessed by multiple machines. Some of these repositories appear to have gotten upgraded and are now unusable on machines running older versions of git-annex.--We're getting this message:-[[!format sh """-user@system:/path/to/repository$ git annex status-git-annex: Repository version 5 is not supported. Upgrade git-annex.-"""]]--The machine experiencing the problem is running Debian Wheezy (Stable).-[[!format sh """-user@system:/path/to/repository$ git version-git version 1.7.10.4-user@system:/path/to/repository$ git annex version-git-annex version: 3.20120629-local repository version: 5-default repository version: 3-supported repository versions: 3-upgrade supported from repository versions: 0 1 2-"""]]--I'm guessing that one of the machines with access to this repository was running a newer version of git-annex, and that the repository was upgraded in the course of some action.
+ doc/bugs/using_gpg_encryption_with_multiple_keys_fails.mdwn view
@@ -0,0 +1,57 @@+### Please describe the problem.+git-annex assistant uses wrong key if multiple are available. If there is only one gpg available it works without issue.++### What steps will reproduce the problem?++I tried to creating a new key through cli or assistant UI. I also tried to select preexisting key but it always appears to choose the initial key. Log below is creating a new key through assistant UI.++### What version of git-annex are you using? On what operating system?+git-annex version: 5.20140709-gc75193e on linux amd64 & os x 10.9.4++### Please provide any additional information below.++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log++[2014-07-12 23:22:57 PDT] main: starting assistant version 5.20140709-gc75193e+[2014-07-12 23:22:57 PDT] Cronner: You should enable consistency checking to protect your data. +(Recording state in git...)+(scanning...) [2014-07-12 23:22:57 PDT] Watcher: Performing startup scan+(started...) gpg: Signature made Wed Jul 9 19:09:28 2014 PDT using DSA key ID 89C809CB+gpg: Can't check signature: public key not found++(encryption setup) (hybrid cipher with gpg key A1FE7E9BECB5C7CA) gcrypt: Development version -- Repository format MAY CHANGE+gcrypt: Repository not found: ssh://admin@nappy.local/share/backups/annex/+gcrypt: Development version -- Repository format MAY CHANGE+gcrypt: Repository not found: ssh://admin@nappy.local/share/backups/annex/+gcrypt: Setting up new repository+gcrypt: Remote ID is :id:smTV2DKvbvPIi7ftJLey+gcrypt: Encrypting to: -R A1FE7E9BECB5C7CA+gcrypt: Requesting manifest signature+To gcrypt::ssh://admin@nappy.local/share/backups/annex/+ * [new branch] git-annex -> git-annex+ok+[2014-07-12 23:23:42 PDT] main: Syncing with nappy.local__share_backups_annex +gcrypt: Development version -- Repository format MAY CHANGE+gcrypt: Decrypting manifest+gpg: anonymous recipient; trying secret key 6DF1BC5D ...+gpg: cannot open tty `/dev/tty': Device not configured+gcrypt: Failed to decrypt manifest!+gcrypt: Development version -- Repository format MAY CHANGE+gcrypt: Decrypting manifest+gpg: anonymous recipient; trying secret key 6DF1BC5D ...+gpg: cannot open tty `/dev/tty': Device not configured+gcrypt: Failed to decrypt manifest!+++# End of transcript or log.+"""]]++[[!tag forwarded]]+[[!meta title="using git-remote-gcrypt with multiple keys causes unncessary password prompts for keys that did not encrypt the repository"]]++> [[fixed|done]]; upgrade git-remote-gcrypt and `git config gcrypt.publish-participants true`+> and after the next push to the repo, it'll stop guessing at keys, and use+> the right one. git-annex will do this by default for new gcrypt+> repositories. --[[Joey]]
+ doc/coding_style/comment_2_a820b7c8ae7c2290eb000f61bdb5c514._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="209.250.56.2"+ subject="comment 2"+ date="2014-07-10T20:24:03Z"+ content="""+safe does not prevent using the unsafe prelude functions. Utility.PartialPrelude does, and provides a few safe wrappers like lastMaybe. +"""]]
+ doc/devblog/day_193-194__ugly_bug.mdwn view
@@ -0,0 +1,37 @@+**Important** A bug [[caused the assistant to sometimes remove all files|bugs/bad_merge_commit_deleting_all_files]] from the git repository.+You should check if your repository is ok. If the bug hit you, it should be+possible to revert the bad commit and recover your files with no data loss.+See the bug report for details. ++This affected git-annex versions since 5.20140613, and only when using the+assistant in direct mode. It should be fixed in today's release,+5.20140709.++I'm available <urgent2014@joeyh.name> to help anyone hit by this+unfortunate bug.++This is another bug in the direct mode merge code. I'm not happy about it.+It's particularly annoying that I can't fix up after it automatically+(because there's no way to know if any given commit in the git history that+deletes all the files is the result of this bug, or a legitimate deletion+of all files).++The only good thing is that the design of git-annex is pretty robust, and+in this case, despite stupidly committing the deletion of all the files in+the repository, git-annex did take care to preserve all their contents and+so the problem should be able to be resolved without data loss.++Unfortunately, the main autobuilder is down and I've had to spin up+autobuilders on a different machine (thank goodness that's very automated+now!), and so I have not been able to build the fixed git-annex for android+yet. I hope to get that done later this evening.++---++Yesterday, I fixed a few (much less bad) bugs, and did some thinking about+plans for this month. The [[design/roadmap]] suggests working on some of+[[!traillink design/assistant/chunks]], [[!traillink design/assistant/deltas]] or [[!traillink design/assistant/gpgkeys]].+I don't know how to do deltas yet really. Chunks is pretty easily done.+The gpg keys stuff is pretty open ended and needs some more work to define+some use cases. But, after today, I am more inclined to want to spend+time on better testing and other means of avoiding this kind of situation.
+ doc/devblog/day_195-196__catching_up.mdwn view
@@ -0,0 +1,13 @@+Spent past 2 days catching up on backlog and doing bug triage and some+minor bug fixes and features. Backlog is 27, lowest in quite a while so I+feel well on top of things.++I was saddened to find [this bug](http://git-annex.branchable.com/bugs/files_lost_during_upgrade/#comment-b265c796b1599d2dde649699cb54fa86)+where I almost managed to analize the [[ugy_bug|day_193-194__ugly_bug]]'s race+condition, but not quite (and then went on vacation). BTW, I have not heard+from anyone else who was hit by that bug so far.++The linux autobuilders are still down; their host server had a disk crash+in an electrical outage. Might be down for a while. I would not mind+setting up a redundant autobuilder if anyone else would like to donate a+linux VM with 4+ gb of ram.
+ doc/devblog/day_197__autobuilder_rescuscitation.mdwn view
@@ -0,0 +1,14 @@+Yay, the Linux autobuilder is back! Also fixed the Windows build.++Fixed a reversion that prevented the webapp from starting+properly on Windows, which was introduced by some bad locking when I put in+the hack that makes it log to the log file on that platform.++Various other minor fixes here and there. There are almost enough+to do a release again soon.++I've also been trying to bootstrap ghc 7.8 on arm, for Debian. There's a script+that's supposed to allow building 7.8 using 7.6.3, dealing with a linker+problem by using the gold linker. Hopefully that will work since otherwise+Debian could remain stuck with an old ghc or worse lose the arm ports.+Neither would be great for git-annex..
+ doc/devblog/day_198__branching_out.mdwn view
@@ -0,0 +1,23 @@+I have mostly been thinking about gcrypt today.+[This issue](https://github.com/blake2-ppc/git-remote-gcrypt/issues/9)+needs to be dealt with. The question is, does it really make sense to+try to hide the people a git repository is encrypted for? I have +[posted some thoughts](http://git-annex.branchable.com/bugs/using_gpg_encryption_with_multiple_keys_fails/?updated#comment-0c4f679d972c63b0b25b6aa5e851af62)+and am coming to the viewpoint that obscuring the identities of users+of a repository is not a problem git-annex should try to solve itself,+although it also shouldn't get in the way of someone who is able and+wants to do that (by using tor, etc).++Finally, I decided to go ahead and add a gcrypt.publish-participants+setting to git-remote-gcrypt, and make git-annex set that by default when+setting up a gcrypt repository.++Some promising news from the ghc build on arm. I got a working ghc, and+even ghci works. Which would make the template haskell in the webapp etc+avaialble on arm without the current horrible hacks. Have not managed to+build the debian ghc package successfully yet though.++Also, fixed a bug that made `git annex sync` not pull/push with a local+repository that had not yet been initialized for use with git-annex.++Today's work was sponsored by Stanley Yamane.
+ doc/devblog/day_199__ten_minute_cycle.mdwn view
@@ -0,0 +1,6 @@+Spent hours today in a 10-minute build/test cycle, tracking down a bug that+caused the assistant to crash on Windows after exactly 10 minutes uptime.+Eventually found the cause; this is fallout from last month's work+that got it logging to the debug.log on Windows.++There was more, but that was the interesting one..
+ doc/direct_mode/comment_12_7d507b6f87085a19d8dd5014f580922b._comment view
@@ -0,0 +1,24 @@+[[!comment format=mdwn+ username="http://mildred.fr/"+ ip="82.247.184.53"+ subject="Fixing symlinks to the annex store in direct mode"+ date="2014-07-16T06:52:33Z"+ content="""+I have an issue with direct mode: I have tons of symlinks that points to the git-annex store, while in direct mode. After investigation, I found that these files don't seem to be part of the repository. I can check with:++ $ git -c core.bare=false status --porcelain tr.html+ ?? Documentation/Mozilla/developer.mozilla.org/tr.html++ $ ls -l tr.html+ lrwxrwxrwx 1 mildred mildred 205 10 juin 16:22 tr.html -> ../../../.git/annex/objects/gF/z1/SHA256E-s31895--c873982bd742ba8db6e026afee26b7ab2f75f54f587304d8c2d877db3900c0f6.html/SHA256E-s31895--c873982bd742ba8db6e026afee26b7ab2f75f54f587304d8c2d877db3900c0f6.html++The link is valid, and is probably pointing to a unused file in the annex store. How to add these files back?++If I was in indirect mode, I could simply use `git add tr.html` (and **not** `git annex add`). This would stage to the git staging area the symlink, and all would be well.++I found that in direct mode, the same was true. The command is: ++ git -c core.bare=false add tr.html++The file is added to the repository, and the link is converted to the target file. The question now is why? There is no hook on the add command. Could it be the annex assistant? If that didn't worked, my question would have been: how to checkout a file in direct mode?+"""]]
+ doc/direct_mode/comment_13_5169c5541970d3b3bc1e080e07539b22._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://mildred.fr/"+ ip="82.247.184.53"+ subject="Re: Fixing symlinks to the annex store in direct mode"+ date="2014-07-16T07:04:08Z"+ content="""+What I said was just wrong. Instead of trying on tr.html, I tried with a copy of that file. But making the copy of that file had the wanted effect, transforming the symlink to the actual file. Probably the assistant monitoring file creation, and transforming indirect file to direct file. Or perhaps the `cp` command follows symlinks by default (I thought it didn't).+"""]]
+ doc/direct_mode/comment_14_03a02e689d92faa596de98e02b2ffe28._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="209.250.56.2"+ subject="comment 14"+ date="2014-07-16T17:51:28Z"+ content="""+I kinda wish people would post questions to the forum, and not clutter up this page..++Anyway, there have been past bugs in the direct mode code that caused some files to not be checked out in direct mode, but stay as symlinks pointing at the content. That can be fixed by running `git annex fsck`. But, I am not aware of any problem that can leave a git-annex symlink that is not checked into git at all. Perhaps you copied the symlink from another location?+"""]]
+ doc/forum/Android_version_does_not_sync.mdwn view
@@ -0,0 +1,23 @@+Hey!++I have got a Kindle Fire HD (2nd generation) and want to use Git Annex to sync my data round. However, it does not sync my data at all (my other setups, e.g. PC or laptop do work quite well). The reason for that seems to be quite simple, but I do not know how to fix that:++I always get the warning message:++> TransferScanner crashed: /storage/emulated/legacy/annex/.git/index: copyFile: does not exist (No such file or directory).++I found the same error in the log:++> git-annex: /storage/emulated/legacy/annex/.git/index: copyFile: does not exist (No such file or directory)+> ...+> fatal: Run with no arguments or with -c cmd+> git-annex-shell: git-shell failed++I am using the latest versions for android and arm (server, raspberry pi) from this site from today (13.07.2014)++http://git-annex.branchable.com/install/++I hope somebody can help me. I tried restaring the TransferScanner, restarting git-annex, restarting the OS, resetting the OS (to shipping defaults), nothing helped.++Cheers,+Stephan
+ doc/forum/Getting_the_status_of_a_remotely_changed_annex_file.mdwn view
@@ -0,0 +1,75 @@+Hello,++I am trying to wrap my head around annex still. I'm creating a source local git repo, editing an annex file, and then syncing in a second repo. In that second repo I'm trying to figure out how I can get a status notifying me that a file is out of date.++If I use 'annex sync --content' the files are all up to date, as expected, but what I kind of expected is 'annex status' to say something like 'files out of date, blah blah'. I am spelling out my example below. ++Annex version is 5.20140613+++## I create a source and target repo, and I add a git managed file and an annex managed file++ $ mkdir source target+ $ cd source+ $ git init+ $ git annex init+ $ cat > gitfile+ hi this is my git file+ $ cat > annexfile+ hi this is my annex file+ $ git add gitfile + $ git annex add annexfile + $ git commit -m 'init commit'+ $ cd ../target+ $ git clone ../source/ .+ $ ls -al+ total 16+ drwxr-xr-x 170 Jul 15 15:55 .+ drwxr-xr-x 136 Jul 15 15:54 ..+ drwxr-xr-x 442 Jul 15 15:55 .git+ lrwxr-xr-x 180 Jul 15 15:55 annexfile -> .git/annex/objects/Qp/F0/SHA256E-s25--045cf30cb201c6723cb6fad9ca539f639de7f242b87775b876ef9ccb1f577ccf/SHA256E-s25--045cf30cb201c6723cb6fad9ca539f639de7f242b87775b876ef9ccb1f577ccf+ -rw-r--r-- 23 Jul 15 15:55 gitfile+ $ git annex sync+ ...+ To [base path]/target/../source/+ * [new branch] git-annex -> synced/git-annex+ * [new branch] master -> synced/master+ ok+ $ cat gitfile + hi this is my git file+ $ cat annexfile + cat: annexfile: No such file or directory+ $ git annex sync --content+ $ cat annexfile + hi this is my annex file++## So far so good. Now I'm going to edit my annexed file in source repo and see if I can find out that the file was edited in the target++ $ cd ..+ $ cd source+ $ git annex edit annexfile + $ cat > annexfile + wow I changed my annex file+ $ git annex add annexfile + $ git commit -m 'changed an annex file'+ $ cd ..+ $ cd target+ $ git pull+ $ cat annexfile + cat: annexfile: No such file or directory+ $ git annex sync+ $ ls+ annexfile gitfile+ $ cat annexfile + cat: annexfile: No such file or directory+ $ git annex status+ [no output]++## Here is where I'd expect something saying 'annexfile is out of date', etc.+## I can infer it because the link is missing, but I'm sure there's a more logical way.++ $ git annex sync --content+ $ cat annexfile + wow I changed my annex file++## After I synced content all is well.
+ doc/forum/How_to_get_git-annex_to_forget_a_commit__63__.mdwn view
@@ -0,0 +1,54 @@+I've done a `git annex add` and `git commit` on my annex which included some files I don't want to add to the annex. I've tried to reverse it all out, but whenever I `git annex add` something, the unwanted files show up in the git-annex branch.++ git init forgetmenot+ cd forgetmenot+ git commit -m "create" --allow-empty+ git annex init fmn+ + echo 'foo' > foo+ echo 'bar' > bar+ + git annex add+ git commit -m "add foo"+ + git log --oneline --name-only+ # 28634c0 add foo+ # bar+ # foo+ # 4a87050 create++ git log --oneline --name-only git-annex+ 74e6969 update+ 41d/a26/SHA256E-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c.log+ a70/4a5/SHA256E-s4--7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730.log+ 95285ed update+ uuid.log+ 2135e07 branch created++If you now try to get git-annex to forget by reverting *master* and *git-annex* and only adding/commiting *foo*, the master branch ends up correct, but git-annex magically remembers *bar*!++ git reset --hard HEAD^+ git branch -f git-annex git-annex^++ echo 'foo' > foo+ git annex add+ git commit -m "add foo"++ git log --oneline --name-only+ # 1b4889e add foo+ # foo+ # 4a87050 create++ git log --oneline --name-only git-annex+ # 3d0b9bc update+ # 41d/a26/SHA256E-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c.log+ # a70/4a5/SHA256E-s4--7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730.log+ # 2e17a19 update+ # uuid.log+ # 646776b branch created++How is git-annex remembering this and how can I get it to completely forget?++I have tried `git gc --aggressive --prune=all`, `git annex fsck --all` and `git annex drop unused` but somehow, git-annex is remembering bar existed.++This is an exercise in micro-managing the git-annex branch a bit, but this situation does also cause git-annex to complain about the missing files on fsck (0 out of 2 copies) so it isn't just being a control freak! Honest! :)
+ doc/forum/Performance_implications_of_triply_nested_objects_directory.mdwn view
@@ -0,0 +1,23 @@+Posting this in case anyone might find it interesting.++I had noticed impractical and abysmally slow performance when tracking a huge number of files (150k) in a git-annex. In direct mode, the repo was outright unusable, but even in indirect mode, many operations where painfully slow; even operations beyond the well-known offender, «git annex findunused», e.g., the seemingly harmless «git annex info».++I also noticed that the performance was hugely improved on my (otherwise comparable) machine running btrfs, and I wondered how this might be. From previous benchmarks, I had gained the impression that ext4 and btrfs are on par, performance-wise, and you choose btrfs for the features rather than performance. Now, after trying to update my back-ups via rsync, I have had an idea how the contrast between the two machines might might be accounted for. Specifically, I noted that, after converting my 150k folder into a git-annex repo, ascertaining that the back-up is current via rsync would take ~15 minutes, where it used to take mere seconds before. This could then only be due to the demands on directory traversal introduced by the annex-layout.++Accordingly, I wanted to see whether the traversal would be something that explains the difference in performance between btrfs and ext4, so I ran a tiny benchmark, traversing the .git folder on my home drive (ext4, SATA) and the backup drive (btrfs, USB3), and I was astounded by the difference:++zardoz [ /mnt/bak/m-annex ]$ time tree .git >/dev/null++tree .git >/dev/null 14,23s user 2,78s system 24% cpu 1:09,69 total++zardoz [ ~/m-annex ]$ time tree .git >/dev/null++tree .git >/dev/null 26,40s user 0,96s system 1% cpu 23:37,94 total++While running, I peeked into the io using iotop, and observed around 500K/s during traversal on ext4 vs. 5M/s on btrfs.++While I was aquainted with the dogma that file-systems hate to have a single folder with a bazillion files, sources on the net seem to indicate that having lots and lots of sparse folders is even worse, and given the one-file-per-folder structure of the annex objects store, this would then potentially explain the heavy thrashing on ext4.++Something I am wondering now: Which operations in git-annex (or plain git) incite that sort of directory traversal? One candidate which occurred to me is «git annex unused», and the differences in performance between ext4 and btrfs are on the same order as in the above benchmark. Originally, Joey related somewhere that the search in «unused» is expensive; but if traversal is involved, it could actually be that this has even more impact than searching git history.++In any case, if anyone wants to track a very large number of files via git-annex, ext4 seems to be not the ideal file-system for this.
+ doc/forum/Restricting_SSH_+_supply_key.mdwn view
@@ -0,0 +1,7 @@+Just two very simple questions:++1.) Is there a way to restrict the SSH key for git annex by supplying a command= ? Even better, is it also possible to supply a directory in which the repository is? (I do not want chroot - too complicated but a soft check would be sufficient for me).++2.) Can I tell git and git-ssh which pubkey to use WITHOUT changing system-/user wide config (e.g.., .ssh/*)? If it is indeed not possible, what's the best way to do it in Windows?++Thanks!
+ doc/forum/Standard_groups__47__preferred_contents.mdwn view
@@ -0,0 +1,14 @@+Sorry that I am not stop asking questions - I am trying to wrap my head around annex still - and I do not fully understand the standard groups/preferred contents yet.+++First, basic: Is the "preferred content group" an attribute of a repository or of a remote? E.g., when I use assistant, I can set this property for a *remote* repository. Will this property be synced to all other clients then or is it only valid for this particular client?++Second, I think the standard groups do still not cover what I want and I wonder if this could be done with preferred contents somehow? What I want:++* Generally only the structure should be synced, no contents (i.e. "manual" is the closest)++* When I (manually) do "git annex get" on a file this file should be synced whenever it changes locally *or* remotely (until I drop it again). Currently it seems that when it changes remotely, it is "dropped" again so I need to manually use "git annex get" again++* When I (manually) do "git annex get" on a directory, it should be (recursively) synced whenever it or any file changes locally or remotely (until I drop it again). Currently nothing seems to sync at all in this case (except the meta data)++Thanks!
+ doc/forum/Where_is_the_content__63__.mdwn view
@@ -0,0 +1,8 @@+On Android 4.4.4, I can install the most recent git annex. I want to join a git annex running on my linux server. Git annex on android seems to be able to contact remote, and it asks if I want to 'merge' with it. I hope that did not mean erase the remote. Anyway, the sync says it is proceeding, but when it is done, I cannot find a folder with remote copies of files. ++I figure either it worked, or it destroyed my remote. ++After new install, I have folders /sdcard/annex and /sdcard/git-annex.home. I don't find a new folder with name of remote repo, don't understand why.++Help?+
+ doc/forum/repo_corruption_in_usb_external_drive.mdwn view
@@ -0,0 +1,41 @@+I'm sorry to ask this again, but I'm not being able to find my previous message regarding this issue. I'm finding very hard to find older posts in forums. Is there a way to search for all my posted messages?+Anyway, after some automount problems (changed mount point name), my usb repo (direct) ended in a weird state.+See for instance the screenshot: <http://picpaste.com/git-annex-problem-eZvOl90y.jpg>++In addition making a git-annex info gives the following:++ * repository mode: direct+ * trusted repositories: error: refs/heads/master does not point to a valid object!+ * error: refs/heads/synced/git-annex does not point to a valid object!+ * error: refs/heads/synced/master does not point to a valid object!+ * error: refs/remotes/sapo/annex/direct/master does not point to a valid object!+ * error: refs/remotes/sapo/git-annex does not point to a valid object!+ * error: refs/remotes/sapo/master does not point to a valid object!+ * error: refs/synced/1912d5a7-3929-47f0-8e25-a071d7079cc4/git-annex does not point to a valid object!+ * error: refs/synced/1912d5a7-3929-47f0-8e25-a071d7079cc4/master does not point to a valid object!+ * error: refs/heads/master does not point to a valid object!+ * error: refs/heads/synced/git-annex does not point to a valid object!+ * error: refs/heads/synced/master does not point to a valid object!+ * error: refs/remotes/sapo/annex/direct/master does not point to a valid object!+ * error: refs/remotes/sapo/git-annex does not point to a valid object!+ * error: refs/remotes/sapo/master does not point to a valid object!+ * error: refs/synced/1912d5a7-3929-47f0-8e25-a071d7079cc4/git-annex does not point to a valid object!+ * error: refs/synced/1912d5a7-3929-47f0-8e25-a071d7079cc4/master does not point to a valid object!+ * fatal: index file smaller than expected+ * git-annex: failed to read sha from git write-tree+++What should I do? delete the usb repo and start again. Thank god this is just a trial.++What happens if a file gets corrupted. Lets say it is corrupted in repo A, and fine in repo B. Will the good copy be overridden?++git-repair takes a long time and seems to be stuck there, or maybe it just takes a long time (10Gb repo). Is this normal?+ > git-annex repair+ Running git fsck ...+ Initialized empty Git repository in /tmp/tmprepo.1/.git/+ Trying to recover missing objects from remote sapo.+ Unpacking all pack files.+ Unpacking objects: 100% (348848/348848), done.+++Thanks in advance.
+ doc/forum/rsync_asking_for_an_unknown_password.mdwn view
@@ -0,0 +1,60 @@+Hello,++I am on OS X, using version 5.20140613. I installed using brew.++I have a really simple example where I'm trying to use local rsync to test transfer between two repos. It keeps asking me for a password over and over. I do not know what password it is.++I'm literally doing just this:++ $ cd annex-tests+ $ mkdir target+ $ mkdir source+ $ cat > source/text+ hi this is a test+ $ cd source+ $ git init+ Initialized empty Git repository in /Users/me/Documents/annex-tests/source/.git/+ $ git annex init+ init ok+ (Recording state in git...)+ $ git annex initremote rsync-login type=rsync rsyncurl=me@localhost:/Users/me/Documents/annex-tests/target encryption=none+ initremote rsync-login ok+ (Recording state in git...)+ $ git annex describe rsync-login "test rsync url with a login"+ describe rsync-login ok+ (Recording state in git...)+ $ git annex add text + add text ok+ (Recording state in git...)+ $ git annex sync rsync-login --content+ commit ok+ copy text copy text (checking rsync-login...) Password:+ Password:+ Password:+ Password:+ Password:++I try a blank password, I try my login password, I tried 'none' (the encryption type), I try everything.. no dice++So right off the bat let me explain a few things.++1 - Why not use rsa keys? Because I was having the exact same problem and I wanted to make it even easier and use login/password++2 - Why not use the webapp since a few forum posts say you can set passwords in there? because my annex doesn't seem to recognize the command.++ $ git annex webapp+ git-annex: unknown command webapp++3 - I verified my rsync command/url appears ok by doing the following. The password for that command is as expected, it is my username password:++ $ cat > test2+ hi test+ $ rsync test2 me@localhost:/Users/me/Documents/annex-tests/target+ Password:+ $ cat /Users/me/Documents/annex-tests/target/test2+ hi test+++Any help will be appreciated!++
+ doc/forum/webapp_does_not_start.mdwn view
@@ -0,0 +1,72 @@+Sorry, I have again an issue :(++What could be the problem that the webapp is not starting (in Windows)? git annex just exists without messages, connection to localhost failes of course++ me@laptop /cygdrive/c/Data+ $ git annex --verbose --debug webapp+ + me@laptop /cygdrive/c/Data+ $++If I run it within an annexed directory I get at least one message - but it still immideately exits:++ me@laptop /cygdrive/c/Data/annex+ $ git annex --verbose --debug webapp+ [2014-07-11 19:06:58 Pacific Daylight Time] chat: git-annex ["--verbose","--debug","webapp"]++ me@laptop /cygdrive/c/Data/annex+ $++ git-annex version: 5.20140707-g8116d10+ build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV DNS Feeds Quvi TDFA CryptoHash+ key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL+ remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier ddar hook external+ local repository version: 5+ supported repository version: 5+ upgrade supported from repository versions: 2 3 4+++EDIT:+1.) Interestingly, also "git annex test" fails:++ [...]+ ok+ push origin To C:/Data/.t\repo+ bcc4611..91f5218 git-annex -> synced/git-annex+ 6f47922..92c578a annex/direct/master -> synced/master+ + ok+ add ../dir2/foo ok+ (Recording state in git...)+ FAIL+ Exception: .t/tmprepo9/.git/annex/journal: getDirectoryContents: permission denied (Access is denied.)++ 2 out of 83 tests failed+ (This could be due to a bug in git-annex, or an incompatability+ with utilities, such as git, installed on this system.)++++2.) There's really something very weird going on. At the beginning it worked. Then it stopped (as per above). Sometimes, when I start it using "Git Bash" it works. But then not any more.+3.) Rebooting the machine does not help++EDIT once again:+4.) I am afraid there is something big broken. Suddenly I could start the daemon again. The thing I did was to delete my complete annex.+But if I shutdown the daemon now I get:++ $ git annex webapp+ Launching web browser on file://C:\cygwin\tmp\webapp85796.html+ + Detected a filesystem without fifo support.+ + Disabling ssh connection caching.+ + Detected a crippled filesystem.+ + Enabling direct mode.+ + (Recording state in git...)+ WebApp crashed: ExitFailu++... and the whole loop starts again. webapp daemon does not start as long as I delete the annex. Interestingly this is independent from %USERPROFILE%\.config. Deleting this directory does not change anything. So somehow git-annex "knows" that there is somewhere an annex and fails if it is.+
doc/git-annex.mdwn view
@@ -139,9 +139,10 @@ * `sync [remote ...]` Use this command when you want to synchronize the local repository with- one or more of its remotes. You can specify the remotes to sync with;- the default is to sync with all remotes. Or specify `--fast` to sync with- the remotes with the lowest annex-cost value.+ one or more of its remotes. You can specify the remotes to sync with by+ name; the default is to sync with all remotes.+ Or specify `--fast` to sync with the remotes with the+ lowest annex-cost value. The sync process involves first committing all local changes, then fetching and merging the `synced/master` and the `git-annex` branch@@ -169,8 +170,8 @@ * `merge` - This performs the same merging that is done by the sync command, but- without pushing or pulling any data.+ This performs the same merging (and merge conflict resolution)+ that is done by the sync command, but without pushing or pulling any data. One way to use this is to put `git annex merge` into a repository's post-receive hook. Then any syncs to the repository will update its working@@ -938,6 +939,16 @@ Most MATCHING OPTIONS can be used with findref, to limit the files it finds. However, the --include and --exclude options will not work. +* `resolvemerge`++ Resolves a conflicted merge, by adding both conflicting versions of the+ file to the tree, using variants of their filename. This is done+ automatically when using `git annex sync` or `git annex merge`.++ Note that only merge conflicts that involve an annexed file are resolved.+ Merge conflicts between two files that are not annexed will not be+ automatically resolved.+ * `test` This runs git-annex's built-in test suite.@@ -1387,9 +1398,11 @@ * `annex.alwayscommit` By default, git-annex automatically commits data to the git-annex branch- after each command is run. To disable these commits,- set to `false`. Then data will only be committed when- running `git annex merge` (or by automatic merges) or `git annex sync`.+ after each command is run. If you have a series+ of commands that you want to make a single commit, you can + run the commands with `-c annex.alwayscommit=false`. You can later+ commit the data by running `git annex merge` (or by automatic merges)+ or `git annex sync`. * `annex.delayadd`
doc/install/OSX.mdwn view
@@ -20,7 +20,8 @@ ## autobuilds -[[Joey]] autobuilds the app for Mavericks.+[[Joey]] autobuilds the app for Mavericks, thanks to Kevin McKenzie+for hosting the autobuilder. * [autobuild of git-annex.dmg](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-mavericks/git-annex.dmg) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-mavericks/))
+ doc/install/cabal/comment_37_f33e1a4575dccc20b0d3d7c00e6db709._comment view
@@ -0,0 +1,69 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmveNWaFIL1zEehHr_0416bKBzsul5tGlE"+ nickname="Daniel"+ subject="Install fails horribly"+ date="2014-07-10T23:11:51Z"+ content="""+```+lyriondesktop:/home/zilti/tmp # cabal install c2hs+Resolving dependencies...+Configuring c2hs-0.17.2...+Building c2hs-0.17.2...+Preprocessing executable 'c2hs' for c2hs-0.17.2...+[ 1 of 26] Compiling Data.DLists ( src/Data/DLists.hs, dist/build/c2hs/c2hs-tmp/Data/DLists.o )+[ 2 of 26] Compiling Control.StateTrans ( src/Control/StateTrans.hs, dist/build/c2hs/c2hs-tmp/Control/StateTrans.o )++src/Control/StateTrans.hs:77:1: Warning:+ Module `Prelude' does not export `catch'+[ 3 of 26] Compiling Data.Errors ( src/Data/Errors.hs, dist/build/c2hs/c2hs-tmp/Data/Errors.o )+[ 4 of 26] Compiling Data.Attributes ( src/Data/Attributes.hs, dist/build/c2hs/c2hs-tmp/Data/Attributes.o )+[ 5 of 26] Compiling Text.Lexers ( src/Text/Lexers.hs, dist/build/c2hs/c2hs-tmp/Text/Lexers.o )+[ 6 of 26] Compiling Control.StateBase ( src/Control/StateBase.hs, dist/build/c2hs/c2hs-tmp/Control/StateBase.o )+[ 7 of 26] Compiling Data.NameSpaces ( src/Data/NameSpaces.hs, dist/build/c2hs/c2hs-tmp/Data/NameSpaces.o )+[ 8 of 26] Compiling C2HS.C.Attrs ( src/C2HS/C/Attrs.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Attrs.o )+[ 9 of 26] Compiling C2HS.C.Builtin ( src/C2HS/C/Builtin.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Builtin.o )+[10 of 26] Compiling Paths_c2hs ( dist/build/autogen/Paths_c2hs.hs, dist/build/c2hs/c2hs-tmp/Paths_c2hs.o )+[11 of 26] Compiling C2HS.Config ( src/C2HS/Config.hs, dist/build/c2hs/c2hs-tmp/C2HS/Config.o )+[12 of 26] Compiling C2HS.Switches ( src/C2HS/Switches.hs, dist/build/c2hs/c2hs-tmp/C2HS/Switches.o )+[13 of 26] Compiling C2HS.Version ( src/C2HS/Version.hs, dist/build/c2hs/c2hs-tmp/C2HS/Version.o )+[14 of 26] Compiling System.CIO ( src/System/CIO.hs, dist/build/c2hs/c2hs-tmp/System/CIO.o )+[15 of 26] Compiling Control.State ( src/Control/State.hs, dist/build/c2hs/c2hs-tmp/Control/State.o )+[16 of 26] Compiling C2HS.State ( src/C2HS/State.hs, dist/build/c2hs/c2hs-tmp/C2HS/State.o )+[17 of 26] Compiling C2HS.CHS.Lexer ( src/C2HS/CHS/Lexer.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS/Lexer.o )++src/C2HS/CHS/Lexer.hs:612:16: Warning:+ Defined but not used: `lexeme'+[18 of 26] Compiling C2HS.CHS ( src/C2HS/CHS.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS.o )+[19 of 26] Compiling C2HS.Gen.Header ( src/C2HS/Gen/Header.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Header.o )+[20 of 26] Compiling C2HS.C.Trav ( src/C2HS/C/Trav.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Trav.o )+[21 of 26] Compiling C2HS.C.Names ( src/C2HS/C/Names.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Names.o )+[22 of 26] Compiling C2HS.C ( src/C2HS/C.hs, dist/build/c2hs/c2hs-tmp/C2HS/C.o )+[23 of 26] Compiling C2HS.Gen.Monad ( src/C2HS/Gen/Monad.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Monad.o )++src/C2HS/Gen/Monad.hs:227:10: Warning:+ Orphan instance: instance Read Ident+[24 of 26] Compiling C2HS.C.Info ( src/C2HS/C/Info.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Info.o )+[25 of 26] Compiling C2HS.Gen.Bind ( src/C2HS/Gen/Bind.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Bind.o )++src/C2HS/Gen/Bind.hs:971:43: Warning:+ In the use of `posColumn' (imported from Language.C.Data.Position):+ Deprecated: \"column number information is inaccurate in presence of macros - do not rely on it.\"++src/C2HS/Gen/Bind.hs:789:10: Warning:+ Orphan instance: instance Num CInteger+[26 of 26] Compiling Main ( src/Main.hs, dist/build/c2hs/c2hs-tmp/Main.o )+Linking dist/build/c2hs/c2hs ...+Installing executable(s) in /root/.cabal/bin+Installed c2hs-0.17.2+lyriondesktop:/home/zilti/tmp # cabal install git-annex+Resolving dependencies...+Configuring gnuidn-0.2.1...+cabal: The program c2hs is required but it could not be found.+Failed to install gnuidn-0.2.1+cabal: Error: some packages failed to install:+git-annex-5.20140709 depends on gnuidn-0.2.1 which failed to install.+gnuidn-0.2.1 failed during the configure step. The exception was:+ExitFailure 1+network-protocol-xmpp-0.4.6 depends on gnuidn-0.2.1 which failed to install.+```+"""]]
+ doc/install/cabal/comment_38_5c1e96221154a4ae4ebd636232044ced._comment view
@@ -0,0 +1,16 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="209.250.56.2"+ subject="comment 38"+ date="2014-07-11T18:30:55Z"+ content="""+@Daniel, I suggest you either follow the instuctions above, or if you don't want to follow the instructions, follow the error messages. :P In this case, the instructions say to do:++> PATH=$HOME/bin:$PATH+> cabal install c2hs --bindir=$HOME/bin++Which is exactly to work around the problem that we can see in your transcript: `Installing executable(s) in /root/.cabal/bin` ++Also, to reiterate the top of the page: If you are not comfortable tracking down and dealing with library build problems, installing git-annex with cabal is probably not the right choice for you!++"""]]
− doc/news/version_5.20140529.mdwn
@@ -1,25 +0,0 @@-git-annex 5.20140529 released with [[!toggle text="these changes"]]-[[!toggleable text="""- * Fix encoding of data written to git-annex branch. Avoid truncating- unicode characters to 8 bits. Allow any encoding to be used, as with- filenames (but utf8 is the sane choice). Affects metadata and repository- descriptions, and preferred content expressions.- * assistant: When there are multiple remotes giving different ways- to access the same repository, honor remote cost settings and use- the cheapest available.- * webapp: More robust startup when annex directory is not a git repo.- * initremote/enableremote: Basic support for using with regular git remotes;- initremote stores the location of an already existing git remote,- and enableremote setups up a remote using its stored location.- * webapp: Support for enabling known git repositories on ssh servers.- The repository must have been added using initremote.- * webapp: When setting up a ssh remote, record it using initremote,- so that it can be easily enabled elsewhere.- * webapp: When setting up a ssh remote, if the user inputs ~/foo,- normalize that to foo, since it's in the home directory by default.- * Use exceptions in place of deprecated MonadCatchIO-transformers- Thanks, Ben Gamari.- * android: Run busybox install with -s, since some versions of Android- prohibit making hard links.- * Android webapp: Fix EvilSplicer bugs that mangled the css files,- preventing icons from displaying, and also slightly broke the js files."""]]
doc/news/version_5.20140709.mdwn view
+ doc/news/version_5.20140717.mdwn view
@@ -0,0 +1,28 @@+git-annex 5.20140717 released with [[!toggle text="these changes"]]+[[!toggleable text="""+ * Fix minor FD leak in journal code. Closes: #[754608](http://bugs.debian.org/754608)+ * direct: Fix handling of case where a work tree subdirectory cannot+ be written to due to permissions.+ * migrate: Avoid re-checksumming when migrating from hashE to hash backend.+ * uninit: Avoid failing final removal in some direct mode repositories+ due to file modes.+ * S3: Deal with AWS ACL configurations that do not allow creating or+ checking the location of a bucket, but only reading and writing content to+ it.+ * resolvemerge: New plumbing command that runs the automatic merge conflict+ resolver.+ * Deal with change in git 2.0 that made indirect mode merge conflict+ resolution leave behind old files.+ * sync: Fix git sync with local git remotes even when they don't have an+ annex.uuid set. (The assistant already did so.)+ * Set gcrypt-publish-participants when setting up a gcrypt repository,+ to avoid unncessary passphrase prompts.+ This is a security/usability tradeoff. To avoid exposing the gpg key+ ids who can decrypt the repository, users can unset+ gcrypt-publish-participants.+ * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet+ exist, since it is not automatically created for Gnome 3 users.+ * Windows: Move .vbs files out of git\bin, to avoid that being in the+ PATH, which caused some weird breakage. (Thanks, divB)+ * Windows: Fix locking issue that prevented the webapp starting+ (since 5.20140707)."""]]
doc/preferred_content/standard_groups.mdwn view
@@ -1,13 +1,21 @@ git-annex comes with some built-in [[preferred_content]] settings, that can be used with repositories that are in special groups. To make a repository use one of these, just set its preferred content expression-to "standard", and put it in one of these groups. Or in the webapp, just-edit the repository and select the group.+to "standard", and put it in one of these groups. For example, to put the current+repository in the manual group and use this group to control the preferred+content, run + git annex wanted . standard+ git annex group . manual++In the webapp, just edit the repository and select the group.+ (Note that most of these standard expressions also make the repository want to get any content that is only currently available on untrusted and dead repositories. So if an untrusted repository gets connected, any repository that can will back it up.)++The following standard groups are available: ### client
doc/special_remotes/gcrypt.mdwn view
@@ -43,3 +43,8 @@ force it to re-push everything again, so that the encrypted repository can be decrypted by the added keys. Probably this can be done by setting `GCRYPT_FULL_REPACK` and doing a forced push of branches.++Recent versions of git-annex configure gcrypt-publish-participants when+setting up a gcrypt repository. This is done to avoid unncessary gpg+passphrase prompts, but it does publish the gpg keyids that can decrypt the+repository. Unset it if you need to obscure that.
doc/special_remotes/glacier.mdwn view
@@ -6,7 +6,7 @@ The unusual thing about Amazon Glacier is the multiple-hour delay it takes to retrieve information out of Glacier. To deal with this, commands like "git-annex get" request Glacier start the retrieval process, and will fail-due to the data not yet being available. You can then wait appriximately +due to the data not yet being available. You can then wait approximately four hours, re-run the same command, and this time, it will actually download the data.
doc/todo/Expose_auto-merge_for_manual__44___local_merges.mdwn view
@@ -5,3 +5,5 @@ E.g., one might invoke «git annex merge» or «git annex autoresolve» after «git merge» when conflicts are found.++> [[done]] as resolvemerge. --[[Joey]]
+ doc/todo/Recovering_from_a_bad_sync.mdwn view
@@ -0,0 +1,31 @@+Instead of using `sync origin` for the first sync and a simple `sync` for the other syncs,++ # on pc1+ git annex init "pc1"+ git annex direct+ git annex add .+ git annex sync origin # remote specified on the first sync++ # add some files+ git annex add .+ git annex sync++I used `sync` first and only later I used `sync origin`++ # on pc1+ git annex init "pc1"+ git annex direct+ git annex add .+ git annex sync++ # add some files+ git annex add .+ git annex sync origin # remote specified on a later sync++These sequences of commands create two completely different git histories.++More important, if one clones on pc2 the first repository, they will see both the pc1 remote and the pc2 remote. Instead, if one clones on pc2 the repository created by the second combination of commands, they will see only the pc2 remote.++What commands should I use on pc1 to fix the history so that when pc2 clones from the origin repository it will see both the pc1 remote and its own local remote?++> [[done]]; fixed per my comments. --[[Joey]]
+ doc/todo/fast_migrate.mdwn view
@@ -0,0 +1,16 @@+Moved this comment to todo list --[[Joey]]++[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnfM7ZF0Q5U9k1LljyDXH37cuXU5Gx6gtM"+ nickname="A"+ subject="fast migrate"+ date="2014-07-05T08:21:20Z"+ content="""+dear Joey and everybody else,+ some time ago I used \"git annex migrate\" to bring all my repositories up-to-date; after that I found (to my dismay) that some keys are SHA256, some others are SHA256E, so my data is not really deduplicated ; now, it would possible to migrate from SHAnnnE to SHAnnn (and vice versa) very fast... but currently AFAICS git-annex recomputes the whole checksum, and this (on my USB2.0 old disks) takes forever; may somebody please implement a fast migration?+"""]]++> Certianly doable, for $hashE to $hash. Probably about an hour's work.+> --[[Joey]]++>> [[done]] --[[Joey]]
+ doc/todo/unwanted_repository_version_upgrades.mdwn view
@@ -0,0 +1,25 @@+Is it possible to freeze or peg repositories at a particular version, or to prevent automatic repository version upgrades? Is it possible to "downgrade" a repository?++### Please describe the problem.++We have a number of repositories on a shared file server. These repositories are accessed by multiple machines. Some of these repositories appear to have gotten upgraded and are now unusable on machines running older versions of git-annex.++We're getting this message:+[[!format sh """+user@system:/path/to/repository$ git annex status+git-annex: Repository version 5 is not supported. Upgrade git-annex.+"""]]++The machine experiencing the problem is running Debian Wheezy (Stable).+[[!format sh """+user@system:/path/to/repository$ git version+git version 1.7.10.4+user@system:/path/to/repository$ git annex version+git-annex version: 3.20120629+local repository version: 5+default repository version: 3+supported repository versions: 3+upgrade supported from repository versions: 0 1 2+"""]]++I'm guessing that one of the machines with access to this repository was running a newer version of git-annex, and that the repository was upgraded in the course of some action.
git-annex.1 view
@@ -125,9 +125,10 @@ .IP .IP "\fBsync [remote ...]\fP" Use this command when you want to synchronize the local repository with-one or more of its remotes. You can specify the remotes to sync with;-the default is to sync with all remotes. Or specify \fB\-\-fast\fP to sync with-the remotes with the lowest annex\-cost value.+one or more of its remotes. You can specify the remotes to sync with by+name; the default is to sync with all remotes.+Or specify \fB\-\-fast\fP to sync with the remotes with the+lowest annex\-cost value. .IP The sync process involves first committing all local changes, then fetching and merging the \fBsynced/master\fP and the \fBgit\-annex\fP branch@@ -154,8 +155,8 @@ a repository. See see PREFERRED CONTENT below. .IP .IP "\fBmerge\fP"-This performs the same merging that is done by the sync command, but-without pushing or pulling any data.+This performs the same merging (and merge conflict resolution)+that is done by the sync command, but without pushing or pulling any data. .IP One way to use this is to put \fBgit annex merge\fP into a repository's post\-receive hook. Then any syncs to the repository will update its working@@ -864,6 +865,15 @@ Most MATCHING OPTIONS can be used with findref, to limit the files it finds. However, the \-\-include and \-\-exclude options will not work. .IP+.IP "\fBresolvemerge\fP"+Resolves a conflicted merge, by adding both conflicting versions of the+file to the tree, using variants of their filename. This is done+automatically when using \fBgit annex sync\fP or \fBgit annex merge\fP.+.IP+Note that only merge conflicts that involve an annexed file are resolved.+Merge conflicts between two files that are not annexed will not be+automatically resolved.+.IP .IP "\fBtest\fP" This runs git\-annex's built\-in test suite. .IP@@ -1252,9 +1262,11 @@ .IP .IP "\fBannex.alwayscommit\fP" By default, git\-annex automatically commits data to the git\-annex branch-after each command is run. To disable these commits,-set to \fBfalse\fP. Then data will only be committed when-running \fBgit annex merge\fP (or by automatic merges) or \fBgit annex sync\fP.+after each command is run. If you have a series+of commands that you want to make a single commit, you can +run the commands with \fB\-c annex.alwayscommit=false\fP. You can later+commit the data by running \fBgit annex merge\fP (or by automatic merges)+or \fBgit annex sync\fP. .IP .IP "\fBannex.delayadd\fP" Makes the watch and assistant commands delay for the specified number of
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 5.20140709+Version: 5.20140717 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess <joey@kitenet.net>@@ -191,7 +191,7 @@ yesod, yesod-default, yesod-static, yesod-form, yesod-core, http-types, transformers, wai, wai-extra, warp, warp-tls, blaze-builder, crypto-api, hamlet, clientsession,- template-haskell, data-default, aeson,+ template-haskell, data-default, aeson, path-pieces, shakespeare CPP-Options: -DWITH_WEBAPP if flag(Webapp) && flag (Webapp-secure)
standalone/android/haskell-patches/entropy_cross-build.patch view
@@ -1,25 +1,25 @@-From 10da50b5eea1e615af1d3b242f422ad278c9f268 Mon Sep 17 00:00:00 2001+From a3cc880bd06a8d7efda79339afa81e02decbd04b Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com>-Date: Fri, 18 Oct 2013 23:16:41 +0000-Subject: [PATCH] cross build+Date: Mon, 14 Jul 2014 21:01:25 +0000+Subject: [PATCH] fix cross build --- entropy.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entropy.cabal b/entropy.cabal-index e69dec4..4fa3774 100644+index 914d33a..9ab80f7 100644 --- a/entropy.cabal +++ b/entropy.cabal-@@ -14,7 +14,7 @@ category: Data, Cryptography- homepage: https://github.com/TomMD/entropy- bug-reports: https://github.com/TomMD/entropy/issues+@@ -16,7 +16,7 @@ bug-reports: https://github.com/TomMD/entropy/issues stability: stable+ -- build-type: Simple+ -- ^^ Used for HaLVM -build-type: Custom +build-type: Simple- cabal-version: >=1.10- tested-with: GHC == 7.6.3- -- data-files:+ -- ^^ Test for RDRAND support using 'ghc'+ cabal-version: >=1.10+ tested-with: GHC == 7.8.2 -- 1.7.10.4
standalone/android/haskell-patches/unix-time_hack-for-Bionic.patch view
@@ -1,18 +1,19 @@-From 5433c4f62b1818e09682a64dee229142f88f17d9 Mon Sep 17 00:00:00 2001+From add5feeb9ee9b4ffa1b43e4ba04b63e5ac2bfaf7 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com>-Date: Thu, 3 Jul 2014 20:48:02 +0000-Subject: [PATCH] ihack for bionic and cross build+Date: Mon, 14 Jul 2014 20:45:24 +0000+Subject: [PATCH] hack for bionic --- Data/UnixTime/Types.hsc | 12 ------------ cbits/conv.c | 2 +-- 2 files changed, 1 insertion(+), 13 deletions(-)+ unix-time.cabal | 1 -+ 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc-index 403daa6..4e66880 100644+index 2ad0623..04fd766 100644 --- a/Data/UnixTime/Types.hsc +++ b/Data/UnixTime/Types.hsc-@@ -10,8 +10,6 @@ import Data.Binary+@@ -12,8 +12,6 @@ import Data.Binary #include <sys/time.h> @@ -21,7 +22,7 @@ -- | -- Data structure for Unix time. data UnixTime = UnixTime {-@@ -21,16 +19,6 @@ data UnixTime = UnixTime {+@@ -23,16 +21,6 @@ data UnixTime = UnixTime { , utMicroSeconds :: {-# UNPACK #-} !Int32 } deriving (Eq,Ord,Show) @@ -35,9 +36,9 @@ - (#poke struct timeval, tv_sec) ptr (utSeconds ut) - (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut) -+ #if __GLASGOW_HASKELL__ >= 704 instance Binary UnixTime where put (UnixTime (CTime sec) msec) = do- put sec diff --git a/cbits/conv.c b/cbits/conv.c index ec31fef..b7bc0f9 100644 --- a/cbits/conv.c@@ -51,6 +52,18 @@ } size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {+diff --git a/unix-time.cabal b/unix-time.cabal+index 5de3f7c..7a0c244 100644+--- a/unix-time.cabal++++ b/unix-time.cabal+@@ -15,7 +15,6 @@ Extra-Tmp-Files: config.log config.status autom4te.cache cbits/config.h+ Library+ Default-Language: Haskell2010+ GHC-Options: -Wall+- CC-Options: -fPIC+ Exposed-Modules: Data.UnixTime+ Other-Modules: Data.UnixTime.Conv+ Data.UnixTime.Diff -- 1.7.10.4
standalone/android/install-haskell-packages view
@@ -89,7 +89,6 @@ patched lifted-base patched zlib patched MissingH- patched bloomfilter patched distributive patched comonad patched iproute
standalone/linux/install-haskell-packages view
@@ -94,4 +94,9 @@ } cabal update++# Some packages fail to install in a non unicode locale.+LANG=C.UTF-8+export LANG+ install_pkgs
templates/configurators/genkeymodal.hamlet view
@@ -2,10 +2,11 @@ <div .modal-header> <div .modal-dialog> <div .modal-content>- <h3>- <img src="@{StaticR activityicon_gif}" alt=""> #- Generating a #{maxRecommendedKeySize} bit GnuPg key.- <div .modal-body>+ <div .modal-header>+ <h3>+ <img src="@{StaticR activityicon_gif}" alt=""> #+ Generating a #{maxRecommendedKeySize} bit GnuPg key.+ <div .modal-body> <p> Generating a GnuPg key can take a long time. To speed up the process, # it actually helps to use your computer for other things, which helps #